text
stringlengths
2.85k
2.55M
label
class label
11 classes
Parareal convergence for 2D unsteady flow around a cylinder arXiv:1509.04252v1 [cs.CE] 14 Sep 2015 Andreas Kreienbuehl1 , Arne Naegel2 , Daniel Ruprecht3 , Andreas Vogel2 , Gabriel Wittum2 , and Rolf Krause1 Abstract In this technical report we study the convergence of Parareal for 2D incompressible flow around a cylinder for different viscosities. Two methods are used as fine integrator: backward Euler and a fractional step method. It is found that Parareal converges better for the implicit Euler, likely because it under-resolves the fine-scale dynamics as a result of numerical diffusion. Key words: Parallel-in-time integration, Parareal, Navier-Stokes equations 1 Introduction The potential of parallel-in-time integration methods to increase the degree of concurrency in the numerical solution of time-dependent partial differential equations has been widely acknowledged, e.g. in the report Applied Mathematics Research for Exascale Computing by Dongarra et al. [2014]. A variety of different methods exists, see e.g. the review by Gander [2015], and principle efficiency of parallel-in-time integration in large- and extreme-scale parallel computations has been demonstrated, e.g. in Speck et al. [2012], Ruprecht et al. [2013], and Gander and Neumueller [2014]. Many problems in computational fluid dynamics require massive computational capacities and suffer from long solution times. Exploring the potential of parallel-in-time methods to speed up such simulations can therefore be a beneficial endeavour. The performance of the parallel-in-time integration method Parareal, introduced by Lions et al. [2001], when applied to the 1 Institute of Computational Science, Faculty of Informatics, Università della Svizzera italiana, Lugano, Switzerland · 2 Goethe-Center for Scientific Computing, Goethe-University Frankfurt am Main, Kettenhofweg 139, DE-60325 Frankfurt am Main, Germany · 3 School of Mechanical Engineering, University of Leeds, Woodhouse Lane, Leeds LS2 9JT, UK. 1 2 Kreienbuehl et al. Navier-Stokes equations has been a topic of research since shortly after its introduction. First studies have been conducted by Trindade and Pereira [2004, 2006], including reports of speedup for an MPI implementation; laminar flow around a cylinder is used as benchmark problem and it is shown that Parareal can correctly reproduce the Nusselt number. Fischer et al. [2005] investigate Parareal for spatial discretisations based on finite and spectral element methods, and discuss using fewer spatial degrees-of-freedom for the coarse integrator. The performance of Parareal for simulations of non-Newtonian fluids has been investigated by Celledoni and Kvamsdal [2009]. Finally, parallel scaling of Parareal for 3D unsteady flow is investigated by Croce et al. [2014] on up to 2048 cores. Based on predictions from linear stability analysis by Gander and Vandewalle [2007], it has been shown by Steiner et al. [2015]) that convergence of Parareal deteriorates as the Reynolds number increases. However, the studies only analysed a rather simple driven cavity problem, which eventually approaches a steady-state and thus may underestimate the problem because of weak transient dynamics towards the end of the simulation. In this report, we continue this investigation for a different, more complex benchmark involving unsteady flow around a cylinder. It was introduced by Schäfer et al. [1996] as the case 2D-3 and further analyzed by e.g. John [2004]. Eventually, the here presented benchmarks will be extended to a comprehensive exploration of Parareal’s performance for 3D flow, including a study of the influence of spatial resolution. 2 Parareal and model problem 2.1 Parareal Parareal parallelises the solution of initial value problems ut = f (t, u(t)), u(0) = u0 , t ∈ [0, T ], (1) by decomposing the time domain [0, T ] into time slices [tj−1 , tj ], j = 1, . . . , Npr with Npr equal to the number of processing units. It then iterates between two time integration methods: a coarse integrator C used to serially propagate corrections, which has to be computationally cheap, and an accurate integrator F run in parallel. The Parareal iteration reads k+1 uk+1 ) + F(ukj ) − C(ukj ), j+1 = C(uj j = 1, . . . , Npr , (2) with k being the iteration index and uj ≈ u(tj ). Note how the computationally expensive computation of the fine method can be done concurrently Parareal convergence for 2D unsteady flow around a cylinder 3 for all time slices. A detailed presentation including a theoretical model for projected speedup is given e.g. by Minion [2010]. 2.2 Model problem As model problem, we consider the Navier-Stokes equations (∂t + U ∇)U = − ∇p + ν∇2 U % (3) for an incompressible fluid, i.e. for a fluid with ∇U = 0, at density % := 1 (kg/m2 ). We focus on the benchmark problem defined in Schäfer et al. [1996] as 2D-3, which is for unsteady flow around a cylinder in two dimensions, i.e. in 2D (see also John [2004]). We make use of the definitions ∇ := (∂x , ∂y )T , U := U (t, x, y), U := (u, v)T . (4) The Reynolds number for a cylinder with diameter d (the reference length) located inside a square cuboid with longest edge along the x-coordinate is d Rd := ūin , ν (5) where the reference velocity ūin is chosen to be the mean velocity of inflow in x-direction and ν the kinematic viscosity. Notice that Rd can be time dependent, as is the case for the problem considered here. In the 2D case the mean velocity is   Z h u(t, 0, y) 2 h ū(t) := dy = u t, 0, , v̄(t) := 0, (6) h 3 2 0 where h := 0.41 (m). In the 2D-3 case we have the inflow velocity uin (t, 0, y) := 4uxin sin  π  y(h − y) t , 8 h2 vin (t, 0, y) := 0, for which Equation (6) is valid. We choose uxin := 3/2 (m/s) so that π  d  d t ∈ 0, . Rd (t) = sin 8 ν ν (7) (8) Thus, setting d := 0.1 (m), it follows for ν ∈ {0.1, 0.01, 0.001} (m/s) that Rdx ∈ {1, 10, 100} defines the maximum-over-time Reynolds number for the chosen ν. (9) 4 Kreienbuehl et al. In this report, the primary goal is to outline the performance of Parareal for the 2D-3 benchmark problem for the three mentioned viscosities, i.e. ranges of Reynolds numbers. 2.3 Implementation details The governing equations were implemented using Q2-Q1 finite elements in the UG4 software toolbox (see Vogel et al. [2013], Vogel [2014]). For the parallelisation in time via Parareal, we used the library Lib4PrM, which was first applied in Kreienbuehl et al. [2015].1 3 Results Instead of measuring convergence of Parareal by comparing the discretisation error with the defect as discussed e.g. by Arteaga et al. [2015], we focus here on how well Parareal reproduces important characteristic numbers of the dynamics, namely the drag coefficient Cdr , the lift coefficient Cli and the pressure difference ∆p between the front and end point of the cylinder over time. These parameters are respectively defined as follows: Cdr := 2Fdr , %ū2in d Cli := 2Fli , %ū2in d ∆p := pfr − pen , (10) where Fdr is the drag force and Fli the lift force, and pfr together with pen define the pressure at the front and end of the cylinder. Again, we assume here that the density is 1 (kg/m2 ) and set t ∈ [0, 8] (s) as time domain. For ν = 0.001 (m/s), Schäfer et al. [1996] report on a maximum-overma time drag coefficient of Cdr ≈ 2.9500 ± 0.0200, a maximum-over-time lift ma coefficient of Cli ≈ 0.4800±0.0100, and a final pressure difference at t = 8 (s) of ∆fip ≈ −0.1100 ± 0.0050 (kg/s2 ). 3.1 Numerical setup We use Npr ∈ {2, 4, 8, 16} processors without parallelization in space and with 13,212 spatial degrees-of-freedom for both the fine and coarse level. For each ν, we consider the following two Parareal solvers “S” comprised of a coarse Mco and fine Mfi serial time integration method as well as number of 1 It can be obtained by cloning the Git repository https://scm.ti-edu.ch/repogit/ lib4prm. Parareal convergence for 2D unsteady flow around a cylinder 5 time steps Nco and Nfi : (Mco , Nco ) × (Mfi , Nfi ) = (IE, 16) × (IE, 32), (S1 ) (Mco , Nco ) × (Mfi , Nfi ) = (IE, 16) × (FS, 32), (S2 ) where “IE” stands for implicit Euler (first-order) and “FS” for fractional step (second-order). Errors in the three physical quantities discussed above are measured by fi kupa ph − uph kti := , (11) Eph fi kuph kti where the parameter “ph” is in {dr,li,p} for drag and lift coefficient or pressure difference. We use the l2 -norm over the solutions at the end of all time-slices kuk2ti := Npr 8 X |u(tn )|2 Npr n=1 (12) weighted by the time slice length 8/Npr . 3.2 Problem dynamics Figure 1 shows the flow field at t = 5.25 (s) for the three different viscosities. As viscosity decreases, the maximum Reynolds number increases and the flow becomes more turbulent. While for ν = 0.1 (m/s) and ν = 0.01 (m/s) the flow is essentially laminar, smaller vortices start to form behind the cylinder for ν = 0.001 (m/s). The resulting evolution over time of the three characteristic numbers for ν = 0.1 (m/s) using serial time integration is shown in Figure 2. Both fine integrators S1 and S2 produce essentially identical profiles and their profiles closely match the one generated by the corresponding reference simulation (not shown). Figure 3 shows the same profiles for the simulation with ν = 0.01 (m/s). Again, both S1 and S2 produce profiles that match and agree with the results from the corresponding reference (not shown). Lastly, Figure 4 shows three profiles for ν = 0.001 (m/s), one for the reference simulation, one for S1 and one for S2 . While the drag coefficient and pressure difference agree across all three configurations, S1 produces a lift coefficient profile that is distinctly different from the corresponding reference and S2 . The relatively high numerical diffusion of S1 in combination with a rather low spatial resolution probably prevents S1 from correctly capturing the more turbulent dynamics in this case. In contrast, although S2 fails to fully reproduce the frequency of oscillations, it still achieves a qualitatively correct representation of the dynamics of the corresponding reference simulation. 6 Kreienbuehl et al. Fig. 1: Flow field at t = 5.25 (s) for three different viscosities: ν = 0.1 (m/s) at the top, ν = 0.01 (m/s) in the middle, and ν = 0.001 (m/s) at the bottom. 3.3 Convergence of Parareal Here, we analyse how accurately Parareal reproduces the three characteristic values studied above. Figure 5 shows the defect or error according to Equation (11) in the characteristic values accumulated over all time slices versus the number of iterations. Here, defect refers to the difference between the solution computed by Parareal and the solution computed by running the fine integrator serially. For S1 , the error for all three quantities, i.e. drag coefficient, lift coefficient and pressure difference, quickly goes to zero, that is Parareal rapidly produces values identical to ones obtained from the serial simulation. As the number of time slices is increased, convergence becomes slower but the increase is not drastic: for Npr = 16 after seven iterations all three characteristic values have converged up to round-off error. In a production run, where the main goal is to push the defect from Parareal below the Parareal convergence for 2D unsteady flow around a cylinder 7 25 Pressure difference ∆ p pkg{s2 q 1 Lift coefficient Cli Drag coefficient Cdr 60 40 20 0 0.5 2 4 6 8 15 10 5 0 0 0 20 0 Time t psq 2 4 6 8 0 Time t psq 2 4 6 8 Time t psq 25 Pressure difference ∆ p pkg{s2 q 1 Lift coefficient Cli Drag coefficient Cdr 60 40 20 0 0.5 2 4 6 Time t psq 8 15 10 5 0 0 0 20 0 2 4 6 Time t psq 8 0 2 4 6 8 Time t psq Fig. 2: Drag and lift coefficient, and pressure difference for ν = 0.1 (m/s) for S1 (top) and S2 (bottom). The curves match the values from the reference simulation (not shown). discretisation error (see the discussion in Arteaga et al. [2015]), significantly fewer iterations will likely suffice. Decreasing viscosity and thus increasing the Reynolds number range does negatively affect convergence. For ν = 0.001 (m/s), the simulation with Npr = 16 time slices already requires 13 iterations to converge up to round-off error. Depending on the desired accuracy, speedup is still possible here but parallel efficiency will likely be lower than in the more laminar case. Since S1 fails to resolve the full dynamics of the problem, its convergence behaviour is probably not representative of the actual physical dynamics. This is supported by the fact that for S2 and ν = 0.001 (m/s), Parareal essentially no longer converges. Since S2 does resolve the turbulent dynamics 8 Kreienbuehl et al. ¨10´2 4 6 4 2 Pressure difference ∆ p pkg{s2 q 8 Lift coefficient Cli Drag coefficient Cdr 8 6 4 2 0 3 2 1 0 0 0 2 4 6 8 0 Time t psq 2 4 6 0 8 2 4 6 8 Time t psq Time t psq ¨10´2 4 6 4 2 Pressure difference ∆ p pkg{s2 q 8 Lift coefficient Cli Drag coefficient Cdr 8 6 4 2 0 3 2 1 0 0 0 2 4 6 Time t psq 8 0 2 4 6 Time t psq 8 0 2 4 6 8 Time t psq Fig. 3: Drag and lift coefficient, and pressure difference for ν = 0.01 (m/s) for reference (top), S1 (middle) and S2 (bottom). at least partially, in contrast to S1 , this suggests that the good convergence of Parareal for S1 and ν = 0.001 (m/s) is an artefact produced by excessive numerical diffusion. The dynamics of the numerical solution are more laminar than they should be, leading to an unrealistic convergence behaviour of Parareeal. Supposedly, when using S1 on a significantly finer spatial and temporal mesh, a similar deterioration of convergence would be observed, as the numerical solution better resolves the turbulent features of the flow. Interestingly, this difference between S1 and S2 can already be seen for ν = 0.1 (m/s), where the physical dynamics are still quite laminar as well. Although Parareal for S2 does converge, particularly for larger numbers of Parareal convergence for 2D unsteady flow around a cylinder 2.5 Lift coefficient Cli 2 1 0 Pressure difference ∆ p pkg{s2 q 0.4 3 Drag coefficient Cdr 9 0.2 0 ´0.2 ´0.4 0 2 4 6 0 8 2 4 6 1.5 1 0.5 0 8 0 Time t psq ¨10´2 Time t psq 2 4 6 8 Time t psq 2.5 3 2 1 Pressure difference ∆ p pkg{s2 q Lift coefficient Cli 0 Drag coefficient Cdr 2 ´0.5 ´1 0 2 1.5 1 0.5 0 ´1.5 0 2 4 6 8 0 Time t psq 4 6 0 8 2 4 6 8 Time t psq 2.5 3 2 1 Pressure difference ∆ p pkg{s2 q 0.2 Lift coefficient Cli Drag coefficient Cdr 2 Time t psq 0.1 0 ´0.1 0 0 2 4 6 Time t psq 8 0 2 4 6 Time t psq 8 2 1.5 1 0.5 0 0 2 4 6 8 Time t psq Fig. 4: Drag and lift coefficient, and pressure difference for ν = 0.001 (m/s) for reference (top), S1 (middle) and S2 (bottom). 10 Kreienbuehl et al. “2 “4 “8 “ 16 10´6 “2 “4 “8 “ 16 10´8 10´9 Npr Npr Npr Npr “2 “4 “8 “ 16 10´10 10´11 10´12 10´13 10´14 10´14 1 4 7 10 13 16 1 4 7 10 13 16 1 4 7 10 13 16 Iterations Nit Iterations Nit Iterations Nit “2 “4 “8 “ 16 10´6 10´9 Npr Npr Npr Npr “2 “4 “8 “ 16 10´8 10´5 Error E p Npr Npr Npr Npr 10´4 Error Eli 10´6 10´10 10´12 10´15 10´3 Error E p 10´11 10´13 Error Edr Npr Npr Npr Npr 10´8 Error Eli Error Edr 10´9 Npr Npr Npr Npr 10´10 Npr Npr Npr Npr “2 “4 “8 “ 16 10´8 10´11 10´12 10´12 10´14 10´14 10´15 1 4 7 10 13 16 1 4 7 10 13 16 1 4 7 10 13 16 Iterations Nit Iterations Nit Iterations Nit Fig. 5: Fine solver convergence errors for drag and lift coefficient, and pressure difference for ν = 0.1 (m/s) and S1 (top) and S2 (bottom). time slices, its rate of convergence is lower than for S1 . The benefit of using an integrator with damping properties as coarse integrator has been pointed out before by Bal [2005] but apparently numerical diffusion from the fine method does help Parareal convergence, too. Since here the fine method realistically represents the flow features, using a diffusive integrator as fine method in Parareal when simulating turbulent flow could be an easy way to obtain decent convergence. Parareal convergence for 2D unsteady flow around a cylinder 10´5 10´7 Npr Npr Npr Npr “2 “4 “8 “ 16 10´3 Npr Npr Npr Npr “2 “4 “8 “ 16 10´5 10´7 10´11 “2 “4 “8 “ 16 10´9 10´12 10´13 10´15 10´15 1 4 7 10 13 16 1 4 7 10 13 16 Iterations Nit Iterations Nit Npr Npr Npr Npr “2 “4 “8 “ 16 10´3 Npr Npr Npr Npr 10´15 “2 “4 “8 “ 16 10´3 10´9 10´12 10´12 10´15 10´15 Npr Npr Npr Npr “2 “4 “8 “ 16 10´6 Error E p Error Eli 10´9 1 4 7 10 13 16 Iterations Nit 10´6 10´6 Error Edr 10´9 Npr Npr Npr Npr 10´11 10´13 10´3 Error E p Error Eli Error Edr 10´6 10´9 11 10´9 10´12 1 4 7 10 13 16 1 4 7 10 13 16 Iterations Nit Iterations Nit 10´15 1 4 7 10 13 16 Iterations Nit Fig. 6: Fine solver convergence errors for drag and lift coefficient, and pressure difference for ν = 0.01 (m/s) for S1 (top) and S2 (bottom). 4 Conclusions This report extends the investigation by Steiner et al. [2015] about how a decreasing viscosity in the Navier-Stokes equations affects the convergence behaviour of the Parareal parallel-in-time method. An unsteady 2D flow around a cylinder is used as a benchmark. Two different configurations are tested, one using an implicit Euler as coarse and fine method, the other an implicit Euler as coarse but a second-order fractional step integrator as fine method. For larger viscosities, both base methods correctly reproduce the evolution of characteristic quantities like drag and lift coefficient and pressure difference. However, the numerical diffusion from the backward Euler method as fine integrator leads to significantly better convergence of Parareal. 12 Kreienbuehl et al. 10´2 10´5 10´9 10´11 10´15 10´14 1 4 7 10 13 16 Iterations Nit Iterations Nit “2 “4 “8 “ 16 10´9 10´15 1 4 7 10 13 16 Iterations Nit 10´3 10´2 Npr Npr Npr Npr “2 “4 “8 “ 16 Error Eli Error Edr 10´6 Npr Npr Npr Npr 10´12 1 4 7 10 13 16 10´3 10´9 10´3 “2 “4 “8 “ 16 10´8 10´12 10´6 Npr Npr Npr Npr Error E p “2 “4 “8 “ 16 10´6 Npr Npr Npr Npr “2 “4 “8 “ 16 10´6 Error E p Error Edr 10´6 Npr Npr Npr Npr Error Eli 10´3 10´9 Npr Npr Npr Npr “2 “4 “8 “ 16 10´10 10´12 10´12 10´14 10´15 1 4 7 10 13 16 1 4 7 10 13 16 Iterations Nit Iterations Nit 10´15 1 4 7 10 13 16 Iterations Nit Fig. 7: Fine solver convergence errors for drag and lift coefficient, and pressure difference for ν = 0.001 (m/s) for S1 (top) and S2 (bottom). As viscosity decreases, convergence of Parareal becomes slower similarly to the results in Steiner et al. [2015]. However, while for the fractional step method Parareal stalls completely, the backward Euler retains reasonable convergence even for small viscosities. A comparison of the profiles for characteristic numbers with a reference solution suggests that the good convergence for the backward Euler is likely artificial. The fine integrator alone captures the relatively smooth profiles of the drag coefficient and pressure difference quite well. However, the high frequency oscillations in the lift coefficient, which are clearly seen in serial runs using the fractional step integrator, are not present when using backward Euler. Most likely, the rather high numerical diffusion leads to an artificially laminar flow, so that the good convergence of Parareal is not representative of the used viscosity parameter. Parareal convergence for 2D unsteady flow around a cylinder 13 Clearly, when assessing Parareal’s convergence for flow problems, care must be taken to ensure that the fine base method correctly resolves the important features of the flow. Intrinsic convergence of Parareal alone is not a reliable indicator. There are several works proposing strategies to stabilise Parareal for advection-dominated problems, e.g. by Farhat et al. [2006], Gander and Petcu [2008], Ruprecht and Krause [2012] or Chen et al. [2014]. An interesting continuation of the work presented here would be to analyse whether these strategies improve convergence of Parareal for turbulent flows. Acknowledgments We would like to thank Ernesto Casartelli and Luca Mangani from the Lucerne University of Applied Sciences and Arts (HSLU) in Switzerland for discussions. The research of A.K., D.R., and R.K. is funded through the “FUtuRe SwIss Electrical InfraStructure” (FURIES) project of the Swiss Competence Centers for Energy Research (SCCER) at the Commission for Technology and Innovation (CTI) in Switzerland. The research is also funded by the Deutsche Forschungsgemeinschaft (DFG) as part of the “ExaSolvers” project in the Priority Programme 1648 “Software for Exascale Computing” (SPPEXA) and by the Swiss National Science Foundation (SNSF) under the lead agency agreement as grant SNSF-145271. References A. Arteaga, Daniel Ruprecht, and Rolf Krause. A stencil-based implementation of Parareal in the C++ domain specific embedded language STELLA. Applied Mathematics and Computation, 2015. URL http: //dx.doi.org/10.1016/j.amc.2014.12.055. Guillaume Bal. On the convergence and the stability of the parareal algorithm to solve partial differential equations. In Ralf Kornhuber and et al., editors, Domain Decomposition Methods in Science and Engineering, volume 40 of Lecture Notes in Computational Science and Engineering, pages 426–432, Berlin, 2005. Springer. URL http://dx.doi.org/10. 1007/3-540-26825-1_43. E. Celledoni and T. Kvamsdal. Parallelization in time for thermo-viscoplastic problems in extrusion of aluminium. International Journal for Numerical Methods in Engineering, 79(5):576–598, 2009. URL http://dx.doi.org/ 10.1002/nme.2585. 14 Kreienbuehl et al. Feng Chen, Jan S. Hesthaven, and Xueyu Zhu. On the Use of Reduced Basis Methods to Accelerate and Stabilize the Parareal Method. In Alfio Quarteroni and Gianluigi Rozza, editors, Reduced Order Methods for Modeling and Computational Reduction, volume 9 of MS&A - Modeling, Simulation and Applications, pages 187–214. Springer International Publishing, 2014. URL http://dx.doi.org/10.1007/978-3-319-02090-7_7. Roberto Croce, Daniel Ruprecht, and Rolf Krause. Parallel-in-Space-andTime Simulation of the Three-Dimensional, Unsteady Navier-Stokes Equations for Incompressible Flow. In Hans Georg Bock, Xuan Phu Hoang, Rolf Rannacher, and Johannes P. Schlöder, editors, Modeling, Simulation and Optimization of Complex Processes – HPSC 2012, pages 13–23. Springer International Publishing, 2014. URL http://dx.doi.org/10. 1007/978-3-319-09063-4_2. Jack Dongarra et al. Applied Mathematics Research for Exascale Computing. Technical Report LLNL-TR-651000, Lawrence Livermore National Laboratory, 2014. URL http://science.energy.gov/~/media/ascr/pdf/ research/am/docs/EMWGreport.pdf. Charbel Farhat, Julien Cortial, C. Dastillung, and H. Bavestrello. Timeparallel implicit integrators for the near-real-time prediction of linear structural dynamic responses. International Journal for Numerical Methods in Engineering, 67:697–724, 2006. URL http://dx.doi.org/10.1002/nme. 1653. P. F. Fischer, F. Hecht, and Yvon Maday. A parareal in time semi-implicit approximation of the Navier-Stokes equations. In Ralf Kornhuber and et al., editors, Domain Decomposition Methods in Science and Engineering, volume 40 of Lecture Notes in Computational Science and Engineering, pages 433–440, Berlin, 2005. Springer. URL http://dx.doi.org/10. 1007/3-540-26825-1_44. Martin J. Gander. 50 years of Time Parallel Time Integration. In Multiple Shooting and Time Domain Decomposition. Springer, 2015. URL {http: //www.unige.ch/%7Egander/Preprints/50YearsTimeParallel.pdf}. Martin J. Gander and M. Neumueller. Analysis of a Time Multigrid Algorithm for DG-Discretizations in Time. 2014. URL http://arxiv.org/ abs/1409.5254. Martin J. Gander and M. Petcu. Analysis of a Krylov Subspace Enhanced Parareal Algorithm for Linear Problem. ESAIM: Proc., 25:114–129, 2008. URL http://dx.doi.org/10.1051/proc:082508. Martin J. Gander and Stefan Vandewalle. On the Superlinear and Linear Convergence of the Parareal Algorithm. In Olof B. Widlund and David E. Keyes, editors, Domain Decomposition Methods in Science and Engineering, volume 55 of Lecture Notes in Computational Science and Engineering, pages 291–298. Springer Berlin Heidelberg, 2007. URL http: //dx.doi.org/10.1007/978-3-540-34469-8_34. Volker John. Reference values for drag and lift of a two-dimensional timedependent flow around a cylinder. International Journal for Numerical Parareal convergence for 2D unsteady flow around a cylinder 15 Methods in Fluids, 44(7):777–788, Mar 2004. doi: 10.1002/fld.679. Andreas Kreienbuehl, Arne Naegel, Daniel Ruprecht, Robert Speck, Gabriel Wittum, and Rolf Krause. Numerical simulation of skin transport using Parareal. Computing and Visualization in Science, Aug 2015. doi: 10.1007/ s00791-015-0246-y. URL http://arxiv.org/abs/1502.03645. J.-L. Lions, Yvon Maday, and Gabriel Turinici. A ”parareal” in time discretization of PDE’s. Comptes Rendus de l’Académie des Sciences - Series I - Mathematics, 332:661–668, 2001. URL http://dx.doi.org/10.1016/ S0764-4442(00)01793-6. Michael L. Minion. A Hybrid Parareal Spectral Deferred Corrections Method. Communications in Applied Mathematics and Computational Science, 5(2): 265–301, 2010. URL http://dx.doi.org/10.2140/camcos.2010.5.265. Daniel Ruprecht and Rolf Krause. Explicit parallel-in-time integration of a linear acoustic-advection system. Computers & Fluids, 59(0):72–83, 2012. URL http://dx.doi.org/10.1016/j.compfluid.2012.02.015. Daniel Ruprecht, Robert Speck, Matthew Emmett, Matthias Bolten, and Rolf Krause. Poster: Extreme-scale space-time parallelism. In Proceedings of the 2013 Conference on High Performance Computing Networking, Storage and Analysis Companion, SC ’13 Companion, 2013. URL http://sc13.supercomputing.org/sites/default/files/ PostersArchive/tech_posters/post148s2-file3.pdf. Michael Schäfer, Stefan Turek, Franz Durst, Egon Krause, and Rolf Rannacher. Benchmark Computations of Laminar Flow Around a Cylinder. In Ernst Heinrich Hirschel, editor, Flow Simulation with High-Performance Computers II, volume 48 of Notes on Numerical Fluid Mechanics (NNFM), pages 547–566. Vieweg+Teubner Verlag, 1996. ISBN (13) 9783322898517. doi: 10.1007/978-3-322-89849-4\ 39. Robert Speck, Daniel Ruprecht, Rolf Krause, Matthew Emmett, Michael L. Minion, Mathias Winkel, and Paul Gibbon. A massively space-time parallel N-body solver. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, SC ’12, pages 92:1–92:11, Los Alamitos, CA, USA, 2012. IEEE Computer Society Press. URL http://dx.doi.org/10.1109/SC.2012.6. J. Steiner, Daniel Ruprecht, Robert Speck, and Rolf Krause. Convergence of Parareal for the Navier-Stokes equations depending on the Reynolds number. In Assyr Abdulle, Simone Deparis, Daniel Kressner, Fabio Nobile, and Marco Picasso, editors, Numerical Mathematics and Advanced Applications - ENUMATH 2013, volume 103 of Lecture Notes in Computational Science and Engineering, pages 195–202. Springer International Publishing, 2015. URL http://dx.doi.org/10.1007/978-3-319-10705-9_19. J. M. F. Trindade and J. C. F. Pereira. Parallel-in-time simulation of the unsteady Navier-Stokes equations for incompressible flow. International Journal for Numerical Methods in Fluids, 45(10):1123–1136, 2004. URL http://dx.doi.org/10.1002/fld.732. 16 Kreienbuehl et al. J. M. F. Trindade and J. C. F. Pereira. Parallel-in-Time Simulation of TwoDimensional, Unsteady, Incompressible Laminar Flows. Numerical Heat Transfer, Part B: Fundamentals, 50(1):25–40, 2006. URL http://dx.doi. org/10.1080/10407790500459379. Andreas Vogel. Flexible und kombinierbare Implementierung von Finite-Volumen-Verfahren höherer Ordnung mit Anwendungen für die Konvektions-Diffusions-, Navier-Stokes- und Nernst-Planck-Gleichungen sowie dichtegetriebene Grundwasserströmung in porösen Medien. PhD thesis, Johann Wolfgang Goethe-Universität Frankfurt, 2014. Andreas Vogel, Sebastian Reiter, Martin Rupp, Arne Nägel, and Gabriel Wittum. UG 4: A novel flexible software system for simulating PDE based models on high performance computers. Computing and Visualization in Science, 16(4):165–179, Aug 2013. ISSN 1433-0369. doi: 10.1007/s00791-014-0232-9. URL http://dx.doi.org/10.1007/ s00791-014-0232-9.
5cs.CE
Analysis of the Continued Logarithm Algorithm Pablo Rotondo1,2,3 , Brigitte Vallée2 , and Alfredo Viola3 1 arXiv:1801.10139v2 [cs.DM] 1 Feb 2018 2 IRIF, CNRS and Université Paris Diderot, France GREYC, CNRS and Université de Caen, France 3 Universidad de la República, Uruguay Abstract. The Continued Logarithm Algorithm –CL for short– introduced by Gosper in 1978 computes the gcd of two integers; it seems very efficient, as it only performs shifts and subtractions. Shallit has studied its worst-case complexity in 2016 and showed it to be linear. We here perform the average-case analysis of the algorithm : we study its main parameters (number of iterations, total number of shifts) and obtain precise asymptotics for their mean values. Our “dynamical” analysis involves the dynamical system underlying the algorithm, that produces continued fraction expansions whose quotients are powers of 2. Even though this CL system has already been studied by Chan (around 2005), the presence of powers of 2 in the quotients ingrains into the central parameters a dyadic flavour that cannot be grasped solely by studying the CL system. We thus introduce a dyadic component and deal with a two-component system. With this new mixed system at hand, we then provide a complete average-case analysis of the CL algorithm, with explicit constants4 . 1 Introduction In an unpublished manuscript [6], Gosper introduced the continued logarithms, a mutation of the classical continued fractions. He writes “The primary advantage is the conveniently small information parcel. The restriction to integers of regular continued fractions makes them unsuitable for very large and very small numbers. The continued fraction for Avogadro’s number, for example, cannot even be determined to one term, since its integer part contains 23 digits, only 6 of which are known. (...) By contrast, the continued logarithm of Avogadro’s number begins with its binary order of magnitude, and only then begins the description equivalent to the leading digits – a sort of recursive version of scientific notation”. The idea of Gosper gives rise to an algorithm for computing gcd’s, described by Shallit in [8]. This algorithm has two advantages: first, it can be calculated starting from the most representative bits, and uses very simple operations (subtractions and shifts); it does not employ divisions. Second, as the quotients which intervene in the associated continued fraction are powers of two 2a , we can store 4 Accepted in Latin American Theoretical Informatics 2018. Thanks to the Dyna3S ANR Project and the AleaEnAmsud AmSud-STIC Project. 2 Pablo Rotondo, Brigitte Vallée, and Alfredo Viola each of them with log2 a bits. Then, the algorithm seems to be of small complexity, both in terms of computation and storage. Shallit [8] performs the worst-case analysis of the algorithm, and studies the number of steps K(p, q), and the total number of shifts S(p, q) that are performed on an integer input (p, q) with p < q: he proves the inequalities K(p, q) ≤ 2 log2 q + 2, S(p, q) ≤ (2 log2 q + 2) log2 q , (1) and exhibits instances, namely the family (2n−1 , 1), which show that the previous bounds are nearly optimal, K(1, 2n−1 ) = 2n − 2, S(1, 2n−1 ) = n(n − 1)/2 + 1 . In a personal communication, Shallit proposed us to perform the average-case analysis of the algorithm. In this paper, we answer his question. We consider the set ΩN which gathers the integer pairs (p, q) with 0 ≤ p ≤ q ≤ N , endowed with the uniform probability, and we study the mean values EN [K] and EN [S] as N → ∞. We prove that these mean values are asymptotically linear in the size log N , and exhibit their precise asymptotic behaviour for N → ∞, log 3 − log 2 2 log N, EN [S] ∼ EN [K] . EN [K] ∼ H 2 log 2−log 3 The constant H is related to the entropy of an associated dynamical system and   2 X (−1)k π 1  +2 − (log 2)(3 log 3−4 log 2) . (2) H= 2 log 2−log 3 6 k 2 2k k≥1 This entails numerical estimates (validated by experiments) for the mean values EN [K] ∼ 1.49283 log N, EN [S] ∼ 1.40942 log N . Then, from (1), the mean number of divisions is about half the maximum. Our initial idea was to perform a dynamical analysis along the lines described in [10]. The CL algorithm is defined as a succession of steps, each consisting of a pseudo-division which transforms an integer pair into a new one. This transformation may be read first on the associated rationals and gives rise to a mapping T that is further extended to the real unit interval I. This smoothly yields a dynamical system (I, T ), the CL system, already well studied, particularly by Chan [3] and Borwein [1]. The system has an invariant density ψ (with an explicit expression described in (8)) and is ergodic. Thus we expected this dynamic analysis to follow general principles described in [10]. However, the analysis of the algorithm is not so straightforward. The binary shifts, which make the algorithm so efficient, cause many problems in the analysis. Even on a pair of coprime integers (p, q), the algorithm creates intermediate pairs (qi+1 , qi ) which are no longer generally coprime, as their gcd is a non-trivial power of 2. These extra gcd’s are central in the analysis of the algorithm, as they have an influence on the evolution of the sizes of the pairs (qi+1 , qi ) which may grow due these extra factors. As these extra factors may only be powers of 2, they are easily expressed with the dyadic absolute value on Q, at least when the input is rational. However, when extending the algorithm into a dynamical system on the unit interval, we lose track of these factors. Analysis of the Continued Logarithm Algorithm 3 The (natural) idea is thus to add to the usual CL dynamical system (on the unit interval I) a new component in the dyadic field Q2 . The dyadic component is just added here to deal with the extra dyadic factors, as a sort of accumulator, but it is the former real component that dictates the evolution of the system. As the initial CL system has nice properties, the mixed system inherits this good behaviour. In particular, the transfer operator of the mixed system presents a dominant eigenvalue, and the dynamical analysis may be performed successfully. The constant H in Eqn (2) is actually the entropy of this extended system. After this extension, the analysis follows classical steps, with methodology mixing tools from analytic combinatorics (generating functions, here of Dirichlet type), Tauberian theorems (relating the singularities of these generating functions to the asymptotics of their coefficients), functional analysis (which transfers the geometry of the dynamical system into spectral properties of the transfer operator). Plan of the paper and notation. The paper is structured into three sections. Section 2 introduces the algorithm and its associated dynamical system, as well as the probabilistic model, the costs of interest and their generating functions. Then, Section 3 defines the extended dynamical system, allowing us to work with dyadic costs; it explains how the corresponding transfer operator provides alternative expressions for the generating functions. Finally, Section 4 describes the properties of the transfer operator, namely its dominant spectral properties on a convenient functional space. With Tauberian theorem, it provides the final asymptotic estimates for the mean values of the main costs of interest. For an integer q, δ(q) denotes the dyadic valuation, i.e., is the greatest integer k for which 2k divides q. The dyadic norm | · |2 is defined on Q with the equality |a/b|2 := 2δ(b)−δ(a) . The dyadic field Q2 is the completion of Q for this norm. See [7] for more details about the dyadic field Q2 . 2 The CL algorithm and its dynamical system. We kick off this section with a precise description of the CL algorithm, followed by its extension to the whole of the unit interval I, giving rise to a dynamical system, called the CL system, whose inverse branches capture all of our costs of interest. Then we recall the already known features of the CL system and we present the probabilistic model, with its generating functions. Description of the algorithm. The algorithm, described by Shallit in [8], is a sequence of (pseudo)–divisions: each division associates to a pair (p, q)5 with p < q a new pair (r, p0 ) (where r is the “remainder”) defined as follows q = 2a p + r, 5 p0 = 2a p, with a = a(p, q) := max{k ≥ 0 | 2k p ≤ q} . Our notations are not the same as in the paper of Shallit as we reverse the roles of p and q. 4 Pablo Rotondo, Brigitte Vallée, and Alfredo Viola This transformation rewrites the old pair (p, q) in terms of the new one (r, 2a p) in matrix form,         p r 0 2−a 0 1 = Na a , with Na = = 2−a Ma , Ma = . (3) q 2 p 1 1 2a 2a The CL algorithm begins with the input (p, q) with p < q. It lets (q1 , q0 ) := (p, q), then performs a sequence of divisions T T qi+1 , qi = Nai+1 qi+2 , 2ai+1 qi+1 , and stops after k = K(p, q) steps on a pair of the form (0, 2ak qk ). The complete execution of the algorithm uses the set of matrices Na defined in (3), and writes the input as T T p, q = Na1 · Na2 · · · Nak 0, 2ak qk . The rational input p/q is then written as a continued fraction according to the LFTs (linear fractional transformations) ha associated with matrices Na or Ma , p = q 2−a1 = ha1 ◦ha2 ◦· · ·◦hak (0) , 2−a2 1+ 2−a3 1+ . 2−ak 1 + .. 1 with ha : x 7→ 2−a . (4) 1+x Moreover, it is possible to choose the last exponent ak to be 0. (and the last quotient to be 1). This is a gcd algorithm: as qk is equal to gcd(p, q) up to a power of 2, the CL algorithm determines the odd part of gcd(p, q) whereas the even part is directly determined by the dyadic valuations of p and q. Shallit [8] proves that this algorithm indeed terminates and characterizes the worst-case complexity of the algorithm. Figure 1 describes the execution of the algorithm on the pair (31, 75). i ai 2ai qi qi+1 0 − 1 1 2 2 3 2 4 1 5 0 6 0 7 − 75 62 52 40 24 16 8 8 31 13 10 12 16 8 8 0 (2ai qi )2 (qi+1 )2 δ(2ai qi ) δ(qi+1 ) δ(b gi ) 1001011 0111110 110100 101000 11000 10000 1000 1000 11111 1101 1010 1100 10000 1000 1000 0 0 1 2 3 3 4 3 3 0 0 1 2 4 3 3 ∞ 0 0 1 2 3 3 3 3 Fig. 1. Execution for the input (31, 75). Here gbi = gcd(2ai qi , qi+1 ). The dyadic valuation δ(b gi ) seems to linearly increase with i, with δ(b gi ) ∼ δ(qi+1 ) ∼ i/2 (i → ∞). Analysis of the Continued Logarithm Algorithm 5 Dynamical system. The relations (r, 2a p)T = Na−1 (p, q)T , (p, q)T = Na (r, 2a p)T , are first transformed into relations on the associated rationals p/q, r/(2a p) via the LFT’s Ta , ha associated to matrices Na−1 , Na , Ta (x) := 1 − 1, 2a x ha (x) = 1 , 2a (1 + x) a ≥ 0. (5) They are then extended to the reals of the unit interval I := [0, 1]. This gives rise to a dynamical system (I, T ), denoted CL in the sequel, defined on the unit interval I, with fundamental intervals Ia := [2−a−1 , 2−a ], the surjective branches Ta : Ia → I, and their inverses ha : I → Ia . The CL system (I, T ) is displayed on the left of the figure below, along with the shift S : I → I which gives rise to the CL system by induction on the first branch. The map S is a mix of the Binary and Farey maps, as its first branch comes from the Binary system, and the second one from the Farey system. On the right, the usual Euclid dynamical system (defined from the Gauss map) is derived from the Farey shift by induction on the first branch. 1 1 1 1 1 0 1 1 1 With each k-uple a := ha1 , a2 , . . . , ak i ∈ Nk we associate the matrix Ma := Ma1 · · · Mak and the LFT ha := ha1 ◦ ha2 ◦ · · · ◦ hak . Then the set H of the inverse branches, and the set Hk of the inverse branches of T k (of depth k) are H := {ha | a ≥ 0}, Hk := {ha | a ∈ Nk }. As the branches Ta are surjective, the inverse branches are defined on I and the images ha (I) for a ≥ 0 form a topological partition of I. This will be true at any depth, and the intervals ha (I), called fundamental intervals of depth k, form a topological partition for a ∈ Nk . Properties of the CL system. The Perron Frobenius operator H[f ](x) := X  0 |h (x)| f (h(x)) = h∈H 1 1+x 2 X −a 2  f a≥0 2−a 1+x  . (6) describes the evolution of densities : If f is the initial density, H[f ] is the density after one iteration of the system (I, T ). The invariant density ψ is a fixed point for H and satisfies the functional equation  ψ(x) = 1 1+x 2 X a≥0 2−a ψ  2−a 1+x  . (7) 6 Pablo Rotondo, Brigitte Vallée, and Alfredo Viola Chan [3] obtains an explicit form for ψ 1 1 ψ(x) = . log(4/3) (x + 1)(x + 2) (8) He also proves that the system is ergodic with respect to ψ, and entropic. However, he does not provide an explicit expression for the entropy. We obtain here such an expression, with a precise study of the transfer operator of the system. We introduce two (complex) parameters t, v in (6), and deal with a perturbation of the operator H, defined by Ht,v [f ](x) := X  |h0 (x)|t d(h)v f (h(x)) = h∈H 1 1+x 2t X 2 a(v−t) f  a≥0 2−a 1+x  . (9) Such an operator Ht,v is called a transfer operator. When (t, v) satisfies <(t−v) > 0, we prove the following: the operator Ht,v acts nicely on the space C 1 (I) endowed with the norm | · |1,1 , defined by |f |1,1 := |f |0 + |f 0 |0 , where | · |0 denotes the sup norm. In particular, it has a dominant eigenvalue λ(t, v) separated from the remainder of the spectrum by a spectral gap, for (t, v) close to (1, 0). The Taylor expansion of λ(t, v) near (1, 0) λ(t, v) ≈ 1 − A(t − 1) + Dv involves the two constants A = −∂λ/∂t(1, 1, 0), D = ∂λ/∂v(1, 1, 0) , that are expressed as mean values with respect to the invariant density ψ, A = E − D, E = Eψ [2| log x|], D = (log 2) Eψ [a] , (10) (here, the function a associates with x the integer defined with the Iverson bracket a(x) := a · [[x ∈ ha (I)]]. The constants A is the entropy of the system, and E, D admit explicit expressions   2 X (−1)k π 1   , D = (log 2) log(3/2) . +2 (11) E= 2 k log(4/3) 6 k 2 log(4/3) k≥1 Then, with (10) and (11), there is an explicit value for the entropy A, and . . . A = 1.62352 . . . , D = 0.97693 . . . , E = 2.60045 . . . . Main costs associated to a truncated expansion. Each real number of the unit interval admits an infinite continued fraction expansion derived from the dynamical system, which we call its CLCF expansion. When truncated at a finite depth, its expansion becomes finite, as in (4), and defines a LFT h := ha . This expansion gives rise to a rational p/q, (assumed to be irreducible) which is thus written as p/q = ha (0). On the other hand, the k-uple a defines a matrix Ma and an integer pair (P, Q), called the continuant pair, defined by (P, Q)T := Ma (0, 1)T . The equality P/Q = p/q, holds, but, as the integers P and Q are not necessarily coprime, the pair (P, Q) does not coincide with the pair (p, q). The integer R(Q) := Q/ gcd(P, Q), Analysis of the Continued Logarithm Algorithm 7 called the reduced continuant, is an important parameter that actually dictates the quality of the rational approximation given by the truncation of the CLCF. We will see that it also plays a central role in the analysis of the CL algorithm. As gcd(P, Q) divides |det(Ma )| that is a power of two, it is itself a power of two. It then proves fundamental to deal with dyadic tools. The main interesting costs associated with a finite expansion, as in (4), are defined via the LFT h and mainly involve the continuant pair (P, Q) together with the absolute value of the determinant of the LFT h, denoted as d(h). The next result describes these costs and provides alternative expressions. Proposition 1. Consider the function G2 : Q2 → R+ (called the gcd map) equal to G2 (y) = min(1, |y|−2 2 ), namely G2 (y) = 1 for |y|2 ≤ 1, G2 (y) = |y|−2 2 for |y|2 > 1 . (12) The main costs associated with the CLCF expansion of a rational h(0) Q, g(P, Q) := gcd(P, Q), R(P, Q) = Q/gcd(P, Q), |Q|2 . are all expressed in terms of the quadruple (|h0 (0)|, |h0 (0)|2 , d(h), G2 [h(0)] as 0 Q−2 = |h0 (0)|/d(h), |Q|−2 2 = d(h) |h (0)|2 , R−2 (Q) = |h0 (0)| |h0 (0)|2 G2 [h(0)], g 2 (P, Q) = d(h) |h0 (0)|2 G2 [h(0)] . Proof. One has (by definition) P/Q = h(0), Q−2 = |h0 (0)|/d(h), r(Q)−2 = g 2 (P, Q)/Q2 . As g(P, Q) is a power of 2, and using the function G2 defined in (12), one has −2 −2 g 2 (P, Q) = min(|P |2 , |Q|2 )−2 = |Q|−2 2 min(1, |P/Q|2 ) = |Q|2 G2 (P/Q). 0 We conclude with the equalities : |Q|−2 2 = |h (0)|2 /|d(h)|2 , d(h) · |d(h)|2 = 1. Any cost C of Proposition 1 admits an expression of the form |h0 (0)|t |h0 (0)|u2 d(h)v G2 [h(0]z . The quadruple (t, u, v, z) associated with the cost C is denoted as γC . Moreover, as these costs C are expected to be of exponential growth with respect to the depth of the CF, we will work with their logarithms c = log C. Figure 2 summarizes the result. Generating functions. We deal with sets of coprime6 integer pairs Ω := {(p, q) | 0 < p < q, gcd(p, q) = 1}, ΩN := Ω ∩ {(p, q) | q ≤ N }. The set ΩN is endowed with the uniform measure, and we wish to study the mean values EN [c] of parameters c on ΩN . We focus on parameters which describe the execution of the algorithm and are “read” from the CF(p/q) built by the algorithm as in (4). They are defined in Proposition 1 and depend on the continuant pair (P, Q); as already explained, the reduced continuant R(P, Q) plays a fundamental role here. 6 This restriction can be easily removed and our analysis extends to the set of all integer pairs. 8 Pablo Rotondo, Brigitte Vallée, and Alfredo Viola Cost C c = log C d(h) σ Q 2 q 2 % 2 R (P, Q) r |Q|−2 2 q2 g (P, Q) Quadruple γC Constant M (c) Numerical value of M (c) . = 0.97693 . . . (0, 0, 1, 0) D . = 2.60045 . . . (−1, 0, 1, 0) A+D . (0, 1, 1, 1) B+D = 1.26071 . . . . (−1, −1, 0, −1) A−B = 1.33973 . . . . (0, 1, 1, 0) B+D = 1.26071 . . . Fig. 2. Main costs of interest, with their quadruple, and the constants which intervene in the analysis of their mean values. (see Thm 1). We deal with analytic combinatorics methodology and work with (Dirichlet) generating functions (dgf in short). Here is the plain Dirichlet generating function X 1 ζ(2s − 1) S(s) := = . (13) q 2s ζ(2s) (p,q)∈Ω There are also two generating functions that are associated with a cost C : Ω → R+ (and its logarithm c), namely the bivariate dgf and the cumulative dgf, SC (s, w) := X ewc(p,q) X c(p, q) ∂ bC (s) := SC (s, w) , S = 2s 2s q q ∂w (p,q)∈Ω (p,q)∈Ω . (14) w=0 The expectation EN [c] is now expressed as a ratio which involves the sums ΦN (S), ΦN (SbC ) of the first N coefficients of the Dirichlet series S(s) and SbC (s), EN [c] = ΦN [SbC ]/ΦN [S] . (15) From principles of Analytic Combinatorics, we know that the dominant singularity of a dgf (here its singularity of largest real part) provides precise information (via notably its position and its nature) about the asymptotics of its coefficients, here closely related to the mean value EN [c] via Eqn (15). Here, in the Dirichlet framework, this transfer from the analytic behaviour of the dgf to the asymptotics of its coefficients is provided by Delange’s Tauberian Theorem [5]. We now describe an alternative expression of these series, from which it is possible to obtain information regarding the dominant singularity, which will be transfered to the asymptotics of coefficients. Proposition 2. The Dirichlet generating S(s) and its bivariate version SC (s, w) relative to a cost C : Ω → R, admit alternative expressions7 X S(s) = SC (s, 0), SC (s, w) = ewC(h) |h0 (0)|s |h0 (0)|s2 Gs2 ◦ h(0) . h∈H? ·J 7 We recall that the last exponent is 0 by convention, and the last LFT is thus J = h0 . Analysis of the Continued Logarithm Algorithm 9 For any cost C described in Figure 2, the general term of SC (s, w) is of the form |h0 (0)|t |h0 (0)|u2 d(h)v Gz2 ◦ h(0) , and involves a quadruple of exponents (t, u, v, z), denoted as γC (s, w), that is expressed with the quadruple γC defined in Figure 2 as γC (s, w) = s(1, 1, 0, 1) + w γC . (16) Proof. By definition, the denominator q equals R(P, Q). With Figure 2, the quadruple relative to q −2s is then s(1, 1, 0, 1), whereas the quadruple relative to ewc = C w is just wγC . We have thus described the general framework of our paper. We now look for an alternative form for the generating functions: in dynamical analysis, one expresses the dgf in terms of the transfer operator of the dynamical system which underlies the algorithm. Here, it is not possible to obtain such an alternative expressions if we stay in the real “world”. This is why we will add a component to the CL system which allows us to express parameters with a dyadic flavour. It will be possible to express the dgf’s in term of a (quasi-inverse) of an (extended) transfer operator, and relate their dominant singularity to the dominant eigenvalue of this extended transfer operator. We then obtain our main result, precisely stated in Theorem 1, at the end of the paper: we will prove that the mean values EN [log C] associated with our costs of interest are all of order Θ(log N ), and satisfy precise asymptotics that involve three constants A, B, D: the constants D and A come from the real word, and have been previously defined in (11) and (10), but there arises a new constant B that comes from the dyadic word. 3 The extended dynamical system. In this section, we extend the CL dynamical system, adding a new component to study the dyadic nature of our costs. We then introduce transfer operators, and express the generating functions in terms of the quasi-inverses of the transfer operators. Extension of the dynamical system. We will work with a two-component dynamical system: its first component is the initial CL system, to which we add a second (new) component which is used to “follow” the evolution of dyadic phenomena during the execution of the first component. We consider the set I := I × Q2 . We define a new shift T : I → I from the characteristics of the old shift T defined in (5). As each branch Ta , or its inverse ha , is a LFT with rational coefficients, it is well-defined on Q2 ; it is moreover a bijection from Q2 ∪ {∞} to Q2 ∪ {∞}. Then, each branch T a of the new shift T is defined via the equality T a (x, y) := (Ta (x), Ta (y)) on the fundamental domain I a := Ia × Q2 , and the shift T a is a bijection from I a to I := I × Q2 whose inverse branch ha : (x, y) 7→ (ha (x), ha (y)) is a bijection from I to I a . 10 Pablo Rotondo, Brigitte Vallée, and Alfredo Viola Measures. We consider the three domains B := Q2 ∩ {|y|2 < 1}, U := Q2 ∩ {|y|2 = 1}, C := Q2 ∩ {|y|2 > 1}. There exists a Haar measure ν0 on Q2 which is finite on each compact of Q2 , and can be normalized with ν0 (B) = ν0 (U) = 1/3 (see [7]). We will deal with the measure ν with density G2 wrt to ν0 , for which ν(C) = 1/3. The measure ν[2k U] equals (1/3)2−|k| for any k ∈ Z and ν is a probability measure on Q2 . On I, we deal with the probability measure ρ := µ × ν where µ is the Lebesgue measure on I and ν is defined on Q2 as previously. For integrals which involve a Haar measure, there is a change of variables formula8 . As ν0 is a Haar measure, and dν = G2 dν0 , this leads to the following change of variables formula, for any F ∈ L1 (Q2 , ν),   Z Z G2 (h(y)) 0 dν(y) = F (y) dν(y) . (17) |h (y)|2 F (h(y)) G2 (y) Q2 Q2 Density transformer and transfer operator. We now consider the operator H defined as a “density transformer” as follows : with a function F ∈ L1 (I, ρ), it associates a new function defined by   X G2 (h(y)) 0 0 H [F ](x, y) := |h (x)| |h (y)|2 F (h(x), h(y)) . G2 (y) h∈H When F is a density in L1 (I, ρ), then H[F ] is indeed the new density on I after one iteration of the shift T . This just follows from the change of variables formula (17) applied to each inverse branch h ∈ H. Proposition 2 leads us to a new operator that depends on a quadruple (t, u, v, z),  z X G2 (h(y)) Ht,u,v,z [F ](x, y) := |h0 (x)|t |h0 (y)|u2 d(h)v F (h(x), h(y)) . (18) G2 (y) h∈H We will focus on costs described in Figure 2: we thus deal with operators associated with quadruples γC (s, w) defined in Proposition 2, and in particular with the quadruple (s, s, 0, s), and its associated operator Hs := Hs,s,0,s . Alternative expressions of the Dirichlet generating functions. We start with the expressions of Proposition 1, consider the three types of dgf defined in (13) and (14), use the equality G2 (0) = 1, and consider the operator Js relative to the branch J used in the last step. For the plain dgf in (13), we obtain X S(s) = |h0 (0)|s |h0 (0)|s2 Gs2 ◦ h(0) = Js ◦ (I − Hs )−1 [1](0, 0) , (19) h∈H?·J We now consider the bivariate dgf’s defined in (14). For the depth K, one has SK (s, w) = ew Js ◦ (I − ew Hs )−1 [1](0, 0) ; 8 This general result can be found for instance in Bourbaki [2], chapitre 10, p.36. Analysis of the Continued Logarithm Algorithm 11 For costs C of Figure 2, the bivariate dgf involves the quasi-inverse of HγC (s,w) , SC (s, w) = JγC (s,w) ◦ (I − HγC (s,w) )−1 [1](0, 0) , w except for C = |Q|−2 2 , where the function 1 is replaced by the function G2 . The dgf SbC (s) defined in (14) is obtained with taking the derivative of the bivariate dgf wrt w (at w = 0); it is thus written with a double9 quasi inverse which involves the plain operator Hs , separated “in the middle” by the cumulative operator Hs,(C) , namely SbC (s)  Js ◦ (I − Hs )−1 ◦ Hs,(C) ◦ (I − Hs )−1 [1](0, 0) , and the cumulative operator is itself defined by Hs,(C) := 4 ∂ Hγ (s,w) ∂w C (20) . w=0 Functional Analysis This section deals with with a delicate context, which mixes the specificities of each world –the real one, and the dyadic one–. It is devoted to the study of the quasi-inverses (I − Hs )−1 intervening in the expressions of the generating functions of interest. We first define an appropriate functional space on which we prove the operators to act and admit dominant spectral properties. This entails that the quasi-inverse (I − Hs )−1 admits a pole at s = 1, and we study its residue, which gives rise to the constants that appear in the expectations of our main costs. Functional space. The delicate point of the dynamical analysis is the choice of a good functional space, that must be a subset of L1 (I, ρ). Here, we know that, in the initial CL system, the transfer operator Hs acts in a good way on C 1 (I). Then, for a function F defined on I, the main role will be played by the family of “sections” F̃y : x 7→ max(1, log |y|2 ) F (x, y) which will be asked to belong to C 1 (I), under the norm | · |1,1 , defined as |F̃y |1,1 := |F̃y |0 + |F̃y |1 with |F̃y |0 := supx∈I |F̃ (x, y)|, |F̃y |1 := supx∈I We work on the Banach space n F := F : I → C | Fy ∈ C 1 (I), ∂ ∂x F̃ (x, y) o y 7→ F̃y bounded , endowed with the norm ||F || := ||F ||0 + ||F ||1 , with Z Z ||F ||0 := |F̃y |0 dν(y), ||F ||1 := |F̃y |1 dν(y) . Q2 . (21) Q2 The next Propositions 3, 4 and 5 will describe the behaviour of the operator Ht,u,v,z on the functional space F. Their proofs are quite technical and are omitted here. 9 There is another term which involves only a quasi-inverse. It does not intervene in the analysis. 12 Pablo Rotondo, Brigitte Vallée, and Alfredo Viola The first result exhibits a subset of quadruples (t, u, v, z) which contains (1, 1, 0, 1) for which the resulting operator Ht,u,v,z acts on F. Proposition 3. The following holds: (a) When the complex triple (t, u, v) satisfies the constraint <(t−v −|u−1|) > 0, the operator Ht,u,v,u acts on F and is analytic with respect to the triple (t, u, v). (b) The operator Hs := Hs,s,0,s acts on F for <s > 1/2, and the norm || · ||0 of the operator Hs satisfies ||Hs ||0 < 1 for <s > 1. Dominant spectral properties of the operator. The next result describes some of the main spectral properties of the operator on the space F. Assertion (a) entails that the k-th iterate of the operator behaves as a true k-th power of its dominant eigenvalue. Then, as stated in (c), its quasi-inverse behaves as a true quasi-inverse which involves its dominant eigenvalue. Proposition 4. The following properties hold for the operator Ht,u,v,u , when the triple (t, u, v) belongs to a neighborhood V of (1, 1, 0). (a) There is a unique dominant eigenvalue, separated from the remainder of the spectrum by a spectral gap, and denoted as λ(t, u, v), with a (normalized) dominant eigenfunction Ψt,u,v and a dominant eigenmeasure ρt,u,v for the dual operator. (b) At (t, u, v, u) = (1, 1, 0, 1), the operator Ht,u,v,u coincides with the density transformer H1 . At (1, 1, 0) the dominant eigenvalue λ(t, u, v) equals 1, the function Ψt,u,v is the invariant density Ψ and the measure ρt,u,v equals the measure ρ. (c) The estimate holds for any function F ∈ L1 (I, ρ) with ρ[F ] 6= 0, λ(t, u, v) Ψt,u,v (x, y) ρt,u,v [F ] . (I − Ht,u,v,u )−1 [F ](x, y) ∼ 1 − λ(t, u, v) (d) For <s = 1, s 6= 1, the spectral radius of Hs,s,0,s is strictly less than 1. The third result describes the Taylor expansion of λ(t, u, v) at (1, 1, 0), and makes precise the behaviour of the quasi-inverse described in (c). Proposition 5. The Taylor expansion of the eigenvalue λ(t, u, v) at (1, 1, 0), written as λ(t, u, v) ∼ 1 − A(t − 1) + B(u − 1) + Dv, involves the constants A = −∂λ/∂t(1, 1, 0), B = ∂λ/∂u(1, 1, 0), D = ∂λ/∂v(1, 1, 0) (a) The constants A and D already appear in the context of the plain dynamical system, and are precisely described in (11) and (10). In particular A−D is equal to the integral E := EΨ [2| log x|]; (b) The constant B is defined with the extension of the dynamical system and its invariant density Ψ = Ψ1,1,0 . The constant B + D is equal to the dyadic analog E2 of the integral E, namely, B + D = E2 := EΨ [2 log |y|2 ]; (c) The constant A − B is the entropy of the extended dynamical system. Analysis of the Continued Logarithm Algorithm 13 Final result for the analysis of the CL algorithm. We then obtain our final result: Theorem 1. The mean values EN [c] for c ∈ {K, σ, q, %, r, q2 } on the set ΩN are all of order Θ(log N ) and admit the precise following estimates, EN [K] ∼ 2 log N, H EN [c] ∼ M (c) · EN [K], for c ∈ {σ, q, %, r, q2 } . The constant H is the entropy of the extended system. The constants H and M (c) are expressed with a scalar product that involves the gradient ∇λ of the dominant eigenvalue at (1, 1, 0) and the beginning γ bC of the quadruple γC associated with the cost c. More precisely H = −h∇λ, (1, 1, 0)i, M (c) = h∇λ, γ bC i . The constants M (c) are exhibited in Figure 2. Proof. Now, the Tauberian Theorem comes into play, relating the behaviour of a Dirichlet series F (s) near its dominant singularity with asymptotics for the sum ΦN (F ) of its first N coefficients. Delange’s Tauberian Theorem is stated as follows (see [5]): P Consider for σ > 0 a Dirichlet series F (s) := n≥1 an n−2s with non negative coefficients which converges for <s > σ. Assume moreover: (i) F (s) is analytic on {<s, s 6= σ}, (ii) near σ, F (s) satisfies F (s) ∼ A(s)(s − σ)−(k+1) for some integer k ≥ 0 . Then, as N → ∞, the sum ΦN (F ) of its first N coefficients satisfies P ΦN (F ) := n≤N an ∼ 2k A(σ) [σΓ (k + 1)]−1 N 2σ logk N . We now show that the two dgf’s S(s) and SbC (s) satisfy the hypotheses of the Tauberian theorem. The two expressions obtained in (19) and (20) involve quasiinverses (I − Hs )−1 , a simple one in (19), a double one in (20). First, Propositions 3(b) and 4(d) prove that such quasi-inverses are analytic on <s ≥ 1, s 6= 1. Then Proposition 4(c), together with Eqn (20), shows that S(s) and SbC (s) have a pole at s = 1, of order 1 for S(s), of order 2 for SbC (s). We now evaluate the dominant constants: first, the estimate holds, 1 − λ(s, s, 0) ∼ (A − B)(s − 1) = H(s − 1), with H = −h∇λ, (1, 1, 0)i. Second, with Proposition 4(c), the dgf’s S(s) and SbC (s) admit the following estimates which both involve the constant a = J[Ψ ](0, 0), namely, i h a a S(s) ∼ , SbC (s) ∼ 2 ρ H [Ψ ] . 1,(C) H(s − 1) H (s − 1)2 We now explain the occurence of the constant M (c): we use the definition of the triple γ bC (s, w), the definition of the cumulative operator H1,(C) as the derivative of the bivariate operator HγC (s,w) at (s, w) = (1, 0), and the fact that H1,1,0,1 = H1 is the density transformer. This entails the sequence of equalities, h i ∂ ρ H1,(C) [Ψ ] = λ(b γC (1, w)) = h∇λ, γ bC i = M (c) . ∂w w=0 14 Pablo Rotondo, Brigitte Vallée, and Alfredo Viola About the constant B. The invariant density Ψ –more precisely the function Ψb := Ψ · G2 – satisfies a functional equation of the same type as the invariant function ψ, (described in Eqn (7)), namely,  Ψb(x, y) = 1 1+x 2 1 1+y 2 X 2 a≥0  Ψb 2−a 2−a , 1+x 1+y  . Comparing to Eqn (7), we “lose” the factor 2−a in the sum, and so we have not succeed in finding an explicit formula for Ψ . We do not know how to evaluate the integral E2 defined in Proposition 5(b). However, we conjecture10 the equality D − B = log 2, from experiments of the same type as those described in Figure 1. This would entail an explicit value for the entropy of the extended system,   2 X (−1)k π 1 .  − (log 2)(3 log 3−4 log 2) = 1.33973 . . . +2 2 log 2−log 3 6 k 2 2k k≥1 Conclusions and Extensions. We have studied the Continued Logarithm Algorithm and analyzed in particular the number of pseudo divisions, and the total number of shifts. It would be nice to obtain an explicit expression of the invariant density, that should entail a proven expression of the entropy of the dynamical system. It is also surely possible to analyze the bit complexity of the algorithm, notably in the case when one eliminates the rightmost zeroes when are shared by the two qi0 s (as suggested by Shallit). Such a version of this algorithm may have a competitive bit complexity that merits a further study. There exist two other gcd algorithm that are based on binary shifts, all involving a dyadic point of view: the Binary Algorithm, and “the Tortoise and the Hare” algorithm, already analyzed in [9] and [4]; however, the role of the binary shifts is different in each case. The strategy of the present algorithm is led by the most significant bits, whereas the strategy of the “Tortoise and the Hare” is led by the least significant bits. The Binary algorithm adopts a mixed strategy, as it performs both right-shifts and subtractions. We have the project to unify the analysis of these three algorithms, and better understand the role of the dyadic component in each case. References 1. Jonathan M. Borwein, Kevin G. Hare and Jason G. Lynch. Generalized Continued Logarithms and Related Continued Fractions, Journal of Integer Sequences, vol. 20 , 2017. 2. Nicolas Bourbaki, Variétés différentielles et analytiques. Springer 2007 3. Hei-Chi Chan. The Asymptotic Growth Rate of Random Fibonacci Type Sequences. Fibonacci Quarterly, vol. 43, no. 3, pp. 243–255, 2005. 10 This will be explained in the long paper. Analysis of the Continued Logarithm Algorithm 15 4. Benoit Daireaux, Véronique Maume-Deschamps, Brigitte Vallée. The Lyapounov Tortoise and the Dyadic hare. Proceedings of AofA’05, DMTCS, pp. 71–94, 2005. 5. Hubert Delange. Généralisation du Théorème d’Ikehara, Ann. Sc. ENS 71, pp 213–242, 1954 6. Bill Gosper. Continued fraction arithmetic, Unpublished manuscript, ca. 1978. 7. Neal Koblitz. p-adic Numbers, p-adic analysis and Zeta functions. 2nd edition, Springer Verlag, 1984 8. Jeffrey Shallit. Length of the continued logarithm algorithm on rational inputs. https://arxiv.org/abs/1606.03881v2 arXiv:1606.03881v2, 2016. 9. Brigitte Vallée. Dynamics of the Binary Euclidean Algorithm: Functional analysis and operators, Algorithmica, vol. 22, no. 4, pp. 660–685, 1998. 10. Brigitte Vallée. Euclidean Dynamics. Discrete and Continuous Dynamical Systems, vol. 15, no. 1, pp. 281–352, 2006.
8cs.DS
Abstract arXiv:cs/0508117v1 [cs.NE] 26 Aug 2005 We report the first results of simulating the coupling of neuronal, astrocyte, and cerebrovascular activity. It is suggested that the dynamics of the system is different from systems that only include neurons. In the neuron-vascular coupling, distribution of synapse strengths affects neuronal behavior and thus balance of the blood flow; oscillations are induced in the neuron-to-astrocyte coupling. 1 Long-term neuronal behavior caused by two synaptic modification mechanisms Xi Shen (1), Philippe De Wilde (2) ((1) Department of Electrical and Electronic Engineering, Imperial College London, United Kingdom, (2) Department of Computer Science, Heriot-Watt University, United Kingdom) April 4, 2018 Recently, more details have emerged of the interaction between neurons, glial cells, and the cerebrovascular network [1, 2, 3]. Most of this work is on the micro-level, involving only a few cells and capillaries or arterioles. Numerous investigations have confirmed the following discoveries: The modulation of synaptic efficacy will affect emergent behavior of neuronal assemblies [4, 5]; Dilation of capillaries is highly related to the activity of nearby neurons [6]; Astrocytes are very sensitive to the level of neuronal activity because of their position and their sensitivity to activity-dependent changes in the chemical environment they share with neurons [7]; Intercellular Calcium waves between astrocytes are the main signalling mechanism within glial cell networks [8, 9]. In this letter, we will build numerical models based on those physiological findings, because micro-descriptions using simplified models of firing [10, 11] and wave propagation can be inserted into larger scale simulations. Here we show a modification of the synapse strengths that allows the neuronal firing and the cerebrovascular flow to be compatible on a meso-scale; with astrocyte signalling added, limit cycles exist in the coupled networks. Neurons are associated with capillaries in the brain, and according to physiological discoveries, the neuronal activity can dilate the capillaries that supply them. Our first model contains 2400 neurons and 30 branches of capillaries, each of which supplies 80 neurons. Each neuron has two states: ’1’ indicates that at that time the neuron was firing and ’-1’ means the neuron was not firing. All the synapses between these neurons are described by a 2 2400 by 2400 matrix S, in which each component Si,j represents the strength of the synapse from neuron j to neuron i. This definition is according to the Hopfield artificial neural network model [12]. On average, each neuron has a certain number of synapses which are linking to other neurons. We suppose that the synapse number follows a normal distribution that peaks at Save . As a result, most of the neurons have a similar number of synapses. This is based on the assumption that a small area in the brain is uniform. These 2400 neurons can be viewed as a very small part of the brain, in which each neuron has synapses connected with other neurons within this part as well as outside of this part. Here we define another parameter ploc , which indicates the locality of the synapses, i.e., how many of one neuron’s synapses are connected to the neurons within this area. Consequently, the input signal of each neuron consists of two parts: one part is from the local neurons which are connected with it via synapses and the other part is from the neurons outside, this part can be regarded as Gaussian noise. The capillary model is simple, the original blood flow is set as follows: the blood flow of the first layer (top two branches) is 800 µm3 /ms , and where the branches split, both the directions have half this flow, 400µm3/ms; this rule is applied all the way to the bottom layer, where all the 16 branches have a flow of 100µm3 /ms, which is the low velocity of flow in the capillaries quoted from data of blood circulation [13]. If the number of firing neurons associated with this capillary exceeds a certain threshold at time T , the capillary will dilate at the time, which means in our model that the blood volume is four times as large as the original one. In addition, the dilation period is set to dc , because the change of capillary width is slower than that of the neuron potentials. We also define a parameter which represents the compatibility as follows: Cmp = j=14 X |Bldf lwj − Bldf lw2j+1 − Bldf lw2j+2 | (1) j=1 Compatibility is the summation of the blood flow difference over all 14 capillary joint nodes; the capillary network is illustrated in Fig. 1. We call a network compatible if the compatibility (Eq.(1)) is zero. The dilation of each capillary is caused by the fluctuation of the firing number associated with it, i.e., if more than Nf iring neurons that this capillary supplies are firing, this capillary is going to be dilated after ∆t time steps and this dilation will last dc time steps. In a first set of simulations, all the synapse strengths are uniformly distributed between -1 and 1, the blood flow turned out to be highly incompatible, since the blood flow difference fluctuated between 3000 and 8000 µm3 /ms (also see Fig. 2). 3 Figure 1: Thirty branches of capillaries. Figure 2: Compatibility for the model with synaptic weights uniformly distributed between -1 and 1. The blood flow is not compatible. 4 Figure 3: Average firing number per branch (top): We calculated the firing number associated with each branch of capillary, evaluated the mean value and plotted in this figure. Compatibility (bottom): The incompatible time is really short because the neurons quickly change from ’resting’ to ’excitatory’. In the second simulation, we manually set these strengths to be uniformly distributed between 2µ − 1 and 1, i.e., the mean value of them is µ, which we call local-shift. Initially, the neuron states are set according to the rule that 1/4 of the neurons are firing. The simulation results are shown in Fig. 3. We found that this initialization had no effect on the behavior of the system; neurons will reach their resting state, which is determined by µ. Over a certain short time period (from T=101 to T=105 in this simulation), we increased the Gaussian noise in this area so this positive input forces a number of neurons to fire. Then the neurons’ state will be changed to ’excitatory’, and at the same time the high level of neuron firing will trigger the dilation of capillaries. The results imply that this temporary external noise triggers the ’excitatory’ state and that a local shift µ helps the maintenance of this state until the next inhibitory signal arrives. This quick change from ’resting’ to ’excitatory’ makes the incompatible time really short, so in this way, these coupled networks function well. Based on these results, we can make a few hypotheses about the neurovascular coupling in the brain. The first hypothesis is that the local synapses are likely to have positive strengths. This enables the cluster of neurons 5 to maintain either the ’excitatory’ state or the ’resting’ state, and external signals cause the switch between these two states. From simulations we can see that this switch is fast, although the capillaries react with time delay, the incompatible time is so short that it can be ignored. Secondly, since the local shift of the synapse weights is so tiny, we could assume that this is associated with the neuronal communication. The communication between neurons could slightly change the strength of synapses connected them, and this change is on the same time scale as the dilation of the capillaries. Because the neuron state is determined by this local-shift, changing of strength could result in changing of state, and at the same time balance the blood flow. It is now believed that glial cells (astrocytes) also have their own network (via Calcium waves) in the brain and that this network also plays a distinct role in information processing. Calcium waves can both propagate among networks of astrocytes globally and send specific Calcium signals to a small number of nearby astrocytes [14]. In other words, glial signalling also has its preferred routes. Communication between glial cells and neurons is bidirectional and complex. Astrocytes are very sensitive to the level of neuronal activity because of their position and their sensitivity to activity-dependent changes in the chemical environment shared by neurons and astrocytes [7, 15]. Astrocytic Calcium waves can be triggered by synaptically-released neurotransmitters and in addition the frequency of these Calcium oscillations can change according to the level of synaptic activity [16]. It is observed that activated astrocytes can control the synaptic transmission by regulating the release of neurotransmitter from the nerve terminal. This regulation can be either excitatory (by secreting the same neurotransmitter) or inhibitory (by absorbing the neurotransmitter). If regulation of synaptic activities is the short-term effect of astrocytes, they can also change long-term synaptic strengths by releasing signalling molecules that cause the axon to increase or decrease the amount of neurotransmitter [14]. To sum up briefly, it is now possible to model the neuron-to-astrocyte coupling because many recent experiments confirm the signalling pathways among these two types of networks. Neurons communicate with neurons while astrocytes ’listen to’ the neuronal communication. Basing upon what they ’hear’, astrocytes regulate neuronal activities and communicate with other astrocytes. In order to quantify these regulations, we will define rules dependent on several parameters and then simulate this model. The neuronal network contains 900 neurons, each of which has either a ’1’ state (firing) or a ’0’ state (resting). There are 3600 astrocytes in the glial network. In order to simplify, we suppose these astrocytes are in a 60 × 60 matrix G. The state of an astrocyte is gi,j and it could be zero 6 or a positive number. These 3600 astrocytes have their own connections, too. Because Calcium signals are more likely to propagate among nearby astrocytes, we assume here that the connection between astrocyte (i1, j1) and (i2, j2) is given by probability ρ, which is inversely proportional to the q 2 distance between them ( (i1 − i2) + (j1 − j2)2 ). Since these connections are in fact invisible Calcium signal pathways, we did not give them weights. Unlike electrical signals travelling between neurons, Calcium signals need more time to travel from one astrocyte to another, and we set this time delay proportional to the distance. The coupling between the neuronal network and the glial network is complicated. We will assume that each neuron has four astrocytes nearby which are all sensitive to this neuron’s activity. At the same time, because in the brain a single astrocyte can cover a large number of synapses [9], in our model we allocate to each astrocyte 1/4 of all the afferent synapses of this neuron, so that four nearby astrocytes can cover all afferent synapses without overlapping. Astrocytes can sense the spike frequency along each synapse, regulate the release of neurotransmitters, and change the synaptic strength. A simplified illustration of the position of neurons and astrocytes can be found in Fig. 4. There are two factors which affect the state of an astrocyte. The first one is high frequency effective spikes along synapses that this astrocyte is sensing, and ’effective’ means either a positive spike making the target neuron fire or a negative spike making it rest. The second factor is the Calcium signals from other astrocytes, and this part can accumulate as well. If the input signal of an astrocyte exceeds a certain threshold , this astrocyte will become active, which means that the state of the astrocyte is nonzero. Since activated astrocytes can have different levels of activation, we define that when activated, an astrocyte’s state equals its input. As mentioned previously, activated astrocytes can regulate the release of neurotransmitters over short periods of time (< 50s) [17], in other words; they can change the input signal of the nearby neuron within a few seconds. Because the conditions for excitation and inhibition are unknown, we will make the following assumptions. The neuron’s input will be increased by an activated astrocyte proportionally to its state, but if this astrocyte was over-activated (its state exceeded a certain value), it would inhibit the input of the neuron. In the brain this local rule may be more complicated, and we believe that this interaction between neurons and astrocytes is crucial to short-term memory and information processing. Meanwhile, as a long-term effect, astrocytes can also monitor the synaptic activities and gradually modify the strengths of synaptic connections (efficacies). This mechanism is also called adapting synapses, and has been studied 7 Figure 4: The position of one neuron (black circle) and 4 nearby astrocytes (rectangles). To make it clear, only afferent synapses from other neurons (shadowed circle) are drawn. The arms of astrocytes (ellipses) surround some synapses to sense and regulate their activities. before [18]. Because our model is based on discrete time, the update rule of synaptic strengths is quite simple. For a positive synapse, we look back 20 time steps and calculate the spike frequency of this synapse and the firing frequency of the neuron. If both of the two frequencies are high and correlated, in other words, the high firing rate is triggered by episodes of high synaptic activity through this connection (we call it excitation success), we will make this connection stronger. On the other hand, if this synapse is negative, it will be enhanced if the spike frequency is high but the neuron is firing at a low rate (inhibition success). The strength can also be weakened if high spike frequency along a positive synapse does not cause high firing rate (excitation failure) or high spike frequency along a negative synapse does not cause low firing rate (inhibition failure). Although due to limitations of computing time, our simulating time can not be long enough to represent the gradual changing of efficacy; we still include this procedure in our program. We believe that the distribution of synaptic strengths heavily affects the emergent behavior of neuron-to-astrocyte coupling, so it is crucial in understanding the brain function, especially long-term memory and learning [19, 20]. 4 900 X X 1 1 np (t + 1) = sgn( Tqp (t)nq (t) + g4p+r (t) − ϕp (t) + η) + 2 2 r=1 q=1 8 (2) Figure 5: Top figure: Average number of firing neurons in each row in our simulation of pure neurons. Bottom figure: average number of firing neurons in each row in our simulation of neuron-to-astrocyte coupling. Finally, we will explain the time resolution of this model. Based on the absolute refractory period of neurons, we suppose that each time step in our simulation equals 1 ms in the real brain. Since neurons can not be firing at two consecutive time steps, the maximum firing frequency is 500 Hz. At each time step, we loop over all astrocytes, all neurons and all synapses and change their states according to the rules we have defined above. The update rule for a neuron can be found in Eq.(2), in which Tqp (t) represents the timeP dependent strength, 4r=1 g4p+r (t) means contributions from astrocytes and ϕp (t) and η are the threshold and noise, respectively. Our results (Fig.5) imply that in the pure neuronal network, neuronal activity was quite random within the whole 500 time steps. While in the simulation with both neurons and astrocytes, it is obvious that there was an attractor in the neuronal network, after T=300, the neuronal network 9 just oscillated between two states. If we compare the two figures concerning average firing number in Fig. 5, it is easy to find out that the firing frequency of neurons in the coupled network is much higher than that in the pure neuronal network. According to our simulations, on average 17 percent of all neurons were firing in the pure neuronal network while in the coupled network it was 39.2 percent. This is mainly because astrocytes changed the strengths of many synapses. At the same time, activated astrocytes enhancing the afferent spikes play a small part in this as well. We have shown that a modification of the synapse strengths can allow the neuronal firing and the cerebrovascular flow to be compatible on a meso-scale. With astrocyte signalling added, limit cycles exist in the coupled networks. This is a first step towards a better understanding of the coupling of neuronal, astrocyte and cerebrovascular networks in the brain. This coupling is essential in any modern description of the brain, and has to be investigated using methods of complex systems. They will ultimately show the right scale for the models, and whether critical phenomena exist. References [1] P. G. Haydon, Nat. Neurosci. 2, 185 (March 2001). [2] S. J. Mulligan and B. A. MacVicar, Nature 431, 195 (2004). [3] C. Iadecola, Nat. Neurosci. 5, 347 (May 2004). [4] L. F. Abbott and W. G. Regehr, Nature 431, 796 (2004). [5] D. B. Chklovskii, B. W. Mel and K. Svoboda, Nature 431, 782 (2004). [6] G. A. Cowan, Working Papers from Santa Fe Institute (1988). [7] R. D. Fields and B. Stevens-Graham, Science 298, 556 (2002). [8] K. Braet, L. Cabooter, K. Paemeleire and L. Leybaert, Biol. Cell 96, 79 (2004). [9] G. Perea and A. Araque, J. Physiol. - Paris 96, 199 (2002). [10] J. J. Hopfield, Proc. Natl. Acad. Sci. USA 79, 2554 (1982). [11] J. M. Casado, Phys. Rev. Lett. 91, 208102 (2004). [12] P. De Wilde, Neural Network Models (Springer-Verlag, 1997). 10 [13] http://www.uoguelph.ca/∼dstevens/teach/320/problems.htm. [14] R. D. Fields, Sci. Am. 54, (Apr 2004). [15] T. Fellin and G. Carmignoto, J. Physiol. 559, 1 (2004). [16] M. Zonta and G. Carmignoto, J. Physiol. - Paris 96, 193 (2002). [17] J. Kang, S. A. Goldman and M. Nedergaard, Nat. Neurosci. 1, 683 (1998). [18] D. W. Dong and J. J. Hopfield, Networks 3, 267 (1992). [19] A. Destexhe and E Marder, Nature 431, 789 (2004). [20] M. Tsodyks and C. Gilbert, Nature 431, 775 (2004). 11
5cs.CE
Conjunctions of Among Constraints Vı́ctor Dalmau arXiv:1706.05059v1 [cs.AI] 15 Jun 2017 Dept. of Information and Communication Technologies, Universitat Pompeu Fabra Abstract. Many existing global constraints can be encoded as a conjunction of among constraints. An among constraint holds if the number of the variables in its scope whose value belongs to a prespecified set, which we call its range, is within some given bounds. It is known that domain filtering algorithms can benefit from reasoning about the interaction of among constraints so that values can be filtered out taking into consideration several among constraints simultaneously. The present paper embarks into a systematic investigation on the circumstances under which it is possible to obtain efficient and complete domain filtering algorithms for conjunctions of among constraints. We start by observing that restrictions on both the scope and the range of the among constraints are necessary to obtain meaningful results. Then, we derive a domain flowbased filtering algorithm and present several applications. In particular, it is shown that the algorithm unifies and generalizes several previous existing results. 1 Introduction Global constraints play a major role in constraint programming. Very informally, a global constraint is a constraint, or perhaps more precisely, a family of constraints, which is versatile enough to be able to express restrictions that are encountered often in practice. For example, one of the most widely used global constraints is the ’All different’ constraint, AllDiff(S) where S = {x1 , . . . , xn } is a set of variables, which specifies that the values assigned to the variables in S must be all pairwise different. This sort of restriction arises naturally in many areas, such as for example scheduling problems, where the variables x1 , . . . , xn could represent n activities that must be assigned different times of a common resource. Besides is usefulness in simplifying the modeling or programming task, global constraints also improve greatly the efficiently of propagation-search based solvers. This type of solver performs a tree search that constructs partial assignments and enforces some sort of propagation or local consistency that prunes the space search. Different forms of consistency, including (singleton) bounds consistency, (singleton, generalized) arc-consistency, path consistency and many others, can be used in the propagation phase. One of the most commonly used forms of local consistency is domain consistency, also called generalized arc-consistency. A domain consistency algorithm keeps, for every variable v, a list, L(v), of feasible values, which is updated, by removing a value d from it, when some constraint in the problem guarantees that v cannot take value d in any solution. One of the key reasons of the success of global constraints is that they enable the use of efficient filtering algorithms specifically tailored for them. Several constraints studied in the literature including AllDiff[24], GCC[27], Symmetric-GCC [21], Sequence [6], GlobalSequencing [34], OrderedDistribute [28], and CardinalityMatrix [33] can be decomposed as the conjunction of a simpler family of constraints, called among constraints [6]. An among constraint has the form Among(S, R, min, max) where S is again a set of variables called the scope, R is a subset of the possible values, called the range, and min, max are integers This constraint specifies that the number of variables in S that take a value in R must be in the range {min, . . . , max}. For example, the constraint AllDiff(S) can be expressed as the conjunction of constraints Among(S, {d1 }, 0, 1), . . . , Among(S, {dk }, 0, 1) where d1 , . . . , dk are the set of all feasible values for the variables in S. Besides encoding more complex global cardinality constraints, conjunctions of among constraints, (CAC), appear in many problems, such as Sudoku or latin squares. In consequence, CACs have been previously studied [10,32,38], specially the particular case of conjunctions of AllDiff constraints [2,3,9,13,22,23,25]. Although deciding the satisfiability of an arbitrary conjunction of among constraints is NP-complete [32] this body of work shows that sometimes there are benefits in reasoning about the interaction between the among constraints. Hence, it is important to understand under which circumstances among constraints can be combined in order to endow CSP solvers with the ability to propagate taking into consideration several among constraints simultaneously. The aim of the present paper is to contribute to this line of research. To this end we first observe that restrictions on both the scope and the range of the among constraints are necessary to obtain meaningful results. Then we embark in a systematic study of which such restrictions guarantee efficient propagation algorithms. In particular, we introduce a general condition such that every CAC satisfying it admits an efficient and complete domain filtering algorithm. This condition basically expresses that the matrix of a system of linear equations encoding the CAC instance belongs to a particular class of totally unimodular matrices known as network matrices. This allows to reformulate the domain filtering problem in terms of flows in a network graph and apply the methodology derived by Régin [30,31]. The algorithm thus obtained, although simple, unifies and generalizes existing domain filtering algorithms for several global constraints, including AllDiff, GCC, Sequence, Symmetric-GCC, OrderedDistribute as well as for other problems expressed as conjunctions of among constraints in [29,32]. A nice feature of our approach is that it abstracts out the construction of the network flow problem, so that when exploring a new CAC one might leave out the usually messy details of the design of the network graph and reason purely in combinatorial terms. Several filtering methods have been obtained by decomposing a global constraint into a combination of among constraints. For example the first polynomialtime filtering algorithm for the Sequence constraint [38] is obtained explicitely 2 in this way. However, there have been very few attempts to determine sistematically which particular conjunctions of among constraints allow efficient filtering algorithms. The seminal paper in this direction is [31] which identifies several combinations of among and GCC constraints that admit a complete and efficient domain filtering algorithm (see Section 6 for more details). Our approach is more general as it subsumes the tractable cases introduced in [31]. Another closely related work is [29] where two tractable combinations of boolean CACs, called TFO and 3FO, are identified. The approach in [29] differs from ours in two aspects: it deals with optimization problem and also considers restricions on the min and max parameters of the among constraints while we only consider restriction on the scope and range. A different family of CACs has been investigated in [10] although the work in [10] focuses in bound consistency instead of domain consistency. Other approaches to the design of filtering algorithms for combinations (but not necessarily conjunctions) of global (but not necessarily among) constraints are described in [4,7,8]. The method introduced in [4] deals with logical combinations of some primitive constraints but differs substantially from ours in the sense that it cannot capture a single among constraint. The work reported in [7,8] does not guarantee tractability. Several proofs are omiitted due to space restrictions. They can be found in the Appendix. 2 Preliminaries A conjunction of among constraints, (CAC) is a tuple (V, D, L, C) where V is a finite set whose elements are called variables, D is a finite set called domain, L : V → 2D is a mapping that sends every variable v to a subset of D, which we call its list, and C is a finite set of constraints where a constraint is an expression of the form Among(S, R, min, max) where S ⊆ V is called the scope of the constraint, R ⊆ D is called range of the constraint, and min, max are integers satisfying 0 ≤ min ≤ max ≤ |S|. A solution of (V, D, L, C) is a mapping s : V → D such that s(v) ∈ L(v) for every variable v ∈ V and min ≤ |{v ∈ S | s(v) ∈ R}| ≤ max for every constraint Among(S, R, min, max) in C. Example 1. (GCC and AllDiff constraints) The global cardinality constraint1 , GCC [27] corresponds to instances (V, D, L, C) where all the constraints have the form Among(V, {d}, min, max) with d ∈ D. The AllDiff constraint is the particular case obtained when, additionally, min = 0 and max = 1. Let I = (V, D, L, C) be a CAC. We say that a value d ∈ D is supported for a variable v ∈ V if there is a solution s of I with s(v) = d. In this paper we focus in the following computational problem, which we will call domain filtering: given a CAC, compute the set of all the non supported values for each of its variables. 1 We want to stress here that a global constraint is not a single constraint but, in fact, a family of them. 3 This definition is motivated by the following scenario: think of (V, D, L, C) as defining a constraint which is part of a CSP instance that is being solved by a search-propagation algorithm that enforces domain consistency. Assume that at any stage of the execution of the algorithm, L encodes the actual feasible values for each variable in V . Then, the domain filtering problem is basically the task of identifying all the values that need to be pruned by considering the constraint encoded by (V, D, L, C). 3 Network hypergraphs An hypergraph H is a tuple, (V (H), E(H)), where V (H) is a finite set whose elements are called nodes and E(H) is set whose elements are subsets of V (H), called hyperedges. An hypergraph is totally unimodular if its incidence matrix M is totally unimodular, that is, if every square submatrix of M has determinant 0, +1, or −1. In this paper we are concerned with a subset of totally unimodular hypergraphs called network hypergraphs. In order to define network hypergraph we need to introduce a few definitions. An oriented tree T is any directed tree obtained by orienting the edges of an undirected tree. A path p in T is any sequence x1 , e1 , x2 , . . . , en−1 , xn where x1 , . . . , xn are different vertices of T , e1 , . . . , en−1 are edges in T and for every 1 ≤ i < n, either ei = (xi , xi+1 ) or ei = (xi+1 , xi ). The polarity of an edge e ∈ E(T ) wrt. p is defined to be +1 (or positive) if e = (xi , xi+1 ) for some 1 ≤ i < n, −1 (or negative) if e = (xi+1 , xi ) for some 1 ≤ i < n, and 0 if e does not appear in p. A path p has positive (resp. negative) polarity if all its edges have positive (resp. negative) polarity. Paths with positive polarity are also called directed paths. Since an oriented tree does not contain symmetric edges, we might represent a path by giving only its sequence of nodes x1 , . . . , xn . We say that an oriented tree T defines an hypergraph H if we can associate to every hyperedge h ∈ E(H) an edge eh ∈ E(T ) and to every node v ∈ V (H) a directed path pv in T such that for every v ∈ V (H) and h ∈ E(V ), v ∈ h if and only if eh belongs to pv . We say that an H is a network hypergraph if there is an oriented tree that defines it. Example 2. The hypergraph H with variable-set {v1 , . . . , v6 } and hyperedge-set {h1 , . . . , h5 } given in Figure 1a is a network hypergraph as it is defined by tree T given in Figure 1b where we have indicated, using labels on the edges, the edge in T associated to every hyperedge in H. We associate to every variable vi , 1 ≤ i ≤ 6 the directed path s(i−1 mod 2) , r, t(i−1 mod 3) in T . It can be readily checked that under this assignment T defines H. Sometimes, it will be convenient to assume that the tree T defining H is minimal in the sense that no tree with fewer nodes defines H. Minimal trees have the nice property that every edge e in T is associated with some hyperedge of H. Indeed, assume that some edge e = (x, y) is not associated to any hyperedge in H, then one could find an smaller tree T defining H by contracting edge e, that is, by merging x and y into a new node z that has as in-neighbours the 4 h1 h3 h2 h5 v4 v6 v2 h4 v1 v3 v5 s0 h4 h5 t0 h1 h2 r t1 h3 s1 t2 Fig. 1a: Hypergraph H Fig. 1b: Oriented tree T union of all in-neighbours of x and y and, as out-neighbours, the union of all out-neighbours of x and y. Since the vast majority of the trees defined in this paper will be oriented we shall usually drop ’oriented’. So, unless, otherwise explicitly stated, a tree is always an oriented tree. Finally, we note that one can decide whether a given hypergraph is a network hypergraph in time O(e3 v 2 ) where e is the number of hyperedges and v is the number of nodes (see chapter 20 in [35] for example). 4 Restricting only the scope or the range It has been shown by Régin [32] that the domain filtering problem for CACs is NP-hard. Still, efficient algorithms are known for some particular cases. It seems natural to start by asking which tractable subcases of the problem can be explained by considering only the scopes of the constraints. This question has a close similarity to the study of the so-called structural restrictions of the CSP (see, for example [18] for a survey) and, not surprisingly, it can be solved by applying results developed there. Indeed, it follows easily from a result of Färnquivst and Jonsson [12] that, modulo some mild technical assumptions, if one allows arbitrary ranges in constraints, then the domain filtering problem is solvable in polynomial time if and only if the hypergraph of the scopes of the constraints has bounded tree-width (see Appendix A for precise statement and the proof). This result, although delineates exactly the border between tractability and intractability, turns out to be not very useful in explaining the tractability of global constraints. This is due to the fact that global cardinality constraints defined by conjunctions of among constraints usually have constraints with large scopes and the cardinality of the scope in a constraint is a lower bound on the tree-width of its scope hypergraph. One can also turn the attention to the range of constraints and inquiry whether there are tractable subcases of the problem that can be explained only by the range of the constraints. Here, again the response is not too useful. Indeed, it is very easy to show (see again Appendix A) that as soon as we allow some non-trivial range R (that is some range different than the empty set and than the whole domain) and arbitrary scopes in the among constraints, then the domain filtering problem becomes NP-complete. In view of this state of affairs it is meaningful to consider families of conjunctions of among constraints that are obtained by restricting simultaneously 5 the scope and the range of the constraints occurring in them. This is done in the next section. 5 A flow-based algorithm Let I = (V, D, L, C) be conjunction of among constraints. We will deal first with the case in which D is a boolean, say D = {0, 1}. Hence, we can assume that every constraint Among(S, R, min, max) in C satisfies R = {1} since, if R = {0} it can be reformulated as Among(S, {1}, |S| − max, |S| − min). We also assume that L(v) = {0, 1} for every v ∈ V since if L(v) 6= {0, 1} we could obtain easily an equivalent instance without variable v. It is easy to construct a system of linear equations whose feasible integer solutions encode the solutions of I. Let v1 , . . . , vn be the variables of I and let Cj = (Sj , {1}, minj , maxj ), j = 1, . . . , m, be its constraints. The system has variables xi (1 ≤ i ≤ n), yj (1 ≤ j ≤ m) and the following equations: X yj + xi = maxj j = 1, . . . , m vi ∈Sj 0 ≤ yj ≤ maxj − minj 0 ≤ xi ≤ 1 j = 1, . . . , m i = 1, . . . , n which we express in matrix form as Mz = a 0≤z≤c with z T = (x1 , . . . , xn , y1 , . . . , ym ) (see Example 3). If M is totally unimodular then one can perform domain filtering in polynomial time. Indeed, for every vi ∈ V and d ∈ L(v), we might decide whether d is a supported value for v as follows: add equation xi = d to the system and decide whether there exists a feasible solution of its linear relaxation using a LP solver. It follows from total unimodularity (see Theorem 19.1 in [35] for example) that such a feasible solution exists if and only if d is a support for v. However, this approach implies invoking O(n) times a LP solver, which might be too expensive to be practical, since, in addition, a propagation-based algorithm might call a domain filtering algorithm many times during its execution. To overcome this difficulty we shall require further conditions on the matrix M . To this end, we define the hypergraph associated to instance I to be the hypergraph H with V (H) = V and E(H) = {Sj | 1 ≤ j ≤ m}. Now, assume that H is a network hypergraph defined by a tree T . In this case, one can use specific and more efficient methods like the network simplex algorithm (see for example [1]) instead of a general purpose LP solver. However, it is still possible to do better (and avoid the O(n) calls to the network simplex algorithm) by transforming it into a maximum flow problem. This idea has been used in [26] to obtain a domain filtering algorithm for the Sequence constraint. 6 More precisely, [26] deals with the particular case of network matrices defined by a directed path. Our approach draws upon [26] and generalizes it to network matrices defined by arbitrary trees. This is done as follows. Let P be the incidence matrix of T . That is, let t1 , . . . , tm+1 be an arbitrary ordering of nodes in T and define P to be the ((m + 1) × m)-matrix where Pi,j is +1 if edge eSj starts at ti , −1 if eSj ends at ti , and 0 otherwise. Let r be a m-ary (column) vector and let p be a path in T . We say that r is the indicator vector of p if for every j = 1, . . . , m, rj is the polarity of eSj wrt. p. The next observation follows directly from the definitions. Observation 1 Let p be a path in T and let r be its indicator vector. Then, the ith entry, (P r)i , of P r, is +1 if ti is the first node in p, −1 if ti is the last node in p, and 0 otherwise. The next two lemmas follow directly from the previous observation. Lemma 1. P has full rank. Proof. Let P ′ be the (m × m) matrix obtained by removing the last row (corresponding to vertex tm+1 ) and consider the (m × m)-matrix Q such that for every i = 1, . . . , m, the ith column of Q, which we shall denote as Q∗,i , is the indicator vector of the unique path in T starting at ti and entding at tm+1 . It follows from Observation 1 that P ′ Q is the identity matrix. Then, since P has full rank we can obtain an equivalent system P M z = P a by multiplying both sides of M z = a by P . Let N = P M and b = P a (see Example 3). Lemma 2. In every column of N one entry is +1, one entry is −1, and all the other entries are 0. Proof. It is only necessary to show that every column, M∗,k , k = 1, . . . , m+n of M is the indicator vector of some directed path in T . If the variable corresponding to the k-column is xi for some 1 ≤ i ≤ n then by construction M∗,k is the indicator column of the path associated to vi in T . Otherwise, if the variable corresponding to column k is yj for some 1 ≤ j ≤ m then M∗,k is the indicator vector of the directed path containing only edge eSj . Hence, matrix N is the incidence matrix of a directed graph G. Note that, by definition, G contains an edge ek , k = 1, . . . , m + n for each variable zk and a node uj , j = 1, . . . , m + 1 for each row in N (that is, for every node in T ). Define the capacity of every edge ek to be ck . Then, feasible solutions of the system correspond precisely to flows where every node uj has a supply/demand specified by bj (more precisely, node uj has a demand of bj units if bj > 0 and a suply of −bj units if bj < 0). It is well know that this problem can be reduced to the (standard) maximum flow problem by adding new source and sink nodes s, t and edges from s to uj with capacity bj whenever bj > 0 and from uj to t with capacity −bj whenever bj < 0. 7 Example 3. Let I be a boolean instance with variables {v1 , . . . , v6 } and constraints: C1 = Among({v1 , v4 }, {1}, 0, 1), C2 = Among({v2 , v5 }, {1}, 0, 1), C3 = Among({v3 , v6 }, {1}, 0, 1), C4 = Among({v1 , v3 , v5 }, {1}, 1, 1), C5 = Among({v2 , v4 , v6 }, {1}, 1, 1). The specific values for M , a and c of the ILP formulation of I are: y1 C1 1 C2 0 M = C3 0 C4 0 C5 0 cT = y2 0 1 0 0 0 y3 0 0 1 0 0 x1 1 0 0 1 0 x2 0 1 0 0 1 x3 0 0 1 1 0 x4 1 0 0 0 1 x5 0 1 0 1 0 1 1 1 1 1 1 1 1 x6 0 0 1  0 1 1 1 1  a= 1 1 1  Note that since mini = maxi for i = 4, 5 we did not need to add the slack variables y4 and y5 . The hypergraph of this instance is precisely the hypergraph H in Example 2. In particular, hi is the hypererdge corresponding to the scope of constraint Ci for i = 1, . . . , 5. The matrix P obtained from the tree T defining H is: t0 t1 t2 s0 s1 r h1 −1  0  0   0  0 1 h2 0 −1 0 0 0 1 h3 0 0 −1 0 0 1 h4 0 0 0 1 0 −1 h5 0  0  0   0   1 −1 Multiplying M and c by P we obtain: y1 t0−1 t1 0 N = P M = t2  0 s0  0 s1 0 r 1 y2 0 −1 0 0 0 1 y3 0 0 −1 0 0 1 x1 −1 0 0 1 0 0 x2 0 −1 0 0 1 0 x3 0 0 −1 1 0 0 x4 −1 0 0 0 1 0 x5 0 −1 0 1 0 0 x6 0  0  −1  0   1 0 −1 −1  b = Pa =  −1  1    1 1 The feasible solutions of the previous LP correspond to the feasible flows of the network in Figure 2a, where nodes s0 , s1 and r have a supply of one unit of flow and nodes y0 , y1 , y2 have a demand of one unit of flow. Figure 2b contains the result of transforming the network in Figure 2a to a (standard) max flow problem. In both networks all edges have capacity 1. It follows from this construction that for every 1 ≤ i ≤ n and every d = {0, 1}, there is a solution s of I with s(vi ) = d if and only if there is a saturating flow (that is, a flow where all the edges leaving s or entering t are at full capacity) such that the edge associated to xi carries d units of flow. Régin [30,31] has shown that this later condition can be tested simultaneously for all 1 ≤ i ≤ n and d ∈ {0, 1} by finding a maximal flow and computing the strongly connected components of its residual graph. Finding a maximal flow of a network with 8 −1 s0 t0 1 −1 s1 t1 1 −1 r t2 1 s Fig. 2a: Network with suppies/demands s0 t0 s1 t1 r t2 t Fig. 2b: Standard flow network obtained from (2a) integral capacities can be done in time O(min(v 2/3 , e1/2 )e log(v 2 /e) log u) using Goldberg and Rao’s algorithm [17] where v is the number of vertices, e is the number of edges, and u is the maximum capacity of an edge. Computing the strongly connected components of the residual graph takes O(v + e) time using Tarjan’s algorithm [36]. By construction, the network derived by our algorithm satisfies e ≤ n + 2m and v ≤ m + 1. Furthermore, it is not difficult to see that u ≤ mn. Indeed, note that the capacity of any edge is either some entry, ci , of vector c or the absolute value of some entry, bi , of vector b. It follows directly from the definition of c, that all its entries are at most n. As for b, the claim follows from the fact that b = P a where, by construction, a has m entries where every entry is in the range {1, . . . , n} and every entry in P is in {−1, 0, 1}. Hence, if we define f (n, m) to be min(m2/3 , (n + m)1/2 )(n + m) log(m2 /(n + m)) log mn) we have: Lemma 3. There is a domain filtering algorithm for conjunctions of boolean among constraints whose associated hypergraph is a network hypergraph, which runs in time O(f (n, m)) where n is the number of variables and m is the number of constraints, assuming the instance is presented as a network flow problem. It is customary, when analizying the time complexity of domain filtering to report, additionally, the so-called time complexity ’down a branch of a search tree’ which consists in the aggregate time complexity of successive calls to the algorithm, when at each new call, the list of some of the variables has been decreased (as in the execution of a propagation-search based solver). It was observed again by Régin [31] that, in this setting, it is not necessary, to solve the flow problem from scratch at each call, leading to a considerable redution in total time. Applying the scheme in [31], we obtain that the time complexity down a branch of a search tree of our algorithm is O(n(n + m)). We ommit the details because they are faily standard (see [31]). There are minor variants (leading to the same asymptotic complexity) obtained by modifying the treatment of the slack variables. Here we will discuss two of them. In the first variant, used in [26], one P encodes a constraint Cj = (Sj , {1}, minj , maxj ) with two equations yj + vi ∈Sj xi = maxj , and P −zj + vi ∈Sj xi = minj where yj and zj are new slack variables satisfying 0 ≤ yj , zj . This encoding produces a network that has m more nodes and edges. P In a second variant, one encodes a constraint Cj with the equation −yj + vi ∈Sj xi = 0 where yj satisfies minj ≤ yj ≤ maxj . Under this encoding, our approach produces a network problem where, instead of having nodes 9 with specified suply or demand, we have edges with minimum demand. The asymptotic time bounds in all variants are identical. If the instance is not presented as a network flow problem then one would need to add the cost of transforming the instance into it. However this cost would be easily amortized as a domain filtering algorithm is invoked several times during the execution of a constraint solver2 . Furthermore, in practical scenarios, the conjunction of among constraints will encode a global constraint from a catalog of available global constraints. Hence, it is reasonable to assume that the formulation of the global constraint as a network flow problem can be precomputed. This approach can be generalized to non-boolean domains via boolean encoding. The choice of boolean encoding might depend on the particular instance at hand but for concreteness we will fix one. The canonical booleanization (see Example 4) of a conjunction I = (V, D, L, C) of among constraints with |D| ≥ 3 is the boolean instance (V × D,{0,1}, Lb, Cb ) where Lb (v, d) = {0, 1} if d ∈ L(v) and {0} otherwise, and Cb contains: – Among(S×R, {1}, min, max) for every constraint Among(S, R, min, max) ∈ C, and – Among({v}×D, {1}, 1, 1) for every variable v ∈ V . This family of constraints are called non-empty assignment constraints. That is, the intended meaning of the encoding is that (v, d) ∈ V × D is true whenever v takes value d. We define the hypergraph H associated to I to be the hypergraph associated to the canonical booleanization of I. That is, V (H) is V × D and E(H) contains hyperedge {(v, d) | v ∈ S, d ∈ R} = S × R for every constraint Among(S, R, min, max) in C, and hyperedge {(v, d) | d ∈ D} = {v} × D for every variable v ∈ V . Thus, for arbitrary domains, we have: Corollary 1. There is a domain filtering algorithm for conjunctions (V, D, L, C) of among constraints whose associatedP hypergraph is a network hypergraph, which runs in time O(f (n, m)) where n = v∈V |L(v)| and m = |C| + |V |, assuming the instance is presented as a network flow problem. Proof. It just follows from Pobserving that the canonical booleanization of instance (V, D, L, C) has n = v∈V |L(v)| variables and m = |C| + |V | constraints. 6 Some applications The aim of this section is to provide evidence that the kind of CACs covered by the approach developped in Section 5 are often encountered in practice. To 2 In fact, as shown in [30,31], it is only necessary to solve the max flow problem during the first invocation so it could be argued that a more realistic bound on the running time of the algorithm is O(n + m). 10 this end, we shall revisit several families of CACs for which domain filtering have been previously introduced and show how they can solved and, in some cases generalized, using our algorithm. Furthermore, we shall compare, whenever possible, the time complexity bounds of our algorithm with other state-of-the-art algorithms for the same problem. Like other flow-based algorithms, the algorithm proposed here has very good time complexity down a branch of the search tree. However, we will only consider in our comparison the cost of calling the algorithm just once. This is due to the fact that, once the size of the network produced is under a certain threshold, the total cost down a branch of the search tree is dominated by the cost of the incremental updates and, hence, it cannot be used to assess the comparative quality of different flow-based algorithms. Furthermore, we will try to compare, whenever possible, the parameteres of the obtained network flow problem (number of nodes, edges, capacities of the edges) instead of the actual running time since the latter is dependend on the choice of the maxflow algorithm. Somewhat surprisingly, in many of the cases, even if we did not attempt any fine-tuning, the network produced by the algorithm is essentially equivalent to the network produced by specific algorithms. 6.1 Disjoint constraints As a warm up we shall consider the GCC and AllDiff constraints. We have seen in Example 1 that both can be formulated as a conjunction (V, D, L, C) of among constraints of the form Cd = Among(V, {d}, mind, maxd ), d ∈ D. Note that both have the same associated hypergraph H with node-set, V × D, and edge set E(H) containing hyperedge hv = {v} × D for every v ∈ V , and hyperedge hd = V × {d}, for every d ∈ D. It is not difficult to see (see Example 4) that H is defined by the tree T defined as follows: The node-set of T consists of {r} ∪ V ∪ D where r is a new node. The edge-set of T contains an edge from every v ∈ V to r (associated to hv ) and from r to every node d ∈ D (associated to hd ). Consequently, both GCC and AllDiff are solvable by our algorithm. The network for the GCC using the abovementioned tree T has e = O(|V ||D|) edges, v = |V | + |D| + 3 nodes, and the maximum capacity, u, of an edge is at most |D||V |. Hence, it follows that the total running time of our algorithm for the GCC constraint is O(min(v 2/3 , e1/2 )e log(v 2 /e) log u). Régin’s algorithm [31] has a O(|V |2 |D|) complexity which is better when |V | ∈ O(|D|2/3 ) but the comparison between the two bounds is not very meaningfull because it mainly reflects a different choice max flow algorithm. Indeed, the network produced by both algorithms are very similar. In particular, the network obtained using the second variant discussed after Lemma 3 is essentially the same described in [31]. The only difference is that the network obtained by our algorithm contains one extra node. In the particular case of the AllDiff constraint, [30] shows how to produce a bipartite matching problem that can be solved using specialized algorithms, such as [20], leading to a total time complexity of O(|V |5/2 ) which is better than ours. 11 Example 4. Consider the constraint AllDiff(s0 , s1 ) where the list of each variable contains the following three values: t0 , t1 , t2 . Then, AllDiff(s0 , s1 ) is encoded as a CAC I with the following constraints: Among({s0 , s1 }, {t0 }, 0, 1), Among({s0 , s1 }, {t1 }, 0, 1), Among({s0 , s1 }, {t2 }, 0, 1). The canonical booleanization of I has variables {s0 , s1 } × {t0 , t1 , t2 } and constraints C1 = Among({s0 , s1 } × {t0 }, {1}, 0, 1), C2 = Among({s0 , s1 } × {t1 }, {1}, 0, 1), C3 = Among({s0 , s1 } × {t2 }, {1}, 0, 1), C4 = Among({s0 } × {t0 , t1 , t2 }, {1}, 1, 1), and C5 = Among({s1 }×{t0 , t1 , t2 }, {1}, 1, 1). Observe that this instance is, under the renaming vi 7→ (si−1 mod 2 , ti−1 mod 3 ), the same instance than we have considered previously in Example 3. The network flow problem that our algorithm derives for this instance (see Example 3) is almost identical to the one derived in [31]. Indeed, the network obtained in [31] does not have node r and, instead, requires that the demand of nodes t0 , t1 , t2 is at most one (instead of exactly one). A simple analysis reveals that the same approach can be generalized to instances (V, D, L, C) satisfying the following disjointedness condition: for every pair of constraints Among(S, R, min, max) and Among(S ′ , R′ , min′ , max′ ) in C, (S × R) ∩ (S ′ × R′ ) = ∅. The tractability of such instances was, to the best of our knowledge, not known before. The particular case in which R ∩ R′ = ∅ has been previously shown in [32] using a different approach. The proof given in [32] does not construct a flow problem nor gives run-time bounds so we ommit a comparison. 6.2 Domains consisting of subsets Consider the following generalization of our setting where in a CAC (V, D, L, C) every variable v must be assigned to a subset of L(v) (instead of a single element). In this case, the semantics of the among constraint need to be generalized as well. Instead, we will say a constraint Among(S, R, min, max) is satisfied by a P mapping s : V → 2D if min ≤ v∈S |s(v) ∩ R| ≤ max. To avoid confusion we shall refer to this variant of the among constraint as set among constraint. For example, the Symmetric-GCC constraint [21] is precisely a conjunction (V, D, L, C) of set among constraints of the form Among(V, {d}, min, max) where d is a singleton which, additionally, might contain constraints of the form Among({v}, D, min, max) restricting the size of the image of a variable v. It is fairly easy to reduce a conjunction of set among constraints I = (V, D, L, C) to a conjunction of (ordinary) among constraints over a boolean domain. Indeed, one only needs to construct the instance (V × D,{0,1}, Lb, Cb ) where Lb (v, d) = {0, 1} if d ∈ L(v) and {0} otherwise, and Cb contains Among(S × R, {1}, min, max) for every constraint Among(S, R, min, max) ∈ C. Note that the instance thus constructed corresponds exactly to the result of removing the non-empty assignment constraints to the canonical booleanization of I (now regarded as a conjunction of ordinary among constraints). It is then easy to observe that if (V, D, L, C) encodes a Symmetric-GCC constraint then the resulting boolean instance has the same hypergraph, H, than the GCC constraint 12 and hence, H is a network matrix. The algorithm in [21] follows closely that in [31] for the GCC constraints, and, in particular, has the same time bounds. Consequently the network flow derived by our algorithm is obtained, again, by adding one extra node with small capacities in the edges to the network introduced in [21]. 6.3 The sequence constraint The Sequence constraint [6] corresponds to instances ({v1 , . . . , vn }, D, L, C) with constraints Among({vi , . . . , vi+k }, R, min, max), i = 1, . . . , n − k for some fixed integers min, max, k, and fixed R ⊆ D. It is not difficult to see that the hypergraph of the canonical booleanization of the Sequence constraint is not a network hypergraph. However, as shown in [26] one obtains an equivalent instance with a network hypergraph using a different encoding in which for every original variable vi ∈ V , we have a boolean variable xi which is intended to be true whenever vi takes a value in R and false otherwise. Under this alternative encoding we obtain a boolean instance I which consists of constraints Among({xi , . . . , xi+k }, {1}, min, max), i = 1, . . . , n − k. It is shown in [26] that the hypergraph H of the boolean instance I obtained under this encoding satisfies the so-called consecutive-ones property which implies that H is defined by a tree T consisting of a single directed path. Indeed, the network flow obtained by our approach is identical to the one derived in [26] if one encodes Among constraints using the first variant discussed after Lemma 3. Applying Lemma 3 and noting that, in the particular case of the Sequence constraint, we have m = O(n) we obtain the bound O(n3/2 log2 n). By inspecting closely the proof of Lemma 3 this bound can be slightly improved (see Appendix C) to O(n3/2 log n log max) coinciding with the bound given in [26], which is not surprising since both networks are essentially equivalent. To the best of our knowledge O(n3/2 log n log max) is the best bound among all complete domain consisteny algorithms for the problem, jointly with the algorithm proposed in [37] which, with time complexity O(n2k ), offers gives better bounds when k ≪ n. 6.4 TFO model The TFO model was introduced by Razgon et al. [29] as a generalization of several common global constraints. Formally, a TFO model is a triple (V, F1 , F2 ) where V is a finite set of vertices and F1 and F2 are nonempty families of subsets of V such that two sets that belong to the same family are either disjoint or contained in each other. Each set Y in F1 ∪ F2 is associated with two nonnegative integers minY , maxY ≤ |Y |. A subset X of V is said to be valid if minY ≤ X ∩ Y ≤ maxY for every Y ∈ F1 ∪ F2 . The task is to find the largest valid subset. Although the methods introduced in the present paper can be generalized to deal as well with optimization version we will consider only now the feasibility problem consisting in finding a valid subset (or report that none exists). 13 First, note that the existence of a valid subset in a TFO model can be formulated naturally as a satisfiability problem for a combination of among constraints. Indeed, there is a one-to-one correspondence between the valid subsets of (V, F1 , F2 ) and the solutions of the instance (V, {0, 1}, L, C) where C contains the constraints Among(Y, {1}, minY , maxY ), Y ∈ F1 ∪ F2 , and the list L(v) of every variable v ∈ V is {0, 1}. The hypergraph H associated to this instance is (V, F1 ∪ F2 ). It follows directly from Lemmas 4 and 5 (see Appendix) that H is a network hypergraph and hence one can use our approach to decide the existence of a feasible solution of a TFO model. It turns out that the network introduced in [29] is essentially equivalent to the network flow problem that would be obtained by our approach using the second variant described after Lemma 3. It is not meaningfull to compare the running time of our algorithm with that of [29] since it deals with an optimization variant. 6.5 Conjunction of among constraints with full domain Some global constraints studied in the literature correspond to conjunctions (V, D, L, C) of among constraints where the scope of every constraint is the full set V of variables. This class contains, of course, the GCC constraint and also several others, since we do not require R to be a singleton. For example, the OrderedDistribute constraint introduced by Petit and Régin [28] can be encoded as conjunction (V, D, L, C) of among constraint where where the domain D has some arbitrary (but fixed) ordering d1 , . . . , d|D| and in every constraint Among(S, R, min, max), S = V and R is of the form {di , . . . , d|D| }. We shall show that the hypergraph of the conjunction of among constraints defining OrderedDistribute is a network hypergraph. Indeed, with some extra work we have managed to completely characterize all CAC instances containing only constraints with full scope that have an associated network hypergraph. Theorem 1. Let I = (V, D, L, C) be a conjunction of among constraints with |D| ≥ 3 such that the scope of each constraint is V . Then, the following are equivalent: 1. The hypergraph of the canonical booleanization of I is a network hypergraph. 2. For every pair of constraints in C, their ranges are disjoint or one of them contained in the other. In the particular case of OrderedDistribute constraint, the network obtained by our approach is very related to the network introduced in section ([28], Section V.A). More precisely, the abovementioned network is essentially equivalent to the network that would be obtained by our approach using the second variant described after Lemma 3. However, our algorithm is far from optimal. In particular, a complete filtering algorithm with time complexity O(|V | + |D|) is given also in [28]. 14 6.6 Adding new among constraints to a GCC constraint Let (V, D, L, C) be a conjunction of among constraints encoding the GCC constraint (see Example 1) and assume that we are interested in adding several new among constraints to it. In general, we might end up with a hard instance but depending on the shape of the new constraints we might perhaps still preserve tractability. Which among constraint we might safely add? This question has been addressed by Régin [32]. In particular, [32] shows that the domain filtering problem is still tractable whenever: (a) every new constraint added has scope V and, furthermore, the ranges of every pair of new constraints are disjoint, or (b) every new constraint added has range D and furthermore, the scopes of every pair of new constraints are disjoint. We can explore this question by inquiring which families of constraints can be added to an instance (V, D, L, C) encoding GCC such that its associate hypergraph is still a network hypergraph. Somewhat surprisingly we can solve completely this question (see Theorem 2). This is due to the fact that the presence of the global cardinality constraint restricts very much the shape of the tree defining the hypergraph of the instance. Theorem 2. Let I = (V, D, L, C) be a conjunction of among constraints containing a global cardinality constraint with scope V with |D| ≥ 3. Then the following are equivalent: 1. The hypergraph of the canonical booleanization of I is a network hypergraph. 2. In every constraint in C, the scope is a singleton or V , or the range is a singleton or D. Furthermore, for every pair Among(S1 , R1 , min1 , max1 ), Among(S2 , R2 , min2 , max2 ) of constraints in C the following two conditions hold: (a) If S1 = S2 = V or S1 = S2 = {v} for some v ∈ V then R1 and R2 are disjoint or one of them is contained in the other. (b) If R1 = R2 = D or R1 = R2 = {d} for some d ∈ D then S1 and S2 are disjoint or one of them is contained in the other. Note that the previous theorem covers cases (a) and (b) from [32] described at the beginning of this section. The network produced in [32] for the case (a) is essentially equivalent to the one derived by our approach using the second variant described after Lemma 3. For the case (b) [32] does not construct a flow problem nor gives run-time bounds so we ommit a comparison. Acknowledgments The author would like to thank the anonimous referees for many useful comments. This work was supported by the MEIC under grant TIN2016-76573-C21-P and the MECD under grant PRX16/00266. 15 References 1. Ravindra K. Ahuja, Thomas L. Magnanti, and James B. Orlin. Network flows theory, algorithms and applications. Prentice Hall, 1993. 2. Gautam Appa, Dimitris Magos, and Ioannis Mourtos. LP relaxations of multiple all different predicates. In Proceedings of CPAIOR’04, pages 364–369, 2004. 3. Gautam Appa, Dimitris Magos, and Ioannis Mourtos. On the system of two all different predicates. Inf. Process. Lett., 94(3):99–105, 2005. 4. Fahiem Bacchus and Toby Walsh. Propagating logical combinations of constraints. In Proceedings of IJCAI’05, pages 35–40, 2005. 5. R. Balakrishnan and K Ranganathan. A Textbook of Graph Theory. SpringerVerlag (New York), 2000. 6. N. Beldiceanu and E. Contejean. Introducing global constraints in chip. Mathematical and Computer Modelling, 12:97–123, 1994. 7. Christian Bessiere, Emmanuel Hebrard, Brahim Hnich, Zeynep Kiziltan, and Toby Walsh. SLIDE: A useful special case of the CARDPATH constraint. In Proceedings of ECAI’08, pages 475–479, 2008. 8. Christian Bessiere, Emmanuel Hebrard, Brahim Hnich, Zeynep Kiziltan, and Toby Walsh. Range and roots: Two common patterns for specifying and propagating counting and occurrence constraints. Artif. Intell., 173(11):1054–1078, 2009. 9. Christian Bessiere, George Katsirelos, Nina Narodytska, Claude-Guy Quimper, and Toby Walsh. Propagating conjunctions of alldifferent constraints. In Proceedings of AAAI’10, 2010. 10. Gilles Chabert and Sophie Demassey. The conjunction of interval among constraints. In Proceedings of CPAIOR’12, pages 113–128, 2012. 11. R. Dechter and J. Pearl. Tree clustering for constraint networks. Artificial Intelligence, 38:353–366, 1989. 12. Tommy Färnqvist and Peter Jonsson. Bounded tree-width and csp-related problems. In Proceedings of ISAAC’07, pages 632–643, 2007. 13. Michael R. Fellows, Tobias Friedrich, Danny Hermelin, Nina Narodytska, and Frances A. Rosamond. Constraint satisfaction problems: Convexity makes alldifferent constraints tractable. Theor. Comput. Sci., 472:81–89, 2013. 14. Jörg Flum and Martin Grohe. Parameterized Complexity Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2006. 15. E.C. Freuder. Complexity of k-structurated constraint satisfaction problems. In Proceedings of AAAI-90, pages 4–9, 1990. 16. M. R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979. 17. Andrew V. Goldberg and Satish Rao. Beyond the flow decomposition barrier. J. ACM, 45(5):783–797, 1998. 18. Georg Gottlob, Nicola Leone, and Francesco Scarcello. A comparison of structural CSP decomposition methods. Artif. Intell., 124(2):243–282, 2000. 19. Martin Grohe. The complexity of homomorphism and constraint satisfaction problems seen from the other side. J. ACM, 54(1):1:1–1:24, 2007. 20. John E. Hopcroft and Richard M. Karp. An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM J. Comput., 2(4):225–231, 1973. 21. Waldemar Kocjan and Per Kreuger. Filtering methods for symmetric cardinality constraint. In Proceedings of CPAIOR’04, pages 200–208, 2004. 22. Martin Kutz, Khaled M. Elbassioni, Irit Katriel, and Meena Mahajan. Simultaneous matchings: Hardness and approximation. J. Comput. Syst. Sci., 74(5):884–897, 2008. 16 23. Frédéric Lardeux, Eric Monfroy, and Frédéric Saubion. Interleaved alldifferent constraints: CSP vs. SAT approaches. In Proceedings of AIMSA’08, pages 380– 384, 2008. 24. Jean-Louis Laurière. A language and a program for stating and solving combinatorial problems. Artif. Intell., 10(1):29–127, 1978. 25. Dimitris Magos, Ioannis Mourtos, and Gautam Appa. A polyhedral approach to the alldifferent system. Math. Program., 132(1-2):209–260, 2012. 26. Michael J. Maher, Nina Narodytska, Claude-Guy Quimper, and Toby Walsh. Flowbased propagators for the SEQUENCE and related global constraints. In Proceedings of CP’08, pages 159–174, 2008. 27. A. Oplobedu, J. Marcovitch, and Y. Toubier. Charme: Un langage industriel de programmation par contraintes, illustrṕar une application chez renault. In Proceedings of 9th International Workshop on Expert Systems and their Applications, pages 55–70, 1989. 28. Thierry Petit and Jean-Charles Régin. The ordered distribute constraint. International Journal on Artificial Intelligence Tools, 20(4):617–637, 2011. 29. Igor Razgon, Barry O’Sullivan, and Gregory M. Provan. Generalizing global constraints based on network flows. In Proceedings of CSCLP’07, pages 127–141, 2007. 30. Jean-Charles Régin. A filtering algorithm for constraints of difference in csps. In Proceedings of AAAI’94, pages 362–367, 1994. 31. Jean-Charles Régin. Generalized arc consistency for global cardinality constraint. In Proceedings of AAAI’96, pages 209–215, 1996. 32. Jean-Charles Régin. Combination of among and cardinality constraints. In Proceedings of CPAIOR’05, pages 288–303, 2005. 33. Jean-Charles Régin and Carla P. Gomes. The cardinality matrix constraint. In Proceedings of CP’04, pages 572–587, 2004. 34. Jean-Charles Régin and Jean-Francois Puget. A filtering algorithm for global sequencing constraints. In Proceedings of CP’97, pages 32–46, 1997. 35. Alexander Schrijver. Theory of Linear and Integer Programming. Wiley, 1998. 36. Robert Endre Tarjan. Depth-first search and linear graph algorithms. SIAM J. Comput., 1(2):146–160, 1972. 37. Willem Jan van Hoeve, Gilles Pesant, Louis-Martin Rousseau, and Ashish Sabharwal. Revisiting the sequence constraint. In Proceedings of CP’06, pages 620–634, 2006. 38. Willem Jan van Hoeve, Gilles Pesant, Louis-Martin Rousseau, and Ashish Sabharwal. New filtering algorithms for combinations of among constraints. Constraints, 14(2):273–292, 2009. Appendix A: Tractable subcases of the domain filtering problem restricting only the scope or the range in the constraints If I is a set of conjunctions of among constraints, we shall denote by DomFilter(I) the restriction of the domain filtering problem to instances in I. Our ultimate goal would be to characterize precisely for which sets I, DomFilter(I) has efficient algorithms. The first question that we address is the following: which subcases of the problem can be explained by considering only the scopes of the constraints? The 17 scopes occurring in an instance can be characterized by an hypergraph. More precisely, let I = (V, D, L, C) be a conjunction of among constraints. The scope hypergraph of I is the hypergraph H with node set V (H) = V and that contains an hyperedge for every scope occurring in a constraint in C. Formally, E(H) = {S | Among(S, R, min, max) ∈ C} Let H be a (possibly infinite) set of hypergraphs. We denote by Scope(H) the collection of instances I of the domain filtering problem whose scope hypergraph belongs to H. Our question can be formalized in the following manner: for which sets, H, of hypergraphs, is DomFilter(Scope(H)) efficiently solvable? Note that if I is an instance whose scope hypergraph H is a subhypergraph of some H ′ ∈ H then we can construct, by adding superfluous new constraints to I, an equivalent new instance whose scope hypergraph is H ′ . Hence, we can assume that H is closed under taking subhypergraphs. We shall solve completely this question assuming some mild technical assumptions. In order to state our result we need a few definitions from graph theory and parameterized complexity. The Gaifman graph of a hypergraph H, denoted Gaifman(H) is the graph where the node-set is V (H) and the edge-set contains all pairs {u, v} such that there is an hyperedge h in H with {u, v} ⊆ h. A tree-decomposition of a graph G is a pair (T, β) where T is an (ordinary, not oriented) tree and β : V (T ) → 2V (G) is a mapping such that the following conditions are satisfied: 1. For every node v ∈ V (G), the set {x ∈ V (T ) | v ∈ β(x)} is non-empty and connected in T . 2. For every edge {u, v} ∈ E(G), there is a node x ∈ V (T ) such that {u, v} ∈ β(x). The width of a tree-decomposition (T, β) is max{|β(x)| − 1 | x ∈ V (T )} and the tree-width of G is defined to be the minimum w such that G has a treedecomposition of width w. We will also need some notions and basic facts from parameterized complexity theory. A parameterized problem over some alphabet Σ is a pair (P, κ) consisting of a problem P ⊆ Σ ∗ and a polynomial time mapping κ : Σ ∗ → N, called its parameter. A parameterized problem (P, κ) over Σ is fixed-parameter tractable if there is a computable function f : N → N and an algorithm that decides if a given instance x ∈ Σ ∗ belongs to P in time f (κ(x)) · |x|O(1) . FPT denotes the class of fixed-parameter tractable problems. Hence, the notion of fixed-parameter tractability relaxes the classical notion of polynomial-time solvability, by admitting running times that are exponential in the parameter, which is expected to be small. The analogous of NP in parameterized complexity is the class W[1] which is conjectured to contain strictly FPT. We will omit the definition of W[1] since it is not needed in our proofs and refer the reader to [14]. Theorem 3. Assume FPT 6= W[1]. For every recursively class of hypergraphs H, DomFilter(Scope(H)) is polynomial-time solvable if and only if there exists 18 some natural number w such that the tree-width of the Gaifman graph of every hypergraph in H is at most w. Proof. It is well know [11,15] that the set of all CSP instances whose scope hypergraph has tree-width at most w for some fixed w is solvable in polynomial time. Hence it only remains to show the ’only if’ part. This follows from a result of Färnquivst and Jonsson [12]. In order to state it, we need to introduce some background. In the list homomorphism problem (for graphs), we are given two graphs G, J and a mapping L : V (G) → 2V (J) called list. The goal is to decide whether there exists a mapping h : V (G) → V (J) satisfying the following two conditions: 1. h(v) ∈ L(v) for every v ∈ V (G). 2. (h(v1 ), h(v2 )) ∈ E(J) for every (v1 , v2 ) ∈ E(G). Such a mapping is called a solution of (G, J, L). Färnquivst and Jonsson have shown that the parameterized version of the problem (parameterized by the size of V (G)) is W[1]-hard. Indeed, the problem is W[1]-hard even if the input graph, G, is guaranteed to belong to a previously fixed G of graphs, provided G has unbounded tree-width. Formally, let G be a set of graphs and define p-LHom(G, ) to be the problem: – INPUT: graphs G, J with G ∈ G, and a mapping L : V (G) → 2V (J) . – PARAMETER: |V (G)|. – GOAL: Decide whether (G, J, L) has a solution. We are finally ready to state the theorem from [12] that we shall use. Theorem 4. (Lemma 3 in [12]) Let C be a recursively class of graphs that does not have bounded tree-width. Then p-LHom(C, ) is W[1]-hard. We note here that, in order to simplify the exposition, we have taken the liberty to adapt the statement in [12]. We are now ready to complete our proof. Assume, towards a contradiction, that H is a set of hypergraphs with unbounded tree-width such that DomFilter(Scope(H)) is solvable in polynomial time. Let G = {Gaifman(H) | H ∈ H}. It follows directly by the assumptions on H that G has unbounded tree-width and is recursively enumerable. We shall give an FPT algorithm for p-LHom(G, ). The algorithm is as follows. Let (G, J, L) be any instance of the list homomorphism problem with G ∈ G. Enumerate the hypergraphs in H until finding an hypergraph H ∈ H whose Gaifman graph is G. Construct the instance I in Scope(H) where the set of variables is V (H)(= V (G)), the domain is V (H) × V (J), the list of every node v ∈ V (H) is {v} × L(v), and the constraints are defined as follows: – For every (v1 , v2 ) ∈ E(G), and for every (a1 , a2 ) 6∈ E(H), include the constraint Among(h, R, 0, 1) where h is any hyperedge in H containing {v1 , v2 } and R = {(v1 , a1 ), (v2 , a2 )}. 19 Note that, by construction, the scope hypergraph of I is a subhypergraph of H and, hence, I is an instance of Scope(H). Since DomFilter(Scope(H)) is, by assumption, solvable in polynomial time then one can also decide the satisfiability of I is polynomial time. Finally, return ’yes’ if I is satisfiable and ’no’ otherwise. Note that the time required in finding H depends only on G whereas the time required in constructing and solving I is polynomial on the size of (G, J, L). Hence, the algorithm just defined is FPT. It is easy to see that it correctly solves (G, J, L). Indeed, let s be any mapping s : V (H) → V (H) × V (J) which we can write as s(v) = (s1 (v), s2 (v)) with s1 : V (H) → V (H) and s2 : V (H) → V (J). It follows directly from the construction of I that s is a solution of I if and only if s1 is the identity (formally, s(v) = v for every v ∈ V (H)) and s2 is a solution of instance (G, J, L). Hence, I is satisfiable if and only if so is (G, J, L). It is not difficult to show, following [19], that the condition FPT 6= W[1] cannot be weakened (for example by requiring, instead, only P6=NP). Indeed, if FPT = W[1] then there exists a family H of hypergraphs of unbounded treewidth such that DomFilter(H) is polynomial-time solvable. Finally, note that the hardness part of Theorem 3 holds even for conjunctions of among constraint whose range has cardinality 2. Note, that the hardness direction does not hold any more if one requires that the among constraints have range of cardinality 1. Indeed, the AllDiff constraint is encoded by a conjunction of among constrains whose scope hypergraph can have arbitrary large tree-width and the range of every constraint is a singleton. Secondly, we turn our attention to the range and investigate which restrictions on the range of among constraints guarantee that the domain filtering problem is solvable in polynomial time. To this end we can define the range hypergraph in a similar way to the scope hypergraph and define, for every set H of hypergraphs, Range(H) to be the set of all conjunctions of among constraints whose range hypergraph belongs to H. The next theorem, which is straightforward, shows that all non-trivial hypergraphs give rise to hard problems. Theorem 5. Assume P6=NP. For every hypergraph H, DomFilter(Range(H)) is polynomial-time solvable if and only every hypergraph H ∈ H has only trivial hyperedges (that is, if for every H ∈ H and every h ∈ E(H), h = ∅ or h = V (H)). Proof. The ’if’ direction is trivial. Indeed, if the range hypergraph of an instance I has only trivial hyperedges it follows that every among constraint in it is either superfluous (in the sense that it does not enforce any restriction) or unsatisfiable. For the ’only if’ direction, assume that H has an hypergraph H with a non trivial hyperedge h. We define a reduction from One-In-Three Sat which is the following NP-complete [16] problem: – INPUT: An hypergraph J where all the hyperedges have cardinality 3. – GOAL: Decide whether there exists some X ⊆ V (J) such that h ∩ X = 1 for every h ∈ E(J). 20 The reduction is as follows: given an instance J, of One-In-Three Sat, construct the instance I = (V, D, L, C) ∈ Range(H) where V = V (J), D = V (H), L(v) = V (H) for every v ∈ V , and C contains the constraints (S, h, 1, 1) for every S ∈ E(J). It is easy to see that the range hypergraph of I is H and that J is satisfiable if and only if so is I. Appendix B: Proofs of section 6 Basic concepts and results about network hypergraphs If T is an oriented tree and x ∈ V (T ) we denote by T − (x) (respectively T + (x)) the subtree of T containing all those nodes appear in some directed path ending (respectively, starting) at x. A rooted tree is an oriented tree that is obtained from un undirected tree by fixing a node r, called the root, and orienting all the edges away from the root or all the edges towards the root. Lemma 4. For every hypergraph H the following are equivalent: 1. Every pair of hyperedges in H are either disjoint or contained in each other. 2. There exists a rooted tree T that defines H such that the path associated to every variable ends at the root. Furthermore, when condition (2) holds we can assume that in every edge e = (x, y) associated to a minimal hyperedge of H, x has in-degree zero. Proof. (1 ⇒ 2). Let H be an hypergraph satisfying (1). Let T be the oriented tree defined in the following way. The node-set of T is E(H) ∪ {r} where r is a fresh node. For every h ∈ H(T ), T contains an edge from h to h′ where h′ = r if h is not contained in any other hyperedge of H and h′ is the smallest hyperedge in H containing h otherwise. Note that T has root r and that if e = (x, y) is an edge associated to a minimal hyperedge of H, then x has in-degree zero. It is not difficult to verify that T satisfies condition (2). (2 ⇒ 1). Assume that T is a tree satisfying condition (2). Let h and h′ be hyperedges in H and let eh = (x, y) and eh′ = (x′ , y ′ ) be their associated edges in T . Consider three cases: (a) there is a directed path from x to x′ , (b) there is a directed path from x′ to x, (c) none of the previous holds. In case (a) it follows from the fact that the path associated to every variable ends at the root that every path containing eh contains also eh′ and hence h ⊆ h′ . By the same argument, case (b) implies that h′ ⊆ h. Finally, in case (c) there is no directed path containing both eh and eh′ and, consequently, h ∩ h′ = ∅. Oriented trees can be combined by gluing some of their nodes. Formally, let T1 and T2 be trees and let r1 and r2 be nodes in T1 and T2 respectively. Assume, renaming nodes if necessary, that V (T1 ) ∩ V (T2 ) = ∅. Then, the result of gluing r1 and r2 is obtained by, first, computing the disjoint union of T1 and T2 and, then, merging r1 and r2 into a new node w that has as in-neighbours the union of all in-neighbours of r1 and r2 and, as out-neighbours, the union of 21 all out-neighbours of r1 and r2 . It is not difficult to see that the result is again an oriented tree. The following technical lemma, which follows directly from the definitions, will be useful. Lemma 5. For i = 1, 2, let Hi be an hypergraph, let Ti be a tree defining Hi and let ri ∈ V (Ti ). Assume that V (H1 ) = V (H2 ) and that for every v ∈ V (H1 ) the following holds: if v ∈ h1 ∩ h2 with h1 ∈ H1 and h2 ∈ H2 then the last node of the path associated to v in T1 is r1 and the first node of the path associated to v in T2 is r2 . Then, the result of gluing r1 and r2 defines H1 ∪ H2 . Proof. Straightforward. Lemma 6. Let H be an network hypergraph defined by tree T and let J be a subhypergraph of H with the property that for every a, b ∈ E(J) there exists some c ∈ J with a ∩ c 6= ∅ and b ∩ c 6= ∅. Then there exists an element r ∈ V (T ) such that for every h ∈ E(J), eh ∈ E(T − (r)) ∪ E(T + (r)) Proof. For every h ∈ H1 ∪ H2 , let eh = (x, y) be its associated edge in T and let us define Th to be the subtree of T with node-set V (T − (x)) ∪ V ((T + (y)). It follows that V (Ta ) ∩ V (Tb ) 6= ∅ for every a, b ∈ J. Indeed, let c be the hyperedge in J such that a ∩ c 6= ∅ and b ∩ c 6= ∅. Then both endpoints of the edge ec associated to c belong to V (Ta ) ∩ V (Tb ). Next we shall use the 2-Helly property of the subtrees of a tree (see for example [5]). Lemma 7. (2-Helly property of subtrees) Let T1 , . . . , Tn be a collection of subtrees of an (undirected) tree T such that for every 1 ≤ i, j ≤ n, V (Ti )∩V (Tj ) 6= ∅. T It follows that 1≤i≤n V (Ti ) 6= ∅. Note that the 2-Helly property stated deals with undirected trees (instead of oriented trees). However it easily implies that the same property holds for T V (Th ) 6= ∅. To complete the proof oriented trees. Hence, it follows that h∈J T note that any vertex r in h∈J V (Th ) satisfies the conditions of the Lemma. Lemma 8. Let I = (V, D, L, C) be a conjunction of among constraints with |D| ≥ 3, let H be the hypergraph of its canonical booleanization, let H1 be a set of at least 2 hyperedges in E(H) where every hyperedge, S × R, in H1 satisfies S = V and let H2 to be the subset of E(H) containing, for every v ∈ V , the hyperedge {v} × D. Then, if H is a network hypergraph then there exists a tree T defining H and a node r ∈ V (T ) such that for every h ∈ H1 , eh ∈ E(T − (r)) and for every h ∈ H2 , eh ∈ E(T + (r)). Proof. Assume that H is a network hypergraph and let T be a tree defining it. We shall use the following claim. Claim 1 Let x1 , e1 , x2 , . . . , en−1 , xn be a directed path in T , and let ei , ej , ek , i < j < k be different edges such two of their associated hyperedges belong to H2 and the remaining one to H1 . Then, the edge whose associated hyperedge belongs to H1 is ej . 22 Proof. Let hi , hj , hk be the hyperedges associated to ei , ej , and ek respectively and assume, towards a contradiction, that hi ∈ H1 (the case hk ∈ H1 is symmetric). Let (v, d) ∈ hi ∩ hk and let p be its associated path. Clearly, p, contains both ei and ek and hence it must contain also ej in contradiction with the fact that hj ∩ hk = ∅ For every directed path p = x1 , . . . , xn define T (p) to be the subtree of T induced by V (T − (x1 ))∪{x1 , . . . , xn }∪V (T + (xn )). We define J − (resp. J + ) to be the set containing all h ∈ H1 ∪H2 with eh ∈ E(T − (x1 )) (resp. eh ∈ E(T + (xn ))). The proof proceeds by showing that there exists a tree T defining H and a directed path p in T satisfying all the following properties: 1. 2. 3. 4. eh ∈ E(T (p)) for every h ∈ H1 ∪ H2 . J − ∩ H1 = ∅ or J − ∩ H2 = ∅. Also, J + ∩ H1 = ∅ or J + ∩ H2 = ∅. J − and J + are non empty. J + = H2 . Note that if T and p satisfy (1) − (4) then T and r = xn satisfy the Lemma. Let us show the existence of T and p satisfying the above-mentioned properties in increasing order: (1). First, note that J = H1 ∪ H2 satisfies the hypothesis of Lemma 6 and, hence, it follows that there exists an element r in T such that for every h ∈ H1 ∪ H2 , eh belongs to T − (r) or T + (r). Hence, the path p consisting of single node r satisfies (1). (1) → (2). We claim that every path p = x1 , . . . , xn of maximal length satisfying (1) must satisfy (2) as well. Assume, towards a contradiction, that ai ∈ J − ∩ Hi for i = 1, 2 (the proof for J + is analogous). For every h ∈ J − let qh be a directed path in T containing eh and ending at x1 . It follows that the last edge in qa1 and qa2 must be identical since otherwise there could not be a directed path containing both ea1 and ea2 , which would imply that a1 ∩ a2 = ∅. Let (y, x1 ) be the common last edge of qa and qb . Then, applying the same argument it follows that (y, x1 ) is also the last edge of qh for every h ∈ J − . Hence, by adding y at the beginning of y, x1 , . . . , xn we obtain another path p satisfying (1) contradicting the maximality of p. (1, 2) → (3). It is easy to see that every path p satisfying (1) and (2) has a subpath that satisfies, additionally, (3). (1, 2, 3) → (4). It follows from Claim 1 that J − ∩ H2 6= ∅ or J + ∩ H2 6= ∅. We can assume, by reversing the direction of the edges in T if necessary, that J + ∩ H2 6= ∅. Since, by (2), J + ∩ H1 = ∅, in order to show (4) it is only necessary to prove that H2 ⊆ J + . Assume towards a contradiction that there exists h ∈ H2 \ J + . It follows again by Claim 1 and the fact that H1 is nonempty that h ∈ J − and hence that H1 ∩ J − = ∅. Let a = V × A, b = V × B be two different hyperedges in H1 . It follows that ea and eb appear in path p and we can assume wlog. that ea appears before eb in p. We shall prove that B ⊆ A. Let d ∈ B and let v ∈ V be such that h = {v} × D. Consider the directed path q associated to (v, d). Clearly q contains eh and eb and hence q contains ea as well. Hence (v, d) belongs to (V, A), and hence, d ∈ A. A similar reasoning, using 23 now any arbitrary hyperedge in J + shows that A ⊆ B. Hence we have A = B, a contradiction. This completes the proof of (4). Proof of Theorem 1 Let H be the hypergraph of the canonical booleanization of I. Define H1 to be the set of all hyperedges S × R in H with S = V . Define H2 to be the hypergraph associated to the non-empty assignment constraints. That is, H2 contains for every v ∈ V , the hyperedge {v} × D. Note that h1 ∩ h2 6= ∅ for every h1 ∈ H1 and h2 ∈ H2 . (1) ⇒ (2). In what follows we shall assume that |H1 | > 1 since otherwise (2) follows directly. Assume that H is a network hypergraph. It follows that H1 and H2 satisfy the hypothesis of Lemma 8. Then, let T the tree defining H and r the node in T given by Lemma 8. Note that for every node occurring in any hyperedge in H1 , its associated path p must contain some edge in T + (r) and, hence, must necessarily contain r as well. Then, condition (2) follows by applying Lemma 4 to T − (r). (2) ⇒ (1). We note that this is a particular case of direction (2) ⇒ (1) in Theorem 2. Still we include a proof since we think it might help the reader to understand the basic idea before embarking in the more complicated proof in 2. This direction follows easily from Lemma 4 and Lemma 5. Assume that (2) holds. Then it follows from Lemma 4 that there exists a rooted tree T1 defining H1 such that, additionally, the path associated to every variable in V (H) ends at the root, r1 , of T1 . Also, note that every two hyperedges in H2 have an empty intersection which implies again by Lemma 4 that there exists a rooted tree T2 defining H2 such that the path associated to every variable v ∈ V (H) starts at the root, r2 , of T2 . Then, it follows from Lemma 5 that by gluing r1 and r2 in T1 and T2 we obtain the tree defining H. Proof of Theorem 2 Let H be the hypergraph of the canonical booleanization of I. (1) ⇒ (2). Define H1 to be the set containing, for every d ∈ D, the hyperedge V ×{d}. Every such hyperedge is in H because we are assuming that the instance contains a global cardinality constraint. Furthermore, define H2 to be the set containing all non-empty assignment constraints. That is H2 contains for every v ∈ V , the hyperedge {v} × D. Notice that if a = V × {d} belongs to H1 and b = {v} × D belongs to H2 then a ∩ b is non empty as it contains (v, d). Assume that H is a network hypergraph. It follows that H1 and H2 satisfy the hypothesis of Lemma 8 and let T be the tree defining H and r the vertex in V (T ) given by Lemma 8. We claim that for every hyperedge h ∈ H, eh belongs to E(T − (r))∪E(T − (r)) Indeed, if it is not the case then there exists some hyperedge h = S ×R such that 24 its associated edge eh has one endpoint y in V (T − (r))∪V (T + (r)) and the other, x, outside. Assume that y ∈ V (T − (r)) (the case y ∈ V (T + (r)) is symmetric). It follows that eh = (y, x) since otherwise eh would be included in E(T − (r)). Let (v, d) ∈ S × R and let p be the direct path in T associated to (v, d). This path must include eh and also the edge associated to V × {d}, but this is impossible since both edges must appear with different polarity because the edge associated to V × {d} belongs to V (T + (r)). For every d ∈ D, let (xd , yd ) be the edge in T associated to hyperedge V ×{d} and let Td be T − (xd ). Also, define T1 to be the subtree of T that contains all the nodes x that belong to a path starting at xd for some d ∈ D and ending at r. For every v ∈ V , let (xv , yv ) be the edge in T associated to hyperedge {v}×D and let Tv be T + (yv ). Also, define T2 to be the subtree of T that contains all the nodes x that belong to a path starting at r and ending at yv for some v ∈ D. Let (v, d) ∈ V × D and let p be the directed path in T associated to (v, d). Clearly p must contain the edges associated to V × {d} and {v} × D and, hence, also r. It also follows that for every hyperedge, h ∈ E(H), containing (v, d), eh belongs to Ti with i ∈ {d, v, 1, 2}. It follows that every edge e ∈ E(T ) is contained in some of the trees Ti , i ∈ D ∪ V ∪ {1, 2} we have just defined and hence we can infer the shape of H by considering separately the shape of the hypergraphs defined by each one of the trees. Then (1) ⇒ (2) follows from the following lemma. Lemma 9. Let e (resp. e′ ) be an edge in T , let h = S × R (resp. h′ = S ′ × R′ ) be the hyperedge in H associated to e (resp. e′ ). Then the following holds: 1. If there exists d ∈ D such that e, e′ ∈ E(Td ) then R = R′ = {d}. Furthermore, S and S ′ are disjoint or contained one in another. 2. If e, e′ ∈ E(T1 ) then S = S ′ = V . Furthermore, R and R′ are disjoint or contained one in another. 3. If there exists v ∈ V such that e, e′ ∈ E(Tv ) then S = S ′ = {v}. Furthermore, R and R′ are disjoint or contained one in another. 4. If e, e′ ∈ E(T2 ) then R = R′ = D. Furthermore, S and S ′ are disjoint or contained one in another. Proof. By symmetry we only need to prove the first two cases: 1. We first show that R = {d} (the same argument shows that R′ = {d}. Let (v, d′ ) be any node in h and let p be its associated directed path in T . Since p contains r, it must contain the edge associated to V × {d}, which implies that d′ = d. Hence, R = {d}. The fact that S and S ′ are disjoint or contained one in another follows from applying Lemma 4 to Td . Note that we use that the path associated to every node in V × {d} must necessarily include xd . 2. We first show that S = V (the same argument shows that S ′ = V ). Let p be the directed path associated to any variable (v, d) ∈ S × R. This path contains xd and r which implies that every path associated to a variable in V × {d} contains also eh . It follows that V × {d} ⊆ S × R and, hence, 25 S = V . The fact S and S ′ are disjoint or contained one in another follows by applying Lemma 4 to T1 . Note that we use that the associated path of every node in V × D must necessarily include r. (1) ⇐ (2). This follows easily from Lemma 4 and Lemma 5. For every d, let Hd be the subhypergraph of H containing all the hyperedges S × R ∈ E(H) with R = {d} and S 6= V . It follows from Lemma 4 that there is a rooted tree Td defining Hd such that, additionally, all the paths associated to variables in V (H) finish at the root of Td , which we will denote by rd . Similarly, let H1 be the subhypergraph of H containing all the hyperedges S × R ∈ E(H) with S = V . Again, by Lemma 4 there is a rooted tree T1 with root, say, r1 defining H1 . For every d ∈ D, let us denote by (xd , yd ) the edge in T1 associated to V × {d}. Lemma 4 guarantees that xd has in-degree 0 which implies that the paths associated to every node in V × {d} start at xd and end at S r1 . It follows then from Lemma 5 that we can obtain a tree defining H1 ∪ d∈D Hd (that is, the subgraph of H containing all hyperedges S × R ∈ E(H) where S = V or R is a singleton) by taking the disjoint union of T1 along with all the trees Td and gluing rd with xd for every d ∈ D. The obtained tree, which we will call T1′ is rooted at r1 and has the additional property that every path in T1′ associated to a variable in V (H) ends at the root r1 . A symmetric argument shows that there exists a tree T2′ with root r2 that defines the subhypergraph of H containing all hyperedges S × R ∈ E(H) where R = D or V is a singleton such that, additionally, every path in T1′ associated to a variable in V (H) starts at the root r2 . Then, it follows that by gluing r1 and r2 in T1′ and T2′ we obtain a tree defining H. This finishes the proof. We note that direction (1 ⇒ 2) in Theorems 1 and 2 does not hold for boolean domains due to the fact that the proof assumes the canonical encoding. However, the direction (2 ⇒ 1) holds also for boolean domains. Appendix C: Proof of the O(n3/2 log n log max) bound for the Sequence constraint Recall from Section 6.3 that a Sequence constraint is encoded as a boolean CAC with constraints: Among({xi , . . . , xi+k }, {1}, min, max) where i = 1, . . . , n− k and min, max, k are fixed integers. Our goal is to improve the bound O(n3/2 log2 n) given in Section 6.3 to O(n3/2 log n log max).To this end we note, inspecting the proof of Lemma 3, that in the log mn factor appearing in the function f (n, m), mn is has been obtained by bounding the quantity u (where u is the maximum capacity of the edges in the network constructed by the algorithm) by O(log n). We shall show that in the particular case of the Sequence constraint we can obtain a better bound. In particular, we will see that u ≤ max (and hence log u ≤ log max), which suffices to obtain our desired bound. Recall the definitions of a, b, c, T , and P from the proof of Lemma 3 and recall also that the capacity of every edge in the network constructed by our 26 algorithm is either an entry of vector c, which in the particular case of the Sequence constraint, is either max − min or 1 (and, hence, at most max), or the absolute value of an entry of vector b = P a. In the particular case of the Sequence constraint, all entries of a are max. Also, recall that the tree T defining a the hypergraph of a Sequence constraint is a directed path which implies that every row of P has at most one +1, at most one −1, and the rest of entries are 0. It follows that every entry in b is in {−max, 0, max} and we are done. 27
2cs.AI
An approximate solution of the MHD Falkner-Skan flow by Hermite functions pseudospectral method K. Parand1,∗, A.R. Rezaei, S.M. Ghaderi arXiv:1008.2322v2 [math-ph] 16 Aug 2010 Department of Computer Sciences, Shahid Beheshti University, G.C., Tehran, Iran Abstract Based on a new approximation method, namely pseudospectral method, a solution for the three order nonlinear ordinary differential laminar boundary layer Falkner-Skan equation has been obtained on the semi-infinite domain. The proposed approach is equipped by the orthogonal Hermite functions that have perfect properties to achieve this goal. This method solves the problem on the semi-infinite domain without truncating it to a finite domain and transforming domain of the problem to a finite domain. In addition, this method reduces solution of the problem to solution of a system of algebraic equations. We also present the comparison of this work with numerical results and show that the present method is applicable. Keywords: Falkner-Skan, Pseudospectral method, Semi-infinite, Nonlinear ODE, Hermite functions, Boundary layer flow, Magnetohydrodynamics (MHD) flow PACS: 02.70.Jn, 47.11.-j, 02.60.Cb, 02.60.Lj, 02.70.-c 1. Introduction There are many problems in science and engineering arising in unbounded domains. Spectral methods are famous ways to solve these kinds of problems. The most common approach on spectral methods, that is used in this paper too, is through the use of polynomials/functions that are orthogonal over unbounded domains, such as the Hermite and the Laguerre polynomials/functions [1–8]. Guo [9–11] proposed a method that proceeds by mapping the original problem in an unbounded domain to a problem in a bounded domain, and then using Jacobi polynomials to approximate the resulting problems. Another method is replacing infinite domain with [−L, L] and semi-infinite interval with [0, L] by choosing L, sufficiently large. This method is called domain truncation [12]. ∗ Corresponding author. Tel:+98 21 22431653; Fax:+98 21 22431650. Email addresses: [email protected] (K. Parand), [email protected] (A.R. Rezaei), [email protected] (S.M. Ghaderi) 1 Member of research group of Scientific Computing. February 5, 2018 Using rational approximation is another effective direct approach for solving such problems. Christov [13] and Boyd [14, 15] developed some spectral methods on unbounded intervals by using mutually orthogonal systems of rational functions. Boyd [15] defined a new spectral basis, named rational Chebyshev functions on the semi-infinite interval, by mapping to the Chebyshev polynomials. Guo et al. [16] introduced a new set of rational Legendre functions which are mutually orthogonal in L2 (0, +∞). They applied a spectral scheme using the rational Legendre functions for solving the Korteweg-de Vries equation on the half line. Boyd et al. [17] applied pseudospectral methods on a semi-infinite interval and compared rational Chebyshev, Laguerre and mapped Fourier sine. Parand et al. [18–23] applied spectral method to solve nonlinear ordinary differential equations on semi-infinite intervals. Their approach was based on rational Tau and pseudospectral methods. The concept of boundary layer flows [24] of an incompressible fluid has several engineering applications, such as aerodynamic extrusion of plastic sheets and cooling of a metallic plate in a cooling bath, cooling and heating of the plate by free convection current [25]. Such flows are also encountered in the glass and polymer industries. The effect of thermal radiation absorption on an unsteady free convective flow past a vertical plate has been studied in the presence of a magnetic field and constant wall heat flux by [25] also Makinde [26] investigated numerically the hydromagnetic mixed convection flow of an incompressible viscous electrically conducting fluid and mass transfer over a vertical porous plate with constant heat flux embedded in a porous medium by Newton-Raphson shooting method along with fourth-order Runge-Kutta integration algorithm. The case of mixed-convective boundary layer flow past a vertical porous plate embedded in a saturated porous medium with a constant heat flux and mass transfer in the presence of a magnetic field and with heat absorption has been studied by [27]. The steady laminar flow passing a fixed wedge was first analyzed in the early 1930s by Falkner and Skan [28] to illustrate the application of Prandtl’s boundary layer theory. The Magnetohydrodynamic (MHD) flows as boundary layer flows have a great significance both from a mathematical as well as a physical standpoint. Such flows are very important in electromagnetic propulsion. The MHD systems are used effectively in many applications including power generators, pumps, accelerators, electrostatic filters, droplet filters, the design of heat exchangers, the cooling of reactors etc. [29]. 1.1. MHD flows Consider the boundary layer flow of an electrically conducting viscous fluid. A magnetic field B(x) acts transversely to the flow. The induced magnetic field is neglected by choosing small magnetic Reynolds number assumption. Furthermore, the electric field is absent. The relevant problem is ∂u ∂v + = 0, ∂x ∂y u ∂u du ∂ 2 v σB 2 ∂u +v =U +ν 2 − (u − U), ∂x ∂y dx ∂y ρ 2 (1) (2) u = 0, v = 0 at y = 0, u = U(x), as y → ∞, (3) where [24] U(x) = axm (4) and [30] B(x) = B0 x(m−1)/2 , (5) in which u and v are the velocity components, U is the inherent characteristic velocity, ν is a kinematic viscosity, σ is the electrical conductivity, ρ is the fluid density, B and B0 are the magnetic field and externally imposed magnetic field in the y-direction respectively. Defining r r r m+1 U 2 √ τ= y, ψ = νxU f (τ ), (6) 2 νx m+1 u = Uf ′ (τ ), r v=− m+1 2 r νU m−1 ′ [f + τ f ], x m+1 (7) the continuity equation is identically satisfied and Eq. 2 and boundary conditions 3 reduce to the following form d2 f df df d3 f + f + β[1 − ( )2 ] − M 2 ( − 1) = 0, 3 2 dτ dτ dτ dτ (8) f (0) = f ′ (0) = 0, (9) f ′ (+∞) = 1, 2m where β = m+1 and M 2 = 2σB02 /ρa(1 + m). Now our interest is to find solution of Eq. (8) for wedge in the accelerated flow (m > 0, β > 0) and decelerated flow (m < 0, β < 0) with separation. MHD boundary layer flows have been studied by several researchers. Yih [31] and Ishak et al. [32] transformed the partial differential boundary layer equations into the nonsimilar boundary layer equations and a system of ordinary differential equations respectively, then they used Keller box method to solve them. Hayat et al. [33], Rashidi [34] and Abbasbandy et al. [35, 36] solved MHD boundary layer flow by modified Adomian decomposition method, DTM-Padé, Homotopy analysis method and Hankel-Padé respectively. The purpose of this paper is to develop a pseudospectral method that is more direct and simpler than the other spectral methods. The method of this paper differs from previous methods that have been used because it approximates the solution directly. Thus, it does not truncate the semi-infinite domain to a finite domain, does not introduce the unknown finite boundary, does not impose an asymptotic condition at this unknown boundary, and does not use transformation to map the physical domain. 3 This paper is organized as follows: In section 2, the properties of Hermite functions and the way to construct the pseudospectral approach for this type equation are described. In section 3 the proposed method is applied to solve MHD Falkner-Skan equation, and a comparison is made with existing numerical solutions that were reported in other researches, and we have a discussion in the final section. 2. Hermite functions pseudospectral method Spectral methods have been successfully applied in the approximation of differential boundary value problems defined in unbounded domains. For problems whose solutions are sufficiently smooth, they exhibit exponential rates of convergence/spectral accuracy. We can apply different spectral methods that are used to solve problems in semi-infinite domains. One of these approaches is using Laguerre and Hermite polynomials/functions [2, 4–8, 37–39]. Guo [5] suggested a Laguerre-Galerkin method for the Burgers equation and Benjamin-Bona-Mahony (BBM) equation on a semi-infinite interval. In [7] Shen proposed spectral methods using Laguerre functions and analyzed for model elliptic equations on regular unbounded domains. Siyyam [8] applied two numerical methods for solving initial value problem differential equations using the Laguerre Tau method. Maday et al. [6] proposed a Laguerre type spectral method for solving partial differential equations. Funaro and Kavian [2] considered some algorithms by using Hermite functions. Recently Guo [4] developed the spectral method by using Hermite polynomials. However, it is not easy to perform the quadratures in unbounded domains, which are used in the Hermite spectral approximations. So the Hermite pseudospectral method is more preferable in actual calculations. Guo [39] developed the Hermite pseudospectral method for the Burgers equation on the whole line. Guo et al. [37] considered spectral and pseudospectral approximations using Hermite functions for PDEs on the whole line to approximate the Dirac equation. Bao and Shen [38] proposed a generalized-Laguerre-Hermite pseudospectral method for computing symmetric and central vortex states in Bose-Einstein condensates (BECs) in three dimensions with cylindrical symmetry. Pseudospectral methods has become increasingly popular for solving differential equations and also it is very useful in providing highly accurate solutions to differential equations. In this paper, we employ the Hermite functions pseudospectral method which we denote HFP to solve MHD Falkner-Skan initial value problem directly. 2.1. Properties of Hermite functions In this section, we detail the properties of the Hermite functions that will be used to construct the HFP method. First we note that the Hermite polynomials are generally not suitable in practice due to their wild asymptotic behavior at infinities [40, 41]. Hermite polynomials Hn (x), n ≥ 0, are the eigenfunctions of the singular Sturm-Liouville problem in ′′ ′ Hn (x) − 2xHn (x) + 2nHn (x) = 0 (10) 4 Hermite polynomials with large n can be written in direct formula as follow: √ nπ Γ(n + 1) x2 /2 e cos ( 2n + 1x − ) Γ(n/2 + 1) 2 √ nπ 2 ). ∼ nn/2 ex /2 cos( 2n + 1x − 2 Hn (x) ∼ Hence, we shall consider the so called Hermite functions. The normalized Hermite functions of degree n are defined by e n (x) = √ 1 e−x2 /2 Hn (x), H 2n n! n ≥ 0, x ∈ R. e n } is an orthogonal system in L2 (R), i.e., Clearly, {H Z +∞ √ e n (x)H e m (x)dx = πδmn . H −∞ where δnm is the Kronecker delta function. In contrast to the Hermite polynomials, the Hermite functions are well behaved with the decay property: e n (x)| −→ 0, |H as |x| −→ ∞, and the asymptotic formula with large n is √ e n (x) ∼ n− 14 cos( 2n + 1x − nπ ) H 2 The three-term recurrence relation of Hermite polynomials implies q p n e 2 e en+1 (x) = x H H (x) − n+1 Hn−1 (x), n ≥ 1, n+1 n √ e 0 (x) = e−x2 /2 , H e 1 (x) = 2xe−x2 /2 . H Using recurrence relation of Hermite polynomials and the above formula leads to √ e n′ (x) = 2nH e n−1 (x) − xH e n (x) H r r ne n+1 e = Hn−1 (x) − Hn+1 (x). 2 2 and this implies  √ n(n−1)π   − ,  2   Z √π(n + 1 ), ′ 2 e n′ (x)H em √ H (x)dx = (n+1)(n+2)π  R  , −  2   0, m = n − 2, m = n, m = n + 2, otherwise. 5 Let us define 2 PeN := {u : u = e−x /2 v, ∀v ∈ PN }. where PN is the set of all Hermite polynomials of degree at most N. We now introduce the Gauss quadrature associated with the Hermite functions approach. Let {xj }N j=0 be the Hermite-Gauss nodes and define the weights √ π w ej = , 0 ≤ j ≤ N. e 2 (xj ) (N + 1)H N Then we have Z N X p(x)dx = p(xj )w ej , ∀p ∈ Pe2N +1 . R j=0 For a more detailed discussion of these early developments, see the [42, 43]. 2.2. Approximations by Hermite functions Let us define Λ := {x| − ∞ < x < ∞} and e 0 (x), H e1 (x), ..., H e N (x)} HN = span{H The L2 (Λ)-orthogonal projection ξ˜N : L2 (Λ) −→ HN is a mapping in a way that for any v ∈ L2 (Λ), < ξ˜N v − v, φ >= 0, ∀φ ∈ HN or equivalently, ξ˜N v(x) = N X l=0 e l (x). ṽl H To obtain the convergence rate of Hermite functions we define the space HAr (Λ) defined by HAr (Λ) = {v|v is measurable on Λ and kvkr,A < ∞}, and equipped with the norm kvkr,A = kAr vk. For any r > 0, the space HAr (Λ) and its norm are defined by space interpolation. By induction, for any non-negative integer r, r X Ar v(x) = (x2 + 1)(r−k)/2 pk (x)∂xk v(x), k=0 where pk (x) are certain rational functions which are bounded uniformly on Λ. Thus, !1/2 r X kvkr,A ≤ c k (x2 + 1)(r−k)/2 pk (x)∂xk v k . k=0 Theorem : For any v ∈ HAr (Λ), r ≥ 1 and 0 ≤ µ ≤ r, k ξ˜N v − vkµ ≤ cN 1/3+(µ−1)/2 k v kr,A . (11) Proof. A complete proof is given by Guo et al. [37]. also same theorem has been proved by Shen et al. [40]. 6 2.3. Hermite functions transform As mentioned before, Falkner-Skan equation is defined on the interval (0, +∞); but we know properties of Hermite functions are derived in the infinite domain (−∞, +∞). Also we know approximations can be constructed for infinite, semi-infinite and finite intervals. One of the approaches to construct approximations on the interval (0, +∞) which is used in this paper, is to use a mapping, that is a change of variable of the form ω = φ(z) = 1 ln(z). k (12) where k is a constant. The basis functions on (0, +∞) are taken to be the transformed Hermite functions, b n (x) ≡ H e n (x) ◦ φ(x) = H e n (φ(x)). H e n (x) ◦ φ(x) is defined by H e n (φ(x)). The inverse map of ω = φ(z) is where H z = φ−1 (ω) = ekω . (13) Thus we may define the inverse images of the spaced nodes {xj }+∞ −∞ as Γ = {φ−1 (t) : −∞ < t < +∞} = (0, +∞) and x̃j = φ−1 (xj ) = ekxj , j = 0, 1, 2, ... Let w(x) denote a non-negative, integrable, real-valued function over the interval Γ. We define L2w (Γ) = {v : Γ → R | v is measurable and k vkw < ∞} where k vkw = Z ∞  21 | v(x) | w(x)dx , 2 0 is the norm induced by the inner product of the space L2w (Γ), Z ∞ < u, v >w = u(x)v(x)w(x)dx. (14) 0 b n (x)}n∈N denotes a system which is mutually orthogonal under (14), i.e., Thus {H √ b n (x), H bm (x) >w(x) = πδnm , <H where w(x) = 1/x and δnm is the Kronecker delta function. This system is complete in L2w (Γ). For any function f ∈ L2w (Γ) the following expansion holds 7 f (x) ∼ = N X k=0 with fk = b k (x), fk H b k (x) >w(x) < f (x), H . b k (x)k2 kH w(x) Now we can define an orthogonal projection based on transformed Hermite functions as below: Let bN = span{H b 0 (x), H b1 (x), ..., H b n (x)} H bN is a mapping in a way that for any The L2 (Γ)-orthogonal projection ξˆN : L2 (Γ) −→ H 2 y ∈ L (Γ), < ξˆN y − y, φ >= 0, or equivalently, ξˆN y(x) = N X i=0 bN ∀φ ∈ H b i (x). âi H (15) 2.4. Domain scaling It has already been mentioned in [44] that when using a spectral approach on the whole real line R one can possibly increase the accuracy of the computation by a suitable scaling of the underlying time variable t. For example, if y denotes a solution of the ordinary differential equation, then the rescaled function is ỹ(t) = y( tl ), where l is constant. Domain scaling is used in several of the applications presented in the next section. For more detail we refer the reader to [45]. 3. Solving Falkner-Skan wedge flow equation with Hermite functions Here, we solve Falkner-Skan wedge flow equation for m = −3/5 with M = 5, 10, 15, 20 and m = 2 with M = 5, 10, 50, 100 by pseudospectral method. We note that the Hermite functions are not differentiable at the point x = 0, therefore to approximate the solution of Eq. (8) with the boundary conditions Eq. (9) we multiply operator Eq. (15) by x2 /(x + 1) to satisfy f (0) = f ′ (0) = 0 in Eq. (9) and also we construct a function p(x) that satisfy f ′ (+∞) = 1 in Eq. (9). This function is given by p(x) = x2 , x+λ (16) 8 where λ is constant to be determined. Therefore, the approximate solution of f (x), in Eq. (8) with boundary conditions Eq. (9) is represented by x2 ˆ ξN f (x), ξbN f (x) = p(x) + x+1 To apply the pseudospectral scheme, we construct the residual function by substituting f (x) by ξbN f (x) in the Falkner-Skan Eq. (8): !  d2 ξb f (x/l) d3 ξbN f (x/l)  b N Resl (x) = (17) + ξN f (x/l) dx3 dx2 ! ! bN f (x/l) d ξ dξbN f (x/l) 2 ) − M2 −1 , (18) +β 1−( dx dx where l is a constant that is defined in domain scaling description, before. ξbN f (x) will be a good approximation of function f (x), if the residual function is zero on the whole domain. In other words, we should select coefficients ai s so that the residual function tends to zero on most of the domain. The pseudospectral scheme for Falkner-Skan equation is to find ξbN f (x) such that Resl (xj ) = 0, j = 0, . . . , N + 1, (19) where the xj s are N + 2 transformed Hermite-Gauss nodes by Eq. 13. This generates a set of N + 2 nonlinear equations that can be solved by Newton method for unknown coefficients ai s and λ. The physical quantities of interest which is represented by value of f ′′ (0) is the skin friction coefficient. The approximations of the f ′′ (0) obtained by this method and numerical value [46] for m = −3/5 with M = 5, 10, 15, 20 and m = 2 with M = 5, 10, 50, 100 are listed in Tables 1 and 2 respectively. The velocity boundary layer of the wedge with m = −3/5 and m = 2 for various various M are shown in figures 1 and 2 respectively. The value of f ′′ (0) can be seen to increase with M. Hence, the presence of a magnetic field also increases the skin friction. Logarithmic graphs of absolute coefficients |ai | of Hermite function in the approximate solutions for m = −3/5 with M = 50 and m = 2 with same M are shown in Figures 3 and 4 respectively. The graphs illustrate that the method has an appropriate convergence rate. 4. Conclusion The FalknerSkan non-linear ordinary differential equation arises in the study of laminar boundary layers. This problem is the subject of an extensive research to solve because of its importance in boundary layer theory, a solution for the non-linear ordinary differential laminar boundary layer Falkner-Skan equation has been obtained by pseudospectral method on semi-infinite domain, also in this work we concentrated on the boundary conditions of 9 f (0) = f ′ (0) = 0, f ′ (+∞) = 1, which is corresponding to a fixed and impermeable wedge flow. The physical quantities of interest which is represented by the value of f ′′ (0) is the skin friction coefficient. According to the tables and figures value of f ′′ (0) can be seen to increase with M. Hence, the presence of a magnetic field also increases the skin friction. Most numerical methods reported in the literature thus far are based on transforming maps of the physical domain [0, +∞) to the finite domains, shooting methods or finitedifference methods obtained by first truncating the semi-infinite physical domain of the problem to a finite domain at an unknown finite boundary, which is determined as part of the solution by imposing an “asymptotic boundary condition” at this boundary. The method presented in this paper used a set of Hermite functions and solved this problem on the semi-infinite domain without truncating it to a finite domain, imposing the asymptotic condition transforming and transforming domain of the problem. These functions are proposed to provide an effective but simple way to improve the convergence of the solution by pseudospectral method. The validity of the method is based on the assumption that it converges by increasing the number of Gauss points. Through the comparisons among the numerical solutions of Asaithambi and the current work, it has been shown that the present work has provided acceptable approach for Falkner-Skan equation; also it was confirmed by the theorem and logarithmic figures of absolute coefficients that this approach has exponentially convergence rate. In total, an important concern of spectral methods is the choice of basis functions; the basis functions have three number of properties: easy to computation, rapid convergence and completeness, which means that any solution can be represented to arbitrarily high accuracy by taking the truncation N sufficiently large. Acknowledgments The research was supported by a grant from Shahid Beheshti University. References [1] O. Coulaud, D. Funaro, O. Kavian, Laguerre spectral approximation of elliptic problems in exterior domains, Comput. Method. Appl. Mech. Eng. 80 1-3 (1990)451-458. [2] D. Funaro, O. Kavian, Approximation of some diffusion evolution equations in unbounded domains by Hermite functions, Math. Comp. 57 (1991)597-619. [3] D. Funaro, Computational aspects of pseudospectral Laguerre approximations, Appl. Numer. Math. 6 6 (1990)447-457. [4] B.Y. Guo, Error estimation of Hermite spectral method for nonlinear partial differential equations, Math. Comput. 68 227 (1999)1067-1078. [5] B.Y. Guo, J. Shen, Laguerre-Galerkin method for nonlinear partial differential equations on a semiinfinite interval, Numer. Math. 86 4 (2000)635-654. [6] Y. Maday, B. Pernaud-Thomas, H. Vandeven, Reappraisal of Laguerre type spectral methods, La. Rech. Aerospatiale. 6 (1985)13-35. [7] J. Shen, Stable and efficient spectral methods in unbounded domains using Laguerre functions, SIAM. J. Numer. Anal. 38 4 (2000)1113-1133. [8] H.I. Siyyam, Laguerre Tau methods for solving higher order ordinary differential equations, J. Comput. Anal. Appl. 3 2 (2001)173-182. 10 [9] B.Y. Guo, Gegenbauer approximation and its applications to differential equations on the whole line, J. Math. Anal. Appl. 226 1 (1998)180-206. [10] B.Y. Guo, Jacobi spectral approximation and its applications to differential equations on the half line, J. Comput. Math. 18 1 (2000)95-112. [11] B.Y. Guo, Jacobi approximations in certain Hilbert spaces and their applications to singular differential equations, J. Math. Anal. Appl. 243 2 (2000)373-408. [12] J.P. Boyd, Chebyshev and Fourier Spectral Methods, second ed., Dover., New York, 2000. [13] CI. Christov, A complete orthogonal system of functions in L2 (−∞, ∞) space, SIAM. J. Appl. Math. 42 (1982)1337-1344. [14] J.P.Boyd, Spectral methods using rational basis functions on an infinite interval, J. Comput. Phys. 69 1 (1987)112-142. [15] J.P. Boyd, Orthogonal rational functions on a semi-infinite interval, J. Comput. Phys. 70 1 (1987)63-88. [16] B.Y. Guo, J. Shen, Z.Q. Wang, A rational approximation and its applications to differential equations on the half line, J. Sci. Comput. 15 2 (2000)117-147. [17] J.P. Boyd, C. Rangan, P.H. Bucksbaum, Pseudospectral methods on a semi-infinite interval with application to the Hydrogen atom: a comparison of the mapped Fourier-sine method with Laguerre series and rational Chebyshev expansions, J. Comput. Phys. 188 1 (2003)56-74. [18] K. Parand, M. Razzaghi, Rational Chebyshev Tau method for solving Volterra’s population model, Appl. Math. Comput. 149 3 (2004)893-900. [19] K. Parand, M. Razzaghi, Rational Chebyshev Tau method for solving higher-order ordinary differential equations, Int. J. Comput. Math. 81 1 (2004)73-80. [20] K. Parand, M. Razzaghi, Rational Legendre approximation for solving some physical problems on semi-infinite intervals, Phys. Scripta. 69 (2004)353-357. [21] K. Parand, M. Shahini, Rational Chebyshev pseudospectral approach for solving Thomas-Fermi equation, Phys. Lett. A. 373 (2009)210-213. [22] K. Parand, A. Taghavi, Rational scaled generalized Laguerre function collocation method for solving the Blasius equation, J. Comput. Appl. Math. 233 4 (2009)980-989. [23] K. Parand, M. Shahini, M. Dehghan, Rational Legendre pseudospectral approach for solving nonlinear differential equations of Lane-Emden type, J. Comput. Phys. 228 23 (2009)8830-8840. [24] H. Schlichting, Boundary Layer Theory, 6th ed., McGraw-Hill, New York, 1979. [25] A. Ogulu, O.D. Makinde, Unsteady hydromagnetic free Convection flow of a dissipative and radiating fluid past a vertical plate with constant heat flux, Chem. Eng. Comm. 196 (2009) 454462. [26] O.D. Makinde, On MHD boundary-layer flow and mass transfer past a vertical plate in a porous medium with constant heat flux, Int. J. Numer. Method Heat Fluid Flow. 19 3/4 (2009) 546-554. [27] O.D. Makinde, P. Sibanda, Magnetohydrodynamic Mixed-Convective Flow and Heat and Mass Transfer Past a Vertical Plate in a Porous Medium With Constant Wall Suction, J. Heat Transfer. 130 (2008) 1-8. [28] V.M. Falkner, S.W. Skan, Some approximate solutions of the boundary-layer equations, Phiols. Mag. 12 (1931)865-896. [29] G.W. Sutton, A. Sherman, Engineering Magnetohydrodynamics, McGrawHill, New York, 1965. [30] T.C. Chiam, Hydromagnetic flow over a surface stretching with a power-law velocity, Int. J. Eng. Sci. 33 (1995)429-435. [31] K.A. Yih, MHD forced convection flow adjacent to a non-isothermal wedge, Int. Comm. Heat. Mass. Transfer. 26 6 (1999)819-827. [32] A. Ishak, R. Nazar, I. Pop, MHD boundary-layer flow of a micropolar fluid past a wedge with constant wall heat flux, Commun. Nonlinear. Sci. Numer. Simul. 14 (2009)109-118. [33] T. Hayat, Q. Hussain, T. Javed, The modified decomposition method and Padé approximants for the MHD flow over a non-linear stretching sheet, Nonlinear. Anal. Real. World. Appl. 10 (2009)966-973. [34] M.M. Rashidi, The modified differential transform method for solving MHD boundary-layer equations, Comput. Phys. Commun. 180, (2009)2210-2217. [35] S. Abbasbandy, T. Hayat, Solution of the MHD Falkner-Skan flow by homotopy analysis method, 11 Commun. Nonlinear. Sci. Numer. Simulat. 14 (2009)3591-3598. [36] S. Abbasbandy, T. Hayat, Solution of the MHD FalknerSkan flow by HankelPadé method, Phys. Lett. A. 373 (2009)731-734. [37] B.y. Guo, J. Shen, J., C.l. Xu, Spectral and pseudospectral approximations using Hermite functions: application to the Dirac equation, Adv. Comput. Math. 19 1-3 (2003)35-55. [38] W. Bao, J. Shen, A generalized-Laguerre-Hermite pseudospectral method for computing symmetric and central vortex states in Bose-Einstein condensates, J. Comput. Phys. 227 23 (2008)9778-9793. [39] B.Y. Guo, C.L. Xu, Hermite pseudospectral method for nonlinear partial differential equations, Math. Model. Numer. Anal. 34 4 (2000)859-872. [40] J. Shen, L.L. Wang, Some Recent Advances on Spectral Methods for Unbounded Domains, Commun. Comput. Phys. 5 2-4 (2009)195-241. [41] G. Szegö. Orthogonal Polynomials, 4th edition, volume 23. AMS Coll. Publ, 1975. [42] J. Shen, T. Tang, High Order Numerical Methods and Algorithms, Chinese Science Press, 2005. [43] J. Shen, T. Tang, L-L. Wang, Spectral Methods Algorithms, Analyses and Applications, Springer, First edition, 2010. [44] Y. Liu, L. Liu, T. Tang, The numerical computation of connecting orbits in dynamical systems: a rational spectral approach, J. Comput. Phys. 111 2 (1994)373-380. [45] T. Tang, The Hermite spectral method for Gaussian-type functions, SIAM. J. Sci. Comput. 14 3 (1993)594-606. [46] N.S. Asaithambi, A numerical method for the solution of the Falkner-Skan equation, Appl. Math. Comput. 81 2-3 (1997)259-264. 12 Table 1: The comparison of HFP approximate solution of f ′′ (0) with numerical results [46] when m=-3/5 M 5 10 15 20 50 N 20 15 15 15 20 k 2 2 1 1 2 l 1.658 1.296 1.089 1 1.336 Present method 4.60075494 9.80646420 14.87167484 19.90393701 49.96165233 Numerical 4.60075494 9.80646420 14.87167484 19.90393701 49.96165233 Table 2: The comparison of HFP approximate solution of f ′′ (0) with numerical results [46] when m = 2 M 5 10 50 100 N 30 30 30 30 k 3 2 2 2 l 1.194 1.112 0.904 0.616 Present method 5.19095945 10.09677545 50.01944071 100.00972170 13 Numerical 5.19095945 10.09677545 50.01944071 100.00972170 Figure 1: The velocity boundary layer of the wedge with m = −3/5 and various M Figure 2: The velocity boundary layer of the wedge with m = 2 and various M 14 Figure 3: Logarithmic graph of absolute coefficients |ai | of Hermite functions in the approximate solution for m = −3/5 and M = 50 Figure 4: Logarithmic graph of absolute coefficients |ai | of Hermite functions in the approximate solution for m = 2 and M = 50 15
5cs.CE
arXiv:1611.01364v2 [cs.GT] 17 Jan 2018 A Generalization of the Minisum and Minimax Voting Methods Shankar N. Sivarajan Undergraduate, Department of Physics Indian Institute of Science Bangalore 560 012, India [email protected] Faculty Advisor: Prof. Y. Narahari Department of Computer Science and Automation Abstract In this paper, we propose a family of approval voting-schemes for electing committees based on the preferences of voters. In our schemes, we calculate the vector of distances of the possible committees from each of the ballots and, for a given p-norm, choose the one that minimizes the magnitude of the distance vector under that norm. The minisum and minimax methods suggested by previous authors and analyzed extensively in the literature naturally appear as special cases corresponding to p = 1 and p = ∞, respectively. Supported by examples, we suggest that using a small value of p, such as 2 or 3, provides a good compromise between the minisum and minimax voting methods with regard to the weightage given to approvals and disapprovals. For large but finite p, our method reduces to finding the committee that covers the maximum number of voters, and this is far superior to the minimax method which is prone to ties. We also discuss extensions of our methods to ternary voting. I. Introduction In this paper, we consider the problem of selecting a committee of k members out of n candidates based on preferences expressed by m voters. The most common way of conducting this election is to allow each voter to select his favorite candidate and vote for him/her, and we select the k candidates with the most number of votes. While this system is easy to understand and implement, upon scrutiny, there arise certain unfavorable aspects. Suppose we wish to elect a committee of size k = 1, and that there are two candidates, a Conservative A, and a Liberal B, with B expected to win. In this case, it is to candidate A’s benefit to introduce a candidate C whose ideology 1 is similar to that of candidate B in order to draw votes away from B, thereby ensuring his own victory. This may be accomplished in practice by providing campaign funding, for example. This is illustrated by the following example. Assume the preferences of the voters for the various candidates are as indicated in Table 1. The first entry (A, B, C) = 30% means that 30% of the voters rank the candidates in decreasing order of preference as A followed by B, and then by C. As a result of these preferences, in an election between candidates A and B alone, B would win 56% of the votes. But in a three-way election, A would win, with the votes distributed as in Table 2. Similar problems can arise in the selection of committees with k > 1 as well. Preference vector (A, B, C) (A, C, B) (B, A, C) (B, C, A) (C, A, B) (C, B, A) Percentage of votes 30 10 6 25 4 25 Table 1: Example of a ballot with full preference list indicated. Candidate A B C Percentage of votes 40 31 29 Table 2: The ballot from Table 1 with only the top preference indicated. One way to counteract this is to conduct preliminary elections within the party, in our case the Liberals, to select candidate B to represent them, and then conducting an election between candidates A and B. But we seek methods to make a decision based on a single election. The reason candidate B is preferable to A is that if we compare the two of them, a larger percentage of the voters would prefer B. In fact, if we compare any two candidates, B is preferred. This type of candidate is called a Condorcet winner, and this criterion, that she be preferred by a majority in any pairwise comparison is called the Condorcet criterion. However, every election need not have a Condorcet winner. A voting method that uses the Condorcet criterion to select a winner is called a Condorcet method. To check whether the Condorcet criterion is satisfied, we may ask each voter to supply his/her full list of preferences, as in Table 1, and if there is a Condorcet winner, we can elect her to the committee. However, if there is no Condorcet winner, we still need a method to choose the winner. We can compare the 2 candidates pairwise and choose the candidate who wins the most pairwise comparisons, and this is called the Copeland Method. To elect a single winner, we can also use approval voting [1]. We ask each voter to approve two candidates, and we select the candidate with the most number of approvals. In our example, assuming that each voter approves of his top two preferences, A is approved by 50% of the voters, B is approved by 86%, and C, by 64%. This elects candidate B, as desired. Approval voting is not a Condorcet method, in general. However, in large elections with, say, a million voters, and about twenty candidates, it is impractical to require the voters to provide a full list of preferences, and hence Condercet or Copeland methods are infeasible but approval voting is eminently feasible. Motivated by this feature, and also because it is amenable to the analytical methods we employ, we consider only approval voting and some of its variants in this paper. II. Shortcomings of the Minisum and Minimax Voting Methods Suppose we have to elect a committee of k representatives from a pool of n candidates. Further, suppose there are m voters and each of them can approve of an arbitrary number of candidates. We will consider the example used in [3] shown in Table 3. In this case n = 5, m = 4 and k = 2. We represent the ballot of voter 1 by the n-dimensional binary vector (1, 1, 0, 0, 1), and similarly for all the other voters. 1 2 3 4 A 1 1 1 0 B 1 1 1 0 C 0 0 1 1 D 0 0 1 1 E 1 0 0 1 Table 3: The example from [3] showing the approvals of the voters 1, 2 . . . 4 for the candidates A, B . . . E. An approval is indicated by a “1”. Now, we wish to select a committee of size k = 2, and the most common method is called the minisum method. This means we simply select the top k candidates with the most votes, in this case A and B. Like ballots, we also represent committees by binary vectors of length n with a 1 denoting membership in the committee. Thus we represent the committee consisting of A and B by the binary vector (1, 1, 0, 0, 0). This method is called the minisum strategy because, if you take the Hamming distances of this committee-vector to each of the m ballot-vectors, in this case 1, 0, 2, 5, and add them, this is the committee vector that minimizes this sum. We now prove this result. 3 Let the candidates be numbered from 1 to n, and let the number of approvals for them be a1 , a2 , . . . an , respectively. Without loss of generality, assume a1 ≥ a2 ≥ . . . ≥ an . Let the committee that minimizes the sum of Hamming distances be (i1 , i2 , . . . ik ). This minimum value is equal to (a1 + a2 + . . . + an ) − (ai1 + ai2 + . . . aik ), which, neglecting ties for the k th position, is obviously minimized when (i1 , i2 , . . . ik ) = (1, 2, . . . k). This result allows us to consider the problem of finding the minisum committee as an optimization problem since we have a computable number, the sum of Hamming distances, that enables us to compare any two committees and choose the better one. But this method does not weigh disapprovals enough (as seen earlier in Table 2) and so, a method called the minimax was introduced [6]. This method chooses the committee which minimizes the maximum Hamming distance to the ballots. Under this, we elect the committee of A and C, i.e., the vector (1, 0, 1, 0, 0). We will demonstrate the inadequacies of these methods bv considering the example in Table 4, with m = 1000 voters to elect a committee of k = 2 members. We name the n = 4 candidates A1 , A2 , B1 and B2 to indicate the correlation of ballots between candidates A1 and A2 and between B1 and B2 . For simplicity, in the rest of the paper, we restrict each of the voters to approve the same number of candidates as the size of the committee, in this case, two. Candidate pair {A1 , A2 } {A1 , B1 } {A1 , B2 } {A2 , B1 } {A2 , B2 } {B1 , B2 } Votes 500 100 10 20 20 350 Table 4: An example of a ballot which exhibits correlations of votes, possibly between candidates with the same ideology. Using the minisum method, we would elect candidates A1 and A2 , as they have the most number of approvals, as shown in Table 5. However, this leaves 35% of the voters without either of their choices in the committee. The minimax method  is even worse because it does not narrow the choices at all; all of the nk = 42 = 6 committees yield the same minimax distance and it results in all ballots tied at a Hamming distance of 4. Such tie is almost certain whenever the number of voters is large but the number of possible committees is small. For example, when there are a million voters and a committee of size 2 to be chosen from 10 candidates, it is highly likely that there is one of the million 4 Candidate A1 A2 B1 B2 Number of approvals 500 + 100 + 10 = 610 500 + 20 + 20 = 540 100 + 20 + 350 = 470 10 + 20 + 350 = 380 Table 5: The number of approvals per candidate, using the ballots from Table 4.  voters who is against both candidates in every possible one of the 10 = 45 2 committees. In this case, the minimax method will yield the same minimax distance of 4 for every one of the 45 possible committees. Related papers [2, 3] do not elaborate upon this shortcoming but instead focus on efficient computation of the minimax solution. Another problem with the minimax method is that it weighs disapprovals too highly. A single voter can change the outcome of the entire election. Suppose 1000 voters are choosing a committee of size two from four candidates, {A1 , A2 , B1 , B2 }. Further suppose that the first 998 vote for A1 , A2 , the 999th voter for {A1 , B2 } and the 1000th voter for {B1 , B2 }. Then the maximum distance to {A1 , A2 } is 4 due to the 1000th voter’s ballot, but the maximum distance to {A1 , B2 } is only two, and therefore the minimax method elects the committee {A1 , B2 }. Candidate A2 who was approved by 998 of the 1000 voters is not in the committee! An intuitively superior choice for the committee based on the ballots in Table 4 would be {A1 , B1 }, where 98% of the voters get at least one of their choices on the committee. This seems fairer because a committee where I get one choice and you get one choice should be preferred over another committee where one of us gets two choices, and the other none. The minisum method does not prefer one of these committees over the other but we will now demonstrate a method that does so, and chooses the committee {A1 , B1 } in this example. III. The p-norm Minimization Method We represent each of the possible committees as a binary vector (c1 , c2 , . . . , cn ) with ci = 1 if candidate i is in the committee. Each of the m approval ballots is a vector of the same form, (b1 , b2 , . . . , bn ). For each candidate committeevector, we calculate the vector of Hamming distances of the ballot-vectors from it. This vector has size m, the number of voters. The components of this vector of Hamming distances are all even (This is a property of binary vectors of equal 1-norm.) In the case of the committee {A1 , A2 }, this vector will have a 1000 components, with 500 of these being 0, 150 of these being 2, and 350 of these being 4. For each of the candidate committee-vectors, this distance information is summarized in Table 6. Suppose for a certain committee, the number of ballots at a Hamming dis- 5 Committee {A1 , A2 } {A1 , B1 } {A1 , B2 } {A2 , B1 } {A2 , B2 } {B1 , B2 } # of ballots at distance 0 500 100 10 20 20 350 # of ballots at distance 2 150 880 970 970 880 150 # of ballots at distance 4 350 20 20 10 100 500 Table 6: Number of ballots at different distances from the possible committees, using the ballots from Table 4. tance of i is νi . The p-norm of the Hamming distance vector for this committee is, therefore, !1/p X p . νi · i i We then find the committee that minimizes this p-norm. We investigate the result of using intermediate values of p in Table 7. Minimizing the 1-norm yields the same solution as minisum; minimizing the ∞-norm yields the same solution as minimax. Notice that as the value of p → ∞, the value of the distance tends to 4, the maximum Hamming distance. Committee {A1 , A2 } {A1 , B1 } {A1 , B2 } {A2 , B1 } {A2 , B2 } {B1 , B2 } 1 1700 1840 2020 1980 2160 2300 Value of p in 2 3 78.74 28.68 61.97 20.26 64.81 20.83 63.56 20.33 71.55 23.78 92.74 32.14 the p-norm 4 10 17.42 7.19 11.77 5.42 11.99 5.42 11.60 5.08 14.11 6.34 19.00 7.45 100 4.24 4.12 4.12 4.09 4.19 4.26 Table 7: p-norm of the m-vector for all the possible committees for different values of p, using the ballots from Table 4. The value in bold is the minimizer for its column. At higher values of p, the number of voters who have not voted for a given committee is weighted higher, compared to the number of voters who have voted for at least one member of the committee. We suggest that using this method, choosing a small value of p such as 2 or 3, is a good compromise between the minisum and minimax solution, since it weighs disapprovals more than minisum, but is much less likely to tie than minimax.1 1 The p-norm method will produce a tie for finite p, if the number of ballots at each distance 6 Note that for p, equal to 2 or 3, this method chooses the committee {A1 , B1 }, which contains at least one choice of 98% of the voters. This is the intuitively superior choice we identified earlier. It is clear that this method generalizes for larger values of k, the committee size, with the distances ranging across all the even integers from 0 to 2k, assuming n ≥ 2k. Maximum Coverage Problem (p → ∞) In this example, note that the optimal solution for p ≥ 3 always produces the committee {A2 , B1 }. Observe that this is the committee with the least number of voters who did not approve of any member in it, i.e., 1%. It is easy to show this is true in general: For sufficiently large but finite p, the p-norm method produces the solution with the least number of voters at distance 2k, and therefore the committee with the “maximum coverage”. Intuitively, this method corresponds to weighing disapprovals more than approvals. Let the committees C and C ′ have νi and νi′ voters respectively at a Hamming distance of i. Let the p-norm of the vector of Hamming distances from C be ||C||p . Since  2k P ||C||p = lim i=0 p→∞ ||C ′ ||p p→∞ 2k P lim i=0 νi · i p νi′ · ip 1/p 1/p  2k P = lim i=0 p→∞ 2k P i=0 νi · νi′ ·  i p 2k i 2k p 1/p 1/p =  ν2k ′ ν2k 1/p , we see that for sufficiently large p, the committee with minimum p-norm is the one which has the minimum number of voters at distance 2k. This committee minimizes the number of voters who disapprove of every one of its members, and thereby maximizes the number of voters who approve of at least one of its members. We can intuitively think of the Maximum Cover method as minimizing disapprovals, and in that sense, the other extreme of minisum, which maximizes approvals. The maximum coverage problem [4] is a classic question in computer science and computational complexity theory, and in its standard form, it is phrased as follows: You are given several overlapping sets and a number k. You must choose at most k of the sets such that the union of the selected sets is of maximum size. The voting problem can be interpreted as an adaptation of this. The sets we are given are the voters who approved of a particular candidate. We are to is the same for two candidate committees. In this case, there will be a tie between these two committees for all values of p. This is much less likely than a tie in the minimax case where two committees will be tied if there one ballot at the maximum possible distance from each of them. 7 choose k candidates in order to maximize the number of voters with at least one of their approved candidates on the committee. We will treat our example in Table 4 as an instance of this problem. It is easy to see that the maximum cover in this case will be the committee {A2 , B1 }, covering 99% of the voters. This is the same result when p is large but finite. While it is known that the maximum coverage problem is NP-hard,  if the committee size k is small, the number of possible committees, nk is also modest, and the NP-hardness of the maximum cover problem does not pose a computational problem. In such cases, the maximum cover committee can be computed exactly as we have done. There may be many elections where this is true and where the maximum cover committee can be computed without undue effort. For example, one could consider electing both the senators from a US state2 from a set of aspirants through state-wide approval voting, and choosing the maximum cover committee. It is known that the greedy algorithm is often a good approximation to the solution of the maximum coverage problem. [7]. Further, the greedy algorithm is computationally simpler than calculating the Hamming distance vector for each of the possible committees, and minimizing the p-norm. Therefore, the greedy algorithm applied to the problem of ensuring that the maximum number of voters get at least one of their approved candidates on the committee can be a computationally efficient, as well as reasonable, voting method, if the committee size k is so large that the maxiumum cover problem cannot be solved exactly. Applying the greedy algorithm to the example in Table 4, the first candidate we choose is A1 , since we can cover 61% of the voters with this. After choosing A1 , we can cover the most number of additional voters by choosing B1 , yielding the committee {A1 , B1 }. This is the same result we get with the p-norm minimization method, with p = 2 and p = 3. The case where p → 0 We now investigate the effect of letting p → 0. In this case, it is the number of votes that the committee as a whole wins that matters, and not the number of votes of each of the constituent members. This can be shown using the same technique we used in the case of p → ∞. Using the same notation as before, we get  2k 1/p P p  1/p νi · i m − ν0 ||C||p i=0 = lim = lim . 1/p p→0 ||C ′ ||p p→0  P m − ν0′ 2k ′ νi · i p i=0 So this method chooses the committee with the least value of m − ν0 or the committee with the highest value of ν0 , namely approvals. In the previous 2 This would require amending the class system where each senator from a state is elected for different but overlapping terms. 8 example from Table 4, the result with p = 1 coincides with the one with p → 0; we will therefore use a different example which is shown in Table 8. Candidate pair {A1 , A2 } {A1 , B1 } {A1 , B2 } {A2 , B1 } {A2 , B2 } {B1 , B2 } Votes 300 250 150 40 60 200 Table 8: An example of a ballot to demonstrate the result of p → 0. We can see that the candidates with the most votes are A1 and B1 , as shown in Table 9, and according to the minisum method, i.e., with p = 1, the committee that will be elected is {A1 , B1 }. However, reducing the value of p, we see, from Table 10 that the elected committee changes to {A1 , A2 }, the pair that obtained the most votes, even though candidate A2 received the fewest number of votes in total. Candidate A1 A2 B1 B2 Number of approvals 300 + 250 + 150 = 700 300 + 40 + 60 = 400 250 + 40 + 200 = 490 150 + 60 + 200 = 410 Table 9: The number of approvals per candidate, using the ballots from Table 8. IV. Ternary Voting It has not escaped our notice that this method of choosing the committee that minimizes the p-norm of the vector of Hamming distances to the ballots, can be generalized to include ternary voting [5]. In this form of election, the voters can express their opinion about a fixed number of candidates, each of whom can either be approved (represented by a 1) or rejected (represented by a −1). Consider the example from Table 1 and let the voters be allowed two opinions or non-zero entries. The voters who have preference vector (A, B, C) have three ways to express their preference using ternary voting, namely, (1, 1, 0), (1, 0, −1), or (0, −1, −1). In the case of only three representatives, the voters can actually indicate their full preference vector through ternary voting, but with more candidates, 3 Strictly speaking, this should not be termed a norm for p < 1 since the triangle inequality is reversed. 9 Committee {A1 , A2 } {A1 , B1 } {A1 , B2 } {A2 , B1 } {A2 , B2 } {B1 , B2 } 1 1800 1620 1780 2220 2380 2200 Value of p in the p-norm 0.5 0.1 0.001 1107.11 765.63 700.62 1095.81 808.45 750.56 1225.51 914.08 850.62 1445.51 1040.44 960.77 1475.81 1026.70 940.83 1307.11 880.50 800.76 Table 10: p-norm3 of the m-vector, raised to the power p, for all the possible committees, for different values of p, using the ballots from Table 8. We raise the p-norm to the power p to keep the values bounded for small p. The value in bold is the minimizer for its column. the full preference list is too complex to express. Moreover, it may be that the voter is actually neutral about most of the candidates, but rejects a few, and this form of ternary voting allows them to express this. Under ternary voting, we need to replace the Hamming distance between a candidate committee, (c1 , c2 , . . . , cn ) and a ballot, (b1 , b2 , . . . , bn ) by some suitable metric. Since the Hamming metric corresponds to the L1 -metric, namely, P n i=1 |ci − bi |, it is natural to consider the same metric under ternary voting. However, we must revise our vector representation of the committees. If we represent the hypothetical committee consisting of the first two out of four candidates as (1, 1, 0, 0), then the distance to the ballot (1, 1, 0, 0) will be 0, whereas the distance to the ballot (0, 0, −1, −1) will be 4. This is a bad model since a voter disapproving of the last two candidates is implicitly approving the first two. Therefore, this candidate committee is better represented by (1, 1, −1, −1) in which case the distance to both the ballots will be 2, in accordance with our intuition. Our generalization of approval voting from binary to ternary voting, to elect a committee of size k from n candidates, is the following. We represent each of the possible committees as a ternary vector (c1 , c2 , . . . , cn ) with ci = 1 if candidate i is in the committee, and ci = −1, otherwise. Each of the m approval ballots is a ternary vector (b1 , b2 , . . . , bn ) where bi = 1 if the voter approves candidate i, bi = −1 if the voter rejects candidate i, and bi = 0 otherwise (the voter has no opinion). Each voter must express k opinions and therefore make k entries in his ballot as 1 or −1; the rest of the entries must be zero. For the sake of mathematical simplicity (or elegance!), we have arbitrarily chosen to weigh approvals and rejections equally—a voter uses up one choice to approve a candidate, or to reject a candidate. It is interesting to ask what the properties of the p-norm committees are, for various values of p, under ternary voting. Suppose candidate i has ai approvals, ri rejections, and ni = m − ai − ri neutral votes. Then, candidate i contributes ni + 2ri = m − ai − ri + 2ri = m − (ai − ri ) 10 to the 1-norm if he is in the committee, and ni + 2ai = m − ai − ri + 2ai = m + (ai − ri ) if he is not in the committee. Therefore, the minimum 1-norm committee consists of the k candidates with the k least values of m − (ai − ri ), or equivalently, the k highest values of ai − ri . This is an intuitively pleasing extension of the minisum method to ternary voting: the 1-norm committee minimizes the sum of the net approvals of its members, when rejections (explicit disapprovals) are allowed. Similarly, we can extend our result of maximum coverage to ternary voting as well. Suppose we wish to elect a committee of k members from a set of n. Let each voter choose k candidates to either approve or reject. We see that the L1 -distance from the committees to the ballots ranges from n − k to n + k, and using the same method as before, we see that as p → ∞, the committee that is selected is the one with the least number of ballots at distance n + k. It is clear that a ballot is only at this distance when none of the candidates that are approved are on the committee, and all the candidates that are rejected are on the committee. Therefore, in the context of the Maximum Coverage Problem, we consider a voter to be covered if any of the candidates he approves is on the committee, or if any of the candidates he rejects is not on the committee. Then, in this case also, choosing the committee that covers the maximum number of voters is better than using the minimax method because of the preponderance of ties that arise using the latter method. We conclude this section with an example. Consider the example of Table 4 but with one change: the 500 voters who approved {A1 , A2 } now choose to approve A1 and reject B1 . Perhaps B1 evokes strong emotions and the votaries of A1 and A2 would prefer to sacrifice approving A2 and instead reject B1 . All other votes remain the same. The results of this election are shown in Table 11 for various values of the p-norm. Committee {A1 , A2 } {A1 , B1 } {A1 , B2 } {A2 , B1 } {A2 , B2 } {B1 , B2 } 1 3700 3840 3020 4980 4160 4300 Value 2 130.38 123.29 101.39 161.12 133.27 147.65 of p in the p-norm 3 4 10 44.68 26.59 10.79 39.46 22.42 8.57 33.76 19.82 8.38 51.97 29.73 11.21 42.74 24.41 9.65 49.38 28.84 11.18 100 6.36 6.18 6.18 6.39 6.28 6.38 Table 11: p-norm of the m-vector for all the possible committees for different values of p, under ternary voting, using the ballots from Table 4 except that the 500 voters who approved A1 and A2 now choose to approve A1 and reject B1 . The value in bold is the minimizer for its column. For every value of p, the committee elected is {A1 , B2 }. Compare this result 11 with Table 7 where this particular committee is not elected for any value of p. Moreover, B1 was elected in the binary case for all p ≥ 2 but is never elected in this ternary case. The option to reject a candidate, as opposed to approve another candidate, can dramatically change the result of an election! V. Summary We see that all three known approval voting methods—the committee with the most approvals, the minisum committee and the minimax committee—are all special cases of our p-norm method for p → 0, p = 1 and p → ∞ respectively. However, using an intermediate value of p such as 2 or 3 is probably a better choice than any of these methods as a compromise between approvals and disapprovals. The minimax method is particularly unsuitable for this type of election given the preponderance of ties, especially when the number of voters is large, and should be logically replaced by the Maximum Cover method, which too is a special case of our p-norm method for large, but finite, p, and intuitively corresponds to minimizing disapprovals. We also showed that our p-norm method can be generalized to the problem of ternary voting, and the interpretations of the results when p = 1 and p → ∞ are natural analogs of the binary case. Acknowledgement I would like to thank Professor Y. Narahari for giving me the opportunity to work on this summer project, and Palash Dey for his guidance. I would also like to acknowledge the KVPY program at IISc for enabling me to pursue a research-oriented undergraduate program. I would like to thank the anonymous referee for his or her insightful review, and both the referee and the editor for their thoughtful suggestions that have improved this paper. References [1] S. J. Brams, Approval voting, in The Encyclopedia of Public Choice, C. K. Rowley and F. Schneider, eds., Springer US, 2004, pp. 344–346. [2] S. J. Brams, D. M. Kilgour, and M. R. Sanver, A minimax procedure for electing committees, Public Choice, 132 (2007), pp. 401–420. [3] I. Caragiannis, D. Kalaitzis, and E. Markakis, Approximation algorithms and mechanism design for minimax approval voting, in AAAI Conference on Artificial Intelligence, 2010. [4] R. Cohen and L. Katzir, The generalized maximum coverage problem, Inf. Process. Lett., 108 (2008), pp. 15–22. 12 [5] D. S. Felsenthal and M. Machover, Ternary voting games, Int. J. Game Theory, 26 (1997), pp. 335–351. [6] R. LeGrand, E. Markakis, and A. Mehta, Some results on approximating the minimax solution in approval voting, in Proceedings of the 6th International Joint Conference on Autonomous Agents and Multiagent Systems, AAMAS ’07, ACM, 2007, pp. 198:1–198:3. [7] G. Nemhauser, L. Wolsey, and M. Fisher, An analysis of approximations for maximizing submodular set functions – i, Mathematical Programming, 14 (1978), pp. 265–294. 13
8cs.DS
Provable Burer-Monteiro factorization for a class of norm-constrained matrix problems Dohyung Park1 , Anastasios Kyrillidis1 , Srinadh Bhojanapalli2 Constantine Caramanis1 , and Sujay Sanghavi1 arXiv:1606.01316v3 [stat.ML] 1 Oct 2016 1 The University of Texas at Austin {dhpark, anastasios, constantine}@utexas.edu, [email protected] 2 Toyota Technological Institute at Chicago [email protected] October 4, 2016 Abstract We study the projected gradient descent method on low-rank matrix problems with a strongly convex objective. We use the Burer-Monteiro factorization approach to implicitly enforce lowrankness; such factorization introduces non-convexity in the objective. We focus on constraint sets that include both positive semi-definite (PSD) constraints and specific matrix norm-constraints. Such criteria appear in quantum state tomography and phase retrieval applications. We show that non-convex projected gradient descent favors local linear convergence in the factored space. We build our theory on a novel descent lemma, that non-trivially extends recent results on the unconstrained problem. The resulting algorithm is Projected Factored Gradient Descent, abbreviated as ProjFGD, and shows superior performance compared to state of the art on quantum state tomography and sparse phase retrieval applications. 1 Introduction We consider matrix problems of the form: min X∈Rn×n f (X) subject to X  0, X ∈ C 0 . (1) f is assumed to be strongly convex and have Lipschitz continuous gradients. The constraint set contains PSD and additional C 0 ⊆ Rn×n convex constraints on X. There are several algorithmic solutions for (1), operating on the variable space X ∈ Rn×n . We mention [27, 7, 4, 9, 45, 32, 30, 28, 43, 24, 47, 34, 6, 13, 5, 17, 46] and point to references therein. Most of these schemes focus on the matrix sensing / matrix completion problem, and, thus, are designed for specific instances of f . Moreover, the majority does not directly handle additional constraints. More importantly, these methods often involve computationally expensive eigen-value/vector computations –at least once per iteration– in order to satisfy the PSD constraint. This constitutes their computational bottleneck in large-scale settings. Thus, it is desirable to find algorithms that scale well in practice. 1 Our approach. One way to avoid this is by positive semi-definite factorization X = U U > . In particular, we solve instances of (1) in the factored form as follows: minimize f (U U > ) subject to U ∈ C. U ∈Rn×r (2) This parametrization, popularized by Burer and Monteiro [11, 12], naturally encodes the PSD constraint, removing the expensive eigen-decomposition projection step. r can be set to rank(X ? ) := r? , where X ? is the optimal solution to (1), but is often set to be much smaller than r? : in that case, factor U ∈ Rn×r contains much less variables to maintain and optimize than X = U U > . Thus, such parametrization also makes it easier to update and store the iterates U . By construction, the U U > is a PSD solution, which could also be low-rank. C ⊆ Rn×r is a compact convex set, that models well C 0 in (1). While in practice we can assume any such constraint C with tractable Euclidean projection operator1 , in our theory we mostly focus on sets C that satisfy the following assumption. Assumption 1.1. For X  0, there is U ∈ Rn×r and r ≤ n such that X = U U > . Then, C 0 ∈ Rn×n is endowed with constraint set C ⊆ Rn×r that (i) for each X ∈ C 0 , there is an subset in C where each U ∈ C satisfies X = U U > (see Section 3.1 for more details), and (ii) its projection operator, say ΠC (V ) for V ∈ Rn×r , is an entrywise scaling operation on the input V . Part (i) in Assumption 1.1 is required in our analysis in order to claim convergence also in the X space, through the factored U space. In other case, our theory still leads just to convergence in U . We defer this discussion to Section 3. Criteria of the form (1) appear in applications from diverse research fields. As an exemplar, consider density matrix estimation of quantum systems [1, 23, 29], where C 0 is defined as Tr(X) ≤ 1 and satisfies Assumption 1.1. We also experimentally consider problems that only approximately satisfy the above assumption, such as sparse phase retrieval applications [26, 42, 38], and sparse PCA [31]: in these cases, C 0 contains `1 -norm constraints on X; see Section 4 for more details. Contributions. Our aim is to broaden the results on efficient, non-convex recovery for constrained low-rank matrix problems. Our developments maintain a connection with analogous results in convex optimization, where standard assumptions are made: we consider the common case where f is (restricted) smooth and (restricted) strongly convex [2]. We provide experimental results for two important tasks in physical sciences: quantum state density estimation and sparse phase retrieval. Some highlights of our results are the following: • A key property for proving convergence in convex optimization is the notion of descent. I.e., given current, next and optimal points in the X space, say Xt , Xt+1 , X ? , respectively, and the recursion Xt+1 = Xt − η∇f (Xt ), the condition hXt − Xt+1 , Xt − X ? i ≥ C –where C > 0 depends on the gradient norm– implies that Xt+1 “moves" towards the correct direction.2 In this work, we present a novel descent lemma that non-trivially extends such conditions for the constrained case in (2), under the assumptions mentioned above. We hope that this result will trigger more attempts towards more generic convex sets. • We propose ProjFGD, a non-convex projected gradient descent algorithm that solves instances of (2). ProjFGD has favorable local convergence guarantees when f is (restricted) smooth and (restricted) strongly convex. We also present an initialization procedure with guarantees in the supplementary material. In general, one could artificially introduce a constraint C in (2) –even when no C 0 constraint is present in (1)– for better interpretation of results. 2 To see this, observe that X ? − Xt is the best possible direction to follow, while Xt − Xt+1 is the direction we actually follow. Then, such a condition implies that there is a non-trivial positive correlation between these two directions. 1 2 • Finally, we extensively study the performance of ProjFGD on two problem cases: (i) quantum state tomography and (ii) sparse phase retrieval. Our findings show significant acceleration when ProjFGD is used, as compared to state of the art. 1.1 Related work The work of [18] proposes a first-order algorithm for (2), where the nature of C is more generic, and depends on the problem at hand. The authors provided a set of conditions (local descent, local Lipschitz, and local smoothness) under which one can prove convergence to an ε-close solution with O(1/ε) or O(log(1/ε)) iterations. While the convergence proof is general, checking whether the three conditions hold is a non-trivial problem and requires different analysis for each problem. We believe this paper complements [18]: in the latter, the closest to our constraints are these of “max-norm" incoherence constraints; however, in our case, the objective function needs to only satisfy standard strongly convex and smoothness assumptions. [8] proposes the Factored Gradient Descent (FGD) algorithm for (2), where C ≡ Rn×r . FGD is also a first-order scheme. Key ingredient for convergence is a novel step size selection that can be used for any f , as long as it is Lipschitz gradient smooth (and strongly convex for faster convergence). However, [8] cannot accommodate any constraints on U . Concurrently, [48] presents a new analysis that handles non-square cases in (2). In that case, we look for a factorization X = U V > ∈ Rn×p . The idea is based on the inexact first-order oracle, previously used in [3]. Similarly to [8], the proposed theory does not handle any constraints. Roadmap. Section 2 contains some basic definitions and assumptions that are repeatedly used in the main text. Section 3 describes ProjFGD and its theoretical guarantees. In Section 4, we motivate the necessity of ProjFGD via some applications; due to space limitations, only one application is described in the main text (the second application is included in the supplementary material). This paper concludes with a discussion on future directions in Section 5. Supplementary material contains further experiments, all proofs of theorems in main text, and a proposed initialization procedure. 2 Preliminaries  Notation. For matrices X, Y ∈ Rn×n , hX, Y i = Tr X > Y represents their inner product. X  0 denotes X is a positive semi-definite (PSD) matrix. We use kXkF and σ1 (X) for the Frobenius and spectral norms of a matrix, respectively; we also use kXk2 to denote the spectral norm. Moreover, we denote as σi (X) the i-th singular value of X. Xr denotes the best rank-r approximation  of X. For X > > > > such that X = U U , the gradient of f with respect to U is ∇f (U U ) + ∇f (U U ) U . If f is also symmetric, i.e., f (X) = f (X > ), then ∇f (X) = 2∇f (X) · U . An important issue in optimizing f over the factored space is the existence of non-unique possible factorizations. We use the following rotation invariant distance metric: Definition 2.1. Let matrices U, V ∈ Rn×r . Define: Dist (U, V ) := min kU − V RkF , R:R∈O where O is the set of r × r orthonormal matrices R. Assumptions. We consider applications that can be described by strongly convex functions f with gradient Lipschitz continuity.3 We state these standard definitions below for the square case. 3 Our ideas can be extended in a similar fashion to the case of restricted smoothness and restricted strong convexity [2]. 3 Definition 2.2. Let f : Rn×n → R be convex and differentiable. f is µ-strongly convex if ∀X, Y ∈ Rn×n f (Y ) ≥ f (X) + h∇f (X) , Y − Xi + µ 2 kY − Xk2F . (3) Definition 2.3. Let f : Rn×p → R be a convex differentiable function. f is gradient Lipschitz continuous with parameter L (or L-smooth) if ∀X, Y ∈ Rn×n k∇f (X) − ∇f (Y )kF ≤ L · kX − Y kF . (4) For our proofs, we will also make the faithfulness assumption, as in [18]: Definition Let E denote the set of equivalent factorizations that lead to a rank-r matrix X ? ∈ Rn×n ;  2.4. ? i.e., E := U ∈ Rn×r : X ? = U ? U ?> . Then, we assume E ⊆ C, i.e., the resulting convex set C in (2) (from C 0 in (1)) respects the structure of E. This assumption is necessary for arguments regarding the quality of solution obtained in the factored U space, w.r.t. the original X space. 3 The Projected Factored Gradient Descent (ProjFGD) algorithm Let us first describe the ProjFGD algorithm, a projected, first-order scheme. The discussion in this part holds for any constraint set C; later in the text, in order to obtain theoretical guarantees, we make further assumptions—such as Assumption 1.1. The pseudocode is provided in Algorithm 1. Let ΠC (V ) denote the projection of an input matrix V ∈ Rn×r onto the convex set C. For initialization, the starting point is computed as follows: we first compute X0 := 1/Lb · Π+ (−∇f (0)), where Π+ (·) denotes the projection onto the set of PSD matrices b represents an approximation of L. Then, ProjFGD requires a top-r SVD calculation, only once, and L   n×r > e0 , in e e e e to compute U0 ∈ R , such that X0 = U0 U0 ; using U0 , the initial point U0 satisfies U0 = ΠC U order to accommodate constraints C. The main iteration of ProjFGD applies the simple rule:   Ut+1 = ΠC Ut − η∇f (Ut Ut> ) · Ut , with step size: η≤ 1 . 128(LkX0 k2 +k∇f (X0 )k2 ) (5) b to approximate L. Here, one can use L Key ingredients to achieve provable convergence are initialization–so that initial point U0 leads to Dist(U0 , U ? ) sufficiently small– and the step size selection. For the initialization, apart from the procedure mentioned above, we could also use more specialized spectral methods –see [18, 49]– or even run algorithms on (1) for only a few iterations –this requires further full or truncated SVDs [44]. The discussion regarding our initialization and what type of guarantees one obtains is deferred to the supplementary material. 3.1 When constrained non-convex problems can be scary? In stark contrast to the convex projected gradient descent method, proving convergence guarantees for (2) is not a straightforward task. First, if we are interested in quantifying the quality of the solution in the factored space w.r.t. X ? , C should be faithful, according to Definition 2.4. Furthermore, there should exist a mapping U 7→ X that relates the constraint set C 0 , in the original variable space (see (1)), 4 Algorithm 1 ProjFGD method 1: Input: Function f , target rank r, # iterations T . b · Π+ (−∇f (0)). 2: Compute X0 := 1/L n×r e e e> 3: Set U0 ∈ R such that  X0 = U0 U0 . e0 . 4: Compute U0 = ΠC U Set step size η as in (5). for t = 0 to T − 1 do  7: Ut+1 = ΠC Ut − η∇f (Ut Ut> ) · Ut . 8: end for 9: Output: X = UT UT> . 5: 6: to the factored one C (see (2)). In that case, claims about convergence to a point U ? , in the factored space, can be “transformed" into claims about convergence to a point close to X ? , in the original space, that also satisfies the constraints. This is the case for the following constraint case: for any X = U U > , Tr(X) ≤ λ ⇔ kU k2F ≤ λ, and, thus, satisfying kU k2F ≤ λ, for any U , guarantees that Tr(X) ≤ λ for X = U U > . Apart from the example above, other characteristic cases include Schatten norms. 0 ∈ Rn×n : kXk1 ≤ λ0 }, where, kXk1 = P Contrary to this example, consider the case C := {X n×r : kU k ≤ λ}, for λ, λ0 > 0; however, 1 ij |Xij |. A natural choice for C would be C := {U ∈ R depending on the selection of λ, points in U ∈ C might result into points X = U U > that X 6∈ C 0 . In this case, U ? of (2) could be 6∈ E and, thus, convergence guarantees to U ? might have no meaning in the convergence in X space. However, as we show in Section 6.1, in this case C “simulates" well C 0 : if U is sparse enough, then X = U U > could also be sparse, so proper selection of λ plays a key role. Even in this case, ProjFGD performs competitively compared to state-of-the-art approaches. Second, the projection step itself complicates considerably the non-convex analysis, as we show in the supplementary material. In our theory, we focus on convex sets C that satisfy (6) where ΠC (V ) can be equivalently seen as scaling the input. E.g., when C ≡ {U ∈ Rn×r : kU kF ≤ λ}, ΠC (V ) = ξ(V ) · V where ξ(V ) := kVλkF , for V 6∈ C. Our theory highlights that, even for this simple case, proving convergence is not a straightforward task. 3.2 Theoretical guarantees of ProjFGD for C := {U ∈ Rm×r : kU kF ≤ λ} We provide theoretical guarantees for ProjFGD in the case where the constraint satisfies  V if V ∈ C, 2 1 ΠC (V ) = argmin 2 kU − V kF = ξ(V ) · V if V 6∈ C, U ∈C (6) i.e., the projection operation is an entry-wise scaling. Such settings include the Frobenius norm constraint C = {U ∈ Rm×r : kU kF ≤ λ}, which appears in quantum state tomography. Moreover, for this case, the constraint has one-to-one correspondence with the trace constraint in the original X space; thus any argument in the U space applies for the X space also. We assume the optimum X ? satisfies rank(X ? ) = r? . For our analysis, we will use the following step sizes: ηb = 1 , 128(LkXt k2 +kQUt Q> U ∇f (Xt )k2 ) ? 1 128(LkX ? k2 +k∇f (X ? )k2 ) , η = t where QA is a basis for column space of A. By Lemma A.5 in [8], we know that ηb ≥ 56 η and 10 ? 11 ? b: this is equivalent 11 η ≤ η ≤ 10 η . Due to such relationships, in our proof we will work with step size η –up to constants– to the original step size η, used in the algorithm. Thus, any results below will automatically imply similar results hold for η, by using the bounds between step sizes. 5 Theorem 3.1 ((Local) Convergence rate for restricted strongly convex and smooth f ). Let C ⊆ Rn×r be a convex, compact, and faithful set, with projection operator satisfying (6). Let Ut ∈ C be the current estimate and Xt = Ut Ut> . Assume current point Ut satisfies Dist(Ut , U ? ) ≤ ρ0 σr (U ? ), for (X ? ) 1 ρ0 := c · Lµ · σσr1 (X ? ) , c ≤ 200 , and given ξt (·) & 0.78 per iteration, the new estimate of ProjFGD,   Ut+1 = ΠC Ut − ηb∇f (Ut Ut> ) · Ut = ξt · Ut − ηb∇f (Ut Ut> ) · Ut satisfies (7) Dist(Ut+1 , U ? )2 ≤ α · Dist(Ut , U ? )2 , where α := 1 − µ·σr (X ? ) 550(LkX ? k2 +k∇f (X ? )k2 ) < 1. Further, Ut+1 satisfies Dist(Ut+1 , U ? ) ≤ ρ0 σr (U ? ). The complete proof of the theorem is provided in the supplementary material. The assumption Dist(Ut , U ? ) ≤ ρ0 σr (U ? ) only leads to a local convergence result. [18] provide some initialization procedures for different applications, where we can find an initial point U0 such that Dist(U0 , U ? ) ≤ ρ0 σr (U ? ) is satisfied. In the supplementary material, we present a similar generic initialization procedure that results in exact recovery of the optimum, under further assumptions. We borrow such procedure in Section 4 for our experiments. ξt (·) requirement. The assumption ξt (·) & 0.78 implies the iterates of ProjFGD (before the projection step) are retained relatively close to the set C.4 For some cases, this can be easily satisfied by setting the step size small enough, as indicated below; the proof can be found in Section 7. Corollary 3.2. If C = {U ∈ Rn×r : kU kF ≤ λ}, then ProjFGD inherently satisfies every t. I.e., it guarantees (7) without assumptions on ξt (·). 128 129 ≤ ξt (·) ≤ 1, for We conjecture that the lower bound on ξt (·) could possibly be improved with a different analysis. Key lemma. The proof of the above theorem primarily depends on the following “descent" lemma for ProjFGD. et+1 = Ut − ηb∇f (X > ) · Ut . For f L-smooth and µ-strongly convex, Lemma 3.3 (Descent lemma). Let U t and under the same assumptions with Theorem 3.1, the following inequality holds true: ? et+1 k2F ≥ 2b η ∇f (Ut Ut> ) · Ut , Ut − U ? RU + kUt+1 − U t ηb2 k∇f (Ut Ut> )Ut k2F + 3.3 3b ηµ 10 · σr (X ? ) · Dist(Ut , U ? )2 . Main differences with [8] In this subsection, we highlight the main differences with the analysis of [8]. As we already mentioned, the proof in [8] does not handle constraints. In particular, one key factor is the gradient at an optimal point does not vanish and thus the following descent lemma bound (Lemma 6.1 in [8]) does not hold: ? 2b η ∇f (Ut Ut> ) · Ut , Ut − U ? RU ≥ t 4b η2 > 2 3 k∇f (Ut Ut )Ut kF + 3b ηµ 20 · σr (X ? ) · Dist(Ut , U ? )2 . (8) To see this, in the unconstrained case, if Ut ≡ U ? (up to some rotation), the following holds for [8] ? 0 := 2b η ∇f (X ? ) · U ? , U ? − U ? RU ≥ t + 3b ηµ 20 · σr (X ? ) · Dist(U ? , U ? )2 =: 0, 4b η2 ? ? 2 3 k∇f (X )U kF since at the optimum we have ∇f (X ? )U ? = 0. When the latter does not hold, this descent lemma does not hold. As a simple example where this happens, consider the noisy matrix sensing setting: 4 Intuitively, we expect the estimates Ut , before the projection, to be further from C during the first steps of ProjFGD; as the number of iterations increases, the sequence of solutions gets closer to U ? and thus ξt (·) → 1. 6 Rank r = 1 - Samples m = 3 " n " r Rank r = 1 - Samples m = 3 " n " r AccUniPDGrad ProjFGD AccUniPDGrad ProjFGD Rank r = 20 - Samples m = 3 " n " r AccUniPDGrad ProjFGD 10 0 -2 200 400 600 10 -1 10 -2 10 20 30 0 10 -1 2000 4000 6000 8000 100001200014000 2000 4000 6000 8000 10000 12000 40 Cumulative time (sec) Cumulative time (sec) 10-2 -2 0 SparseApproxSDP 10 800 1000 Number of iterations 10 10-1 RSVP SparseApproxSDP b!X ? kF kX kX ? kF 10 b!X ? kF kX kX ? kF RSVP SparseApproxSDP b!X ?kF kX kX ? kF 10 -1 b!X ?kF kX kX ? kF 10-1 10 0 b!X ?kF kX kX ? kF -1 b!X ? kF kX kX ? kF 10 0 Number of iterations 200 400 10-2 600 Cumulative time (sec) 0 100 200 300 400 Cumulative time (sec) Figure 1: Left and middle panels: Convergence performance of algorithms under comparison w.r.t. ? b kX−X kF kX ? kF vs. (i) the total number of iterations (left) and (ii) the total execution time. Both cases correspond to Csam = 3, r = 1 (pure setting) and q = 12 (i.e., n = 4096). Right panel: Almost pure state (r = 20). Here, Csam = 3. y = A(X ? ) + w, where w is a non-negligible noise term. Then, for objective f (X) = ky − A(X)k22 , observe that ∇f (X ? ) = −2A∗ (y − A(X ? )) = −2A∗ (w) 6= 0, where A∗ is the adjoint operator for A. Finally, in [8], Lemma 6.3 (pp.23) assumes zero gradient at the optimum, while our Lemma 5.3 (supp.material) follows a different approach. 4 Applications We present two characteristic applications. For each application, we define the problem, enumerate state-of-the-art algorithms and provide numerical results. We refer the reader to Section 6 for additional experiments. 4.1 Quantum state tomography Building on Aaronson’s work on quantum state tomography (QST) [1], we are interested in learning the (almost) pure 5 q-bit state of a quantum system –known as the density matrix– via a limited set of measurements. In math terms, the problem can be cast as follows. Let us define the density matrix X ? ∈ Cn×n of a q-bit quantum system as an unknown Hermitian, positive semi-definite matrix that satisfies rank(X ? ) = r and is normalized as Tr(X ? ) = 1 [23]; here, n = 2q . Our task is to recover X ? from a set of QST measurements y ∈ Rm , m  n2 , that satisfy y = A(X ? ) + η. Here, (A(X ? ))i = Tr(Ei X ? ) and ηi can be modeled as independent, zero-mean normal variables. The operators Ei ∈ Rn×n are typically the tensor product of the 2 × 2 Pauli matrices6 [35]. The above lead to the following non-convex problem formulation7 : minimize kA(X) − yk2F X0 subject to rank(X) = r, Tr(X) ≤ 1. (10) 5 Purity is a structural property of the density matrix: A quantum systems is pure if its density matrix is rank one and, almost pure if it can be well-approximated by a low rank matrix. 6 [35] showed that, for almost all such tensor constructions –of m = O(rn logc n), c > 0, Pauli measurements– satisfy √ the so-called rank-r restricted isometry property (RIP) for all X ∈ {X : X  0, rank(X) ≤ r, kXk∗ ≤ rkXkF }: (1 − δr ) kXk2F ≤ kA(X)k2F ≤ (1 + δr ) kXk2F , (9) where k · k∗ is the nuclear norm (i.e., the sum of singular values), which reduces to Tr(X) since X  0. 7 As pointed out in [29], it is in fact advantageous in practice to choose Tr(X) 6= 1, as it improves the robustness to noise. Here, we force Tr(X) ≤ 1. 7 State-of-the-art approaches. One of the first provable algorithmic solutions for the QST problem was through convexification [40]: this includes nuclear norm minimization approaches [23], as well as proximal variants, as follows: minimize kA(X) − yk2F + λkXk∗ . X0 (11) Here, k · k∗ reduces to Tr(X) since X  0. This approach is considered in the seminal work [23] and is both tractable and amenable to theoretical analysis. The approach does not include any constraint on X.8 As one of the most recent algorithms, we mention the work of [46] where a universal primal-dual convex framework is presented, with the QST problem as application. From a non-convex perspective, [25] presents SparseApproxSDP algorithm that solves (10), when the objective is a generic gradient Lipschitz smooth function. SparseApproxSDP solves (10) by updating a putative low-rank solution with rank-1 refinements, coming from the gradient. This way, SparseApproxSDP avoids computationally expensive operations per iteration, such as full SVDs. In theory, at the r-th iteration, SparseApproxSDP is guaranteed to compute a 1r -approximate solution,  1 with rank at most r, i.e., achieves a sublinear O ε convergence rate. However, depending on ε, SparseApproxSDP might not return a low rank solution. Finally, [7] propose Randomized Singular Value Projection (RSVP), a projected gradient descent algorithm for (10), which merges gradient calculations with truncated SVDs via randomized approximations for computational efficiency. Since the size of these problems grows exponentially with the number of quantum bits, designing fast algorithms that minimize the computational effort required for (10) or (11) is mandatory. Numerical results. In this case, the factorized version of (10) can be described as: minimize kA(U U > ) − yk2F subject to kU k2F ≤ 1. U ∈Rn×r (12) We compare ProjFGD with the algorithms described above; as a convex representative implementation, we use the efficient scheme of [46]. We consider two settings: X ? ∈ Rn×n is (i) a pure state (i.e., rank(X ? ) = 1) and, (ii) an almost pure state (i.e., rank(X ? ) = r, for some r > 1). For all cases, Tr (X ? ) = 1 and y = A(X ? ) + η, with kηk = 10−3 . We use Pauli operators for A, as described in [35]. The number of measurements m satisfy m = Csam · r · n log(n), for various values of Csam . For all algorithms, we used the correct rank input and trace constraint parameter. All methods that require an SVD routine use lansvd(·) from the PROPACK software package. Experiments and algorithms are implemented on Matlab environment; we used non-specialized and non-mexified code parts for all algorithms. For initialization, we use the same starting point for all algorithms, which is either specific (Section 8) or random. We set the tolerance parameter to tol := 5 · 10−6 . Convergence plots. Figure 1 (two-leftmost plots) illustrates the iteration and timing complexities of each Setting: q = 13, Csam = 3. algorithm under comparison, for a pure state density ? b kX−X kF Algorithm Time kX ? kF recovery setting (r = 1). Here, q = 12 which correAccUniPDGrad 7.4151e-02 2354.4552 sponds to a n(n+1) = 8, 390, 656 dimensional problem; 2 ProjFGD 8.6309e-03 1214.0654 moreover, we assume Csam = 3 and thus the number of measurements are m = 12, 288. For initialization, we use the proposed initialization in Section 8 for all Figure 2: Comparison results for reconstruction and efficiency. Time reported is in seconds. algorithms: we compute −A∗ (y), extract factor U0 as the best-r PSD approximation of −A∗ (y), and project U0 onto C. It is apparent that ProjFGD converges faster to a vicinity of X ? , compared to the rest of the algorithms; observe also the sublinear rate of SparseApproxSDP in the inner plots, as reported in [25]. 8 E.g., in order to take the trace constraint Tr(X) = 1 into account, either λ should be precisely tuned to satisfy this constraint or the final estimator is normalized heuristically to satisfy this constraint [20]. 8 8 6 4 RSVP SparseApproxSDP AccUniPDGrad ProjFGD 2 0 4 3 2 1 -2 -4 RSVP SparseApproxSDP AccUniPDGrad ProjFGD 5 Total time Total time (log-scale) 6 10 6 8 10 q-bit (n = 2q ) 0 12 1 5 20 Rank r Figure 4: Timing bar plot: y-axis shows total execution time (log-scale) and x-axis corresponds to different q values. Left panel corresponds to r = 1 and Csam = 6; right panel corresponds to q = 10 and Csam = 6. Figure 2 contains recovery error and execution time results for the case q = 13 (n = 8096); in this case, we solve a n(n+1) = 33, 558, 528 dimensional problem. For this case, RSVP and SparseApproxSDP 2 algorithms were excluded from the comparison. Appendix provides extensive results, where similar performance is observed for other values of q, Csam . Figure 1 (rightmost plot) considers the more general case where r = 20 (almost pure state density) and q = 12. In this case, m = 245, 760 for Csam = 3. As r increases, algorithms that utilize an SVD routine spend more CPU time on singular value/vector calculations. Certainly, the same applies for matrix-matrix multiplications; however, in the latter case, the complexity scale is milder than that of the SVD calculations. Further metadata are also provided in Figure 3. For completeness, in the appendix we also provide results (for the noiseless case) that Setting: r = 5. Setting: r = 20. illustrate the effect of random initialization: ? ? b b kX−X kF kX−X kF Algorithm Time Time kX ? kF kX ? kF Similar to above, ProjFGD shows competitive behavior by finding a better solution faster, RSVP 5.15e-02 0.78 1.71e-02 0.38 SparseApproxSDP 3.17e-02 3.74 5.49e-02 4.38 irrespective of initialization point. AccUniPDGrad 2.01e-02 0.36 1.54e-02 0.33 Timing evaluation (total and per iteraProjFGD 1.20e-02 0.06 7.12e-03 0.04 tion). Figure 4 highlights the efficiency of our algorithm in terms of time complexity, Figure 3: Results for reconstruction and efficiency. Time for various problem configurations. Our algoreported is in seconds. For all cases, Csam = 3 and q = 10. rithm has fairly low per iteration complexity (where the most expensive operation for this problem is matrix-matrix and matrix-vector multiplications). Since our algorithm shows also fast convergence in terms of # of iterations, this overall results into faster convergence towards a good approximation of X ? , even as the dimension increases. Figure 4(right) shows how the total execution time scales with parameter r. Overall performance. ProjFGD shows a competitive performance, as compared to the state-of-the-art algorithms; we would like to emphasize also that projected gradient descent schemes, such as [7], are also efficient in small- to medium-sized problems, due to their fast convergence rate. Moreover, convex approaches might show better sampling complexity performance (i.e., as Csam decreases). For more experimental results (under noiseless settings), we defer the reader to Appendix, due to space restrictions. 4.2 Sparse phase retrieval Consider the sparse phase retrieval (SPR) problem [16, 14, 33]: we are interested in recovering a (sparse) unknown vector x? ∈ Cn , via its lifted, rank-1 representation X ? = x? x?H ∈ Cn×n , from a set of 9 Original image 10 1 Wirtiger flow ProjFGD 10 0 ATime = 140.1129 (sec) 10 -1 b!X ? kF kX kX ? kF Time = 134.646 (sec)! 10 ATime = 206.6236 (sec) -2 Time = 202.8971 (sec)! ATime = 272.2579 (sec) 10 -3 Time = 268.1068 (sec)! 10 -4 10 -5 10 -6 0 20 40 60 80 100 120 140 Iterations Figure 5: Left panel: Original image for the sparse phase retrieval problem. The dimension of the image is 883 × 1280 = 1, 130, 240 variables. Right panel: Convergence performance of algorithms under ?k b F comparison w.r.t. kX−X vs. the total number of iterations; markers on top of curves indicate the kX ? kF total execution time until that point. quadratic measurements: yi = Tr(aH i Xai ) + ηi , i = 1, . . . , m. Here, ai ∈ Cn are given measurement vectors (often Fourier vectors) and ηi is an additive error term. The above description leads to the following non-convex optimization criterion: minimize X0 kA(X) − yk2F , subject to rank(X) = 1, (kXk1 ≤ λ) . (13) ? Here, A : Cn×n → Cm such that (A(X))i = Tr(Φi X) where Φi = ai aH i . In the case where we know x is sparse [33, 39], we can further constrain the lifted variable X to satisfy kXk1 ≤ λ, λ > 0; this way we implicitly also restrict the number of non-zeros in its factors and can recover X ? from a limited set of measurements. Transforming (13) into a factored formulation. Given the rule X = uuH , where u ∈ Cn , one can consider the factored problem re-formulation: minimize n u∈C kA(uuH ) − yk2F subject to kuk1 ≤ λ0 . (14) for some λ0 > 0. Remark 1. In contrast to the QST problem, where there is a continuous map between the constraints in the original X space and in the factored U space ( i.e., Tr(X) ≤ λ ⇔ kU k2F ≤ λ), this is not true for the SPR problem: As we state in the main text, points U ∈ C can result into X 6∈ C 0 , depending on the selection of λ, λ0 values (i.e., C is unfaithful). In this case, the convergence theorem 3.1 in the U factor space only proves convergence to a point U ? in the factored space, which is not necessarily related to the optimal point X ? in the original space. However, as we show next, in practice, even in this case ProjFGD returns a competitive (if not better) solution, compared to state-of-the-art approaches. 10 Wirtiger .ow - 80 iterations - PSNR = 37.3687 (dB) Wirtiger .ow - 100 iterations - PSNR = 54.4213 (dB) ProjFGD - 80 iterations - PSNR = 42.8286 (dB) ProjFGD - 100 iterations - PSNR = 62.7705 (dB) Figure 6: First two figures: Reconstructed image by using Wirtiger flow algorithm after 80 iterations (left panel) and 100 iterations (right panel). Last two figures: Reconstructed image by using ProjFGD algorithm after 80 iterations (left panel) and 100 iterations (right panel). State-of-the-art approaches. One of the most widely used methods for the phase retrieval problem comes from the seminal work of Gerchberg-Saxton [22] and Fienup [19]: they propose a greedy scheme that alternates projections on the range of {ai }m i=1 and on the non-convex set of vectors b such that b = |Ax|. Main disadvantage of such greedy methods is that often they get stuck to locally minimum points. An popularized alternative to these greedy methods is via semidefinite relaxations. [14] proposes PhaseLift, where the rank constraint is replaced by the nuclear norm surrogate. However, it is well-known that such SDP relaxations can be computationally prohibitive, when solved using off-theself software packages, even for small problem instances; some specialized and more efficient convex relaxation algorithms are given in [21]. In [15], the authors present Wirtinger Flow algorithm, a non-convex scheme for solving phase retrieval problems. Similar to our approach, Wirtinger Flow consists of three components: (i) a careful initialization step using a spectral method, (ii) a specialized step size selection and, (iii) a recursion where gradient steps on the factored variable space are performed. Other approaches include Approximate Message Passing algorithms [41] and ADMM approaches [39]. Numerical results. We test our algorithm on image recovery, according to the description given in [15, Section 4.2]. Here, we consider grayscale images that are by nature also sparse (Figure 5 - left panel). This way, we can also consider `1 -norm constraints, as in the criterion (14). We generate L = 21 random octanary patterns and, using these 21 samples, we obtain the coded diffraction patterns using the grayscale image as input. As dictated by [15, Section 4.2], we perform 50 power method iterations for initialization. For this experiment, we highlight (i) how our algorithm ProjFGD performs in practice, and (ii) how the additional sparsity constraint could lead to better performance. Figure 5 (right panel) depicts the ? kF relative error kX−X w.r.t. the iteration count for two algorithms: (i) Wirtiger flow [15], and (ii) kX ? kF ProjFGD. We observe that ProjFGD shows a slightly better performance, compared to Wirtiger flow, both in terms of iterations –i.e., we reach to a better solution within the same number of iterations– and in terms of execution time –i.e., given a time wall, ProjFGD returns an estimate of better quality within the same amount of time. We note that both algorithms used step sizes that were slightly different in values, while ProjFGD further performs also a projection step.9 Figure 6 shows some reconstructed images returned by the algorithms under comparison, during their execution. In all cases, both algorithms perform appealingly, finding a good approximation of the original image in less than 5 minutes; comparing the two algorithms, we note that ProjFGD returns a solution, within the same number of iterations, with at least 5 dB higher Peak Signal to Noise Ration (PSNR), in less time. b 9 The step size in Wirtiger flow satisfies η := µt kU0 k2 F n o , for µt = min 1 − et/t0 , 0.4 and t0 ≈ 330. 11 5 Discussion We consider a class of low-rank matrix problems where the solution is assumed PSD and further constrained with some matrix constraints, described in the text. This paper proposes ProjFGD, a non-convex projected gradient descent algorithm that operates on the factors of the PSD putative solution. When the objective function is smooth and strongly convex in the original variable space, ProjFGD has (local) linear rate convergence guarantees (which can become global, given a proper initialization). Our current analysis restricts to the Assumption 1.1; extending the proof for more complex constraints sets is one possible research direction for future work, where an analogous of gradient mapping [37] might be required. Furthermore, considering barrier functions in the objective function, in order to accommodate the constraints, could be a possible extension. We hope this work will trigger future attempts along these directions. References [1] S. Aaronson. The learnability of quantum states. In Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, volume 463, pages 3089–3114, 2007. [2] A. Agarwal, S. Negahban, and M. Wainwright. Fast global convergence rates of gradient methods for high-dimensional statistical recovery. In Advances in NIPS, pages 37–45, 2010. [3] S. Balakrishnan, M. Wainwright, and B. Yu. Statistical guarantees for the EM algorithm: From population to sample-based analysis. arXiv preprint arXiv:1408.2156, 2014. [4] L. Balzano, R. Nowak, and B. Recht. Online identification and tracking of subspaces from highly incomplete information. In Communication, Control, and Computing (Allerton), 2010 48th Annual Allerton Conference on, pages 704–711. IEEE, 2010. [5] S. Becker, J. Bobin, and E. Candès. NESTA: A fast and accurate first-order method for sparse recovery. SIAM Journal on Imaging Sciences, 4(1):1–39, 2011. [6] S. Becker, E. Candès, and M. Grant. Templates for convex cone problems with applications to sparse signal recovery. Mathematical Programming Computation, 3(3):165–218, 2011. [7] S. Becker, V. Cevher, and A. Kyrillidis. Randomized low-memory singular value projection. In 10th International Conference on Sampling Theory and Applications (Sampta), 2013. [8] S. Bhojanapalli, A. Kyrillidis, and S. Sanghavi. Dropping convexity for faster semi-definite optimization. In 29th Annual Conference on Learning Theory, pages 530–582, 2016. [9] N. Boumal and P.-A. Absil. RTRMC: A Riemannian trust-region method for low-rank matrix completion. In Advances in neural information processing systems, pages 406–414, 2011. [10] S. Bubeck. Theory of convex optimization for machine learning. arXiv preprint arXiv:1405.4980, 2014. [11] S. Burer and R. Monteiro. A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization. Mathematical Programming, 95(2):329–357, 2003. [12] S. Burer and R. Monteiro. Local minima and convergence in low-rank semidefinite programming. Mathematical Programming, 103(3):427–444, 2005. [13] J. Cai, E. Candès, and Z. Shen. A singular value thresholding algorithm for matrix completion. SIAM Journal on Optimization, 20(4):1956–1982, 2010. [14] E. Candes, Y. Eldar, T. Strohmer, and V. Voroninski. Phase retrieval via matrix completion. SIAM Review, 57(2):225–251, 2015. [15] E. Candes, X. Li, and M. Soltanolkotabi. Phase retrieval via Wirtinger flow: Theory and algorithms. Information Theory, IEEE Transactions on, 61(4):1985–2007, 2015. 12 [16] E. Candes, T. Strohmer, and V. Voroninski. Phaselift: Exact and stable signal recovery from magnitude measurements via convex programming. Communications on Pure and Applied Mathematics, 66(8):1241– 1274, 2013. [17] Y. Chen, S. Bhojanapalli, S. Sanghavi, and R. Ward. Coherent matrix completion. In Proceedings of The 31st International Conference on Machine Learning, pages 674–682, 2014. [18] Y. Chen and M. Wainwright. Fast low-rank estimation by projected gradient descent: General statistical and algorithmic guarantees. arXiv preprint arXiv:1509.03025, 2015. [19] C. Fienup and J. Dainty. Phase retrieval and image reconstruction for astronomy. Image Recovery: Theory and Application, pages 231–275, 1987. [20] S. Flammia, D. Gross, Y.-K. Liu, and J. Eisert. Quantum tomography via compressed sensing: Error bounds, sample complexity and efficient estimators. New Journal of Physics, 14(9):095022, 2012. [21] F. Fogel, I. Waldspurger, and A. d’Aspremont. Phase retrieval for imaging problems. arXiv preprint arXiv:1304.7735, 2013. [22] R. Gerchberg. A practical algorithm for the determination of phase from image and diffraction plane pictures. Optik, 35:237, 1972. [23] D. Gross, Y.-K. Liu, S. Flammia, S. Becker, and J. Eisert. Quantum state tomography via compressed sensing. Physical review letters, 105(15):150401, 2010. [24] M. Hardt and M. Wootters. Fast matrix completion without the condition number. In Proceedings of The 27th Conference on Learning Theory, pages 638–678, 2014. [25] E. Hazan. Sparse approximate solutions to semidefinite programs. In LATIN 2008: Theoretical Informatics, pages 306–316. Springer, 2008. [26] K. Jaganathan, S. Oymak, and B. Hassibi. Sparse phase retrieval: Convex algorithms and limitations. In Information Theory Proceedings (ISIT), pages 1022–1026. IEEE, 2013. [27] P. Jain, R. Meka, and I. Dhillon. Guaranteed rank minimization via singular value projection. In Advances in Neural Information Processing Systems, pages 937–945, 2010. [28] P. Jain, P. Netrapalli, and S. Sanghavi. Low-rank matrix completion using alternating minimization. In Proceedings of the 45th annual ACM symposium on Symposium on theory of computing, pages 665–674. ACM, 2013. [29] A. Kalev, R. Kosut, and I. Deutsch. Quantum tomography protocols with positivity are compressed sensing protocols. Nature partner journals (npj) Quantum Information, 1:15018, 2015. [30] A. Kyrillidis and V. Cevher. Matrix recipes for hard thresholding methods. Journal of mathematical imaging and vision, 48(2):235–265, 2014. [31] S. Laue. A hybrid algorithm for convex semidefinite optimization. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), pages 177–184, 2012. [32] K. Lee and Y. Bresler. ADMiRA: Atomic decomposition for minimum rank approximation. Information Theory, IEEE Transactions on, 56(9):4402–4416, 2010. [33] X. Li and V. Voroninski. Sparse signal recovery from quadratic measurements via convex programming. SIAM Journal on Mathematical Analysis, 45(5):3019–3033, 2013. [34] Z. Lin, M. Chen, and Y. Ma. The augmented Lagrange multiplier method for exact recovery of corrupted low-rank matrices. arXiv preprint arXiv:1009.5055, 2010. [35] Y.-K. Liu. Universal low-rank matrix recovery from Pauli measurements. In Advances in Neural Information Processing Systems, pages 1638–1646, 2011. [36] L. Mirsky. A trace inequality of John von Neumann. Monatshefte für Mathematik, 79(4):303–306, 1975. [37] Y. Nesterov. Introductory lectures on convex optimization: A basic course, volume 87. Springer Science & Business Media, 2013. 13 [38] H. Ohlsson, A. Yang, R. Dong, and S. Sastry. CPRL – an extension of compressive sensing to the phase retrieval problem. In Advances in Neural Information Processing Systems, pages 1376–1384, 2012. [39] H Ohlsson, A. Yang, R. Dong, and S. Sastry. CPRL – an extension of compressive sensing to the phase retrieval problem. In Advances in Neural Information Processing Systems 25, pages 1376–1384, 2012. [40] B. Recht, M. Fazel, and P. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM review, 52(3):471–501, 2010. [41] P. Schniter and S. Rangan. Compressive phase retrieval via generalized approximate message passing. Signal Processing, IEEE Transactions on, 63(4):1043–1055, 2015. [42] Y. Shechtman, A. Beck, and Y. Eldar. GESPAR: Efficient phase retrieval of sparse signals. Signal Processing, IEEE Transactions on, 62(4):928–938, 2014. [43] J. Tanner and K. Wei. Normalized iterative hard thresholding for matrix completion. SIAM Journal on Scientific Computing, 35(5):S104–S125, 2013. [44] S. Tu, R. Boczar, M. Soltanolkotabi, and B. Recht. Low-rank solutions of linear matrix equations via Procrustes flow. arXiv preprint arXiv:1507.03566, 2015. [45] Z. Wen, W. Yin, and Y. Zhang. Solving a low-rank factorization model for matrix completion by a nonlinear successive over-relaxation algorithm. Mathematical Programming Computation, 4(4):333–361, 2012. [46] A. Yurtsever, Q. Tran-Dinh, and V. Cevher. A universal primal-dual convex optimization framework. In Advances in Neural Information Processing Systems 28, pages 3132–3140. 2015. [47] D. Zhang and L. Balzano. Global convergence of a grassmannian gradient descent algorithm for subspace estimation. arXiv preprint arXiv:1506.07405, 2015. [48] T. Zhao, Z. Wang, and H. Liu. A nonconvex optimization framework for low rank matrix estimation. In Advances in Neural Information Processing Systems 28, pages 559–567. 2015. [49] Q. Zheng and J. Lafferty. A convergent gradient descent algorithm for rank minimization and SDP from random linear measurements. In Advances in NIPS, pages 109–117, 2015. Additional experiments 5.1 Quantum state tomography – more results Figures 7-8 show further results regarding the QST problem, where r = 1 and q = 10, 12, respectively. For each case, we present both the performance in terms of number of iterations needed, as well as f0 ) such that what is the cumulative time required. For all algorithms, we use as initial point U0 = ΠC (U > ∗ e e X0 = U0 U0 where X0 = Π+ (−A (y)) and Π+ (·) is the projection onto the PSD cone. Configurations are described in the caption of each figure. Table 1 contains information regarding total time required for convergence and quality of solution for all these cases. Results on almost pure density states, i.e., r > 1, are provided in Figure 9. For completeness, we also provide results that illustrate the effect of initialization. In this case, we consider a random initialization and the same initial point is used for all algorithms. Some results are illustrated in Figure 10; table 2 contains metadata of these experiments. Similar to above, ProjFGD shows competitive behavior by finding a better solution faster, irrespective of initialization point. 14 800 1000 0 20 40 60 100 AccUniPDGrad ProjFGD 10 0 10 -2 RSVP SparseApproxSDP 10 -2 10 -4 800 1000 200 20 40 100 400 60 80 0 10 10 10 0 20 30 0 10 -2 10 10 0 10 20 30 40 50 0 10 RSVP SparseApproxSDP -2 200 400 600 800 10001200 10-4 40 AccUniPDGrad ProjFGD 10-2 RSVP SparseApproxSDP 500 1000 1500 2000 Cumulative time (sec) Cumulative time (sec) -4 800 1000 Number of iterations Rank r = 1 - Samples m = 10 " n " r AccUniPDGrad ProjFGD 600 600 -4 10 -4 200 Cumulative time (sec) 400 Number of iterations Number of iterations Rank r = 1 - Samples m = 6 " n " r 10-2 RSVP SparseApproxSDP b!X ?kF kX kX ? kF b!X ? kF kX kX ? kF 10-2 600 10 0 Number of iterations Rank r = 1 - Samples m = 3 " n " r 400 10 0 Number of iterations 10-4 b!X ? kF kX kX ? kF 10 200 AccUniPDGrad ProjFGD b!X ?kF kX kX ? kF 600 10 -2 b!X ?kF kX kX ? kF 400 Number of iterations -4 Rank r = 1 - Samples m = 10 " n " r 100 10-2 RSVP SparseApproxSDP b!X ?kF kX kX ? kF -2 200 10 0 10-2 RSVP SparseApproxSDP b!X ?kF kX kX ? kF b!X ? kF kX kX ? kF 10 AccUniPDGrad ProjFGD b!X ? kF kX kX ? kF 10 0 10-2 Rank r = 1 - Samples m = 6 " n " r 100 b!X ? kF kX kX ? kF AccUniPDGrad ProjFGD b!X ?kF kX kX ? kF Rank r = 1 - Samples m = 3 " n " r 0 b!X ? kF kX kX ? kF 10 10-4 0 20 Cumulative time (sec) 40 60 0 80 20 40 60 80 100 Cumulative time (sec) Cumulative time (sec) Figure 7: Quantum state tomography: Convergence performance of algorithms under comparison ?k b F w.r.t. kX−X vs. (i) the total number of iterations (top) and (ii) the total execution time (bottom). kX ? kF First, second and third column corresponds to Csam = 3, 6 and 10, respectively. For all cases, r = 1 (pure f0 ) such that X0 = U e0 U e > where X0 = Π+ (−A∗ (y)). state setting) and q = 10. Initial point is U0 = ΠC (U 0 Rank r = 1 - Samples m = 6 " n " r AccUniPDGrad ProjFGD AccUniPDGrad ProjFGD 10-2 10 -1 10 -2 200 400 600 10 b!X ? kF kX kX ? kF RSVP SparseApproxSDP b!X ?kF kX kX ? kF 800 1000 Number of iterations 10 0 RSVP SparseApproxSDP -1 10 -2 20 30 10-4 0 40 20 40 100 AccUniPDGrad ProjFGD 200 400 Cumulative time (sec) 10 40 600 60 AccUniPDGrad ProjFGD -2 RSVP SparseApproxSDP -2 10 -1 10 -2 10 -3 10-4 Cumulative time (sec) 0 100 10 10 -1 b!X ?kF kX kX ? kF b!X ? kF kX kX ? kF b!X ?kF kX kX ? kF b!X ? kF kX kX ? kF 10 -2 2000 4000 6000 8000 10000 12000 10 20 Number of iterations Rank r = 1 - Samples m = 10 " n " r 10 0 RSVP SparseApproxSDP 10-2 10 -1 -2 0 10 0 RSVP SparseApproxSDP 300 -4 60 Number of iterations Rank r = 1 - Samples m = 6 " n " r 200 Number of iterations 10 10 0 10-1 RSVP SparseApproxSDP 100 Number of iterations Number of iterations Rank r = 1 - Samples m = 3 " n " r AccUniPDGrad ProjFGD 0 10 -2 b!X ? kF kX kX ? kF 10 10 10-2 100 200 300 400 500 10-2 0 AccUniPDGrad ProjFGD b!X ?kF kX kX ? kF b!X ? kF kX kX ? kF 10 0 b!X ?kF kX kX ? kF 10-1 Rank r = 1 - Samples m = 10 " n " r 100 b!X ?kF kX kX ? kF 100 b!X ? kF kX kX ? kF Rank r = 1 - Samples m = 3 " n " r 5000 10000 15000 Cumulative time (sec) 0 500 1000 Cumulative time (sec) 1500 5000 10-4 10000 15000 Cumulative time (sec) 0 1000 2000 3000 Cumulative time (sec) Figure 8: Quantum state tomography: Convergence performance of algorithms under comparison ?k b F w.r.t. kX−X vs. (i) the total number of iterations (top) and (ii) the total execution time (bottom). kX ? kF First, second and third column corresponds to Csam = 3, 6 and 10, respectively. For all cases, r = 1 (pure f0 ) such that X0 = U e0 U e > where X0 = Π+ (−A∗ (y)). state setting) and q = 12. Initial point is U0 = ΠC (U 0 15 q = 6, Csam = 3. q = 6, Csam = 6. q = 6, Csam = 10. Algorithm ? b kX−X kF kX ? kF Total time ? b kX−X kF kX ? kF Total time ? b kX−X kF kX ? kF Total time RSVP 5.1496e-05 0.7848 1.8550e-05 0.3791 6.6328e-06 0.1203 SparseApproxSDP 4.6323e-03 3.7404 2.2469e-03 4.3775 1.4776e-03 3.8536 AccUniPDGrad 4.0388e-05 0.3634 2.4064e-05 0.3311 1.9032e-05 0.4911 ProjFGD 2.4116e-05 0.0599 1.6052e-05 0.0441 1.1419e-05 0.0446 q = 8, Csam = 3. q = 8, Csam = 6. q = 8, Csam = 10. RSVP 1.5774e-04 5.7347 5.2470e-05 3.8649 2.9583e-05 4.6548 SparseApproxSDP 4.1639e-03 16.1074 2.2011e-03 33.7608 1.7631e-03 85.0633 AccUniPDGrad 3.5122e-05 1.1006 2.4634e-05 1.8428 1.7719e-05 3.9440 ProjFGD 2.4388e-05 0.6918 1.5431e-05 0.8994 1.0561e-05 1.8804 q = 10, Csam = 3. q = 10, Csam = 6. q = 10, Csam = 10. RSVP 4.6056e-04 379.8635 1.8017e-04 331.1315 9.7585e-05 307.9554 SparseApproxSDP 3.6310e-03 658.7082 2.1911e-03 1326.5374 1.7687e-03 2245.2301 AccUniPDGrad 3.0456e-05 33.3585 1.9931e-05 56.9693 4.5022e-05 88.2965 ProjFGD 9.2352e-06 13.9547 5.8515e-06 19.3982 1.0460e-05 49.4528 q = 12, Csam = 3. q = 12, Csam = 6. q = 12, Csam = 10. RSVP 4.7811e-03 14029.1525 1.0843e-03 15028.2836 5.6169e-04 15067.7249 SparseApproxSDP 3.1717e-03 13635.4238 3.6954e-03 15041.6235 5.0197e-03 15051.4497 AccUniPDGrad 8.8050e-05 461.2084 5.2367e-05 904.0507 4.5660e-05 1759.6698 ProjFGD 8.4761e-06 266.8203 4.7399e-06 440.7193 1.1871e-05 1159.2885 Table 1: Quantum state tomography: Summary of comparison results for reconstruction and efficiency. As a stopping criterion, we used kXi+1 − Xi k2/kXi+1 k2 ≤ 5 · 10−6 , where Xi is the estimate at f0 ) such that X0 = U e0 U e> the i-th iteration. Time reported is in seconds. Initial point is U0 = ΠC (U 0 ∗ where X0 = Π+ (−A (y)). Rank r = 5 - Samples m = 3 " n " r 10 -2 1000 200 10-4 50 100 SparseApproxSDP AccUniPDGrad 10 -1 10 -2 400 600 800 1000 Number of iterations 0 10 0 b!X ?kF kX kX ? kF 10 -1 150 Number of iterations 10 200 2000 10-1 10-2 3000 SparseApproxSDP AccUniPDGrad 10 0 10 -1 10-4 Cumulative time (sec) -4 AccUniPDGrad ProjFGD RSVP ProjFGD 200 400 600 SparseApproxSDP 10 0 b!X ?kF kX kX ? kF 10-2 SparseApproxSDP AccUniPDGrad b!X ?kF kX kX ? kF b!X ? kF kX kX ? kF 10 0 b!X ? kF kX kX ? kF 10-2 Rank r = 20 - Samples m = 3 " n " r Rank r = 20 - Samples m = 3 " n " r 100 RSVP ProjFGD RSVP ProjFGD b!X ? kF kX kX ? kF 0 b!X ?kF kX kX ? kF 10 b!X ? kF kX kX ? kF Rank r = 5 - Samples m = 3 " n " r 100 10 -1 800 1000 Number of iterations 2000 4000 6000 8000 100001200014000 Cumulative time (sec) 10-2 0 200 400 600 0 Cumulative time (sec) 10 20 30 40 Number of iterations 50 0 100 200 300 400 Cumulative time (sec) Figure 9: Quantum state tomography: Convergence performance of algorithms under comparison ?k b F w.r.t. kX−X vs. (i) the total number of iterations (left) and (ii) the total execution time (right). kX ? kF The two left plots correspond to the case r = 5 and the two right plots to the case r = 20. In all cases f0 ) such that X0 = U e0 U e > where X0 = Π+ (−A∗ (y)). Csam = 3 and q = 10. Initial point is U0 = ΠC (U 0 16 10-2 b!X ?kF kX kX ? kF SparseApproxSDP -1 10 -2 200 400 600 SparseApproxSDP 10-4 10 10 -1 10 -2 800 1000 200 Number of iterations 400 600 400 600 800 Number of iterations Rank r = 1 - Samples m = 3 " n " r 100 0 100 200 100 200 300 10 -2 400 10 0 10 -2 200 400 100 150 200 400 250 10 0 SparseApproxSDP 10 -2 500 1000 1500 2000 Cumulative time (sec) 10 0 600 200 10 -1 Cumulative time (sec) 600 -4 0 Cumulative time (sec) Cumulative time (sec) 800 1000 AccUniPDGrad ProjFGD RSVP 200 400 600 80010001200 10-4 0 50 10-2 SparseApproxSDP 600 600 Number of iterations Rank r = 1 - Samples m = 10 " n " r 100 0 10 -1 Cumulative time (sec) 400 -4 500 b!X ?kF kX kX ? kF b!X ?kF kX kX ? kF 10 -1 400 AccUniPDGrad ProjFGD RSVP 10-2 SparseApproxSDP 200 -2 Number of iterations Number of iterations Rank r = 1 - Samples m = 6 " n " r b!X ? kF kX kX ? kF b!X ? kF kX kX ? kF 10 0 10-4 10 800 1000 10 AccUniPDGrad ProjFGD RSVP 10-2 SparseApproxSDP 10 -1 b!X ? kF kX kX ? kF 200 10 0 -2 Number of iterations 10-4 0 AccUniPDGrad ProjFGD RSVP b!X ?kF kX kX ? kF 10 10 0 b!X ? kF kX kX ? kF b!X ? kF kX kX ? kF 10 0 Rank r = 1 - Samples m = 10 " n " r 100 AccUniPDGrad ProjFGD RSVP b!X ?kF kX kX ? kF 10-2 Rank r = 1 - Samples m = 6 " n " r 100 b!X ?kF kX kX ? kF AccUniPDGrad ProjFGD RSVP b!X ? kF kX kX ? kF Rank r = 1 - Samples m = 3 " n " r 100 200 400 600 Cumulative time (sec) Figure 10: Quantum state tomography: Convergence performance of algorithms under comparison ?k b F w.r.t. kX−X vs. (i) the total number of iterations (left) and (ii) the total execution time (right). All kX ? kF results correspond to executions starting from a random initialization (but common to all algorithms). In all cases r = 1 and q = 10. q = 10, Csam = 3. Algorithm ? b kX−X kF kX ? kF q = 10, Csam = 6. q = 10, Csam = 10. Total time ? b kX−X kF kX ? kF Total time ? b kX−X kF kX ? kF Total time RSVP 4.5667e-04 545.5525 1.8550e-05 0.3791 1.5774e-04 5.7347 SparseApproxSDP 3.7592e-03 646.3486 2.2469e-03 4.3775 4.1639e-03 16.1074 AccUniPDGrad 3.6465e-05 24.8531 2.4064e-05 0.3311 3.5122e-05 1.1006 ProjFGD 7.0096e-06 19.5502 1.6052e-05 0.0441 2.4388e-05 0.6918 Table 2: Quantum state tomography: Summary of comparison results for reconstruction and efficiency for random initialization. As a stopping criterion, we used kXi+1 − Xi k2/kXi+1 k2 ≤ 5 · 10−6 , where Xi is the estimate at the i-th iteration. Time reported is in seconds. 17 Proofs of local convergence of the ProjFGD Here, we present the full proof of Theorem 3.1. For clarity, we re-state the problem settings: We consider problem cases such as subject to X  0, X ∈ C 0 . minimize f (X) X∈Rn×n (15) We assume the optimum X ? satisfies rank(X ? ) = r? . For our analysis, we assume we know r? and set r? ≡ r. We solve (15) in the factored space, by considering the criterion: minimize f (U U > ) subject to U ∈ C. U ∈Rn×r (16) By faithfulness of C (Definition 2.4), we assume that E ⊆ C. This means that the feasible set C in (16) contains all matrices U ? that lead to X ? = U ? U ?> in (15). Moreover, we assume both C, C 0 are convex sets and there exists a “mapping" of C 0 onto C, such that the two constraints are “equivalent": for any U ∈ C, we are guaranteed that X = U U > ∈ C 0 . We restrict our discussion on norm-based sets for C such that (6) is satisfied. As a representative example, in our analysis consider the case where, for any X = U U > , Tr(X) ≤ 1 ⇔ kU k2F ≤ 1. For our analysis, we will use the following step sizes: ηb = 1 , 128(LkXt k2 +kQUt Q> U ∇f (Xt )k2 ) t η? = 1 128(LkX ? k2 +k∇f (X ? )k2 ) . 11 ? ? By Lemma A.5 in [8], we know that ηb ≥ 56 η and 10 11 η ≤ η ≤ 10 η . In our proof, we will work with step size ηb, which is equivalent –up to constants– to the original step size η in the algorithm. For ease of exposition, we re-define the sequence of updates: Ut is the current estimate in the et+1 = Ut − ηb∇f (Xt )Ut is the putative solution after the gradient step (observe that factored space, U e et+1 ) is the projection step onto C. Observe that for the Ut+1 might belong in C), and Ut+1 = ΠC (U et+1 ) = ξt (U et+1 ) · U et+1 , where ξt (·) ∈ (0, 1); in constraint cases we consider in this paper, Ut+1 = ΠC (U the case ξt (·) = 1, the algorithm boils down to the Fgd algorithm. For simplicity, we drop the subscript and the parenthesis of the ξ parameter; these values are apparent from the context. We assume that ProjFGD is initialized with a “good” starting point X0 = U0 U0> , such that: (A1) U0 ∈ C and Dist(U0 , U ? ) ≤ ρ0 σr (U ? ) for ρ0 := c · µ L · σr (X ? ) σ1 (X ? ) , where c ≤ 1 200 . By the assumptions above, X0 = U0 U0> ∈ C 0 . Next, we show that the above lead to a local convergence result. A practical initialization procedure is given in Section 5.5 and follows from [8]; this also is used in the experimental section 4. 5.2 Proof of Theorem 3.1 For our analysis, we make use of the following lemma [10, Chapter 3], which characterizes the effect of projections onto convex sets w.r.t. to inner products, as well as provides a type-of triangle inequality for such projections; see also Figure 11 for a simple illustration. Lemma 5.1. Let U ∈ C ⊆ Rn×r and V ∈ Rn×r where V ∈ / C. Then, hΠC (V ) − U, V − ΠC (V )i ≥ 0. 18 C U ⇧C (V ) V (17) Figure 11: Illustration of Lemma 5.1 Proof of Theorem 3.1. We start with the following series of (in)equalities: Dist (Ut+1 , U ? )2 = min kUt+1 − U ? Rk2F R∈O (i) ? 2 ≤ kUt+1 − U ? RU k t F (ii) ? 2 et+1 + U et+1 − U ? RU = kUt+1 − U k t F 2 ? ? 2 et+1 kF + kU et+1 − U RU = kUt+1 − U k t F D E et+1 , U et+1 − U ? R? , + 2 Ut+1 − U Ut ? := argmin ? 2 where (i) is due to the fact RU R∈O kUt − U RkF , (ii) is obtained by adding and subtracting t et+1 . U et+1 to obtain: Focusing on the second term of the right hand side, we substitute U   ? 2 > ? 2 et+1 − U ? RU kU k = kU − η b ∇f U U Ut − U ? RU k t t F t t F t   ? 2 2 > = kUt − U ? RU k + η b k∇f U U Ut k2F t F t t D   E ? − 2b η ∇f Ut Ut> Ut , Ut − U ? RU t Then, our initial equation transforms into:   et+1 k2F + Dist (Ut , U ? )2 + ηb2 k∇f Ut U > Ut k2 Dist (Ut+1 , U ? )2 ≤ kUt+1 − U t F D   E ? − 2b η ∇f Ut Ut> Ut , Ut − U ? RU t D E ? ? et+1 , U et+1 − U R + 2 Ut+1 − U Ut Focusing further on the last term of the expression above, we obtain: D E D E et+1 , U et+1 − U ? R? = Ut+1 − U et+1 , U et+1 − Ut+1 + Ut+1 − U ? R? Ut+1 − U Ut Ut D E et+1 , U et+1 − Ut+1 = Ut+1 − U E D et+1 , Ut+1 − U ? R? + Ut+1 − U Ut et+1 ≡ Ut+1 for all t, i.e., the iterates are always within C before Observe that, in the special case where U the projection step, the above equation equals to zero and the recursion is identical to that of [8][Proof et+1 6≡ Ut+1 for some t—thus U et+1 6∈ C. of Theorem 4.2]. Here, we are more interested in the case where U  > ? ∈ C and X ? = U ? R? ? ? By faithfulness (Definition 2.1), observe that U ? RU = U ? U ?> . Ut U RUt t et+1 ): Then, according to Lemma 5.1 and focusing on eq. (17), for U := U ? R? Moreover, Ut+1 = ΠC (U Ut et+1 , the last term in the above equation satisfies: and V := U D E ? et+1 , Ut+1 − U ? RU Ut+1 − U ≤ 0, t and, thus, the expression above becomes: D E et+1 , U et+1 − U ? R? ≤ −kUt+1 − U et+1 k2 . Ut+1 − U F Ut 19 Therefore, going back to the original recursive expression, we obtain:   et+1 k2 + Dist (Ut , U ? )2 + ηb2 k∇f Ut U > Ut k2 Dist (Ut+1 , U ? )2 ≤ −kUt+1 − U F t F D   E ? − 2b η ∇f Ut Ut> Ut , Ut − U ? RU t For the last term, we use the descent lemma 3.3 in the main text; the proof is provided in Section 5.3. Thus, we can conclude that:   ηµ ? Dist (Ut+1 , U ? )2 ≤ 1 − 3b · σ (X ) · Dist(Ut , U ? )2 . r 10 The expression for α is obtained by observing ηb ≥ 56 η and C 1 Then, for η ? ≤ LkX ? k +k∇f (X ? )k and C = /128, we have: 2 10 ? 11 η ≤η≤ 11 ? 10 η , from Lemma 20 in [8]. 2 1− 10 5 ? 3 · 11 · 6η µ 3b ηµ · σr (X ? ) ≤ 1 − · σr (X ? ) 10 10 15 = 1 − η ? µ · σr (X ? ) 66 15 µ · σr (X ? ) =1− 66 128(LkX ? k2 + k∇f (X ? )k2 ) µ · σr (X ? ) =: α ≤1− 550(LkX ? k2 + k∇f (X ? )k2 ) where α < 1. Concluding the proof, the condition Dist(Ut+1 , U ? )2 ≤ ρ0 σr (U ? ) is naturally satisfied, since α < 1. 5.3 Proof of Lemma 3.3 First we recall the definition of restricted strong convexity: Definition 5.2. Let f : Rn×n → R be convex and differentiable. Then, f is (µ, r)-restricted strongly convex if: f (Y ) ≥ f (X) + h∇f (X) , Y − Xi + 2.2. µ 2 kY − Xk2F , ∀X, Y ∈ Rn×n , rank-r matrices. (18) The statements below apply also for standard µ-strong convex functions, as defined in Definition et+1 = Ut − ηb∇f (Xt )Ut and define ∆ := Ut − U ? R? . Before presenting the proof, we need Recall U Ut the following lemma that bounds one of the error terms arising in the proof of Lemma 3.3. This is a variation of Lemma 6.3 in [8]. The proof is presented in Section 5.4. Lemma 5.3. Let f be L-smooth and (µ, r)-restricted strongly convex. Then, under the assumptions of Theorem 3.1 and assuming step size ηb = 128(LkXk +k∇f1 (X )Q Q> k ) , the following bound holds true: 2 D t E ∇f (Xt ), ∆∆> ≥ − η5b k∇f (Xt )Ut k2F − Now we are ready to present the proof of Lemma 3.3. 20 Ut Ut 2 µσr (X ? ) 10 · Dist(Ut , U ? )2 . (19) Proof of Lemma 3.3. First we rewrite the inner product as shown below. D E ? ? ? > ∇f (Xt )Ut , Ut − U ? RU = ∇f (X ), X − U R U t t Ut t t D E ? > U = 12 h∇f (Xt ), Xt − X ? i + ∇f (Xt ), 12 (Xt + X ? ) − U ? RU t t D E = 12 h∇f (Xt ), Xt − X ? i + 12 ∇f (Xt ), ∆∆> , (20) which follows by adding and subtracting 21 X ? . Let us focus on bounding the first term on the right hand side of (20). Consider points Xt = Ut Ut> > ; by assumption, both X and X and Xt+1 = Ut+1 Ut+1 t t+1 are feasible points in (16). By smoothness of f , we get: f (Xt ) ≥ f (Xt+1 ) − h∇f (Xt ), Xt+1 − Xt i − (i) ≥ f (X ? ) − h∇f (Xt ), Xt+1 − Xt i − L 2 L 2 kXt+1 − Xt k2F kXt+1 − Xt k2F , (21) where (i) follows from optimality of X ? and since Xt+1 is a feasible point (Xt+1  0, ΠC 0 (Xt+1 ) = Xt+1 ) for problem (15). Moreover, by the (µ, r)-restricted strong convexity of f , we get, f (X ? ) ≥ f (Xt ) + h∇f (Xt ), X ? − Xt i + µ 2 kX ? − Xt k2F . (22) Combining equations (21), and (22), we obtain: h∇f (Xt ), Xt − X ? i ≥ h∇f (Xt ), Xt − Xt+1 i − L 2 kXt+1 − Xt k2F + µ 2 kX ? − Xt k2F (23) By the nature of the projection ΠC (·) step, it is easy to verify that   > > , Xt+1 = ξ 2 · Xt − ηb∇f (Xt )Xt Λt − ηbΛ> X ∇f (X ) t t t n×n and Q Q> denoting the projection onto the column space where Λt = I − η2b QUt Q> Ut Ut Ut ∇f (Xt ) ∈ R of Ut . Notice that, for step size ηb, we have Λt  0, σ1 (Λt ) ≤ 1 + 1/256 and σn (Λt ) ≥ 1 − 1/256. Using the above Xt+1 characterization in (23), we obtain: h∇f (Xt ), Xt − X ? i − µ 2 (i) kX ? − Xt k2F + L 2 kXt − Xt+1 k2F  ≥ ∇f (Xt ), 1 − ξ 2 Xt + 2b η · ξ 2 · h∇f (Xt ), ∇f (Xt )Xt Λt i (ii)  ≥ 1 − ξ 2 · h∇f (Xt )Ut , Ut i + 2b η · ξ 2 · Tr(∇f (Xt )∇f (Xt )Xt ) · σn (Λt )  η ·ξ 2 2 (24) ≥ 1 − ξ 2 · h∇f (Xt )Ut , Ut i + 255·b 128 k∇f (Xt )Ut kF , where: (i) follows from symmetry of ∇f (Xt ) and Xt and, (ii) follows from the sequence equalities an inequalites: Tr(∇f (Xt )∇f (Xt )Xt Λt ) = Tr(∇f (Xt )∇f (Xt )Ut Ut> ) − η2b Tr(∇f (Xt )∇f (Xt )Ut Ut> ∇f (Xt ))   ≥ 1 − η2b kQUt Q> ∇f (X )k k∇f (Xt )Ut k2F t 2 Ut ≥ (1 − 1/256) k∇f (Xt )Ut k2F . 21 ? Combining the above in the expression we want to lower bound: 2b η ∇f (Xt ) · Ut , Ut − U ? RU + t 2 et+1 k , we obtain: kUt+1 − U F ? et+1 k2 2b η ∇f (Xt ) · Ut , Ut − U ? RU + kUt+1 − U F t D E et+1 k2F = ηb h∇f (Xt ), Xt − X ? i + ηb ∇f (Xt ), ∆∆> + kUt+1 − U  η 2 ·ξ 2 ≥ 1 − ξ 2 · ηb h∇f (Xt )Ut , Ut i + 255·b k∇f (Xt )Ut k2F 128 + − + 2 ηbµ ηbL ? 2 kX − Xt kF − 2 kXt − ηbµσr (X ? ) ηb2 2 5 k∇f (Xt )Ut kF − 10 2 e kUt+1 − Ut+1 kF  Xt+1 k2F · Dist(Ut , U ? )2 (25)  et+1 for some ξ ∈ (0, 1), et+1 = ξ · U For the last term in the above expression and given Ut+1 = ΠC U we further observe: et+1 k2F = kξ · U et+1 − U et+1 k2F kUt+1 − U = (1 − ξ)2 · kUt k2F + (1 − ξ)2 ηb2 · k∇f (Xt )Ut k2F − 2 (1 − ξ)2 · ηb · h∇f (Xt )Ut , Ut i Combining the above equality with the first term on the right hand side in (25), we obtain:  2 2 1 − ξ 2 · ηb h∇f (Xt )Ut , Ut i + (1 − ξ) · kUt k2F + (1 − ξ) ηb2 · k∇f (Xt )Ut k2F 2 h − 2 (1 − ξ) · ηb · h∇f (Xt )Ut , Ut i = i  2 2 2 1 − ξ 2 − 2 (1 − ξ) · ηb h∇f (Xt )Ut , Ut i + (1 − ξ) · kUt k2F + (1 − ξ) ηb2 · k∇f (Xt )Ut k2F = 2 2 (3ξ − 1) (1 − ξ) · ηb h∇f (Xt )Ut , Ut i + (1 − ξ) · kUt k2F + (1 − ξ) ηb2 · k∇f (Xt )Ut k2F =   2 2 (3ξ−1)2 3ξ−1 · U + (1 − ξ) · η b ∇f (X ) · U + (1 − ξ) − kUt k2F . t t t 2 4 F Focusing on the first term, let Θt := I + the definition of ηb and the fact that ηb ≤ 3ξ−1 2 2(1−ξ) 3ξ−1 · ηb · ∇f (Xt )QUt Q> Ut ; then, σn (Θt ) ≥ 1 − 1 . Then: 128k∇f (X )Q Q> k · Ut + (1 − ξ) · ηb∇f (Xt ) · Ut t 2 F Ut = ≥ ≥ 2(1−ξ) 3ξ−1 · 1 128 , by Ut 2 3ξ−1 2 Θt (3ξ−1)2 4 (3ξ−1)2 4 · · Ut 2 F 2 kUt kF ·  · 1− σn (Θt )2 2(1−ξ) 3ξ−1 Combining the above, we obtain the following bound:  et+1 k2 1 − ξ 2 · ηb h∇f (Xt )Ut , Ut i + kUt+1 − U F    (3ξ−1)2 2 · 1 − 1− ≥ (1 − ξ) − 4 · 1 128 2(1−ξ) 3ξ−1 · 2 1 128 · kUt k2F 2  · kUt k2F The above transform (25) as follows: ? et+1 k2F 2b η ∇f (Xt ) · Ut , Ut − U ? RU + kUt+1 − U t   ? 2 2 1 r (X ) ≥ 255·ξ b2 k∇f (Xt )Ut k2F + ηb2µ kX ? − Xt kF − ηbµσ10 · Dist(Ut , U ? )2 128 − 5 · η    2  2 2 2(1−ξ) 1 + (1 − ξ)2 − (3ξ−1) · 1 − 1 − · · kUt k2F − ηb2L kXt − Xt+1 kF 4 3ξ−1 128 22 (26) Let us focus on the term ηbL 2 kXt − Xt+1 k2F = = (i) kXt − Xt+1 k2F ; this can be bounded as follows: ηbL 2 ηbL ηbL > > 2 > > 2 kUt Ut − Ut+1 Ut+1 kF = 2 kUt Ut − Ut Ut+1 > ηbL > 2 2 kUt (Ut − Ut+1 ) + (Ut − Ut+1 ) Ut+1 kF > > + Ut Ut+1 − Ut+1 Ut+1 k2F   > ≤ ηbL · kUt (Ut − Ut+1 )> k2F + k (Ut − Ut+1 ) Ut+1 k2F (ii)  ≤ ηbL kUt+1 k22 + kUt k22 · kUt+1 − Ut k2F . where (i) is due to the identity kA + Bk2F ≤ 2kAk2F + 2kBk2F and (ii) is due to the Cauchy-Schwarz inequality. By definition of Ut+1 , we observe that: (i) (ii) 2 kUt+1 k22 = kξ · (Ut − ηb∇f (Xt )Ut ) k22 ≤ ξ 2 · kUt k22 · kI − ηb∇f (Xt )QUt Q> Ut k2 ≤ 1 + where (i) is due to Cauchy-Schwarz and (ii) is obtained by substituting ηb ≤  1 2 128 1 128k∇f (Xt )QUt Q> U k2 ηbL 2  ≤ = = ≤ 1 1+ 128 2 +1 · kUt+1 − Ut k2F 128   1 2 1+ 128 +1 et+1 − Ut k2F · kξ · U 128  2 1 1+ 128 +1 · k(ξ − 1)Ut − ξ · ηb∇f (Xt ) · Ut k2F 128     1 2 1 2 1+ 128 +1 1+ 128 +1 (1 − ξ)2 · · kUt k2F + · ξ2 64 64 where in the last inequality we substitute ηb; observe that ηb ≤ (26), we obtain: 1 128LkXt k2 . · ηb2 · k∇f (Xt ) · Ut k2F Combining this result with ? et+1 k2F 2b η ∇f (Xt ) · Ut , Ut − U ? RU + kUt+1 − U t !  2 ≥ 255·ξ 2 128 − 1 5 − 1 1+ 128 +1 64  + (1 − ξ)2 · 1− (i) ≥ ηb2 k∇f (Xt )Ut k2F + + (ii) and t kXt − Xt+1 k2F can be further bounded as follows:    2 ηbL 1 2 ≤ η b L · 1 + + 1 · kUt k22 · kUt+1 − Ut k2F kX − X k t t+1 F 2 128    1 2 = ηbL · 1 + 128 + 1 · kXt k2 · kUt+1 − Ut k2F since ξ ∈ (0, 1). Thus, · kUt k22 . 2 (1 − ξ) · η bµ 2 1− ≥ ηb2 k∇f (Xt )Ut k2F + η bµ 2 · ξ2 1 1+ 128 2 · ηb2 k∇f (Xt )Ut k2F + +1 ! − 64 2 kX ? − Xt kF − !  2 1 1+ 128 +1 2 kX ? − Xt kF − (3ξ−1) 4  2 kX ? − Xt kF −  · 1− 1− 2(1−ξ) 3ξ−1 · 1 128 η bµσr (X ? ) 10 ! 2  · Dist(Ut , U ? )2 · kUt k2F η bµσr (X ? ) 10 − 64 2 η bµ 2 (3ξ−1)2 4 · Dist(Ut , U ? )2   · 1 − 1 − 2(1−ξ) 3ξ−1 · η bµσr (X ? ) 10 1 128 ! 2  · Dist(Ut , U ? )2  1 1+ 128 · kUt k2F (27) 2  +1 where (i) is due to the assumption ξ & 0.78 and thus − − · ξ 2 ≥ 1; see also Figure 64 12 (left panel), and (ii) is due to the non-negativity of the constant in front of kUt k2F ; see also Figure 12 (right panel). Finally, we bound ηb2µ kX ? − Xt k2F using the following Lemma by [44]: 255·ξ 2 128 23 1 5 1 2 ) ) 128 1 1.2 1 0.9 0.8 (39!1)2 4 9 : 0:78 % 0.8 0.7 0.6 0.5 0 -0.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 9 1 2 ) +1 (1+ 128 ) 64 0.2 0.4 (1 ! 9)2 " (1 ! 1 5 0.4 255"9 2 128 0.6 ! ! ! 1 2 ) +1 (1+ 128 64 1.4 2(1!9) 39!1 " 92 1.6 " (1 ! (1 ! " 1.8 0.2 0.3 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 9 Figure 12: Behavior of constants, depending on ξ, in expression (27). Lemma 5.4. For any U, V ∈ Rn×r , we have: kU U > − V V > k2 ≥ 2 · √  2 − 1 · σr (U )2 · Dist(U, V )2 . Thus, ηbµ 2 kX ? − Xt k2F ≥ ηbµ · √  2 − 1 · σr (X ? ) · Dist(Ut , U ? )2 , and can thus conclude: ? et+1 k2F 2b η ∇f (Xt ) · Ut , Ut − U ? RU + kUt+1 − U t  √ ? r (X ) 2 − 1 · σr (X ? ) · Dist(Ut , U ? )2 − ηbµσ10 ≥ ηb2 k∇f (Xt )Ut k2F + ηbµ · · Dist(Ut , U ? )2 √  1 = ηb2 k∇f (Xt )Ut k2F + 2 − 1 − 10 · ηbµ · σr (X ? ) · Dist(Ut , U ? )2 = ηb2 k∇f (Xt )Ut k2F + 3b ηµ 10 · σr (X ? ) · Dist(Ut , U ? )2 This completes the proof. 5.4 Proof of Lemma 5.3 Proof. We can lower bound ∇f (Xt ), ∆∆> as follows: D E (i) D E > ∇f (Xt ), ∆∆> = Q∆ Q> ∆ ∇f (Xt ), ∆∆   > > ≥ − Tr Q∆ Q∆ ∇f (Xt )∆∆ (ii) > ≥ −kQ∆ Q> ∆ ∇f (Xt )k2 Tr(∆∆ )   (iii) > ? 2 ? Q ? ∇f (Xt )k2 Dist(Ut , U ) . ∇f (X )k + kQ ≥ − kQUt Q> t 2 U Ut U (28) Note that (i) follows from the fact ∆ = Q∆ Q> ∆ ∆ and (ii) follows from | Tr(AB)| ≤ kAk2 Tr(B), for PSD matrix B (Von Neumann’s trace inequality [36]). For the transformation in (iii), we use that fact that the column space of ∆, Span(∆), is a subset of Span(Ut ∪ U ? ), as ∆ is a linear combination of Ut ? . and U ? RU t 24 For the second term in the parenthesis above, we first derive the following inequalities; their use is apparent later on: (i) k∇f (Xt )U ? k2 ≤ k∇f (Xt )Ut k2 + k∇f (Xt )∆k2 (ii) ≤ k∇f (Xt )Ut k2 + k∇f (Xt )Q∆ Q> ∆ k2 k∆k2   (iii) > ? ≤ k∇f (Xt )Ut k2 + k∇f (Xt )QUt Q> k + k∇f (X )Q Q k ? t U Ut 2 U 2 k∆k2   (iv) > ? 1 ? ≤ k∇f (Xt )Ut k2 + k∇f (Xt )QUt Q> k + k∇f (X )Q Q k ? t U Ut 2 U 2 200 σr (U ) (v) 1 · 1 k∇f (Xt )Ut k2 + 1 (1− 200 ) 200 200 1 ≤ 199 k∇f (Xt )Ut k2 + 200 k∇f (Xt )U ? k2 . ≤ k∇f (Xt )Ut k2 + ? 1 200 k∇f (Xt )U k2 ? = U − ∆, (ii) is due to generalized Cauchy-Schwarz where (i) is due to triangle inequality on U ? RU t t inequality; we denote as Q∆ Q∆ the projection matrix on the column span of ∆ matrix, (iii) is due to triangle inequality and the fact that the column span of ∆ can be decomposed into the column span of Ut and U ? , by construction of ∆, (iv) is due to the assumption Dist(Ut , U ? ) ≤ ρ0 · σr (U ? ) and k∆k2 ≤ Dist(Ut , U ? ) ≤ 1 σr (X ? ) 200 σ1 (X ? ) · σr (U ? ) ≤ 1 200 · σr (U ? ). Finally, (v) is due to the facts: ? > ? k∇f (Xt )U ? k2 = k∇f (Xt )QU ? Q> U ? U k2 ≥ k∇f (Xt )QU ? QU ? k2 · σr (U ), and > k∇f (Xt )Ut k2 = k∇f (Xt )QUt Q> Ut U k2 ≥ k∇f (Xt )QUt QUt k2 · σr (Ut )  ? 1 ≥ k∇f (Xt )QU Q> U k2 · 1 − 200 · σr (U ), by the proof of (a variant of) Lemma A.3 in [8]. Thus, for the term k∇f (Xt )QU ? Q> U ? k2 , we have k∇f (Xt )QU ? Q> U ? k2 ≤ ≤ ≤ ? 1 σr (U ? ) k∇f (Xt )U k2 1 201 σr (U ? ) 199 k∇f (Xt )Ut k2 201σ1 (U ? ) 201 > 200σr (U ? ) 199 k∇f (Xt )QUt QUt k2 . Using (29) in (28), we obtain: D E  ∇f (Xt ), ∆∆> ≥ − kQUt Q> Ut ∇f (Xt )k2 + ? 201σ1 (U ? ) 201 > 200σr (U ? ) 199 kQUt QUt ∇f (Xt )k2 (29)  Dist(Ut , U ? )2 ? 2 ≥ − 21·τ10(U ) kQUt Q> Ut ∇f (Xt )k2 Dist(Ut , U ) We remind that the step size we use here is: ηb = 21·τ (U ? ) 10 1 . 128(LkXt k2 +kQUt Q> U ∇f (Xt )k2 ) Then, we have: t ? 2 · kQUt Q> Ut ∇f (Xt )k2 · Dist(Ut , U ) ≤ 21·τ (U ? ) 10 ? 2 · ηb · 128LkXt k2 kQUt Q> Ut ∇f (Xt )k2 · Dist(Ut , U ) + 21·τ (U ? ) 10 2 ? 2 · ηb · 128 · kQUt Q> Ut ∇f (Xt )k2 · Dist(Ut , U ) 25 (30) To bound the first term on the right hand side, we observe that kQUt Q> Ut ∇f (Xt )k2 ≤ kQUt Q> Ut ∇f (Xt )k2 ≥ 21·τ (U ? ) 10 µσr (Xt ) . 21·τ (U ? ) ·10 10 µσr (Xt ) 21·τ (U ? ) ·10 10 or This results further into: ? 2 · ηb · 128LkXt k2 kQUt Q> Ut ∇f (Xt )k2 · Dist(Ut , U )  21·τ (U ? ) ·128·b η ·LkXt k2 ·µσr (Xt ) 10 · Dist(Ut , U ? )2 , ≤ max 21·τ (U ? ) ·10 10 ηb ≤  ? 21·τ (U ) 10 2 · 128 · 2 10κτ (Xt )kQUt Q> Ut ∇f (Xt )k2 ? 2  · Dist(Ut , U ) 128·b η ·LkXt k2 ·µσr (Xt ) 10 · Dist(Ut , U ? )2 2 ? 2 ? 2 + ηb 21·τ10(U ) · 128 · 10κτ (Xt )kQUt Q> Ut ∇f (Xt )k2 · Dist(Ut , U ) ,  where κ := L µ and τ (X) := σ1 (X) σr (X) 21·τ (U ? ) · kQUt Q> Ut ∇f (Xt )k2 10 (i) (Xt ) · Dist(Ut , U ? )2 ≤ µσr10 for a rank-r matrix X. Combining the above with (30): · Dist(Ut , U ? )2  + 10κτ (Xt ) · (ii) ≤ (iii) µσr (Xt ) 10 · Dist(Ut , U ? )2  + 11κτ (X ? ) · 21·τ (U ? ) 10  +1 · 21·τ (U ? ) 10 2 ? 2 · 128 · ηbkQUt Q> Ut ∇f (Xt )k2 · Dist(Ut , U ) 21·τ (U ? ) 10  +1 · 21·τ (U ? ) 10 2 0 2 ? · 128 · ηbkQUt Q> Ut ∇f (Xt )k2 · (ρ ) σr (X ) 12·212 102 ≤ µσr (Xt ) 10 · Dist(Ut , U ? )2 + ≤ µσr (Xt ) 10 · Dist(Ut , U ? )2 + η5b k∇f (Xt )Ut k22 (iii) · κ · τ (X ? )2 · 128 · ηbk∇f (Xt )Ut k22 · 11·(ρ0 )2 10 1 where (i) follows from ηb ≤ 128LkX , (ii) is due to Lemma A.3 in [8] and using the bound Dist(Ut , U ? ) ≤ t k2 ? 0 ρ σr (U ) by the hypothesis of the lemma, (iii) is due to σr (X ? ) ≤ 1.1σr (Xt ) by Lemma A.3 in [8], due to ? ? 2 > 2 ? 21·τ (U ) +1) ≤ 12κτ (X ? )· 21·τ (U ) , the facts σr (Xt )kQUt Q> Ut ∇f (Xt )k2 ≤ kUt ∇f (Xt )kF and (11κτ (X )· 10 10 1 1 and τ (U ? )2 = τ (X ? ). Finally, (iv) follows from substituting ρ0 := c · κ1 · τ (X ? ) for c = 200 and using 1 Lemma A.3 in [8] (due to the factor 200 , all constants above lead to bounding the term with the 1 constant 5 ). Thus, we can conclude: ∇f (Xt ), ∆∆> ≥ −  η b 2 5 k∇f (Xt )Ut kF + µσr (X ? ) 10  · Dist(Ut , U ? )2 . This completes the proof. 5.5 Proof of Corollary 3.2 We have et+1 kF ≤ kUt kF + ηb · k∇f (Xt )Ut kF kU ≤ kUt kF + ηb · k∇f (Xt )QUt Q> Ut k2 · kUt kF = (1 + ηb · k∇f (Xt )QUt Q> Ut k 2 ) · λ ≤ (1 + 1 128 ) ·λ where the first inequality follows from the triangle inequality, the second holds by the property kABkF ≤ kAk2 · kBkF , and the third follows because the step size is bounded above by ηb ≤ 128k∇f (X 1)Q Q> k . t et+1 ) = Hence, we get ξ(U λ et+1 kF kU ≥ 128 129 . 26 Ut Ut 2 Initialization In this section, we present a specific initialization strategy for the ProjFGD. For completeness, we repeat the definition of the optimization problem at hand, both in the original space: minimize f (X) X∈Rn×n subject to X ∈ C 0 . (31) and the factored space: minimize f (U U > ) subject to U ∈ C. U ∈Rn×r (32) For our initialization, we restrict our attention to the full rank (r = n) case. Observe that, in this case, C 0 is a convex set and includes the full-dimensional PSD cone, as well as other norm constraints, as described in the main text. Let us denote ΠC 0 (·) the corresponding projection step, where all constraints are satisfied simultaneously. Then, the initialization we propose follows similar motions with that in [8]: We consider the projection of the weighted negative gradient at 0, i.e., − L1 · ∇f (0), onto C 0 .10 I.e., X0 = U0 U0> = ΠC 0 −1 L (33)  · ∇f (0) . Assuming a first-oracle model, where we access f only though function evaluations and gradient calculations, (33) provides a cheap way to find an initial point with some approximation guarantees as follows11 :  Lemma 5.5. Let U0 ∈ Rn×n be such that X0 = U0 U0> = ΠC 0 −1 L · ∇f (0) . Consider the problem in (32) where f is assumed to be L-smooth and µ-strongly convex, with optimum point X ? such that rank(X ? ) = n. We apply ProjFGD algorithm with U0 as the initial point. Then, in this generic case, U0 satisfies: Dist(U0 , U ? ) ≤ ρ0 · σr (U ? ), where ρ0 = q 1−µ/L √ 2( 2−1) · τ 2 (U ? ) · p srank(X ? ) and srank(X) = kXkF kXk2 . Proof. To show this, we start with: kX0 − X ? k2F = kX ? k2F + kX0 k2F − 2 hX0 , X ? i . Recall that X0 = U0 U0> = ΠC 0 by Lemma 5.1, we get −1 L (34)  · ∇f (0) by assumption, where ΠC 0 (·) is a convex projection. Then, X0 − X ? , − L1 · ∇f (0) − X ? ⇒ 0 −1 L ∇f (0), X − X ∗ ≥ X 0, X 0 − X ? . (35) Observe that 0 ∈ Rn×n is a feasible point, since it is PSD and satisfy any common symmetric norm constraints, as the ones considered in this paper. Hence, using strong convexity of f around 0, we get, f (X ? ) − µ kX ? k2F ≥ f (0) + h∇f (0), X ? i 2 (i) = f (0) + h∇f (0), X0 i + h∇f (0), X ? − X0 i (ii) ≥ f (0) + h∇f (0), X0 i + hL · X0 , X0 − X ? i . 10 (36) As in [8], one can approximate easily L, if it is unknown. As we show in the experiments section, a random initialization performs well in practice, without requiring the additional calculations involved in (33). However, a random initialization provides no guarantees whatsoever. 11 27 where (i) is by adding and subtracting h∇f (0), X0 i, and (ii) is due to (35). Further, using the smoothness of f around 0, we get: f (X0 ) ≤ f (0) + h∇f (0), X0 i + L2 kX0 k2F (i) ≤ f (X ? ) − µ2 kX ? k2F + hL · X0 , X ? i − L2 kX0 k2F ≤ f (X0 ) − µ2 kX ? k2F + hL · X0 , X ? i − L2 kX0 k2F . where (i) follows from (36) by upper bounding the quantity f (0) + h∇f (0), X0 i, (ii) follows from the assumption that f (X ? ) ≤ f (X0 ). Hence, rearranging the above terms, we get: hX0 , X ? i ≥ 12 kX0 k2F + Combining the above inequality with (34), we obtain, q ? kX0 − X kF ≤ 1 − µ ? 2 2L kX kF . µ L · kX ? kF . Given, U0 such that X0 = U0 Uo> and U ? such that X ? = U ? U ?> , we use Lemma 5.4 from [44] to obtain: q √ > ? ?> kU0 U0 − U U kF ≥ 2( 2 − 1) · σr (U ? ) · Dist(U0 , U ? ). Thus: kX0 −X ? kF √ 2( 2−1)·σr (U ? ) ρ0 · σr (U ? ) Dist(U0 , U ? ) ≤ √ ≤ where ρ0 = q 1−µ/L √ 2( 2−1) · τ 2 (U ? ) · p · kX ? kF srank(X ? ). Such initialization, while being simple, introduces further restrictions on the condition number τ (X ? ), and the condition number of function f . Finding such simple initializations with weaker restrictions remains an open problem; however, as shown in [8, 44, 18], one can devise specific deterministic initialization for a given application. As a final comment, we state the following: In practice, the projection ΠC 0 (·) step might not be easy to compute, due to the joint involvement of convex sets. A practical solution would be to sequentially project − L1 · ∇f (0) onto the individual constraint sets. Let Π+ (·) denote the projection onto the PSD cone. Then, we can consider the approximate point:   e0 = U e0 U e0> = Π+ X e0 ; X e0 , we can perform an additional step: Given U   e0 , U0 = ΠC U to guarantee that U0 ∈ C. 28
8cs.DS
Unsupervised Domain Adaptation with Similarity Learning arXiv:1711.08995v1 [cs.CV] 24 Nov 2017 Pedro O. Pinheiro Element AI Montreal, QC, Canada [email protected] Abstract The objective of unsupervised domain adaptation is to µ3 leverage µ1 features from a labeled source domain and learn a classifier for an unlabeled target domain, with a similar but different data distribution. Most deep learning approaches to domain adaptation consist of two steps: (i) learn features that preserve a low risk on labeled samples (source domain) and (ii) make the features from both doµ2 mains to be as indistinguishable as possible, so that a classifier trained on the source can also be applied on the target domain. In general, the classifiersµin step (i) consist of 4 fully-connected layers applied directly on the indistinguishable features learned in (ii). In this paper, we propose a different way to do the classification, using similarity learning. The proposed method learns a pairwise similarity function in which classification can be performed by computing distances between prototype representations of each category. The domain-invariant features and the categorical prototype representations are learned jointly and in an endto-end fashion. At inference time, images from the target domain are compared to the prototypes and the label associated with the one that best matches the image is outputed. The approach is simple, scalable and effective. We show that our model achieves state-of-the-art performance in different large-scale unsupervised domain adaptation scenarios. µ3 µ1 µ2 f (xti ) µ4 Figure 1: Illustrative example of our similarity-based classifier. A query target-domain image representation is compared to a set of prototypes, one per category, computed from source-domain images. The label of the most similar prototype is assigned to the test image. most commonly used approach to transfer learned features is to further modify them through a process called “finetuning”. In this case, the features are adapted by training the network with labeled samples from the new data distribution. In many cases, however, acquiring labeled data can be expensive. Unsupervised Domain Adaption deals with the domain shift problem. We are interested in learning representations that are invariant to domains with different data distributions. In this scenario, the machine has access to a labeled dataset (called source domain) and an unlabeled one (with a similar but different data distribution, called target domain), and the objective is to correctly infer the labels on the latter. Most current approaches are based on deep learning methods and consist of two steps: (i) learn features that preserve a low risk on labeled samples (source domain) and (ii) make the features from both domains to be as indistinguishable as 1. Introduction Convolutional Neural Networks (ConvNets) [30] based methods achieve excellent results in large-scale supervised learning problems, where a lot of labeled data exists [28, 25]. Moreover, these features are quite general and can be used in a variety of vision problems, such as image captioning [52], object detection [31] and segmentation [24]. However, direct transfer of features from different domains do not work very well in practice, as the data distributions of domains might change. In computer vision, this problem is sometimes referred to as domain shift [47]. The 1 possible, so that a classifier trained on the source can also be applied on the target domain. Unsupervised domain adaptation can also be used to train models with synthetic data (e.g. 3D renders or game engines). Assuming we are able to handle the domain shift problem, we can make use of virtually unlimited number of labeled (synthetic) images and adapt the model to natural images. Indeed, in certain areas of research, such as robotics vision or reinforcement learning, acquiring training sample is very expensive. Training in a synthetic domain and transferring the learned features to real-world environments can be a solution to alleviate the high cost of acquiring and labeling training data. Theoretical studies in domain adaptation [6, 5] suggest that a good cross-domain representation is one in which the algorithms are not able to identify from which domain the original input comes from. Most current approaches to domain adaptation achieve this goal by mapping cross-domain features into a common space using deep learning methods. This is generally achieved by minimizing some measure of domain variance (such as the Maximum Mean Discrepancy (MMD) [22, 50, 34, 36]), or by matching moments of the two distributions [46]. Another way to deal with the domain variation problem is to make use of adversarial training [1, 15, 48, 49, 8]. In this scenario, the domain adaptation problem is cast as a minimax game between a domain classifier and feature learning (see Figure 2a). A neural network learns features that are, at the same time, as discriminative as possible (in the source domain) and as indistinguishable as possible (among the domains). In general, the classifier used in the source domain is a simple fully-connected network followed by a softmax over the categories (as in standard supervised learning). While this is, in principle, a good idea (given the representations are trained to be indistinguishable), it leaves the shared representation vulnerable to contamination by noise that is correlated with the underlying shared distribution [44, 8]. In this paper, we propose a different way to do classification, while keeping the adversarial domain-confusion component of [15]. Instead, we propose a similarity-based classifier in which each image (from either the source or target domain) is compared to a set of prototypes (or centroides). The label associated to the prototype that best matches the query image is given to it. See Figure 1. Prototypes are vector representations that are representative of each category that appears in the dataset. They are learned at the same time as the image embeddings, and the whole system is backpropagable. More precisely, we are interested in learning embeddings for the inputs (the source/target domain images), the embedding of each prototype (one per category category), and a pairwise similarity function that compares the inputs and the prototypes (see Figure 2b). At the same time, adversarial training is performed on the inputs to force domainconfusion. All these components are learned jointly and in an end-to-end fashion. At inference time, each embedding prototype is computed a priori (by averaging the embedding over multiple source images). A test image (from target domain) is then compared to each of the prototypes and the label of the nearest prototype is assigned to it. We show empirically that the proposed similarity-based classification approach is more robust to the domain shift between two datasets. Our method is able to over perform the commonly used classifier and achieve new state of the art in multiple domain adaptation scenarios. We show results in two important large-scale domain adaptation datasets: Office-31 [42], which contains images of office objects in three different domains and VisDA [39], a large-scale dataset focused on simulation-to-reality shift. The paper is organized as follows: Section 2 presents related work, Section 3 describes our proposed method and architecture choices, and Section 4 describes our experiments in different datasets. We conclude in Section 5. All source code for reproducing the methods in this paper will be released. 2. Related Works Similarity Learning: Many previous work focus on learning a similarity measure that is also a metric, like the case of the positive semi definite matrix that defines the Mahalanobis distance. See [4] for a survey. Multiple authors (e.g. [54, 16, 17, 53, 37]) used a learned similarity measure together with nearest neighbors classifier. [43, 11, 41, 10] propose methods in which features are learned along with the metric learning. Chechik et al. [10] uses similarity measure in large-scale image search. Similar to us, they define similarity as a bilinear operator but removes the positivity and symmetry constraints to favor scalability. Mensink et al. [37] and Snell et al. [2], similar to this work, propose to learn metric space in which classification is performed by computing distances to prototype representation of each category (mean of its examples). However, the problem setting and the functions parametrization of these works are very different form ours. Unsupervised Domain Adaptation: Non-deep approaches for unsupervised domain adaptation usually consist of matching the feature distribution between the source and target domain [23, 12]. These methods can roughly be divided into two categories: (i) sample re-weighting [27, 26, 18] and (ii) feature space transformation [38, 21, 3, 45, 29]. Recently, an increasing interest in ConvNets [30] approaches has emerged, due to its ability to learn powerful features. These methods, in general, are trained to minimize a classification loss and maximize domainconfusion. The classification loss is in general computed through a fully-connected network trained on labeled data. The domain-confusion is achieved in two different ways: (i) discrepancy loss, that reduces the shift between the two domains [50, 34, 36, 46] or (ii) adversarial loss, which encourages a common feature space with respect to a discriminator [48, 14, 15, 1, 49]. In Deep Domain Confusion (DDC) [50], the authors propose a domain-confusion loss based on MMD [22] applied on the final representation of a network. Long et al. [34] (DAN) consider a sum of multiple MMDs between several layers. They consider multiple kernels for adapting the representations, achieving more robust results than previous work. In Join Adaptation Networks (JAN) [36], the authors propose an extension to DAN in which they use the joint distribution discrepancy over deep features (instead of their sum). DeepCORAL [46] achieves the domain-confusion by aligning the second-order statistics of the learned feature representations. Ganin et al. [14] and Ajakan et al. [1], and subsequently [15], impose domain confusion through an adversarial objective with respect to a domain discriminator with the reverse gradient algorithm (RevGrad). They treat domain invariance as a binary classification problem, but directly maximizes the loss of the domain classifier by reversing its gradient. This allows the model to learn features that are discriminative in the source domain and indiscriminate with respect to the domain shift. ADDA [49] proposes a general framework for adversarial deep domain adaptation and uses an inverted label GAN [20] loss to achieve the domain confusion. The DSN [8] model divides the space of images into two: one that captures information of the domain, and other that captures information shared between domains. Certain methods incorporate generative modeling (usually based on GANs [20]) into the feature learning process. Coupled Generative Adversarial Networks [33] consists of a tuple of GANs each corresponding to one of the domains that learns a joint distribution of multi-domain images. In [7], the authors propose a model that generates images (conditioned on source-domain images) that are similar to images from target domain. All methods mentioned in this section use the same classifier component: a fully-connected network. In this paper, contrary to them, we use a different classifier based on similarity learning. In our method, we follow the approach of [15] to impose domain-confusion (due to its simplicity and efficiency). We note, however, that our similarity-based classifier could be applied to other approaches mentioned in this section. 3. Method In domain adaptation, we have access to labeled images s Xs = {(xsi , yis )}N i=0 drawn from a source domain distribut tion ps (x, y) and target images Xt = {(xti , yit )}N i=0 drawn from a target distribution pt (x, y). In the unsupervised setting, we do not have any information about the label on the target domain. We address the problem of unsupervised domain adaptation using a similarity-based classifier. Our model, which we call SimNet, is composed of two different components (see Figure 2b): (i) the domain-confusion component, which forces the features of both domains, f (Xs ) and f (Xt ), to be as indistinguishable as possible and (ii) a classifier based on a set of prototypes, µc (one for each category c ∈ {1, 2, ..., C}). Both components are trained jointly and in an end-to-end fashion. This approach is based on the assumption that it exists an embedding for each category such that all the points of the category cluster around it, independent of its domain. Inference is then performed in a test image by simply finding the most semantically similar prototype. We next describe the proposed similarity-based classifier, followed by the training and inference procedures and implementation details. 3.1. Similarity-Based Classifier Our classifier is composed of C different prototypes, one per category. Each prototype represents a general embedding for a category, incorporating all its variations. We assume that there exists a representation space in which all samples of a given category can be clustered around its corresponding prototype. Each prototype is represented by a m-dimensional vector µc ∈ Rm parametrized by a ConvNet g(·), with trainable parameters θg . The prototypes are computed by the average representation of all source samples belonging to the category c: µc = 1 X g(xsi ) , |Xc | s c (1) xi ∈X where Xc is the set of all images in the source domain labeled with category c. Similarly, the input images (from either domain) are represented as a n-dimensional vector fi = f (xi ) ∈ Rn , thanks to a ConvNet f (·) parametrized by θf . By leveraging the powerful representations of convolutional neural networks, we propose a simple model that can predict which of the prototypes (and therefore categories) best describes a given input. For this purpose, a similarity metric between images and prototypes is learned, as illustrated in Figure 2b. The similarity between an input image f (·) class fi g(·) µ1 g(·) µ2 ... disc f (·) disc ... f (·) g(·) (a) standard adversarial approach µC (b) similarity learning approach Figure 2: Architectures for adversarial unsupervised domain adaptation. (a) Standard approaches usually consist of two heads: disc, which imposes features do be indiscriminate w.r.t. the domain and class, that uses a fully-connected network to classify source domain images. (b) Our method keeps the same disc component but uses instead a similarity-based classifier. It compares the embedding of an image with a set of prototypes. The label that best matches the image is given. All representations are learned jointly and in an end-to-end fashion. xi and prototype µc is defined simply as a bilinear operation: h(xi , µc ) = fiT Sµc , (2) with S ∈ Rn×m being the trainable parameters. S is an unconstrained bilinear similarity operator, and it is not required to be positive or symmetric. Note that the two ConvNets, f and g, do not share the same parameters. This is particularly important in the domain adaptation scenario, in which the representations (from input and from prototypes) have different roles in the classification. On the one hand, the domain features fi should, at the same time, be domain invariant and match one of the prototypes µc . On the other hand, the embedding prototypes should be as close as possible to the source domain images that represents its category. In the case of single domain classification, it would make sense to use the same network for f and g to reduce the capacity of the model, since there is no shift in the domain. In this case, the model would be similar to Siamese Networks [11]. The model is trained to discriminate the target prototype µc from all other prototypes µk (with k 6= c), given a labeled image. We interpret the output of the network as class conditional probabilities by applying a softmax [9] over the bilinear operator: eh(xi ,µc ) pθ (c|xi , µ1 , ..., µC ) = P h(x ,µ ) . i k ke (3) θ = {θf , θg , S} represents the set of all trainable parame- ters of the model. Learning is achieved by minimizing the negative log-likelihood (with respect to θ), over all labeled samples (xi , yi ) ∈ Xs : " # X X Lclass (θ) = − h(xi , µyi )−log eh(xi ,µk ) +γR . (xi ,yi ) k (4) R is a regularization term that encourage the prototypes to encode different aspects of each category. At each training iteration, the prototypes are approximated by choosing a random subset of examples for each class. The regularizer is modeled as a soft orthogonality constraint. Let Pµ be a matrix whose rows are the prototypes, we write the regularization term as: R = ||PTµ Pµ − I||2F , (5) where || · ||2F is the squared Frobenius norm and I is the identity matrix. 3.2. Training and Inference We are interested in training a classifier on the source domain (labeled samples) and apply it to the target domain (unlabeled samples). To achieve this goal, the model learns features that maximize the domain confusion, while preserving a low risk on the source domain. The domain-invariant component is responsible to minimize the distance between the empirical source and target feature representation distributions, f (Xs ) and f (Xt ). Assuming this is the case, the classifier trained on the source feature representation can thus be directly applied to the target representation. Domain confusion is achieved with a domain discriminator D, parametrized by θd . The discriminator classifies whether a data point is drawn from the source or the target domain, and it is optimized following a standard classification loss: Ldisc (θ, θd ) = − − Ns X log D(f (xsi )) + i=0 Nt X i=0 (6) log(1 − D(f (xti ))) . We achieve domain confusion by applying the Reverse Gradient (RevGrad) algorithm [15], which optimizes the features to maximize the discriminator loss directly. We point the reader to [15] for more details about this component. The model is trained to jointly maximize the domain confusion (between source and target) and infer the correct category on the source (labeled) samples, through the similarity-based classifier described in the previous section. Therefore, our final goal is to optimize the following minimax objective: min max Lclass (θf , θg , S) + λLdisc (θf , θd ) , θf ,θg ,S θd (7) where λ is a balance parameter between the two losses. The objective is optimized using stochastic gradient descent with momentum. At inference time, the prototypes are computed a priori, following Equation 1, and stored in memory. The similarity between a target-domain test image and each prototype is computed, and the label that best matches the query is outputed. 3.3. Implementation Details The parameters of networks f and g are initialized with a ResNet-50 [25] that was pre-trained to perform classification on the ImageNet dataset [13], and the classification layer is removed. The discriminator network and the bilinear classifier are initialized randomly from a uniform distribution. We set the balance parameter λ = 0.5 and the regularization coefficient γ = 0.1 (we observed that the model is robust to this hyperparameter). We use a learning rate of 10−5 , with a weight decay of 10−5 and momentum of 0.99. Since the similarity matrix and the discriminator are trained from scratch, we set their learning rate to be 10 times that of the other layers. During training, the images (from both domains) are resized such that the shorter dimension is of size 300 pixels and a patch of 224 × 224 is randomly sampled. Each minibatch has 32 images from each domain. At each training iteration, the prototypes are approximated by picking one random sample for each class. We noticed that the training converges with this design choice and it is more efficient. The discriminator is a simple fully-connected network. It contains two layers, each of dimension 1024 and ReLU non-linearity, followed by the domain classifier. It receives as input the output of network f and outputs the probability of which domain the input comes from (this probability is, again, modeled by a softmax). We parametrize the bilinear operation with a low-rank approximation, S = UT V (U, V ∈ Rn×m , m = 512) and Equation 2 becomes: h(xi , µc ) = (Ufi )T · (Vµc ) . (8) This parametrization brings multiple benefits. First, it allows us to control the capacity of the model. Second, it can trivially be implemented in any modern deep learning framework and benefits from an efficient implementation. Finally, it also provides fast inference, as the right side of h is independent of the input image; it can be computed only once and stored in memory. At inference time, the shorter dimensions of the test image is resized to 300 pixels, as in the training stage. The model is applied densely at every location, resulting in an output with spatial dimensions bigger than 1. The output is averaged over the spatial dimensions to get one-dimensional vector. Because the similarity measure is a bilinear operation, the averaging can be seen as an ensemble over different spatial locations of the test image. 4. Experimental Results We evaluate the performance of our model, SimNet, in two important unsupervised domain adaptation datasets and across different domain shifts. Figure 3 illustrates image samples from different datasets and domains. In the experiments, we use all labeled source images and all unlabeled target images, following the standard evaluation protocol for unsupervised domain adaptation [15, 36]. All hyperparameters were chosen via cross-validation. We evaluate the performance of all methods with classification accuracy metric. 4.1. Office-31 Results Office-31 [42] is a standard dataset used for domain adaptation. The dataset contains 4652 images of 31 different categories. The categories are everyday office objects, such as backpack, pen and phone. The images on this dataset belong to three distinct domains: (i) Amazon (A), which contains images from the Amazon website, (ii) DSLR (D) and (iii) Webcam (W), which contains photos taken by a high quality camera and a webcam, respectively (see Figure 3, left). We evaluate the performance of our method in amazon Synthetic dslr Real webcam Office-31 VisDA Figure 3: We evaluate our model on unsupervised domain adaptation across different domains in two dataset. The first setting is over all 6 combinations of domains in Office-31 dataset. The second is on the synthetic-to-real domain shift on VisDA dataset. Method Source Only TCA [38] GFK [19] DDC [50] DAN [34] RTN [35] RevGrad [15] JAN [36] JAN-A [36] SimNet A→W D→W W→D A→D D→A W→A average 60.9 ± 0.0 61.0 ± 0.0 61.5 ± 0.5 62.8 ± 0.2 64.8 ± 0.3 67.4 ± 0.5 70.0 ± 0.4 70.7 ± 0.5 77.6 77.5 78.3 80.4 81.6 82.2 84.3 84.6 68.4 ± 0.2 96.7 ± 0.1 99.3 ± 0.1 68.9 ± 0.2 62.5 ± 0.3 60.7 ± 0.3 76.1 88.6 ± 0.5 98.2 ± 0.2 99.7 ± 0.2 85.3 ± 0.3 73.4 ± 0.8 71.8 ± 0.6 86.2 72.7 ± 0.0 72.8 ± 0.0 75.6 ± 0.2 80.5 ± 0.4 84.5 ± 0.2 82.0 ± 0.4 85.4 ± 0.3 86.0 ± 0.4 96.7 ± 0.0 95.0 ± 0.0 96.0 ± 0.2 97.1 ± 0.2 96.8 ± 0.1 96.9 ± 0.2 97.4 ± 0.2 96.7 ± 0.3 99.6 ± 0.0 98.2 ± 0.0 98.2 ± 0.1 99.6 ± 0.1 99.4 ± 0.1 99.1 ± 0.1 99.8 ± 0.2 99.7 ± 0.1 74.1 ± 0.0 74.5 ± 0.0 76.5 ± 0.3 78.6 ± 0.2 77.5 ± 0.3 79.7 ± 0.4 84.7 ± 0.3 85.1 ± 0.4 61.7 ± 0.0 63.4 ± 0.0 62.2 ± 0.4 63.6 ± 0.3 66.2 ± 0.2 68.2 ± 0.4 68.6 ± 0.3 69.2 ± 0.4 Table 1: Classification accuracy evaluation (%) on Office-31 dataset for unsupervised domain adaptation with different domain pairs. All models utilize ResNet-50 as base architecture. all 6 possible transfer tasks, using the same experimental protocol as [36]. Table 1 compares the performance of our method with other approaches. The first row shows results without any adaptation, where the network is fine-tuned on the source domain and directly applied to the target domain. This serves as a lower bound. Other results are reported from Long et al. [36]. For a fair comparison, all models use the same base architecture, ResNet-50. SimNet beats the previous state of the art in most settings, while being similar in the remaining ones. 4.2. VisDA Results VisDA dataset [39] is focused on simulation-to-real domain shift.1 It contains two very distinct domains: (i) Synthetic, which contains synthetic renderings of 3D models from different angles and with different lightning conditions and (ii) Real, which contains natural images cropped either from COCO [32] (validation) or Youtube-BB [40] (test) datasets (see Figure 3, right). It contains over 280K images across 12 categories in the combined training, validation and test domains. Comparison to other methods: Table 3 shows the performance of different methods on the VisDA dataset, for 1 This dataset also contains segmentation labels, but on this paper we focus on classification task only. aeroplane bicycle bus car horse knife motocycle person plant skateboard train truck average Source Only 67.7 36.6 48.4 68.2 76.9 5.3 65.8 38.0 72.5 29.1 82.1 3.73 49.5 RevGrad-ours SimNet-shared SimNet-no-reg SimNet SimNet-152 75.9 85.7 91.2 92.0 94.3 70.5 51.7 78.7 83.4 82.3 65.3 58.5 69.2 68.4 73.5 17.3 53.4 38.6 42.0 47.2 72.8 74.5 82.5 87.1 87.9 38.6 23.9 22.9 14.5 49.2 58.0 69.7 60.6 74.4 75.1 77.2 68.9 73.6 78.7 79.7 72.5 54.5 78.2 85.7 85.3 40.4 50.9 66.0 77.1 68.5 70.4 76.8 76.3 77.5 81.1 44.7 21.2 39.0 38.2 50.3 58.6 57.5 64.7 68.3 72.9 Train on target 99.5 91.9 97.3 96.8 98.3 98.5 94.1 96.2 99.0 98.2 97.9 82.3 95.8 Table 2: Per-class classification accuracy (%) for different variants of SimNet on VisDA-val. Figure 4: Confusion matrix for source only, SimNet and oracle (trained on target domain) models on the synthetic-to-real adaptation on VisDA-val dataset. Best viewed in color. the synthetic to real (validation set) domain shift.2 Once again, all the experiments are computed using ResNet-50 backbone for fair comparison of the models. The results reported are the average per-class accuracy. Results from other models are taken from Long et al. [36]3 . RevGrad-ours reports our implementation of the RevGrad method [15] (with a ResNet-50 architecture), in which SimNet shares the adversarial learning component. As RevGrad-ours and SimNet were trained with same training setup and discriminator function, we can disentangle the performance improvements achieved by the proposed similarity-based classifier. SimNet achieves almost 10% boost in performance. This result gives us a hint 2 Some non-published results can be found on-line. However, no detail of the methods nor how many tricks were used are mentioned. 3 These values were presented by the authors on the conference where the published paper was presented. that similarity-based classifiers are more robust than typical fully-connected networks when features are subject to domain invariance. VisDA is more challenging than Office-31. The objects in the target domain contains more variability and the domain shift between the two domains is much bigger. Results in Table 3 show that the model scales nicely with the data. SimNet achieves a bigger improvement in performance, compared to previously published state of the art [36], when the scale of the dataset increases. These results are achieved without any inference trick (such as model ensembling, multi-scale inference, etc.). SimNet, when trained with VisDA-test as the target domain and without bells and whistles, achieves a similar performance: 68.66% average per-class accuracy on the test set. Model variants: Table 2 shows the performance of dif- Method Per-class avg. acc. Source Only 49.51 DAN [34] RTN [35] RevGrad [15] JAN [36] JAN-A [36] 53.02 53.56 55.03 61.06 61.62 RevGrad-ours SimNet 58.62 68.25 terms of appearance and semantics are closer in the t-SNE space: ‘bicycle’ and ‘motorcycle’ are very close and ‘truck’ is located between ‘car’ and ‘bus’. Interestingly, SimNet seems to confuse the categories ‘knife’ and ‘skateboard’. source domain Table 3: Per-class average classification accuracy (%) on VisDA-val dataset for unsupervised domain adaptation. All the models utilize ResNet-50 as base architecture. (a) (b) truck train skboard plant person moto knife (c) horse car bus bicycle aeropln ferent versions of SimNet in each of the 12 categories of the VisDA-val. As before, Source Only shows the results when trained on the source images only (this is a lower bound). Train on Target shows results when the model is trained with the labels of the target domain (this can be interpreted as an upper bound). We also show that sharing the weight between the two networks, f and g, hurts the performance (SimNet-shared). The results of SimNet-no-reg emphasis the importance of the regularizer described in Equation 5. The penalty term imposes the prototypes to be orthogonal, which eases the similarity computation. In SimNet-152, we show the results using a ResNet-152 (pre-trained on ImageNet) as base architecture, which pushes the performance even further. This results shows that proposed bilinear classifier is also able to scale with the quality of the features. For more insight on the performance of different categories, we plot different confusion matrices in Figure 4. Feature visualization: Finally, we use t-SNE [51] to visualize feature representations from different domains and at different adaptation stages. Figure 5(a-b) show features from source (blue) and target (red) domains before and after adaptation, respectively. The features become much more domain invariant after adaptation. We observe a strong correspondence in terms of classification performance (on the target domain) and the overlap between the domain distributions. Figure 5(c-d) show features after adaptation from source and target domains, respectively. Each category is encoded by a color and the prototypes are shown as black triangles. As expected, the images on the source domain are separated better than the images from the target domain. We can observe few interesting facts about these plots. First, the similarity measure is well learned for certain categories (‘aeroplane’,‘horse’, ‘plant’). Categories that are similar in target domain (d) Figure 5: (a-b) Image features from source (blue) and target (red) domains, respectively. The adaptation makes the the distribution of features much closer. (c-d) Image features after adaptation from source and target domain, respectively. Each category is encoded by a color and the prototypes are shown as black triangles. Best viewed in color. 5. Conclusion In this paper we propose SimNet, a neural network model fur unsupervised domain adaptation using a similarity-based classifier. We show that similarity learning, together with feature learning, can outperform by a large margin the ‘standard’ fully-connected classifier in the problem of domain adaptation. The method is simple and highly effective. We demonstrate its efficacy by applying it in different unsupervised adaptation problems, achieving new state-of-the-art performance in multiple scenarios. Future works include applying the model in different modalities of domain adaptation (e.g. semantic segmentation, object detection) and with different domain discrepancy reduction algorithms (such as MMD and its variants). It would also be interest to explore how the similarity-based classifier can scale to a larger number of categories and training samples. Acknowledgements. I thank Negar Rostamzadeh, Thomas Bosquet and Ishmael Belghazi for helpful discussions and encouragement, and Philippe Mathieu and Jean Raby for help with computational infrastructure. References [1] H. Ajakan, P. Germain, H. Larochelle, F. Laviolette, and M. Marchand. Domain-adversarial neural networks. 2014. 2, 3 [2] J. S. andKevin Swersky andRichard S. Zemel. Prototypical networks for few-shot learning. 2017. 2 [3] M. Baktashmotlagh, M. T. Harandi, B. C. Lovell, and M. Salzmann. Unsupervised domain adaptation by domain invariant projection. In ICCV, 2013. 2 [4] A. Bellet, A. Habrard, and M. Sebban. A survey on metric learning for feature vectors and structured data. arXiv, 2013. 2 [5] S. Ben-David, J. Blitzer, K. Crammer, A. Kulesza, F. Pereira, and J. W. Vaughan. A theory of learning from different domains. Machine Learning, 2010. 2 [6] S. Ben-david, J. Blitzer, K. Crammer, and O. Pereira. Analysis of representations for domain adaptation. In NIPS, 2007. 2 [7] K. Bousmalis, N. Silberman, D. Dohan, D. Erhan, and D. Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In CVPR. 3 [8] K. Bousmalis, G. Trigeorgis, N. Silberman, D. Krishnan, and D. Erhan. Domain separation networks. In NIPS, 2016. 2, 3 [9] J. Bridle. Probabilistic interpretation of feedforward classification network outputs, with relationships to statistical pattern recognition. Neurocomputing: Algorithms, Architectures and Applications, 1990. 4 [10] G. Chechik, V. Sharma, U. Shalit, and S. Bengio. Large scale online learning of image similarity through ranking. Journal of Machine Learning Research, 2010. 2 [11] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005. 2, 4 [12] G. Csurka. A comprehensive survey on domain adaptation for visual applications. In Domain Adaptation in Computer Vision Applications. 2017. 2 [13] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR, 2009. 5 [14] Y. Ganin and V. S. Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, 2015. 3 [15] Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, H. Larochelle, F. Laviolette, M. Marchand, and V. S. Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 2016. 2, 3, 5, 6, 7, 8 [16] A. Globerson and S. Roweis. Metric learning by collapsing classes. In NIPS, 2005. 2 [17] J. Goldberger, G. E. Hinton, S. T. Roweis, and R. R. Salakhutdinov. Neighbourhood components analysis. In NIPS. 2005. 2 [18] B. Gong, K. Grauman, and F. Sha. Connecting the dots with landmarks: Discriminatively learning domaininvariant features for unsupervised domain adaptation. In ICML, 2013. 2 [19] B. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In CVPR, 2012. 6 [20] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, 2014. 3 [21] R. Gopalan, R. Li, and R. Chellappa. Domain adaptation for object recognition: An unsupervised approach. In ICCV, 2011. 2 [22] A. Gretton, K. Borgwardt, M. Rasch, B. Schölkopf, and A. Smola. A kernel two-sample test. Journal of Machine Learning Research, 2012. 2, 3 [23] A. Gretton, A. Smola, J. Huang, M. Schmittfull, K. Borgwardt, and B. Schölkopf. Covariate shift and local learning by distribution matching. 2009. 2 [24] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask R-CNN. In ICCV, 2017. 1 [25] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. 1, 5 [26] J. Huang, A. Gretton, K. M. Borgwardt, P. B. Schölkopf, and A. J. Smola. Correcting sample selection bias by unlabeled data. In NIPS, 2007. 2 [27] J. Jiang and C. Zhai. Instance weighting for domain adaptation in nlp. In ACL, 2007. 2 [28] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. 1 [29] B. Kulis, K. Saenko, and T. Darrell. What you saw is not what you get: Domain adaptation using asymmetric kernel transforms. In CVPR, 2011. 2 [30] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, 1998. 1, 2 [31] T. Lin, P. Goyal, R. B. Girshick, K. He, and P. Dollár. Focal loss for dense object detection. In ICCV, 2017. 1 [32] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollr, and C. L. Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. 6 [33] M.-Y. Liu and O. Tuzel. Coupled generative adversarial networks. In NIPS, 2016. 3 [34] M. Long, Y. Cao, J. Wang, and M. I. Jordan. Learning transferable features with deep adaptation networks. In ICML, 2015. 2, 3, 6, 8 [35] M. Long, H. Zhu, J. Wang, and M. I. Jordan. Unsupervised domain adaptation with residual transfer networks. In NIPS, 2016. 6, 8 [36] M. Long, H. Zhu, J. Wang, and M. I. Jordan. Deep transfer learning with joint adaptation networks. In ICML, 2017. 2, 3, 5, 6, 7, 8 [37] T. E. J. Mensink, J. Verbeek, F. Perronnin, and G. Csurka. Distance-based image classification: Generalizing to new classes at near zero cost. PAMI, 2013. 2 [38] S. J. Pan, I. W. Tsang, J. T. Kwok, and Q. Yang. Domain adaptation via transfer component analysis. Transactions on Neural Networks, 2011. 2, 6 [39] X. Peng, B. Usman, N. Kaushik, J. Hoffman, and D. Wang. Visda: The visual domain adaptation challenge. In arXiv, 2017. 2, 6 [40] E. Real, J. Shlens, S. Mazzocchi, X. Pan, and V. Vanhoucke. Youtube-boundingboxes: A large highprecision human-annotated dataset for object detection in video. 2017. 6 [41] O. Rippel, M. Paluri, P. Dollr, and L. D. Bourdev. Metric learning with adaptive density discrimination. ICLR, 2015. 2 [42] K. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In ECCV, 2010. 2, 5 [43] R. Salakhutdinov and G. E. Hinton. Learning a nonlinear embedding by preserving class neighbourhood structure. In AISTATS, 2007. 2 [44] M. Salzmann, C. H. Ek, R. Urtasun, and T. Darrell. Factorized orthogonal latent spaces. In AISTATS, 2010. 2 [45] B. Sun, J. Feng, and K. Saenko. Return of frustratingly easy domain adaptation. In AAAI, 2016. 2 [46] B. Sun and K. Saenko. Deep CORAL: correlation alignment for deep domain adaptation. In ECCV 2016 Workshops, 2016. 2, 3 [47] A. Torralba and A. A. Efros. Unbiased look at dataset bias. In CVPR, 2011. 1 [48] E. Tzeng, J. Hoffman, T. Darrell, and K. Saenko. Simultaneous deep transfer across domains and tasks. In ICCV, 2015. 2, 3 [49] E. Tzeng, J. Hoffman, K. Saenko, and T. Darrell. Adversarial discriminative domain adaptation. 2017. 2, 3 [50] E. Tzeng, J. Hoffman, N. Zhang, K. Saenko, and T. Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv, 2014. 2, 3, 6 [51] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 2008. 8 [52] O. Vinyals, A. Toshev, S. Bengio, and D. Erhan. Show and tell: A neural image caption generator. In CVPR, 2015. 1 [53] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 2009. 2 [54] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. Russell. Distance metric learning, with application to clustering with side-information. In NIPS, 2003. 2
1cs.CV
ON A CONJECTURE BY KALAI arXiv:1212.3726v1 [math.AC] 15 Dec 2012 GIULIO CAVIGLIA, ALEXANDRU CONSTANTINESCU, AND MATTEO VARBARO Abstract. We show that monomial ideals generated in degree two satisfy a conjecture by Eisenbud, Green and Harris. In particular we give a partial answer to a conjecture of Kalai by proving that h-vectors of flag Cohen-Macaulay simplicial complexes are h-vectors of CohenMacaulay balanced simplicial complexes. 1. Introduction An unpublished conjecture of Gil Kalai, recently verified by Frohmader [Fr], states that for any flag simplicial complex ∆ there exists a balanced simplicial complex Γ with the same f vector. Here a (d − 1)-simplicial complex is balanced if you can use d colors to label its vertices so that no face contains two vertices of the same colour. Kalai’s conjecture has also a second part which is still open: If ∆ happens to be Cohen-Macaulay (CM), then Γ is required to be CM as well. In this note we show that for any CM flag simplicial complex ∆ there exists a CM balanced simplicial complex Γ with the same h-vector. Such a result has been proved in [CV, Theorem 3.3] under the additional assumption that ∆ is vertex decomposable. Other recent developments concerning Kalai’s conjecture and related topics can be found in [CN, BV]. To this purpose we will show a stronger statement, Theorem 2.1, namely that the Eisenbud-Green-Harris conjecture (EGH) holds for quadratic monomial ideals. Let S = K[x1 , . . . , xn ] be a polynomial ring over a field K. The EGH conjecture, in the general form, states that for every homogeneous ideal I of S containing a regular sequence f1 , . . . , fr of degrees d1 ≤ · · · ≤ dr there exists a homogeneous ideal J ⊆ S, with the same Hilbert function as I (i.e. HFI = HFJ ) and containing xd11 , . . . , xdr r . Furthermore, by a theorem of Clements and Lindstöm [CL], the ideal J, when it exists, can be chosen to be the sum of the ideal (xd11 , . . . , xdr r ) and a lex-segment ideal of S. We refer to [EGH1] and [EGH2] for the original formulation of this conjecture. The only large classes for which the EGH conjecture P is known are: when f1 , . . . , fr are Gröbner basis (by a deformation argument), when di > j<i (dj − 1) for all i = 2, . . . , r ([CM]) and when each fi factors as product of linear forms ([Ab, Corollary 4.3] for the case r = n, and [Ab] together with [CM, Proposition 10] for the general case). 2. The result Theorem 2.1. Let I ⊆ S = K[x1 , . . . , xn ] be a monomial ideal generated in degree 2, of htI = g. There exists a monomial ideal J ∈ S, such that (x21 , . . . , x2g ) ⊆ J and HFI = HFJ . Furthermore J can be chosen with the same projective dimension as I. Proof. Since the Hilbert function and the projective dimension are invariant with respect to field extension, we can assume without loss of generality that K is infinite We will prove that Date: November 17, 2017. 2010 Mathematics Subject Classification. 13D40, 13F55, 05E45. Key words and phrases. h-vector and face vector and Cohen Macaulay simplicial complex and flag simplicial complex, EGH conjecture, regular sequences . The work of the first author was supported by a grant from the Simons Foundation (209661 to G. C.). The authors thank the Mathematical Sciences Research Institute, Berkeley CA, where this work was done, for support and hospitality during Fall 2012 . 1 2 G. CAVIGLIA, A. CONSTANTINESCU, AND M. VARBARO I contains a regular sequence of the form x1 ℓ1 , . . . , xg ℓg , where ℓi is a linear form for every i ∈ [g] = {1, . . . , g}. Then we will infer the theorem by a result in [Ab]. Without loss of generality we may assume that (x1 , . . . , xg ) is a minimal prime of I. Thus, we may decompose the degree 2 component of I as I2 = x1 V1 ⊕ . . . ⊕ xg Vg , where each Vi is a linear space generated by indeterminates. Our goal is to find g linear forms ℓi ∈ Vi , such that: (*) for all A ⊆ [g], the K-vector space hxi : i ∈ Ai + hℓi : i ∈ [g] \ Ai has dimension g. To see that (*) is equivalent to x1 ℓ1 , . . . , xg ℓg being a S-regular sequence (from now on we will just write regular sequence for S-regular sequence), consider the following short exact sequence (where C = (x1 ℓ1 , . . . , xg ℓg )): 0 → K[x1 , . . . , xn ]/(C : ℓg )(−1) → K[x1 , . . . , xn ]/C → K[x1 , . . . , xn ]/(C + (ℓg )) → 0. By induction on the number of variables, both the extremes of the above exact sequence are graded modules of Krull dimension ≤ n − g. By looking at the Hilbert polynomials, K[x1 , . . . , xn ]/C has dimension ≤ n − g too, that is possible only if C is a complete intersection. So we Q have to seek ℓi ∈ Vi satisfying (*). Let A = {i1 , . . . , ia } be a subset of [g]. We define UA ⊆ i∈A Vi to be the following set: Y UA = {(vi1 , . . . , via ) ∈ Vi : hvi1 , . . . , via i + hxj : j ∈ [g] \ Ai has dimension g}. i∈A As the condition of linear dependence is obtained by imposing certain determinantal relations to Q eA below is a Zariski open set of Qg Vi be zero, UA is a Zariski open set of i∈A Vi . Thus the U i=1 eA = UA × U Y Vi ⊆ g Y Vi . i=1 i∈[g]\A This construction can be done for every A ⊆ [g], and thus we can define the open set U= \ A⊆[g] eA ⊂ U g Y Vi . i=1 AnyQelement (ℓ1 , . . . , ℓg ) ∈ U will automatically satisfy (*), so our goal is to show that U 6= ∅. As gi=1 Vi is irreducible, it is enough to show that all the open sets UA ’s are nonempty. For any A ⊆ [g] we have (1) dimK X i∈A Vi + X  hxj i ≥ g, j∈[g]\A P P otherwise ( i∈A Vi + j∈[g]\A hxj i) would be a prime ideal containing I of height < g. Given A ⊆ [g], we define a bipartite graph GA . The vertex set of GA has the following partition: V (GA ) = {x1 , . . . , xn } ∪ {1, . . . , g}, and the edge set of GA is given by:  xi ∈ Vj , if j ∈ A {xi , j} ∈ E(GA ) ⇐⇒ i=j , if j ∈ /A We fix A and prove that GA satisfies the hypothesis of the Marriage Theorem. For a subset B ⊆ V (GA ), we denote by N (B) the set of vertices adjacent to some vertex in B. Choose now B ⊆ {1, . . . , g}. By applying (1) to the set A ∩ B ⊆ [g] we can deduce that   X X dimK Vi + hxj i ≥ |B|, i∈A∩B j∈([g]\A)∩B ON A CONJECTURE BY KALAI 3 Furthermore notice that the dimension of the above vector space is |N (B)|, thus we can apply the Marriage Theorem and infer the existence of a matching in GA of the form {xij , j}j∈[g] . Therefore UA is nonempty as it contains (xij : j ∈ A). So we found a regular sequence of quadrics f1 , . . . , fg in I consisting of products of linear forms. Let pd(I) be the projective dimension of I and assume that pd(I) = p − 1. By applying a linear change of coordinates, we may assume that xp+1 , . . . , xn is a S/I-regular sequence. Going modulo (xp+1 , . . . , xn ), the image I ′ ⊆ K[x1 , . . . , xp ] of I may not be monomial, but still contains a regular sequence of quadrics which are products of linear forms, namely the image of f1 , . . . , fg . So we find J ′ ⊆ K[x1 , . . . , xp ] containing (x21 , . . . , x2g ) with the same Hilbert function of I ′ by [Ab, Corollary 4.3] and [CM, Proposition 10]. Clearly pd(J ′ ) ≤ p − 1, but we can actually choose J ′ such that pd(J ′ ) = p − 1 by [CS, Theorem 4.4]. Defining J = J ′ K[x1 , . . . , xn ]  we have (x21 , . . . , x2g ) ⊆ J, pd(J) = pd(I) and HFI = HFJ . The following example shows that the above proof cannot be extended to prove EGH for all monomial ideals. Example 2.2. The ideal I = (x21 x2 , x22 x3 , x1 x23 ) ⊆ K[x1 , x2 , x3 ] does not contain a regular sequence of the form ℓ1 ℓ2 ℓ3 , q1 q2 q3 , where all ℓi and qj are linear forms. Elementary direct computations allow one to see that the generators are the only products of three linear forms, which are contained in I. Clearly any choice of two of them does not produce a regular sequence. The following corollary is the main motivation for this note. Corollary 2.3. For any CM flag simplicial complex ∆ there exists a CM balanced simplicial complex Γ with the same h-vector. Proof. Let g be the height of the Stanley-Reisner ideal I∆ . By Theorem 2.1, there exists a CM ideal J ⊆ S, containing (x21 , . . . , x2g ) and with the same Hilbert function as I∆ . Since J is unmixed, it has to be the extension to S of a monomial ideal J ′ ⊆ K[x1 , . . . , xg ]. Hence HFK[x1,...,xg ]/J ′ equals the h-vector of ∆. The CM balanced Γ is the simplicial complex associated to the polarization of J ′ .  References [Ab] A. Abedelfatah, On the Eisenbud-Green-Harris conjecture, arXiv:1212.2653v1 [math.AC], 2012. [BV] J. Biermann, A. Van Tuyl, Balanced vertex decomposable simplicial complexes and their h-vectors, arXiv:1202.0044 [math.AC], 2012. [CM] G. Caviglia, D. Maclagan, Some cases of the Eisenbud-Green-Harris conjecture, Math. Res. Lett. 15 (2008), no. 3, 427-433. [CS] G. Caviglia, E. Sbarra, The lex-plus-power inequality for local cohomology modules, arXiv:1208.2187, 2012. [CL] G. F. Clements, B. Lindström, A generalization of a combinatorial theorem of Macaulay, J. Combinatorial Theory 7, 230-238, 1969. [CN] D. Cook II, U. Nagel, Cohen-Macaulay Graphs and Face Vectors of Flag Complexes, SIAM J. Discrete Math. 26, 89-101, 2012. [CV] A. Constantinescu, M. Varbaro, On the h-vectors of Cohen-Macaulay Flag Complexes, Math. Scand., to appear. [EGH1] D. Eisenbud, M. Green and J. Harris, Higher Castelnuovo Theory, Asterisque 218, 187-202, 1993. [EGH2] D. Eisenbud, M. Green and J. Harris, Cayley-Bacharach theorems and conjectures, Bull. Amer. Math. Soc. (N.S.) 33, no. 3, 295-324, 1996. [Fr] A. Frohmader, Face Vectors of Flag Complexes, Israel J. Math. 164, 153-164, 2008. Department of Mathematics, Purdue University 150 N. University Street, West Lafayette, IN 47907-2067 E-mail address: [email protected] Institut de Mathématiques, Universitè de Neuchâtel Bâtiment UniMail, Rue Emile-Argand 11 2000 Neuchâtel - Switzerland E-mail address: [email protected] Dipartimento di Matematica, Università degli Studi di Genova, Via Dodecaneso 35, 16146, Italy E-mail address: [email protected]
0math.AC
The Incredible Shrinking Neural Network: New Perspectives on Learning Representations through the Lens of Pruning arXiv:1701.04465v2 [cs.NE] 25 Nov 2017 Aditya Sharma Nikolas Wolfe Bhiksha Raj Carnegie Mellon University, 5000 Forbes Avenue, Pittsburgh, PA 15213 USA Abstract How much can pruning algorithms teach us about the fundamentals of learning representations in neural networks? And how much can these fundamentals help while devising new pruning techniques? A lot, it turns out. Neural network pruning has become a topic of great interest in recent years, and many different techniques have been proposed to address this problem. The decision of what to prune and when to prune necessarily forces us to confront our assumptions about how neural networks actually learn to represent patterns in data. In this work, we set out to test several long-held hypotheses about neural network learning representations, approaches to pruning and the relevance of one in the context of the other. To accomplish this, we argue in favor of pruning whole neurons as opposed to the traditional method of pruning weights from optimally trained networks. We first review the historical literature, point out some common assumptions it makes, and propose methods to demonstrate the inherent flaws in these assumptions. We then propose our novel approach to pruning and set about analyzing the quality of the decisions it makes. Our analysis led us to question the validity of many widely-held assumptions behind pruning algorithms and the trade-offs we often make in the interest of reducing computational complexity. We discovered that there is a straightforward way, however expensive, to serially prune 40-70% of the neurons in a trained network with minimal effect on the learning representation and without any re-training. It is to be noted here that the motivation behind this work is not to propose an algorithm that would outperThis work is being published on arXiv only. Copyright and ownership of the work remains with the authors. Please use appropriate citation when distributing and/or referencing this work. ADITYAS 2@ ALUMNI . CMU . EDU NWOLFE @ CS . CMU . EDU BHIKSHA @ CS . CMU . EDU form all existing methods, but to shed light on what some inherent flaws in these methods can teach us about learning representations and how this can lead us to superior pruning techniques. 1. Introduction and Literature Review Representation of Learning has always been a topic of curiosity in the world of Artificial Neural Networks. It is something that certainly warrants more attention and analysis than it currently receives. It seems very intuitive that the knowledge of how learning is represented in a network of neurons should prove to be useful in developing algorithms. Unfortunately a vast majority of work done in the highly popular fields of Artificial Neural Networks and Deep Learning doesn’t focus on leveraging this knowledge. One category of algorithms that can certainly leverage this information and yet surprisingly hasn’t is pruning techniques. Neural Network Pruning gained some popularity in the early 90s and after a period of dormancy has recently regained some momentum. In the current work we take a deep dive into existing literature on the topic, both historical and modern, and recognize some areas of failure arising from fundamentally flawed assumptions about learning representations. We then argue in favor of a novel approach to pruning and demonstrate through experiments the superiority of this new way of thinking. We would like to note here that this work does not aim to propose an exact new superior pruning algorithm, but a new way of approaching the subject which isn’t flawed in its assumptions and hence promises to perform better, which we empirically demonstrate. We begin our exploratory journey in 1989, jumping off from an insightful though largely forgotten observation by (Mozer & Smolensky, 1989a) concerning the nature of neural network learning. This observation is best summarized in a quotation from (Segee & Carter, 1991) on the notion of fault-tolerance in multi-layer perceptron networks: The Incredible Shrinking Neural Network Contrary to the belief widely held, multilayer networks are not inherently fault tolerant. In fact, the loss of a single weight is frequently sufficient to completely disrupt a learned function approximation. Furthermore, having a large number of weights does not seem to improve fault tolerance. [Emphasis added] Essentially, (Mozer & Smolensky, 1989b) observed that during training, neural networks do not distribute the learning representation evenly or equitably across hidden units. By making this observation alone, this work put itself miles ahead of a lot of work in pruning that followed in the coming two decades. It was a very straightforward observation and yet raised a lot of interesting questions, many of which remain unanswered even today. It largely talked about the relevance of individual neurons in a network and argued that it is only a few, elite neurons that learn an approximation of the input-output function, and hence the remaining useless neurons could be trimmed to produce a skeleton network. They however, do not go into the details of why this happens or what exactly is the role of these other noisy neurons, if any. We will go a little deeper into this discussion later in this work. 1.1. Compressing Neural Networks Pruning algorithms, as comprehensively surveyed by (Reed, 1993), are a useful set of heuristics designed to identify and remove elements from a neural network which are either redundant or do not significantly contribute to the output of the network. This is motivated by the observed tendency of neural networks to overfit to the idiosyncrasies of their training data given too many trainable parameters or too few input patterns from which to generalize, as stated by (Chauvin, 1990). (Baum & Haussler, 1989) demonstrate that there is no way to precisely determine the appropriate size of a neural network a priori given any random set of training instances. Using too few neurons seems to inhibit learning, and so while using pruning techniques in practice it is common to attempt to over-parameterize networks initially using a large number of hidden units and weights, and then prune or compress these fully-trained networks as necessary. Of course, as the old saying goes, there’s more than one way to skin a neural network. The idea of Skeletonization inspired others to look into the world of faster and better generalization that pruning techniques promised. However in doing so, they somehow lost the essence of the most important result put forward by (Mozer & Smolensky, 1989a) regarding learning representations and instead focused on improving generalization and memory usage through fast and easy pruning of network elements. Optimal Brain Damage (LeCun et al., 1989) was one such algorithm that quickly became very popular, as did its later variants such as Optimal Brain Surgeon (Hassibi & Stork, 1993). These algorithms took a weight centric pruning approach which quickly became the de facto standard for almost all the work that followed, while the original ideas put forward by (Mozer & Smolensky, 1989a) were largely forgotten. In the years to come, pruning algorithms paved the way for model compression algorithms. Model compression often has benefits with respect to generalization performance and the portability of neural networks to operate in memoryconstrained or embedded environments. Without explicitly removing parameters from the network, weight quantization allows for a reduction in the number of bytes used to represent each weight parameter, as investigated by (Balzer et al., 1991), (Dundar & Rose, 1994), and (Hoehfeld & Fahlman, 1992). A recently proposed method for compressing recurrent neural networks (Prabhavalkar et al., 2016) uses the singular values of a trained weight matrix as basis vectors from which to derive a compressed hidden layer. (Øland & Raj, 2015) successfully implemented network compression through weight quantization with an encoding step while others such as (Han et al., 2016) have tried to expand on this by adding weight-pruning as a preceding step to quantization and encoding. Since (Mozer & Smolensky, 1989a), other heuristics affecting the generalization behavior of neural networks have been well studied too, and have been used to avoid overfitting, such as dropout (Srivastava et al., 2014), maxout (Goodfellow et al., 2013), and cascade correlation (Fahlman & Lebiere, 1989), among others. Of course, while cascade correlation specifically tries to construct minimal networks, many techniques that try to improve network generalization do not explicitly attempt to reduce the total number of parameters or the memory footprint of a trained network per se. In summary, we can see how since the ideas put forth by (Mozer & Smolensky, 1989a) back in 1989 the research in this area went on a tangential path which led to most of our popular pruning techniques today. In subsequent sections of this paper, we will look deeper into the original ideas from 1989, try to answer some questions that were left unanswered, demonstrate how not leveraging these original ideas introduced fundamental flaws in today’s pruning techniques, and finally make a case for using learning representations to drive decision making in pruning algorithms. Through our experiments we not only concretely validate the theory put forth by (Mozer & Smolensky, 1989b) but we also successfully build on it to show that it is possible to prune networks to 40 to 70 % of their original size without any major loss in performance. The Incredible Shrinking Neural Network 2. Pruning Neurons to Shrink Networks 2.1. Why Prune Neurons Instead of Pruning Weights? It is surprising that despite the promising ideas presented by (Mozer & Smolensky, 1989a) regarding the role of individual neurons in the overall network performance, it was weight pruning that became popular instead. The more one thinks about it, the more one begins to realize why pruning neurons sounds more logical than pruning weights. We look into some of these reasons here. First is the original argument itself made by (Mozer & Smolensky, 1989a). Not all neurons are equal, some of them contribute more than the others, so it makes logical sense to free up space by completely getting rid of these unimportant neurons. Contrast this with eliminating weights, where the pruning criteria relies on some function of actual weight values. At no point during weight-pruning you are getting rid of whole neurons. One might argue that unimportant neurons will end up being removed automatically in a weight-pruning approach as their weights will have low values, but it was demonstrated by (Mozer & Smolensky, 1989b) that this is very much not the case. The actual values of the weights emanating from a neuron have nothing to do with its contribution to the overall performance of the network. Even if a weight-pruning algorithm managed to completely remove a neuron, it might end up being an important neuron which would disrupt the network completely. Second, again a quite obvious reason, pruning neurons as opposed to individual weights frees up more space since you eliminate all incoming and outgoing weights from the pruned neuron in one go. The removal of a single weight from a large network is a drop in the bucket in terms of reducing a network’s core memory footprint. Somewhat tied to this is the third reason, pruning neurons instead of weights means that you have far fewer (orders of magnitude less) number of elements to consider during the pruning process itself, which makes it much cheaper computationally. Pruning neurons has a practical advantage in terms of quickly reaching a hypothetical target reduction in memory consumption. Fourth, as touched upon in the first reason, the values of individual weights have nothing to do with the relevance of the corresponding neurons. The neurons represent learning, the weights are just a means of storing this learning in memory by splitting it into smaller pieces used to interact with other neurons. Weights provide little information about learning individually and it is their interaction with connected neurons that makes their existence meaningful, a fact that most weight-pruning algorithms tend to overlook. In fact, this is a major drawback in the case of quantizationbased algorithms as these methods completely disregard the individual role of neurons and focus solely on quantizing weight values. Lastly, if you look at it in terms of features, each neuron learns exactly one feature, with the features becoming more complex as you move to layers closer to the output. As in any Machine Learning problem, many of these features are redundant, the “Train Problem” discussed in (Mozer & Smolensky, 1989b) is a very good basic example of this. In practice, these redundant features should be removed (which is usually done in a “feature engineering” step in classic ML techniques) as they add noise, increase training time and lead to wrong generalization. In neural networks, which have a more end-to-end architecture as compared to classic ML techniques, this can only be achieved by removing whole neurons. In contrast, pruning weights only modifies such features thereby removing their redundant components, but doesn’t take into account the overall relevance of the feature and hence never completely removes it. 2.2. Setting up the experiments Now that we have an understanding of how pruning algorithms evolved over the years, some faulty assumptions they made about learning representations, and finally, the benefits of pruning whole neurons instead of individual weights, we are ready to look deeper into the mechanics of popular pruning algorithms. We will look at some other assumptions they make and experimentally analyze their performance when compared to a very simple brute-force based approach which carefully takes into consideration the role of learning representations while pruning networks. Since we have already discussed the benefits of pruning neurons over weights, all experiments presented in this paper will use neuron pruning. We will also not experimentally evaluate algorithms that quantize weights and compress networks because one, they are not exactly pruning algorithms and two, their biggest fundamental flaw has already been discussed while making the argument against weight pruning earlier in this section. It is beyond the scope of this paper to do an empirical analysis of every single pruning algorithm out there. We could have selected a top few popular algorithms for our comparisons but that would defeat the central purpose of this work, which is to look for major flaws in the fundamental assumptions made by these algorithms. This requires an approach that is representative of the central ideas used by most, if not all of these existing algorithms. 2.2.1. L INEAR AND Q UADRATIC A PPROXIMATION A PPROACH The overall structure of most pruning algorithms is pretty much the same: you rank individual elements (weights or neurons) based on some criteria (usually related to the el- The Incredible Shrinking Neural Network ement’s impact on the network error) and keep trimming away the least relevant elements until you see a drop in performance. The overall impact of an element on the network performance in these algorithms is typically represented by a linear or quadratic approximation of change in error. We will compare both these approaches to our simple bruteforce approach. The experiments presented in this work will follow a ranking-based procedure very similar to most popular pruning techniques. The linear and quadratic error estimates were derived using a Taylor Series representation of the network error, very similar to what (Mozer & Smolensky, 1989a) did in their original work. The math involved for the quadratic estimate is somewhat complicated, as is its implementation which includes gradients collected from second-order back-propagation and hence, we will not go into the details of either in the main body of the paper. All these details however, are provided in the Supplementary Material as an Appendix for readers who might be interested in pursuing and implementing this. 2.2.2. B RUTE F ORCE R EMOVAL A PPROACH This is perhaps the most intuitive, naive and yet the most accurate method for pruning a network, but surprisingly, not very popular, perhaps due to its time complexity. It does not make any assumptions about the learning representations in the network, nor does it make any approximate estimates about the impact of individual elements on the network’s output, which make it a perfect candidate to serve as the ground truth for our experiments. This method explicitly evaluates each neuron in the network. The idea is to manually check the effect of every single neuron on the output. This is done by running a forward propagation on the validation set K times (where K is the total number of neurons in the network), turning off exactly one neuron each time (keeping all other neurons active) and noting down the change in error. 2.2.3. N EURON I NTER - DEPENDENCIES Something that was briefly touched upon in the Section 1 was the fact that while the findings of (Mozer & Smolensky, 1989a) about learning representations were of great significance, one important question remained unanswered: Do the noisy/unimportant neurons have a role to play once the network is trained? Although there is no empirical evidence to support their role during the training process itself, one can still easily imagine the necessity to include these extra neurons to aid better generalization. However, their role after the network is trained is something we would like to explore. (Mozer & Smolensky, 1989a) proved that these neurons don’t really contribute to the network output (which is why we prune them), but does their existence impact the other neurons in some way? In order to find out, we begin our experiments exactly where (Mozer & Smolensky, 1989a) left off, and we don’t assume these unnecessary neurons to have any impact on each other or the relevant neurons. We use Algorithm 1 to verify how correct this assumption is. We will analyze our observations and follow them up with with further experiments in the next section. The idea here is to generate a single ranked list based on the values of ∆Ek , the Taylor Series approximation of the change in the overall error of the network due to the neuron k. This involves a single pass of second-order back-propagation (without weight updates) to collect the gradients for each neuron. The neurons from this rank-list (with the lowest values of ∆Ek ) are then pruned according to the stopping criterion decided. Algorithm 1 Single Overall Ranking Data: An optimally trained network, training dataset Output:A pruned network Initialize and define stopping criterion; Perform forward propagation over the training set; Perform second-order back-propagation without updating weights and collect linear and quadratic gradients; Rank the remaining neurons based on ∆Ek ; while stopping criterion is not met do Remove the last ranked neuron; end while 3. Experimental Results & Discussion For most experiments presented in this section, the MNIST database of Handwritten Digits by (LeCun & Cortes, 2010) was used. It is worth noting that due to the time taken by the brute force algorithm we used a 5000 image subset of the MNIST database in which we normalized the pixel values between 0 and 1.0, compressed the image sizes to 20x20 images rather than 28x28, and used a 1 or 2-layer fully connected feedforward neural network with a total of 100 neurons and sigmoid activation, so the starting test accuracy reported here appears higher than those reported by LeCun et al. This modification does not affect the interpretation of the presented results because the fundamental learning problem does not change with a larger dataset or input dimension or network architecture. Also, as has been pointed out multiple times before, the aim of this work is not to propose a superior algorithm, but to point out flaws in the assumptions that existing algorithms make by means of the better performing brute force method, hence the choice of dataset does not impact our results. Wherever necessary, some other toy datasets have also been used to empirically verify some novel theoretical insights presented in the previous sections of this work. The sigmoid activation function was chosen since it makes estimating gradients easy (as compared to a ReLU activation function), and more importantly because it has been the popular choice The Incredible Shrinking Neural Network historically, which helps us make sure our experiments are representative of the older pruning techniques as well. 3.1. Neuron Inter-dependencies We start off by trying to answer the question we put forth at the end of the Section 2. Do the irrelevant neurons in a network still have a role to play after the training is completed? As mentioned before, we first start off by assuming that the answer to the question is no, simply because we saw no historical evidence that suggested otherwise. We present the results for a single-layer neural network in Figure 1, using Single Overall Ranking (Algorithm 1) as proposed in Section 2. After training, each neuron is assigned its permanent ranking based on the three criteria discussed previously: A brute force “ground truth” ranking, and the linear and quadratic error approximations that represent popular existing techniques in principle. 8000 6000 5000 4000 3000 2000 1000 0 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 7000 Sum of Squared Errors Sum of Squared Errors 8000 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 7000 6000 5000 4000 3000 2000 1000 0 20 40 60 Percentage of Neurons Removed 80 100 0 0 20 40 60 Percentage of Neurons Removed 80 100 Figure 1. Degradation in squared error after pruning a 1-layer network (left) and a 2-layer network (right) using The Single Overall Ranking algorithm (Network 1: 1 layer, 100 neurons, starting test accuracy: 0.998; Network 2: 2 layers, 50 neurons/layer, starting test accuracy: 1.000) As can be observed, none of the three approaches perform well at all. The performance starts dropping as soon as neurons are removed according to the ranked list. This is a very important result, although not unexpected. This behavior implies that there is a flaw in our assumption that the irrelevant neurons have no role to play in the network’s performance post-training. We performed the same experiment on other toy datasets and we got the same results. These results answer the question posed at the beginning of this section. These irrelevant neurons do have a role to play post-training. Their existence is somehow linked to the performance of the relevant neurons, and as (Segee & Carter, 1991) assert, the removal of any single hidden unit at random can actually result in a network fault. We have empirically, if not numerically, proved the role of these irrelevant units but this makes us wonder if it is possible, without going into the mathematics of the inter-neural relationships, to come up with a way to still prune networks efficiently. What we did wrong in the experiment above was ignore the fact that after a neuron is removed, no matter how irrelevant its existence was to the overall performance, it does have an impact on the performance of the other neurons, some of which might be highly relevant in the overall context. Keeping that, and the intriguing fault tolerance (or lack thereof) of trained neural networks in mind, we decided to modify our algorithm. In this greedy variation of the algorithm (Algorithm 2), after each neuron removal, the remaining network undergoes a single forward and backward pass of second-order back-propagation (without weight updates) and the rank list is formed again. Hence, each removal involves a new pass through the network. This method takes into account the dependencies the neurons might have on one another each time the rank list is re-formed and relies on the low fault tolerance of the network which disallows large error drops that might come with the removal of a neuron, but only as long as all the relevant neurons are still intact. Algorithm 2 Iterative Re-Ranking Data: An optimally trained network, training dataset Output:A pruned network Initialize and define stopping criterion; while stopping criterion is not met do Perform forward propagation over the training set; Perform second-order back-propagation without updating weights and collect linear and quadratic gradients; Rank the remaining neurons based on ∆Ek ; Remove the worst neuron based on the ranking; end while 3.2. Example Regression Problem Even though the results above decisively prove the significance of irrelevant neurons, they still do not prove the fact that neuron pruning is actually possible. So far we have considered the results from (Mozer & Smolensky, 1989a) as the gospel truth. Since these results have been long forgotten, and since most of the reasons cited by us in favor of the novel approach of pruning whole neurons in Section 2 were largely theoretical, one might argue for more empirical evidence. Hence, to get some heuristic validation we present results from a simple regression experiment. With this experiment we hope to prove both the existence of nonuniform learning distribution across neurons as well as the efficiency of a neuron-pruning approach. We trained two networks to learn the cosine function, with one input and one output. This is a task which requires no more than 11 sigmoid neurons to solve entirely, and in this case we don’t care about overfitting because the cosine function has a precise definition. Furthermore, the cosine function is a good toy example because it is a smooth continuous function and, as demonstrated by (Nielsen, 2015), if we were to tinker directly with the parameters of the net- The Incredible Shrinking Neural Network 2000 3000 2500 2000 1500 1000 1000 500 0 0 5 10 Number of Neurons Removed 15 20 0 0 20 40 60 Number of Neurons Removed 80 100 Figure 2. Degradation in squared error after pruning a two-layer network trained to compute the cosine function (Left Network: 2 layers, 10 neurons each, starting test accuracy: 0.9999993, Right Network: 2 layers, 50 neurons each, starting test accuracy: 0.9999996) Figure 7 shows two graphs. Both graphs demonstrate the use of Algorithm 2 and the comparative performance of the brute-force pruning method (in blue), the first order method (in green), and the second order method (in red). The graph on the left shows the performance of these methods on a network with two layers of 10 neurons (20 total), and the graph on the right shows a network with two layers of 50 neurons (100 total). In the left graph, we see that the brute-force method shows a graceful degradation, and the error only begins to rise sharply after 50% of the total neurons have been removed. The error is basically constant up to that point. In the first and second order methods, we see evidence of poor decision making in the sense that both made mistakes early on, which disrupted the output function approximation. The first order method made a large error early on, though we see after a few more neurons were removed this error was corrected somewhat (though it only got worse from there). This is direct evidence of the lack of fault tolerance in a trained neural network once a relevant unit is removed. This phenomenon is even more starkly demonstrated in the second order method. After making a few poor neuron removal decisions in a row, the error signal rose sharply, and then went back to zero after the 6th neuron was removed. This is due to the fact that the neurons it chose to remove were trained to cancel each others’ influence within a localized part of the network. After the entire group was elimi- This experiment gives us some very important results. One, it empirically verifies the fact that learning is not equally or equitably distributed in a neural network. Two, it proves that pruning whole neurons without a loss in performance is actually possible and three, it shows us some early indications of the inefficient nature of popular first and second order error approximation techniques. Clearly, in the case of the brute force or oracle method, which makes no faulty assumptions about the nature of learning representations, up to 90% of the network can be completely extirpated before the output approximation even begins to show any signs of degradation. We will explore this further in the next sections. 3.3. Experiments on MNIST and Toy Datasets 8000 6000 5000 4000 3000 2000 0 20 40 60 Percentage of Neurons Removed 8000 80 0.8 0.6 0.4 0.0 100 0 20 1.2 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 7000 40 60 Percentage of Neurons Removed 5000 4000 3000 2000 80 100 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 1.0 6000 0.8 0.6 0.4 0.2 1000 0 1.0 0.2 1000 0 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 1.2 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 7000 Classification Accuracy 3000 Classification Accuracy 3500 This phenomenon is even more definitely demonstrated in the graph on the right. Here we see the first order method got “lucky” in the beginning and made decent decisions up to about the 40th removed neuron. The second order method had a small error in the beginning which it recovered from gracefully and proceeded to pass the 50 neuron point before finally beginning to unravel. The brute force method, in sharp contrast, shows little to no increase in error at all until 90% of the neurons in the network have been obliterated. Clearly first and second order methods have some value in that they do not make completely arbitrary choices, but the brute force method is far better at this task. Sum of Squared Errors Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 4000 Sum of Squared Errors Sum of Squared Errors 4500 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 4000 nated, the approximation returned to normal. This can only happen if the output function approximation is not evenly distributed over the hidden units in a trained network. Sum of Squared Errors work, we could allocate individual units within the network to be responsible for constrained ranges of inputs, similar to a basis spline function with many control points. This would distribute the learned function approximation evenly across all hidden units, and thus we have presented the network with a problem in which it could productively use as many hidden units as we give it. In this case, a pruning algorithm would observe a fairly consistent increase in error after the removal of each successive unit. In practice however, regardless of the number of experimental trials, this is not what happens. The network will always use 10-11 hidden units and leave the rest to cancel each others influence, as we will see. 0 20 40 60 Percentage of Neurons Removed 80 100 0.0 0 20 40 60 Percentage of Neurons Removed 80 100 Figure 3. Degradation in squared error (left) and classification accuracy (right) after pruning a single-layer network (top) and 2layer network (bottom) using Algorithm 2 (Top Network: 1 layer, 100 neurons, starting test accuracy: 0.998; Bottom Network: 2 layers, 50 neurons/layer, starting test accuracy: 1.000) With encouraging observations from our previous experiments, in Figure 9 we present our results using Algorithm The Incredible Shrinking Neural Network 1.2 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 15000 10000 5000 1.0 0.9 0.8 0.7 0.6 0.5 0 0 20 40 60 Number of Neurons Removed 30000 0 20 1.1 40 60 Number of Neurons Removed Classification Accuracy 15000 10000 80 100 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 1.0 20000 0.9 0.8 0.7 0.6 0.5 0.4 5000 0 0.4 100 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 25000 Sum of Squared Errors 80 0.3 0 20 40 60 Number of Neurons Removed 80 100 0 20 40 60 Number of Neurons Removed 80 Sum of Squared Errors Sum of Squared Errors 103 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 4000 102 3000 2000 1000 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 Sum of Squared Errors 104 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 9000 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 103 0 10 7000 102 10 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 8000 Sum of Squared Errors 101 6000 5000 4000 3000 2000 1000 101 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 104 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 9000 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 103 0 10 8000 7000 102 10 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 6000 5000 4000 3000 2000 1000 101 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 10 0 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 10 Figure 5. Error surface of the network output in log space (left) and real space (right) with respect to each candidate neuron chosen for removal using the brute force, first order and second order criteria 3.4. Visualization of Error Surface & Pruning Decisions Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 1.1 Classification Accuracy Sum of Squared Errors 20000 5000 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 Sum of Squared Errors In order to ensure that our observations were not just a result of idiosyncrasies of the MNIST dataset, we did the same experiment on two toy datasets (Figure 18). These datasets were simple pattern recognition problems where the network’s job was to predict whether a given point would lie inside a given shape on the Cartesian plane. The performance of the 2nd-order method was found to be exceptionally good and produced results very close to the brute force method, although it demonstrated a very irregular decline past the tipping point. The 1st-order method, as expected, performed poorly here as well. 104 Sum of Squared Errors 2 (the Iterative Re-ranking Algorithm) on single layer and 2-layer networks trained on the MNIST dataset. There are a few key observations here. Using the brute force ranking criteria, almost 60% of the neurons in the network can be pruned away without any major loss in performance in the case of a single-layered network. The other noteworthy observation here is that the 2nd order Taylor Series approximation of the error performs consistently better than its 1st order version. It is clear that it becomes harder to remove neurons 1-by-1 with a deeper network, which makes sense because the neurons have more inter-dependencies in that case. Even with a more complex network, it is possible to remove up to 40% of the neurons with no major loss in performance which is clearly illustrated by the brute force curve. The more important observation here is the clear potential of an ideal pruning technique and the inconsistency of 1st and 2nd order Taylor Series approximations of the error as ranking criteria. 100 Figure 4. Degradation in squared error (left) and classification accuracy (right) after pruning a 2-layer network using Algorithm 2 on a toy “diamond” shape dataset (top) and a toy “random shape” dataset (below); (Network: 2 layers, 50 neurons/layer, 10 outputs, logistic sigmoid activation, starting test accuracy: 0.992(diamond); 0.986(random shape) The graphs in Figure 10 are a visualization of the error surface of the network output with respect to the neurons chosen for removal using each of the 3 ranking criteria, represented in intervals of 10 neurons. Between 0.0 and 1.0, we are graphing the literal effect of turning the neuron off (α = 0), and when α > 1.0 we are simulating a boosting of the neuron’s influence in the network. It can be observed easily that for certain neurons in the network, even doubling, tripling, or quadrupling the scalar output of the neuron has no effect on the overall error of the network, indicating the remarkable degree to which the network has learned to ignore the value of certain parameters. In other cases, we can get a sense of the sensitivity of the network’s output to the value of a given neuron when the curve rises steeply after the red 1.0 line. This indicates that the learned value of the parameters emanating from a given neuron are relatively important, and this is why we should ideally see sharper upticks in the curves for the later-removed neurons in the network, that is, when the neurons crucial to the learning representation start to be picked off. As can be easily observed, these functions are too complex to be ap- The Incredible Shrinking Neural Network proximated by straight lines or parabolas, which explains why the popular Taylor Series based methods fail so miserably in our experiments. 4. Conclusions & Future Work While this work had never promised proposing a fullfledged pruning algorithm to outperform the existing ones, it had three major goals, all of which it successfully managed to achieve: 1. Attaining new and deeper insights about learning representations in neural networks. 2. Studying existing pruning techniques to figure out the flaws in the assumptions they make and analyzing these flaws empirically. 3. Using this knowledge to propose a novel paradigm of pruning neural networks and both theoretically and empirically demonstrating its fundamental advantages and correctness over existing techniques. Through our experiments and exploratory arguments, we were successful in verifying and reinforcing some forgotten observations, were able to answer some previously unanswered questions about learning representations, were able to analyze flaws in existing pruning techniques and finally, were able to propose a novel approach to pruning along with demonstrating its benefits over traditional approaches. We started our exploratory journey by looking at historical literature in the field of neural network pruning. We discovered that the work done by (Mozer & Smolensky, 1989a) was not only the first successful attempt at pruning but it also put forth an important insight regarding the unequal distribution of learning representations in trained neural networks, which was largely forgotten over time. We looked at the development of other popular pruning algorithms over the years and made the observation that these algorithms make assumptions which are not necessarily true. We found that some of the most common mistakes these algorithms made were: • Ignoring the fact that in a trained neural network, learning is distributed unequally across neurons. • Ignoring the fact that neurons in a trained network, irrespective of their overall relevance, rely on each other and hence should not be treated independently, thereby assuming that pruning can be done in a serial fashion. • Assuming that the error function with respect to each individual neuron can be approximated with a straight line or more precisely with a parabola. We proposed a novel approach to neural network pruning as we argued in favor of pruning whole neurons instead of individual weights in Section 2, citing multiple theoretical and logical reasons. We were later able to confirm the feasibility and correctness of this approach empirically through our experiments in Section 3. One major accomplishment of this work was to answer the previously unanswered question about the relevance of unnecessary neurons in a trained network and the existence of inter-dependencies between relevant and irrelevant neurons. We were able to demonstrate empirically in Section 3.1 that these irrelevant neurons do have a role to play in a fully-trained network as the relevant neurons of the network rely on them. Without going into the mathematics of this relationship we were able to demonstrate that the removal of one irrelevant neuron changes the dynamics of the network, following which the contributions of all the remaining neurons need to be reassessed, something that most popular pruning algorithms largely ignore. Through our experiment on the Example Regression Problem in Section 3.2, we were able to conclusively and empirically verify the original observation made by (Mozer & Smolensky, 1989a) regarding the unequal and inequitable distribution of learning representations in a trained network. We also saw a strong evidence in support of this during our experiments on visualizing the error surfaces. Through our experiments in Section 3.3, we were able to demonstrate the flaws in popular pruning techniques which use a linear or quadratic error approximation function. These techniques performed poorly as compared to the simple brute-force pruning method which did not make any faulty assumptions about learning representations or error approximations. We were also able to analyze actual error surfaces which gave us a deeper insight into how these algorithms make bad pruning decisions by approximating complex functions using straight lines and parabolas. We saw how easy was it for these methods to get hopelessly lost after making a bad pruning decision resulting in faults. Furthermore, we found that the brute-force algorithm does surprisingly well, despite being computationally expensive. We argue that further investigation is warranted to make this algorithm computationally tractable. We have observed that pruning whole neurons from an optimally trained network without major loss in performance is not only possible but also enables compressing networks to 4070% of their original size. However expensive, it would be extremely easy to parallelize the brute-force method, or potentially approximate it using a subset of the training data to decide which neurons to prune. This avoids the problem of trying to approximate the importance of a unit and potentially making a mistake. It is also important to note that pruning is only a one-time step in the context of the over- The Incredible Shrinking Neural Network all Machine Learning problem and hence its computational complexity can be a good tradeoff for the compression efficiency it brings to the table. LeCun, Yann, Denker, John S, Solla, Sara A, Howard, Richard E, and Jackel, Lawrence D. Optimal brain damage. In NIPs, volume 89, 1989. Finally, we encourage the readers of this work to take these results into consideration when making decisions about pruning methods. We also encourage them to leverage this knowledge and insights about learning representations to propose better approximations to the brute force neuronpruning algorithm. It should be remembered that various heuristics may perform well in practice for reasons which are in fact orthogonal to the accepted justifications given by their proponents. Mozer, Michael C and Smolensky, Paul. Skeletonization: A technique for trimming the fat from a network via relevance assessment. In Advances in neural information processing systems, pp. 107–115, 1989a. References Balzer, Wolfgang, Takahashi, Masanobu, Ohta, Jun, and Kyuma, Kazuo. Weight quantization in boltzmann machines. Neural Networks, 4(3):405–409, 1991. Baum, Eric B and Haussler, David. What size net gives valid generalization? Neural computation, 1(1):151– 160, 1989. Chauvin, Yves. Generalization performance of overtrained back-propagation networks. In Neural Networks, pp. 45– 55. Springer, 1990. Dundar, Gunhan and Rose, Kenneth. The effects of quantization on multilayer neural networks. IEEE transactions on neural networks/a publication of the IEEE Neural Networks Council, 6(6):1446–1451, 1994. Fahlman, Scott E and Lebiere, Christian. The cascadecorrelation learning architecture. 1989. Goodfellow, Ian J, Warde-Farley, David, Mirza, Mehdi, Courville, Aaron, and Bengio, Yoshua. Maxout networks. arXiv preprint arXiv:1302.4389, 2013. Han, Song, Mao, Huizi, and Dally, William J. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149v5, 2016. Hassibi, Babak and Stork, David G. Second order derivatives for network pruning: Optimal brain surgeon. Morgan Kaufmann, 1993. Hoehfeld, Markus and Fahlman, Scott E. Learning with limited numerical precision using the cascadecorrelation algorithm. IEEE Transactions on Neural Networks, 3(4):602–611, 1992. LeCun, Yann and Cortes, Corinna. MNIST handwritten digit database. 2010. Mozer, Michael C and Smolensky, Paul. Using relevance to reduce network size automatically. Connection Science, 1(1):3–16, 1989b. Nielsen, Michael A. Neural networks and deep learning. URL: http://neuralnetworksanddeeplearning.com/chap4.html.(visited: 01.11. 2014), 2015. Øland, Anders and Raj, Bhiksha. Reducing communication overhead in distributed learning by an order of magnitude (almost). In IEEE International Conference on Acoustics, Speech and Signal Processing, pp. 2219– 2223, 2015. Prabhavalkar, Rohit, Alsharif, Ouais, Bruguier, Antoine, and McGraw, Lan. On the compression of recurrent neural networks with an application to lvcsr acoustic modeling for embedded speech recognition. In 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 5970–5974. IEEE, 2016. Reed, Russell. Pruning algorithms-a survey. Neural Networks, IEEE Transactions on, 4(5):740–747, 1993. Segee, Bruce E and Carter, Michael J. Fault tolerance of pruned multilayer networks. In Neural Networks, 1991., IJCNN-91-Seattle International Joint Conference on, volume 2, pp. 447–452. IEEE, 1991. Srivastava, Nitish, Hinton, Geoffrey, Krizhevsky, Alex, Sutskever, Ilya, and Salakhutdinov, Ruslan. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1): 1929–1958, 2014. The Incredible Shrinking Neural Network The second derivative of the sigmoid is easily derived from the first derivative: A. Second Derivative Back-Propagation σ 0 (x) = σ(x) (1 − σ(x)) d σ(x) (1 − σ(x)) σ 00 (x) = dx |{z} | {z } (1) P xj σ(·) (0) (0) (1) cji = wji oj (0) P xi f (x) σ(·) E Figure 6. A computational graph of a simple feed-forward network illustrating the naming of different variables, where σ(·) is the nonlinearity, MSE is the mean-squared error cost function and E is the overall loss. (m) oi (m) ) xi 0 = X (m) (m+1) j (1) (11) d = The first and second derivatives of the cost function with respect to the outputs: ∂E (0) ∂oi (0) = oi − ti (2) ∂ E (0) 2 =1 d2 oi (m) 2 (3) ∂oi = dxi (m) σ 0 (x) = σ(x) (1 − σ(x)) (4) σ 00 (x) = σ 0 (x) (1 − 2σ(x)) (5) (m) = σ(xi (m) doi (m) dxi )  (m) dxi (12) (13)    (m) (m) = oi 1 − oi (14) ! (15) (m)     (m) (m) 1 − oi 1 − 2oi  = oi  (m) = σ 00 xi (16) (17) Derivative of the error with respect to the ith neuron’s input (0) xi in the output layer: ∂E (0) (0) = ∂E ∂oi (0) (18) (0) ∂o ∂xi   i     (0) (0) (0) = oi − t i σ x i 1 − σ xi | {z } | {z } from (2)  The first and second derivatives of the sigmoid function in forms depending only on the output: (m) oi d  ∂xi 2  dx  i   (m) (m) = oi (m) (m+1) 1 − oi (m) cji = wji oj (m) = σ 0 xi (m) A.1. First and Second Derivatives (9) (10) (m) wji oj Superscripts represent the index of the layer of the network in question, with 0 representing the output layer. E is the (m) squared-error network cost function. oi is the ith output in layer m generated by the activation function σ, which in (m) this paper is is the standard logistic sigmoid. xi is the weighted sum of inputs to the ith neuron in the mth layer, (m) and cji is the contribution of the jth neuron in the m + 1 layer to the input of the ith neuron in the mth layer. 0 σ 00 (x) = σ 0 (x)(1 − 2σ(x)) (m) (m) 00 (8) 0 σ (x) = σ (x) − 2σ(x)σ (x) doi dxi = σ(xi 0 And for future convenience: Name and network definitions: 1 X (0) (o − ti )2 2 i i 00 g(x) σ (x) = σ (x)(1 − σ(x)) − σ(x)σ (x) MSE E= 0 (7) σ (x) = f (x)g(x) + f (x)g 0 (x) (0) oi 00 (6) from (4)    (0) (0) = − t i oi 1 − oi     (0) (0) = oi − ti σ 0 xi (0) oi (19) (20) (21) Second derivative of the error with respect to the ith neu- The Incredible Shrinking Neural Network (0) ron’s input xi (0) contribution cji : in the output layer:  ∂2E (0) 2 = ∂xi (0) ∂E ∂oi (0) (0) ∂oi ∂xi ∂ (0) ∂xi (0) (0) (0) 2 ∂ = (0) ∂cji ∂cji ∂E ∂ 2 oi + (0) ∂xi (0) ∂oi (0) 2 ∂ = ∂xi (0) ∂cji (23) 2 ∂ E = (0)  (0) ∂xi ∂oi (0) oi |  1− {z (0) oi  + } from (4)       ∂E (0) (0)  0   (34) = o − t σ x i i i  (0)  ∂cji {z } | from (32) (0) ∂oi ∂xi ∂oi ∂2E (22) (0) ∂2E = !  |  (0) oi − ti {z } | (0) oi from (2)        (0) (0) σ xi − t i σ 0 xi     X  ∂ (0) (0)(m) (m+1)  1=− oi(0) σ1− 2oiwji oj ∂cji{z } j from (5)  (35)   − ti  σ 0   X (m) (m+1)  wji oj j (36)  (24)      X X (0) ∂   (0)  0  ∂ ∂E ∂ ∂2E (0) (0) = (0) σ  c − t σ cji  i ji (0) = = oi − t i = = oi 1− (0) (0) (0) (0) (0) ∂cojii j j ∂xi ∂oi ∂xi ∂oi ∂xi | {z } | {z } (37) from (2) from (4)       (25) ∂ (0) (0) 0   2     =  (0) σ cji + k − ti σ cji + k (38) ∂2E (0) (0) (0) (0) (0) (0) {z }| {z } = oi 1 − oi + o i − t i oi 1 − oi 1∂c −ji2oi|     (0) (0) (0) 2 f c g c ∂xi ji ji (26)   2     We now make use of the abbreviations f and g: (0) (0) (0) = σ 0 xi + oi − ti σ 00 xi         (0) (0) (0) (0) (27) = f 0 cji g cji + f cji g 0 cji (39)           (0) (0) (0) (0) = σ 0 cji + k σ 0 cji + k + σ cji + k − ti σ 00 cji + k First derivative of the error with respect to a single input (40) (0) contribution cji from neuron j to neuron i with weight  2     (0) (0) (0) (0) = σ 0 cji + k + oi − ti σ 00 cji + k w in the output layer: !  (0) ∂oi (0) ∂xi   ji ∂E (0) ∂cji (0) = ∂E ∂oi (0) ∂oi  (0) ∂xi (0) ∂xi (0) (0) = oi − ti oi | {z } | from (2) (m) ∂xi (m) ∂ = ∂cji (m) ∂cji x(m) = i (0) 1 − oi {z  ∂x(0) from (4) } i (0) ∂cji X (m) (m+1)  wji oj 2 ∂ E = ∂E (0)  (0) = σ 0 xi |   (m) c∂ji2 E + k ∂=2 E 1 = 2 (0) (0) 2 ∂cji ∂xi = ∂ (m) ∂cji (31) X (m) (m+1) wji oj (0) = xi  j 2  (0)   (0)  + oi − ti σ 00 xi {z } (43) from (27) (44) A.1.1. S UMMARY O F O UTPUT L AYER D ERIVATIVES (32) ∂E (0) ∂oi from (21) (0) ∂cji  (0) 2 ∂cji (30)    ∂E (0) (0) (0) = o − t o 1 − o i i i i (0) ∂cji     (0) (0) = oi − ti σ 0 xi | {z } ∂E (0) cji = (42) (29)  j  X j   ! c(0) ji + k = (28) (0) ∂cji  (41)   (0) = oi ∂2E − ti (0) 2 =1 (45) ∂oi (33) ∂xi ∂E (0) ∂xi Second derivative of the error with respect to a single input     (0) (0) = oi − t i σ 0 x i ∂2E (0) 2   2   (0) (0) = σ 0 xi + oi − ti σ 00 ∂xi (46) The Incredible Shrinking Neural Network ∂E (0) ∂cji ∂2E ∂E = (0) 2 (0) ∂xi ∂2E = ∂cji (0) 2 (47) ∂xi 2 ∂ E (1) 2 ∂oj ∂ =       X (0) (1) X (0) (1) (0) σ  wji oj  wji wji oj  − ti  σ 0  X (1) ∂oj i j j {z | A.1.2. H IDDEN L AYER D ERIVATIVES  (1) f oj The first derivative of the error with respect to a neuron (1) with output oj in the first hidden layer, summing over all partial derivative contributions from the output layer: = X f0  }|  {z   (1) g oj } (55)        (1) (1) (1) (1) oj g oj + f oj g 0 oj i (56)     (0) X X X (0) (0)     X ∂E ∂o ∂x ∂cji X (0) (0) (1) (0) (0) (1) (0) ∂E (0) (0) i i wji oj  wji + . . . σ0  wji oj  wji σ 0  wji = = = oi − ti σ 0 xi (1) (0) (0) (0) (1) j i j ∂oj ∂cji ∂oj {z } i ∂oi ∂xi i | from (21) (57)       (48) X X (0) (1) X (0) (1)  (0) 2 (m)   σ  wji oj  − ti  σ 00  wji oj  wji ∂cji ∂ (m) (m) (m+1) (m) = c = w o = w ji ji j ji i j j (m+1) (m+1) ∂oj ∂oj (58) (49)    2  X   (0) 2  (0) 2  (0) (0) (0) X ∂E (0) ∂E = σ 0 xi + oi − ti σ 00 xi wji wji = w (50) (1) (0) ji i ∂oj i ∂xi (59)     2 X   (0) 2  (0) (0) (0) σ 0 xi + oi − ti σ 00 xi = wji Note that this equation does not depend on the specific form i | {z } of ∂E (0) , whether it involves a sigmoid or any other activafrom (27) ∂xi (60) tion function. We can therefore replace the specific indexes with general ones, and use this equation in the future. Summing up, we obtain the more general expression: ∂E (m+1) = ∂oj X ∂E i (m) w (m) ji ∂xi ∂2E (51) (1) 2 = ∂oj The second derivative of the error with respect to a neuron (1) with output oj in the first hidden layer: (1) 2 = ∂oj = ∂ (1) (1) ∂oj = ∂ (1) ∂oj (52) (1) ∂oj ∂oj ∂ X ∂E (0) w (0) ji i ∂xi    X  (0) (0) (0) oi − ti σ 0 xi wji (53) (54) i   (0) (0) If we now make use of the fact, that oi = σ xi = P   (0) (1) σ , we can evaluate the expression furj wji oj ther. (0) wji 2 (61) ∂xi i ∂xx with general ones: (m+1) 2 ∂E (0) 2 Note that the equation in (61) does not depend on the form 2 E of ∂ (0) 2 , which means we can replace the specific indexes ∂2E ∂2E X ∂2E  = ∂oj X ∂2E  i (m) 2 (m) wji 2 (62) ∂xi At this point we are beginning to see the recursion in the form of the 2nd derivative terms which can be thought of analogously to the first derivative recursion which is central to the back-propagation algorithm. The formulation above which makes specific reference to layer indexes also works in the general case. (m) Consider the ith neuron in any layer m with output oi (m) and input xi . The first and second derivatives of the error E with respect to this neuron’s input are: ∂E (m) ∂xi (m) = ∂E ∂oi (m) ∂oi (m) ∂xi (63) The Incredible Shrinking Neural Network = ∂xi = = (m) 2 ∂xi ∂E (m) ∂xi (64) (m) (m) ∂ ∂E ∂oi (m) ∂xi A.1.3. S UMMARY O F H IDDEN L AYER D ERIVATIVES ∂xi ! (m) ∂xi (m) ∂2E ∂oi + (m) (m) (m) ∂xi ∂oi ∂xi ∂ ∂E ∂E (65) (m) ∂oi (m+1) (m) ∂E ∂ 2 oi 2 (m) ∂oi ∂x(m) i ! (m) (m) ∂E ∂oi ∂oi (m) (m) (m) ∂oi ∂xi ∂xi = ∂oj X ∂E ∂2E (m) w (m) ji ∂xi i (m+1) 2 = ∂oj X ∂2E  (m) 2 2 ∂xi i (73) (66) = + ∂E Note the form of this equation is the general form of what was derived for the output layer in (27). Both of the above first and second terms are easily computable and can be stored as we propagate back from the output of the network to the input. With respect to the output layer, the first and second derivative terms have already been derived above. In the case of the m + 1 hidden layer during back propagation, there is a summation of terms calculated in the mth layer. For the first derivative, we have this from (51). ∂E (m+1) ∂oj = X ∂E i (m) ∂xi (m) wji (70) 4500 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 4000 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 4000 3500 3000 2000 3000 2500 2000 1500 1000 1000 500 0 0 5 10 Number of Neurons Removed 15 20 0 0 20 40 60 Number of Neurons Removed 80 100 Figure 7. Degradation in squared error after pruning a two-layer network trained to compute the cosine function (Left Network: 2 layers, 10 neurons each, 1 output, logistic sigmoid activation, starting test accuracy: 0.9999993, Right Network: 2 layers, 50 neurons each, 1 output, logistic sigmoid activation, starting test accuracy: 0.9999996) And the second derivative for the jth neuron in the m + 1 layer: B.2. Results on MNIST Dataset  (m+1) 00 For all the results presented in this section, the MNIST = σ x j (m+1) (m+1) 2 (m+1) 2 database of Handwritten Digits by (LeCun & Cortes, 2010) ∂oj ∂xj ∂oj was used. It is worth noting that due to the time taken by the (71) brute force algorithm we rather used a 5000 image subset of the MNIST database in which we have normalized the We can replace both derivative terms with the forms which pixel values between 0 and 1.0, and compressed the image depend on the previous layer: sizes to 20x20 images rather than 28x28, so the starting test   X ∂ 2 E  (0) 2   (m+1) 2 X ∂Eaccuracy ∂2E here appears higher than those reported (m) reported (m+1) 0 00 = w σ x + w σ x ji j ji (m) by LeCun et al.j We do not believe that this affects the inter(m+1) 2 (0) 2 ∂xj i ∂xi i ∂xi | {zpretation } of the presented results because the basic learning | {z } from problem (51) from (62) does not change with a larger dataset or input di(72) mension. ∂2E (m) wji   (m) (m) 00 ∂E ∂E ∂oi x σ i (m) (m) (m) = (74) (m) (m) (m) ∂oi ∂xi ∂oi ∂xi ∂oi ∂xi (67)   ∂ 2 E  0  (m+1) 2 ∂E ∂2E ! (m+1) 00 (m) (m) x x = σ + σ   2 j j (m+1) ∂ E ∂E ∂oi ∂oi (m+1) 2 (m+1) 2 (m) ∂oj ∂xj ∂oj = + (m) σ 00 xi (m) (m) (m) 2 ∂xi ∂xi ∂oi ∂oi (75) (68)   ∂E ∂ 2 E  0  (m) 2 (m) B. Additional Experimental Results σ xi + (m) σ 00 xi = 2 (m) ∂oi ∂oi B.1. Example Regression Problem (69) = ∂2E ∂ Sum of Squared Errors (m) 2 Sum of Squared Errors ∂2E ∂2E   2 (m+1) σ 0 xj + ∂E  And this horrible mouthful of an equation gives you a general form for any neuron in the jth position of the m + 1 layer. Taking very careful note of the indexes, this can be more or less translated painlessly to code. You are welcome, world. B.3. Pruning a 1-Layer Network The network architecture in this case consisted of 1 layer, 100 neurons, 10 outputs, logistic sigmoid activations, and a starting test accuracy of 0.998. The Incredible Shrinking Neural Network B.3.1. S INGLE OVERALL R ANKING A LGORITHM We first present the results for a single-layer neural network in Figure 8, using the Single Overall algorithm (Algorithm 1) as proposed in Section 2. 8000 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 0.8 6000 Classification Accuracy 5000 4000 3000 2000 0.6 0.4 0.2 1000 0 20 40 60 Percentage of Neurons Removed 80 0.0 100 0 20 40 60 Percentage of Neurons Removed 80 100 Figure 8. Degradation in squared error (left) and classification accuracy (right) after pruning a single-layer network using The Single Overall Ranking algorithm (Network: 1 layer, 100 neurons, 10 outputs, logistic sigmoid activation, starting test accuracy: 0.998) B.3.2. I TERATIVE R E -R ANKING A LGORITHM 8000 Classification Accuracy Sum of Squared Errors 6000 5000 4000 3000 2000 1.0 B.3.4. V ISUALIZATION OF BRUTE FORCE P RUNING D ECISIONS 0.8 0.6 0.4 0.2 1000 0 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 1.2 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 7000 Remember that lower is better in terms of the height of the curve and minimal (or negative) horizontal change between the vertical red line at 1.0 (neuron on, α = 1.0) and 0.0 (neuron off, α = 0.0) is indicative of a good candidate neuron to prune, i.e. there will be minimal effect on the network output when the neuron is removed. 0 20 40 60 Percentage of Neurons Removed 80 100 0.0 0 20 40 60 Percentage of Neurons Removed 80 104 100 Figure 9. Degradation in squared error (left) and classification accuracy (right) after pruning a single-layer network the iterative re-ranking algorithm (Network: 1 layer, 100 neurons, 10 outputs, logistic sigmoid activation, starting test accuracy: 0.998) B.3.3. V ISUALIZATION OF E RROR S URFACE & P RUNING D ECISIONS These graphs are a visualization of the error surface of the network output with respect to the neurons chosen for removal using each of the 3 ranking criteria, represented in intervals of 10 neurons. In each graph, the error surface of the network output is displayed in log space (left) and in real space (right) with respect to each candidate neuron chosen for removal. We create these plots during the pruning exercise by picking a neuron to switch off, and then multiplying its output by a scalar gain value α which is adjusted from 0.0 to 10.0 with a step size of 0.001. When the value of α is 1.0, this represents the unperturbed neuron output learned during training. Between 0.0 and 1.0, we are graphing the literal effect of turning the neuron off (α = 0), and when α > 1.0 we are simulating a boosting of the neuron’s influence in the network, i.e. inflating the value of its outgoing weight parameters. We graph the effect of boosting the neuron’s output to demonstrate that for certain neurons in the network, even 5000 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 103 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 4000 Sum of Squared Errors 0 Sum of Squared Errors Sum of Squared Errors 1.0 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 7000 doubling, tripling, or quadrupling the scalar output of the neuron has no effect on the overall error of the network, indicating the remarkable degree to which the network has learned to ignore the value of certain parameters. In other cases, we can get a sense of the sensitivity of the network’s output to the value of a given neuron when the curve rises steeply after the red 1.0 line. This indicates that the learned value of the parameters emanating from a given neuron are relatively important, and this is why we should ideally see sharper upticks in the curves for the later-removed neurons in the network, that is, when the neurons crucial to the learning representation start to be picked off. Some very interesting observations can be made in each of these graphs. 102 3000 2000 1000 101 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 10 0 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 10 Figure 10. Error surface of the network output in log space (left) and real space (right) with respect to each candidate neuron chosen for removal using the brute force criterion; (Network: 1 layer, 100 neurons, 10 outputs, logistic sigmoid activation, starting test accuracy: 0.998) In Figure ??, we notice how low to the floor and flat most of the curves are. It’s only until the 90th removed neuron that we see a higher curve with a more convex shape (clearly a more sensitive, influential piece of the network). B.3.5. V ISUALIZATION OF 1 ST O RDER A PPROXIMATION P RUNING D ECISIONS It can be seen in Figure 11 that most choices seem to have flat or negatively sloped curves, indicating that the first order approximation seems to be pretty good, but examining the brute force choices shows they could be better. The Incredible Shrinking Neural Network 7000 5000 4000 3000 6000 5000 4000 3000 2000 0 1000 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 0 10 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 103 7000 102 6000 5000 4 6 Gain value (1 = normal output, 0 = off) 8 10 20 40 60 Percentage of Neurons Removed 80 0.0 100 8000 3000 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 20 40 60 Percentage of Neurons Removed 10 Figure 12. Error surface of the network output in log space (left) and real space (right) with respect to each candidate neuron chosen for removal using the 2nd order Taylor Series error approximation criterion; (Network: 1 layer, 100 neurons, 10 outputs, logistic sigmoid activation, starting test accuracy: 0.998) B.3.6. V ISUALIZATION OF 2 ND O RDER A PPROXIMATION P RUNING D ECISIONS The method in Figure 12 looks similar to the brute force method choices, though clearly not as good (they’re more spread out). Notice the difference in convexity between the 2nd and 1st order method choices. It’s clear that the first order method is fitting a line and the 2nd order method is fitting a parabola in their approximation. B.4. Pruning A 2-Layer Network The network architecture in this case consisted of 2 layers, 50 neurons per layer, 10 outputs, logistic sigmoid activation, and a starting test accuracy of 1.000. B.4.1. S INGLE OVERALL R ANKING A LGORITHM Figure 13 shows the pruning results for Algorithm 1 on a 2-layer network. The ranking procedure is identical to the one used to generate Figure 8. Unsurprisingly, a 2-layer network is harder to prune because a single overall ranking will never capture the interdependencies between neurons in different layers. It makes sense that this is worse than the performance on the 1-layer 1.2 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 7000 0 0 80 100 B.4.2. ITERATIVE RE - RANKING A LGORITHM Sum of Squared Errors 2 0 4000 1000 0 0.2 Figure 13. Degradation in squared error (left) and classification accuracy (right) after pruning a 2-layer network using the Single Overall Ranking algorithm; (Network: 2 layers, 50 neurons/layer, 10 outputs, logistic sigmoid activation, starting test accuracy: 1.000) 2000 101 0.4 network, even if this method is already known to be bad, and we’d likely never use it in practice. Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 8000 Sum of Squared Errors Sum of Squared Errors 9000 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 0.6 10 Figure 11. Error surface of the network output in log space (left) and real space (right) with respect to each candidate neuron chosen for removal using the 1st order Taylor Series error approximation criterion; (Network: 1 layer, 100 neurons, 10 outputs, logistic sigmoid activation, starting test accuracy: 0.998) 104 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 0.8 1000 2000 101 1.0 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 7000 6000 5000 4000 3000 2000 0.8 0.6 0.4 0.2 1000 0 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 1.0 Classification Accuracy 102 6000 8000 Sum of Squared Errors 103 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 8000 Classification Accuracy 9000 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 Sum of Squared Errors Sum of Squared Errors 104 0 20 40 60 Percentage of Neurons Removed 80 100 0.0 0 20 40 60 Percentage of Neurons Removed 80 100 Figure 14. Degradation in squared error (left) and classification accuracy (right) after pruning a 2-layer network using the iterative re-ranking algorithm; (Network: 2 layers, 50 neurons/layer, 10 outputs, logistic sigmoid activation, starting test accuracy: 1.000) Figure 14 shows the results from using Algorithm 2 on a 2layer network. We compute the same brute force rankings and Taylor series approximations of error deltas over the remaining active neurons in the network after each pruning decision used to generate Figure 9. Again, this is intended to account for the effects of canceling interactions between neurons. B.4.3. V ISUALIZATION OF E RROR S URFACE & P RUNING D ECISIONS As seen in the case of a single layered network, these graphs are a visualization the error surface of the network output with respect to the neurons chosen for removal using each algorithm, represented in intervals of 10 neurons. B.4.4. V ISUALIZATION OF BRUTE FORCE P RUNING D ECISIONS In Figure 15, it is clear why these neurons got chosen, their graphs clearly show little change when neuron is removed, are mostly near the floor, and show convex behaviour of error surface, which argues for the rationalization of using 2nd order methods to estimate difference in error when they The Incredible Shrinking Neural Network 2500 102 2000 Sum of Squared Errors 103 104 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 3000 1500 1000 7000 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 103 5000 102 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 0 10 4000 3000 2000 500 101 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 6000 Sum of Squared Errors 3500 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 Sum of Squared Errors Sum of Squared Errors 104 1000 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 10 101 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 0 10 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 10 Figure 15. Error surface of the network output in log space (left) and real space (right) with respect to each candidate neuron chosen for removal using the brute force criterion; (Network: 2 layers, 50 neurons/layer, 10 outputs, logistic sigmoid activation, starting test accuracy: 1.000) Figure 17. Error surface of the network output in log space (left) and real space (right) with respect to each candidate neuron chosen for removal using the 2nd order Taylor Series error approximation criterion; (Network: 2 layers, 50 neurons/layer, 10 outputs, logistic sigmoid activation, starting test accuracy: 1.000) are turned off. first layer. What is interesting to note is that from some other experiments conducted on toy datasets (predicting whether a given point would lie inside a given shape on the Cartesian plane), the performance of the 2nd-order method was found to be exceptionally good and produced results very close to the brute force method. The 1st-order method, as expected, performed poorly here as well. Some of these results are illustrated in Figure 18. B.4.5. V ISUALIZATION OF 1 ST O RDER A PPROXIMATION P RUNING D ECISIONS 7000 103 Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 6000 5000 102 4000 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 10 0 0 2 4 6 Gain value (1 = normal output, 0 = off) 8 10 Sum of Squared Errors 2000 1000 101 1.2 20000 3000 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 15000 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 1.1 Classification Accuracy Neuron: 0 Neuron: 10 Neuron: 20 Neuron: 30 Neuron: 40 Neuron: 50 Neuron: 60 Neuron: 70 Neuron: 80 Neuron: 90 Sum of Squared Errors Sum of Squared Errors 104 10000 5000 1.0 0.9 0.8 0.7 0.6 0.5 Drawing a flat line at the point of each neurons intersection with the red vertical line (no change in gain) shows that the 1st derivative method is actually accurate for estimation of change in error in these cases, but still ultimately leads to poor decisions. B.4.6. V ISUALIZATION OF 2 ND O RDER A PPROXIMATION P RUNING D ECISIONS Clearly these neurons are not overtly poor candidates for removal (error doesn’t change much between 1.0 & zerocrossing left-hand-side), but could be better (as described above in the brute force Criterion discussion). B.5. Experiments on Toy Datasets As can be seen from the experiments on MNIST, even though the 2nd-order approximation criterion is consistently better than 1st-order, its performance is not nearly as good as brute force based ranking, especially beyond the 0 0 20 40 60 Number of Neurons Removed 30000 80 0 20 1.1 40 60 Number of Neurons Removed Classification Accuracy 15000 10000 80 100 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 1.0 20000 0.9 0.8 0.7 0.6 0.5 0.4 5000 0 0.4 100 Brute Force 1st Order / Skeletonization 2nd Order Taylor Approx 25000 Sum of Squared Errors Figure 16. Error surface of the network output in log space (left) and real space (right) with respect to each candidate neuron chosen for removal using the 1st order Taylor Series error approximation criterion; (Network: 2 layers, 50 neurons/layer, 10 outputs, logistic sigmoid activation, starting test accuracy: 1.000) 0.3 0 20 40 60 Number of Neurons Removed 80 100 0 20 40 60 Number of Neurons Removed 80 100 Figure 18. Degradation in squared error (left) and classification accuracy (right) after pruning a 2-layer network using the iterative re-ranking algorithm on a toy “diamond” shape dataset (top) and a toy “random shape” dataset (below); (Network: 2 layers, 50 neurons/layer, 10 outputs, logistic sigmoid activation, starting test accuracy: 0.992(diamond); 0.986(random shape)
9cs.NE
NEURAL IDEAL PRESERVING HOMOMORPHISMS arXiv:1612.06150v1 [math.AC] 19 Dec 2016 R. AMZI JEFFS, MOHAMED OMAR, AND NORA YOUNGS Abstract. The neural ideal of a binary code C ⊆ Fn2 is an ideal in F2 [x1 , . . . , xn ] closely related to the vanishing ideal of C. The neural ideal, first introduced by Curto et al, provides an algebraic way to extract geometric properties of realizations of binary codes. In this paper we investigate homomorphisms between polynomial rings F2 [x1 , . . . , xn ] which preserve all neural ideals. We show that all such homomorphisms can be decomposed into a composition of three basic types of maps. Using this decomposition, we can interpret how these homomorphisms act on the underlying binary codes. We can also determine their effect on geometric realizations of these codes using sets in Rd . We also describe how these homomorphisms affect a canonical generating set for neural ideals, yielding an efficient method for computing these generators in some cases. 1. Introduction Given a binary code C ⊆ Fn2 , a realization of C is a collection of sets U = {U1 , . . . , Un } in Rd such that C records intersection patterns of the sets in U. More precisely, an element c is in C exactly when there is a point in Rd lying in only the Ui ’s with ci = 1. Every code has a realization in Rd for d ≥ 1 if we place no restrictions on the sets in U. However, if we require that the sets in U satisfy certain geometric properties such as connectedness or convexity not every code has a realization. Such restrictions naturally arise in neuroscientific contexts, as addressed in [3]. The question of when a code is realizable is difficult to answer in these restricted settings; however, algebraic techniques have been succesfully used to gain insight into obstructions to codes being realizable. Given a code C, the authors in [3] define the neural ideal JC ⊆ F2 [x1 , . . . , xn ] and the associated neural ring, which algebraically process and store the information in a neural code. Each neural ideal JC has a particular set of generators, its canonical form, which reveals the fundamental relationships between sets in any realization of C. In recent work [4], the authors use the ideal-variety correspondence to relate homomorphisms between neural rings to maps between their associated codes, and focus particularly on those maps between codes which have a natural interpretation in neuroscience. We examine ring homomorphisms from F2 [x1 , ..., xn ] to F2 [x1 , ..., xm ] which preserve neural ideals in the sense that the image of any neural ideal is again a neural ideal. In Theorem 2.10 we completely classify these homomorphisms, and give a method of decomposing any such homomorphism into a composition of three basic types. Theorem 2.13 gives a precise description of how these homomorphisms act on the underlying codes of neural ideals. Theorem 2.15 describes how these maps transform realizations of the underlying codes. The structure of the paper is as follows. In Section 2, we provide pertinent definitions and describe in detail the main results of our work. Sections 3 and 4 are devoted to proving Date: December 20, 2016. 2010 Mathematics Subject Classification. 05C15, 05C30, 05C31. 1 2 R. AMZI JEFFS, MOHAMED OMAR, AND NORA YOUNGS Theorems 2.10 and 2.13 respectively. In Section 5 we prove Theorem 2.15. In Section 6 we build on Theorem 2.10 by describing how homomorphisms preserving neural ideals affect the canonical form of neural ideals. 2. Preliminaries and Main Results We start by presenting the fundamental definitions for the theory we will be exploring, beginning with the formal definition of a neural code. Definition 2.1. A code or neural code is a set C ⊆ Fn2 of binary vectors. The vectors in C are called codewords. Throughout we will let [n] denote the set {1, 2, . . . , n}. For any vector v ∈ Fn2 the support of v is the set supp(v) := {i ∈ [n] | vi = 1}. Definition 2.2. Let U = {U1 , . . . , Un } be a collection of sets in a space X ⊆ Rd . The code of U is the code defined by    !    \ [  Ui Uj  6= ∅ , C(U) := v ∈ Fn2   \ vi =1 vj =0 where we adopt the convention that the empty intersection is X and the empty union is ∅. Given C ⊂ Fn2 , we say C is realizable if there exists a collection U such that C = C(U), and call U a realization of the code in the space X. If a code C has a realization consisting of convex open sets then we say C is a convex code. Classifying which codes are convex is an open problem which has been considered by many researchers [1, 3, 7] . Many partial results exist along with tools for approaching this task. In this paper we build on algebraic tools introduced in [3] that have been pivotal in understanding obstructions to convex realizability of codes; see for example [1, 2, 6]. As a code C is a subset of Fn2 , we will work over the polynomial ring F2 [x1 , . . . , xn ]; for convenience we will use F2 [n] to denote F2 [x1 , . . . , xn ]. Definition 2.3 ([3]). A pseudomonomial is a polynomial f ∈ F2 [n] of the form Y Y f= xi (1 − xj ). i∈σ j∈τ where σ, τ ⊆ [n] and σ ∩ τ = ∅. Note that every pseudomonomial has degree at most n. For any vector v ∈ Fn2 , its indicator pseudomonomial, denoted ρv , is the degree n pseudomonomial with σ = supp(v) and τ = [n] \ supp(v). Using indicator pseudomonomials, the authors in [3] construct a unique ideal associated to a binary code, called the neural ideal. Definition 2.4 ([3]). Let C ⊆ Fn2 be a neural code. The neural ideal of C, denoted JC , is the ideal JC := hρv | v ∈ / Ci. Here we adopt the convention that the ideal generated by the empty set is the zero ideal. An ideal in F2 [n] is called a neural ideal if it is equal to JC for some code C. NEURAL IDEAL PRESERVING HOMOMORPHISMS 3 An ideal in F2 [n] is a neural ideal if and only if it has a generating set consisting of pseudomonomials [5]. This characterization of neural ideals will be useful in proving that certain homomorphisms preserve neural ideals, and in classifying all such homomorphisms. We now formally introduce our objects of interest: the class of homomorphisms which preserve neural ideals. Definition 2.5. Let φ : F2 [n] → F2 [m] be a homomorphism of rings. We say that φ preserves neural ideals if the image of any neural ideal in F2 [n] under φ is a neural ideal in F2 [m]. That is, for every code C ⊆ Fn2 there is a code D ⊆ Fm 2 so that φ(JC ) = JD . Because neural ideals in F2 [n] and codes on n bits are in bijective correspondence we can think of such a map as defining a process for transforming codes on n bits to codes on m bits. Note immediately that composing any two maps which preserve neural ideals yields a map which again preserves neural ideals. Example 2.6. Consider the surjective map φ : F2 [6] → F2 [3] defined by x1 7→ 0 x2 7→ 1 − x3 x3 7→ 1 x4 → 7 1 − x1 x5 → 7 1 x6 7→ x2 extended algebraically to all of F2 [6]. Let J be the neural ideal generated by {x1 x2 (1 − x3 ), x4 (1 − x2 ), x5 x6 (1 − x1 )}. If we apply φ to this set of generators then we obtain a set of generators for the ideal φ(J): φ(J) = h0, (1 − x1 )x3 , x2 i = hx3 (1 − x1 ), x2 i. Since φ(J) is generated by pseudomonomials it is a neural ideal. We will see shortly as a result of Theorem 2.10 that the image of any neural ideal under φ is again a neural ideal. The following definitions give three useful classes of maps that preserve neural ideals. For the proof that these maps preserve neural ideals, see Lemma 3.2. Definition 2.7. Let λ be a permutation of [n]. Then the map induced by sending xi to xλ(i) is called a permutation map of F2 [n] and is denoted simply by λ. Definition 2.8. For any i ∈ [n] the i-th bit flip is the map δi : F2 [n] → F2 [n] induced by ( xj j 6= i δi (xj ) = 1 − xj j = i. We will call any composition of such maps a bit flipping map. Definition 2.9. Let 1 ≤ m ≤ m′ ≤ n and define ωm,m′ : F2 [n] → F2 [m] to be the map induced by   xi i ≤ m ωm,m′ (xi ) = 0 m < i ≤ m′  1 m′ < i ≤ n Such a map is called a restriction map from F2 [n] to F2 [m]. 4 R. AMZI JEFFS, MOHAMED OMAR, AND NORA YOUNGS Having described these three classes of neural ideal preserving homomorphisms we can state our first main result, which tells us that every neural ideal preserving homomorphism can be expressed as a composition of these maps. Theorem 2.10. Let φ : F2 [n] → F2 [m] be a homomorphism. Then φ preserves neural ideals if and only if φ can be expressed as a composition of the following types of maps: (i) Bit flipping (Definition 2.8), (ii) Permutation (Definition 2.7), and (iii) Restriction (Definition 2.9). Moreover, we can write φ = ω ◦ λ ◦ δ where δ is a bit flipping map, λ is a permutation, and ω is a restriction. The proof of Theorem 2.10 can be found in Section 3. Theorem 2.10 provides a complete characterization of homomorphisms that preserve neural ideals. By decomposing these homomorphisms into three basic types we gain an understanding of their structure and obtain a compact way to describe any such homomorphism. Example 2.11. Recall the map φ described in Example 2.6. We can illustrate this map and its decomposition given by Theorem 2.10 by considering the action of φ on variables. This illustration is provided in Figure 1, where solid line segments connect a variable to its image (for example x1 7→ 0 or x6 7→ x2 ) while dashed lines indicate mappings of the form xi 7→ 1 − xj . Figure 1. The homomorphism φ written as the composition of permutation, bit flipping, and restriction maps. Dashed lines indicate places where xi 7→ 1 − xj . We now describe three transformations of codes, which we will see are related naturally to the three types of homomorphisms given in Definitions 2.7, 2.8, and 2.9. Definition 2.12. Let C be a code on n bits. (i) Let λ be a permutation of [n]. We define the permutation of C by λ to be the code λ(C) := {u ∈ Fn2 | supp(u) = λ(supp(c)) for some c ∈ C}. NEURAL IDEAL PRESERVING HOMOMORPHISMS 5 (ii) For any i ∈ [n] the i-th bit flip of C, denoted δi (C), is the code on n bits defined by δi (C) := {u ∈ Fn2 | supp(u) = supp(c) ⊕ {i} for some c ∈ C}. where ⊕ denotes symmetric difference. (iii) Let m and m′ be integers so that 1 ≤ m ≤ m′ ≤ n, and let σ = [n] \ [m′ ]. The restriction of C to (m, m′ ) is the code rest(C, m, m′ ) := {u ∈ Fm 2 | supp(u) ∪ σ = supp(c) for some c ∈ C}. Restricting codes generalizes the notion of taking the link of a face in a simplicial complex. In particular, when m = m′ and the supports of codewords in C forms an abstract simplicial complex ∆, then the supports of vectors in rest(C, m, m′ ) form the simplicial complex Lkσ (∆) where σ = [n] \ [m]. This connection is important since taking links in the simplicial complex of a code can be used to understand the convexity of that code, as described in [2]. The following theorem allows us to translate precisely between homomorphisms preserving neural ideals and transformations of neural codes. Theorem 2.13. Let C be a neural code. Then (i) λ(JC ) = Jλ(C) , (ii) δi (JC ) = Jδi (C) , and (iii) ωm,m′ (JC ) = Jrest(C,m,m′ ) . The proof of Theorem 2.13 can be found in Section 4. Finally, we give a geometric interpretation of the behavior of permutation, bit flipping, and restriction maps. We first require a definition. Definition 2.14. Let U = {U1 , . . . , Un } be a collection of sets and let 1 ≤ m ≤ m′ ≤ n. The compatible region of (m, m′ ) in U is the set ! ! [ \ Uj . Ui \ m′ +1≤i≤n m+1≤j≤m′ Theorem 2.15. Let C be a code with a realization U = {U1 , . . . , Un } in a space X. (i) Let λ be a permutation of [n]. Then the set {Uλ(1) , . . . , Uλ(n) } is a realization of λ(C) in X. (ii) For any i the collection of sets {U1 , . . . , (X \ Ui ), . . . , Un } is a realization of δi (C) in X. (iii) Let m and m′ be integers so that 1 ≤ m ≤ m′ ≤ n and let X ′ be the compatible region of (m, m′ ) in U. The collection {Ui ∩ X ′ | i ∈ [m]} is a realization of rest(C, m, m′ ) in the space X ′ . The proof of Theorem 2.15 is given in Section 5. Together with Theorem 2.10, Theorem 2.15 allows us to describe any homomorphism preserving neural ideals in terms of operations on the realizations of codes. We have completely classified all homomorphisms preserving neural ideals and described how they affect the underlying codes. We have also described how these homomorphisms act geometrically on realizations of the associated codes. The correspondence we have described 6 R. AMZI JEFFS, MOHAMED OMAR, AND NORA YOUNGS can be summarized as follows. Permutation maps λ(xi ) = xλ(i) Permuting bits in ←→ codewords: C 7→ λ(C) Permuting labels on ←→ realization: U 7→ λ(U) Bit flipping ( maps 1 − xj j = i; δi (xj ) = xj i= 6 j Flipping i-th bit in ←→ all codewords of C: C 7→ δi (C) Replacing Ui with ←→ its complement X \ Ui Restriction maps ωm,m′ : F2 [n] → F2 [m] Intersecting all sets in Restricting to compatrealization with the ←→ ←→ ible codewords: compatible region for C 7→ rest(C, m, m′ ) (m, m′ ) The canonical form, an object introduced in [3], provides a concise presentation of JC and yields information about the underlying code and its realizations. In general it is nontrivial to compute the canonical form of a neural ideal. However, homomorphisms that preserve neural ideals provide a computational shortcut for translating between the related canonical forms. Definition 2.16. Let JC be a neural ideal. The canonical form of JC is the collection of pseudomonomials in JC which are minimal with respect to division, and is denoted CF (JC ). For any homomorphism φ preserving neural ideals, the canonical forms CF(JC ) and CF (φ(JC )) are related as follows. Theorem 2.17. Let φ : F2 [n] → F2 [m] be a homomorphism preserving neural ideals. Then CF (φ(JC )) ⊆ φ(CF(JC )) for any neural ideal JC , with equality when φ is a composition of a permutation and bit flipping map. This result suggests that we can obtain CF (φ(JC )) from CF (JC ). In fact we can: if we apply φ to every pseudomonomial in CF(JC ) and select from the result everything which is minimal with respect to division, the resulting set will be precisely CF (φ(JC )). This result is proven in Section 6. 3. Classifying homomorphisms that preserve neural ideals In order to establish Theorem 2.10 we first show that permutation, bit flipping, and restriction all preserve neural ideals. To this end, we give a preliminary characterization of homomorphisms that preserve neural ideals. Lemma 3.1. Let φ : F2 [n] → F2 [m] be a homomorphism. Then φ preserves neural ideals if and only if φ is surjective and for any pseudomonomial f ∈ F2 [n], φ(f ) is either a pseudomonomial or zero. Proof. Let φ be a homomorphism which preserves neural ideals. To see that φ is surjective, note that F2 [n] is a neural ideal containing 1, so its image must also be a neural ideal containing 1. Now, let f ∈ F2 [n] be a pseudomonomial and recall that hf i is a neural ideal, and φ(hf i) = hφ(f )i. Suppose that φ(f ) is not a pseudomonomial. Every factor of a pseudomonomial is again a pseudomonomial, so hφ(f )i does not contain any pseudomonomials. The only neural ideal containing no pseudomonomials is the zero ideal and so φ(f ) = 0. NEURAL IDEAL PRESERVING HOMOMORPHISMS 7 Conversely, let JC be a neural ideal in F2 [n]. Note that since φ is surjective φ(JC ) is an ideal of F2 [m]. Recall that JC = hρv | v ∈ / Ci, and so we will have that φ(JC ) = hφ(ρv ) | v ∈ / Ci. Removing the φ(ρv ) which are zero from the set of generators above we obtain a generating set for φ(JC ) consisting only of pseudomonomials. This implies that φ(JC ) is a neural ideal and the result follows.  Lemma 3.2. Permutation maps, bit flipping maps, and restriction maps all preserve neural ideals. Proof. Note that permutation maps and bit flipping maps are both automorphisms of F2 [n], and so are surjective. The image of a pseudomonomial under a permutation map is again a pseudomonomial since we are simply permuting the variables. Under a bit flipping map δi any occurrence of xi in a pseudomonomial will be changed to (1 − xi ) and vice versa, while the remaining factors are unchanged, so the image of any pseudomonomial is still a pseudomonomial. Thus permutation maps and bit flipping maps satisfy the conditions of Lemma 3.1 and must preserve neural ideals. Let ωm,m′ : F2 [n] → F2 [m] be a restriction map and f ∈ F2 [n] a pseudomonomial. Note that ωm,m′ (xi ) ∈ {0, 1, xi } for all i, and ωm,m′ (1−xj ) ∈ {0, 1, 1−xj } for all j. Hence applying ωm,m′ to f yields either zero (if one of the factors vanishes) or another pseudomonomial (when all factors map to either 1 or themselves). Furthermore ωm,m′ is surjective since it acts as the identity on F2 [m] as a subring of F2 [n]. Thus by Lemma 3.1 the map ωm,m′ preserves neural ideals.  Next we describe how a homomorphism that preserves neural ideals affects variables in F2 [n]. This will be critical in decomposing homomorphisms that preserve neural ideals into a composition of the three basic homomorphisms. Lemma 3.3. Let φ : F2 [n] → F2 [m] be a map preserving neural ideals. Then (i) for each j ∈ [m] there exists a unique i ∈ [n] so that φ(xi ) ∈ {xj , 1 − xj }, and (ii) for all i ∈ [n] we have φ(xi ) ∈ {0, 1, xj , 1 − xj }. Proof. The set {xi | i ∈ [n]} generates F2 [n] as an algebra, and since φ is surjective the set {φ(xi ) | i ∈ [n]} must generate F2 [m]. This implies that the set σ = {i ∈ [n] | φ(xi ) is not constant} has at least m elements. Consequently the pseudomonomial ! Y Y φ xi = φ(xi ) i∈σ i∈σ has degree at least m. But no pseudomonomial in F2 [m] can have degree larger than m and so this pseudomonomial has exactly m linear factors. Each φ(xi ) must be exactly one of these factors, and so for each j ∈ [m] we see that there is a unique i ∈ [n] for which φ(xi ) ∈ {xj , 1 − xj }. The remainder of the xi ’s map to constants, but the only constants are 0 and 1 and so the second statement of the lemma follows.  With Lemma 3.3 in hand we prove Theorem 2.10. 8 R. AMZI JEFFS, MOHAMED OMAR, AND NORA YOUNGS Proof of Theorem 2.10. If φ is a composition of restriction, permutation, and bit flipping maps then by Lemma 3.2 it preserves neural ideals. To prove the converse, let φ : F2 [n] → F2 [m] be a homomorphism that preserves neural ideals. We will decompose φ directly as the composition of a permutation, bit flipping map, and restriction map. First define four sets of indices: α0 = {i ∈ [n] | φ(xi ) = 0}, β0 = {i ∈ [n] | φ(xi ) = xj }, α1 = {i ∈ [n] | φ(xi ) = 1}, β1 = {i ∈ [n] | φ(xi ) = 1 − xj }. Note by Lemma 3.3 that these four sets completely partition [n]. Now define a permutation, bit flipping map, and restriction map as follows: • Let δ : F2 [n] → F2 [n] be the bit flipping map which replaces xi by 1 − xi for all i ∈ β1 . • Let λ to be a permutation of n which maps α0 to the set of indices between m + 1 and m + |α0 | inclusive, maps α1 to the set of indices between m + |α0 | + 1 and n inclusive, and maps i to j where φ(xi ) ∈ {xj , 1 − xj } for all other indices. • Let ω : F2 [n] → F2 [m] be the restriction map which sends xi to zero whenever m + 1 ≤ i ≤ m + |α0 | and to one whenever m + |α0 | + 1 ≤ i ≤ n. We claim that φ = ω ◦ λ ◦ δ. To prove this it suffices to show that the image of all variables in F2 [n] under ω ◦ λ ◦ δ is the same as under φ. We consider four cases. • If i ∈ α0 then the image of xi is 0 since δ does not affect xi , while by construction λ maps xi to an index which is sent to 0 by ω. • If i ∈ α1 then the image of xi is 1. Again δ does not affect xi , and λ maps xi to a variable mapped to 1 by ω. • If i ∈ β0 then δ does not affect it. The map λ then sends xi to φ(xi ) = xj by construction, and ω leaves the result unchanged. Thus the image of xi is exactly φ(xi ) as desired. • Finally, if i ∈ β1 then δ(xi ) = 1 − xi . Applying λ, we obtain 1 − xj which by construction is φ(xi ). Applying ω has no affect on this quantity and so again the image of xi is exactly φ(xi ). Since the image under ω ◦ λ ◦ δ of each variable is the same as its image under φ we conclude that φ = ω ◦ λ ◦ δ, and the result follows.  Corollary 3.4. Suppose that φ : F2 [n] → F2 [m] is a map preserving neural ideals. Then for every neural ideal JD in F2 [m] there exists a neural ideal JC in F2 [n] so that φ(JC ) = JD . Proof. We first show that every pseudomonomial f has a preimage fˆ under φ such that fˆ is a pseudomonomial. By Theorem 2.10 it suffices to prove this for bit flipping maps, permutations, and restrictions. For bit flipping maps and permutations this is clear since they are automorphisms whose inverses also preserve neural ideals. For restrictions, the pseudomonomial itself serves as its own preimage. Now let {f1 , . . . , fk } be a generating set of pseudomonomials for JD . We can find pseudomonomials {fˆ1 , . . . , fˆk } in F2 [n] so that φ(fˆi ) = fi , and letting JC be the neural ideal generated by {fˆ1 , . . . , fˆk } we see that φ(JC ) = JD .  4. The effects of homomorphisms on codes Given that we can decompose any homomorphism preserving neural ideals into three basic building blocks (permutation, bit flipping, and restriction) it is natural to ask how these NEURAL IDEAL PRESERVING HOMOMORPHISMS 9 building blocks affect the underlying codes of neural ideals. In particular, if φ(JC ) = JD , how are the codes C and D related in terms of the decomposition of φ? Theorem 2.13 gives a complete answer to this question. Proof of Theorem 2.13. For any v ∈ Fn2 define λ(v) to be the vector whose support is λ(supp(v)). Then note that λ(ρv ) = ρλ(v) for any vector v and permutation λ. With this we compute directly that λ(JC ) = hρλ(v) | v ∈ / Ci = hρv | v ∈ / λ(C)i = Jλ(C) . For the bit flipping map δi we may define δi (v) to be the vector whose support is supp(v)⊕{i} so that δi (C) = {δi (c) | c ∈ C}. Then note that δi (ρv ) = ρδi (v) and so we can compute δi (JC ) = hρδi (v) | v ∈ / Ci = hρv | v ∈ / δi (C)i = Jδi (C) . Finally, let ωm,m′ be a restriction map and let σ = [n] \ [m′ ]. For simplicity we write ω for ωm,m′ and let D = rest(C, m, m′ ). We then wish to show that ω(JC ) = JD . Recall from Definition 2.12 that u ∈ D if and only if supp(u) ∪ σ ∈ C. We will argue that ω(JC ) and JD contain the same indicator pseudomonomials. Let ρu ∈ JD be an indicator pseudomonomial, and let v be the n-bit vector whose support is supp(u) ∪ σ. Note that since u ∈ / D we have v ∈ / C by the definition of restriction, and hence ρv ∈ JC . By construction we have ω(ρv ) = ρu , and so ρu ∈ ω(JC ). For the reverse inclusion, observe that since {ρv | v ∈ / C} is a generating set for JC the set {ω(ρv ) | v ∈ / C} generates ω(JC ). All nonzero polynomials in {ω(ρv ) | v ∈ / C} will be indicator pseudomonomials in F2 [m], since applying ω removes all variables with indices greater than m while leaving those with smaller indices fixed. Each neural ideal is uniquely associated to its generating set of indicator pseudomonomials, and so we conclude that the nonzero elements of {ω(ρv ) | v ∈ / C} comprise all indicator pseudomonomials in ω(JC ). Thus if ρu ∈ ω(JC ) is an indicator pseudomonomial then ρu = ω(ρv ) for some ρv ∈ JC . But the only indicator ρv whose image under ω is ρu arises from the vector v whose support is supp(u) ∪ σ. Any other indicator will either disagree on a variable xi with i ∈ [m], or it will vanish under ω. Thus if ρu ∈ ω(JC ) then supp(u) ∪ σ ∈ / C, which implies that u ∈ / D by the definition of restriction. Then ρu ∈ JD , as desired. Having proven that ω(JC ) and JD are generated by the same indicator pseudomonomials we conclude that they are equal and the overall result follows.  5. Geometric interpretation of homomorphisms preserving neural ideals Finally we give a geometric characterization of permutation maps, bit flipping maps, and restriction maps. Theorem 2.13 allows us to translate the behavior of these homomorphisms into the world of neural codes, which we then interpret geometrically in Theorem 2.15. Definition 5.1. Let U = {U1 , . . . , Un } be a collection of sets and v ∈ Fn2 be a binary vector. Then the codeword region of v in U is the set ! \ [ AUv := Ui \ Uj . vi =1 vj =0 The codeword region is the set of points where all the sets Ui for i ∈ supp(v) are present, and no others. Note that with this definiton we can write C(U) = {v ∈ Fn2 | AUv 6= ∅}. That is, C(U) is the collection of vectors v so that the codeword region AUv is nonempty. 10 R. AMZI JEFFS, MOHAMED OMAR, AND NORA YOUNGS This notation is used heavily in the following proof to simplify the translation between a collection of sets and its associated code. Proof of Theorem 2.15. Let U = {U1 , . . . , Un } be a realization of the code C. The codeword region for λ(v) in the realization {Uλ(1) , . . . , Uλ(n) } is exactly AUv since we have simply permuted the indices of U. We conclude that the code of the collection {Uλ(1) , . . . , Uλ(n) } is {λ(v) | v ∈ C}, as desired. For bit flipping maps, observe that the codeword region AUv is exactly the codeword region for the vector whose support is supp(v) ⊕ {i} in the realization {U1 , . . . , X \Ui , . . . , Un } since taking the set difference with Ui is the same as intersecting with its complement, and intersecting with Ui is the same as taking the difference with its complement. Hence u is in the code of {U1 , . . . , X \Ui , . . . , Un } if and only if supp(u) = supp(c)⊕{i} for some c ∈ C and the result follows. Finally we show that {Ui ∩ X ′ | i ∈ [m]} is a realization of rest(C, m, m′ ). For convenience let V = {Ui ∩X ′ | i ∈ [m]} and σ = [n]\[m′ ] as in Definiton 2.12. We then consider the region V AVv for all vectors v ∈ Fm 2 . If v = 00 · · · 0 then the empty intersection in the definition of Av ′ ′ V will be all of X since we are considering this realization in the space X . The region Av is nonempty if and only if X ′ is not covered by {Ui | i ∈ [m]}, i.e., if and only if supp(c) = σ for c ∈ C. Hence in this case we have v ∈ C(V) if and only if supp(v) ∪ σ ∈ C. When v is nonzero we compute directly that   \ [ AVv =  (Ui ∩ X ′ ) \ (Uj ∩ X ′ ) i∈supp(v)  = \ i∈supp(v)∪σ j∈[m]\supp(v)  Ui  \ [ Uj . j∈[n]\(supp(v)∪σ) In this case we also see that v ∈ C(V) if and only if supp(v) ∪ σ ∈ C. By definition this implies that C(V) = rest(C, m, m′ ), proving the result.  This geometric interpretation allows us to specify certain classes of maps which preserve convex neural ideals. Corollary 5.2. Permutation maps preserve convex neural ideals. When m = m′ the restriction map ωm,m′ preserves convex neural ideals. Proof. Relabelling sets in a realization does not affect convexity, and so permutation maps necessarily preserve convex neural ideals. For a restriction map ω with m = m′ , we consider the realization given by Theorem 2.15. If we begin with a convex realization U of C then the compatible region X ′ is simply the intersection of a finite number of convex open sets and hence is itself convex and open. Likewise, all Ui ∩ X ′ are convex and open, so {Ui ∩ X ′ | i ∈ [m]} is a convex realization of rest(C, m, m′ ). By Theorem 2.13 we have ω(JC ) = Jrest(C,m,m′ ) and so ω(JC ) is a convex neural ideal.  Example 5.3. Figure 2 shows a code C on four bits along with a convex realization U = {U1 , U2 , U3 , U4 } in the plane. We can apply Theorem 2.15 to obtain a realization of the code rest(C, 2, 2) in the space X ′ = U3 ∩ U4 . As observed in Corollary 5.2, this new realization consists of convex sets in a convex space, and hence rest(C, 2, 2) is a convex code. Bit flipping maps are the least well behaved among maps preserving neural ideals in terms of respecting convexity of the underlying codes. Indeed, taking the complement of a convex NEURAL IDEAL PRESERVING HOMOMORPHISMS 11 r Figure 2. A convex realization of a code C, and a convex realization of rest(C, 2, 2) as given by Theorem 2.15 and Corollary 5.2. set almost never yields another convex set. Thus in the context of convex codes, bit flipping does not play a natural role. It is also important to note that Corollary 5.2 does not completely describe when convexity is preserved. Corollary 5.2 gives us a guarantee about when φ(JC ) corresponds to a convex code for all convex codes C ⊆ Fn2 , but there may be cases when JC and φ(JC ) both correspond to convex codes for other homomorphisms φ. For example, it is possible that δi (JC ) = JC for a convex code C. 6. Homomorphisms and the canonical form Lastly we prove Theorem 2.17. As a preliminary ingredient we show that every pseudomonomial can be expressed as a sum of indicator pseudomonomials. Lemma 6.1. Let f be a pseudomonomial. Then f can be written as a sum of indicator pseudomonomials. Proof. We proceed by induction on n − deg(f ). Note that we have n − deg(f ) ≥ 0 since pseudomonomials never have degree larger than n. In the base case that n − deg(f ) = 0 we have that deg(f ) = n so f is an indicator and the result follows trivially. If n − deg(f ) > 0 then there is some variable xi on which f does not depend. Then we may apply the inductive hypothesis to the pseudomonomials xi f and (1 − xi )f . Noticing that f = xi f + (1 − xi )f we obtain the desired result.  Proof of Theorem 2.17. By Theorem 2.10 it suffices to prove the theorem for permutations, bit flipping maps, and restrictions. In the case of permutations and bit flipping maps the result is clear since these are automorphisms of F2 [n] and so they provide a bijective correspondence between pseudomonomials that are minimal with respect to division. Thus if φ is a composition of bit flipping and permutation maps then CF (φ(JC )) = φ(CF (JC )). This leaves the case of a restriction P map ω with parameters 1 ≤ m ≤ m′ ≤ n. In this case let f ∈ CF (φ(JC )) and write f = ρv as guaranteed by Lemma 6.1. Recall from the 12 R. AMZI JEFFS, MOHAMED OMAR, AND NORA YOUNGS proof of Theorem 2.13 that ρv ∈ ω(JC ) if and only if ρu ∈ JC where supp(u) = supp(v) ∪ σ. Defining a pseudomonomial Y Y (1 − xj ) xi h= m′ +1≤i≤n m+1≤j≤m′ we see Pthat it is equivalent to state that ρv ∈ ω(JC ) if and only if hρv ∈ JC . We conclude that hρv is in JC , noting that this is simply the pseudomonomial hf . Furthermore we can observe that ω(hf ) = f , and so we have shown that there is some pseudomonomial in JC which maps to f . Among all pseudomonomials in JC that map to f , choose fˆ to be minimal with respect to division. We claim that the pseudomonomial fˆ is in CF (JC ). If g|fˆ for a pseudomonomial g ∈ JC then ω(g) must divide f . Since f ∈ CF (ω(JC )) we see that ω(g) = f . By the minimality of fˆ we have g = fˆ, and so fˆ ∈ CF (JC ). We have shown that every pseudomonomial f in CF (ω(JC )) is also in ω(CF(JC )) and so the result follows.  References [1] Joshua Cruz, Chad Giusti, Vladimir Itskov, and Bill Kronholm. Open and closed convex codes. 2016. http://arxiv.org/abs/1609.03502. [2] Carina Curto, Elizabeth Gross, Jack Jeffries, Katherine Morrison, Mohamed Omar, Zvi Rosen, Anne Shiu, and Nora Youngs. What makes a neural code convex? 2015. http://arxiv.org/abs/1508.00150. [3] Carina Curto, Vladimir Itskov, Alan Veliz-Cuba, and Nora Youngs. The neural ring: an algebraic tool for analyzing the intrinsic structure of neural codes. Bulletin of Mathematical Biology, 75(9), 2013. [4] Carina Curto and Nora Youngs. Neural ring homomorphisms and maps between neural codes. 2015. http://arxiv.org/abs/1511.00255. [5] R. Amzi Jeffs. Convexity of neural codes. 2016. https://www.math.hmc.edu/ rjeffs/thesis/rjeffs-2016thesis.pdf. [6] Caitlin Lienkaemper, Anne Shiu, and Zev Woodstock. Obstructions to convexity in neural codes. 2015. http://arxiv.org/abs/1509.03328. [7] M. Tancer. Intersection patterns of convex sets via simplicial complexes: a survey. Thirty essays on geometric graph theory, pages 521–540, 2013. Department of Mathematics. Harvey Mudd College, Claremont, CA 91711 E-mail address: [email protected] Department of Mathematics. Harvey Mudd College, Claremont, CA 91711 E-mail address: [email protected] Department of Mathematics. Colby College, Waterville, ME E-mail address: [email protected]
0math.AC
1 Energy-Efficient Scheduling for Homogeneous Multiprocessor Systems arXiv:1510.05567v2 [cs.OS] 12 Nov 2015 Mason Thammawichai, Student Member, IEEE and Eric C. Kerrigan, Member, IEEE Abstract—We present a number of novel algorithms, based on mathematical optimization formulations, in order to solve a homogeneous multiprocessor scheduling problem, while minimizing the total energy consumption. In particular, for a system with a discrete speed set, we propose solving a tractable linear program. Our formulations are based on a fluid model and a global scheduling scheme, i.e. tasks are allowed to migrate between processors. The new methods are compared with three global energy/feasibility optimal workload allocation formulations. Simulation results illustrate that our methods achieve both feasibility and energy optimality and outperform existing methods for constrained deadline tasksets. Specifically, the results provided by our algorithm can achieve up to an 80% saving compared to an algorithm without a frequency scaling scheme and up to 70% saving compared to a constant frequency scaling scheme for some simulated tasksets. Another benefit is that our algorithms can solve the scheduling problem in one step instead of using a recursive scheme. Moreover, our formulations can solve a more general class of scheduling problems, i.e. any periodic real-time taskset with arbitrary deadline. Lastly, our algorithms can be applied to both online and offline scheduling schemes. ✦ 1 I NTRODUCTION D Ue to higher computational power demands in modern computing systems, e.g. sensor networks, satellites, multi-robot systems, as well as personal embedded electronic devices, a system’s power consumption is significantly increase. Therefore, an efficient energy management protocol is required in order to balance the power consumption and workload requirement of a system. With this motivation, this paper is aimed at using an optimization-based approach to develop an algorithm for a multiprocessor real-time scheduling problem with the goal of minimizing energy consumption. The dynamic power consumption of a CMOS processor is often represented as a function of both clock frequency and supply voltage [1]. Thus, a dynamic voltage and frequency scaling (DVFS) scheme is often applied to reduce processor power consumption. DVFS is now commonly implemented in various computing systems, both at hardware and software levels. Examples include Intel’s SpeedStep technology, AMD’s PowerNow! technology and the Linux Kernel Power Management Scheme. 1.1 Terminologies and Definitions This section provides basic terminologies and definitions used throughout the paper. Speed s: The speed s of a processor is defined as the ratio between the operating frequency f and the maximum system frequency fmax , i.e. s := f /fmax . We denote with smin the minimum execution speed of a processor. Task Ti : A task Ti is defined as a triple Ti := (ci , di , pi ); ci is the required number of processor cycles, di is the task’s • • Mason Thammawichai is with the Department of Aeronautics, Imperial College London, London SW7 2AZ, UK E-mail: [email protected] Eric C. Kerrigan is with the Department of Electrical & Electronic Engineering and the Department of Aeronautics, Imperial College London, London SW7 2AZ, UK. E-mail: [email protected] deadline and pi is the task’s period. If the task’s deadline is equal to its period, the task is said to have an ‘implicit deadline’. The task is considered to have a ‘constrained deadline’ if its deadline is not larger than its period, i.e. di ≤ pi . In the case that the task’s deadline can be less than, equal to, or greater than its period, it is said to have an ‘arbitrary deadline’. Job Tij : A job Tij is defined as the j th instance of task Ti , where j ≥ 1. Tij arrives at time (j − 1)pi , has the required execution cycles ci and a deadline at time (j − 1)pi + di . Taskset: The taskset is defined as a set composed of realtime tasks. Minimum Execution Time xi : The minimum execution time xi of a task Ti is the execution time of the task when the task is executed at fmax , xi := ci /fmax . Task Density δi (si ): The task density δi (si ) of a task Ti executed at a speed si is defined as the ratio between the task execution time and the minimum of its deadline and its period, i.e. δi (si ) := ci /(si fmax min{di , pi }). When all tasks are assumed to have an implicit deadline, this is often called ‘task utilization’. Taskset Density D(si ): The taskset density D(si ) is defined as theP summation of all task densities in the taskset, i.e. D(si ) := n i=1 δi (si ), where n is a number of tasks in the taskset. The minimum taskset density D is given by P D := ni=1 δi (1). Feasibility Optimal: Feasibility optimality of a homogeneous multiprocessor system is obtained when the upper bound on the minimum taskset density D, for which the algorithm is able to construct a valid schedule such that no deadlines are missed, equals the total number of processors in the system. Scheduling Scheme: Multiprocessor scheduling can be classified according to the task migration scheme1 : a ‘global 1. A task migration occurs when a task execution is suspended on one processor and continues on another processor, while pre-emption is used when the execution of a task on a processor is suspended in order to start executing another task. 2 scheduling scheme’ allows task migration between processors and a ‘partitioned scheduling scheme’ does not allow task migration. Remaining Execution Time x_ i Fluid Schedule Path 1.2 Related Work There are at least two well-known feasibility optimal homogeneous multiprocessor scheduling algorithms of an implicit deadline taskset that are based on a fluid scheduling model: Proportionate-fair (Pfair) [2] and Largest Local Remaining Execution Time First (LLREF) [3]. Both Pfair and LLREF are global scheduling algorithms. A fluid model, shown in Figure 1, is the ideal schedule path of a task Ti , where the remaining minimum execution time is represented by a straight line and the slope of the line is the task execution speed si . By introducing the notion of fairness, Pfair ensures that at any instant no task is one or more quanta (time intervals) away from the task’s fluid path. However, the Pfair algorithm suffers from a significant run-time overhead, because tasks are split into several segments, incurring frequent algorithm invocations and task migrations. To overcome these disadvantages, the LLREF algorithm pre-empts a task at two scheduling events within each time interval [3]. One occurs when the remaining time of an executing task is zero and the other event happens when the difference between a deadline and a remaining execution time of a task is zero. By incorporating a DVFS scheme with a fluid model, [4] proposed the real-time static voltage and frequency scaling (RT-SVFS) algorithm, which allows the slope of a fluid schedule to vary between 0 and 1. To improve the performance of the open-loop static algorithm of [4], a closedloop dynamic algorithm is proposed in [5]. Their dynamic algorithm considered uncertainty in the task execution time. By extending [4], an energy-efficient scheduling algorithm for real-time tasks with unknown arrival time, known as a sporadic real-time task, was proposed in [6]. Deadline Partitioning (DP) [7] is the technique that partitions time into intervals bounded by two successive task deadlines, after which each task is allocated the workload and is scheduled at each time interval. A simple optimal scheduling algorithm, called DP-WRAP, was presented in [7]. The DP-WRAP algorithm partitions time according to the DP technique and, at each time interval, the tasks are scheduled using McNaughton’s wrap around algorithm [8]. McNaughton’s wrap around algorithm aligns all task workloads along a number line, starting at zero, then splits tasks into chunks of length 1 and assigns each chunk to the same processor. However, the algorithms that are based on the fairness notion [3]–[5], [7], [9], [10] are schedulability optimal, but have hardly been applied in a real system, since they suffer from high scheduling overheads, i.e. task pre-emptions and migrations. Recently, two schedulability optimal algorithms that are not based on the notion of fairness have been proposed. One is the RUN algorithm [11], which uses a dualization technique to reduce the multiprocessor scheduling problem to a series of uniprocessor scheduling problems. The other is U-EDF [12], which generalises the earliest deadline first (EDF) algorithm to multiprocessors by reducing the problem to EDF on a uniprocessor. Practical Schedule Path di Non-Execution Interval Time Execution Interval Ti Fig. 1. Fluid Schedule and a Practical Schedule [3] Alternatively to the above methods, the multiprocessor scheduling problem can also be formulated as an optimization problem. However, since the problem is NP-hard, in general [13], polynomial-time heuristic methods are often used. An example of these approaches can be found in [14], which addresses the energy-aware multiprocessor partitioning problem and [15], which proposes an energy and feasibility optimal global framework for a two-type multicore platform. In general, the tasks are partitioned among the set of processors, followed with computing the running frequency. Among all of the feasibility assignments, an optimal energy consumption assignment is chosen by solving a mathematical optimization problem, where the objective is to minimize energy. The constraints are to ensure that all tasks will meet their deadlines and only one processor is assigned to a task. In partitioned scheduling algorithms, such as [14], once a task is assigned to a specific processor, the multiprocessor scheduling problem is reduced to a set of uniprocessor scheduling problems, which is well studied [16]. However, a partitioned scheduling method cannot provide an optimal schedule. 1.3 Contribution In this paper, we propose three mathematical optimization problems to solve a periodic hard real-time task scheduling problem on homogeneous multiprocessor systems with DVFS capabilities. First is an MINLP, which adopts the fluid model used in [2]–[4] to represent a scheduling dynamic. The MINLP relies on the optimal control of a suitablydefined dynamic to globally solve for a valid schedule, while solutions are obtained by solving each instance of the time interval obtained using the DP technique [3], [4], [7]. By determining a fraction of task’s execution time and operating speed, rather than task assignments, the same scheduling problem can be formulated as an NLP. Lastly, we propose an LP for a system with discrete speed levels. Our work presents homogeneous multiprocessor scheduling algorithms that are both feasibility optimal and energy optimal. Furthermore, our formulations are capable of solving any periodic tasksets, i.e. implict, constrained and arbitary deadlines. 3 1.4 Outline of Paper 2.3 Scheduling as an Optimal Control Problem This paper is organized as follows: Section 2 defines our scheduling problem in detail. Three mathematical optimization formulations to solve the same multiprocessor scheduling problem are proposed in Section 3. The simulation setup and results are presented in Section 4. Finally, conclusions and future work are discussed in Section 5. The objective is to minimize the total energy consumption of executing a periodic taskset within the hyperperiod L. The scheduling problem can therefore be formulated as the following infinite-dimensional continuous-time optimal control problem: XZ L ℓ(aijk (t), sijk (t))dt (3a) minimize 2 xij (·),aijk (·), i,j,k sijk (·),i∈I, j∈Ji ,k∈K P ROBLEM F ORMULATION 0 subject to 2.1 Task and Processor Model We consider a set of n periodic real-time tasks that are to be partitioned on m identical processors, where each processor’s voltage/speed can be adjusted individually. All tasks are assumed to start at the same time. The hyperperiod L is defined as the least common multiple of all task periods. The tasks can be pre-empted at any time, do not share resources and do not have any precedence constraints. It is assumed that D ≤ m in order to guarantee the existence of a valid schedule. Below, we will refer to the sets I := {1, . . . , n}, Ji := {1, . . . , L/pi } and K := {1, . . . , m}. The remaining minimum execution time of job Tij at time t will be denoted by xij (t). Note that ∀i, ∀j, ∀k, ∀t will be used as short-hand for ∀i ∈ I, ∀j ∈ Ji , ∀k ∈ K, ∀t ∈ [0, L], respectively. 2.2 Energy Consumption Model For CMOS processors, the total power consumption is often simply expressed as an increasing function of the form P (s) := Pd (s) + Ps = αsβ + Ps , (1) where Pd (s) is the dynamic power consumption due to the charging and discharging of CMOS gates, α > 0 and β ≥ 1 are hardware-dependent constants and the static power consumption Ps , which is mostly due to leakage current, is assumed to be either constant or zero [1]. The total energy consumption from executing a task can be expressed as a summation of the active and idle energy consumed, i.e. E = Eactive + Eidle , where Eactive is the energy consumed when the processor is busy executing the task and Eidle is the energy consumed when the processor is idle. The energy consumed by executing and completing a task at a constant speed s is E(s) = Eactive (s) + Eidle (s) c (Pactive (s) − Pidle ) = + Pidle d fmax s x(Pactive (s) − Pidle ) = + Pidle d, s (2a) (2b) (2c) where Pactive (s) := Pd (s) + Ps is the power consumption in the active interval, Pidle is the power consumption during the idle period. Pidle > 0 and Ps > 0 will be assumed to be constants. Note that Pactive (s) − Pidle is strictly greater than zero and that the last term Pidle d is not a function of the speed. xij ((j − 1)pi ) = xi , xij ((j − 1)pi + di ) = 0, X sijk (t)aijk (t), ẋij (t) = − X ∀i, j ∀i, j (3b) ∀i, j, t, a.e. (3d) aijk (t) ≤ 1, ∀i, j, t (3e) aijk (t) ≤ 1, ∀k, t (3f) ∀i, j, k, t ∀i, j, k, t (3h) (3c) k k X i,j smin ≤ sijk (t) ≤ 1, aijk (t) ∈ {0, 1}, (3g) where ℓ(a, s) := a(Pactive (s) − Pidle ), sijk (t) is the execution speed of job Tij at time t and aijk (t) is used to indicate processor assignment, i.e. aijk (t) = 1 if and only if job Tij is active on processor k at time t. The initial conditions on the minimum execution time of all jobs are specified in (3b) and job deadline constraints are specified by (3c). The fluid model of the scheduling dynamic is given in (3d), where the state is x and the control inputs are a and s. The constraint that each job is assigned to at most one processor at a time is ensured by (3e) and (3f) enforces that each processor is assigned to at most one job at a time. Upper and lower bounds on the processor speed are given in (3e). The binary nature of job assignment variables are given by (3h). 3 S OLVING THE S CHEDULING P ROBLEM WITH F INITE - DIMENSIONAL M ATHEMATICAL O PTIMIZA TION This section provides details on three mathematical optimization problems to solve the same scheduling problem defined in Section 2.3. The original problem (3) will be discretized by introducing piecewise constant constraints on the control inputs s and a. Let {τ0 , τ1 , . . . , τN }, which we will refer to as the major grid, be the set of time instances corresponding to the distinct arrival times and deadlines of all jobs within the hyperperiod L, where 0 = τ0 ≤ τ1 ≤ · · · ≤ τN = L. 3.1 Mixed-integer Nonlinear Program (MINLP-DVFS) The above scheduling problem, subject to piecewise constant constraints on the control inputs, is most naturally formulated as an MINLP, as defined below. 4 Though it has been observed by [3] that it is often the case that tasks might have to be split in order to make the entire taskset schedulable, the runtime overheads caused by context switches can jeopardize the performance. Therefore, a variable discretization time step [17] method is applied in a so-called minor grid, so that the solution to our scheduling problem does not depend on the size of the discretization time step. Let {τµ,0 , . . . , τµ,M } denote the set of time instances on a minor grid within the time interval [τµ , τµ+1 ] with τµ = τµ,0 ≤ · · · ≤ τµ,M = τµ+1 , so that {τµ,1 , . . . , τµ,M−1 } is to be determined for all µ from solving an appropriately-defined optimization problem. Let ∀µ and ∀ν be short-hand for ∀µ ∈ U := {0, . . . , N − 1} and ∀ν ∈ V := {0, . . . , M − 1}. Define the notation [µ, ν] := (τµ,ν ), ∀µ, ν and the discretized state and input sequences as xij [µ, ν] := xij (τµ,ν ), sijk [µ, ν] := sijk (τµ,ν ), aijk [µ, ν] := aijk (τµ,ν ), ∀i, j, µ, ν ∀i, j, k, µ, ν ∀i, j, k, µ, ν If sijk (·) and aijk (·) are constant in-between time instances on the minor grid, i.e. sijk (t) = sijk [µ, ν], ∀t ∈ [τµ,ν , τµ,ν+1 ), µ, ν aijk (t) = aijk [µ, ν], ∀t ∈ [τµ,ν , τµ,ν+1 ), µ, ν (5a) (5b) then it is easy to show that the solution of the scheduling dynamic (3d) is given by xij [µ, ν + 1] = xij [µ, ν] X sijk [µ, ν]aijk [µ, ν], − h[µ, ν] ∀i, j, µ, ν (6a) where h[µ, ν] := τµ,ν+1 − τµ,ν , ∀µ, ν. (6b) Let Λ denote the set of all jobs within hyperperiod L, i.e. Λ := {Tij |i ∈ I, j ∈ Ji }. Define a function ΦA : Λ → U × V by ΦA (Tij ) := (µ, ν) such that τµ,ν = (j − 1)pi , ∀Tij ∈ Λ and a function ΦD : Λ → U × V by ΦD (Tij ) := (µ, ν) such that τµ,ν = (j − 1)pi + di , ∀Tij ∈ Λ. The original problem (3) subject to the piecewise constant constraints on the inputs (5) is therefore equivalent to the following finite-dimensional MINLP: X h[µ, ν]ℓ(aijk [µ, ν], sijk [µ, ν]) (6c) minimize xij [·],sijk [·], µ,ν,i,j,k aijk [·],h[·], i∈I,j∈Ji ,k∈K subject to (6a) and ∀i, j ∀i, j (6d) ∀i, j, µ, ν (6f) ∀k, µ, ν (6g) ∀i, j, k, µ, ν ∀i, j, k, µ, ν ∀µ, ν (6h) ∀µ (6k) (6e) k X aijk [µ, ν] ≤ 1, i,j smin ≤ sijk [µ, ν] ≤ 1, aijk [µ, ν] ∈ {0, 1}, 0 ≤ h[µ, ν], X h[µ, ν] = τµ+1 − τµ , ν Theorem 1. If a solution exists to (3b)–(3h) and M ≥ max{n − 1, m − 1}, then a solution exists to problem (6). Proof: Follows from the fact that if a solution exists to (3b)–(3h), then the DP-WRAP scheduling algorithm can find a valid schedule with at most n − 1 context switches and m − 1 migrations per slice [7, Thm 6]. 3.2 Continuous Nonlinear Program (NLP-DVFS) This section proposes an NLP formulation without integer variables to solve the problem in Section 2.3. The idea is to relax the binary constraints in (6i) so that the value of a can be interpreted as the fraction of a time interval during which the job is executed on a processor. Moreover, the number of variables can also be reduced compared to problem (6), since the processor assignment information does not help in finding the task execution order, hence k is dropped from the subscripts in the notation. That is, partitioning time using only the major grid (i.e. M = 1) is enough to find a feasible schedule if a solution exists to the original problem (3). Since we only need a major grid, we define the notation [µ] := (τµ ). Consider now the following finite-dimensional NLP: X (τµ+1 − τµ )ℓ(aij [µ], sij [µ]) (7a) minimize xij [·],sij [·], aij [·],i∈I,j∈Ji µ,i,j subject to k xij [ΦA (Tij )] = xi xij [ΦD (Tij )] = 0, X aijk [µ, ν] ≤ 1, where (6j)–(6k) enforce upper and lower bounds on the discretization time steps. (6i) (6j) xij [ΦA (Tij )] = xi , xij [ΦD (Tij )] = 0, xij [µ + 1] = xij [µ] − (τµ+1 − τµ )sij [µ]aij [µ], X aij [µ] ≤ m, ∀i, j ∀i, j (7b) ∀i, j, µ (7d) ∀µ (7e) smin ≤ sij [µ] ≤ 1, 0 ≤ aij [µ] ≤ 1, ∀i, j, µ ∀i, j, µ (7f) (7c) i,j (7g) where aij [µ] ∈ R is the fraction of the time interval [τµ , τµ+1 ) for which job Tij is executing on a processor at speed sij [µ] and (7e) specifies that the total workload in time interval [τµ , τµ+1 ) should be less than or equal to the system capacity. Theorem 2. If a solution exists to (3b)–(3h), then a solution to problem (7) exists. Furthermore, at least one valid schedule satisfying (3b)–(3h) can be constructed from a solution to problem (7) with the same energy consumption. Proof: A similar argument as Theorem 1 can be used to prove the existence of a solution. The simplest valid schedule can be constructed using McNaughton’s wrap around algorithm [8] for each time interval [τµ , τµ+1 ). During each interval [τµ , τµ+1 ), the taskset is schedulable since (i) the total density of the taskset does not exceed the total number of processors, which is guaranteed by contraint (7e), (ii) no task workload is greater than its deadline, which is ensured by constraint (7g) and (iii) task migration is allowed, which is our assumption. The optimal energy 5 consumption relies on the fact that the total energy consumption does not depend on the order of which tasks are scheduled, but rather depends on the taskset’s density, i.e. the objective value stays the same regardless of the number of discretization steps M on the minor grid. 3.3 Linear Program (LP-DVFS) Suppose now that the set of speed levels is finite, as is the case with a real processor. We denote with sq the speed of the processor at level q ∈ Q := {1, . . . , l}, where l is the total number of speed levels. Consider now the following finite-dimensional LP: X (τµ+1 − τµ )ℓ(aqij [µ], sq ) (8a) minimize q xij [·],aij [·], i∈I,j∈Ji ,q∈Q µ,i,j,q subject to xij [ΦA (Tij )] = xi xij [ΦD (Tij )] = 0, xij [µ + 1] = xij [µ] − (τµ+1 − τµ ) X sq aqij [µ], ∀i, j ∀i, j (8b) ∀i, j, µ (8d) (8c) q X aqij [µ] ≤ 1, aqij [µ] ≤ m, sk ,k∈K i,k X uik (sk ) ≤ 1, ∀i, j, µ (8e) ∀µ (8f) X ∀i, j, q, µ (8g) smin ≤ sk ≤ 1, sk = 1, i,j,q 0 ≤ aqij [µ] ≤ 1, For a system with a continuous speed range, four algorithms were compared: (i) MINLP-DVFS, (ii) NLP-DVFS, (iii) GP-SVFS, which represents a global energy/feasibilityoptimal workload partitioning with constant frequency scaling scheme and (iv) GP-NoDVFS, which is a global workload allocation without frequency scaling scheme. For a system with discrete speed levels, three algorithms are compared: (i) LP-DVFS, (ii) GP-NoDVFS and (iii) GP-SDiscrete, which represents global energy/feasibility-optimal workload allocations with constant discrete frequency scaling. Note that the formulations of GP-SVFS and GP-SDiscrete are similar to [14], [15]. Specifically, the GP-SVFS is based on a constant frequency scaling with global scheduling scheme, while [14] is a partitioning-based formulation and [15] is a generalized formulation for a two-type heterogeneous multi-core system. GP-SDiscrete is an extension to systems with discrete speed levels. Details on GP-SVFS, GP-NoDVFS and GP-SDiscrete are given below. GP-SVFS/GP-NoDVFS: Solve X minimize Lℓ(uik (sk ), sk ) (9a) subject to q X 4.2 Comparison between Algorithms q where aij [µ] ∈ R is the fraction of the time interval [τµ , τµ+1 ) for which job Tij is executing on a processor at speed sq . Constraint (8e) assures that a task will not run on more than one processor at a time. Constraint (8f) guarantees that a processor’s workload will not exceed its capacity at a time. Lastly, constraint (8g) provides upper and lower bounds on a fraction of a job’s execution time at a specific speed level variable. Note that, given a solution to the optimization problem (8), one could also employ McNaughton’s wrap around algorithm [8] to construct a valid schedule of processor assignments with the same energy consumption. In other words, Theorem 2 can be applied here as well to prove an existence of a valid schedule given a solution to problem (8). ∀i (9b) ∀k (9c) k uik (sk ) ≤ 1, i ∀k (GP − SV F S) (9d) ∀k (GP − N oDV F S) (9e) where uik (sk ) is the task density on processor k , i.e. uik (sk ) := xi /(sk fmax di ) and sk is the static execution speed of processor k . A task will not be executed on more than one processor at the same time due to (9b) and the assigned workload will not exceed processor capacity due to (9c). The difference between GP-SVFS and GP-NoDVFS lies in restriction on operating speed to be either a continous variable (9d) or fixed at the maximum speed (9e). GP-SDiscrete: Determine a fraction of the workload yikq of a task at a specific speed level and a processor speed level selection zkq such that: X minimize Lℓ(uikq (yikq )zkq , sq ) (10a) yikq ,zkq ,i∈I, k∈K,q∈Q i,k,q subject to X yikq zkq = 1, ∀i (10b) zkq = 1, ∀k (10c) uikq (yikq )zkq ≤ 1, ∀i (10d) uikq (yikq )zkq ≤ 1, ∀k (10e) ∀i, k, q ∀k, q (10f) k,q 4 S IMULATION R ESULTS 4.1 System, Processor and Task Models The performance of solving the above optimization problems is evaluated on two models of practical commercial processors, namely an XScale and PowerPC 405LP. The power consumption details of the two commercial processors, which have also been used in [18]–[20], are given in Table 1. The active power consumption models of the XScale and PowerPC 405LP shown in Table 2 were obtained by a polynomial curve fitting to the generic form (1) (details are given in the appendix B). The plots of the actual data versus the fitted models are shown in Fig. 2. X q X k,q X i,q 0 ≤ yikq ≤ 1, zkq ∈ {0, 1}, (10g) where yikq represents a fraction of the workload of a task at a specific speed level and zkq is a speed level selection variable for processor k , i.e. zkq = 1 if a speed level q is selected and zkq = 0 otherwise. The constraints in (10b) 6 1.6 0.8 Actual Data Power Model Power Consumption (Watt) Power Consumption (Watt) 1.8 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 Operating Speed s 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 1 Actual Data Power Model 0.2 (a) XScale 0.4 0.6 Operating Speed s 0.8 1 (b) PowerPC 405LP Fig. 2. Actual Data versus Fitted Model TABLE 1 Commercial Processor Details for Simulation Processor type Frequency (MHz) Speed Voltage (V) Active Power (mW) Idle Power (mW) 150 0.15 0.75 80 400 0.4 1.0 170 XScale [21] 600 800 0.6 0.8 1.3 1.6 400 900 40 [18] 1000 1.0 1.8 1600 PowerPC 405LP [22] 33 100 266 333 0.1 0.3 0.8 1.0 1.0 1.0 1.8 1.9 19 72 600 750 12 TABLE 2 Processor Power Consumption Fitted Model Processor type XScale PowerPC 405LP Active Power Model Pactive (s) := 1524.92s3.0269 + 75.1092 Pactive (s) := 736.87s2.0990 + 13.1333 TABLE 3 Simulation Tasksets D T1 T2 T3 T4 0.4 (0.75,5,10) (0.75,5,10) (0.5,10,10) (0.5,10,10) 0.6 (1,5,10) (1,5,10) (1,10,10) (1,10,10) 0.8 (1.5,5,10) (1.5,5,10) (1,10,10) (1,10,10) 1.0 (2,5,10) (2,5,10) (1,10,10) (1,10,10) 1.2 (2.5,5,10) (2.5,5,10) (1,10,10) (1,10,10) 1.4 (3,5,10) (3,5,10) (1,10,10) (1,10,10) 1.6 (3,5,10) (3,5,10) (2,10,10) (2,10,10) 1.8 (3.5,5,10) (3.5,5,10) (2,10,10) (2,10,10) 2.0 (4,5,10) (4,5,10) (2,10,10) (2,10,10) Note: The first parameter of a task is xi ; ci can be obtained by multiplying xi by fmax . guarantee that the total workload of a task is equal to 1. The constraints in (10c) ensure that only one speed level is selected, (10d) assures that a task will be executed on only one processor at a time, (10f) ensures that a processor workload capacity is not violated and (10g) emphasises that the speed level selection variable is binary. Note that GPSVFS and GP-NoDVFS are NLPs and GP-SDiscrete is an MINLP. 2. See Appendix A. MAPE2 1.1236 5.2323 4.3 Simulation Setup and Results For simplicity, we consider the case where four independent periodic real-time tasks with constrained deadlines need to be scheduled onto two homogeneous processors. The total energy consumption of each taskset in Table 3 were evaluated. For the MINLP-DVFS, NLP-DVFS and LP-DVFS implementations, the major grid discretization step N := 2 because all tasksets for the simulation only have two distinct deadlines. For the MINLP-DVFS, we chose the minor grid discretization step M := 4, since there are at most four jobs in each major grid, which implies that there will be at most four preemptions within each major grid. All of our formulations were modelled using ZIMPL [23] and solved by SCIP [24]. Simulation results are shown in Figures 3 and 4. The minimum taskset density D is represented on the horizontal axis. The vertical axis represents the total energy consumption normalised by the energy used by GP-NoDVFS, i.e. less than 1 means that an algorithm does better than GPNoDVFS. It can be seen from the plots that for a timevarying workload such as a constrained deadline taskset, our results from solving MINLP-DVFS, NLP-DVFS and LPDVFS are energy optimal, while GP-SVFS, GP-Discrete and GP-NoDVFS are not. This is because our formulations are incorporated with time, which provides benefits on solving a scheduling problem with both time-varying workload 1 0.8 MINLP−DVFS NLP−DVFS GP−SVFS 0.6 0.4 0.2 0 0.5 1 1.5 Minimum Taskset Density 2 Normalised Energy Consumption Normalised Energy Consumption 7 1 0.8 MINLP−DVFS NLP−DVFS GP−SVFS 0.6 0.4 0.2 0 0.5 (a) Xscale 1 1.5 Minimum Taskset Density 2 (b) PowerPC 405LP 1 LP−DVFS GP−Discrete 0.8 0.6 0.4 0.2 0 0.5 1 1.5 Minimum Taskset Density 2 Normalised Energy Consumption Normalised Energy Consumption Fig. 3. Simulation results for scheduling real-time tasks with constrained deadlines on two homogeneous processors with continuous speed range 1 LP−DVFS GP−Discrete 0.8 0.6 0.4 0.2 0 0.5 (a) Xscale 1 1.5 Minimum Taskset Density 2 (b) PowerPC 405LP Fig. 4. Simulation results for scheduling real-time tasks with constrained deadlines on two homogeneous processors with discrete speed levels (constrained deadline taskset) and constant workload (implicit deadline taskset). In general, compared to the constant speed profile, the time-varying speed profile saving increases as the minimum taskset density increases. It can also be noticed that the percentage saving of the Xscale is nonlinear compared to that of the PowerPC’s. This is because the power consumption model of the Xscale is a cubic, while the PowerPC’s power consumption model is a quadratic. However, it has to be mentioned that the energy saving percentage varies with the taskset, which implies that the number shown on the plots can be varied, but the significant outcomes stay the same. Lastly, the computation times to solve NLP-DVFS, LP-DVFS, GP-SVFS and GP-SDiscrete are extremely fast, i.e. milliseconds using a general-purpose desktop PC with off-the-shelf optimization solvers, while the time to solve MINLP-DVFS can be up to an hour in some cases. 5 C ONCLUSIONS Three mathematical optimization problems were proposed to solve a homogeneous multiprocessor scheduling problem with a periodic real-time taskset. Though our MINLP and NLP formulations are both energy optimal and feasibility optimal, the computation time is high compared with heuristic algorithms. However, our LP formulation is computationally tractable and suitable for a system with discrete speed level set. Moreover, we have shown via simulations that our formulations are able to solve a more general class of scheduling problem than existing work in the literature due to incorporating a scheduling dynamic model in the formulations as well as allowing for a time-varying executing speed profile. The simulation results illustrate the possibility that the time-varying speed profile can save energy up to 70% compared to the constant speed profile. Possible future work could also include developing numerically efficient methods to solve the various mathematical optimization problems defined in this paper. One could also extend the ideas presented here to solve a dynamic scheduling problem with uncertainty in task execution time and to include slack reclamation for further energy reduction. R EFERENCES [1] [2] [3] J. M. Rabaey, A. P. Chandrakasan, and B. Nikolic, Digital integrated circuits : a design perspective, 2nd ed., ser. Prentice Hall electronics and VLSI series. Pearson Education, Jan. 2003. S. K. Baruah, N. K. Cohen, C. G. Plaxton, and D. A. Varvel, “Proportionate progress: A notion of fairness in resource allocation,” in Proceedings of the Twenty-fifth Annual ACM Symposium on Theory of Computing, ser. STOC ’93. New York, NY, USA: ACM, 1993, pp. 345–354. [Online]. Available: http://doi. acm.org/10.1145/167088.167194 H. Cho, B. Ravindran, and E. Jensen, “An optimal real-time scheduling algorithm for multiprocessors,” in Real-Time Systems Symposium, 2006. RTSS ’06. 27th IEEE International, Dec 2006, pp. 101–110. 8 [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] K. Funaoka, S. Kato, and N. Yamasaki, “Energy-efficient optimal real-time scheduling on multiprocessors,” in Object Oriented RealTime Distributed Computing (ISORC), 2008 11th IEEE International Symposium on, May 2008, pp. 23–30. K. Funaoka, A. Takeda, S. Kato, and N. Yamasaki, “Dynamic voltage and frequency scaling for optimal real-time scheduling on multiprocessors,” in Industrial Embedded Systems, 2008. SIES 2008. International Symposium on, June 2008, pp. 27–33. D.-S. Zhang, F.-Y. Chen, H.-H. Li, S.-Y. Jin, and D.-K. Guo, “An energy-efficient scheduling algorithm for sporadic real-time tasks in multiprocessor systems,” in High Performance Computing and Communications (HPCC), 2011 IEEE 13th International Conference on, Sept 2011, pp. 187–194. G. Levin, S. Funk, C. Sadowski, I. Pye, and S. Brandt, “Dpfair: A simple model for understanding optimal multiprocessor scheduling,” in Real-Time Systems (ECRTS), 2010 22nd Euromicro Conference on, July 2010, pp. 3–13. R. McNaughton, “Scheduling with deadlines and loss function,” Machine Science, vol. 6(1), pp. 1–12, October 1959. S. Funk, V. Berten, C. Ho, and J. Goossens, “A global optimal scheduling algorithm for multiprocessor low-power platforms,” in Proceedings of the 20th International Conference on Real-Time and Network Systems, ser. RTNS ’12. New York, NY, USA: ACM, 2012, pp. 71–80. [Online]. Available: http://doi.acm.org/10.1145/ 2392987.2392996 F. Wu, S. Jin, and Y. Wang, “A simple model for the energy-efficient optimal real-time multiprocessor scheduling,” in Computer Science and Automation Engineering (CSAE), 2012 IEEE International Conference on, vol. 3, May 2012, pp. 18–21. P. Regnier, G. Lima, E. Massa, G. Levin, and S. Brandt, “Run: Optimal multiprocessor real-time scheduling via reduction to uniprocessor,” in Real-Time Systems Symposium (RTSS), 2011 IEEE 32nd, Nov 2011, pp. 104–115. G. Nelissen, V. Berten, V. Nelis, J. Goossens, and D. Milojevic, “Uedf: An unfair but optimal multiprocessor scheduling algorithm for sporadic tasks,” in Real-Time Systems (ECRTS), 2012 24th Euromicro Conference on, July 2012, pp. 13–23. E. Lawler, “Recent results in the theory of machine scheduling,” in Mathematical Programming The State of the Art, A. Bachem, B. Korte, and M. Grtschel, Eds. Springer Berlin Heidelberg, 1983, pp. 202–234. [Online]. Available: http://dx.doi.org/10. 1007/978-3-642-68874-4 9 H. Aydin and Q. Yang, “Energy-aware partitioning for multiprocessor real-time systems,” in Parallel and Distributed Processing Symposium, 2003. Proceedings. International, April 2003, pp. 9 pp.–. H. S. Chwa, J. Seo, H. Yoo, J. Lee, and I. Shin, “Energy and feasibility optimal global scheduling framework on big.little platforms,” Department of Computer Science, KAIST and Department of Computer Science and Engineering, Sungkyunkwan University, Republic of Korea, Tech. Rep., 2014. [Online]. Available: https://cs.kaist.ac.kr/upload files/report/ 1407392146.pdf J.-J. Chen and C.-F. Kuo, “Energy-efficient scheduling for realtime systems on dynamic voltage scaling (DVS) platforms,” in Embedded and Real-Time Computing Systems and Applications, 2007. RTCSA 2007. 13th IEEE International Conference on, Aug 2007, pp. 28–38. M. Gerdts, “A variable time transformation method for mixedinteger optimal control problems,” Optimal Control Applications and Methods, vol. 27, no. 3, pp. 169–182, 2006. [Online]. Available: http://dx.doi.org/10.1002/oca.778 R. Xu, C. Xi, R. Melhem, and D. Moss, “Practical pace for embedded systems,” in Proceedings of the 4th ACM International Conference on Embedded Software, ser. EMSOFT ’04. New York, NY, USA: ACM, 2004, pp. 54–63. [Online]. Available: http://doi. acm.org/10.1145/1017753.1017767 [19] G. Zeng, T. Yokoyama, H. Tomiyama, and H. Takada, “Practical energy-aware scheduling for real-time multiprocessor systems,” in Embedded and Real-Time Computing Systems and Applications, 2009. RTCSA ’09. 15th IEEE International Conference on, Aug 2009, pp. 383–392. [20] H.-C. Wang, I. Woungang, C.-W. Yao, A. Anpalagan, and M. S. Obaidat, “Energy-efficient tasks scheduling algorithm for real-time multiprocessor embedded systems,” J. Supercomput., vol. 62, no. 2, pp. 967–988, Nov. 2012. [Online]. Available: http:// dx.doi.org/10.1007/s11227-012-0771-0 [21] I. X. M. Benchmarks, 2005, http://web.archive.org/web/ 20050326232506/developer.intel.com/design/intelxscale/ benchmarks.htm. [22] C. Rusu, R. Xu, R. Melhem, and D. Mosse, “Energy-efficient policies for request-driven soft real-time systems,” in Real-Time Systems, 2004. ECRTS 2004. Proceedings. 16th Euromicro Conference on, June 2004, pp. 175–183. [23] T. Koch, “Rapid mathematical prototyping,” Ph.D. dissertation, Technische Universität Berlin, 2004. [24] T. Achterberg, “SCIP: Solving constraint integer programs,” Mathematical Programming Computation, vol. 1, no. 1, pp. 1–41, July 2009, http://mpc.zib.de/index.php/MPC/article/view/4. A PPENDIX A M EAN A BSOLUTE P ERCENTAGE E RROR (MAPE) MAPE := k 1 X |F (z(i)) − y(i)| × 100, k i=1 |y(i)| (11) |F (z(i))−y(i)| is the magnitude of the relative error in where |y(i)| th the i measurement, z 7→ F (z) is the estimated function, z is the input data, y is the actual data and k is the total number of fitted points. A PPENDIX B C URVE F ITTING The following shows the curve fitting formulation to obtain the active power consumption function of the XScale and PowerPC 405LP with the objective of minimizing the MAPE: minimize 100 × α,β,Ps γ 1X |αsβi + Ps − Pactive (si )|/Pactive (si ) γ i=1 subject to Ps ≥ 0 α≥0 β≥1 (12a) (12b) (12c) where α, β and Ps are parameters to be fitted, γ is the total number of speed levels of a processor. The speed level of a processor si and the active power consumption of a processor Pactive (si ) are measurement data shown in Table 1.
3cs.SY
arXiv:1703.07391v2 [math.AG] 9 May 2017 THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION AXEL STÄBLER Abstract. We show that the associated graded of the test module filtration τ (M, f λ )λ≥0 admits natural Cartier structures. If λ is an F -jumping number, then these Cartier structures are nilpotent on τ (M, f λ−ε )/τ (M, f λ ) if and only if the denominator of λ is divisible by p. We also show that these Cartier structures coincide with certain Cartier structures that are obtained by considering certain D-modules associated to M that were used to construct Bernstein-Sato polynomials. Moreover, we point out that the zeros of the Bernstein-Sato polynomial attached to an F -regular Cartier module correspond to its F -jumping numbers. This generalizes [BS16a, Theorem 5.4]. Finally, we use non-F -pure modules to prove a weaker connection between Bernstein-Sato polynomials of an arbitrary Cartier module (M, κ) and certain jumping numbers attached to M . Introduction To fix ideas let us consider a hypersurface f inside a polynomial ring R = Fp [x1 , . . . , xn ]. In order to study the singularities of f one may consider the test ideal filtration τ (R, f λ )λ≥0 which is a decreasing Q-indexed right-continuous filtration of ideals that is defined in terms of certain p−e -linear maps. One has τ (R, f 0 ) = R and the smallest λ for which τ (R, f λ ) 6= R is called the F -pure threshold, fpt(f ) for short. It has been known for a long time that if f ∈ Q[x1 , . . . , xn ] and one considers the various reductions fp of f to positive prime characteristic, p→∞ then fpt(fp ) −−−→ lct(f ) and fpt(fp ) ≤ lct(f ) for almost all p ([HY03, Theorem 6.8]). Here lct(f ) is the so-called log-canonical threshold which is a similar characteristic zero invariant that is defined using an embedded resolution of singularities. It is moreover conjectured that fpt(fp ) = lct(f ) for infinitely many p ([MTW04, Conjecture 3.6]). It has been observed for quasi-homogeneous hypersurfaces that if the log canonical threshold does not coincide with the F -pure threshold, then the denominator of the F -pure threshold is a pth power (see [HNnBWZ16, Theorem 3.5] or [Mül16, Lemma 3.7 (2)]). On the other hand, there are only two known (families of) examples where the F -pure threshold does not coincide with the log canonical threshold but the denominator of the F -pure threshold is not divisible by p (see [MTW04, Example 4.5] and [CHSW16, Proposition 2.7, Corollary 2.10]). From the point of view of birational geometry F -jumping numbers with a denominator divisible by p are special in the sense that the correspondence between certain Cartier linear maps and certain Q-divisors breaks down in this case (e.g. Date: January 25, 2018. 2010 Mathematics Subject Classification. Primary 13A35; Secondary 14F10, 14B05. 1 2 AXEL STÄBLER [Sch09]). This correspondence is central to many applications of test ideals in birational geometry. The purpose of this note is to further illustrate that F -pure thresholds whose denominators are divisible by p are special in the following sense. We call a finitely generated R-module M endowed with a p−1 -linear map, i.e. an R-linear map κ : F∗ M → M a Cartier module. One can associate to M and f ∈ R a test module filtration τ (M, f λ )λ≥0 that has similar properties as in L the case M = R. In particular, we can form the associated graded Grλ M = λ>0 τ (M, f λ−ε )/τ (M, f λ ). In Section 2 we will attach a natural Cartier module structure to these summands and show that such a Cartier module is nilpotent if and only if the denominator of λ is divisible by p. Here nilpotent means that some power of the structural map κ acts as zero on the module. This notion of nilpotence is interesting for the following reason. Nilpotent Cartier modules form a Serre subcategory so that we may consider the attached localized category of Cartier crystals. This category is then equivalent ([BB11]) to the category of unit R[F ]-modules of Emerton and Kisin ([EK04]) and anti-equivalent to the category of perverse constructible Fp -sheaves on the étale site associated to Spec R. The first main result that we obtain is Theorem (Theorem 2.3). Let R be essentially of finite type over an F -finite field, (M, κ) be a Cartier module, f ∈ R and λ an F -jumping number of the test module filtration of M along f . The Cartier structure on Grλ M defined by κe f ae (λ) is not nilpotent if and only if ae (λ) = λ(pe − 1) and this quantity is an integer. In particular, if the denominator of λ is divisible by p, then all these Cartier structures are nilpotent. Finally, we also show, extending and vastly simplifying some results of [BS16a, Section 4], that test modules admit a simple description, akin to the case of an ideal in a polynomial ring, in many cases. A special case is the following Theorem (cf. Theorem 2.6). Let R be essentially of finite type over an F -finite field, (M, κ) an F -regular Cartier module and f ∈ R an M -regular element, then e one has τ (M, f λ ) = κe f dλp e M for all e  0. There is evidence that F -pure thresholds with denominator divisible by p are related to certain arithmetic phenomena like non-ordinarity via the anti-equivalence defines a smooth quasi-homogeneous mentioned above. If X = V (f ) ⊆ Pn+1 k Calabi-Yau hypersurface then the F -pure threshold of f in k[x0 , . . . , xn+1 ] is 1 − hp , where 0 ≤ h ≤ n is the order of vanishing of the Hasse-invariant associated to a certain deformation space of X (see [Mül16] for details). In particular, h 6= 0 if and only if X is not ordinary. As a special case if dim X = 1, then non-ordinariness 1 1 (X) = 0, where the index 0 indicates the coincides with the case Hcrys (X)0 = Hét slope zero part of crystalline cohomology. In this case, the crystalline cohomology is concentrated at slope 21 . Moreover, we will also relate these Cartier structures on Grλ M to certain Cartier structures obtained from eigenspaces of higher Euler operators that play a crucial role when constructing Bernstein-Sato polynomials in positive characteristic (see [BS16a]). Similar results were observed by Bitoun ([Bit15]) for the case that M = R in the (equivalent) framework of unit R[F ]-modules. His proof relies on formal properties of p-adic expansions. We will show that it is in fact also a formal THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 3 consequence of the machinery of test modules via Theorem 2.3. Our main result in this direction is Theorem 3.8. Since its formulation requires several D-module theoretic we only state a partial result in the introduction and refer the reader to Section 3 for a detailed exposition. e Let DR[t] be the ring of differential operators of order ≤ pe −1. We denote by θi ∈ [i] e DR[t] so-called higher Euler operator ti ∂t . To the data (M, κ, f, λ) one associates e DR[t] -modules (for varying e). In order to construct Bernstein-Sato polynomials one looks at certain eigenspaces of the higher Euler operators associated to these e DR[t] -modules. Theorem (cf. Theorem 3.8). Let R be regular and essentially of finite type over an F -finite field, (M, κ) an F -regular Cartier module and f an M -regular element. Then for e  0 there is an isomorphism F e ! Grλ M → Ei , where Ei is a certain e eigenspace associated to a certain DR [θ1 , . . . , θpe−1 ]-module. This isomorphism ine! λ duces a transition map F Gr M → F e ! Grλ M . This transition map is induced by a non-nilpotent morphism C : Grλ M → F s ! Grλ M if and only if λ(ps − 1) ∈ Z and s e, a are multiples of s. Moreover, in this case C is the adjoint of κs f λ(p −1) . We will obtain a partial generalization of the correspondence between F -jumping numbers and zero of Bernstein-Sato polynomials for the case that (M, κ) is F regular to arbitrary Cartier modules. The precise statement we prove is Theorem (cf. Theorem 5.3). Let R be an F -finite regular ring and (M, κ) a Cartier module. Fix a rational number λ. If for some e  0 such that λ(pe − 1) ∈ Z one has that λ− pλe is a zero of the Bernstein-Sato polynomial beM,f (s), then Grσλ M 6= 0. Here Grσ M is the filtration of M by so-called non-F -pure modules. We will study their basic properties in Section 4 and also explain how they are a generalization of non-F -pure ideals studied in [FST11]. We will also see that some of the pathologies that non-F -pure ideals exhibit in comparison to characeristic zero are constrained to the cases where the “jumps” have a denominator divisible by p. We start with a short review of test modules in Section 1. In Section 2 we discuss (non)-nilpotence of Cartier structures defined on the associated graded of the test module filtration. Then after recalling the necessary setup we relate these Cartier structures to the construction one uses to obtain Bernstein-Sato polynomials in Section 3. In Section 4 we introduce the notion of non-F -pure module and study its basic properties. In the last section we use these to prove Theorem 5.3. Acknowledgements. I thank Kevin Tucker and Mircea Mustaţă for a useful discussion. Part of this paper was conceived while the author was visiting the University of Utah. I thank Karl Schwede for inviting me and for inspiring discussions. The author is supported by grant STA 1478/1-1 of the Deutsche Forschungsgemeinschaft (DFG). 1. A brief review of test modules In this section we review very briefly the necessary facts on test modules that we need. We refer the reader to [BS16b] for a detailed treatment. Fix an F -finite ring R. A Cartier module is a pair (M, κ), where M is an Rmodule and κ : F∗e M → M is an R-linear map. In many cases we assume e = 1. It is however crucial to allow e ≥ 1 in order to obtain meaningful Cartier structures on 4 AXEL STÄBLER certain quotients. If we assume that Spec R is embeddable into a smooth scheme, then for given e there is a contravariant functor to the category constructible Fpe sheaves on the étale site. If we localize at nilpotent Cartier modules (to be defined below), call the resulting category Cartier crystals, then this functor induces an anti-equivalence between Cartier crystals and perverse constructible Fpe -sheaves on the étale site (see [Sch16] and references therein). Given a Cartier module (M, κ) and f ∈ R and λ a non-negative rational number e e we can form R-linear maps κe f dλp e : F∗e M → M given by m 7→ κe (f dλp e m) for varying e ≥ 1. The collection of these maps with addition induced Lby the one in M and multiplication by composition form an N-graded subring C of e≥0 Hom(F∗e M, M ), where we set C0 = R. It has both a left and a right R-module structure that are e related via rϕ = ϕrp for any homogeneous element ϕ of degree e. This ring is a special case of a so-called Cartier algebra. 1.1. algebra is an N-graded ring L Definition. Let R be an F -finite ring. A Cartier pe C with C = R satisfying the relation rϕ = ϕr for any ϕ ∈ Ce and r ∈ R. e 0 e≥0 L h As usual C+ = e≥1 Ce . We will write C+ for (C+ )h . e 1.2. Remark. We will mostly use Cartier algebras of the form κe f dλp e in this article. The reader familiar with test ideals may notice that people also often use e algebras of the form κe f dλ(p −1)e . If one computes test modules then both notions yield the same result (cf. [Stä16, Lemma 3.1]). However, the categories of crystals are not the same and this will play an important role later on (cf. Section 4). A C-module means a left module over C. We will moreover always assume that it a is finitely generated as an R-module. We call a C-module M nilpotent if C+ M =0 for some (equivalently all) a  0. A morphism ϕ : M → N of C-modules is a nil-isomorphism if its kernel and cokernel are nilpotent. 2 M ⊇ . . . stabilizes (see If M is a C-module then the descending chain C+ M ⊇ C+ [Bli13, Proposition 2.13]) and we denote its stable member by M . 1.3. Definition. The test module τ (M, f λ ) is the smallest C-submodule N of M such that the inclusion Hη0 (N )η ⊆ Hη0 (M )η is a nil-isomorphism for every associated prime η of the R-module M . At this point we encourage the reader to take a look at [BS16b, Sections 1 and 2] for further discussion. It is proven in [BS16b, Theorems 3.4 and 3.6] that test modules exist if R is essentially of finite type over an F -finite field. Moreover, in this case the test module filtration τ (M, f λ )λ≥0 is a decreasing right-continuous discrete filtration. Many other formal properties like Briançon-Skoda also hold in this more general situation (see [BS16b, Section 4]). We call a number λ such that τ (M, f λ ) 6= τ (M, f λ−ε ) for all ε ≤ λ an F -jumping number. Finally, we say that a prime η ∈ Spec R of a C-module M is an associated prime of M if Hη0 (M )η is not nilpotent. These form a subset of the associated primes of the underlying R-module. We call a Cartier module (M, κ) F -regular if τ (M, f 0 ) = M . The smallest λ > 0 such that τ (M, f λ ) 6= τ (M, f 0 ) is called the F -pure threshold of f with respect to e M . More generally, if we have a C-module N , where Ce = κe f dλp e , then we say that N is F -regular if τ (N, f λ ) = N . If N is a C-module and η1 , . . . , ηn its associated primes then we call c1 , . . . , cn a sequence of test elements if ci ∈ / ηi and the Hη0i (Nci ) are F -regular. If all associated THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 5 primes of M are minimal then we only need a single test element and this condition simplifies: If N is a C-module whose associated primes are minimal, then we call c ∈ R a test element if c is not contained in any minimal prime of N and Nc is F -regular. With this notion one has 1.4. Theorem. Let R be essentially of finite type over an F -finite field, (M, κ) a Cartier module and f ∈ R. Then there exists a sequence of test elements c1 , . . . , cn e for the C-module M , where Ce = κe f dλp e , and one has τ (M, f λ ) = n XX Ce cai i Hη0i (M ) e≥e0 i=1 for any e0 ≥ 0 and any ai ≥ 1. Moreover, if M only has minimal associated primes, then this simplifies to X τ (M, f λ ) = Ce ca M . e≥e0 Proof. See [BS16b, Theorem 3.4, Theorem 3.6] for the general case and [Bli13, Theorem 3.11] for the special case  It is mostly this presentation that we will be used in this article. Also note that we will prove shortly that, if (M, κ) is F -regular, then one has in fact τ (M, f λ ) = e κe f dλp e M (Theorem 2.6 below). 2. Nilpotence of the associated graded Throughout this section R is a ring essentially of finite type over an F -finite field. This assumption is imposed to ensure existence of test modules (see [BS16b, Theorem 3.6]; in our setup this automatically implies existence of a sequence of test elements – cf. [BS16b, Remark 3.7]) and discreteness of the filtration. Granting these notions our arguments work for arbitrary F -finite rings. Fix a Cartier module (M, κ) and f ∈ R. In [Stä16, Proposition 4.5] the author defined a Cartier structure on the associated graded of the test module filtration. Namely, if Grλ (M ) = τ (M, f λ−ε )/τ (M, f λ ), then κf dλ(p−1)e operates on this quoe tient. In fact, more generally κe f dλ(p −1)e operates on Grλ (M ) and one easily checks if Grλ M is nilpotent with respect to this Cartier structure, then also with respect to the one above. While this definition may seem ad hoc we point out that if i : Spec R/(f ) → Spec R denotes the natural inclusion and f is a non-zero-divisor on R then for any Cartier module (M, κ) on Spec R the induced Cartier structure on R1 i! M is given by κf p−1 (cf. [BB13, Example 3.3.12]). By Briançon-Skoda one easily sees that the support of Grλ (M ) is contained in Spec R/(f ). We will in fact see shortly that these Cartier structures are very natural. The next lemma was already proven in [Stä16, Proposition 3.2] for the case that M has only minimal primes. We give a simplified proof here. 2.1. Lemma. Let (M, κ) be a Cartier module and f ∈ R. Then for all λ ≥ 0 we λ have κ(τ (M, f λ )) = τ (M, f p ). 6 AXEL STÄBLER Proof. By virtue of [BS16b, Theorem 3.4] we have τ (M, f λ ) = n X X e κe f dλp e ci Hη0i (M ) i=1 e≥e0 for any e0 ≥ 0, where the ηi are the associated primes of M and the ci form a sequence of test elements in the sense of [BS16b, Definition 3.1]. We thus have κ(τ (M, f λ )) = n X X λ e+1 λ e κe+1 f d p p e ci Hη0i (M ) i=1 e≥e0 = n X X λ κe f d p p e ci Hη0i (M ) = τ (M, f p ). i=1 e≥e0 +1  2.2. Lemma. Let (M, κ) be a Cartier module and f ∈ R. For any integer ae (λ) the map given by κe f ae (λ) induces a Cartier structure on Grλ M if and only if ae (λ) ≥ dλ(pe − 1)e. Proof. Using Lemma 2.1 and Briançon-Skoda ([BS16b, Proposition 4.1]) one has κe f ae (λ) τ (M, f λ ) = τ (M, f λ−ae (λ) pe ). For this to induce a Cartier structure on the quotient we must have λ−apee (λ) ≥ λ. Equivalently, ae (λ) ≥ λ(pe − 1) and since ae (λ) is an integer this is equivalent to ae (λ) ≥ dλ(pe − 1)e. One similarly checks that in this case κe f ae (λ) τ (M, f λ−ε ) ⊆ τ (M, f λ−ε ) using that the test module filtration is decreasing.  The first main result of this section is 2.3. Theorem. Let (M, κ) be a Cartier module, f ∈ R and λ an F -jumping number of the test module filtration of M along f . The Cartier structure on Grλ M defined by κe f ae (λ) is not nilpotent if and only if ae (λ) = λ(pe − 1) and this quantity is an integer. In particular, if the denominator of λ is divisible by p, then all these Cartier structures are nilpotent. Proof. We may write dλ(pe − 1)e = λ(pe − 1) + δ with 0 ≤ δ < 1 and δ = 0 if and only if λ(pe − 1) is an integer. By Briançon-Skoda ([BS16b, Proposition 4.1]) we have κe f λ(p e −1)+δ τ (M, f λ−ε ) = κe τ (M, f λ−ε+λ(p e −1)+δ ) = κe τ (M, f λp e +δ−ε ). Now we use Lemma 2.1 and obtain κe τ (M, f λp e +δ−ε ) = τ (M, f λ+ δ−ε pe ). 0 Note in fact, that we may take any ε such that ε > ε0 > 0 and still have 0 τ (M, f λ−ε ) = τ (M, f λ−ε ). Hence, if δ > 0 this actually forces ε < δ. But then δ−ε τ (M, f λ+ pe ) ⊆ τ (M, f λ ) which shows that the Cartier structure is nilpotent. The same argument also shows nilpotence for any ea (λ) > dλ(pe − 1)e.  2.4. Remark. Note that with the notation of the proof of Theorem 2.3 if µ < λ is the previous F -jumping number then necessarily λ − µ ≤ δ. In particular, if λ is the F -pure threshold, then it actually follows that if δ 6= 0 then δ ≥ λ since we can take any 0 < ε < λ without changing τ (M, f λ−ε ). Still assuming that λ is the THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 7 F -pure threshold and writing δ = dλ(pe −1)e−λ(pe −1) ≥ λ we obtain equivalently that dλ(pe − 1)e ≥ λpe . From this one easily deduces that λ ∈ / ( pae , pea−1 ) for any e integer 0 ≤ a ≤ p − 1. This is the analogue of [BMS09, Proposition 4.3 (ii)] (which is proved using similar techniques) for modules. Also note that the result of [BMS09] requires R to be regular and F -finite while the above argument works for any F -finite ring. 2.5. Example. Consider the cusp f = x2 + y 3 ∈ Fp [x, y] = R. If λ denotes the F pure threshold then τ (R, f λ ) = (x, y) and for p > 3 one has (see [Mus09, Example 3.4]) ( 5 p ≡ 1 mod 3, λ = 65 1 − p ≡ 2 mod 3. 6 6p Moreover, λ = 12 for p = 2 and λ = 23 if p = 3. So if p ≡ 1 mod 3 we can take e = 1 and obtain 56 (p − 1) ∈ Z. Since the quotient Grλ is just Fp and we know that the obtained Cartier structure is not nilpotent it has to be κ = id. Of course, for any p one has Grλ = Fp (as an R-module quotient) so that it admits the non-nilpotent Cartier structure κ = id. We end this section by proving a simple description of τ (M, f λ ) in the case where (M, κ) is F -regular. This is very useful for computations. We will use it in the next section to extend the relation of F -jumping numbers and zeros of Bernstein-Sato polynomials ([BS16a]) to F -regular Cartier modules. 2.6. Theorem. Let (M, κ) be a Cartier module and f an M -regular element. If e (M, κ) is F -regular, then τ (M, f λ ) = κe f dλp e M for all e  0. Proof. By F -regularity we have M = τ (M, f 0 ). Hence, by Briançon-Skoda ([BS16b, Proposition 4.1]) and Lemma 2.1 we get e e e e κe f dλp e M = κe f dλp e τ (M, f 0 ) = κe τ (M, f dλp e ) = τ (M, f dλp e e λ ≤ dλp pe e dλp e Since τ (M, f ep−e ). e ≤ λ+ we conclude by right-continuity that τ (M, f dλp ) for all e sufficiently large. 1 pe ep−e )=  2.7. Corollary. Let (M, κ) be a Cartier module and f an M -regular element. Then e τ (M, f λ ) = τ (τ (M, f 0 ), f λ ). In particular, we have τ (M, f λ ) = κe f dλp e τ (M, f 0 ). Proof. Clearly, τ (M, f 0 ) ⊆ M so that τ (τ (M, f 0 ), f λ ) ⊆ τ (M, f λ ) by [BS16b, Proposition 1.15]. For the other inclusion, by definition τ (M, f 0 ) is the smallest submodule of M for which the inclusions Hη0 (τ (M, f 0 ))η ⊆ Hη0 (M )η are nil-isomorphisms with respect to κ for all associated primes η of M . Being a nil-isomorphism here just means that some of κ annihilates the cokernel. But then a fortiori some power of L power dλpe e C+ = acts as zero on this cokernel. By definition of τ (M, f λ ) this e≥1 κf λ shows τ (M, f ) ⊆ τ (M, f 0 ). Now we may apply τ (−, f λ ) to this inclusion to obtain τ (M, f λ ) ⊆ τ (τ (M, f 0 ), f λ ), where we again use [BS16b, Proposition 1.15] and the fact that τ (for a fixed Cartier algebra) is idempotent. The final claim is an immediate application of Theorem 2.6.  2.8. Remark. The assumption on the F -regularity cannot be omitted, that is, if e M is not F -regular, then τ (M, f λ ) 6= κe f dλp e M in general. Consider for example 8 AXEL STÄBLER R = Fp [x, y] and the Cartier module M = Fp [x, y] · y −1 ⊆ j∗ Fp [x, y, y −1 ], where j : D(y) → Spec R, with Cartier structure induced by localization. Then M is not F -regular since Fp [x, y] is a proper submodule that generically agrees with M . It is easy to see that M is F -pure. Moreover, y is a test element e for (M, κ) and therefore τ (M, xλ ) = xbλc R while κe xdλp e M is not even contained in R since y −1 is a fixed point for the Cartier operation. Similarly, if M is not F -pure and has only minimal associated primes then e τ (M, f λ ) 6= κe f dλp e κa cM in general. For example, consider the Cartier module M = k[x] · x−n ⊆ k[x] with n ≥ 2 and take λ = 0 and f = x. Clearly, c = x is a test element and M = κa k[x] · x−n = k[x] · x−1 . We see that τ (M, x0 ) = k[x] by the theorem. However, κa xM = k[x] · x−1 for all a  0 so that (since λ = 0) κe x0 k[x] · x−1 = k[x] · x−1 . 3. Cartier structures on the associated graded induced by differential operators Throughout this section we assume that R is a regular ring essentially of finite type over an F -finite field. Regularity of R is critical since we need that F∗e R is a flat R-module to ensure that F e ! is exact. The goal of this section is to show that the Cartier structures defined on the associated graded of τ (M, f λ ) at the beginning of Section 2 correspond to the Cartier e [θ1 , θp , . . . , θp−1 ]-modules structures obtained on quotients of eigenspaces of certain DR λ associated to (M, f ) for varying e. In particular, we will recover and generalize results of Bitoun ([Bit15]). We start by recalling the necessary D-module theoretic notions (see [Mus09] and [BS16a] for more elaborate discussions). For any ring R containing Fp the ring of Fp linear differential operators DR ⊆ EndFp (R) in the sense ofSGrothendieck ([GD67, e e ∼ Definition 16.8.1]) admits the so-called p-filtration DR = e≥0 DR , where DR = e e EndR (F∗ R) with colime≥0 DR = DR (see [Cha74]). In particular, we see that for e on F e ! M = HomR (F∗e R, M ). any R-module M there is a natural right action of DR 3.1. Convention. Unless otherwise specified modules over rings of differential operators will always be right modules. 3.2. Example. If R = k[t1 , . . . , tn ] is a polynomial ring over a perfect field k, then [1] [pe −1] [j] e DR = k[∂ti , . . . , ∂ti | i = 1, . . . , n], where the ∂ti are divided power operators that act as follows   ai a1 ai−1 ai −j ai+1 [j] ∂ti • (ta1 1 · · · tann ) = t · · · ti−1 ti ti+1 · · · tann . j 1 [a ] [a ] Moreover, one has [∂ti i , ∂tj j ] = 0 for i 6= j. As an aside we also mention that since k is perfect DR coincides with k-linear differential operators. Assume from now on that R is a regular essentially of finite type over an F -finite field and f ∈ R. We consider the graph embedding γ : Spec R → Spec R[t], t 7→ f . Given a Cartier module M on R we obtain a Cartier structure on γ∗ M via the natural isomorphism γ∗ F∗ ∼ = F∗ γ∗ which we will from now on suppress from [a] e notation. Note that DR[t] contains the differential operator θa = ta ∂t for any e e a < pe . In fact, DR[t] = DR [t, ∂ta | a < pe ]. We call the θa the (higher divided power) Euler operators. THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 9 3.3. Lemma. Let (M, κ) be a Cartier module on R and γ : Spec R → Spec R[t], t 7→ f the graph embedding. Then the adjoint of the Cartier structure F e ! γ∗ M → ! F e+a γ∗ M is given by HomR[t] (F∗e R[t], γ∗ M ) −→ HomR[t] (F∗a+e R[t], γ∗ M ) ϕ 7−→ κa ◦ F∗e ϕ. Proof. First of all, note that duality of finite morphisms yields a map γ∗ M −→ F a ! γ∗ M, m 7−→ [s 7→ κe (γ # (s)m)], where γ # denotes the induced map R[t] → R, t 7→ f , corresponding to F∗a γ∗ M → γ∗ M . Applying F e ! (which is just a hom-functor) we get a map F e γ∗ M −→ F e ! F a ! γ∗ M, ϕ 7−→ [r 7→ [s 7→ κa (γ # (r)(ϕ(s)))]]. ! Now by tensor-hom adjunction we have F e ! F a ! ∼ = F e+a which sends a map as a # above to the map [s 7→ κ (ϕ(γ (s)))].  e Fix a Cartier module M . Recall that F e ! γ∗ M admits a DR[t] -module structure e and hence in particular a DR [θ1 , θp , . . . , θpe−1 ]-module structure. As such it admits L a decomposition into generalized eigenspaces F e ! γ∗ M = i∈Fep Ei , where θpj acts on Ei by multiplication with ij (see [BS16a, Lemma 3.1] for details). As follows from Lucas’ Theorem (see [Luc78, §XXI]) the projection F e ! γ∗ M → Ei is induced by π : F∗e R[t] → F∗e R[t], Rtm 7→ 0 unless m = i1 + i2 p + . . . + ie pe−1 in which case rtm 7→ rtm . Moreover, this eigenspace decomposition is preserved by morphisms. If we cone−1 e [θ1 , θp , . . . , θpe−2 ]-module, then these sider a DR [θ1 , θp , . . . , θpe−1 ]-module as a DR eigenspace decompositions are compatible with each other in L the sense that if L M = i∈Fpe−1 Ei is an eigenspace decomposition, then the Ei = j∈Fp Ei1 ,...,ie−1 ,j e−1 are the eigenspaces as DR [θ1 , θp , . . . , θpe−2 ]-module. Note that one has a natural map γ∗ F e ! M → F e ! γ∗ M, ϕ 7→ ϕ(γ # ). By abuse of notation we will write γ∗ C e (M ) for the image of C e (M ) = {[r 7→ κe (rm)] | m ∈ M } under this natural map. A key technical result ([BS16a, Corollary 5.3]) yields that for all e  0 the (i1 , . . . , ie )-eigenspace of the quotient e e Ne := (γ∗ C e (M ))DR [θ1 , θp , . . . , θpe−1 ]/(γ∗ C e (f M ))DR [θ1 , θp , . . . , θpe−1 ] e is ismorphic as a DR -module to Pe := C e (f i1 +i2 p+...+ie p e−1 e M ) · DR /C e (f 1+i1 +i2 p+...+ie p e−1 e M ) · DR . This isomorphism is given as follows. Given ϕ ∈ Ne that is contained in the (i1 , . . . , ie )-eigenspace one has ϕ(rtm ) = 0 for all m < pe if m 6= i1 +i2 p+. . .+ie pe−1 . e−1 The image of ϕ under this isomorphism is the map r 7→ ϕ(rf i1 +i2 p+...+ie p ). With this notation and under the additional assumption that M is F -regular it follows that Pe and hence the (i1 , . . . , ie )-eigenspace of Ne above is naturally e isomorphic as a DR -module to F e ! Gri M := F e ! (τ (M, f (i1 +i2 p+...+ie p e−1 )/pe )/τ (M, f (1+i1 +i2 p+...+ie p e−1 )/pe )) 10 AXEL STÄBLER for all e  0. For the case that M has only minimal associated primes, see [BS16a, Corollary 4.8] and note that F e ! is exact since R is regular. In the general F -regular case, we can use Theorem 2.6 above instead. In fact, for n ∈ N we have C e (f n M ) = {[r 7→ κe (rf n m)] | m ∈ M } ⊆ Hom(F∗e R, M ) while F e ! τ (M ) ⊆ F e ! M = Hom(F∗e R, M ) and the natural inclusion C e (f m M ) → F e ! M induces the isomorphism. We stress that [BS16a, Corollary 4.8] is the only test module theoretic input of [BS16a]. Thus, by virtue of Theorem 2.6 the result [BS16a, Theorem 5.4] immediately generalizes to the more general framework of F -regular Cartier modules in the sense of [BS16b]. In fact, Theorem 2.6 is more precise, since it guarantees an m equality κe f m M = τ (M, f pe ) for any m ∈ Z and e ≥ 1, thereby removing an inaccuracy in the proof of [BS16a, Theorem 5.4] – the application of [BS16a, Corollary 4.8] is not correct since one may have to enlarge the numerator. We will prove a partial generalization of this result to arbitrary Cartier modules in the last section. With these preliminaries we can prove the 3.4. Proposition. Let M be a Cartier module on R and f ∈ R a non-zero! divisor on M . Then the transition map γ∗ F e ! M → F e+a γ∗ M induces a map Ne → Ne+a . Furthermore, if Ei is the (i1 , . . . , ie )-eigenspace of Ne and Ei,j the (i1 , . . . , ie , je+1 , . . . , je+a )- eigenspace of Ne+a then we get an induced map α : Ei i / Ne+a / Ne / Ei,j , π where π is the projection onto the eigenspace and i is the natural inclusion. If, in addition, M is F -regular, then via the isomorphisms Ei → F e ! Gri M , ! Ei,j → F e+a Gri,j M and adjunction we get an induced Cartier structure F∗a F e ! Gri M → e+a−1 F e ! Gri M which is given by ϕ 7→ κa f je+1 +je+2 p+...+je+a p ◦ ϕ. Proof. Recall that the isomorphism Ei → F e ! Gri is given by ϕ 7−→ [r 7→ ϕ(rf i1 +i2 p+...ie p Similarly, the image of α(ϕ) in F e+a ! e−1 )]. Gri,j M is given by r 7−→ πκa ϕ(rf i1 +i2 p+...ie p e−1 r). We claim that this map coincides with the map ψj : r 7−→ κa ϕ(rf i1 +i2 p+...ie p l e−1 +je+1 pe +...je+a pe+a−1 ). e+a Note that {rt | r ∈ R with 0 ≤ l ≤ p − 1} is a set of generators for F∗e+a R[t]. Since Ne+a is the direct sum of its eigenspaces the claim comes down to verifying that the equality X ψj = κa ϕ j∈Fa p holds in Ne+a , where we lift the ψj to Ne+a by taking the natural section of the projection onto the eigenspace. Hence, ψj evaluated at ti1 +i2 p+...+ie p e−1 coincides with κa ϕ(f i1 +i2 p+...+ie p +le+1 pe +...le+a pe+a−1 e−1 +le+1 pe +...le+a pe+a−1 ) THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 11 if j = l and is zero otherwise. In particular, we see that the claimed identity holds. Now since we may view ϕ as a map ϕ : F∗e R → M we have that ψj (r) = κa f je+1 +je+2 p+...je+a p a−1 ϕ(f i1 +i2 p+...+ie p e−1 r)  which shows the claim. 3.5. Remark. We note that taking the projection onto the corresponding eigenspace in Proposition 3.4 is necessary (see [Mus09, Example 6.15]). Next, recall that any λ ∈ [0, 1) admits a unique non-terminating p-adic expansion P λ = i≥1 cip(λ) with 0 ≤ ci (λ) ≤ p − 1. Moreover, one obtains for any e ≥ 1 that i Pe ci (λ) dλpe e−1 . i=1 pi = pe dλpe e Hence, if λ ∈ [0, 1), then we can identify for all e  0 F e ! Gr pe M as a e DR -module with the (c1 (λ), . . . , ce (λ))-eigenspace of Ne . Moreover, since the test module filtration is discrete we may assume, by choosing a larger e if necessary, that dλpe e dλpe e−1 τ (M, f pe ) = τ (M, f λ ) and τ (M, f pe ) = τ (M, f λ−ε ). In other words Gr dλpe e pe M = Grλ M . 3.6. Lemma. For e  0 the morphism F e ! Grλ M ∼ = / Ei α ∼ = / Ei,j / F e+a ! Grλ M , where α is the map in Proposition 3.4, is of the form F e ! C for a morphism C : Grλ M → F a ! Grλ M if λ(ps − 1) is an integer for some s ∈ Z and both e, a are multiples of s. Proof. λ(ps − 1) is an integer if and only if the denominator of λ is not divisible by p. This is equivalent to the fact that the p-adic expansion of λ is strictly periodic Ps (see with period length dividing s. In this case, one has λ(ps − 1) = ps i=1 cip(λ) i 0 0 e.g. [HNnBWZ16, Lemma 2.6]). Write e = e s and a = a s Then by Proposition ! 3.4 and the previous observation the Cartier structure F e ! Grλ M → F e+a Grλ M is given by the adjoint of κa f dλ(p a −1)e = (κs f dλ(p s −1)e a0 ) and we may set C = [m 7−→ [r 7→ (κs f dλ(p s −1)e e0 ) (rm)]].  e! 3.7. Remark. Note that the Cartier structure on F Grλ M is only giving us information on Grλ M if we have a map C as in Lemma 3.6. Quite generally, in this case, C is a nil-isomorphism (see e.g. [Stä17, Lemma 2.2]) so that as crystals Grλ M and F e ! Grλ M coincide. Otherwise F e ! Grλ M does, at least a priori, not encode more information than any other faithful functor. We come to the main result of this section: 3.8. Theorem. Let R be an F -finite regular ring, (M, κ) an F -regular Cartier module and f an M -regular element. Assume that λ ∈ Q is an F -jumping number of the test module filtration of M along f . Then for e  0 we consider the map ! C : F e ! Grλ M → F e+a Grλ M obtained by the isomorphism of Lemma 3.6. 12 AXEL STÄBLER If λ(ps − 1) ∈ Z, then C is induced by a morphism Grλ → F s ! Grλ M if and only s if s | e and s | a. In this case, the morphism is given by the adjoint of κs f λ(p −1) and is not nilpotent. If λ(ps − 1) ∈ / Z, then there is a morphism Grλ M → F s ! Grλ M inducing C if and only if s | e, s = a and dλ(ps − 1)e is of the form c1 ps−1 + c2 ps−2 + . . . + cs , where cp1 + pc22 + . . . + pcss is the truncated p-adic expansion of λ. In this case, the a morphism is nilpotent and given by the adjoint of κa f dλ(p −1)e . Proof. If κ : F∗e M → M is a Cartier structure then its adjoint is given by C : M → F e ! M, m 7−→ [r 7→ κ(rm)]. In what follows we will not distinguish between C and κ. The Cartier structure C is of the form κa f b(a) for some b(a) ∈ N. In particular, the Cartier structure Grλ M → F s ! Grλ M is necessarily also of the form κs f ? . But then, using Lemma 2.2, it is not nilpotent if and only if ? = λ(ps − 1) s with λ(ps − 1) ∈ Z. Clearly, if some power of κs f λ(p −1) induces C then we must have s | e and s | a. The converse is the assertion of Lemma 3.6. For the addendum note that it is clearly P necessary that s | e and s | a. If we write the p-adic expansion of λ as λ = i≥1 ci p−i , then the existence of such a morphism κs f us (λ) : Grλ M → F s ! Grλ M is equivalent to a commutative diagram of the form κe+a f κe f λ Gr M pe −1 us (λ) s p −1 us (λ) pe+a −1 ps −1 / F e ! Grλ M κa f ca +ca−1 p+...+c1 p ( / F e+a ! Grλ M. a−1 By Lemma 2.2 we may write us (λ) = dλ(ps − 1)e + m for some non-negative integer m. Using this, the diagram is commutative if and only if we have the following equality (dλ(ps − 1)e + m) pe − 1 a pe+a − 1 p + ca + ca−1 p + . . . + c1 pa−1 = (dλ(ps − 1)e + m) s . s p −1 p −1 This simplifies to ca + ca−1 p + . . . + c1 pa−1 = (dλ(ps − 1)e + m) pa − 1 . ps − 1 Note that dλ(ps −1)e = c1 ps−1 +c2 ps−2 +. . .+cs +ε, where ε ∈ {0, 1} depending on whether the fractional part is negative or positive. Using this formula and writing a = sã we may further expand the equation to ca + ca−1 p + . . . + c1 pa−1 = c1 pa−1 + c2 pa−2 + . . . + cs pa−s + (m + ε)pa−s + c1 pa−1−s + c2 pa−2−s + . . . + cs pa−2s + (m + ε)pa−2s .. . + c1 ps−1 + c2 ps−2 + . . . + cs + (m + ε) where we have ã rows. The summands in the first row of the right hand side except the last one all occur on the left hand side. Subtracting this from both sides we observe that the left hand side is < pa−s . Hence, if m + ε is positive, then equality cannot hold. Thus, we must have m = ε = 0. THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 13 If m = ε = 0, then the last summand of each row vanishes. If moreover a = s, then equality holds. If s < a, then there must exist 0 ≤ i ≤ s with ci 6= crs+i for some 1 ≤ r < ã . Hence, equality cannot hold.  3.9. Example. The second case of the theorem occurs for instance for any F jumping number of the form p2ap −1 with a < p (and necessarily p > 2). If the denominator of λ is divisible by p then the second case of the theorem can only occur if λ = pan b with p - b and a > b. Indeed, assume that a ≤ b. Denote the coefficients of the p-adic expansion of λ by ci and the coefficients of the expansion of ab by di . Then c1 = . . . = cn = 0 and cn+i = di for i ≥ 1. In particular, the fractional part of λ(ps − 1) is then non-negative since it is of the form X ci X ci − . pi−s pi i≥1 i≥1 s Since λ(p − 1) is not an integer by assumption its fractional part is strictly positive so that the second case of the theorem cannot occur. 3.10. Question. Are there F -pure thresholds which actually satisfy the second case of Theorem 3.8? A possible strategy may be to consider quasi-homogeneous polynomials f ∈ k[x1 , . . . , xn ] whose Jacobian ideal coincides, up to radical, with the irrelevant ideal. For then a likely candidate for the F -pure threshold is the log canonical threshold P deg(xi ) . deg f If fpt(f ) 6= lct(f ) then the denominator of the F -threshold has to be a pth power provided that p ≥ (n − 1) deg f − deg f − n + 1.PSo one would need f with fpt(f ) = n deg xi lct(f ) and f having degree pb (since lct(f ) = i=1 ). deg f Finally, we show that these results continue to hold if we work with the image of the natural map γ∗ M → colime≥0 F e ! γ∗ M instead of γ∗ M → F e ! γ∗ M for varying e. This is the setting of [Mus09] (for M = R). Indeed, note that by [BS16a, Proposition 3.5] one has colime≥0 F e ! M = γ+ colime≥0 F e ! M as right DR[t] -modules. If M = ωR then colime≥0 F e ! ωR ∼ = ωR and the equivalence of right and left DR[t] modules yields γ+ R = R[t]t−f /R[t] which is what is considered in [Mus09]. Before we proceed, we need to recall one more notion from the theory of Cartier crystals. If (M, κ) is a Cartier module then we can consider the union of all nilpotent submodules Mnil . This is again a nilpotent Cartier module and we define M = M/Mnil . Note, in particular, that the natural projection M → M is a nilisomorphism. We note the following 3.11. Lemma. Let i : Spec R/I → Spec R be a closed immersion and (M, κ) a Cartier module. Then i∗ M = i∗ M . 3.12. Theorem. Assume that (M, κ) is an F -regular Cartier module satisfying M = M . Write γ+ M = colime≥0 F e ! γ∗ M and denote the natural maps F e ! γ∗ M → γ+ M by ϕe . Then for any e the quotients e e ϕ0 (γ∗ C e (M ))DR [θ1 , θp , . . . , θpe−1 ]/ϕ0 (γ∗ C e (f M ))DR [θ1 , θp , . . . , θpe−1 ] 14 AXEL STÄBLER and e e [θ1 , θp , . . . , θpe−1 ] γ∗ C e (M )DR [θ1 , θp , . . . , θpe−1 ]/γ∗ C e (f M )DR e are naturally isomorphic as DR [θ1 , θp , . . . , θpe −1 ]-modules. In particular, we obtain e DR -isomorphisms of generalized eigenspaces. e Proof. First of all, note that the natural map ϕe : F e ! γ∗ M → γ+ M is DR[t] -linear. Next, observe that by Lemma 3.11 we have γ∗ M = γ∗ M . It follows that the map γ∗ M → F e ! γ∗ M is injective for all e (cf. [Stä16, Lemma 6.20]). Hence, the natural γ∗ C e ϕe map ϕ0 is also injective. Note that ϕ0 factors as γ∗ M −−−→ F e ! γ∗ M −→ γ+ M for e any e ≥ 1. Since ϕe is DR[t] -linear we have e e ϕe (γ∗ C e (M )DR [θ1 , θp , . . . , θpe−1 ]) = ϕ0 (γ∗ C e (M ))DR [θ1 , θp , . . . , θpe−1 ], and a similar assertion holds for γ∗ C e (f M ). We conclude that the quotients e e ϕ0 (γ∗ C e (M ))DR [θ1 , θp , . . . , θpe−1 ]/ϕ0 (γ∗ C e (f M ))DR [θ1 , θp , . . . , θpe−1 ] and e e γ∗ C e (M )DR [θ1 , θp , . . . , θpe−1 ]/γ∗ C e (f M )DR [θ1 , θp , . . . , θpe−1 ] e [θ1 , θp , . . . , θpe −1 ]-modules since ϕ0 is injective. In are naturally isomorphic as DR e particular, we obtain DR isomorphisms of generalized eigenspaces.  3.13. Proposition. Let (M, κM ), (N, κN ) be Cartier modules and f ∈ R M -regular and N -regular. If ϕ : M → N is a nil-isomorphism then we get an induced nilisomorphism Grλ M → Grλ N with respect to any of the Cartier structures κe? f ae (λ) , where ? = M or N and ae (λ) ≥ dλ(pe − 1)e. Proof. By [Stä17, Theorem 2.8] the restriction of ϕ induces a surjective map τ (ϕ) : τ (M, f λ ) → τ (N, f λ ). By [Stä17, Lemma 2.1, proof of Theorem 2.8] we may assume that both M, N are F -pure. In particular, ϕ is surjective. Now the claim follows from [Stä16, Theorem 5.8].  In particular, given an F -regular Cartier module M we obtain nil-isomorphisms Grλ M → Grλ M . Since for M working on the eth level or in the colimit induces natural isomorphisms of the generalized eigenspaces of the quotients by Theorem 3.12 we see that we obtain the same nilpotence results if we construct the quotients by working with the colimit. 4. Non-F -pure modules In this section we study a generalization of the non-F -pure ideal or φ-fixed ideal to modules. These non-F -pure ideals were first introduced in [FST11] and are further developed and studied in [Sch14] and [HSZ14]. They are the characteristic p analog of the so-called non-lc ideal and have applications to birational geometry. The importance of these for us is that we will prove a connection between zeros of Bernstein-Sato polynomials and certain non-F -pure-modules. These non-F -pure modules will form a decreasing and discrete filtration of the ambient Cartier module. However, there will be no continuity properties even if M is F -regular. The actual connection with Bernstein-Sato polynomials will be discussed in the next section. Here we just develop the basic theory of non-F -pure modules. THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 15 Let us however briefly motivate why it is interesting to consider non-F -pure modules in this context. In the situation of the previous section, the generalized eigenspaces always admit a description of the form ! e e ∼ C e (f m M ) · DR /C e (f m+1 M ) · DR = F e (κe f m M/κe f m+1 M ). A first naive guess (based on [BS16a, Lemma 4.3] which asserts that the statement is true if M is F -regular)L may be that κe f m M (for e  0) should correspond to e e D+ M = M , where D+ = e≥1 κe f dλp e R with m + 1 = dλpe e. L e In practice, we replace the algebra D with the algebra C = e≥0 κe f dλ(p −1)e R. Both algebras, C and D yield the same notion of test module (see [Stä16, Lemma 3.1]). Unless specified otherwise R in this section is an arbitrary F -finite ring. 4.1. Definition. Fix an F -finite ring R. Given a Cartier module (M, κ) and an M e regular element f we denote by C the Cartier algebra generated by the κe f dλ(p −1)e . h M for all h  0. We define the non-F -pure submodule σ(M, f λ ) as C+ h+1 h M ⊇ C+ M ⊇ ... Note that by [Bli13, Proposition 2.13] the descending chain C+ stabilizes for arbitrary Cartier algebras in any F -finite ring. 4.2. Remark. (a) The reason for working with the algebra C rather than D is that Lemma 4.3 does not hold in this context (cf. Example 4.5 below). (b) This is not the definition that is used in [FST11]. We will see in Corollary 4.9 below that these definitions agree. 4.3. Lemma. Let R be an F -finite ring and let (M, κ) be a Cartier module. Given an M -regularL element f and a rational number λ we may consider the Cartier e algebra C+ = e≥0 κe f dλ(p −1)e R acting on M . For all a  0 such that λ(pa −1) ∈ a Z we have σ(M, f λ ) = κa f λ(p −1) M . h Proof. Note that by definition σ(M, f λ ) = M = C+ M for all h  0. We first deal h with the inclusion from right to left. Fix a natural number h such that C+ M = h+1 e C+ M . Take any e such that λ(p − 1) ∈ Z and set a = eh. Then κe f λ(p | e −1) · · · κe f λ(p {z e −1) h times M = κa f λ(p a −1) M } which shows the desired inclusion. Also note that, say, taking e minimal and replacing h with h + 1 shows that e(h + 1) also works. So that the inclusion holds for all a  0 such that λ(pa − 1) ∈ Z. h Given a such that λ(pa − 1) ∈ Z we show that for any h ≥ a one has C+ M ⊆ a λ(pa −1) κ f M . It suffices to show that κe1 f dλ(p e1 −1)e · · · κeh f dλ(p eh −1)e M ⊆ κa f λ(p a −1) M for all e1 , . . . , eh ≥ 1. Write e = e1 + . . . + eh and e = la + r (note that l ≥ 1). Then we have κe1 f dλ(p e1 −1)e · · · κeh f dλ(p eh −1)e M ⊆ κe f dλ(p la λ(pla −1) r λ(pr −1)+δ =κ f κ f where δ = dλ(pe − 1)e − λ(pe − 1). e −1)e M la λ(pla −1) M ⊆κ f M = κa f λ(p a −1) M,  16 AXEL STÄBLER 4.4. Example. In this example we point out that the assumption that λ(pa −1) is an integer in Lemma 4.3 cannot be omitted. Let k be an F -finite field of characteristic 2. Consider the Cartier module M = k[x] x1 with Cartier structure induced from the usual one on k[x] (i.e., xp−1 7→ 1, xi 7→ 0 for 0 ≤ i ≤ p − 2). Explicitly, κ( xg ) = x1 κ(gxp−1 ). M is F -pure but not F -regular (a test element is given by x). We filter M along f = x2 and take λ = 21 . Then for any e ≥ 1 we have κe f dλ(p e −1)e M = κe f 2 e−1 e 1 k[x] = κe x2 −1 k[x] = k[x]. x e 2 2 On the other hand, for any e ≥ 2 we have C+ M ⊆ C+ M . Elements of C+ M in turn are sums of elements of κa f dλ(p a −1)e b dλ(pb −1)e κ f m = κa+b f 2 a+b−1 f2 b−1 m ∈ κa+b x2 a+b −1 2b x k[x] ⊆ (x), e where a, b ≥ 1. We conclude that C+ M ⊆ (x) for e ≥ 2. AsLremarked earlier, Lemma 4.3 does not hold if we use the Cartier algebra e D = e≥1 κe f dλp e R ⊕ R: 4.5. Example. Consider M = k[x] x1 endowed with its usual Cartier structure. Take L a e h f = x then if D = e≥1 κe f dλp e R⊕R and λ = 1 one has C+ M ( κa f dλp e M for all a a, h  0. Indeed, for any a ≥ 1 the right hand side coincides with κa xp −1 k[x] = k[x]. For the left hand side note that by [BS16a, Lemma 4.1] one has D+ M = a κa f dλp e M for all a  0. Hence, for h  0 we have a a h+2 h h a p D+ M = D+ M = D+ κ x κa xp k[x] 1 h a pa h = D+ κ x k[x] = D+ (x). x Since x is a test element for M one observes that τ (M, x1 ) = (x). In particular, h (x) is F -pure with respect to the Cartier algebra D. Hence, D+ (x) = (x). The following example further illustrates that the filtration obtained via D also has all the shortcomings of the one obtained via C. h 4.6. Example. We work in the situation of Example 4.4 but use D+ . Then D+ M 6= a dλpa e a λpa a pa −1 κ f M for all h, a  0. One has κ f M = κ x k[x] = k[x]. If we had an a a equality above then in particular D+ k[x] = D+ κa f λp M = κa f λp M = k[x]. But e λpe e pe for any e ≥ 1 we have κ f k[x] = κ x k[x] = (x). Furthermore, using this filtration there will be no continuity properties. For instance, if (M, κ) is any F -pure non-F -regular Cartier module whose associated h primes are all minimal and f a test element then for λ = 0 one obtains D+ M =M h 0 while for any 0 < λ  1 one obtains D+ M = τ (M, f ) using [BS16a, Lemma 4.1] and Corollary 2.7. So the filtration is not right-continuous. On the other hand, if (M, κ) is F -regular then the filtration coincides with the test module filtration and is thus right-continuous but not left-continuous. 4.7. Proposition. Let R be F -finite and (M, κ) a Cartier module. Fix an M regular element f ∈ R. Then the filtration σ(M, f λ ) is discrete and decreasing. Proof. In orderQto show that the filtrationQis decreasing simply observe that for e e e e any e one has i=1 κei f d(λ+ε)(p −1)e M ⊆ i=1 κei f dλ(p −1)e M . Discreteness now follows by the same argument as in [Bli13, Theorem 4.18]  THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 17 In [FST11] the authors introduce some other candidates for the non-F -pure ideal and ask whether they all coincide. In what follows we write C for the Cartier algebra e generated in degree e by κe f dλ(p −1)e . The following variants are considered: (a) For a fixed n  0 define σn (M, f λ ) = (C≥n )h M for h  0. (b) Suppose that λ(pe − 1) ∈ Z for some sufficientlyL large and sufficiently divisible ea λ(pea −1) e. Write D for the algebra that is given by . Then set a≥0 κ f h σ 0 (M, f λ ) = D+ M for h  0. Once again note that by [Bli13, Proposition 2.13] all these notions are welldefined for any F -finite ring R. We point out that if one studies non-F -pure ideals in the context of non-principal ideals (i.e. if f is replaced by an ideal a ⊆ R), then one works with the integral e closures of the adλ(p −1)e making things more subtle (if R is normal then any principal ideal generated by a non-zero-divisor is integrally closed – see e.g. [BH98, Proposition 10.2.3]). As an application of Lemma 4.3 we show that these notions all coincide in our situation of a principal ideal. First we record an elementary 4.8. Lemma. Let R be F -finite and (M, κ) a Cartier module. Given a rational ea number λ such that λ(pa −1) ∈ Z we have that the κea f λ(p −1) M form a decreasing chain for varying e. Proof. One has κ2a f λ(p 2a −1) M = κa f λ(p a −1) a λ(pa −1) κ f M ⊆ κa f λ(p a −1) M.  4.9. Corollary. Let R be essentially of finite type over an F -finite field. If the denominator of λ is not divisible by p, then one has σ(M, f λ ) = σn (M, f λ ) = σ 0 (M, f λ ) for n  0. In general, one still has σ(M, f λ ) = σn (M, f λ ) for all n  0. Proof. Note that one clearly has containments σ 0 (M, f λ ) ⊆ σn (M, f λ ) ⊆ σ(M, f λ ) whenever these objects are defined. Let us first consider the case λ(pa − 1) ∈ Z for some a. It suffices to show b that σ(M, f λ ) ⊆ σ 0 (M, f λ ). By Lemma 4.3 we have σ(M, f λ ) = κb f λ(p −1) M for h infinitely many b. In particular, if σ 0 (M, f λ ) = D+ M for some fixed h  0 and L ea λpea −1 D+ = a≥1 κ f R then we may arrange for b = eh. Now use Lemma 4.8. Let us now consider the case of an arbitrary λ. Fix h  0 such that (C≥n )h M = h σn (M, f λ ) and C+ M = σ(M, f λ ). An argument just as in the second part of the a proof of Lemma 4.3 shows that for any a ≥ n one has C+ M ⊆ C≥n M . We conclude h ah h that C+ M = C+ M ⊆ C≥n M .  As is well-known to experts one cannot expect any continuity properties for the filtration σ(M, f λ ) (not even in the case M = R). For completeness we give an example: 4.10. Example. Consider the case of Example 4.4 (i.e. M = k[x] x1 , f = x2 ) but e this time for a field k of characteristic 6= 2. We claim that C+ M = M for any λ ≤ 21 1 e but C+ M = (x) for any λ > 2 . Since 2 and p are coprime we can use Lemma 4.3 and obtain e 1 e C+ M = κe xp −1 k[x] = k[x] x 18 AXEL STÄBLER for λ = 21 and hence for all λ ≤ 12 since the filtration is decreasing. If λ > 21 then λ(pe − 1) > 12 (pe − 1). Choosing e in such a way that the left-hand side is an integer we get that λ(pe − 1) ≥ 12 (pe − 1) + 1. Using Lemma 4.3 once more we compute κe f λ(p e −1) M ⊇ κe xp e +1 M = (x). Now assume that char k = 2. We claim that the filtration is not left-continuous at λ = 12 in this case. In Example 4.4 we saw that σ(M, f λ ) ⊆ (x). We will show that for all ε > 0 one has σ(M, f λ−ε ) = R. We may assume that (λ − ε)(pa − 1) ∈ Z for some a  0. Then using Lemma 4.3 we obtain a a a+1 1 σ(M, f λ−ε ) = κa f (λ−ε)(p −1) M = κa x2 −2 ε−1+2ε k[x]. x Since the exponent is non-zero and ≤ 2a − 1 we get σ(M, f λ−ε ) = R. Finally, note that the Cartier module (M, κ) is isomorphic to the Cartier module (k[x], κxp−1 ) via the multiplication by x map k[x] x1 → k[x]. 4.11. Proposition. Assume that R is an F -finite ring and (M, κ) a Cartier module. If the denominator of λ is divisible by p then σ(M, f λ ) = σ(M, f λ+ε ) for all 0 < ε  1. Proof. Since the filtration is decreasing by Proposition 4.7 we only need to show the inclusion from left to right. h+g h h M = C+ ⊆ C≥h . By definition we have σ(M, f λ ) = C+ M⊆ Next note that C+ h h C+ C≥g M for all h  0 and all g. Hence, any element of C+ C≥g M may be written as h Y ei e0 κei f dλ(p −1)e κe0 f dλ(p −1)e m i=1 h M = σ(M, f λ ). If we write dλ(pei − 1)e = with e0 ≥ g. Fix h such that C+ Ph λ(pei − 1) + δi with 0 < δi < 1 for 0 ≤ i ≤ h and e = i=0 ei , then we obtain that h any element of C+ C≥g is of the form Ph Ph ej e j=i+1 λ(p −1)+ δ p i i=0 κe f . Now we set Ph ej j=i+1 δ p i=0 i . ε0 = lim eh →∞ pe − 1 Note that this sequence converges to ε0 from above and that ε0 > 0. Thus by perturbing a little bit we may choose ε > ε0 such that the denominator of λ + ε is not divisible by p and such that Ph Ph ej e e j=i+1 δi p e λ(p −1)+ i=0 κ f m ∈ κe f (λ+ε)(p −1) M = σ(M, f λ+ε ) Ph holds for all eh sufficiently large and divisible (using Lemma 4.3).  It is observed in [FST11, Remark 14.11] that, contrary to the situation in characteristic zero, one does not have σ(R, f λ ) = τ (R, f λ−ε ) if R is (F -)regular. However, we have the 4.12. Proposition. Let R be essentially of finite type over an F -finite field, (M, κ) an F -regular Cartier module and f an M -regular element. If the denominator of λ is not divisible by p, then σ(M, f λ ) = σ(M, f λ−ε ) = τ (M, f λ−ε ). THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 19 e Proof. By our assumption on λ we find e  0 such that σ(M, f λ ) = κe f λ(p −1) M . Moreover, by discreteness we may assume that λ−ε also has denominator not divisible by p and that the same e computes σ(M, f λ−ε ). By F -regularity we have M = τ (M, f 0 ). Using Briançon-Skoda ([BS16b, Proposition 4.1]) and Lemma 2.1 we λ−ε 1 e e then have κe f λ(p −1) M = τ (M, f λ− pe ) and κe f (λ−ε)(p −1) M = τ (M, f λ−ε− pe ) and by discreteness of τ these coincide.  4.13. Question. Is the filtration σ(M, f λ ) left-continuous if the F -jumping numbers of τ (M, f λ ) all have a denominator that is not divisible by p? 4.14. Proposition. Let R be essentially of finite type over an F -finite field, (M, κ) an F -regular Cartier module and f an M -regular element.. Then for all λ ≥ 0 one has σ(M, f λ+ε ) = τ (M, f λ ) for all 0 < ε  1. Proof. Since M is F -regular we have τ (M, f 0 ) = M . As the filtration σ is discrete and decreasing there exists 0 < ε  1 such that σ is constant in (λ, λ + ε). In particular, we may assume that the denominator of λ + ε is not divisible by p. Hence, we can apply Lemma 4.3 and obtain σ(M, f λ+ε ) = κe f (λ+ε)(p e −1) M = τ (M, f λ+ε− λ+ε pe ) = τ (M, f λ ), where we use Briançon-Skoda ([BS16b, Proposition 4.1]) and Lemma 2.1 for the second equality and right-continuity of τ (and the fact that we may choose a larger e) for the last equality.  This correspondence breaks down however in the non F -regular case. 4.15. Example. Take M = k[x, y] x1 with the usual Cartier structure, k any F -finite field of positive characteristic. We filter along f = y. Then τ (M, f 0 ) = k[x, y] and, in particular, τ (M, f 1 ) = (y). For σ we obtain σ(M, f λ ) = k[x, y] x1 for λ ≤ 1 and σ(M, f 1+ε ) = (y) x1 . 5. Bernstein-Sato polynomials attached to Cartier modules and the filtration σ 5.1. Definition. Given an F -finite ring R, a Cartier module (M, κ) and an M regular element f we define Grσλ M = σ(M, f λ )/σ(M, f λ+ε ) for any 0 < ε  1. 5.2. Lemma. Let R be an F -finite ring, (M, κ) a Cartier module and f an M a regular element. Then κa f dλ(p −1)e defines a Cartier structure on Grσλ M . If λ Grσ M 6= 0, then this Cartier structure is non-nilpotent if and only if λ(pa − 1) ∈ Z. a h+1 h h Proof. We have σ(M, f λ ) = C+ M = C+ M ⊇ κa f dλ(p −1)e C+ M . We may assume e λ+ε e (λ+ε)(pe −1) that (λ + ε)(p − 1) ∈ Z for some e  0 and σ(M, f )=κ f M . Write dλ(pa − 1)e = λ(pa − 1) + δ. Then we compute a κa f dλ(p −1)e σ(M, f λ+ε ) = κa+e f λ(p e+a −1)+ε(pe −1)+δpe M. Replacing ε by 2pa ε0 and possibly choosing a larger e so that 0 κe f (λ+ε )(p e −1) 0 M = σ(M, f λ+ε ) = σ(M, f λ+ε ) we obtain that ε0 2pa (pe − 1) ≥ ε0 (pe+a − 1). Hence, we get the desired containment κa f dλ(p a −1)e σ(M, f λ+ε ) ⊆ σ(M, f λ+ε ). 20 AXEL STÄBLER e For the supplement, if λ(pa − 1) ∈ Z, then σ(M, f λ ) = κe f λ(p −1) M for all a e  0 such that λ(pe − 1) ∈ Z. So κa f λ(p −1) σ(M, f λ ) = σ(M, f λ ). Conversely, we may write dλ(pa − 1)e = λ(pa − 1) + δ = (λ + δ 0 )(pa − 1). By construction the denominator of λ + δ 0 is not divisible by p so that we obtain for suitable e  0 (κa f dλ(p a 0 −1)e e ) σ(M, f λ ) = κea f (λ+δ )(p ea −1) σ(M, f λ ) 0 ⊆ κea f (λ+δ )(p ea −1) 0 M = σ(M, f λ+δ ) where we use Lemma 4.3 for the last equality. As the filtration is decreasing this shows nilpotence.  Assume that R is regular and F -finite. Let us now recall from [BS16a] the notion of Bernstein-Sato polynomial attached to a Cartier module (M, κ) and an M -regular element f . As in Section 3 we denote by γ : Spec R → Spec R[t] the e graph embedding t 7→ f and may consider, for any e ≥ 1, the right DR [θ1 , . . . , θpe−1 ]module e e Ne := (γ∗ C e (M ))DR [θ1 , θp , . . . , θpe−1 ]/(γ∗ C e (f M ))DR [θ1 , θp , . . . , θpe−1 ]. Now let Γef ⊆ Fep be the set of those i = (i1 , . . . , ie ) for which the corresponding i-eigenspace with respect to the action of the θ1 , θp , . . . , θpe−1 is non-trivial. Then by lifting Fp to {0, . . . , p − 1} ⊆ Z we define the eth Bernstein-Sato polynomial beM,f (s) as Y ie i1 (s − ( + . . . + e−1 )). p p e i∈Γf 5.3. Theorem. Let R be an F -finite regular ring and (M, κ) a Cartier module. Fix a rational number λ. If λ(pe − 1) is a zero of the Bernstein-Sato polynomial for e  0 such that λ(pe − 1) ∈ Z, then Grσλ is non-trivial. Proof. First of all, we may assume that (M, κ) is F -pure (use [Stä17, Lemma 2.1]). By construction the zeros of the Bernstein-Sato polynomial are in [0, 1]. Fix 0 < ε  1 such that λ + ε ∈ Z(p) and take e  0 such that (using Lemma 4.3) e e σ(M, f λ ) = κe f λ(p −1) M and σ(M, f λ+ε ) = κe f (λ+ε)(p −1) M . Note that one has e e e κe f λ(p −1) f M ⊇ κe f λ(p −1 )f ε(p −1) M by possibly choosing a larger e. e e Now Grσλ M is non-trivial if and only if κe f λ(p −1) M 6= κe f (λ+ε)(p −1) M . Since e! e R is regular the functor F (−) = Hom(F∗ R, −) is fully faithful (i.e. Frobenius is finite flat – [Kun69]) so that this is further equivalent to F e ! (κe f λ(p e −1) M ) 6= F e ! (κe f (λ+ε)(p e −1) M ). Using [BS16a, Lemma 4.6], one obtains F e ! (κe f λ(p and similarly for F e ! (κe f (λ+ε)(p C e (f λ(p e −1) e e −1) −1) M ) = C e (f λ(p e −1) e M )DR M ). Hence, Grσλ M 6= 0 if and only if e M )DR 6= C e (f (λ+ε)(p e −1) e M )DR Let us write λ(pe − 1) = i1 + . . . + ie pe−1 , with ij ∈ {0, . . . , p − 1}, and assume that λ(pa − 1) is a zero of the Bernstein-Sato polynomial. Then, by (left)exactnes of F e ! , we conclude that C e (f i1 +...+ie p e−1 e M )DR 6= C e (f 1+i1 +...+ie p In particular, Grσλ M is non-zero as claimed. e−1 e M )DR ⊇ C e (f (λ+ε)(p e −1) e M )DR .  THE ASSOCIATED GRADED OF THE TEST MODULE FILTRATION 21 5.4. Example. The following example illustrates that the other implication of a Theorem 5.3 is not true. Take M = k[x] x1 , f = x and λ = 1. Then κa xp −1 xM = a a a κa xp −1 M = k[x] while κa xp −1 xε(p −1) M = (x) as soon as ε(pa − 1) ≥ 2. 5.5. Remark. (a) If (M, κ) is F -regular then all non-nilpotent information is ree covered. Indeed, for suitable e  0 one has σ(M, f λ+ε ) = κe f (λ+ε)(p −1) M = λ+ε 1−λ e τ (M, f λ+ε− pe ), and κe f λ(p −1) f M = τ (M, f λ+ pe ) using Theorem 2.6. By right-continuity of τ these two quantities coincide for 0 < ε  1 and e  0 suitable. (b) Note that in characteristic zero one has that if λ is a jumping number of the multiplier ideal filtration then it is a zero of the Bernstein-Sato polynomial. Here the situation is the other way around. References [BB11] M. Blickle and G. Böckle, Cartier modules: Finiteness results, J. reine angew. Math. 661 (2011), 85–123. , Cartier crystals, arXiv:1309.1035v1 (2013). [BB13] [BH98] W. Bruns and J. Herzog, Cohen-Macaulay rings, revised edition, Cambridge University Press, 1998. [Bit15] T. Bitoun, On a theory of the b-function in positive characteristic, arXiv:1501.00185 (2015). [Bli13] M. Blickle, Test ideals via p−e -linear maps, J. Algebraic Geom. 22 (2013), no. 1, 49–83. [BMS09] M. Blickle, M. Mustaţă, and K. Smith, F -thresholds of hypersurfaces, Trans. Amer. Math. Soc. 361 (2009), no. 12, 6549–6565. [BS16a] M. Blickle and A. Stäbler, Bernstein-Sato polynomials and test modules in positive characteristic, Nagoya Math. J. 222 (2016), no. 1, 74–99. , Functorial Test Modules, preprint, arXiv:1605.09517 (2016). [BS16b] [Cha74] S. U. Chase, On the homological dimension of algebras of differential operators, Comm. Algebra 1 (1974), no. 5, 351–363. [CHSW16] E. Canton, D. J. Hernandez, K. Schwede, and E. E. Witt, On the behavior of singularities at the F -pure threshold, arXiv:1508.05427 (2016). [EK04] M. Emerton and M. Kisin, The Riemann-Hilbert correspondence for unit F crystals, Asterisque 293 (2004). [FST11] Osamu Fujino, Karl Schwede, and Shunsuke Takagi, Supplements to non-lc ideal sheaves, Higher dimensional algebraic geometry, RIMS Kôkyûroku Bessatsu, B24, Res. Inst. Math. Sci. (RIMS), Kyoto, 2011, pp. 1–46. MR 2809647 [GD67] A. Grothendieck and J. Dieudonné, Eléments de géométrie algébrique IV, Quatrième partie, Inst. Hautes Études Sci. Publ. Math., 1967. [HNnBWZ16] D. J. Hernández, L. Núñez Betancourt, E. E. Witt, and W. Zhang, F -pure thresholds of homogeneous polynomials, Michigan Math. J. 65 (2016), no. 1, 57–87. [HSZ14] Jen-Chieh Hsiao, Karl Schwede, and Wenliang Zhang, Cartier modules on toric varieties, Trans. Amer. Math. Soc. 366 (2014), no. 4, 1773–1795. MR 3152712 [HY03] N. Hara and K. Yoshida, A generalization of tight closure and multiplier ideals, Trans. Amer. Math. Soc. 355 (2003), no. 8, 3143–3174. [Kun69] E. Kunz, Characterizations of regular local rings of characteristic p, Amer. J. Math. 91 (1969), 772–784. [Luc78] E. Lucas, Théorie des Fonctions Numériques Simplement Périodiques, Amer. J. Math. 1 (1878), no. 2, 197–240. [MTW04] M. Mustaţă, S. Takagi, and K.-I. Watanabe, F -thresholds and Bernstein-Sato polynomials, Proceedings of the 4th European congress of mathematics (ECM) (2004), 341–364. [Mül16] S. Müller, The F-pure threshold of quasi-homogeneous polynomials, arXiv:1601.08086 (2016). 22 [Mus09] [Sch09] [Sch14] [Sch16] [Stä16] [Stä17] AXEL STÄBLER M. Mustaţă, Bernstein-Sato polynomials in positive characteristic, J. Algebra 321 (2009), no. 1, 128–151. K. Schwede, F -adjunction, Algebra Number Theory 3 (2009), no. 8, 907–950. MR 2587408 Karl Schwede, A canonical linear system associated to adjoint divisors in characteristic p > 0, J. Reine Angew. Math. 696 (2014), 69–87. MR 3276163 T. Schedlmeier, Cartier crystals and perverse constructible étale p-torsion sheaves, PhD thesis (2016). A. Stäbler, V -filtrations in positive characteristic and test modules, Trans. Amer. Math. Soc. 368 (2016), no. 11, 7777–7808. , Test module filtrations for unit F -modules, to appear J. Algebra (2017). Axel Stäbler, Department of Mathematics, University of Michigan, Ann Arbor, MI 48109, USA E-mail address: [email protected]
0math.AC
Published as a conference paper at ICLR 2016 D ELVING D EEPER INTO C ONVOLUTIONAL N ETWORKS FOR L EARNING V IDEO R EPRESENTATIONS Nicolas Ballas1 , Li Yao1 , Chris Pal2 , Aaron Courville1 MILA, Université de Montréal. 2 École Polytechnique de Montŕeal. 1 arXiv:1511.06432v4 [cs.CV] 1 Mar 2016 A BSTRACT We propose an approach to learn spatio-temporal features in videos from intermediate visual representations we call “percepts” using Gated-Recurrent-Unit Recurrent Networks (GRUs). Our method relies on percepts that are extracted from all levels of a deep convolutional network trained on the large ImageNet dataset. While high-level percepts contain highly discriminative information, they tend to have a low-spatial resolution. Low-level percepts, on the other hand, preserve a higher spatial resolution from which we can model finer motion patterns. Using low-level percepts, however, can lead to high-dimensionality video representations. To mitigate this effect and control the number of parameters, we introduce a variant of the GRU model that leverages the convolution operations to enforce sparse connectivity of the model units and share parameters across the input spatial locations. We empirically validate our approach on both Human Action Recognition and Video Captioning tasks. In particular, we achieve results equivalent to state-of-art on the YouTube2Text dataset using a simpler caption-decoder model and without extra 3D CNN features. 1 I NTRODUCTION Video analysis and understanding represents a major challenge for computer vision and machine learning research. While previous work has traditionally relied on hand-crafted and task-specific representations (Wang et al., 2011; Sadanand & Corso, 2012), there is a growing interest in designing general video representations that could help solve tasks in video understanding such as human action recognition, video retrieval or video captionning (Tran et al., 2014). Two-dimensional Convolutional Neural Networks (CNN) have exhibited state-of-art performance in still image tasks such as classification or detection (Simonyan & Zisserman, 2014b). However, such models discard temporal information that has been shown to provide important cues in videos (Wang et al., 2011). On the other hand, recurrent neural networks (RNN) have demonstrated the ability to understand temporal sequences in various learning tasks such as speech recognition (Graves & Jaitly, 2014) or machine translation (Bahdanau et al., 2014). Consequently, Recurrent Convolution Networks (RCN) (Srivastava et al., 2015; Donahue et al., 2014; Ng et al., 2015) that leverage both recurrence and convolution have recently been introduced for learning video representation. Such approaches typically extract “visual percepts” by applying a 2D CNN on the video frames and then feed the CNN activations to an RNN in order to characterize the video temporal variation. Previous works on RCNs has tended to focus on high-level visual percepts extracted from the 2D CNN top-layers. CNNs, however, hierarchically build-up spatial invariance through pooling layers (LeCun et al., 1998; Simonyan & Zisserman, 2014b) as Figure 2 highlights. While CNNs tends to discard local information in their top layers, frame-to-frame temporal variation is known to be smooth. The motion of video patches tend to be restricted to a local neighborhood (Brox & Malik, 2011). For this reason, we argue that current RCN architectures are not well suited for capturing fine motion information. Instead, they are more likely focus on global appearance changes such as shot transitions. To address this issue, we introduce a novel RCN architecture that applies an RNN not solely on the 2D CNN top-layer but also on the intermediate convolutional layers. Convolutional 1 Published as a conference paper at ICLR 2016 … … … … … … Figure 1: Visualization of convolutional maps on successive frames in video. As we go up in the CNN hierarchy, we observe that the convolutional maps are more stable over time, and thus discard variation over short temporal windows. layer activations, or convolutional maps, preserve a finer spatial resolution of the input video from which local spatio-temporal patterns are extracted. Applying an RNN directly on intermediate convolutional maps, however, inevitably results in a drastic number of parameters characterizing the input-to-hidden transformation due to the convolutional maps size. On the other hand, convolutional maps preserve the frame spatial topology. We propose to leverage this topology by introducing sparsity and locality in the RNN units to reduce the memory requirement. We extend the GRU-RNN model (Cho et al., 2014) and replace the fully-connected RNN linear product operation with a convolution. Our GRU-extension therefore encodes the locality and temporal smoothness prior of videos directly in the model structure. We evaluate our solution on UCF101 human action recognition from Soomro et al. (2012) as well as the YouTube2text video captioning dataset from Chen & Dolan (2011). Our experiments show that leveraging “percepts” at multiple resolutions to model temporal variation improves performance over our baseline model with respective gains of 3.4% for action recognition and 10% for video captioning. 2 GRU: G ATED R ECURRENT U NIT N ETWORKS In this section, we review Gated-Recurrent-Unit (GRU) networks which are a particular type of RNN. An RNN model is applied to a sequence of inputs, which can have variable lengths. It defines a recurrent hidden state whose activation at each time is dependent on that of the previous time. Specifically, given a sequence X = (x1 , x2 , ..., xT ), the RNN hidden state at time t is defined as ht = φ(ht−1 , xt ), where φ is a nonlinear activation function. RNNs are known to be difficult to train due to the exploding or vanishing gradient effect (Bengio et al., 1994). However, variants of RNNs such as Long Short Term Memory (LSTM) (Hochreiter & Schmidhuber, 1997) or Gated Recurrent Units (GRU) (Cho et al., 2014) have empirically demonstrated their ability to model long-term temporal dependency in various task such as machine translation or image/video caption generation. In this paper, we will mainly focus on GRU networks as they have shown similar performance to LSTMs but with a lower memory requirement (Chung et al., 2014). GRU networks allow each recurrent unit to adaptively capture dependencies of different time scales. The activation ht of the GRU is defined by the following equations: zt rt = σ(Wz xt + Uz ht−1 ), = σ(Wr xt + Ur ht−1 ), h̃t = tanh(Wxt + U(rt ht = (1 − zt )ht−1 + zt h̃t , 2 (1) (2) ht−1 ), (3) (4) Published as a conference paper at ICLR 2016 … … … … … … … … … Figure 2: High-level visualization of our model. Our approach leverages convolutional maps from different layers of a pretrained-convnet. Each map is given as input to a convolutional GRU-RNN (hence GRU-RCN) at different time-step. Bottom-up connections may be optionally added between RCN layers to form Stack-GRU-RCN. where is an element-wise multiplication. zt is an update gate that decides the degree to which the unit updates its activation, or content. rt is a reset gate. σ is the sigmoid function. When a unit rti is close to 0, the reset gate forgets the previously computed state, and makes the unit act as if it is reading the first symbol of an input sequence. h̃t is a candidate activation which is computed similarly to that of the traditional recurrent unit in an RNN. 3 D ELVING D EEPER INTO C ONVOLUTIONAL N EURAL N ETWORKS This section delves into the main contributions of this work. We aim at leveraging visual percepts from different convolutional levels in order to capture temporal patterns that occur at different spatial resolution. , xL Let’s consider (x1t , ..., xL−1 t t )(t=1..T ) , a set of 2D convolutional maps extracted from L layers at different time steps in a video. We propose two alternative RCN architectures, GRU-RCN, and Stacked-GRU-RCN (illustrated in Figure 2) that combines information extracted from those convolutional maps. 3.1 GRU-RCN: In the first RCN architecture, we propose to apply L RNNs independently on each convolutional map. We define L RNNs as φ1 , ..., φL , such that hlt = φl (xlt , hlt−1 ). The hidden representation of the final time step h1T , ..., hL T are then fed to a classification layer in the case of action recognition, or to a text-decoder RNN for caption generation. To implement the RNN recurrent function φl , we propose to leverage Gated Recurrent Units (Cho et al., 2014). GRUs were originally introduced for machine translation. They model input to hiddenstate and hidden to hidden transitions using fully connected units. However, convolutional map inputs are 3D tensors (spatial dimension and input channels). Applying a GRU directly can lead to a drastic number of parameters. Let N1 , N2 and Ox be the input convolutional map spatial size and number of channels. Applying a GRU directly would require input-to-hidden parameters Wl , Wzl and Wrl to be of size N1 × N2 × Ox × Oh where Oh is the dimensionality of the GRU hidden representation. 3 Published as a conference paper at ICLR 2016 Fully-connected GRUs do not take advantage of the underlying structure of convolutional maps. Indeed, convolutional maps are extracted from images that are composed of patterns with strong local correlation which are repeated over different spatial locations. In addition, videos have smooth temporal variation over time, i.e. motion associated with a given patch in successive frames will be restricted in a local spatial neighborhood. We embed such a prior in our model structure and replace the fully-connected units in GRU with convolution operations. We therefore obtain recurrent units that have sparse connectivity and share their parameters across different input spatial locations: zlt rlt h̃lt hlt = σ(Wzl ∗ xlt + Ulz ∗ hlt−1 ), = = = σ(Wrl xlt l ∗ + ∗ hlt−1 ), tanh(W ∗ xlt + U ∗ (rlt (1 − zlt )hlt−1 + zlt h̃lt , (5) Ulr (6) hlt−1 ), (7) (8) where ∗ denotes a convolution operation. In this formulation, Model parameters W, Wzl , Wrl and Ul , Ulz , Ulr are 2D-convolutional kernels. Our model results in hidden recurrent representation that preserves the spatial topology, hlt = (hlt (i, j)) where hlt (i, j)) is a feature vector defined at the location (i, j). To ensure that the spatial size of the hidden representation remains fixed over time, we use zero-padding in the recurrent convolutions. Using convolution, parameters Wl , Wzl and Wrl have a size of k1 ×k2 ×Ox ×Oh where k1 ×k2 is the convolutional kernel spatial size (usually 3 × 3), chosen to be significantly lower than convolutional map size N1 × N2 . The candidate hidden representation h̃t (i, j), the activation gate zk (i, j) and the reset gate rk (i, j) are defined based on a local neigborhood of size (k1 × k2 ) at the location(i, j) in both the input data xt and the previous hidden-state ht−1 . In addition, the size of receptive field associated with hl (i, j)t increases in the previous presentation hlt−1 , hlt−2 ... as we go back further in time. Our model is therefore capable of characterizing spatio-temporal patterns with high spatial variation in time. A GRU-RCN layer applies 6 2D-convolutions at each time-step (2 per GRU gate and 2 for computing the candidate activation). If we assume for simplicity that the input-to-hidden and hidden-tohidden convolutions have the same kernel size and perserve the input dimension, GRU-RCN requires O(3T N1 N2 k1 k2 (Ox Oh + Oh Oh )) multiplications. GRU-RCN sparse connectivity therefore saves computation compared to a fully-connected RNN that would require O(3T N1 N2 N1 N2 (Ox Oh + Oh Oh )) computations. Memorywise, GRU-RCN needs to store the parameters for all 6 convolutions kernels leading to O(3k1 k2 (Ox Oh + Oh Oh )) parameters. 3.2 S TACKED GRU-RCN: In the second RCN architecture, we investigate the importance of bottom-up connection across RNNs. While GRU-RCN applies each layer-wise GRU-RNN in an independent fashion, Stacked GRU-RCN preconditions each GRU-RNN on the output of the previous GRU-RNN at the current l time step: hlt = φl (hlt−1 , hl−1 t , xt ). The previous RNN hidden representation is given as an extrainput to the GRU convolutional units: zll rlt h̃lt hlt = σ(Wzl ∗ xlt + Wzl l ∗ hl−1 + Ulz ∗ hlt−1 ), t = = = σ(Wrl ∗ xlt l tanh(W ∗ (1 − + Wrl l xlt zlt )hlt−1 ∗ hl−1 t l +U ∗ + zlt h̃lt , + Ulr hlt−1 ), (rt hlt−1 ), (9) (10) (11) (12) Adding this extra-connection brings more flexibility and gives the opportunity for the model to leverage representations with different resolutions. 4 R ELATED W ORK Deep learning approaches have recently been used to learn video representations and have produced state-of-art results (Karpathy et al., 2014; Simonyan & Zisserman, 2014a; Wang et al., 2015b; Tran et al., 2014). Karpathy et al. (2014); Tran et al. (2014) proposed to use 3D CNN learn a video representations, leveraging large training datasets such as the Sport 1 Million. However, unlike image 4 Published as a conference paper at ICLR 2016 classification (Simonyan & Zisserman, 2014b), CNNs did not yield large improvement over these traditional methods (Lan et al., 2014) highlighting the difficulty of learning video representations even with large training dataset. Simonyan & Zisserman (2014a) introduced a two-stream framework where they train CNNs independently on RGB and optical flow inputs. While the flow stream focuses only on motion information, the RGB stream can leverage 2D CNN pre-trained on image datasets. Based on the Two Stream representation, Wang et al. (2015a) extracted deep feature and conducted trajectory constrained pooling to aggregate convolutional feature as video representations. RNN models have also been used to encode temporal information for learning video representations in conjonction with 2D CNNs. Ng et al. (2015); Donahue et al. (2014) applied an RNN on top of the the two-stream framework, while Srivastava et al. (2015) proposed, in addition, to investigate the benefit of learning a video representation in an unsupervised manner. Previous works on this topic has tended to focus only on high-level CNN “visual percepts”. In contrast, our approach proposes to leverage visual “percepts” extracted from different layers in the 2D-CNN. Recently, Shi et al. (2015) also proposed to leverage convolutional units inside an RNN network. However, they focus on different task (now-casting) and a different RNN model based on an LSTM. In addition, they applied their model directly on pixels. Here, we use recurrent convolutional units on pre-trained CNN convolutional maps, to extract temporal pattern from visual “percepts” with different spatial sizes. 5 E XPERIMENTATION This section presents an empirical evaluation of the proposed GRU-RCN and Stacked GRU-RCN architectures. We conduct experimentations on two different tasks: human action recognition and video caption generation. 5.1 ACTION R ECOGNITION We evaluate our approach on the UCF101 dataset Soomro et al. (2012). This dataset has 101 action classes spanning over 13320 YouTube videos clips. Videos composing the dataset are subject to large camera motion, viewpoint change and cluttered backgrounds. We report results on the dataset UCF101 first split, as this is most commonly used split in the literature. To perform proper hyperparameter seach, we use the videos from the UCF-Thumos validation split Jiang et al. (2014) as the validation set. 5.1.1 M ODEL A RCHITECTURE In this experiment, we consider the RGB and flow representations of videos as inputs. We extract visual “percept” using VGG-16 CNNs that consider either RGB or flow inputs. VGG-16 CNNs are pretrained on ImageNet (Simonyan & Zisserman, 2014b) and fine-tuned on the UCF-101 dataset, following the protocol in Wang et al. (2015b). We then extract the convolution maps from pool2, pool3, pool4, pool5 layers and the fully-connected map from layer fc-7 (which can be view as a feature map with a 1 × 1 spatial dimension). Those features maps are given as inputs to our RCN models. We design and evaluate three RCN architectures for action recognition. In the first RCN architecture, GRU-RCN, we apply 5 convolutional GRU-RNNs independently on each convolutional map. Each convolution in the GRU-RCN has zero-padded 3 × 3 convolutions that preserves the spatial dimension of the inputs . The number of channels of each respective GRU-RNN hidden-representations are 64, 128, 256, 256, 512. After the RCN operation we obtain 5 hidden-representations for each time step. We apply average pooling on the hidden-representations of the last time-step to reduce their spatial dimension to 1 × 1, and feed the representations to 5 classifiers, composed by a linear layer with a softmax nonlineary. Each classifier therefore focuses on only 1 hidden-representation extracted from the convolutional map of a specific layer. The classifier outputs are then averaged to get the final decision. A dropout ratio of 0.7 is applied on the input of each classifiers. In the second RCN architecture, Stacked GRU-RCN, we investigate the usefulness of bottom-up connections. Our stacked GRU-RCN uses the same base architecture as the GRU-RCN, consisting of 5 convolutional GRU-RNNs having 64, 128, 256, 256 channels respectively. However, each 5 Published as a conference paper at ICLR 2016 convolutional GRU-RNN is now preconditioned on the hidden-representation that the GRU-RNN applied on the previous convolution-map outputs. We apply max-pooling on the hidden representations between the GRU-RNN layers for the compatibility of the spatial dimensions. As for the previous architecture, each GRU-RNN hidden-representation at the last time step is pooled and then given as input to a classifier. Finally, in our bi-directional GRU-RCN, we investigate the importance of reverse temporal information. Given convolutional maps extracted from one layer, we run the GRU-RCN twice, considering the inputs in both sequential and reverse temporal order. We then concatenate the last hiddenrepresentations of the foward GRU-RCN and backward GRU-RCN, and give the resulting vector to a classifier. 5.1.2 M ODEL T RAINING AND E VALUATION We follow the training procedure introduced by the two-stream framework Simonyan & Zisserman (2014a). At each iteration, a batch of 64 videos are sampled randomly from the the training set. To perform scale-augmentation, we randomly sample the cropping width and height from 256, 224, 192, 168. The temporal cropping size is set to 10. We then resize the cropped volume to 224 × 224 × 10. We estimate each model parameters by maximizing the model log-likelihood: L(θ) = N 1 X log p(y n | c(xn ), θ), N n=1 where there are N training video-action pairs (xn , y n ), c is a function that takes a crop at random. We use Adam Kingma & Ba (2014) with the gradient computed by the backpropagation algorithm. We perform early stopping and choose the parameters that maximize the log-probability of the validation set. We also follow the evaluation protocol of the two-stream framework Simonyan & Zisserman (2014a). At the test time, we sample 25 equally spaced video sub-volumes with a temporal size of 10 frames. From each of these selected sub-volumes, we obtain 10 inputs for our model, i.e. 4 corners, 1 center, and their horizontal flipping. The final pre- diction score is obtained by averaging across the sampled sub-volumes and their cropped regions. 5.1.3 R ESULTS Method VGG-16 VGG-16 RNN GRU-RCN Stacked-GRU RCN Bi-directional GRU-RCN Two-Stream Simonyan & Zisserman (2014b) Two-Stream + LSTM Donahue et al. (2014) Two-Stream + LSTM + Unsupervised Srivastava et al. (2015) Improved Two-Stream Wang et al. (2015b) C3D one network Tran et al. (2014), 1 million videos as training C3D ensemble Tran et al. (2014), 1 million videos as training Deep networks Karpathy et al. (2014), 1 million videos as training RGB 78.0 78.1 79.9 78.3 80.7 72.8 71.1 77.7 79.8 82.3 85.2 65.2 Flow 85.4 84.9 85.7 81.2 76.9 83.7 85.7 - Table 1: Classification accuracy of different variants of the model on the UCF101 split 1. We report the performance of previous works that learn representation using only RGB information only. We compare our approach with two different baselines, VGG-16 and VGG-16 RNN. VGG-16 is the 2D spatial stream that is described in Wang et al. (2015b). We take the VGG-16 model, pretrained on Image-Net and fine-tune it on the UCF-101 dataset. VGG-16 RNN baseline applied an RNN, using fully-connected gated-recurrent units, on top-of VGG-16. It takes as input the VGG-16 fully-connected representation fc-7. Following GRU-RCN top-layer, the VGG-16 RNN has hiddenrepresentation dimensionality of 512. 6 Published as a conference paper at ICLR 2016 The first column of Table 1 focuses on RGB inputs. We first report results of different GRU-RCN variants and compare them with the two baselines: VGG-16 and VGG-16 RNN. Our GRU-RCN variants all outperform the baselines, showing the benefit of delving deeper into a CNN in order to learn a video representation. We notice that VGG-16 RNN only slightly improve over the VGG16 baseline, 78.1 against 78.0. This result confirms that CNN top-layer tends to discard temporal variation over short temporal windows. Stacked-GRU RCN performs significantly lower than GRURCN and Bi-directional GRU-RCN. We argue that bottom-up connection, increasing the depth of the model, combined with the lack of training data (UCF-101 is train set composed by only 9500 videos) make the Stacked-GRU RCN learning difficult. The bi-directional GRU-RCN performs the best among the GRU-RCN variant with an accuracy of 80.7, showing the advantage of modeling temporal information in both sequential and reverse order. Bi-directional GRU-RCN obtains a gain 3.4% in term of performances, relatively to the baselines that focus only the VGG-16 top layer. Table 1 also reports results from other state-of-art approaches using RGB inputs. C3D Tran et al. (2014) obtains the best performance on UCF-101 with 85.2. However, it should be noted that C3D is trained over 1 million videos. Other approaches use only the 9500 videos of UCF101 training set for learning temporal pattern. Our Bi-directional GRU-RCN compare favorably with other Recurrent Convolution Network (second blocks), confirming the benefit of using different CNN layers to model temporal variation. Table 1 also evaluates the GRU-RCN model applied flow inputs. VGG-16 RNN baseline actually decreases the performance compared to the VGG-16 baseline. On the other hand, GRU-RCN outperforms the VGG-16 baseline achieving 85.7 against 85.4. While the improvement is less important than the RGB stream, it should be noted that the flow stream of VGG-16 is applied on 10 consecutive flow inputs to extract visual “percepts”, and therefore already captures some motion information. Finally, we investigate the combination of the RGB and flow streams. Following Wang et al. (2015b), we use a weighted linear combination of their prediction scores, where the weight is set to 2 as for the flow stream net and 1 for the temporal stream. Fusion the VGG-16 model baseline achieve an accuracy of 89.1. Combining the RGB Bi-directional GRU-RCN with the flow GRU-RCN achieves a performance gain of 1.9% over baseline, reaching 90.8. Our model is on part with Wang et al. (2015b) that obtain state-of-art results using both RGB and flow streams which obtains 90.9. 5.2 V IDEO C APTIONING We also evaluate our representation on the video captioning task using YouTube2Text video corpus Chen & Dolan (2011). The dataset has 1,970 video clips with multiple natural language descriptions for each video clip. The dataset is open-domain and covers a wide range of topics such as sports, animals, music and movie clips. Following Yao et al. (2015b), we split the dataset into a training set of 1,200 video clips, a validation set of 100 clips and a test set consisting of the remaining clips. 5.2.1 M ODEL S PECIFICATIONS To perform video captioning, we use the so-called encoder-decoder framework Cho et al. (2014). In this framework the encoder maps input videos into abstract representations that precondition a caption-generating decoder. As for encoder, we compare both VGG-16 CNN and Bi-directional GRU-RCN. Both models have been fine-tuned on the UCF-101 dataset and therefore focus on detecting actions. To extract an abstract representation from a video, we sample K equally-space segments. When using the VGG16 encoder, we provide the f c7 layer activations of the each segment’s first frame as the input to the text-decoder. For the GRU-RCN, we apply our model on the segment’s 10 first frames. We concatenate the GRU-RCN hidden-representation from the last time step. The concatenated vector is given as the input to the text decoder. As it has been shown that characterizing entities in addition of action is important for the caption-generation task Yao et al. (2015a), we also use as encoder a CNN Szegedy et al. (2014), pretrained on ImageNet, that focuses on detecting static visual object categories. As for the decoder, we use an LSTM text-generator with soft-attention on the video temporal frames Yao et al. (2015b). 7 Published as a conference paper at ICLR 2016 YouTube2Text Model VGG-16 Encoder Bi-directional GRU-RCN Encoder GoogleNet Encoder GoogleNet + Bi-directional GRU-RCN Encoder GoogleNet + Bi-directional GRU-RCN Encoder GoogleNet + Bi-directional GRU-RCN Encoder GoogleNet + Bi-directional GRU-RCN Encoder GoogleNet + HRNE (Pan et al., 2015) VGG + p-RNN (Yu et al., 2015) VGG + C3D + p-RNN (Yu et al., 2015) Soft-attention Yao et al. (2015b) Venugopalan et al. Venugopalan et al. (2015) + Extra Data (Flickr30k, COCO) Thomason et al. Thomason et al. (2014) model selection BLEU BLEU BLEU BLEU NLL METEOR CIDEr - BLEU METEOR CIDEr 0.3700 0.4100 0.4128 0.4963 0.4790 0.4842 0.4326 0.436 0.443 0.499 0.4192 0.3119 0.3329 0.1368 0.2640 0.2850 0.2900 0.3075 0.3114 0.3170 0.3160 0.321 0.311 0.326 0.2960 0.2687 0.2907 0.2390 0.4330 0.5010 0.4804 0.5937 0.6782 0.6538 0.6801 0.5167 - Table 2: Performance of different variants of the model on YouTube2Text for video captioning. Representations obtained with the proposed RCN architecture combined with decoders from Yao et al. (2015b) offer a significant performance boost, reaching the performance of the other state-ofthe-art models. 5.2.2 T RAINING For all video captioning models, we estimated the parameters θ of the decoder by maximizing the log-likelihood: L(θ) = N tn 1 XX n log p(yin | y<i , xn , θ), N n=1 i=1 where there are N training video-description pairs (xn , y n ), and each description y n is tn words long. We used Adadelta Zeiler (2012) We optimized the hyperparameters (e.g. number of LSTM units and the word embedding dimensionality, number of segment K) using random search (Bergstra & Bengio, 2012) to maximize the log-probability of the validation set. 5.2.3 R ESULTS Table 2 reports the performance of our proposed method using three automatic evaluation metrics. These are BLEU in Papineni et al. (2002), METEOR in Denkowski & Lavie (2014) and CIDEr in Vedantam et al. (2014). We use the evaluation script prepared and introduced in Chen et al. (2015). All models are early-stopped based on the negative-log-likelihood (NLL) of the validation set. We then select the model that performs best on the validation set according to the metric at consideration. The first two lines of Table 2 compare the performances of the VGG-16 and Bi-directional GRURCN encoder. Results clearly show the superiority of the Bi-Directional GRU-RCN Encoder as it outperforms the VGG-16 Encoder on all three metrics. In particular, GRU-RCN Encoder obtains a performance gain of 10% compared to the VGG-16 Encoder according to the BLEU metric. Combining our GRU-RCN Encoder that focuses on action with a GoogleNet Encoder that captures visual entities further improve the performances. Our GoogleNet + Bi-directional GRU-RCN approach significantly outperforms Soft-attention Yao et al. (2015b) that relies on a GoogLeNet and cuboids-based 3D-CNN Encoder, in conjunction to a similar soft-attention decoder. This result indicates that our approach is able to offer more effective representations. According to the BLEU metric, we also outperform other approaches using more complex decoder schemes such as spatial and temporal attention decoder (Yu et al., 2015) or a hierarchical RNN decoder (Pan et al., 2015) Our approach is on par with Yu et al. (2015), without the need of using a C3D-encoder that requires training on large-scale video dataset. 8 Published as a conference paper at ICLR 2016 6 C ONCLUSION In this work, we address the challenging problem of learning discriminative and abstract representations from videos. We identify and underscore the importance of modeling temporal variation from “visual percepts” at different spatial resolutions. While high-level percepts contain highly discriminative information, they tend to have a low-spatial resolution. Low-level percepts, on the other hand, preserve a higher spatial resolution from which we can model finer motion patterns. We introduce a novel recurrent convolutional network architecture that leverages convolutional maps, from all levels of a deep convolutional network trained on the ImageNet dataset, to take advantage of “percepts” from different spatial resolutions. We have empirically validated our approach on the Human Action Recognition and Video Captioning tasks using the UCF-101 and YouTube2Text datasets. Experiments demonstrate that leveraging “percepts” at multiple resolutions to model temporal variation improve over our baseline model, with respective gain of 3.4% and 10% for the action recognition and video captions tasks using RGB inputs. In particular, we achieve results comparable to state-of-art on YouTube2Text using a simpler text-decoder model and without extra 3D CNN features. ACKNOWLEDGMENTS The authors would like to acknowledge the support of the following agencies for research funding and computing support: NSERC, Calcul Québec, Compute Canada, the Canada Research Chairs and CIFAR. We would also like to thank the developers of Theano (Bergstra et al., 2010; Bastien et al., 2012) , for developing such a powerful tool for scientific computing. R EFERENCES Bahdanau, D., Cho, K., and Bengio, Y. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. Bastien, Frédéric, Lamblin, Pascal, Pascanu, Razvan, Bergstra, James, Goodfellow, Ian J., Bergeron, Arnaud, Bouchard, Nicolas, and Bengio, Yoshua. Theano: new features and speed improvements. Deep Learning and Unsupervised Feature Learning NIPS 2012 Workshop, 2012. Bengio, Y., Simard, P., and Frasconi, P. Learning long-term dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on, 1994. Bergstra, James and Bengio, Yoshua. Random search for hyper-parameter optimization. JMLR, 2012. Bergstra, James, Breuleux, Olivier, Bastien, Frédéric, Lamblin, Pascal, Pascanu, Razvan, Desjardins, Guillaume, Turian, Joseph, Warde-Farley, David, and Bengio, Yoshua. Theano: a CPU and GPU math expression compiler. In Proceedings of the Python for Scientific Computing Conference (SciPy), 2010. Brox, T. and Malik, J. Large displacement optical flow: descriptor matching in variational motion estimation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 2011. Chen, David L and Dolan, William B. Collecting highly parallel data for paraphrase evaluation. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies-Volume 1, pp. 190–200. Association for Computational Linguistics, 2011. Chen, Xinlei, Fang, Hao, Lin, Tsung-Yi, Vedantam, Ramakrishna, Gupta, Saurabh, Dollar, Piotr, and Zitnick, C Lawrence. Microsoft coco captions: Data collection and evaluation server. arXiv 1504.00325, 2015. Cho, K., Van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., and Bengio, Y. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. 9 Published as a conference paper at ICLR 2016 Chung, Junyoung, Gulcehre, Caglar, Cho, KyungHyun, and Bengio, Yoshua. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. Denkowski, Michael and Lavie, Alon. Meteor universal: Language specific translation evaluation for any target language. In EACL Workshop, 2014. Donahue, J., Hendricks, L., Guadarrama, S., Rohrbach, M., Venugopalan, S., Saenko, K., and Darrell, T. Long-term recurrent convolutional networks for visual recognition and description. arXiv preprint arXiv:1411.4389, 2014. Graves, A. and Jaitly, N. Towards end-to-end speech recognition with recurrent neural networks. In ICML, 2014. Hochreiter, Sepp and Schmidhuber, Jürgen. Long short-term memory. Neural computation, 1997. Jiang, YG, Liu, J, Roshan Zamir, A, Toderici, G, Laptev, I, Shah, M, and Sukthankar, R. Thumos challenge: Action recognition with a large number of classes. Technical Report, 2014. Karpathy, Andrej, Toderici, George, Shetty, Sachin, Leung, Tommy, Sukthankar, Rahul, and Fei-Fei, Li. Large-scale video classification with convolutional neural networks. In CVPR. IEEE, 2014. Kingma, Diederik and Ba, Jimmy. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. Lan, Zhenzhong, Lin, Ming, Li, Xuanchong, Hauptmann, Alexander G, and Raj, Bhiksha. Beyond gaussian pyramid: Multi-skip feature stacking for action recognition. arXiv preprint arXiv:1411.6660, 2014. LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. Ng, Joe Yue-Hei, Hausknecht, Matthew, Vijayanarasimhan, Sudheendra, Vinyals, Oriol, Monga, Rajat, and Toderici, George. Beyond short snippets: Deep networks for video classification. arXiv preprint arXiv:1503.08909, 2015. Pan, Pingbo, Xu, Zhongwen, Yang, Yi, Wu, Fei, and Zhuang, Yueting. Hierarchical recurrent neural encoder for video representation with application to captioning. arXiv preprint arXiv:1511.03476, 2015. Papineni, Kishore, Roukos, Salim, Ward, Todd, and Zhu, Wei-Jing. Bleu: a method for automatic evaluation of machine translation. In ACL, 2002. Sadanand, S. and Corso, J. Action bank: A high-level representation of activity in video. In CVPR. IEEE, 2012. Shi, Xingjian, Chen, Zhourong, Wang, Hao, Yeung, Dit-Yan, Wong, Wai-Kin, and Woo, Wangchun. Convolutional lstm network: A machine learning approach for precipitation nowcasting. arXiv preprint arXiv:1506.04214, 2015. Simonyan, Karen and Zisserman, Andrew. Two-stream convolutional networks for action recognition in videos. In Advances in Neural Information Processing Systems, pp. 568–576, 2014a. Simonyan, Karen and Zisserman, Andrew. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014b. Soomro, Khurram, Zamir, Amir Roshan, and Shah, Mubarak. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. Srivastava, N., Mansimov, E., and Salakhutdinov, R. Unsupervised learning of video representations using lstms. In ICML, 2015. 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. 10 Published as a conference paper at ICLR 2016 Thomason, Jesse, Venugopalan, Subhashini, Guadarrama, Sergio, Saenko, Kate, and Mooney, Raymond. Integrating language and vision to generate natural language descriptions of videos in the wild. In COLING, 2014. Tran, D., Bourdev, L., Fergus, R., Torresani, L., and Paluri, M. C3d: generic features for video analysis. arXiv preprint arXiv:1412.0767, 2014. Vedantam, Ramakrishna, Zitnick, C Lawrence, and Parikh, Devi. CIDEr: Consensus-based image description evaluation. arXiv:1411.5726, 2014. Venugopalan, Subhashini, Xu, Huijuan, Donahue, Jeff, Rohrbach, Marcus, Mooney, Raymond, and Saenko, Kate. Translating videos to natural language using deep recurrent neural networks. NAACL, 2015. Wang, H., Kläser, A., Schmid, C., and Liu, C. Action recognition by dense trajectories. In CVPR. IEEE, 2011. Wang, Limin, Qiao, Yu, and Tang, Xiaoou. Action recognition with trajectory-pooled deepconvolutional descriptors. arXiv preprint arXiv:1505.04868, 2015a. Wang, Limin, Xiong, Yuanjun, Wang, Zhe, and Qiao, Yu. Towards good practices for very deep two-stream convnets. arXiv preprint arXiv:1507.02159, 2015b. Yao, Li, Ballas, Nicolas, Cho, Kyunghyun, Smith, John R., and Bengio, Yoshua. Trainable performance upper bounds for image and video captioning. arXiv preprint arXiv:1511.0459, 2015a. Yao, Li, Torabi, Atousa, Cho, Kyunghyun, Ballas, Nicolas, Pal, Christopher, Larochelle, Hugo, and Courville, Aaron. Describing videos by exploiting temporal structure. In Computer Vision (ICCV), 2015 IEEE International Conference on. IEEE, 2015b. Yu, Haonan, Wang, Jiang, Huang, Zhiheng, Yang, Yi, and Xu, Wei. Video paragraph captioning using hierarchical recurrent neural networks. arXiv 1510.07712, 2015. Zeiler, Matthew D. ADADELTA: an adaptive learning rate method. Technical report, 2012. 11
9cs.NE
Memetic Graph Clustering Sonja Biedermann1 , Monika Henzinger2 , Christian Schulz3 , and Bernhard Schuster4 1 2 3 arXiv:1802.07034v1 [cs.NE] 20 Feb 2018 4 University of Vienna, Vienna, Austria [email protected] University of Vienna, Vienna, Austria [email protected] University of Vienna, Vienna, Austria [email protected] University of Vienna, Vienna, Austria [email protected] Abstract It is common knowledge that there is no single best strategy for graph clustering, which justifies a plethora of existing approaches. In this paper, we present a general memetic algorithm, VieClus, to tackle the graph clustering problem. This algorithm can be adapted to optimize different objective functions. A key component of our contribution are natural recombine operators that employ ensemble clusterings as well as multi-level techniques. Lastly, we combine these techniques with a scalable communication protocol, producing a system that is able to compute high-quality solutions in a short amount of time. We instantiate our scheme with local search for modularity and show that our algorithm successfully improves or reproduces all entries of the 10th DIMACS implementation challenge under consideration using a small amount of time. 1998 ACM Subject Classification G.2.2 Graph Theory Keywords and phrases Graph Clustering, Evolutionary Algorithms 1 Introduction Graph clustering is the problem of detecting tightly connected regions of a graph. Depending on the task, knowledge about the structure of the graph can reveal information such as voter behavior, the formation of new trends, existing terrorist groups and recruitment [41] or a natural partitioning of data records onto pages [16]. Further application areas include the study of protein interaction [34], gene expression networks [47], fraud detection [1], program optimization [28, 14] and the spread of epidemics [31]—possible applications are plentiful, as almost all systems containing interacting or coexisting entities can be modeled as a graph. It is common knowledge that there is no single best strategy for graph clustering, which justifies a plethora of existing approaches. Moreover, most quality indices for graph clusterings have turned out to be NP-hard to optimize and are rather resilient to effective approximations, see e.g. [4, 11, 46], allowing only heuristic approaches for optimization. The majority of algorithms for graph clustering are based on the paradigm of intra-cluster density versus inter-cluster sparsity. One successful heuristic to cluster large graphs is the multi-level approach [10], e.g. the Louvain method for the optimization of modularity [9]. Here, the graph is recursively contracted to obtain smaller graphs which should reflect the same general structure as the input. After applying an initial clustering algorithm to the smallest graph, the contraction steps are undone and, at each level, a local search method XX:2 Memetic Graph Clustering is used to improve the clustering induced by the coarser level w.r.t some objective function measuring the quality of the clustering. The intuition behind this approach is that a good clustering at one level of the hierarchy will also be a good clustering on the next finer level. Hence, depending on the definition of the neighborhood, local search algorithms are able to explore local solution spaces very effectively in this setting. However, these methods are also prone to get trapped in local optima. The multi-level scheme can help to some extent since local search has a more global view on the problem on the coarse levels and a very fine-grained view on the fine levels of the multi-level hierarchy. In addition, as with many other randomized meta-heuristics, several repeated runs can be made in order to improve the final result at the expense of running time. Still, even a large number of repeated executions can only scratch the surface of the huge search space of possible clusterings. In order to explore the global solution space extensively, we need more sophisticated meta-heuristics. This is where memetic algorithms (MAs), i.e. genetic algorithms combined with local search [24], come into play. Memetic algorithms allow for effective exploration (global search) and exploitation (local search) of the solution space. The general idea behind genetic algorithms is to use mechanisms inspired by biological evolution such as selection, mutation, recombination, and survival of the fittest. A genetic algorithm (GA) starts with a population of individuals (in our case clusterings of the graph) and evolves the population over several generational cycles (rounds). In each round, the GA uses a selection rule based on the fitness of the individuals of the population to select good individuals and combines them to obtain improved offspring [20]. When an offspring is generated an eviction rule is used to select a member of the population to be replaced by the new offspring. For an evolutionary algorithm it is of major importance to preserve diversity in the population [5], i.e., the individuals should not become too similar in order to avoid a premature convergence of the algorithm. This is usually achieved by using mutation operations and by using eviction rules that take similarity of individuals into account. In this paper, we present a general memetic algorithm, VieClus (Vienna Graph Clustering), to tackle the graph clustering problem. This algorithm can be adapted to optimize different objective functions simply by using a local search algorithm that optimizes the objective function desired by the user. A key component of our contribution are natural recombine operators that employ ensemble clusterings as well as multi-level techniques. In machine learning, ensemble methods combine multiple weak classification (or clustering) algorithms to obtain a strong algorithm for classification (or clustering). More precisely, given a number of clusterings, the overlay/ensemble clustering is a clustering in which two vertices belong to the same cluster if and only if they belong to the same cluster in each of the input clusterings. Our recombination operators use the overlay of two clusterings from the population to decide whether pairs of vertices should belong to the same cluster [33, 42]. This is combined with a local search algorithm to find further improvements and also embedded into a multi-level algorithm to find even better clusterings. Our general principle is to randomize tie-breaking whenever possible. This diversifies the search and also improves solutions. Lastly, we combine these techniques with a scalable communication protocol, producing a system that is able to compute high-quality solutions in a short amount of time. In our experimental evaluation, we show that our algorithm successfully improves or reproduces all entries of the 10th DIMACS implementation challenge under consideration in a small amount of time. In fact, for most of the small instances, we can improve the old benchmark result in less than a minute. Moreover, while the previous best result for different instances has been computed by a variety of solvers, our algorithm can now be used as a single tool to compute the result. S. Biedermann et. al. 2 2.1 Preliminaries Basic Concepts Let G = (V = {0, . . . , n − 1}, E) be an undirected graph and N (v) := {u : {v, u} ∈ E} denote the neighbors of v. The degree of a vertex v is d(v) := |N (v)|. The problem that we tackle in this paper is the graph clustering problem. A clustering C is a partition of the set of vertices, i.e. a set of disjoint blocks/clusters of vertices V1 ,. . . ,Vk such that V1 ∪ · · · ∪ Vk = V . However, k is usually not given in advance. A size-constrained clustering constrains the size of the blocks of a clustering by a given upper bound U . A clustering is trivial if there is only one block, or all clusters/blocks contain only one element, i.e., are singletons. We identify a cluster Vi with its node-induced subgraph of G. The set E(C) := E ∩ (∪i Vi × Vi ) is the set of intra-cluster edges, and E \ E(C) is the set of inter-cluster edges. We set |E(C)| =: m(C) and |E\E(C)| =: m(C). An edge running between two blocks is called cut edge. There are different objective functions that are optimized in the literature. We review some of them in Section 2.3. Our main focus in this work is on modularity. However, our algorithm can be generalized to optimize other objective functions. The graph partitioning problem is also looking for a partition of the vertices. Here, a balancing constraint demands that all blocks have weight |Vi | ≤ (1 + )d |Vk | e =: Lmax for some imbalance parameter . A vertex is a boundary vertex if it is incident to a vertex in a different block. The objective is to minimize S the total cut ω(E ∩ i<j Vi × Vj ). In general, our input graphs G have unit edge weights and vertex weights. However, even those will be translated into weighted problems in the course of a multi-level algorithm. In order to avoid tedious notation, G will denote the current state of the graph before and after a (un)contraction in the multi-level scheme throughout this paper. 2.2 Ensemble/Overlay Clusterings In machine learning, ensemble methods combine multiple weak classification algorithms to obtain a strong classifier. These base clusterings are used to decide whether pairs of vertices should belong to the same cluster [33, 43]. Given two clusterings, the overlay clustering is a clustering in which two vertices belong to the same cluster if and only if they belong to the same cluster in each of the input clusterings. More precisely, given two clusterings C1 and C2 the overlay clustering is the clustering where each block corresponds to a connected component of the graph GE = (V, E\E) where E is the union of the cut edges of C1 and C2 , i.e. all edges that run between blocks in either C1 or C2 . Intuitively, if the input clusters agree that two vertices belong to the same cluster, the two vertices belong together with high confidence. It is easy to see that the number of clusters in the overlay clustering cannot be smaller than the number of clusters in each of the input clusterings. An overlay clustering can be computed in expected linear-time. More precisely, given two clusterings {C1 , C2 }, we use the following approach to compute the overlay clustering. Initially, the overlay clustering O is set to the clustering C1 . We then iterate through the remaining clusterings and incrementally update the current solution O. To this end, we use pairs of cluster IDs (i, j) as a key in a hash map H, where i is a cluster ID of O and j is a cluster ID of the current clustering C. We initialize H to be the empty hashmap and set a counter c to zero. Then we iterate through the nodes. Let v be the current node. If the pair (O[v], C[v]) is not contained in H, we set H(O[v], C[v]) to c and increment c by one. Afterwards, we update the cluster ID of v in O to be H(O[v], C[v]). At the end of the algorithm, c is equal to the number of clusters contained in the overlay clustering and each vertex is labeled with its cluster ID in O. XX:3 XX:4 Memetic Graph Clustering 2.3 Objective Functions There are a variety of measures used to assess the quality of a clustering, such as coverage [10], performance [45], inter-cluster conductance [23], surprise [3], map equation [37] and modularity [32]. The most simple index realizing a traditional measure of clustering quality is coverage. The coverage of a graph clustering C is defined as the fraction of intra-cluster edges within the complete set of edges cov(C) := m(C) m . Intuitively, large values of coverage correspond to a good quality of a clustering. However, one principal drawback of coverage is that the converse is not necessarily true: coverage takes its largest value of 1 in the trivial case where there is only one cluster. Modularity fixes this issue by comparing the coverage of a clustering to the same value after rearranging edges randomly. Performance is the fraction of correctly classified vertex pairs, w.r.t the set of edges. Inter-cluster conductance returns the worst (i.e. the thickest) bottleneck created by separating a cluster from the rest of the graph. Surprise measures the probability that a random graph R has more intra-cluster edges. Map equation is a flow-based and information-theoretic method to assess clustering quality. Our focus in this work is on modularity as it is a widely accepted quality function and has been the main objective function in the 10th DIMACS implementation challenge [7]. For further discussions of these indices we refer the reader to the given references, and simply state the formal definition of modularity here: !2 1 X X m(C) − d(v) Q(C) := cov(C) − E[cov(C)] = m 4m2 Vi ∈C 2.4 v∈Vi Related Work This paper is a summary and extension of the bachelor’s thesis by Sonja Biedermann [8]. There has been a significant amount of research on graph clustering. We refer the reader to [19, 22] for thorough reviews of the results in this area. Here, we focus on results closely related to our main contributions. It is common knowledge that there is no single best strategy for graph clustering. Moreover, most quality indices for graph clusterings have turned out to be NP-hard to optimize and rather resilient to effective approximations, see e.g. [4, 11, 46], allowing only heuristic approaches for optimization. Other approaches often rely on specific strategies with high running times, e.g. the iterative removal of central edges [32], or the direct identification of dense subgraphs [15]. Provably good methods with a decent running time include algorithms that have a spectral embedding of the vertices as the basis for a geometric clustering [12], min-cut tree clustering [18], a technique which guarantees certain bounds on bottlenecks and an approach which relies on random walks in graphs staying inside dense regions with high probabilities [45]. The Louvain method is a multi-level clustering algorithm introduced by Blondel et al. [9] that optimizes modularity as an objective function. As we use this method in our algorithm to create the initial population as well as to improve individuals after recombination, we go into more detail for that method in Section 2.6. Recently, the 10th DIMACS challenge on graph partitioning and graph clustering compared different state-of-the-art graph clustering algorithms w.r.t optimizing modularity [6]. Most of the best results have been obtained by Ovelgönne and Geyer-Schulz [33] as well as Aloise et al. [2]. CGGC [33] used an ensemble learning strategy during the challenge. From several weak clusterings an overlap clustering is computed and a more expensive clustering algorithm is applied. VNS [2] applies the Variable Neighborhood Search heuristic to the graph clustering problem. Later, Džamić et al. [17] outperformed VNS by proposing an ascent-decent VNS. We compare ourselves to the results above in Section 4. S. Biedermann et. al. Evolutionary Graph Clustering. Tasgin and Bingol [44] introduce a genetic algorithm using modularity as a quality measure. They chose an integer encoding for representing the population clusterings. Individuals are randomly initialized, with some bias for assigning direct neighbors to the same cluster. Recombination is done one way, i.e. instead of using mutual exchange, clusters are transferred from a source individual to a target individual. More precisely, the operation picks a random vertex in the source individual and clusters all vertices of its cluster together in the destination individual. This is repeated several times in one recombination operation. As for mutation, the authors chose to pick one vertex and move it to a random cluster, which is almost guaranteed to decrease the fitness. This approach does not use local search to improve individuals. A mutation-less agglomerative hierarchical genetic algorithm is presented by Lipczak and Milios in [26]. The authors represent each cluster as one individual and use one-point and uniform crossovers in that representation. Two synthetic networks have been used for the experimental evaluation. An important advantage of this algorithm is the possibility to distribute its computations. 2.5 Karlsruhe High-Quality Partitioning Within this work, we use the open source multi-level graph partitioning framework KaHIP [40] (Karlsruhe High-Quality Partitioning). More precisely, we employ partitioning tools contained therein to create high-quality partitions of the graphs. We shortly outline its main components. KaHIP implements many different algorithms, for example, flow-based methods and more-localized local searches within a multi-level framework, as well as several coarse-grained parallel and sequential meta-heuristics. Recently, specialized methods to partition social networks and web graphs have been included in the framework [29]. 2.6 Multi-level Louvain Method The Louvain method is a multi-level clustering algorithm introduced by Blondel et al. [9]. It is an approach to graph clustering that optimizes modularity as an objective function. Since we instantiate our memetic algorithm to optimize for modularity, we give more detail in order to be self-contained. The algorithm is organized in two phases: a local movement phase and contraction/uncontraction phase. The first phase, local movement, works in rounds and is done as follows: In the beginning, each vertex is a singleton cluster. Vertices are then traversed in random order and always moved to the neighboring cluster yielding the highest modularity increase. Computing the best move can be done in time proportional to the degree of a vertex by storing cumulative vertex degrees of clusters. More precisely, the gain in modularity by removing a vertex from a cluster can be computed by P P (d(u) + v∈C d(v))2 d(u) ( v∈C d(v))2 s + + − . ∆Q(u) = m 4m2 4m2 4m2 A similar formula holds when adding a singleton vertex to a cluster. Once a vertex is moved, the cumulated degrees of the affected clusters are updated. Hence, the best move can be found in time proportional to the degree of a vertex. The local movement algorithm stops when a local maximum of the modularity is attained, that is when no vertex move a yields modularity gain. The second phase of the algorithm consists in contracting the clustering. Contracting the clustering works as follows: each block of the clustering is contracted into a single node. There is an edge between two vertices u and v in the contracted graph if the two corresponding blocks in the clustering are adjacent to each other in G, i.e. block u and XX:5 XX:6 Memetic Graph Clustering block v are connected by at least one edge. The weight of an edge (A, B) is set to the sum of the weight of the edges that run between block A and block B of the clustering. Moreover, a self-loop is inserted for each vertex in the contracted graph. The weight of this edge is set to be the cumulative weight of the edges in the respective cluster. Note that due to the way the contraction is defined, a clustering of the coarse graph corresponds to a clustering of the finer graph with the same objective. The algorithm then continues with the local movement phase on the contracted graph. In the end, the clustering contractions are undone and at each level local movement improves the current clustering w.r.t. modularity. 3 Memetic Graph Clustering We now explain the components of our memetic graph clustering algorithm. Our algorithm starts with a population of individuals (in our case one individual is a clustering of the graph) and evolves the population into different populations over several rounds. In each round, the EA uses a selection rule based on the fitness of the individuals (in our case the objective function of the clustering problem under consideration) of the population to select good individuals and recombine them to obtain improved offspring. Our selection process is based on the tournament selection rule [30], i.e. C is the fittest out of two random individuals R1 , R2 from the population. When an offspring is generated an elimination rule is used to select a member of the population and replace it with the new offspring. In general, one has to take both into consideration, the fitness of an individual and the distance between individuals in the population [35] in order to avoid premature convergence of the algorithm. We evict the solution that is most similar with respect to the edges that run in between clusters with the offspring among those individuals in the population that have a worse or equal objective than the offspring itself. If there is no such individual, then the offspring is rejected and not inserted into the population. The difference between two individuals is defined as the size of the symmetric difference between their sets of cut edges. Our algorithm generates only one offspring per generation. The core of our algorithm are our novel recombination and mutation operations. We provide two different kinds of operations, flat- and multi-level recombination operations. We also define a mutation operator that splits clusters by employing graph partitioning techniques. In any case, the offspring is typically improved using a local search algorithm that optimizes for the objective function of the graph clustering problem. We continue this section by explaining the details of our algorithm with a focus on modularity—the results are transferable to other clustering problems by using local search algorithms that optimize the objective function of the problem under consideration. 3.1 Initialization/Creating Individuals We initialize our population using the following modified Louvain algorithm. We also use the following algorithm to create an individual in recombine and mutation operations. Depending on the objective of the evolutionary algorithm, the choice of algorithms to initialize the population may be different. We describe our scheme for modularity. We mainly use the Louvain method to create clusterings. Due to the non-deterministic nature of this algorithm—the order of nodes visited is randomized—we obtain different initial graph clusterings and later on individuals. In order to introduce more diversification, we modify the approach by using a different coarsening strategy based on the size-constrained label propagation algorithm [29]. Label propagation works similar to the local movement phase of the Louvain method. However, the objective of the algorithm is different. Without S. Biedermann et. al. size-constraints, it was proposed by Raghavan et al. [36]. Initially, each vertex is in its own cluster/block, i.e. the initial block ID of a vertex is set to its vertex ID. The algorithm then works in rounds. In each round, the vertices of the graph are traversed in a random order. When a vertex v is visited, it is moved to the block that has the strongest connection to v, i.e. it is moved to the cluster Vi that maximizes ω({(v, u) | u ∈ N (v) ∩ Vi }) whilst not overloading the target cluster w.r.t to the size-constraint bound U . Ties are broken randomly. The process is repeated until the process has converged. Here, we perform at most ` rounds of the algorithm, where ` is a tuning parameter, and stop the algorithm if less than five percent of the vertices changed its cluster during one round. One LPA round can be implemented to run in O(n + m) time. We modify the coarsening stage of the Louvain method using size-constrained label propagation as follows: For the first λ ∈rnd [0, 4] levels of the multi-level hierarchy we use size-constraint label propagation to compute the clustering to be contracted instead of the local movement phase to compute a clustering. We choose U ∈rnd [n/10, n] in the beginning of the multi-level algorithm. Afterwards, we switch to the local movement phase of the Louvain method to compute a clustering to be contracted. Note that for λ = 0 the method is the Louvain method. In any case, in the uncoarsening phase local movement improves the current clustering by optimizing modularity. 3.2 Recombination We define flat- and multi-level recombination operations which we are going to explain now. Both operations use the notion of overlay clustering to pass on good parts of the solutions to the offspring. Some of our recombination operators ensure that the offspring has nondecreasing fitness. Moreover, our recombine operations can recombine a solution from the population with an arbitrary clustering of the graph. Due to the fact that our local search and multi-level algorithms are randomized, a recombine operation performed twice using the same parents can yield different offsprings. Flat Recombination The basic flat recombination operation starts by taking two clusterings C1 , C2 from the population as input and computes its overlay. The overlay is then contracted such that vertices represent blocks in the overlay clustering and edges represent edges between vertices of two blocks. Edge weights are equal to the summed weight of the edges that run between the respective blocks, and self-loops are inserted with the edge weight being equal to the summed internal edge weight of that corresponding block. Note that due to the way contraction is defined, a clustering of the contracted graph can be transformed into a clustering of the input network having the same modularity score. Hence, we use the Louvain method to cluster the contracted graph, which then constitutes the offspring. Also, note that the contraction of the overlay ensures that vertices that are clustered together in both inputs will belong to the same cluster in the offspring. Only vertices which are split by one of the input clusterings will be affected by the Louvain method. What follows are multiple variations of the basic flat recombination method that ensure non-decreased fitness of the input individual, i.e. the offspring has fitness at least as good as the better input individual. Apply Input Clustering. This operator uses the better of the two parent clusterings as a starting point for the Louvain method on the contracted graph. Due to the way contraction is defined the objective function of the starting point on the contracted graph is the same as of the corresponding clustering on the input network. The resulting offspring can be XX:7 XX:8 Memetic Graph Clustering expected to be less diverse than when using the plain recombination operator, but may significantly more improve upon the parent. Cluster-/Partition Recombination. This operator differs from the previous two operators insofar that only one of the parents is selected from the population. The other parent is manufactured on the spot by running either the size-constrained label propagation (SCLP) or a graph partitioning algorithm on the input graph. The resulting clustering can be very different from to the other parent. This introduces more diversification which helps local search to explore a larger search space. When using SCLP clustering for the recombination, we use the parameters as described in Section 3.1. When using a partition, we use the KaHIP graph partitioning framework with the fastsocial preconfiguration using k ∈rnd [2, 64] and  ∈rnd [0.03, 0.5]. Multi-level Recombination We now explain our multi-level recombine operator. This recombine operator also ensures that the solution quality of the offspring is at least as good as the best of both parents. For our recombine operator, let C1 and C2 again be two individuals from the population. Both individuals are used as input for the multi-level Louvain method in the following sense. Let E be the set of edges that are cut edges, i.e. edges that run between two blocks, in either C1 or C2 . All edges in E are blocked during the coarsening phase, i.e. they are not contracted during the coarsening phase. In other words, these edges cannot be contracted during the multi-level scheme. We ensure this by modifying the local movement phase of the Louvain method, i.e. clusters can only grow inside connected components of the overlay (V, E\E). We stop contracting clusterings when no contractable edge is left. When coarsening is stopped, we then apply the better out of both input individuals w.r.t. the objective to the coarsest graph and use this as initial clustering instead of running the Louvain method on the coarsest graph. However, during uncoarsening local search still optimizes modularity on each level of the hierarchy. Note that this is possible since we did not contract any cut edge of both inputs. Also, note that this way we obtain a clustering of the coarse graph having a modularity score being equal to the better of both input individuals. Local movement guarantees no worsening of the clustering. Hence, the offspring is at least as good as the best input individual. Note that the coarsest graph is the same as the graph obtained in a flat recombination. However, the operation now is able to pass on good parts of the solution on multi-levels of the hierarchy during uncoarsening and hence has a more fine-grained view on both individuals. 3.3 Mutation Our recombination operators can only decrease the number of clusters present in the solution. To counteract this behavior, we define a mutation operator that selects a subset of clusters and splits each of them in half. Splitting is done using the KaHIP graph partitioning framework. The number of clusters to be split is set to ps |C| where ps is the splitting probability and |C| is the number of clusters that the clustering selected from the population has. That means that we split a cluster into two balanced blocks such that there are only a small amount of edges running between them. We do this operation with two individuals from the population that are found by tournament selection. This results in two output individuals which are used as input to a multi-level recombination operation. The computed offspring of that operation is then inserted into the population as described above. S. Biedermann et. al. 3.4 Parallelization We now explain the island-based parallelization that we use. We use a parallelization scheme that has been successfully used in graph partitioning [39]. Each processing element (PE) basically performs the same operations using different random seeds. First, we estimate the population size S: each PE creates an individual and measures the time t spent. We then choose S such that the time for creating S clusterings is approximately ttotal /c where the fraction c is a tuning parameter and ttotal is the total running time that the algorithm is given to produce a clustering of the graph. The minimum amount of individuals in the population is set to 3, the maximum amount of the individuals in the population is set to 100. The lower bound on the population size is chosen to ensure a certain minimum of diversity, while the upper bound is used to ensure convergence. Each PE then builds its own population. Afterwards, the algorithm proceeds in rounds as long as time is left. Either a mutation or recombination operation is performed. Our communication protocol is similar to randomized rumor spreading which has shown to be scalable in previous work [39]. Let p denote the number of PEs used. A communication step is organized in rounds. In each round, a PE chooses a communication partner and sends her the currently best individual C of the local population. The selection of the communication partner is done uniformly at random among those PEs to which C not already has been sent to. Afterwards, a PE checks if there are incoming individuals and if so inserts them into the local population using the elimination strategy described above. If the best local individual has changed, all PEs are again eligible. This is repeated log p times. The algorithm is implemented completely asynchronously, i.e. there is no need for a global synchronization. 4 Experimental Evaluation System and Methodology We implemented the memetic algorithm described in the previous section within the KaHIP (Karlsruhe High Quality Partitioning) framework. The code is written in C++ and MPI. It has been compiled using g++-5.2 with flags -O3 and OpenMPI 1.6.5. We refer to the algorithm presented in this paper as VieClus. We plan to further improve the code and then to release it to make it available to a larger audience. Throughout this section, our main objective is modularity. All experiments comparing VieClus with competing algorithms are performed on a cluster with 512 nodes, where each node has two Intel Xeon E5-2670 Octa-Core (Sandy Bridge) processors clocked at 2.6 GHz, 64 GB main memory, 20 MB L3and 8x256 KB L2-Cache and runs RHEL 7.4. We use the arithmetic mean when averaging over solutions of the same instance and the geometric mean when averaging over different instances in order to give every instance a comparable influence on the final result. It is well known that the algorithms that scored most of the points during the 10th DIMACS challenge compute better results than the Louvain method. Moreover, LaSalle [25] reports results for his Nerstrand algorithm that are on average equal or slightly better than the Louvain method on the instances used here, but the best results of this method are consistently worse than the result computed during the DIMACS challenge. Hence, we refrain from doing additional experiments with the Louvain method. XX:9 XX:10 Memetic Graph Clustering Table 1 Results of our algorithm on the benchmark test set. Columns from left to right: average modularity achieved by our algorithm, t average time in minutes needed to beat the old challenge result, the best score computed of our algorithm, the best modularity scores achieved by challenge participants, running time in minutes needed to create the previous best entry according to [25] and reference to the solver that achieved the result during the 10th DIMACS challenge. Entries that improve or reproduce the result of the implementation challenge are highlighted. Graph Avg. Q as-22july06 astro-ph celegans_metabol cond-mat-2005 email PGPgiantcompo polblogs power smallworld memplus G_n_pin_pout caidaRouterLevel rgg_n17 luxembourg.osm 0,679 391 0,746 285 0,453 248 0,750 065 0,582 829 0,886 853 0,427 105 0,940 975 0,793 186 0,701 242 0,500 457 0,872 804 0,978 448 0,989 665 coAuthorsCiteseer citationCiteseer coPapersDBLP belgium.osm ldoor eu-2005 in-2004 333SP prefAttachment 0,906 804 0,825 518 0,868 019 0,995 062 0,970 521 0,941 575 0,980 684 0,989 316 0,315 843 t [m] Small <1 <1 <1 <1 <1 <1 <1 <1 <1 2,6 3,9 5,0 5,0 7,3 Large 3,9 12,9 20,5 29,5 35,1 65,8 237,4 297,1 * Max. Q Instances 0,679 396 0,746 292 0,453 248 0,750 171 0,582 829 0,886 853 0,427 105 0,940 977 0,793 187 0,701 275 0,500 466 0,872 828 0,978 454 0,989 672 Instances 0,906 830 0,825 545 0,868 058 0,995 064 0,970 555 0,941 575 0,980 690 0,989 356 0,316 089 Q [7] tsol [m] Solver 0,678 267 0,744 621 0,453 248 0,746 254 0,582 829 0,886 564 0,427 105 0,940 851 0,793 042 0,700 473 0,500 098 0,872 042 0,978 324 0,989 621 6,6 11,9 <1 40,9 <1 1,9 <1 <1 16,8 3,2 64,8 81,0 37,5 40,9 CGGC[33] VNS[2] VNS[2] CGGC[33] VNS[2] CGGC[33] VNS[2] VNS[2] VNS[2] CGGC[33] CGGC[33] CGGC[33] VNS[2] VNS[2] 0,905 297 0,823 930 0,866 794 0,994 940 0,969 370 0,941 554 0,980 622 0,989 095 0,315 994 91,3 77,6 603,3 102,9 485,6 341,5 244,0 976,9 1 353,1 CGGC[33] CGGC[33] CGGC[33] CGGC[33] ParMod[13] CGGC[33] CGGC[33] ParMod[13] VNS[2] Parameters We did not perform a tuning of the parameters of the algorithm, rather we chose the parameters described above and below to be reasonable and to introduce a large amount of diversification or we chose parameters that were a good choice in previous evolutionary algorithms [39]. As we our main design goal is to introduce as much diversification as possible, we use all recombination and mutation operations in our algorithm. The ratio of mutation to recombine operations has been set to 1:9 as this has been a good choice in previous evolutionary algorithms [39]. When we perform a recombine operation, we pick the recombine operation uniformly at random and diversify the parameters as described above. When performing a mutation operation, we use a splitting probability ps uniformly at random in [0.01, 0.1]. We invest 1/10 of the total time to create the initial population. Instances We use the graphs that have been used for the 10th DIMACS implementation challenge on graph clustering and graph partitioning [7]. A list of the instances as well as the modularity scores that have been obtained during the challenge can be found in Table 1. We exclude the instances cage15, audikw1, er-fact1.5-scale25, kron_*, uk-2002, uk-2007-05 from the challenge testbed in our evaluation, because they are either too large to be feasible for an evolutionary algorithm or they do not contain a significant cluster structure as indicated by the reported modularity score [6]. S. Biedermann et. al. 4.1 Evolutionary Graph Clustering We now run our algorithm on all the DIMACS instances under consideration using the rules used there, i.e. running time is not an issue but we want to achieve modularity values as large as possible for each instance. On the small instances, we give our algorithm 2 hours of time to compute a solution and on the large instances, we set the time limit to 16 hours. In any case, we use 16 cores of our machine, i.e. one node of the machine. We perform the test five times with different random seeds. Table 1 summaries the results of our experiment, and Figure 1 shows convergence plots for a selected subset of the instances. First of all, on every instance under consideration, our algorithm is able to compute a result that is better than the currently reported modularity value in literature. More precisely, in 98 out of 115 runs of our algorithm, the previous benchmark result of the 10th DIMACS implementation challenge is outperformed. In further 15 out of 115 runs, we reproduce the results. This is the case for each of the runs for the graphs celegans_metabolic, email and polblogs. The two cases in which our algorithm does not beat the previous best solver, are 2 runs on the graph prefAttachment. The other 3 runs on that graph outperform the previous result. The time needed to compute a clustering having a similar score on that graph is roughly 95% of the total running time. Moreover, as the convergence plots in Figure 1 show this may be fixable by giving the algorithm a larger amount of time to compute the solution. Overall, the time needed to outperform the previous benchmark results ranges from less than a minute to a couple of minutes on the small instances. On the large instances our algorithm needs more time, but on most instances, the previous benchmark result can be computed in roughly an hour. Table 1 also reports the running time of the solver that obtained the result during the DIMACS challenge. Our algorithm is faster in every case compared to the previous solver (eventually by more than an order of magnitude), however, the machines used for the experiment are different and our algorithm is a parallel algorithm whereas previous solvers are sequential. Note that the final improvements over the old result are fairly small (<0.1% on average). This is not surprising, as previous solvers already invested a large amount of time to compute the results. However, note that the previous result has been computed by different solvers and our evolutionary algorithm can be seen as a single tool to compute the result. We now compare the results with recently published results [25, 21, 27, 38]. LaSalle [25] reports results on all graphs from the DIMACS challenge subset. However, each of the best computed result is worse than the result computed by the respective best algorithm during the DIMACS challenge (and hence worse compared to our algorithm). Moreover, LaSalle [25] reports that his Nerstrand algorithm is on average equal or slightly better than the Louvain method on the instances used here. Lu et al. [27] present a result for coPapersDBLP (Q = 0,858 088) and Ryu and Kim [38] report modularity for email (Q = 0,568) which are worse compared to the results that we report here. Hamann et al. [21] report the result for in-2004 (Q = 0,980) which is comparable to the result that we report here. Džamić [17] build upon VNS proposing an ascent-decent VNS. Results are reported for celegans_metabolic (Q = 0.453248), email (Q = 0,582 829), polblogs (Q = 0,427 105) for which their algorithm computes the same results as all other tools reported in Table 1. Moreover, the following best results are reported as-22july06 (Q = 0,678 381), astro-ph (Q = 0,745 246), cond-mat-2005 (Q = 0,747 181), PGPgiantcompo (Q = 0.886647), as well as power (Q = 0.940974) which are indeed better than the previous best result obtained during the 10th DIMACS challenge, but still worse than average result of our algorithm in every case. Hence, overall we consider our algorithm as a new state-of-the-art heuristic for solving the modularity clustering problem. XX:11 Memetic Graph Clustering 100 10000 50 0.7925 10000 0.9884 0.9890 333SP mean modularity belgium.osm 500 10000 VieClus Challenge Result 20 200 2000 50000 time t[s] ldoor preferentialAttachment 5000 time t[s] 0.28 100 0.30 time t[s] mean modularity 0.9945 10 100 time t[s] VieClus Challenge Result 10 1 time t[s] VieClus Challenge Result 5 VieClus Challenge Result 0.7910 10 smallworld mean modularity 0.87 0.85 1 0.9948 0.83 VieClus Challenge Result 0.966 0.960 mean modularity mean modularity caidaRouterLevel mean modularity XX:12 VieClus Challenge Result 1 10 1000 time t[s] Figure 1 Convergence plots for the instances the small instances caidaRouterLevel, smallworld and the large instances 333SP, belgium.osm, ldoor, preferentialAttachment. S. Biedermann et. al. Convergence Plots. We are now interested in how solution quality evolves over time. We start by explaining how to compute the data for a single instance I, i.e., a clustering of a graph G. Whenever an algorithm computes a clustering that improves the modularity score, it reports a pair (t, Q), where the timestamp t is the currently elapsed time and Q is the modularity score of the currently reported solution. For r repetitions with different seeds s, these r sequences TsI of pairs are merged into one sequence T I of triples (t, s, Q), which is sorted by the timestamp t. Since we are interested in the evolution of the solution I representing event-based average values. We start by quality, we compute the sequence Tmax computing the average objective value Q and the average time t using the first pair (t, Q) of I all r sequences TsI and insert (t, Q) into Tmax . We then sweep through the remaining entries I (t, s, Q) of T . Each entry corresponds to a clustering computed at timestamp t using seed s that improved the solution quality to Q. For each entry we replace the old objective value of seed s that took part in the computation of Q with the new value Q, recompute Q and I I . Tmax therefore represents the evolution of the average insert a new pair (t, Q) into Tmax solution quality Q for instance I over time. We present those plots for a selected set of instances in Figure 1. In the plots one can see that solution quality levels off in the beginning. At this point, the algorithm is still in the initialization phase, where the population is built using repeated runs of the Louvain method with different coarsening strategies. However, this is not enough to find significantly improved solutions. Afterwards, solution quality improves rapidly as the actual evolutionary operations run. 5 Conclusion We presented a parallel memetic algorithm, VieClus, that tackles the graph clustering problem. A key component of our contribution are natural recombine operators that employ ensemble clusterings as well as multi-level techniques. We combine these techniques with a scalable communication protocol, producing a system that is able to reproduce or improve previous all entries of the 10th DIMACS implementation challenge under consideration as well as results recently reported in the literature in a short amount of time. Moreover, while the previous best result for different instances has been computed by a variety of solvers, our algorithm can now be used as a single tool to compute the result. Hence, overall we consider our algorithm as a new state-of-the-art heuristic for solving the modularity clustering problem. Considering the good results of our algorithm, we want to further improve and release it. In the future, it may be interesting to instantiate our scheme for different objective functions depending on the application domain or to use a more diverse set of initial solvers to create the population. We also want to look at distributed memory parallel multi-level algorithms for the problem that can use the depicted algorithm as an initial clustering scheme on the coarsest level of the hierarchy. Acknowledgements The research leading to these results has received funding from the European Research Council under the European Community’s Seventh Framework Programme (FP7/2007-2013) /ERC grant agreement No. 340506. XX:13 XX:14 Memetic Graph Clustering References 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 L. Akoglu, H. Tong, and D. Koutra. Graph Based Anomaly Detection and Description: A Survey. Data Min. Knowl. Discov., 29(3):626–688, May 2015. URL: http://dx.doi.org/ 10.1007/s10618-014-0365-y, doi:10.1007/s10618-014-0365-y. D. Aloise, G. Caporossi, S. Perron, P. Hansen, L. Liberti, and M. Ruiz. Modularity Maximization in Networks by Variable Neighborhood Search. In 10th DIMACS Impl. Challenge Workshop. Georgia Inst. of Technology, Atlanta, GA, 2012. V. Arnau, S. Mars, and I. Marín. Iterative Cluster Analysis of Protein Interaction Data. Bioinformatics, 21(3):364–378, 2004. G. Ausiello, P. Crescenzi, G. Gambosi, V. Kann, A. Marchetti-Spaccamela, and M. Protasi. Complexity and Approximation: Combinatorial Optimization Problems and their Approximability Properties. Springer Science & Business Media, 2012. T. Bäck. Evolutionary Algorithms in Theory and Practice: Evolution Strategies, Evolutionary Programming, Genetic Algorithms. PhD thesis, 1996. D. Bader, A. Kappes, H. Meyerhenke, P. Sanders, C. Schulz, and D. Wagner. Benchmarking for Graph Clustering and Partitioning. In Encyclopedia of Social Network Analysis and Mining. Springer, 2014. D. Bader, H. Meyerhenke, P. Sanders, and D. Wagner, editors. Proc. of the 10th DIMACS Impl. Challenge, Cont. Mathematics. AMS, 2012. S. Biedermann. Evolutionary Graph Clustering. Bachelor’s Thesis, Universität Wien, 2017. V. D. Blondel, J.-L. Guillaume, R. Lambiotte, and E. Lefebvre. Fast Unfolding of Communities in Large Networks. Journal of Statistical Mechanics: Theory and Experiment, 2008(10):P10008, 2008. URL: http://stacks.iop.org/1742-5468/2008/i=10/a= P10008. U. Brandes. Network Analysis: Methodological Foundations, volume 3418. Springer Science & Business Media, 2005. U. Brandes, D. Delling, M. Gaertler, R. Gorke, M. Hoefer, Z. Nikoloski, and D. Wagner. On Modularity Clustering. IEEE Transactions on Knowledge and Data Engineering, 20(2):172– 188, 2008. U. Brandes, M. Gaertler, and D. Wagner. Engineering Graph Clustering: Models and Experimental Evaluation. ACM Journal of Experimental Algorithmics, 12(1.1):1–26, 2007. Ü. V. Çatalyürek, K. Kaya, J. Langguth, and B. Uçar. A Divisive Clustering Technique for Maximizing the Modularity. In 10th DIMACS Impl. Challenge Workshop. Georgia Inst. of Technology, Atlanta, GA, 2012. J. Demme and S. Sethumadhavan. Approximate Graph Clustering for Program Characterization. ACM Trans. Archit. Code Optim., 8(4):21:1–21:21, January 2012. URL: http://doi.acm.org/10.1145/2086696.2086700, doi:10.1145/2086696.2086700. I. Derényi, G. Palla, and T. Vicsek. Clique Percolation in Random Networks. Physical review letters, 94(16):160202, 2005. A. A. Diwan, S. Rane, S. Seshadri, and S. Sudarshan. Clustering Techniques for Minimizing External Path Length. In Proceedings of the 22th International Conference on Very Large Data Bases, VLDB ’96, pages 342–353, San Francisco, CA, USA, 1996. Morgan Kaufmann Publishers Inc. URL: http://dl.acm.org/citation.cfm?id=645922.673636. D. Džamić, D. Aloise, and N. Mladenović. Ascent–descent Variable Neighborhood Decomposition Search for Community Detection by Modularity Maximization. Annals of Operations Research, Jun 2017. URL: https://doi.org/10.1007/s10479-017-2553-9, doi:10.1007/s10479-017-2553-9. G. W. Flake, R. E. Tarjan, and K. Tsioutsiouliklis. Graph Clustering and Minimum Cut Trees. Internet Mathematics, 1(4):385–408, 2004. S. Fortunato. Community Detection in Graphs. Physics reports, 486(3):75–174, 2010. S. Biedermann et. al. XX:15 20 D. E. Goldberg. Genetic Algorithms in Search, Optimization, and Machine Learning. Addison-Wesley, 1989. 21 M. Hamann, B. Strasser, D. Wagner, and T. Zeitz. Simple Distributed Graph Clustering using Modularity and Map Equation. arXiv preprint arXiv:1710.09605, 2017. 22 T. Hartmann, A. Kappes, and D. Wagner. Clustering Evolving Networks. In Algorithm Engineering, pages 280–329. Springer, 2016. 23 R. Kannan, S. Vempala, and A. Vetta. On clusterings: Good, bad and spectral. Journal of the ACM (JACM), 51(3):497–515, 2004. 24 J. Kim, I. Hwang, Y. H. Kim, and B. R. Moon. Genetic Approaches for Graph Partitioning: A Survey. In Proceedings of the 13th Annual Genetic and Evolutionary Computation Conference (GECCO’11), pages 473–480. ACM, 2011. 25 D. LaSalle. Graph Partitioning, Ordering, and Clustering for Multicore Architectures. 2015. 26 M. Lipczak and E. E. Milios. Agglomerative Genetic Algorithm for Clustering in Social Networks. In Franz Rothlauf, editor, GECCO, pages 1243–1250. ACM, 2009. URL: http: //dblp.uni-trier.de/db/conf/gecco/gecco2009.html#LipczakM09. 27 H. Lu, M. Halappanavar, and A. Kalyanaraman. Parallel heuristics for scalable community detection. Parallel Computing, 47:19–37, 2015. 28 S. McFarling. Program Optimization for Instruction Caches. SIGARCH Comput. Archit. News, 17(2):183–191, April 1989. URL: http://doi.acm.org/10.1145/68182.68200, doi:10.1145/68182.68200. 29 H. Meyerhenke, P. Sanders, and C. Schulz. Partitioning Complex Networks via SizeConstrained Clustering. In SEA, volume 8504 of Lecture Notes in Computer Science, pages 351–363. Springer, 2014. 30 B. L Miller and D. E Goldberg. Genetic Algorithms, Tournament Selection, and the Effects of Noise. Evolutionary Computation, 4(2):113–131, 1996. 31 M. E. J. Newman. 68(2):026121, 2003. 32 M. E. J. Newman and M. Girvan. Finding and Evaluating Community Structure in Networks. Physical review E, 69(2):026113, 2004. 33 M. Ovelgönne and A. Geyer-Schulz. An Ensemble Learning Strategy for Graph Clustering. In Graph Partitioning and Graph Clustering, number 588 in Contemporary Mathematics. 2013. 34 J. B. Pereira-Leal, A. J. Enright, and C. A. Ouzounis. Detection of Functional Modules from Protein Interaction Networks. Proteins: Structure, Function, and Bioinformatics, 54(1):49– 57, 2004. URL: http://dx.doi.org/10.1002/prot.10505, doi:10.1002/prot.10505. 35 D. C. Porumbel, J.-K. Hao, and P. Kuntz. Spacing Memetic Algorithms. In 13th Annual Genetic and Evolutionary Computation Conference, GECCO 2011, Proceedings, Dublin, Ireland, July 12-16, 2011, pages 1061–1068, 2011. 36 U. N. Raghavan, R. Albert, and S. Kumara. Near Linear Time Algorithm to Detect Community Structures in Large-Scale Networks. Physical Review E, 76(3), 2007. 37 M. Rosvall, D. Axelsson, and C. T. Bergstrom. The Map Equation. The European Physical Journal-Special Topics, 178(1):13–23, 2009. 38 S. Ryu and D. Kim. Quick Community Detection of Big Graph Data Using Modified Louvain Algorithm. In High Performance Computing and Communications; IEEE 14th International Conference on Smart City; IEEE 2nd International Conference on Data Science and Systems (HPCC/SmartCity/DSS), 2016 IEEE 18th International Conference on, pages 1442–1445. IEEE, 2016. Properties of Highly Clustered Networks. Physical Review E, XX:16 Memetic Graph Clustering 39 40 41 42 43 44 45 46 47 P. Sanders and C. Schulz. Distributed Evolutionary Graph Partitioning. In Proc. of the 12th Workshop on Algorithm Engineering and Experimentation (ALENEX’12), pages 16– 29, 2012. P. Sanders and C. Schulz. Think Locally, Act Globally: Highly Balanced Graph Partitioning. In 12th International Symposium on Experimental Algorithms (SEA’13). Springer, 2013. S. E. Schaeffer. Survey: Graph Clustering. Comput. Sci. Rev., 1(1):27–64, August 2007. URL: http://dx.doi.org/10.1016/j.cosrev.2007.05.001, doi:10.1016/ j.cosrev.2007.05.001. C. L. Staudt and H. Meyerhenke. Engineering High-Performance Community Detection Heuristics for Massive Graphs. In Proceedings 42nd Conference on Parallel Processing (ICPP’13), 2013. C. L. Staudt and H. Meyerhenke. Engineering Parallel Algorithms for Community Detection in Massive Networks. IEEE Trans. on Parallel and Distributed Systems, 27(1):171–184, 2016. doi:10.1109/TPDS.2015.2390633. M. Tasgin and H. Bingol. Community Detection in Complex Networks using Genetic Algorithm. In ECCS ’06: Proc. of the European Conference on Complex Systems, April 2006. URL: http://arxiv.org/abs/cond-mat/0604419, arXiv:cond-mat/0604419. S. M. Van Dongen. Graph Clustering by Flow Simulation. PhD thesis, 2001. D. Wagner and F. Wagner. Between Min Cut and Graph Bisection. In Proceedings of the 18th International Symposium on Mathematical Foundations of Computer Science, pages 744–750. Springer, 1993. Y. Xu, V. Olman, and D. Xu. Clustering Gene Expression Data using a Graph-Theoretic Approach: an Application of Minimum Spanning Trees. Bioinformatics, 18(4):536–545, 2002. S. Biedermann et. al. A XX:17 Approximate Bound for Modularity The modularity clustering problems seeks to find a clusterings such that cov(C) - E[cov(C)] is maximum. However, the problem is NP-complete and our algorithm heuristically finds solutions. Moreover, modularity is trivially bounded by 1. The true optimum clustering, however, has typically a value below that. Thus we try to find a bound or a value to normalize the score such that one gets a clearer picture on how far away from the optimum score the achieved modularity value is. P To do so, let us define v∈Vi d(v) to be the volume vol(Vi ) of the cluster Vi . Note that P 1 2 have the same volume. But again, the formula 4m 2 Vi ∈C vol(Vi ) is minimized if all clustersP finding the optimum value of this equation is hard. As Vi ∈C vol(Vi ) = 2m, the equation is minimized when vol(Vi )= 2m/k ∀i = 1 . . . k, where k is the number of clusters. Thus it P 1 2m 2 1 1 1 2 follows that 4m 2 Vi ∈C vol(Vi ) ≥ 4m2 · k · ( k ) = k . This gives an upper of 1 − k for Q(C) if the number of clusters is an input to the clustering problem. This upper bound is, however, not very far from the trivial upper bound of 1 for k > 10. Thus for each graph we also clustered the nodes into cluster Vi using the following heuristic to try to balance the volumes of the resulting clusters as much as possible: We sort the nodes in decreasing order of their degree and then assign them step by step to the cluster having the smallest volume. We break ties by using the cluster with the smallest ID among those having the smallest volume. For this heuristic, we use the number of clusters that our algorithm has computed as value for k. For the resulting clustering C ∗ we compute the value E[cov(C ∗ )] and use B := 1 − E[cov(C ∗ )] as a value to normalize Q(C). Table 2 shows the resulting bound and compares them against our results. Table 2 Columns from left to right: the best score computed of our evolutionary algorithm, the approximate bound computed with the heuristic algorithm to balance cluster volumes and the ratio of the two values. Graph as-22july06 astro-ph celegans_metabol cond-mat-2005 email PGPgiantcompo polblogs power smallworld memplus G_n_pin_pout caidaRouterLevel rgg_n17 luxembourg.osm coAuthorsCiteseer citationCiteseer coPapersDBLP belgium.osm ldoor eu-2005 in-2004 333SP prefAttachment Max. Q B Small Instances 0,679 396 0,973 684 0,746 292 0,999 070 0,453 248 0,888 889 0,750 171 0,999 468 0,582 829 0,900 000 0,886 853 0,989 796 0,427 105 0,996 168 0,940 977 0,975 610 0,793 187 0,995 652 0,701 275 0,984 127 0,500 466 0,993 865 0,872 828 0,997 758 0,978 454 0,992 537 0,989 672 0,996 283 Large Instances 0,906 830 0,995 575 0,825 545 0,993 289 0,868 058 0,995 283 0,995 064 0,998 358 0,970 555 0,989 796 0,941 575 0,996 564 0,980 690 0,999 136 0,989 356 0,995 726 0,316 089 0,875 000 Q/B 0,697 758 0,746 987 0,509 904 0,750 570 0,647 588 0,895 996 0,428 748 0,964 501 0,796 651 0,712 586 0,503 555 0,874 789 0,985 811 0,993 364 0,910 861 0,831 123 0,872 172 0,996 701 0,980 561 0,944 821 0,981 538 0,993 603 0,361 245
9cs.NE
arXiv:1705.03597v1 [cs.AI] 10 May 2017 Solving Multi-Objective MDP with Lexicographic Preference: An application to stochastic planning with multiple quantile objective Yan Li1 and Zhaohan Sun2 1 2 School of Mathematics, Georgia Institute of Technology H. Milton Stewart School of Industrial and Systems Engineering, Georgia Institute of Technology Abstract In most common settings of Markov Decision Process (MDP), an agent evaluate a policy based on expectation of (discounted) sum of rewards. However in many applications this criterion might not be suitable from two perspective: first, in risk aversion situation expectation of accumulated rewards is not robust enough, this is the case when distribution of accumulated reward is heavily skewed; another issue is that many applications naturally take several objective into consideration when evaluating a policy, for instance in autonomous driving an agent needs to balance speed and safety when choosing appropriate decision. In this paper, we consider evaluating a policy based on a sequence of quantiles it induces on a set of target states, our idea is to reformulate the original problem into a multi-objective MDP problem with lexicographic preference naturally defined. For computation of finding an optimal policy, we proposed an algorithm FLMDP that could solve general multi-objective MDP with lexicographic reward preference. 1 Introduction The most classical MDP problem consider maximizing a scalar reward’s expectation [3], however in many situation a single scalar objective is not enough to represent an agent’s objective. For example, in self-autonomous driving one need to balance speed and safety [2]. A common approach is to use a weight vector and scalarization function to project the multi-objective function to single objective problem. However in practice it is hard to evaluate and analyze the projected problem since there might be many viable Pareto optimal solutions to the original problem [1]. On the other hand, 1 in some cases, an agent might have explicit preference over the objectives, that is, an agent might expect to optimize the higher priority objective over the lower priority ones when finding optimal policy. For example, in autonomous driving an agent would consider safety the highest priority, placing speed in the second place. Several previous studies have considered such multi-objective problem with lexicographical order. Using a technique called Ordinal dynamic programming, Mitten [5] assumed a specific preference ordering over outcomes for a finite horizon MDP; Sobel [7] extended this model to infinite horizon MDPs. Ordinal dynamic programming has been explored under reinforcement learning. Wray et.al [2] also consider a more general setting when lexicographical order depends on initial state and slack for higher objective value is allowed for improvement over lower priority objective. In their paper they proposed an algorithm called LVI that tries to approximate optimal policy in infinite horizon setting, although work empirically well, the algorithm lacks theoretical guarantee, in fact, the performance could be arbitrarily worse if the MDP is adversarially designed. Even in the setting that an agent indeed has only one reward, the expectation of accumulated reward is not always suitable. This is the case when the agent is risk aversion, for instance in financial market an institutional fund would like to design an auto-trading system that maximize certain lower quantile. The essential idea of such strategy is to improve the worst case situation as much as possible. Based on this motivation, Hugo and Weng [8] proposed quantile based reinforcement learning algorithm which seeks to optimize certain lower/upper quantile on the random outcome. In their paper they define a set of end states in finite horizon setting, let Pπ (·) be the probability distribution induced by policy π on the end states, they seek to find the optimal policy in the sense that the τ -lower quantile of Pπ (·) is maximized. Note that their objective could be improved by following observation: 1. Among all the policy that achieve the optimal τ -lower quantile, a refined class of policy could be chosen in the sense that following such policy, the probability of ending at a state the is less preferable than the optimal quantile state is minimized. 2. Suppose τ1 < τ2 , then after finding policy class that maximize τ1 -quantile, one can further find policy that maximize τ2 -quantile in this policy class. For situation when multiple τi -quantile are to be optimized, we can find optimal policy by repeating the same procedure iteratively. In general, if τ1 < τ2 < . . . < τL are in consideration, we have a multi-quantileobjective MDP, in this paper, we showed a proper way to transfer this problem into a pure multi-objective MDP with lexicographic preference. To tackle computation of an optimal policy, we will introduce an algorithm called FLMDP that not only solve our multi-quantile-objective MDP, but also generalize multi-objective MDP with finite states, action, and horizon. Generalization to infinite states or actions to find ǫ-optimal policy could be done fairly easy with small modification in our algorithm. 2 2 Problem Definition We consider finite horizon problem here, a multi-objective Markov Decision Process is described by a tuple (S, A, P, R) where: • S is finite state space. • A is finite action space. • G is finite end state space. • T is finite horizon. • P is transition function given by: P (s, a, s′ ) = P(s′ |s, a), i.e., the probability of transiting from s to s′ after performing action a. • R = [R1 , R2 , . . . , Rk ] is reward vector, with each component Ri (s, a, s′ ) defining reward of starting from state s, performing action a and transit to state s′ . Without loss of generality we may assume G = {g1 , . . . , gn }. On G we may define our preference as g1 6 g2 6 . . . 6 gn where gi 6 gj denotes gj is preferred over gi . To enforce end state nature of set G, we further define transition probability and reward function have following properties: P (g, a, g) = 1, ∀g ∈ G, ∀a ∈ A R(g, a, g) = 0, ∀g ∈ G, ∀a ∈ A That is, whenever the current state is in set G, we remains at state g until process ends at horizon T, in the meantime receiving no rewards at all. To enforce the process ends at one of the end state, we define a special end state g0 = t = T and declare g0 6 gi , ∀i > 1. Let π be any policy, we define the probability distribution Pπ (·) induced by π induced on set G as Pπ (gi ) = Pπ (sT = gi ). Then we can further define cumulative distribution function. X F π (g) = Pπ (gi ) gi 6g The associated τ -lower quantile is given by: q πτ = min{gi : F π (gi ) > τ } Finding Optimal Policy Given τ1 < . . . < τL ∈ [0, 1], following our motivation in Introduction section, our procedure to find optimal policy is a series of optimization procedure, we will show later this could be reshaped into multi-objective MDP with lexicographic preference. Algorithmic Scheme 1 1. Denote Π0 = {all possible policy}. 2. After finding Πi−1 , construct Πi : q ⋆τ = max {q πτ }. i π∈Πi−1 i Π̂i = {π ∈ Πi−1 : q πτ = q⋆τ } i 3 i That is, Π̂i is the set of policy that maximize the τi quantile in Πi . Let pi be the ”biggest” state that is ”smaller” than q ⋆τ . Here ”biggest” and ”smaller” should i be interpreted in terms of preference. Then to minimize the probability of ending at a state that is less preferable than q ⋆τ , we should have Πi as follows: i Πi = argmin F π (pi ) (1) π∈Π̂i 3. Proceed as step 2 until we have found ΠL . Then any policy π that is in ΠL will be our optimal policy. Note however it is unclear how to translate such algorithmic scheme into a tractable algorithm, the problem is that we do not know how to properly ”choose” an policy from a policy class. We’ll tackle this issue in the next section. 3 Multi-Quantile-Objective MDP In this section we first present a lemma that generalize the Lemma 1 of Hugo and Weng [8], this lemma fully characterize the q ⋆τ i Lemma 1. For i = 1, . . . , L, let following condition: q⋆τ i and Πi be defined as before, then q⋆τ satisfies the i q ⋆τ = min{g : Fi⋆ (g) > τi } i Fi⋆ (g) = min F π (g), ∀g ∈ G π∈Πi−1 Proof. We proof by induction: For i=1: observe that F1⋆ (g) 6 F π (g), ∀π, ∀g This follows directly from the definition of F1⋆ (g). Hence the τ1 -quantile of F1⋆ (g)(denoted as gi1 ) is greater or equal than q πτ for all π. 1 Now by the definition of gi1 , we have F1⋆ (gi1 ) > τ1 and F1⋆ (gi1 −1 ) < τ1 . Then by definition of F1⋆ (), we have ∃π1 , s.t.: F π1 (gi1 −1 ) = F1⋆ (gi1 −1 ) < τ1 F π1 (gi1 ) > F1⋆ (gi1 ) > τ1 This means that gi1 is τ1 -quantile of both F1⋆ () and F π1 (). Hence we have gi1 > q πτ , ∀π, 1 and gi1 = q πτ 1 . Thus q ⋆τ = gi1 by definition of q ⋆τ . 1 1 1 Assume the claim holds for i < k: For i = k: observe that Fk⋆ (g) 6 F π (g), ∀π ∈ Πk−1 , ∀g Hence the τk -quantile of Fk⋆ (g)(denoted as gik ) is greater or equal than q πτ for all k π ∈ Πk−1 . 4 Now by the definition of gik , we have Fk⋆ (gik ) > τk and Fk⋆ (gik −1 ) < τk . Then by definition of Fk⋆ (), we have ∃πk ∈ Πk−1 , s.t.: F πk (gik −1 ) = Fk⋆ (gik −1 ) < τk F πk (gik ) > Fk⋆ (gik ) > τk This means that gik is τk -quantile of both Fk⋆ () and F πk (). Hence we have gik > q πτ , ∀π, k and gik = qπτ k . Thus q ⋆τ = gik by definition of q⋆τ . By induction, proof complete. k k k Following the proof of Lemma 1, we could construct Πi as follows: Algorithmic Scheme 2 1. Let Π0 ={all possible policy}. 2. Suppose Πi−1 has been constructed, then we construct Πi as following: q ⋆τ = max {q πτ }. i π∈Πi−1 i Let pi the same as before, i.e. pi be the ”biggest state” that is ”smaller” than q ⋆τ . Then we construct Πi as follows: i Πi = argmin F π (pi ) (2) π∈Πi−1 Note that in equation (2) we construct Πi here directly from Πi−1 instead of from Π̂i in equation (1), the reason here is that by proof of Lemma 1, the policy π that minimize F π (pi ) also has q ⋆τ as its τi -quantile. i Solving the Algorithmic Scheme mentioned before is hard in general, but giving our work before we are now ready to formulate the previous Algorithmic Scheme into a MDP with Lexicographical objective preference. We may now restrict ourself in the setting that q ⋆τ , q ⋆τ · · · q ⋆τ are known beforehand, and consider the more general case 1 2 L later. To do this, we define reward functions {Ri }L i=1 as follows: ( 1 if st 6∈ G and st+1 = gi , gi > q ⋆τ i Ri (st , at , st+1 ) = 0 otherwise (3) P Then it is easy to verify that Eπ [ Tt=0 Ri (st , at , st+1 )] = 1 − F π (pi ). Hence minimizing F π (pi ) is equivalent PT to maximizing expected reward of the MDP. π π Define Vi = E [ t=1 Ri (st , at , st+1 )] the expected total reward corresponding to reward function Ri , then equation (2) becomes as: Πi = argmax Viπ (4) π∈Πi−1 We will show in the next subsection, if {q ⋆τ }L i=1 are known, the procedure described in i Algorithmic Scheme 2 exactly corresponds to the procedure of solving a multi-objective MDP with lexicographic preference. 5 Multi-Objective MDP with Lexicographic Preference Definition 1. Recall that a point ū is lexicographical larger than 0 if ui = 0 for i =1,2 · · · j and uj > 0 for some 1 6 j 6 n, we write u = (u1 , u2 · · · un ) >l 0. We then define our lexicographical order index as j, which is the first index in the vector that strictly larger than zero. Thus say ū is lexicographical larger than v̄ if ū − v̄ >l 0 A multi-objective MDP differs from standard MDP that it has reward vector R(s, a) = [R1 (s, a), . . . , RL (s, a)] and associated value vector V(s) = [V1 (s), . . . , VL (s)], and a preference is defined on the value function associated with different rewards, say V1 (s) > V2 (s) > . . . > VL (s). Classic multi-objective MDP seeks to find a policy that has Pareto optimal value vector. With lexicographic preference defined on value vectors, we say a policy π ⋆ is lexicographic optimal if there is no policy π so that ⋆ Vπ (s) >l Vπ (s). In pure algorithmic scheme, an multi-objective MDP is solved by iteratively finding the optimal policy class for lower priority value function in the optimal policy class for higher priority ones. That is, denote Π0 ={any policy}, Πi+1 is found by: π (s) Πi+1 = argmax Vi+1 π∈Πi In our multi-quantile-objective MDP, (S, A, P, R) is defined as the same as in section 2, the reward functions Ri is defined as in equation (3). With value vector Vπ = (V1π , . . . , VLπ ), we define lexicographical preference on Vπ as defined in definition 1. Then with equation (4) replacing equation (2) in Algorithmic 2, it is easy to see that Algorithmic Scheme 2 now become a procedure of solving multi-objective lexicographic MDP with parameters (S, A, P, R, V). 4 Solving Multi-Quantile-Objective MDP Solving Multi-Quantile-Objective MDP lies in general situation of solving multi-objective MDP with lexicographical preference. A natural one is to shape the original problem to a sequence of constrained case MDP and solve this sequence of constrained MDP iteratively. In the next subsection we proposed an algorithm that can solve general multi-objective MDP with lexicographic preference directly, thus solving multiquantile-objective MDP here is just a special case. Constrained MDP formulation The following procedure reshape a multi-objective MDP with lexicographic preference to a sequence of constrained MDP problem. 1. At step 1, Π0 ={all possible policy}. Optimize objective V1π , V1⋆ = maxπ∈Π0 V1π . 2. At step i, Optimize objective Viπ with constraints: minimize π Viπ subject to Vjπ > Vj⋆ , j = 1, . . . , i − 1. 6 3. Proceed as in 2 until step L is finished. It is easy to see that at step i the constraints in the optimization procedure naturally restrict the algorithm to search policy in the class that is identical to Πi−1 , thus correctness of this reshape is guaranteed. Altman [6] has shown that an optimal randomized policy could be found in such constrained MDP, Chen and Feinberg [4] also showed how to find optimal deterministic policy. Note this type of algorithm indeed does unnecessary work by restarting from searching whole policy space in every step. In this next subsection, we design a dynamic programming flavor algorithm that finds an optimal deterministic policy for general lexicographic order MDP. Lexicographic Markov Decision Process In this subsection we introduce an algorithm FLMDP that solves general lexicographic MDP in finite horizon, in particular it can be used to solve our previous formulated multi-quantile-objective MDP. π : L × S × T → R be the expected reward obtained by using policy π in decision Let Vi,t epochs t, t+1, · · · T, here, for simplicity, we let reward of end state equals zero, thus π can be represented as Vi,t T X π Ri (sn , an )] Vi,t (s) = Eπst =s [ n=t Note that although in our problem Ri () relates to out next state, we can solve this problem by simply define Ri (st , at ) = E[Ri (st , at , st+1 )] with expectation taken w.r.t st+1 . We first define state value function: Qπi,t (s, a) = Ri (s, a) + X π P r(s′ |s, a)Vi,t+1 (s′ ) s′ ∈S Then following the definition in constrained MDP, ∀t = T, T −1 · · · 1, and ∀i = 1, 2 · · · L, we define restricted bellman equation operator Bit as X π π Bit Vi,t (s) = max {Ri (s, a) + P r(s′ |s, a)Vi,t+1 (s′ )} a∈Ati−1 s′ ∈S where Ati+1 (s) = {a ∈ Ati (s)| max Qπi,t (s, a′ ) = Qπi,t (s, a)} a′ ∈Ati (s) and At0 (s) = A(s) 7 Algorithm 1 Finite-horizon Lexicographic MDP - FLMDP Input Ri (s, a), i = 1, 2 · · · L π Set Vi,T (s) = 0, ∀i = 1, 2 · · · L, ∀s ∈ S for t = T − 1, T − 2 · · · 1 do for i = 1, 2 · · · L do Vi,tπ (s) = Bit Vi,tπ (s) end for πt⋆ ∈ AtL end for Output π1⋆ , π2⋆ , · · · , πT⋆ Theorem 1. In our algorithm 1, ∀t = T − 1, T − 2, · · · 1, {πt⋆ }t6T −1 are optimal policy for our Lexicographic MDP problem. Proof. Before beginning our proof, we need some notations. Recall: π Vi,t (s) = T X Eπst =s [ t T X ⋆ Vi,t (s) = Eπst⋆=s [ Ri (st , at )] Ri (st , at )] t π π (s)] Vtπ (s) = [V1,t (s), . . . , VL,t ⋆ ⋆ (s)] (s), . . . , VL,t Vt⋆ (s) = [V1,t π (s) defines the value where {πt⋆ } denotes the policy output by Algorithm 1. Then Vj,t function associated with reward Ri , starting a tail problem with initial state s at time t following given policy π. Note that Vtπ (s) is exactly the value vector for full horizon MDP with initial state s. By our specification of reward function Ri , we naturally have VTπ (s) = 0 and VT⋆ (s) = 0. Let 6l , <l , >l , >l denotes lexicographical order relationship on value vector Vtπ (s). We use backward induction to show that for ∀ π, and for ∀ t = 1, . . . , T − 1, for ∀ s, we have Vtπ (s) 6l Vt⋆ (s). For t = T − 1, VTπ −1 (s) 6l VT⋆ −1 (s) is trivial by procedure of our algorithm. A simple induction on i suffice to give a formal proof, we omit the details here. Suppose the claim holds for t + 1, . . . , T − 1, now we proceed to prove the claim holds π (s) < V⋆ (s) for t: assume Vt+1 l t+1 π ⋆ Vi,t+1 (s) = Vi,t+1 (s), Viπt+1 ,t+1 (s) <l Vi⋆t+1 ,t+1 (s) We next show that Vtπ (s) <l Vt⋆ (s) also holds: 8 i = 1, . . . , it+1 − 1 π (s) < V ⋆ (s), then we are done. 1. if V1,t 1,t π (s) = V ⋆ (s), construction of π ⋆ and value iteration for finite horizon MDP 2. if V1,t 1,t gives us: X π π V1,t (s) = R1 (s, π(s)) + P (s, π(s), j)V1,t+1 (j) j ⋆ V1,t (s) = max R1 (s, a) + a X ⋆ P (s, a, j)V1,t+1 (j) j π (s) 6 ⋆ π (j), then we must have V1,t (j) = V1,t+1 By induction hypothesis we have V1,t+1 ⋆ V1,t (s). Now since we have equality achieved, by our definition of A1 (s) in our algorithm, we must have π(s) ∈ A1 (s). 3. We now use induction to show that for if i < it+1 − 1, and π ⋆ (s) = Vj,t (s), j = 1, . . . , i Vj,t π ⋆ then we must have π(s) ∈ Ai (s) and Vi+1,t (s) ≤ Vi+1,t (s). The base case i=1 have been proved in step 2. Suppose the claim holds for i − 1, then for i: By induction hypothesis we have π(s) ∈ Ai−1 (s). Construction of π ⋆ and value iteration for finite horizon MDP gives us: X π π P (s, π(s), j)Vi,t+1 (j) (5) Vi,t (s) = Ri (s, π(s)) + j ⋆ Vi,t (s) = max a∈Ai−1 (s) Ri (s, a) + X ⋆ P (s, a, j)Vi,t+1 (j) (6) j π ⋆ π (s) 6 By induction hypothesis we have Vi,t+1 (j) = Vi,t+1 (j), then we must have Vi,t ⋆ Vi,t (s). Now since we have equality achieved, by our definition of Ai (s) in our algorithm, we must have π(s) ∈ Ai (s). Then replacing i equation (5) with i + 1 we have: X π π Vi+1,t (s) = Ri+1 (s, π(s)) + P (s, π(s), j)Vi+1,t+1 (j) j ⋆ Vi+1,t (s) = max Ri+1 (s, a) + a∈Ai (s) X π P (s, a, j)Vi+1,t+1 (j) j π ⋆ By induction hypothesis we have Vi+1,t+1 (j) = Vi+1,t+1 (j), noticing that now π(s) ∈ Ai (s), then we have: π ⋆ Vi+1,t (s) 6 Vi+1,t (s) Finally, when i = it+1 − 1, if π ⋆ Vj,t (s) = Vj,t (s), j = 1, . . . , i π Then following the argument as before, and utilizing that now Vi+1,t+1 (j) < ⋆ Vi+1,t+1 (j), we must have: π ⋆ Vi+1,t (s) < Vi+1,t (s) which gives us Vtπ (s) <l Vt⋆ (s) 9 π (s) = V⋆ (s) ⇒ Notice that our previous argument could also be used to prove Vt+1 t+1 π ⋆ Vt (s) 6l Vt (s). Then combining all the ingredients we have, the following statement holds: π ⋆ Vt+1 (s) 6l Vt+1 (s) ⇒ Vtπ (s) 6l Vt⋆ (s) (7) To conclude our proof, notice we have VTπ −1 (s) 6l VT⋆ −1 (s), apply equation (7) iteratively, we have V1π (s) 6l V1⋆ (s), the optimality of our output policy follows immediately. Now we return to the general case where optimal quantiles {q ⋆τ }L is not known before i i=1 hand. Out idea is to proceed iteratively, at kth iteration, we used bisection to guess the location of the unknown q ⋆τ , we then solve a lexicographic MDP with k reward k [R1 , . . . , Rk ] and preference aligns with our preference for total L reward. Specifically, at k-th iteration, we maintain u and l such that Fk⋆ (gl−1 ) < τk and Fk⋆ (gu−1 ) > τk . We successively reduce u − l by half until u − l = 1. Then q ⋆τ = gu−1 . k To proceed the k-th iteration, we need to define our reward function as follows: ( 1 if st 6∈ G and st+1 = gi , gi > qτi q τi Ri (st , at , st+1 ) = 0 otherwise The reward vector at k-th iteration is then given by: q ⋆τ q ⋆τ qτ k−1 R = [R1 1 , . . . , Rk−1 , Rk k ] where q τ is our guess for q ⋆τ . k k Algorithm 2 Multi-Quantile-Objective(MQO) MDP π Set Vi,T (s) = 0, ∀i = 1, 2 · · · L, ∀s ∈ S for i = 1, 2 · · · L do Guess a proper q τ , which should be larger than q ⋆τ , ∀k = i − 1 · · · 1 i k Set l be the largest index of {gk } s.t. gk < q τ , Set u ← n i repeat Solve Lexicographic MDP with q ⋆τ , q⋆τ · · · q ⋆τ , j 6 i − 1 1 2 j Output Vi,tπ (s) if Vi,tπ (s) 6 1 − τi then l←i else u←i end if i ← ⌈ l+u ⌉ 2 until u − l = 1 q ⋆τ ← gu−1 i end for 5 Conclusion In this paper we consider a multi-quantile-objective MDP problem that combines previous work in quantile objective MDP and multi-objective MDP. Our contribution is 10 two folds, first we formulate the problem into multi-objective MDP problem, the second is that our algorithm to solve this problem could also solve general multi-objective MDP problem with finite horizon, state space and action space. Extension to infinite state space or action space could be also done with slight modification. We note our possible future work here: Pineda et.al [1] has showed that constrained MDP could be reshaped into a sequence of multi-objective MDP with lexicographic preference and additional slack variables, thus if one could solve lexicographic MDP with slack variable efficiently, then solution of constrained MDP follows. For finite horizon, we believe similar dynamic programming flavor algorithm could be invented for solving lexicographic MDP with slack variables, we leave it here as an open problem and our future work. References [1] Luis Pineda, Kyle H. Wray, and Shlomo Zilberstein. Revisiting Multi-Objective MDPs with relaxed Lexicographic Preferences. AAAI Fall Symposium on Sequential Decision Making for Intelligent Agents, pages 63–68,Arlington, Virginia, USA, November 2015. [2] Kyle H. Wray, Shlomo Zilberstein, and Abdel-Illah Mouaddib. Multi-Objective MDPs with Conditional Lexicographic Reward Preferences. In Proceedings of the Twenty-Ninth Conference on Artificial Intelligence (AAAI), pages 3418–3424, Austin, TX, USA, January 2015. [3] Feinberg, Eugene A., and Adam Shwartz, eds. Handbook of Markov decision processes: methods and applications. Vol. 40. Springer Science & Business Media, 2012. [4] Richard C. Chen, and Eugene A. Feinberg. Non-Randomized Policies for Constrained Markov Decision Processes. Mathematical Methods of Operations Research. [5] L. G. Mitten. Preference Order Dynamic Programming. Management Science. Volume 21, Issue 1, Pages 43-46, September 1974. [6] Eitan Altman. Constrained Markov Decision Process. Chapman and Hall/CRC, 1999. [7] Matthew J. Sobel. Ordinal Dynamic Programming. Management Science. Vol. 21, No. 9, Theory Series, pp. 967-975, May, 1975. [8] Hugo Gilbert, Paul Weng. Quantile Reinforcement Learning. In ACM 2016 [9] Sutton, Richard S., and Andrew G. Barto. Reinforcement learning: An introduction. Vol. 1. No. 1. Cambridge: MIT press, 1998. [10] Weng, Paul. Markov Decision Processes with Ordinal Rewards: Reference PointBased Preferences. In ICAPS. 2011. 11
2cs.AI
arXiv:1707.09763v1 [math-ph] 31 Jul 2017 DIFFERENTIAL ALGEBRA AND MATHEMATICAL PHYSICS J.-F. Pommaret CERMICS, Ecole des Ponts ParisTech, 6/8 Av. Blaise Pascal, 77455 Marne-la-Vallée Cedex 02, France E-mail: [email protected] URL: http://cermics.enpc.fr/∼pommaret/home.html ABSTRACT Many equations of mathematical physics are described by differential polynomials, that is by polynomials in the derivatives of a certain number of functions. However, up to the knowledge of the author, differential algebra in a modern setting has never been applied to study the specific algebraic feature of such equations. The purpose of this short but difficult paper is to revisit a few domains like general relativity, conformal geometry and contact geometry in the light of a modern approach to nonlinear systems of partial differential equations, using new methods from Differential Geometry (D.C. Spencer, 1970), Differential Algebra (J.F. Ritt, 1950 and E. Kolchin, 1973) and Algebraic Analysis (M. Kashiwara, 1970). Identifying the differential indeterminates of Ritt and Kolchin with the jet coordinates of Spencer, the idea is to study Differential Duality by using only linear differential operators with coefficients in a differential field. In particular, the linearized second order Einstein equations are parametrizing the first order Cauchy stress equations but cannot themselves be parametrized. In the framework of Homological Algebra, this result is not coherent with the vanishing of certain first and second extension modules. As a byproduct, we shall prove that gravitation and electromagnetism must only depend on the second order jets (elations) of the system of conformal Killing equations. Finally, we shall use these new methods in order to study contact transformations in arbitrary odd dimension and apply these results to the study of Hamilton-Jacobi equations in mechanics. KEY WORDS Nonlinear partial differential equations, Differential algebra, Riemannian stucture, Conformal structure, Contact structure, Hamilton-Jacobi equation, General relativity, Einstein equations, Elastic waves, Lie group, Lie pseudogroup, Differential Galois theory, Spencer operator, Algebraic Analysis, Differential modules, Homological algebra, Extension modules. 1 1) INTRODUCTION Let us consider a manifold X of dimension n with local coordinates x = (xi ) = (x1 , ..., xn ), tangent bundle T , cotangent bundle T ∗ , vector bundle Sq T ∗ of q-symmetric covariant tensors and vector bundle ∧r T ∗ of r-skewsymmetric covariant tensors or r-forms. The group of isometries y = f (x) of the non-degenerate metric ω with det(ω) 6= 0 on X is defined by the nonlinear first order system of general finite Lie equations in Lie form: ωkl (f (x))∂i f k (x)∂j f l (x) = ωij (x) Linearizing at the identity transformation y = x, we may introduce the corresponding Killing operator T → S2 T ∗ : ξ → Dξ = L(ξ)ω = Ω, which involves the Lie derivative L and provides twice the so-called infinitesimal deformation tensor of continuum mechanics when ω is the Euclidean metric. We may consider the linear first order system of general infinitesimal Lie equations in Medolaghi form, also called system of Killing equations: Ωij ≡ (L(ξ)ω)ij ≡ ωrj (x)∂i ξ r + ωir (x)∂j ξ r + ξ r ∂r ωij (x) = 0 which is in fact a family of systems only depending on the geometric object ω and its derivatives. Introducing the Christoffel symbols γ, we may differentiate once and add the operator L(ξ)γ = Γ ∈ S2 T ∗ ⊗ T with the well known Levi-Civita isomorphism j1 (ω) = (ω, ∂x ω) ≃ (ω, γ) in order to obtain the linear second order system of general infinitesimal Lie equations in Medolaghi form: k k r k Γkij ≡ (L(ξ)γ)kij ≡ ∂ij ξ k + γrj (x)∂i ξ r + γir (x)∂j ξ r − γij (x)∂r ξ k + ξ r ∂r γij (x) = 0 We have thus linearized a nonlinear differential algebraic system in order to obtain a linear system with coefficients in the differential field Q(ω, ∂ω, ...) along the idea of E. Vessiot [65]. This system is formally integrable if and only if ω has a constant Riemannian curvaure. Similarly, introducing the Jacobian determinant ∆(x) = det(∂i f k (x)), the group of conformal transformations of the metric ω may be defined by the nonlinear first order system of general finite Lie equations in Lie form: 2 ω̂kl (f (x))∆− n (x)∂i f k (x)∂j f l (x) = ω̂ij (x) 1 while introducing the metric density ω̂ij = | det(ω) |− n ωij ⇒ det(ω̂) = ±1 as a new geometric object, rather than by eliminating a conformal factor as usual. The conformal Killing operator ξ → D̂ξ = L(ξ)ω̂ = Ω̂ may be defined by linearization as above and we obtain the first order system of general infinitesimal Lie equations in Medolaghi form, also called system of conformal Killing equations: 2 ω̂ij (x)∂r ξ r + ξ r ∂r ω̂ij (x) = 0 n as a system with coefficients in the differential field Q(ω̄, ∂ ω̄, ...). We may introduce the trace −1 tr(Ω) = ω ij Ωij with standard notations and obtain therefore tr(Ω̂) = 0 because Ω̂ij = | det(ω) | n (Ωij − 1 n ωij tr(Ω)). This system becomes formally interable if and only if the corresponding Weyl tensor vanishes. Ω̂ij ≡ ω̂rj (x)∂i ξ r + ω̂ir (x)∂j ξ r − The reader may look at [31,32,33,34,44] for finding examples of Lie groups or Lie pseudogroups of transformations along the approach initiated by E. Vessiot in 1903 [53]. In classical elasticity, the stress tensor density σ = (σ ij = σ ji ) existing inside an elastic body is a symmetric 2-tensor density introduced by A. Cauchy in 1822. Integrating by parts the implicit i σ rs = f i . When ω is the summation − 21 σ ij Ωij , we obtain the Cauchy operator σ → ∂r σ ir + γrs euclidean metric, the corresponding Cauchy stress equations can be written as ∂r σ ir = f i where the right member describes the local density of forces applied to the body, for example gravitation. With zero second member, we study the possibility to ”parametrize ” the system of PD equations ∂r σ ir = 0, namely to express its general solution by means of a certain number of arbitrary functions or potentials, called stress functions. Of course, the problem is to know about the number of 2 such functions and the order of the parametrizing operator. For n = 1, 2, 3 one may introduce the Euclidean metric ω = (ωij = ωji ) while, for n = 4, one may consider the Minkowski metric. A few definitions used thereafter will be provided later on. When n = 2, the stress equations become ∂1 σ 11 + ∂2 σ 12 = 0, ∂1 σ 21 + ∂2 σ 22 = 0. Their second order parametrization σ 11 = ∂22 φ, σ 12 = σ 21 = −∂12 φ, σ 22 = ∂11 φ has been provided by George Biddell Airy (1801-1892) in 1863 [1]. It can be simply recovered in the following manner: σ 12 ∂1 σ 11 − ∂2 (−σ 12 ) = 0 ∂2 σ 22 − ∂1 (−σ 21 ) = 0 = σ 21 ⇒ ∂1 ϕ − ∂2 ψ = 0 ∃ϕ, σ 11 = ∂2 ϕ, σ 12 = −∂1 ϕ ∃ψ, σ 22 = ∂1 ψ, σ 21 = −∂2 ψ ∃φ, ϕ = ∂2 φ, ψ = ∂1 φ ⇒ ⇒ ⇒ We get the linear second order system:   σ 11 −σ 12  σ 22 ≡ ∂22 φ = 0 ≡ ∂12 φ = 0 ≡ ∂11 φ = 0 1 1 1 2 • • which is involutive with one equation of class 2, 2 equations of class 1 and it is easy to check that the 2 corresponding first order CC are just the stress equations. When constructing a long prismatic dam with concrete as in [12,13] or in the Introduction of [36], we may transform a problem of 3-dimensional elasticity into a problem of 2-dimensional elasticity by supposing that the axis x3 of the dam is perpendicular to the river with Ωij (x1 , x2 ), ∀i, j = 1, 2 and Ω33 = 0 because of the rocky banks of the river are supposed to be fixed. We may introduce the two Lamé constants (λ, µ) and the Poisson coefficient ν = λ/2(λ + µ) in order to describe the usual constitutive relations of an homogeneous isotropic medium as follows (care: n = 3 ⇒ n = 2): σ= 1 λ tr(Ω) ω + µ Ω, tr(Ω) = Ω11 + Ω22 2 ⇒ µΩ = σ − λ tr(σ) ω, tr(σ) = σ 11 + σ 22 2(λ + µ) even though σ 33 = 21 λ(Ω11 + Ω22 ) = 12 λtr(Ω) ⇒ σ 33 = ν(σ 11 + σ 22 ) 6= 0. Let us consider the right square of the diagram below with locally exact rows: 2 .. . 2 Killing −→ 3 Riemann −→ ↓↑ Cauchy ←− 3 Airy ←− 1 .. . 1 Taking into account the formula (5.1.4) of [15] for the linearization of the only component of the Riemann tensor at ω when n = 2 and substituting the Airy parametrization, we obtain: tr(R) ≡ d11 Ω22 + d22 Ω11 − 2d12 Ω12 = 0 ⇒ µ tr(R) ≡ λ + 2µ ∆∆φ = 0 2(λ + µ) ⇒ ∆∆φ = 0 where the linearized scalar curvature tr(R) is allowing to define the Riemann operator in the previous diagram, namely the only compatibility condition (CC) of the Killing operator. Using now the left square of the previous diagram, we may also substitute the Airy parametrization in the Cauchy stress equations and get, when f~ = ~g (gravity)(care: n=3): ~ ∇ ~ + µ∆ξ~ = f~ ⇒ ~ ∇. ~ ξ) (λ + µ)∇( (λ + 2µ)∆tr(Ω) = 0 ⇒ ∆tr(Ω) = 0 ⇒ ∆tr(σ) = 0 ⇒ ∆∆φ = 0 It remains to exhibit an arbitrary homogeneous polynomial solution of degree 3 and to determine its 4 coefficients by the boundary pressure conditions on the upstream and downstream walls of the dam. Of course, the Airy potential φ has nothing to do with the perturbation Ω of the metric ω and the Airy parametrization is nothing else but the formal adjoint of the Riemann operator, linearization of the Riemann tensor at ω, expressing the second order compatibility conditions (CC) of the inhomogeneous system Dξ = Ω. Also, as we discover at once, the origin of elastic waves is shifted by one step backwards, from the right square to the left square of the diagram. Indeed, ~ 2 for a medium with mass ρ per unit volume in the right member using inertial forces f~ = ρ ∂ 2 ξ/∂t 3 of Cauchy stress equations because of Newton law, we discover the existence of two types of elastic waves, namely the longitudinal and transversal waves with different speeds vT < vL that are really existing because they are responsible for earthquakes [36]:  q ~ ξ~ = 0  ∇. ⇒ µ△ξ~ = f~ ⇒ vT = µρ q  ∇ ~ ∧ ξ~ = 0 ⇒ (λ + 2µ)△ξ~ = f~ ⇒ vL = λ+2µ ρ It is this comment that pushed the author to use the formal adjoint of an operator, knowing already that an operator and its (formal) adjoint have the same differential rank. In the case of the conformal Killing operator, the second order CC are generated by the Weyl operator, linearization of the Weyl tensor at ω̂ when n ≥ 4. The particular situation n = 3 will be studied and its corresponding 5 third order CC are not known after one century [44]. Finally, the Bianchi operator describing the CC of the Riemann operator does not appear in this scheme. Summarizing what we have just said, the study of elastic waves in continuum mechanics only depends on group theory because it has only to do with one differential sequence and its formal adjoint, combined together by means of constitutive relations. We have proved in many books [33,34,] and in [41,42,44] that the situation is similar for Maxwell equations, a result leading therefore to revisit the mathematical foundations of both General Relativity (GR) and Electromagnetism (EM), thus also of Gauge Theory (GT). The first motivation for studying the methods used in this paper has been a 1000$ challenge proposed in 1970 by J. Wheeler in the physics department of Princeton University while the author of this paper was a student of D.C. Spencer in the closeby mathematics department: Is it possible to express the generic solutions of Einstein equations in vacuum by means of the derivatives of a certain number of arbitrary functions like the potentials for Maxwell equations ?. During the next 25 years and though surprising it may look like, no progress has been made towards any solution and we found the negative solution of this challenge in 1995 [35]. Then, being already in contact with M.P. Malliavin as I gave a seminar on the ”Deformation Theory of Algebraic and Geometric Structures ” [24,44], I presented in 1995 a seminar at IHP in Paris, proving the impossibility to parametrize Einstein equations, a result I just found. One of the participants called my attention on a recently published translation from japanese of the 1970 master thesis of M. Kashiwara that he just saw on display in the library of the Institute [21]. This has been the true starting of the story because I discovered that the duality involved in the preceding approach to physics was only a particular example of a much more sophisticated framework having to do with homological algebra [2,7,27,36,50]. Let us explain this point of view by means of an elementary example. With ∂22 ξ = η 2 , ∂12 ξ = η 1 for D, we get ∂1 η 2 −∂2 η 1 = ζ for the CC D1 . Then ad(D1 ) is defined by µ2 = −∂1 λ, µ1 = ∂2 λ while ad(D) is defined by ν = ∂12 µ1 + ∂22 µ2 but the CC of ad(D1 ) are generated by ν ′ = ∂1 µ1 + ∂2 µ2 . Using operators, we have the two differential sequences: ξ ν D −→ ad(D) ←− ւ η µ D 1 −→ ad(D1 ) ←− ζ λ ν′ where D1 generates the CC of D in the upper sequence but ad(D) does not generate the CC of ad(D1 ) in the lower sequence, even though D1 ◦ D = 0 ⇒ ad(D) ◦ ad(D1 ) = 0, contrary to what happened in the previous diagram. We shall see that this comment brings the need to introduce the first extension module ext1 (M ) of the differential module M determined by D. In the meantime, following U. Oberst [28,29], a few persons were trying to adapt these methods to control theory and, thanks to J.L. Lions, I have been able to advertise about this new approach in a european course, held with succes during 6 years [34] and continued for 5 other years in a 4 slightly different form [37]. By chance I met A. Quadrat, a good PhD student interested by control and computer algebra and we have been staying alone because the specialists of Algebraic Analysis were pure mathematicians, not interested at all by applications. As a byproduct, it is rather strange to discover that the impossibility to parametrize Einstein equations, that we shall prove in Section 4, has never been acknowledged by physicists but can be found in a book on control because it is now known that a control system is controllable if and only if it is parametrizable [37,56]. The following example of a double pendulum will prove that this result, still not acknowledged today by engineers, is not evident at all. For this, let us consider two pendula of respective length l1 and l2 attached at the ends of a rigid bar sliding horizontally with a reference position x(t). If the pendula move with a respective (small) angle θ1 (t) and θ2 (t) with respect to the vertical, it is easy to prove from the Newton principle that the equations of the movements does not depend on the respective masses m1 and m2 of the pendula but only depend on the respective lengths and gravity g along the two formulas: d2 x + l1 d2 θ1 + gθ1 = 0, d2 x + l2 d2 θ2 + gθ2 = 0 where d = dt is the standard time derivative. It is experimentally visible and any reader can check it with a few dollars, that the system is controllable, that is the angles can reach any prescribed (small) values in a finite time when starting from equilibrium, if and only if l1 6= l2 and, in this case, we have the following (injective) 4th order parametrization: −l1 l2 d4 φ − g(l1 +2 )d2 φ − g 2 φ = x, l2 d4 φ + gd2 φ = θ1 , l1 d4 φ + gd2 φ = θ2 0f course, if l1 = l2 = l, the system cannot be controllable because, setting θ = θ1 − θ2 , we obtain by substraction ld2 θ + gθ = 0 and thus θ(0) = 0, dθ(0) = 0 ⇒ θ(t) = 0. We end this Introduction explaining on a simple example why the second extension module ext2 (M ) must also be considered, especially in the study of Einstein equations, though surprising it may look like. To make a comparison, let us consider the following well known Poincaré sequence: d d d d d ∧0 T ∗ −→ ∧1 T ∗ −→ ∧2 T ∗ −→ ... −→ ∧n−1 T ∗ −→ ∧n T ∗ → 0 where d : ω = ωI dxI → ∂i ωI dxi ∧ dxI is the exterior derivative. When n = 3, we have: d d d ad(d) ad(d) ad(d) ∧0 T ∗ −→ ∧1 T ∗ −→ ∧2 T ∗ −→ ∧3 T ∗ → 0 0 ← ∧3 T ∗ ←− ∧2 T ∗ ←− ∧1 T ∗ ←− ∧0 T ∗ ⇔ ⇔ grad curl div div curl grad φ −→ ξ −→ η −→ ζ → 0 0 ← θ ←− ν ←− µ ←− λ From their definition it follows that div is parametrized by curl while curl is parametrized by grad. Also, in local coordinates, we have ad(div) = −grad, ad(curl) = curl, ad(grad) = −div and the adjoint sequence is also the Poincaré sequence up to the sign. Let us nevertheless consider the new (minimal) parametrization of div obtained by setting ξ 3 = 0, namely [45,46]: d2 ξ 3 −d3 ξ 2 = η 1 , d3 ξ 1 −d1 ξ 3 = η 2 , d1 ξ 2 −d2 ξ 1 = η 3 ⇒ −d3 ξ 2 = η 1 , d3 ξ 1 = η 2 , d1 ξ 2 −d2 ξ 1 = η 3 If we define the differential rank of an operator by the maximum number of differentially independent second member, this is clearly an involutive differential operator with differential rank equal to 2 because (ξ 1 , ξ 2 ) can be given arbitrarily and thus (η 1 , η 2 ) can be given arbitrarily or, equivalently, because the differential rank of div is of course equal to 1 as div has no CC. Now, the involutive system d3 ξ 2 = 0, d3 ξ 1 = 0, d1 ξ 2 − d2 ξ 1 = 0 canot be parametrized by one arbitrary function because both ξ 1 and ξ 2 are autonomous in the sense that they both satisfy to at least one partial differential equation (PDE). Accordingly, we discover that div can be parametrized by the curl through 3 arbitrary functions (ξ 1 , ξ 2 , ξ 3 ) where ξ 3 may be given arbitrarily, the curl being itself parametrized by the grad, but div can also be parametrized by another operator with less arbitrary functions or potentials which, in turn, cannot be parametrized again. Such a situation is similar to the one met in hunting rifles that may have one, two or more trigger mechanisms that can be used successively. It happens that the possibility to have one parametrization of div is an 5 intrinsic property described by the vanishing of ext1 (M ) where the differential module M is determined by grad while the property to have two successive parametrizations is an intrinsic property described by the vanishing of ext1 (M ) as we just said plus the vanishing of ext2 (M ), and so on. It follows that certain parametrizations are ” better ” than others and no student should even imagine the minimal parametrization of div that we have presented above. A similar procedure has been adopted by J.C. Maxwell [25] and G. Morera [26] when they modified the parametrization of the Cauchy stress equations obtained by E. Beltrami in 1892 (See [3, 9,10,43,47,48] for more details). We now treat the case dim(X) = 3 as the case dim(X) = n = 2p + 1 ≥ 5 will need much more work (See [39] for more details). Let us introduce the so-called contact 1-form α = dx1 − x3 dx2 and consider the Lie pseudogroup Γ ⊂ aut(X) of (local) transformations preserving α up to a function factor, that is Γ = {f ∈ aut(X)|j1 (f )−1 (α) = ρα} where again jq (f ) is a symbolic way for writing out the derivatives of f up to order q and α transforms like a 1-covariant tensor. It may be tempting to look for a kind of ”object ” the invariance of which should characterize Γ. Introducing the exterior derivative dα = dx2 ∧ dx3 as a 2-form, we obtain the volume 3-form α ∧ dα = dx1 ∧ dx2 ∧ dx3 . As it is well known that the exterior derivative commutes with any diffeomorphism, we obtain sucessively: j1 (f )−1 (dα) = d(j1 (f )−1 (α)) = d(ρα) = ρdα + dρ ∧ α ⇒ j1 (f )−1 (α ∧ dα) = ρ2 (α ∧ dα) As the volume 3-form α ∧ dα transforms through a division by the Jacobian determinant ∆ = ∂(f 1 , f 2 , f 3 )/∂(x1 , x2 , x3 ) 6= 0 of the transformation y = f (x) with inverse x = f −1 (y) = g(y), the desired object is thus no longer a 1-form but a 1-form density ω = (ω1 , ω2 , ω3 ) transforming like a 1-form but up to a division by the square root of the Jacobian determinant. We obtain the nonlinear differential algebraic system of general finite Lie equations in Lie form: ωk (y)( ∂(y 1 , ..., y n ) − 1 k ) 2 yi = ωi (x) ∂(x1 , ..., xn ) It follows that the infinitesimal contact transformations are vector fields ξ ∈ T = T (X) the tangent bundle of X, satisfying the 3 so-called first order system of general infinitesimal Lie equations in Medolaghi form: Ωi ≡ (L(ξ)ω)i ≡ ωr (x)∂i ξ r − (1/2)ωi (x)∂r ξ r + ξ r ∂r ωi (x) = 0 When ω = (1, −x3 , 0), we obtain the special involutive system (See below for details): ∂3 ξ 3 + ∂2 ξ 2 + 2x3 ∂1 ξ 2 − ∂1 ξ 1 = 0, ∂3 ξ 1 − x3 ∂3 ξ 2 = 0, ∂2 ξ 1 − x3 ∂2 ξ 2 + x3 ∂1 ξ 1 − (x3 )2 ∂1 ξ 2 − ξ 3 = 0 with 2 equations of class 3 and 1 equation of class 2, a result leading thus to only 1 compatibility conditions (CC) for the second members. Equivalently, we have the system:   Ω3 ≡ ξ31 − x3 ξ32 = 0 Ω2 ≡ ξ21 − x3 ξ22 + 12 x3 (ξ11 + ξ22 + ξ33 ) − ξ 3 = 0  Ω1 ≡ ξ11 − x3 ξ12 − 12 (ξ11 + ξ22 + ξ33 ) = 0 For an arbitrary ω, we may ask about the differential conditions on ω such that all the equations of order r + 1 are only obtained by differentiating r times the first order equations, exactly like in the special situation just considered where the system is involutive. We notice that, in a symbolic way, ω ∧ dω is now a scalar c(x) providing the zero order equation ξ r ∂r c(x) = 0 and the condition is c(x) = c = cst. The integrability condition (IC) is the Vessiot structure equation: I(j1 (ω)) ≡ ω1 (∂2 ω3 − ∂3 ω2 ) + ω2 (∂3 ω1 − ∂1 ω3 ) + ω3 (∂1 ω2 − ∂2 ω1 ) = c involving the only structure constant c like the Riemannian structure. For ω = (1, −x3 , 0), we get c = 1. If we choose ω̄ = (1, 0, 0) leading to c̄ = 0, we may define Γ̄ = {f ∈ aut(X)|j1 (f )−1 (ω̄) = ω̄} with infinitesimal transformations satisfying the involutive system: ∂3 ξ 3 + ∂2 ξ 2 − ∂1 ξ 1 = 0, 6 ∂3 ξ 1 = 0, ∂2 ξ 1 = 0 with again 2 equations of class 3 and 1 equation of class 2. The equivalence problem j1 (f )−1 (ω) = ω̄ cannot be solved even locally because this system cannot have any invertible solution. Indeed, studying the system j1 (g)−1 (ω̄) = ω, we have to solve: 1 ∂g 1 ∂g 1 ∂g 1 ∂g 1 ∂g 1 3 ∂g + y = 0, = 0 ⇒ = 0, = 0, =0 ∂y 2 ∂y 1 ∂y 3 ∂y 1 ∂y 2 ∂y 3 by using crossed derivatives. Using now the definition of contact transformations, we have the three equations: (L(ξ)α)i ≡ αr ∂i ξ r + ξ r ∂r αi = ρ(x)αi Eliminating the arbitrary factor ρ(x), we obtain the two linearly independent infinitesimal Lie equations:   α2 αr ∂3 ξ r − α3 αr ∂2 ξ r + (α2 ∂r α3 − α3 ∂r α2 )ξ r = 0  α3 αr ∂1 ξ r − α1 αr ∂3 ξ r + (α3 ∂r α1 − α1 ∂r α3 )ξ r = 0 which are nevertheless not in the Medolaghi form because the 1-form α is not a geometric object. Multiplying on the left the first equation by the test function λ1 and the second by the test function λ2 and integrating by part, we obtain for example, separating the terms involving only λ1 from the terms involving only λ2 :  1 → −∂3 (α1 α2 λ1 ) + ∂2 (α1 α3 λ1 ) + (α2 ∂1 α3 − α3 ∂1 α2 )λ1  ξ 2 ξ → ...  3 ξ → −∂3 (α2 α3 λ1 ) + ∂2 ((α3 )2 λ1 ) + (α2 ∂3 α3 − α3 ∂3 α2 )λ1 and:  1  ξ ξ2  3 ξ → −∂1 (α1 α3 λ2 ) + ∂3 ((α1 )2 λ2 ) + (α3 ∂1 α1 − α1 ∂1 α3 )λ2 → ... → −∂1 ((α3 )2 λ2 ) + ∂3 (α1 α3 λ2 ) + (α3 ∂3 α1 − α1 ∂3 α3 )λ2 that we may rewrite respectively as:   −(α1 α2 )∂3 λ1 + (α1 α3 )∂2 λ1 − (α1 (∂2 α3 − ∂3 α2 ) − α2 (∂3 α1 − ∂1 α3 ) − α3 (∂1 α2 − ∂2 α1 ))λ1 ...  −(α2 α3 )∂3 λ1 + (α3 )2 ∂2 λ1 + 2α3 (∂2 α3 − ∂3 α2 )λ1 and:   −(α1 α3 )∂1 λ2 + (α1 )2 ∂3 λ2 + 2α1 (∂3 α1 − ∂1 α3 )λ2 ...  −(α3 )2 ∂1 λ2 + (α1 α3 )∂3 λ2 + 2α3 (∂3 α1 − ∂1 α3 )λ2 Multiplying each first row on the left by −α3 , then each third row on the left by α1 in order to eliminate the derivatives of λ, adding and collecting the results, we discover that λ2 strikingly disappears and we only obtain for the kernel of the adjoint operator: α3 [α1 (∂2 α3 − ∂3 α2 ) + α2 (∂3 α1 − ∂1 α3 ) + α3 (∂1 α2 − ∂2 α1 )]λ1 = 0 that is α3 I(j1 (α))λ1 =0 and all the possible permutations. As α 6= 0, then one at least of the three components must not vanish and may even be supposed to be equal to 1 because α is defined uo to a function factor. We get therefore I(j1 (α))λ = 0, that is cλ = 0 whenever the system is formally integrable. We let the reader treat directly the standard case with α3 = 0 (care): α = dx1 − x3 dx2 ⇒ ∂3 ξ 1 − x3 ∂3 ξ 2 = 0, ∂2 ξ 1 − x3 ∂2 ξ 2 + x3 (∂1 ξ 1 − x3 ∂1 ξ 2 )− ξ 3 = 0 ⇒ c = 1 ⇒ λ = 0 Though it is rather surprising at first sight, let us now explain why we shall need non trivial homological algebra in order to understand the previous results. Indeed, the last system R1 is neither 7 formally integrable nor involutive, even though it has an involutive symbol g1 defined by: ξ31 − x3 ξ32 = 0, ξ21 − x3 ξ22 + x3 ξ11 − (x3 )2 ξ12 = 0 (1) It is now easy to check that the system R1 ⊂ J1 (T ) defined by the 3 PD equations:  3  Φ ≡ ξ33 + ξ22 + 2x3 ξ12 − ξ11 Φ2 ≡ ξ31 − x3 ξ32  1 Φ ≡ ξ21 − x3 ξ22 + x3 ξ11 − (x3 )2 ξ12 − ξ 3 = = = 0 0 0 1 2 1 2 1 2 3 3 • is involutive with 2 equations of class 3 and 1 equation of class 2. Taking into account the relations Φ1 = Ω2 + x3 Ω1 , Φ2 = Ω3 , Φ3 = −2Ω1 and substituting, we obtain the only first order CC: d3 Φ1 − d2 Φ2 − x3 d1 Φ2 + Φ3 = 0 ⇔ (d2 Ω3 − d3 Ω2 ) − x3 (d3 Ω1 − d1 Ω3 ) + Ω1 = 0 and we recognize the linearization of the Vessiot structure equation, following exactly the same procedure as the one used previously for the linearization of the constant Riemannian curvature. However, in this new framework, we shall now prove and illustrate the following Lemma and striking Theorem (See next Sections for the definitions): LEMMA 1.1: A (formally) surjective linear differential operator D defined over a differential field K is defining a projective and thus torsion-free differential module M if and only if its (formal) adjoint is (formally) injective. Proof: In this specific situation, let us consider the finite free presentation over D = K[d]: p D 0 → F1 −→ F0 −→ M → 0 If M is projective, then it is well known that that such a sequence splits (See [2,7,17,27,36,50] for more details or [23], Lemma 3.3, p 212). Then, applying homD (•, D) we get again the new splitting sequence: p∗ D∗ 0 ← F1 ∗ ←− F0 ∗ ←− M ∗ ← 0 and obtain ker(ad(D)) = 0 in the operator sense or rather coker(D∗ ) = 0 in the module sense. Conversely,we have already exhibited the long exact dual sequence: D∗ p∗ 0 ← N ← F1 ∗ ←− F0 ∗ ←− M ∗ ← 0 Accordingly, if N = 0, as the dual F ∗ of a free differential module F is again a free differential module, thus a projective module, this sequence splits and M ∗ is thus a projective module. Applying again homD (•, D), we have the commutative and exact diagram: p D F0 ↓ −→ D∗∗ F0 ∗∗ −→ 0→ F1 ↓ −→ 0→ F1 ∗∗ −→ p∗∗ M ↓ →0 M ∗∗ →0 ∗∗ Using the isomorphism F ≃ F when F has finite rank over D, we obtain an isomorphism M ≃ M ∗∗ . As M ∗ is projective because F0∗ ≃ F1∗ ⊕ M ∗ , then M ∗∗ is also projective and thus M is projective. Q.E.D. EXAMPLE 1.2: In the preceding contact situation, the system R1 is defined by 2 equa(1) tions only while the system R1 is defined by 3 equations that we have provided. Accordingly, with K = Q(x1 , x2 , x3 ) and D = K[d] = K[d1 , d2 , d3 ], we obtain the free presentation 0 → D2 → D3 → M → 0 and we have seen that c 6= 0 ⇒ λ = 0. The parametrization: ξ 1 = φ − x3 ∂3 φ, ξ 2 = −∂3 φ, ξ 3 = ∂2 φ + x3 ∂1 φ ⇒ φ = α(ξ) ⇒ L(ξ)α = ∂1 φ α 8 by means of an arbitrary function φ is well known and proves that M ≃ D. On the contrary, if we choose ω = (1, 0, 0), then the system of special Medolaghi equations that we have exhibited shows that ξ 1 is a torsion element and this system cannot be parametrized. THEOREM 1.3: The possibility to parametrize the system of general Medolaghi equations only depends on the structure constant c. Proof: For any geometric object ω of order q and the corresponding system Rq (ω) of general Medolaghi equations, let us now define an equivalence relation ω̄ ∼ ω ⇔ Rq (ω) = Rq (ω̄). In the contact situation, we have first to study when we have ω̄r ξir − 12 ω̄i ξrr = 0 ⇔ ωr ξir − 12 ωi ξrr . Though it looks like to be a simple algebraic problem, one needs an explicit computation or computer algebra and we prefer to use another more powerful technique ([39], p 688). Introducing the completely skewsymmetrical symbol ǫ = (ǫi1 i2 i3 ) where ǫi1 i2 i3 = 1 if (i1 i2 i3 ) is an even permutation of (123) or −1 if it is an odd permutation and 0 otherwise, let us introduce the skewsymmetrical 2-contravariant density ω ij = ǫijk ωk . Then one can rewrite the system of general infinitesimal Lie equations R1 (ω) as : 1 −ω rj (x)ξri − ω ir (x)ξrj − ω ij (x)ξrr + ξ r ∂r ω ij (x) = 0 2 and we may exhibit a section ξri = ω is Ars with Ars = Asr and thus ξrr = 0. It is important to notice that det(ω) = 0 when n = 2p + 1, contrary to the Riemann or symplectic case and ω cannot therefore be used in order to raise or lower indices. As we must have R̄10 = R10 where the isotropy π1 R10 is defined by the short exact sequence 0 → R10 → R1 →0 T → 0, the same section must satisfy (ω̄ rj ω is + ω̄ ir ω js )Ars = 0, ∀Ars = Asr , and we must have (ω̄ rj ω is + ω̄ ir ω js )+(ω̄ sj ω ir + ω̄ is ω jr ) = 0. Setting s = j, we get ω̄ rj ω ij = ω̄ ij ω rj ⇒ ω̄ ij (x) = a(x)ω ij (x). Substituting and substracting, we get ω ij (x)ξ r ∂r a(x) = 0 ⇒ a(x) = a = cst 6= 0 because ω 6= 0 and one of the components at least must be nonzero. Accordingly, the normalizer N (Θ) = {ξ ∈ T | L(ξ)ω = Aω, Ac = 0} and Θ is of codimension 1 in its normalizer if c = 0 or N (Θ) = Θ if c 6= 0. For example, in the case of a contact structure with c = 1, we have N (Θ) = Θ but, when ω = (1, 0, 0) ⇒ c = 0, we have to eliminate the constant A among the equations ∂3 ξ 3 + ∂2 ξ 2 − ∂1 ξ 1 = −2A, ∂3 ξ 1 = 0, ∂2 ξ 1 = 0 and we may add the infinitesimal generator xi ∂i of a dilatation providing A = − 12 . As we have already seen, the parametrization is only existing for c 6= 0. This is an ”open property ” because ω̄ = aω, a = cst ⇒ c̄ = a2 c and thus any nonzero value of c can be reached because a 6= 0. Q.E.D. However, no one of the previous results can be extended to an arbitrary n = 2p + 1 ≥ 5. It is clear from the beginning of this Introduction that an isometry is a solution of a nonlinear system in Lie form [31,34,44] and that we have linearized this system at the identity transformation in order to study elastic waves. However, in general, no explicit solution may be known but most nonlinear systems of OD or PD equations of mathematical physics (constant riemannian curvature is a good example in [14]) are defined by differential polynomials. This is particularly clear for riemannian, conformal, complex, contact, symplectic or unimodular structures on manifolds [44]. Hence, in Section 2 we shall provide the main results that exist in the formal theory of systems of nonlinear PD equations in order to construct a formal linearization. The proof of many results is quite difficult as it involves delicate chases in 3-dimensional diagrams [31,34,36]. In physics, the linear system obtained may have coefficients in a certain differential field and we shall need to revisit differential algebra in Section 3 because Spencer and Kolchin never clearly understood that their respective works could be combined. It will follow that the linear systems will have coefficients in a differential field K and we shall have to introduce the ring D = K[d] = K[d1 , ..., dn ] of differential operators with coefficients in K, which is even an integral domain. This fact will be particularly useful in order to revisit differential duality in Section 4 before applying it to the study of conformal structures in Section 5, caring separately about the cases n = 3, n = 4 and n ≥ 5, then to contact structures in Section 6, caring also separately about the cases n = 3 and n ≥ 5, finally concluding in the last Section 7. 9 2) DIFFERENTIAL GEOMETRY If X is a manifold with local coordinates (xi ) for i = 1, ..., n = dim(X), let E be a fibered manifold over X with dimX (E) = m, that is a manifold with local coordinates (xi , y k ) for i = 1, ..., n and k = 1, ..., m simply denoted by (x, y), projection π : E → X : (x, y) → (x) and changes of local coordinates x̄ = ϕ(x), ȳ = ψ(x, y). If E and F are two fibered manifolds over X with respective local coordinates (x, y) and (x, z), we denote by E×X F the fibered product of E and F over X as the new fibered manifold over X with local coordinates (x, y, z). We denote by f : X → E : (x) → (x, y = f (x)) a global section of E, that is a map such that π ◦ f = idX but local sections over an open set U ⊂ X may also be considered when needed. Under a change of coordinates, a section transforms like f¯(ϕ(x)) = ψ(x, f (x)) and the derivatives transform like: ∂ f¯l ∂ψ l ∂ψ l r (ϕ(x))∂ ϕ (x) = (x, f (x)) + (x, f (x))∂i f k (x) i ∂ x̄r ∂xi ∂y k We may introduce new coordinates (xi , y k , yik ) transforming like: ȳrl ∂i ϕr (x) = ∂ψ l ∂ψ l (x, y) + (x, y)yik ∂xi ∂y k k We shall denote by Jq (E) the q-jet bundle of E with local coordinates (xi , y k , yik , yij , ...) = (x, yq ) called jet coordinates and sections fq : (x) → (x, f k (x), fik (x), fijk (x), ...) = (x, fq (x)) transforming like the sections jq (f ) : (x) → (x, f k (x), ∂i f k (x), ∂ij f k (x), ...) = (x, jq (f )(x)) where both fq and jq (f ) are over the section f of E. It will be useful to introduce a multi-index µ = (µ1 , ..., µn ) with length | µ |= µ1 + ... + µn and to set µ + 1i = (µ1 ..., µi−1 , µi + 1, µi+1 , ..., µn ). Finally, a jet coordinate yµk is said to be of class i if µ1 = ... = µi−1 = 0, µi 6= 0. As the background will always be clear enough, we shall use the same notation for a vector bundle or a fibered manifold and their sets of sections [31,36]. We finally notice that Jq (E) is a fibered manifold over X with projection πq while Jq+r (E) is a fibered manifold over Jq (E) with projection πqq+r , ∀r ≥ 0 [, , ]. DEFINITION 2.1: A (nonlinear) system of order q on E is a fibered submanifold Rq ⊂ Jq (E) and a global or local solution of Rq is a section f of E over X or U ⊂ X such that jq (f ) is a section of Rq over X or U ⊂ X. DEFINITION 2.2: When the changes of coordinates have the linear form x̄ = ϕ(x), ȳ = A(x)y, we say that E is a vector bundle over X. Vector bundles will be denoted by capital letters C, E, F and will have sections denoted by ξ, η, ζ. In particular, we shall denote as usual by T = T (X) the tangent bundle of X, by T ∗ = T ∗ (X) the cotangent bundle, by ∧r T ∗ the bundle of r-forms and by Sq T ∗ the bundle of q-symmetric covariant tensors. When the changes of coordinates have the form x̄ = ϕ(x), ȳ = A(x)y + B(x) we say that E is an affine bundle over X and we define the associated vector bundle E over X by the local coordinates (x, v) changing like x̄ = ϕ(x), v̄ = A(x)v. DEFINITION 2.3: If the tangent bundle T (E) has local coordinates (x, y, u, v) changing like l ∂ψ l i k ūj = ∂i ϕj (x)ui , v̄ l = ∂ψ ∂xi (x, y)u + ∂y k (x, y)v , we may introduce the vertical bundle V (E) ⊂ T (E) as a vector bundle over E with local coordinates (x, y, v) obtained by setting u = 0 and changes ∂ψ l k v̄ l = ∂y k (x, y)v . Of course, when E is an affine bundle over X with associated vector bundle E over X, we have V (E) = E ×X E. With a slight abuse of language, we shall set E = V (E) as a vector bundle over E. For a later use, if E is a fibered manifold over X and f is a section of E, we denote by f −1 (V (E)) the reciprocal image of V (E) by f as the vector bundle over X obtained when replacing (x, y, v) by (x, f (x), v) in each chart. A similar construction may also be done for any affine bundle over E. Loking at the transition rules of Jq (E), we deduce easily the following results: PROPOSITION 2.4: Jq (E) is an affine bundle over Jq−1 (E) modeled on Sq T ∗ ⊗E E but we shall not specify the tensor product in general. 10 PROPOSITION 2.5: There is a canonical isomorphism V (Jq (E)) ≃ Jq (V (E)) = Jq (E) of vector k bundles over Jq (E) given by setting vµk = v,µ at any order and a short exact sequence: q πq−1 0 → Sq T ∗ ⊗ E → Jq (E) −→ Jq−1 (E) → 0 of vector bundles over Jq (E) allowing to establish a link with the formal theory of linear systems. PROPOSITION 2.6: There is an exact sequence: jq+1 D 0 → E −→ Jq+1 (E) −→ T ∗ ⊗ Jq (E) k is called the where Dfq+1 = j1 (fq ) − fq+1 is over fq with components (Dfq+1 )kµ,i = ∂i fµk − fµ+1 i (nonlinear) Spencer operator. As Jq+1 (E) ⊂ J1 (Jq (E)), there is an induced exact sequence: jq D 1 0 → E −→ Jq+1 (E) −→ T ∗ ⊗ Jq (E)/Sq+1 T ∗ ⊗ E where D1 is called the first Spencer operator. DEFINITION 2.7: If Rq ⊂ Jq (E) is a system of order q on E, then Rq+1 = ρ1 (Rq ) = J1 (Rq ) ∩ Jq+1 (E) ⊂ J1 (Jq (E)) is called the first prolongation of Rq and we may define the subsets Rq+r . In actual practice, if the system is defined by PDE Φτ (x, yq ) = 0 the first k ∂Φτ /∂yµk = 0. accordingly, prolongation is defined by adding the PDE di Φτ ≡ ∂i Φτ + yµ+1 i τ τ τ k fq ∈ Rq ⇔ Φ (x, fq (x)) = 0 and fq+1 ∈ Rq+1 ⇔ ∂i Φ + fµ+1i (x)∂Φ /∂yµk = 0 as identities on X or at least over an open subset U ⊂ X. Differentiating the first relation with respect to xi and substracting the second, we finally obtain: k (x))∂Φτ /∂yµk = 0 ⇒ Dfq+1 ∈ T ∗ ⊗ Rq (∂i fµk (x) − fµ+1 i (1) q+r+1 and the Spencer operator restricts to D : Rq+1 → T ∗ ⊗ Rq . We set Rq+r = πq+r (Rq+r+1 ). DEFINITION 2.8: The symbol of Rq is the family gq = Rq ∩ Sq T ∗ ⊗ E of vector spaces over Rq . The symbol gq+r of Rq+r only depends on gq by a direct prolongation procedure. We may define the vector bundle F0 over Rq by the short exact sequence 0 → Rq → Jq (E) → F0 → 0 and we have the exact induced sequence 0 → gq → Sq T ∗ ⊗ E → F0 . Setting aτk µ (x, yq ) = ∂Φτ /∂yµk (x, yq ) whenever | µ |= q and (x, yq ) ∈ Rq , we obtain: gq = {vµk ∈ Sq T ∗ ⊗ E | aτk µ (x, yq )vµk = 0}, | µ |= q, (x, yq ) ∈ Rq k k ⇒ gq+r = ρr (gq ) = {vµ+ν ∈ Sq+r T ∗ ⊗ E | aτk µ (x, yq )vµ+ν = 0}, | µ |= q, | ν |= r, (x, yq ) ∈ Rq In general, neither gq nor gq+r are vector bundles over Rq . On ∧s T ∗ we may introduce the usual bases {dxI = dxi1 ∧ ... ∧ dxis } where we have set I = (i1 < ... < is ). In a purely algebraic setting, one has: PROPOSITION 2.9: There exists a map δ : ∧s T ∗ ⊗ Sq+1 T ∗ ⊗ E → ∧s+1 T ∗ ⊗ Sq T ∗ ⊗ E which restricts to δ : ∧s T ∗ ⊗ gq+1 → ∧s+1 T ∗ ⊗ gq and δ 2 = δ ◦ δ = 0. k k . dxI } and set (δω)kµ = dxi ∧ ωµ+1 Proof: Let us introduce the family of s-forms ω = {ωµk = vµ,I i τµ τµ k k i 2 k i j k We obtain at once (δ ω)µ = dx ∧ dx ∧ ωµ+1i +1j = 0 and ak (δω)µ = dx ∧ (ak ωµ+1i ) = 0. Q.E.D. The kernel of each δ in the first case is equal to the image of the preceding δ but this may no longer be true in the restricted case and we set: s s s s s DEFINITION 2.10: Let Bq+r (gq ) ⊆ Zq+r (gq ) and Hq+r (gq ) = Zq+r (gq )/Bq+r (gq ) with H 1 (gq ) = 1 Hq (gq ) be the coboundary space im(δ), cocycle space ker(δ) and cohomology space at ∧s T ∗ ⊗ gq+r of the restricted δ-sequence which only depend on gq and may not be vector bundles. The symbol 11 1 s gq is said to be s-acyclic if Hq+r = ... = Hq+r = 0, ∀r ≥ 0, involutive if it is n-acyclic and finite type if gq+r = 0 becomes trivially involutive for r large enough. In particular, if gq is involutive and finite type, then gq = 0. Finally, Sq T ∗ ⊗ E is involutive for any q ≥ 0 if we set S0 T ∗ ⊗ E = E. Having in mind the example of xyx − y = 0 ⇒ xyxx = 0 with rank changing at x = 0, we have: PROPOSITION 2.11: If gq is 2-acyclic and gq+1 is a vector bundle over Rq , then gq+r is a vector bundle over Rq , ∀r ≥ 1. Proof: We may define the vector bundle F1 over Rq by the following ker/coker exact sequence where we denote by h1 ⊆ T ∗ ⊗ F0 the image of the central map: 0 → gq+1 → Sq+1 T ∗ ⊗ E → T ∗ ⊗ F0 → F1 → 0 and we obtain by induction on r the following commutative and exact diagram of vector bundles over Rq : 0 ↓ 0→ 0→ 0→ 0 ↓ gq+r+1 ↓δ T ∗ ⊗ gq+r ↓δ ∧2 T ∗ ⊗ gq+r−1 ↓δ ∧3 T ∗ ⊗ Sq+r−2 T ∗ ⊗ E → → → = Sq+r+1 T ∗ ⊗ E ↓δ T ∗ ⊗ Sq+r T ∗ ⊗ E ↓δ ∧2 T ∗ ⊗ Sq+r−1 T ∗ ⊗ E ↓δ ∧3 T ∗ ⊗ Sq+r−2 T ∗ ⊗ E → → → 0 ↓ Sr+1 T ∗ ⊗ F0 ↓δ T ∗ ⊗ Sr T ∗ ⊗ F 0 ↓δ ∧2 T ∗ ⊗ Sr−1 T ∗ ⊗ F0 → → 0 ↓ Sr T ∗ ⊗ F 1 ↓δ T ∗ ⊗ Sr−1 T ∗ ⊗ F1 where all the maps have been given after Definition 2.9. The image of the central map of the top row is hr+1 = ρr (h1 ) and a chase proves that h1 is (s − 1)-acyclic whenever gq is s-acyclic by extending the diagram. The proposition finally follows by upper-semicontinuity from the relation: dim(gq+r+1 ) + dim(hr+1 ) = m dim(Sq+r+1 T ∗ ) Q.E.D. LEMMA 2.12: If gq is involutive and gq+1 is a vector bundle over Rq , then gq is also a vector bundle over Rq . In this case, changing linearly the local coordinates if necessary, we may look at k the maximum number β of equations that can be solved with respect to vn...n and the intrinsic number α = m − β indicates the number of y that can be given arbitrarily. Using the exactness of the top row in the preceding diagram and a delicate 3-dimensional chase, we have (See [31] and [36],p336 for the details): THEOREM 2.13: If Rq ⊂ Jq (E) is a system of order q on E such that gq+1 is a vector bundle over Rq and gq is 2-acyclic, then there is an exact sequence: q+r+1 πq+r κ r Sr T ∗ ⊗ F1 Rq+r+1 −→ Rq+r −→ where κr is called the r-curvature and κ = κ0 is simply called the curvature of Rq . We notice that Rq+r+1 = ρr (Rq+1 ) and Rq+r = ρr (Rq ) in the following commutative diagram: Rq+r+1 q+r+1 ↓ πq+r (1) Rq+r ∩ Rq+r q+r+1 πq+1 −→ πqq+r −→ πqq+r −→ 12 Rq+1 ↓ πqq+1 (1) Rq ∩ Rq (1) (1) We also have Rq+r ⊆ ρr (Rq ) because we have successively: (1) q+r+1 Rq+r = πq+r (Rq+r+1 ) = ⊆ = = q+r+1 πq+r (Jr (Rq+1 ) ∩ Jq+r+1 (E)) Jr (πqq+1 )(Jr (Rq+1 )) ∩ Jq+r (E) (1) Jr (Rq ) ∩ Jq+r (E) (1) ρr (Rq ) while chasing in the following commutative 3-dimensional diagram: Jr (Rq+1 ) −→ Jr (Jq+1 (E)) ↓ ր −→ Jq+r+1 (E) ↓ Jr (Rq ) −→ Jr (Jq (E)) ր ↓ ր −→ Jq+r (E) ր Rq+r+1 ↓ Rq+r with a well defined map Jr (πqq+1 ) : Jr (Jq+1 (E)) → Jr (Jq (E)). We finally obtain the following crucial Theorem and its Corollary (Compare to [31], p 72-74 or [36], p 340 to [16]): THEOREM 2.14: Let Rq ⊂ Jq (E) be a system of order q on E such that Rq+1 is a fibered submanifold of Jq+1 (E). If gq is 2-acyclic and gq+1 is a vector bundle over Rq , then we have (1) (1) Rq+r = ρr (Rq ) for all r ≥ 0. q+r+1 DEFINITION 2.15: A system Rq ⊂ Jq (E) is said to be formally integrable if πq+r : Rq+r+1 → Rq+r is an epimorphism of fibered manifolds for all r ≥ 1 and involutive if it is formally integrable with an involutive symbol gq . We have the following useful test [16,31,52]: COROLLARY 2.16: Let Rq ⊂ Jq (E) be a system of order q on E such that Rq+1 is a fibered submanifold of Jq+1 (E). If gq is 2-acyclic (involutive) and if the map πqq+1 : Rq+1 → Rq is an epimorphism of fibered manifolds, then Rq is formally integrable (involutive). This is all what is needed in order to study systems of algebraic ordinary differential (OD) or partial differential (PD) equations. 13 3) DIFFERENTIAL ALGEBRA We now present in an independent manner two OD examples and two PD examples, among the best ones we know, showing the difficulties met when studying differential ideals and ask the reader to revisit them later on while reading the main Theorems. As only a few results will be proved, the interested reader may look at [32,34,36] for more details and compare to [20,22,49]. EXAMPLE 3.1: If k = Q, y is a differential indeterminate and dx is a formal derivation, we may set dx y = yx , dx yx = yxx and so on in order to introduce the differential ring A = k[y, yx , yxx , ...] = k{y}. We consider the (proper) differential ideal a ⊂ A generated by the differential polynomial P = yx2 − 4y. We have dx P = 2yx (yxx − 2) and a cannot be a prime differential ideal. Hence, looking for the ”solutions ” of P = 0, we must have either yx = 0 ⇒ y = 0 or yxx = 0 and thus y = (x+c)2 where c should be a ”constant ” with no clear meaning. However, we have successively: P ∈a ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ yx (yxx − 2) ∈ a yx yxxx + yxx (yxx − 2) ∈ a (yx )2 yxxx ∈ a yyxxx ∈ a yyxxxx + yx yxxx ∈ a yx (yxxx )2 ∈ a 2yx yxxx yxxxx + yxx (yxxx )2 ∈ a ⇒ 2yx yxxx yxxxx = −yxx(yxxx )2 mod(a) 4yxx yxxx yxxxx + 2yx (yxxxx )2 + 2yx yxxx yxxxxx + (yxxx )3 ∈ a 4yxx (yxxx )2 yxxxx + 2yx yxxx (yxxxx )2 + 2yx (yxxx )2 yxxxxx + (yxxx )4 ∈ a 4yxx (yxxx )2 yxxxx + 2yx yxxx (yxxxx )2 + (yxxx )4 ∈ a 3yxx (yxxx )2 yxxxx + (yxxx )4 ∈ a −6yx yxxx(yxxxx )2 = (yxxx )4 ∈ a (yxxx )5 ∈ a ⇒ yxxx ∈ rad(a) and thus a is neither prime nor perfect, that is equal to its radical, but rad(a) is perfect as it is the intersection of the prime differential ideal generated by y with the prime differential ideal generated by yx2 − 4y and yxx − 2, both containing yxxx . EXAMPLE 3.2: With the notations of the previous Example, let us consider the (proper) differential ideal a ⊂ A generated by the differential polynomial P = yx2 − 4y 3 . We have dx P = 2yx (yxx − 6y 2 ) and a cannot be prime differential ideal. Hence, looking for the ”solutions ” of P = 0, we must have either yx = 0 ⇒ y = 0 or yx2 − 4y 3 = 0 and yxx − 6y 2 = 0. However, we have successively: P ∈a ⇒ ⇒ ⇒ ⇒ ⇒ yx (yxx − 6y 2 ) ∈ (a) ⇒ (yx )2 (yxx − 6y 2 )2 ∈ a ⇒ 4y 3 (yxx − 6y 2 )2 ∈ a yxx (yxx − 6y 2 ) + yx (yxxx − 12yyx) ∈ a yxx (yxx − 6y 2 )2 ∈ a (yxx )2 (yxx − 6y 2 )2 − 12y 2 yxx (yxx − 6y 2 )2 + 36y 4 (yxx − 6y 2 )2 ∈ a (yxx − 6y 2 )4 ∈ a ⇒ yxx − 6y 2 ∈ rad(a) and thus a is neither prime or perfect as before but rad(a) is the prime differential ideal generated by yx2 − 4y 3 and yxx − 6y 2 . EXAMPLE 3.3: If k = Q as before, y is a differential indeterminate and (d1 , d2 ) are two formal derivations, let us consider the differential ideal generated by P1 = y22 − 21 (y11 )2 and P2 = y12 − y11 in k{y}. Using crossed derivatives, we get successively: P1 , P2 ∈ a ⇒ ⇒ ⇒ ⇒ y112 − y111 ∈ a, y122 − y11 y111 ∈ a, y222 − y11 y111 ∈ a Q = d2 P2 − d1 P1 + d1 P2 = (y11 − 1)y111 ∈ a d1 Q = (y111 )2 + (y11 − 1)y1111 ∈ a ((y111 )3 ∈ a ⇒ y111 ∈ rad(a) and thus a is neither prime nor perfect but rad(a) is a perfect differential ideal and even a prime differential ideal p because we obtain easily from the last section that the resisual differential ring k{y}/p ≃ k[y, y1 , y2 , y11 ] is a differential integral domain. Its quotient field is thus the differential 14 field K = Q(k{y}/p) ≃ k(y, y1 , y2 , y11 ) with the rules: d1 y = y1 , d1 y1 = y11 , d1 y11 = 0, d2 y = y2 , d2 y1 = y11 , d2 y11 = 0 as a way to avoid looking for solutions. The formal linearization is the linear system R2 ⊂ J2 (E) obtained in the last section where it was defined over R2 , but not over K, by the two linear second order PDE: Y22 − y11 Y11 = 0, Y12 − Y11 = 0 changing slightly the notations for using the letter v only when looking at the symbols. It is at this point that the problem starts because R2 is indeed a fibered manifold with arbitrary parametric jets (y, y1 , y2 , y11 ) but R3 = ρ1 (R2 ) is no longer a fibered manifold because the dimension of its symbol changes when y11 = 1. We understand therefore that there should be a close link existing between formal integrability and the search for prime differential ideals or differential fields. The solution of this problem has been provided as early as in 1983 for studying the ”Differential Galois Theory ” but has never been acknowledged and is thus not known today ([32,34]). The idea is to add the third order PDE y111 = 0 and thus the linearized PDE Y111 = 0 obtaining therefore a third order involutive system well defined over K with symbol g3 = 0. We invite the reader to treat similarly the two previous examples and to compare. EXAMPLE 3.4: If k = Q as before, y is a differential indeterminate and (d1 , d2 ) are two formal derivations, let us consider the differential ideal generated by P1 = y22 − 13 (y11 )3 and P2 = y12 − 21 (y11 )2 in k{y}. Using crossed derivatives, we get successively: P1 , P2 ∈ a ⇒ d2 P2 − d1 P1 + y11 d1 P2 = 0 ⇒ R2 involutive ⇒ y222 − (y11 )3 y111 = 0, y122 − (y11 )2 y111 = 0, y112 − y11 y111 = 0, ... and thus dim(gq ) = 1, ∀q ≥ 1. As the symbol g2 is involutive, there is an infinite number of parametric jets (y, y1 , y2 , y11 , y111 , ...) and thus k{y}/a ≃ k[y, y1 , y2 , y11 , y111 , ...] is a differential integral domain with d2 y2 = y22 = 13 (y11 )3 , d2 y11 = y112 = y11 y111 , .... It follows that a = p is a prime differential ideal with rad(p) = p. The second order linearized system is: Y22 − (y11 )2 Y11 = 0, Y12 − y11 Y11 = 0 is now well defined over the differential field K = Q(k{y}/p) and is involutive. DEFINITION 3.5: A differential ring is a ring A with a finite number of commuting derivations (∂1 , ..., ∂n ) such that ∂i (a + b) = ∂i a + ∂i b, ∂i (ab) = (∂i a)b + a∂i b that can be extended to derivations of the ring of quotients Q(A) by setting ∂i (a/s) = (s∂i a − a∂i s)/s2 , ∀0 6= s, a ∈ A. We shall suppose from now on that A is even an integral domain and use the differential field K = Q(A). For example, if x1 , ..., xn are indeterminates over Q, then Q[x] = Q[x1 , ..., xn ] is a differential ring for the standard (∂1 , ..., ∂n ) with quotient field Q(x). If K is a differential field as above and (y 1 , ..., y m ) are indeterminates over K, we transform the polynomial ring K{y} = limq→∞ K[yq ] into a differential ring by introducing as usual the formal k ∂/∂yµk and we shall set K < y >= Q(K{y}). derivations di = ∂i + yµ+1 i DEFINITION 3.6: We say that a ⊂ K{y} is a differential ideal if it is stable by the di , that is if di a ∈ a, ∀a ∈ a, ∀i = 1, ..., n. We shall also introduce the radical rad(a) = {a ∈ A | ∃r, ar ∈ a} ⊇ a and say that a is a perfect (or radical) differential ideal if rad(a) = a. If S is any subset of A, we shall denote by {S} the differential ideal generated by S and introduce the (non-differential) ideal ρr (S) = {dν a | a ∈ S, 0 ≤| ν |≤ r} in A. 15 LEMMA 3.7: If a ⊂ A is differential ideal, then rad(a) is a differential ideal containing a. Proof: If d is one of the derivations, we have ar−1 da = 1r dar ∈ {ar } and thus: (r − 1)ar−2 (da)2 + ar−1 d2 a ∈ {ar } ⇒ ar−2 (da)3 ∈ {ar }, ... ⇒ (da)2r−1 ∈ {ar } Q.E.D. LEMMA 3.8: If a ⊂ K{y}, we set aq = a ∩ K[yq ] with a0 = a ∩ K[y] and a∞ = a. We have in general ρr (aq ) ⊆ aq+r and the problem will be to know when we may have equality. We shall say that a differential extension L = Q(K{y}/p) is a finitely generated differential extension of K and we may define the evaluation epimorphism K{y} → K{η} ⊂ L with kernel p where η or ȳ is the residual image of y modulo p. If we study such a differential extension L/K, by analogy with Section 2, we shall say that Rq or gq is a vector bundle over Rq if one can find a certain number of maximum rank determinant Dα that cannot be all zero at a generic solution of pq defined by differential polynomials Pτ , that is to say, according to the Hilbert Theorem of Zeros, we may find polynomials Aα , Bτ ∈ K{yq } such that : X X Aα Dα + Bτ Pτ = 1 α τ In particular the following Lemma will be used in the next important Theorem: LEMMA 3.9: If p is a prime differential ideal of K{y}, then, for q sufficiently large, there is a polynomial D ∈ K[yq ] such that D ∈ / pq and : Dpq+r ⊂ rad(ρr (pq )) ⊂ pq+r , ∀r ≥ 0 THEOREM 3.10: (Primality test) Let pq ⊂ K[yq ] and pq+1 ⊂ K[yq+1 ] be prime ideals such that pq+1 = ρ1 (pq ) and pq+1 ∩ K[yq ] = pq . If the symbol gq of the algebraic variety Rq defined by pq is 2-acyclic and if its first prolongation gq+1 is a vector bundle over Rq , then p = ρ∞ (pq ) is a prime differential ideal with p ∩ K[yq+r ] = ρr (pq ), ∀r ≥ 0. COROLLARY 3.11: Every perfect differential ideal of {y} can be expressed in a unique way as the non-redundant intersection of a finite number of prime differential ideals. COROLLARY 3.12: (Differential basis) If r is a perfect differential ideal of K{y}, then we have r = rad(ρ∞ (rq )) for q sufficiently large. EXAMPLE 3.13: As K{y} is a polynomial ring with an infinite number of variables it is not noetherian and an ideal may not have a finite basis. With K = Q, n = 1 and d = dx , then a = {yyx, yx yxx , yxx yxxx , ...} ⇒ (yx )2 + yyxx ∈ a ⇒ rad(a) = {yx } is a prime differential ideal. PROPOSITION 3.14: If ζ is differentially algebraic over K < η > and η is differentially algebraic over K, then ζ is differentially algebraic over K. Setting ξ = ζ − η, it follows that, if L/K is a differential extension and ξ, η ∈ L are both differentially algebraic over K, then ξ + η, ξη and di ξ are differentially algebraic over K. If L = Q(K{y}/p), M = Q(K{z}/q) and N = Q(K{y, z}/r) are such that p = r ∩ K{y} and q = r ∩ K{z}, we have the two towers K ⊂ L ⊂ N and K ⊂ M ⊂ N of differential extensions and we may therefore define the new tower K ⊆ L ∩ M ⊆< L, M >⊆ N . However, if only L/K and M/K are known and we look for such an N containing both L and M , we may use the universal property of tensor products an deduce the existence of a differential morphism L⊗K M → N by setting d(a ⊗ b) = (dL a) ⊗ b + a ⊗ (dM b) whenever dL | K = dM | K = ∂. The construction of an abstract composite differential field amounts therefore to look for a prime differential ideal in L⊗K M which is a direct sum of integral domains [32]. 16 DEFINITION 3.15: A differential extension L of a differential field K is said to be differentially algebraic over K if every element of L is differentially algebraic over K. The set of such elements is an intermediate differential field K ′ ⊆ L, called the differential algebraic closure of K in L. If L/K is a differential extension, one can always find a maximal subset S of elements of L that are differentially transcendental over K and such that L is differentially algebraic over K < S >. Such a set is called a differential transcedence basis and the number of elements of S is called the differential transcendence degree of L/K. THEOREM 3.16: The number of elements in a differential basis of L/K does not depent on the generators of L/K and his value is dif f trd(L/K) = α. Moreover, if K ⊂ L ⊂ M are differential fields, then dif f trd(M/K) = dif f trd(M/L) + dif f trd(L/K). THEOREM 3.17: If L/K is a finitely generated differential extension, then any intermediate differential field K ′ between K and L is also finitely generated over K. EXAMPLE 3.18: With k = Q, let us introduce the manifolds X with local coordinate x and Y with local coordinates (y 1 , y 2 ). We may consider the algebraic Lie pseudogroup Γ ⊂ aut(Y ) of (local, invertible) transformations of Y preserving the 1-form y 2 dy 1 , that is to say made up by transformations ȳ = g(y) solutions of the Pfaffian system ȳ 2 dȳ 1 = y 2 dy 1 . Equivalently, we have to look for the invertible solutions of the algebraic first order involutive system R1 ⊂ J1 (Y × Y ) defined over k(y 1 , y 2 ) by the first order involutive system of algebraic PD equations in Lie form: ȳ 2 ∂ ȳ 1 = y2, ∂y 1 ȳ 2 ∂ ȳ 1 =0 ∂y 2 ⇒ ∂(ȳ 1 , ȳ 2 ) =1 ∂((y 1 , y 2 ) By chance one can obtain the generic solution ȳ 1 = g(y 1 ), ȳ 2 = y 2 /(∂g(y 1 )/∂y 1 ) where g is an arbitrary function of one variable. Now, if we introduce a function y = f (x) and consider the corresponding transformations of the jets (y 1 , y 2 , yx1 , yx2 , ...), we obtain the only generating differential invariant Φ ≡ ȳ 2 ȳx1 = y 2 yx1 . Hence, setting K = k < y 2 yx1 > and L = k < y 1 , y 2 >, we have the tower of differential extensions k ⊂ K ⊂ L. As any intermediate differential field K ⊂ K ′ ⊂ L is finitely generated, let us consider K ′ = k < y 2 yx1 , yx2 >. Then: ȳx2 ∂ ȳ 2 ∂ ȳ 2 ∂ ȳ 2 1 ∂ ȳ 2 y + ⇒ = 0, = 1 ⇒ ȳ 1 = y 1 + cst, x ∂y 1 ∂y 2 ∂y 1 ∂y 2 ȳ 2 = y 2 allows to define a Lie subpseudogroup Γ′ ⊂ Γ with generating differential invariants yx1 , y 2 in such a way that, if we set K” = k < yx1 , y 2 >, we have the strict inclusions K ⊂ K ′ ⊂ K” and it does not seem possible to obtain a differential Galois correspondence between algebraic subpseudogroups and intermediate differential fields, similar to the classical one. We have explained in [32] how to overcome this problem but this is out of the scope of this paper. It is finally important to notice that the fundamental differential isomorphism [4,5,32]: Q(L⊗K L) ≃ Q(L⊗k(y) k[Γ]) is the Hopf dual of the projective limit of the action graph isomorphisms between fibered manifolds: Aq ×X Aq ≃ Aq ×Y Rq of fibered dimension 2(q + 2). The corresponding automorphic system y 2 yx1 = ω in Lie form where ω is a geometric object as in the Introduction and its prolongations has been introduced as early as in 1903 by E. Vessiot [53,54] as a way to study principal homogeneous spaces (PHS) for Lie pseudogroups, namely if y = f (x) is a solution and ȳ = f¯(x) is another solution, then there exists one and only one transformation ȳ = g(y) of Γ such that f¯ = g ◦ f . This is all what is needed in order to study systems of infinitesimal Lie equations defined, like the classical and conformal Killing systems, over Q < ω > where ω is a geometric object solution of a system of algebraic Vessiot structure equations (constant riemannian curvature, zero Weyl tensor). 17 4) DIFFERENTIAL DUALITY Let A be a unitary ring, that is 1, a, b ∈ A ⇒ a + b, ab ∈ A, 1a = a1 = a and even an integral domain (ab = 0 ⇒ a = 0 or b = 0) with field of fractions K = Q(A). However, we shall not always assume that A is commutative, that is ab may be different from ba in general for a, b ∈ A. We say that M = A M is a left module over A if x, y ∈ M ⇒ ax, x + y ∈ M, ∀a ∈ A or a right module MB over B if the operation of B on M is (x, b) → xb, ∀b ∈ B. If M is a left module over A and a right module over B with (ax)b = a(xb), ∀a ∈ A, ∀b ∈ B, ∀x ∈ M , then we shall say that M = A MB is a bimodule. Of course, A = A AA is a bimodule over itself. We define the torsion submodule t(M ) = {x ∈ M | ∃0 6= a ∈ A, ax = 0} ⊆ M and M is a torsion module if t(M ) = M or a torsion-free module if t(M ) = 0. We denote by homA (M, N ) the set of morphisms f : M → N such that f (ax) = af (x). We finally recall that a sequence of modules and maps is exact if the kernel of any map is equal to the image of the map preceding it. When A is commutative, hom(M, N ) is again an A-module for the law (bf )(x) = f (bx) as we have (bf )(ax) = f (bax) = f (abx) = af (bx) = a(bf )(x). In the non-commutative case, things are more complicate and, given A M and A NB , then homA (M, N ) becomes a right module over B for the law (f b)(x) = f (x)b. DEFINITION 4.1: A module F is said to be free if it is isomorphic to a (finite) power of A called the rank of F over A and denoted by rkA (F ) while the rank rkA (M ) of a module M is the rank of a maximum free submodule F ⊂ M . It follows from this definition that M/F is a torsion module. In the sequel we shall only consider finitely presented modules, namely finitely generated p d1 F0 −→ M −→ 0 where F0 and F1 are free modules defined by exact sequences of the type F1 −→ modules of finite ranks m0 and m1 often denoted by m and p in examples. A module P is called projective if there exists a free module F and another (projective) module Q such that P ⊕ Q ≃ F . f g PROPOSITION 4.2: For any short exact sequence 0 → M ′ −→ M −→ M ” → 0, we have the relation rkA (M ) = rkA (M ′ ) + rkA (M ”), even in the non-commutative case. The following proposition will be used many times in Section 5, in particular for exhibiting the Weyl tensor from the Riemann tensor ([2],p 73)([50],p 33) : PROPOSITION 4.3: We shall say that the following short exact sequence splits if one of the following equivalent three conditions holds: u ′ v ←− f ←− g 0 −→ M −→ M −→ M ′′ −→ 0 • There exists a monomorphism v : M ′′ → M called lift of g and such that g ◦ v = idM ′′ . • There exists an epimorphism u : M → M ′ called lift of f and such that u ◦ f = idM ′ . • There exist isomorphisms ϕ = (u, g) : M → M ′ ⊕ M ′′ and ψ = f + v : M ′ ⊕ M ′′ → M that are inverse to each other and provide an isomorphism M ≃ M ′ ⊕ M ′′ with f ◦ u + v ◦ g = idM and thus ker(u) = im(v). These conditions are automatically satisfied if M ” is free or projective. Using the notation M ∗ = homA (M, A), for any morphism f : M → N , we shall denote by f : N ∗ → M ∗ the morphism which is defined by f ∗ (h) = h ◦ f, ∀h ∈ homA (N, A) and satisfies rkA (f ) = rkA (im(f )) = rkA (f ∗ ), ∀f ∈ homA (M, N )(See [37], Corollary 5.3, p 179). We may take ∗ d d 1 2 F0 −→ 0 and apply homA (•, A) in F1 −→ out M in order to obtain the deleted sequence ... −→ d∗ 2 d∗ 1 order to get the sequence ... ←− F1∗ ←− F0∗ ←− 0. PROPOSITION 4.4: The extension modules ext0A (M ) = ker(d∗1 ) = homA (M, A) = M ∗ and exti (M ) = extiA (M ) = ker(d∗i+1 )/im(d∗i ), ∀i ≥ 1 do not depend on the resolution chosen and are torsion modules for i ≥ 1. 18 Let A be a differential ring, that is a commutative ring with n commuting derivations {∂1 , ..., ∂n }, that is ∂i ∂j = ∂j ∂i = ∂ij , ∀i, j = 1, ..., n while ∂i (a+b) = ∂i a+∂i b and ∂i (ab) = (∂i a)b+a∂i b, ∀a, b ∈ A. We shall use thereafter a differential integral domain A with unit 1 ∈ A whenever we shall need a differential field Q ⊂ K = Q(A) of coefficients, that is a field (a ∈ K ⇒ 1/a ∈ K) with ∂i (1/a) = −(1/a2 )∂i a, in order to exhibit solved forms for systems of partial differential equations as in the preceding section. Using an implicit summation on multi-indices, we may introduce the (noncommutative) ring of differential operators D = A[d1 , ..., dn ] = A[d] with elements P = aµ dµ such that | µ |< ∞ and di a = adi + ∂i a. The highest value of |µ| with aµ 6= 0 is called the order of the operator P and the ring D with multiplication (P, Q) −→ P ◦ Q = P Q is filtred by the order q of the operators with the filtration 0 = D−1 ⊂ D0 ⊂ D1 ⊂ ... ⊂ Dq ⊂ ... ⊂ D∞ = D. Moreover, it is clear that D, as an algebra, is generated by A = D0 and T = D1 /D0 with D1 = A ⊕ T if we identify an element ξ = ξ i di ∈ T with the vector field ξ = ξ i (x)∂i of differential geometry, but with ξ i ∈ A now. It follows that D = D DD is a bimodule over itself, being at the same time a left D-module D D by the composition P −→ QP and a right D-module DD by the composition P −→ P Q with Dr Ds = Dr+s , ∀r, s ≥ 0 in any case. k to If we introduce differential indeterminates y = (y 1 , ..., y m ), we may extend di yµk = yµ+1 i d i k + ∂i aτk µ yµk for τ = 1, ..., p. Therefore, setting Dy 1 + ... + Dy m = di Φτ ≡ aτk µ yµ+1 Φτ ≡ aτk µ yµk −→ i m Dy ≃ D and calling I = DΦ ⊂ Dy the differential module of equations, we obtain by residue the p differential module or D-module M = Dy/DΦ, introducing the canonical projection Dy −→ M → 0 k k and denoting the residue of yµ by ȳµ when there can be a confusion. Introducing the two free differential modules F0 ≃ Dm0 , F1 ≃ Dm1 , we obtain equivalently the free presentation p d1 F0 −→ M → 0 of order q when d1 = D = Φ ◦ jq . It follows that M can be endowed F1 −→ with a quotient filtration obtained from that of Dm which is defined by the order of the jet coordinates yq in Dq y. We shall suppose that the system Rq = ker(Φ) is formally integrable. We have therefore the inductive limit 0 = M−1 ⊆ M0 ⊆ M1 ⊆ ... ⊆ Mq ⊆ ... ⊆ M∞ = M with di Mq ⊆ Mq+1 which is the dual of the projective limit R = R∞ → ... → Rq → R0 → 0 if we set R = homK (M, K) with Rq = homK (Mq , K) and DRq+1 ⊆ T ∗ ⊗ Rq . This is the main reason for using a differential field K because homK (•, K) transform any short exact sequence into a short exact sequence. We have in general Dr Is ⊆ Ir+s , ∀r ≥ 0, ∀s < q with Ir = I ∩ Dr y. More generally, introducing the successive CC as in the preceding Section while changing slightly the numbering of the respective operators, we may finally obtain the free resolution of M , namely p d1 d2 d3 F0 −→ M −→ 0 where p is the canonical projecF1 −→ F2 −→ the exact sequence ... −→ tion. Also, with a slight abuse of language, when D = Φ ◦ jq is involutive, that is to say when Rq = ker(Φ) is involutive, one should say that M has an involutive presentation of order q or that Mq is involutive. REMARK 4.5: In actual practice, one must never forget that D = Φ ◦ jq acts on the left on column vectors in the operator case and on the right on row vectors in the module case. For this reason, when E is a (finite dimensional) vector bundle over X, we may apply the correspondence J∞ (E) ↔ D⊗K E ∗ : Jq (E) ↔ Dq ⊗K E ∗ with πqq+1 : Jq+1 (E) → Jq (E) ↔ Dq ⊂ Dq+1 and E ∗ = homK (E, K) between jet bundles and left differential modules in order to be able to use the double dual isomorphism E ≃ E ∗∗ in both cases. We shall say that D(E) = D ⊗K E ∗ = ind(E ∗ ) is the the left differential module induced by E ∗ . Hence, starting from a differential operator D∗ D E −→ F , we may obtain a finite presentation D⊗K F ∗ −→ D⊗K E ∗ → M → 0 and conversely, keeping the same operator matrix if we act on the right of row vectors. This comment becomes particularly useful when dealing with the Poincaré sequence in electromagnetism (n = 4) or even as we already saw in the Introduction (n = 3). Roughly speaking, homological algebra has been created in order to find intrinsic properties of modules not depending on their presentations or even on their resolutions and we now exhibit another approach by defining the formal adjoint of an operator P and an operator matrix D: ad DEFINITION 4.6: Setting P = aµ dµ ∈ D ←→ ad(P ) = (−1)|µ| dµ aµ ∈ D, we have ad(ad(P )) = 19 P and ad(P Q) = ad(Q)ad(P ), ∀P, Q ∈ D. Such a definition can be extended to any matrix of operators by using the transposed matrix of adjoint operators and we get: < λ, Dξ >=< ad(D)λ, ξ > + div (...) from integration by part, where λ is a row vector of test functions and <> the usual contraction. We quote the useful formulas rkD (D) = rkD (ad(D)) as in ([34], p 339-341 or [35]). The following technical Lemma is crucially used in the next proposition: LEMMA 4.7: If f ∈ aut(X) is a local diffeomorphisms on X, we may set x = f −1 (y) = g(y) and we have the identity: ∂ 1 ( ∂i f k (g(y)) ≡ 0. ∂y k ∆(g(y)) D PROPOSITION 4.8: If we have an operator E −→ F , we may obtain by duality an operator ∧n T ∗ ⊗ E ∗ ad(D) ←− ∧n T ∗ ⊗ F ∗ . Now, with operational notations, let us consider the two differential sequences: D D 1 ζ ξ −→ η −→ ad(D) ad(D1 ) ν ←− µ ←− λ where D1 generates all the CC of D. Then D1 ◦ D ≡ 0 ⇐⇒ ad(D) ◦ ad(D1 ) ≡ 0 but ad(D) may not generate all the CC of ad(D1 ) as we already saw in the Introduction. Passing to the module framework, we just recognize the definition of ext1 (M ) when M is determined by D. As D = D DD is a bimodule, then M ∗ = homD (M, D) is a right D-module according to Lemma 3.1 and we may thus define a right module ND by the ker/coker long exact sequence D∗ 0 ←− ND ←− F1∗ ←− F0∗ ←− M ∗ ←− 0 but we have [6,36,43,51]: THEOREM 4.9: We have the side changing procedures M = D M → MD = ∧n T ∗ ⊗A M and ND → N = D N = homA (∧n T ∗ , ND ) with D ((MD )) = M and D (ND ) = N . Now, exactly like we defined the differential module M from D, we may define the differential module N from ad(D). For any other presentation of M with an accent, we have [23,36]: THEOREM 4.10: The modules N and N ′ are projectively equivalent, that is one can find two projective modules P and P ′ such that N ⊕ P ≃ N ′ ⊕ P ′ and we obtain therefore extiD (N ) ≃ extiD (N ′ ), ∀i ≥ 1. THEOREM 4.11: The operator D is simply parametrizable if ext1 (N ) = 0 and doubly parametrizable if ext1 (N ) = 0 and ext2 (N ) = 0. Moreover, we have the ker/coker long exact sequence: ǫ 0 → ext1 (N ) → M −→ M ∗∗ → ext2 (N ) → 0 where (ǫ(m))(f ) = f (m) whenever f ∈ M ∗ and we have t(M ) = ext1 (N ) = ker(ǫ). Proof: We prove first that t(M ) ⊆ ker(ǫ). Indeed, if m ∈ t(M ), then one may find 0 6= P ∈ D such that P m = 0 and thus f (P m) = P f (m) = 0 ⇒ f (m) = 0 because D = K[d] is an integral domain and thus t(M ) ⊆ ker(ǫ). Let us now start with a free presentation of M = cocker(d1 ): p d 1 F0 −→ M −→ 0 F1 −→ Applying homD (M, D), we may define ND = coker(d∗1 ) and exhibit the following free resolution of N by right D-modules: d∗ d∗ d∗ −1 1 0 ∗ ∗ ←− F−2 0 ←− ND ←− F1∗ ←− F0∗ ←− F−1 20 where M ∗ = ker(d∗1 ) = im(d∗0 ) ≃ coker(d∗−1 ). The deleted sequence is: d∗ d∗ −1 d∗ 1 0 ∗ ∗ 0 ←− F1∗ ←− F0∗ ←− F−1 ←− F−2 Applying again homD (•, D) and using the canonical isomorphism F ∗∗ ≃ F for any free module F of finite rank, we get the sequence of left D-modules: d 1 F0 0 −→ F1 −→ ↓ M ↓ 0 d 0 −→ F−1 ց ↑ ǫ −→ M ∗∗ ↑ 0 d−1 −→ F−2 Denoting as usual a coboundary space by B, a cocycle space by Z and the corresponding cohomology by H = Z/B, we get the commutative and exact diagram: 0 −→ B0 ↓ 0 −→ Z0 −→ F0 k −→ F0 −→ −→ M ↓ǫ M ∗∗ −→ 0 An easy chase provides at once H0 = Z0 /B0 = ext1D (N ) ≃ ker(ǫ). It follows that ker(ǫ) is a torsion module and, as we already know that t(M ) ⊆ ker(ǫ) ⊆ M , we finally obtain t(M ) = ker(ǫ). Also, as B−1 = im(ǫ) and Z−1 ≃ M ∗∗ , we obtain H−1 = Z−1 /B−1 = ext2A (N, A) ≃ coker(ǫ). Accordingly, a torsion-free (ǫ injective)/reflexive (ǫ bijective) module is described by an operator that admits respectively a single/double step parametrization. Q.E.D. We know turn to the operator framework; D DEFINITION 4.12: If a differential operator ξ −→ η is given, a direct problem is to find generatD1 ζ such that Dξ = η ⇒ D1 η = 0. Conversely, ing compatibility conditions (CC) as an operator η −→ D D 1 ζ, the inverse problem will be to look for ξ −→ η such that D1 generates the CC of D given η −→ and we shall say that D1 is parametrized by D if such an operator D is existing. We finally notice that any operator is the adjoint of a certain operator because ad(ad(P )) = P, ∀P ∈ D and we get: THEOREM 4.13: (reflexivity test) In order to check whether M is reflexive or not, that is to find out a parametrization if t(M ) = 0 which can be again parametrized, the test has 5 steps which are drawn in the following diagram where ad(D) generates the CC of ad(D1 ) and D1′ generates the CC of D = ad(ad(D)) while ad(D−1 ) generates the CC of ad(D) and D′ generates the CC of D−1 : η′ D 4 φ 3 θ −→ ad(D−1 ) ←− D ξ −→ ad(D) ν ←− 5 ζ 1 λ 2 ր ր D−1 ζ′ D1′ ′ η µ D1 −→ ad(D1 ) ←− D1 parametrized by D ⇔ D1 = D1′ ⇔ ext1 (N ) = 0 ⇔ ǫ injective ⇔ t(M ) = 0 D parametrized by D−1 ⇔ D = D′ ⇔ ext2 (N ) = 0 ⇔ ǫ surjective D p 1 F0 −→ M → 0 is a fiCOROLLARY 4.14: In the differential module framework, if F1 −→ nite free presentation of M = coker(D1 ) with t(M ) = 0, then we may obtain an exact sequence D D 1 F0 −→ E of free differential modules where D is the parametrizing operator. However, F1 −→ D′ D 1 F0 −→ E ′ called minimal parametrizations such there may exist other parametrizations F1 −→ ′ that coker(D ) is a torsion module and we have thus rkD (M ) = rkD (E ′ ). 21 REMARK 4.15: The following chains of inclusions and short exact sequences allow to compare the main procedures used in the respective study of differential extensions and differential modules: K ⊂ K < S >⊂ L ⇒ K ⊂ K′ ⊂ L 0→F →M →T →0 ⇒ 0 → t(M ) → M → M ′ → 0 where F is a maximum free submodule of M , T = M/F is a torsion-module and M ′ = M/t(M ) is a torsion-free module. The next examples open the way towards a new domain of research. EXAMPLE 4.16: With n = 2, m = 3, K = Q, let us consider the first order nonlinear involutive system: P2 ≡ y22 − y 3 y12 = 0 P1 ≡ y21 − y 3 y11 = 0, This system defines a prime differential ideal p ⊂ K{y} and the differential extension L = 1 2 Q(K{y}/p) is differentially algebraic over K < y 3 > with parametric jets (y 1 , y 2 , y11 , y12 , y11 , y11 , ...). The linearized system D1 Y = 0 over L is: d2 Y 1 − y 3 d1 Y 1 − y11 Y 3 = 0, d2 Y 2 − y 3 d1 Y 2 − y12 Y 3 = 0 Multiplying by test functions (λ1 , λ2 ) and integrating by part, we get ad(D1 )λ = µ in the form: Y1 Y2 Y3 → −d2 λ1 + y 3 d1 λ1 + y13 λ1 → −d2 λ2 + y 3 d1 λ2 + y13 λ2 → −y11 λ1 − y12 λ2 = = = µ1 µ2 µ3 Using only the parametric jets for y and λ in the PD equations provided, we get: 1 2 −y11 (y 3 d1 λ1 + y13 λ1 ) − (y 3 y11 + y11 y13 )λ1 − y12 (y 3 d1 λ2 + y13 λ1 ) − (y 3 y11 + y12 y13 )λ2 = d2 µ3 − y11 µ1 − y12 µ2 1 1 2 2 −y 3 y11 d1 λ1 − y 3 y11 λ − y 3 y12 d1 λ2 − y 3 y11 λ − 2y11 y13 λ1 − 2y12 y13 λ2 = y 3 d1 µ3 + 2y13 µ3 and the only CC ad(D)µ = 0 over L: −d2 µ3 + y 3 d1 µ3 + y11 µ1 + y12 µ2 + 2y13 µ3 = 0 Multiplying by a test function ξ and integrating by part, we get Dξ = Y over L in the form: y11 ξ = Y 1 , y12 ξ = Y 2 , d2 ξ − y 3 d1 ξ + y13 ξ = Y 3 admitting the CC D1 Y = 0 of course but also the additional zero order CC: ω ≡ y11 Y 2 − y12 Y 1 = 0 which provides a torsion element ω satisfying d2 ω − y 3 d1 ω − y13 ω = 0. Setting Y = δy as the standard variational notation used by engineer, we obtain easily ω ∧ δω 6= 0 and ω cannot therefore admit an integrating factor, a result showing that K is its own differential algebraic closure in L. EXAMPLE 4.17: If α = dx1 − x3 dx2 ∈ T ∗ , the linear system obtained over K = Q(x1 , x2 , x3 ) by eliminating the factor ρ(x) in the linear system L(ξ)α = ρ(x)α admits the injective parametrization −x3 ∂3 θ + θ = ξ 1 , −∂3 φ = ξ 2 , ∂2 φ − x3 ∂1 φ = ξ 3 ⇒ ξ 1 − x3 ξ 2 = φ. It defines therefore a free differential module M ≃ D which is thus reflexive and even projective. Any resolution of this module splits, like the short exact sequence 0 → D2 → D3 → D → 0, and we shall prove in section 6 that the corresponding differential sequence of operators is locally exact like the Poincaré sequence ([32], p 684-691). 22 5) CONFORMAL STRUCTURE We start this section with a general (difficult) result on the actions of Lie groups, covering at the same time the study of the classical and conformal Killing systems. For this, we notice that the j1 involutive first Spencer operator D1 : C0 = Rq → J1 (Rq ) → J1 (Rq )/Rq+1 ≃ T ∗ ⊗ Rq /δ(gq+1 ) = C1 of order one is induced by the Spencer operator D : Rq+1 → T ∗ ⊗ Rq : ξq+1 → j1 (ξq ) − ξq+1 = k | 0 ≤| µ | q}. Introducing the Spencer bundles Cr = ∧r T ∗ ⊗ Rq /δ(∧r−1 T ∗ ⊗ gq+1 ), the {∂i ξµk − ξµ+1 i first order involutive (r + 1)-Spencer operator Dr+1 : Cr → Cr+1 is induced by D : ∧r T ∗ ⊗ Rq+1 → ∧r+1 T ∗ ⊗ Rq : α ⊗ ξq+1 → dα ⊗ ξq + (−1)r α ∧ Dξq+1 . We obtain therefore the canonical linear Spencer sequence ([34], p 150 or [52]): jq D D D D n 3 2 1 Cn −→ 0 ... −→ C2 −→ 0 −→ Θ −→ C0 −→ C1 −→ PROPOSITION 5.1: The Spencer sequence for the Lie operator describing the infinitesimal action of a Lie group G is (locally) isomorphic to the tensor product of the Poincaré sequence by the Lie algebra G = Te (G) where e ∈ G is the identity element. It follows that Dr+1 generates the CC of Dr ⇔ ad(Dr ) generates the CC of ad(Dr+1 ), a result not evident at all. Proof: We may introduce a basis {θτ = θτi (x)∂i } of infinitesimal generators of the action with τ = 1, ..., dim(G) and the commutation relations [θρ , θσ ] = cτρσ θτ discovered by S. Lie giving the structure constants c of G (See [34] and [44] for more details). Any element λ ∈ G can be written λ = {λτ = cst}. ” Gauging ” such an element, that is to say replacing the constants by functions or, equivalently, introducing a map X → ∧0 T ∗ ⊗ G : (x) → (λτ (x)), we may obtain locally a map ∧0 T ∗ ⊗ G → T : λτ (x) → λτ (x)θτk (x) or, equivalently, vector fields ξ = (ξ i (x)∂i ) ∈ T of the form ξ k (x) = λτ (x)θτk (x), keeping the index i for 1-forms. More generally, we can introduce a map : k ∧r T ∗ ⊗ G → ∧r T ∗ ⊗ Jq (T ) = λ → λ ⊗ jq (θ) = Xq : λτ (x) → λτ (x)∂µ θτk (x) = Xµ,I (x)dxI that we can lift to the element λ ⊗ jq+1 (θ) = Xq+1 ∈ ∧r T ∗ ⊗ Jq+1 (T ). It follows from the definitions that Dr Xq = DXq+1 by introducing any element of Cr (T ) through its representative Xq ∈ ∧r T ∗ ⊗ Jq (T ). We obtain therefore the crucial formula: Dr Xq = DXq+1 = D(λ ⊗ jq+1 (θ)) = dλ ⊗ jq (θ) + (−1)r λ ∧ Djq+1 (θ) = dλ ⊗ jq (θ) allowing to identify locally the Spencer sequence for jq with the Poincaré sequence. When the action is effective, the map ∧0 T ∗ ⊗ G → Jq (T ) is injective. We obtain therefore an isomorphism ∧0 T ∗ ⊗ G → Rq ⊂ Jq (T ) when q is large enough allowing to exhibit an isomorphism between the canonical Spencer sequence and the tensor product of the Poincaré sequence by G when q is large enough in such a way that Rq is involutive with dim(Rq ) = dim(G) and gq = 0. Q.E.D. We now study what happens when n ≥ 3 because the case n = 2 has already been provided, proving that conformal geometry must be entirely revisited. • n = 3: Using the euclidean metric ω, we have 6 components of Ω ∈ F0 = S2 T ∗ with dim(F0 ) = n(n + 1)/2 = 6 in the case of the classical Killing system/operator and obtain easily the n2 (n2 − 1)/12 = 6 components of the second order Riemann operator, linearization of the Riemann tensor at ω. We have n2 (n2 − 1)(n − 2)/24 = 3 first order Bianchi identities ([32], p 625). Introducing the respective adjoint operators while taking into account the last Proposition and the fact that the extension modules do not depend on the resolution used (a difficult result indeed !), we get the following diagram where we have set ad(Riemann) = Beltrami for historical reasons [3] and each operator generates the CC of the next one: 3 0← 3 Killing −→ Cauchy ←− 6 Riemann −→ 6 Bianchi −→ 3→0 6 Beltrami 6 ←− 3 ←− As in the Introduction where Airy = ad(Riemann), the Beltrami operator is now parametrizing the 3 Cauchy stress equations [3] but it is rather striking to discover that the central second order 23 operator is self-adjoint and can be given  0 0  0 −2d 33   0 2d23   d33 0   −2d23 2d13 d22 −2d12 as follows: 0 2d23 −2d22 −2d13 2d12 0 d33 0 −2d13 0 0 d11 −2d23 2d13 2d12 0 −2d11 0 d22 −2d12 0 d11 0 0         The study of the conformal case is much more delicate. As F̂0 can be described by trace-free symmetric tensors, we have dim(F̂0 ) = dim(F0 ) − 1 = 5 and it remains to discover the operator that will replace the Riemann operator. Having in mind the diagram of Proposition 2.11 and the fact that dim(ĝ2 ) = 3 while ĝ3 = 0 ⇒ ĝ4 = 0, we have successively: • NO CC order 1: 0 → ĝ2 → S2 T ∗ ⊗ T → T ∗ ⊗ F̂0 → F̂1 ⇒ 0 ⇒ dim(F̂1 ) = 3 − 18 + 15 = 0. • NO CC order 2: 0 → ĝ3 → S3 T ∗ ⊗ T → S2 T ∗ ⊗ F̂0 → F̂1 ⇒ 0 ⇒ dim(F̂1 ) = 0 − 30 + 30 = 0. • OK CC order 3: 0 → ĝ4 → S4 T ∗ ⊗ T → S3 T ∗ ⊗ F̂0 → F̂1 ⇒ 0 ⇒ dim(F̂1 ) = 0 − 45 + 50 = 5. Once again, the central third order operator is self-adjoint as can be easily seen by proving that the last 5 → 3 operator, obtained in [44] by means of computer algebra, can be chosen to be the transpose of the first 3 → 5 conformal Killing operator, just by changing columns. This result can also be obtained by using the fact that, when an operator/a system is formally integrable, the order of the generating CC is equal to the number of prolongations needed to get a 2-acyclic symbol plus 1 ([34], p 120, [44]). In the present case, neither ĝ1 nor ĝ2 are 2-acyclic while ĝ3 = 0 is trivially involutive, so that (3 − 1) + 1 = 3. • n = 4: In the classical case, we may proceed as before for exibiting the 20 components of the second order Riemann operator and the 20 components of the first order Bianchi operator. The study of the conformal case is much more delicate and still unknown. Indeed, the symbol ĝ2 is 2-acyclic when n ≥ 4 and 3-acyclic when n ≥ 5. Accordingly, the Weyl operator, namely the CC for the conformal Killing operator, is second order like the Riemann operator. However, when n = 4 only (care), the symbol ĥ2 of the Weyl system is not 2-acyclic while its first prolongation ĥ3 becomes 2-acyclic. It follows that the CC for the Weyl operator are second order, ... and so on. For example, we have the long exact sequence: 0 → ĝ5 → S5 T ∗ ⊗ T → S4 T ∗ ⊗ F̂0 → S2 T ∗ ⊗ F̂1 → F̂2 → 0 and deduce that dim(F̂2 ) = (−0) + (56 × 4) − (35 × 9) + (10 × 10) = 9, a result that can be ckecked by computer algebra in a few milliseconds but is still unknown. We shall finally prove below that the Einstein parametrization of the stress equations is neither canonical nor minimal in the following diagrams: 4 0← 4 Killing −→ Cauchy ←− 10 k Riemann −→ 20 ↓ Bianchi 10 Einstein −→ 10 −→ div 4 10 k 10 Beltrami 20 ↑ 10 ←− 20 ←− Einstein ←− −→ 20 −→ 6 ↓ → →0 0 obtained by using the fact that the Einstein operator is self-adjoint, where by Einstein operator we mean the linearization of the Einstein equations at the Minkowski metric, the 6 terms being exchanged between themselves [35,40]. Indeed, setting Eij = Rij − 12 ωij tr(R) with tr(R) = ω ij Rij , it is essential to notice that the Ricci operator is not self-adjoint because we have for example: ad λij (ω rs dij Ωrs ) −→ (ω rs dij λij )Ωrs and ad provides a term appearing in −ωij tr(R) but not in 2Rij because we have, as in (5.1.4) of [15]: tr(Ω) = ω rs Ωrs ⇒ tr(R) = ω rs drs tr(Ω) − drs Ωrs 24 The upper div induced by Bianchi has nothing to do with the lower Cauchy stress equations, contrary to what is still believed today while the 10 on the right of the lower diagram has nothing to do with the perturbation of a metric which is the 10 on the left in the upper diagram. It also follows that the Einstein equations in vacuum cannot be parametrized as we have the following diagram of operators recapitulating the five steps of the parametrizability criterion (See [35,37] for more details or [44,56] for a computer algebra exhibition of this result): Riemann 20 ր 4 4 Killing −→ Cauchy ←− 10 10 Einstein −→ 10 Einstein 10 ←− As a byproduct, we are facing only two possibilities, both leading to a contradiction: Einstein 1) If we use the operator S2 T ∗ −→ S2 T ∗ in the geometrical setting, the S2 T ∗ on the left has indeed someting to do with the perturbation of the metric but the S2 T ∗ on the right has nothing to do with the stress. Einstein 2) If we use the adjoint operator ∧n T ∗ ⊗ S2 T ←− ∧n T ∗ ⊗ S2 T in the physical setting, then n ∗ ∧ T ⊗ S2 T on the left has of course something to do with the stress but the ∧n T ∗ ⊗ S2 T on the right has nothing to do with the perturbation of a metric. These purely mathematical results question the origin and existence of gravitational waves. We may summarize these results, which do not seem to be known, by the following differential sequences where the order of an operator is written under its arrow: • n = 3: • n = 4: • n = 5: 3 −→ 5 −→ 5 −→ 3 → 0 1 3 1 4 −→ 9 −→ 10 −→ 9 −→ 4 → 0 1 2 2 1 5 −→ 14 −→ 35 −→ 35 −→ 14 −→ 5 → 0 1 2 1 2 1 2 THEOREM 5.2: Recalling that we have F1 = H (g1 ) = Z 2 (g1 ) and F̂1 = H 2 (ĝ1 ) 6= Z 2 (ĝ1 ), we have the following commutative and exact ”fundamental diagram II ”: 0 0 −→ S2 T ∗ −→ δ 0 ↓ 0 ↓ −→ Z 2 (g1 ) ↓ T ∗ ⊗ ĝ2 ↓ −→ Z 2 (ĝ1 ) ↓ −→ T ∗ ⊗ T ∗ ↓ 0 δ δ −→ ∧2 T ∗ ↓ 0 0 ↓ S2 T ∗ ↓ −→ H 2 (g1 ) −→ 0 ↓ −→ H 2 (ĝ1 ) −→ 0 ↓ −→ 0 The following theorem will provide all the classical formulas of both Riemannian and conformal geometry in one piece but in a totally unusual framework not depending on any conformal factor: THEOREM 5.3: All the short exact sequences of the preceding diagram split in a canonical way, that is in a way compatible with the underlying tensorial properties of the vector bundles involved. T ∗ ⊗ T ∗ ≃ S2 T ∗ ⊕ ∧ 2 T ∗ ⇒ Z 2 (ĝ1 ) = Z 2 (g1 ) + δ(T ∗ ⊗ ĝ2 ) ≃ Z 2 (g1 ) ⊕ ∧2 T ∗ ⇒ H 2 (g1 ) ≃ H 2 (ĝ1 ) ⊕ S2 T ∗ 25 Proof: First of all, we recall that: g1 = {ξik ∈ T ∗ ⊗ T | ωrj ξir + ωir ξjr = 0} ⊂ ĝ1 = {ξik ∈ T ∗ ⊗ T | ωrj ξir + ωir ξjr − 2 ωij ξrr = 0} n k k r r r 0 = g2 ⊂ ĝ2 = {ξij ∈ S2 T ∗ ⊗ T | nξij = δik ξrj + δjk ξri − ωij ω ks ξrs } ⇒ k Now, if (τli,j ) ∈ T ∗ ⊗ ĝ2 , then we have: k r r r nτli,j = δlk τri,j + δik τrl,j − ωli ω ks τrs,j r and we may set τri,j = τi,j 6= τj,i with (τi,j ) ∈ T ∗ ⊗ T and such a formula does not depend on any conformal factor [53]. We have: k k k δ(τli,j ) = (τli,j − τlj,i ) = (ρkl,ij ) ∈ B 2 (ĝ1 ) ⊂ Z 2 (ĝ1 ) with: Z 2 (ĝ1 ) = {(ρkl,ij ) ∈ ∧2 T ∗ ⊗ ĝ1 ) | δ(ρkl,ij ) = 0} ⇒ ϕij = ρrr,ij 6= 0 X δ(ρkl,ji ) = ( ρkl,ij = ρkl,ij + ρki,jl + ρkj,li ) ∈ ∧3 T ∗ ⊗ T (l,i,j) • The splitting of the lower row is obtained by setting (τi,j ) ∈ T ∗ ⊗ T ∗ → ( 21 (τi,j + τj,i )) ∈ S2 T ∗ in such a way that (τi,j = τj,i = τij ) ∈ S2 T ∗ ⇒ 12 (τij + τji ) = τij . Similarly, (ϕij = −ϕji ) ∈ ∧2 T ∗ → ( 12 ϕij ) ∈ T ∗ ⊗ T ∗ and ( 12 ϕij − 21 ϕji ) = (ϕij ) ∈ ∧2 T ∗ . • The most important result is to split the right column. For this, we first need to describe the monomorphism 0 → S2 T ∗ → H 2 (g1 ) which is in fact produced by a diagonal north-east snake type k chase. Let us choose (τij = τi,j = τj,i = τji ) ∈ S2 T ∗ ⊂ T ∗ ⊗ T ∗. Then, we may find (τli,j ) ∈ T ∗ ⊗ ĝ2 r r 2 k k k by deciding that τri,j = τi,j = τj,i = τrj,i in Z (ĝ1 ) and apply δ in order to get ρl,ij = τli,j − τk,lj,i such that ρrr,ij = ϕij = 0 and thus (ρkl,ij ) ∈ Z 2 (g1 ) = H 2 (g1 ). We obtain: nρkl,ij r r r r r r = δlk τri,j − δlk τrj,i + δik τrl,j − δjk τrli − ω ks (ωli τrs,j − ωlj τrs,i ) k k ks = (δi τlj − δj τli ) − ω (ωli τsj − ωlj τsi ) Contracting in k and i while setting simply tr(τ ) = ω ij τij , tr(ρ) = ω ij ρij , we get: nρij = nτij − τij − τij + ωij tr(τ ) = (n − 2)τij + ωij tr(τ ) = nρji ⇒ ntr(ρ) = 2(n − 1)tr(τ ) Substituting, we finally obtain τij = ρkl,ij = n (n−2) ρij − n 2(n−1)(n−2) ωij tr(ρ) and thus the tricky formula: 1 1 (δik ρlj − δjk ρli ) − ω ks (ωli ρsj − ωlj ρsi )) − (δ k ωlj − δjk ωli )tr(ρ) (n − 2) (n − 1)(n − 2) i Contracting in k and i, we check that ρij = ρij indeed, obtaining therefore the desired canonical lift H 2 (g1 ) → S2 T ∗ → 0 : ρki,lj → ρri,rj = ρij . Finally, using Proposition 4.3, the epimorphism H 2 (g1 ) → H 2 (ĝ1 ) → 0 is just described by the formula: k σl,ij = ρkl,ij − 1 1 (δ k ρlj − δjk ρli − ω ks (ωli ρsj − ωlj ρsi )) + (δ k ωlj − δjk ωli )tr(ρ) (n − 2) i (n − 1)(n − 2) i r r which is just the way to define the Weyl tensor. We notice that σr,ij = ρrr,ij = 0 and σi,rj = 0 by 2 2 ∗ using indices or a circular chase showing that Z (ĝ1 ) = Z (g1 ) + δ(T ⊗ ĝ2 ). This purely algebraic result only depends on the metric ω and does not depend on any conformal factor. In actual practice, the lift H 2 (g1 ) → S2 T ∗ is described by ρkl,ij → ρri,rj = ρij = ρji but it is not evident at k k all that the lift H 2 (ĝ1 ) → H 2 (g1 ) is described by the strict inclusion σl,ij → ρkl,ij = σl,ij providing r r a short exact sequence as in Proposition 4.3 because ρij = ρi,rj = σi,rj = 0 by composition. Q.E.D. COROLLARY 5.4: When n ≥ 4, each component of the Weyl tensor is a torsion element killed by the Dalembertian whenever the Einstein equations in vacuum are satisfied by the metric. Hence, 26 there exists a second order operator Q such that we have an identity: ✷ ◦ W eyl = Q ◦ Ricci Proof: According to Proposition 4.4, each extension module exti (M ) is a torsion module, ∀i ≥ 1. It follows that each additional CC in D1′ which is not already in D1 is a torsion element as it belongs to this module. One may also notice that: n(n + 1) n(n − 1) n(n + 1) n(n − 1) −n= , rkD (Riemann) = −n= 2 2 2 2 The differential ranks of the Einstein and Riemann operators are thus equal, but this is a pure coincidence because rkD (Einstein) has only to do with the div operator induced by contracting the Bianchi identities, while rkD (Riemann) has only to do with the classical Killing operator and the fact that the corresponding differential module is a torsion module because we have a Lie group of transformations having n + n(n−1) = n(n+1) parameters (translations + rotations). Hence, as 2 2 the Riemann operator is a direct sum of the Weyl operator and the Einstein or Ricci operator according to the previous theorem, each component of the Weyl operator must be killed by a certain operator whenever the Einstein or Ricci equations in vacuum are satisfied. A direct tricky computation can be found in ([8], p 206]) and ([18], exercise 7.7]). Q.E.D. rkD (Einstein) = REMARK 5.5: In a similar manner, the EM wave equations ✷F = 0 are easily obtained when the second set of Maxwell equations in vacuum is satisfied, avoiding therefore the Lorenz (no ”t”) gauge condition for the EM potential. Indeed, let us start with the Minkowski constitutive law with electric constant ǫ0 and magnetic constant µ0 such that ǫ0 µ0 c2 = 1 in vacuum: F rs = 1 ri sj ω̂ ω̂ Fij ∼ ω ri ω sj Fij µ0 −1/n where ω̂ij = | det(ω) | ωij ⇒| det(ω̂) |= 1, F ∈ ∧2 T ∗ is the EM field and the induction F is thus a contravariant skewsymmetric 2-tensor density. From the Maxwell equations we have: ∂r Fij + ∂i Fjr + ∂j Fri = 0, ∇r Fri = 0 ⇒ ∇r Fri = 0 ✷Fij = ∇r ∇r Fij = ∇r (∇i Frj − ∇j Fri ) = 0 ⇒ REMARK 5.6: Using Proposition 4.3 and the splittings of Theorem 5.3 for the second column, we obtain the following commutative and exact diagram: 0 ↓ 10 ↓↑ 0 ↓ −→ 10 k Riemann −→ 20 ↓↑ Bianchi 10 ↓ 0 Einstein 10 ↓ 0 −→ −→ −→ div 0 0 ↓ ↓ 16 → 6 ↓ k 20 → 6 ↓ ↓ 4 ↓ 0 →0 →0 → 0 It follows that the 10 components of the Weyl tensor must satisfy a first order linear system with 16 equations, having 6 generating first order CC. The differential rank of the corresponding operator is thus equal to 16 − 6 = 10 and such an operator defines a torsion module in which we have to look separately for each component of the Weyl tensor in order to obtain Corollary 5.4. The situation is similar to that of the Cauchy-Riemann equations when n = 2. Indeed, any complex transformation y = f (x) must be solution of the (linear) first order system y22 − y11 = 0, y21 + y12 = 0 of finite Lie 2 2 1 1 = 0, that is y 1 and y 2 are separately killed by + y22 = 0, y11 + y22 equations though we obtain y11 the second order laplacian ∆ = d11 + d22 . 27 6) CONTACT STRUCTURE Changing slightly the notations whileP setting α = 1, ..., p and ᾱ = α + p = p + 1, ..., 2p, we may consider the contact 1-form χ = dxn − pα=1 xᾱ dxα ⇒ χ ∧ (dχ)p = (1 )p+1 p!dx1 ∧ ... ∧ dxn 6= 0 where the exterior power of dχ is taken p times. As before, we obtain the injective parametrization: ∂φ ∂φ ∂φ ∂φ ∂φ , ξ ᾱ = + xᾱ n , ξ n = φ − xβ̄ β̄ ⇒ φ = i(ξ)χ ⇒ L(ξ)χ = χ n ∂xᾱ ∂xα ∂x ∂x ∂x From now on, considering χ as a 1-form density as we did before, we may consider φ as a density section of a vector bundle E with dim(E) = 1 and we obtain the defining system in the Medolaghi form with n equations: ξα = − χr (x)∂i ξ r − 1 χi ∂r ξ r + ξ r ∂r χi = 0 p+1 We have seen that this system is involutive when n = 3 but let the reader check as a difficult exercise that this system is not even formally integrable when n ≥ 5. We may define the linear first order operator C = A ◦ j1 : E → T and the linear first order operator D = B ◦ j1 : T → F0 by the two rows of the following commutative and exact diagram: 0 → Q2 ↓ → J2 (E) ↓ 0 → Q1 → J1 (E) ρ1 (A) → A → B J1 (T ) → F0 ↓ ↓ T → →0 0 where Q1 = ker(A) ⊂ J1 (E) and its symbol K1 ⊂ T ∗ ⊗E is easily seen to be involutive with dim(Kr+1 ) = 1. As the parametrizing operator C is injective with a lift ξ → i(ξ)χ = φ, we obtain (1) Q1 = π12 (Q2 ) = 0 and thus Q1 is not formally integrable. However, using Theorem 2.14, we have (1) (1) Qr+1 = ρr (Q1 ) = 0 and thus Qr+1 ≃ Kr+1 ⇒ dim(Qr+1 ) = 1. We obtain therefore at once: dim(F0 ) = 1 − (n + 1)(n + 2)/2 + n(n + 1) = n(n − 1)/2 and dim(F0 ) = 10 when n = 5 instead of the 5 equations we obtained with the 1-form density χ. Prolonging this diagram r-times by induction, we obtain the following commutative diagram: 0 ↓ 0 ↓ 0 → Kr+2 ↓ → Sr+2 T ∗ ⊗ E ↓ 0→ Qr+2 ↓ → Jr+2 (E) ↓ 0→ Qr+1 → Jr+1 (E) ↓ 0 0 ↓ σr+1 (A) −→ ρr+1 (A) −→ ρr (A) −→ Sr+1 T ∗ ⊗ T ↓ Jr+1 (T ) ↓ Jr (T ) ↓ 0 0 ↓ σr (B) −→ ρr (B) −→ ρr−1 (B) −→ Sr T ∗ ⊗ F0 ↓ Jr (F0 ) ↓ Jr−1 (F0 ) ↓ 0 Chasing in this diagram while cutting it in the middle by setting: Rr+1 = im(ρr+1 (A)) ⊆ ker(ρr (B)) = ρr (R1 ) ⇒ πrr+1 (Rr+1 ) = Rr ⇒ gr+1 ⊆ ρr (g1 ) we obtain successively: 28 dim(gr+1 ) = = = = dim(ρr (g1 )) = = = = dim(Rr+1 ) − dim(Rr ) (dim(Jr+2 (E)) − dim(Qr+2 )) − (dim(Jr+1 (E) − dim(Qr+1 )) dim(Jr+2 (E)) − dim(Jr+1 (E)) dim(Sr+2 T ∗ ) = (r + n + 1)!/(r + 2)!(n − 1)! dim(ker(σr (B))) dim(im(σr+1 (A))) + 1 (dim(Sr+2 T ∗ ) − 1) + 1 dim(Sr+2 T ∗ ) = dim(gr+1 ) It follows that gr+1 = ρr (g1 ) and thus Rr+1 = ρr (R1 ) by induction on r. Hence R1 is an involutive first order system because it is already formally integrable and its symbol g1 is involutuve because K1 is involutive. Extending step by step the previous diagram on the right, we obtain: THEOREM 6.1: We have the locally exact Janet sequence where all the operators are first order and involutive but C which is first order but not formally integrable: C D Dn−2 D D 2 1 ... −→ Fn−2 → 0 F1 −→ 0 → E −→ T −→ F0 −→ Proof: We recall that a differential sequence is locally exact, like the Poincaré sequence, if any (local) section of Fr killed by Dr+1 is the image of a (local) section of Fr−1 by Dr . To prove this result we just need to apply the Spencer operator D to the middle row of the preceding diagram when r is large enough. As it is known that all the resulting vertical Spencer sequences are locally exact (See [31,34,36,52] for more details), then the commutative diagram thus obtained is exact but perhaps the first purely algebraic column on the left which is an induced δ-sequence, exact because K1 is involutive. For helping the reader we provide the upper part of this diagram: 0 ↓ 0 ↓ 0→ C → Kr+2 ↓ −δ 0 → T ∗ ⊗ Kr+1 0 ↓ 0 ↓ D E −→ T −→ F0 ↓ jr+2 ↓ jr+1 ↓ jr → Jr+2 (E) −→ Jr+1 (T ) −→ Jr (F0 ) ↓D ↓D ↓D → T ∗ ⊗ Jr+1 (E) → T ∗ ⊗ Jr (T ) → T ∗ ⊗ Jr−1 (F0 ) → ... → ... → ... Comparing to the Poincaré sequence, we get dim(Fr ) = n!/(r + 2)!(n − r − 2)! and it remains to find the geometric object providing D. For this, we may introduce the dual density ω = (ω ij ) of α = (αk1 ,...kn−2 ) = χ ∧ (dχ)p−1 in a symbolic way by introducing ǫ ∈ ∧n T with | ǫi1 ,...,in |= 1 and set ω ij = ǫijk1 ,...,kn−2 αk1 ,...,kn−2 . Using jet notations, we have the nonlinear system of finite Lie equations in Lie form: ω kl (y) 1 ∂xi ∂xj ∂(y 1 , ..., y n ) − p+1 ( ) = ω ij (x) k l 1 n ∂y ∂y ∂(x , ..., x ) We obtain therefore by linearization the involutive system R1 in of general infinitesimal Lie equations in Medolaghi form: −ω rj (x)∂r ξ i − ω ir (x)∂r ξ j − 1 ω ij (x)∂r ξ r + ξ r ∂r ω ij (x) = 0 p+1 The Vessiot structure equations involve only one constant and become: χi (∂j χk − ∂k χj ) + χj (∂k χi − ∂i χk ) + χk (∂i χj − ∂j χi ) = c σijk where the 3-form density σ = (σijk ) is the dual of (ω)p−1 . Finally, as χ is proportional to the dual density of (ω)p , it may be expressed rationally in terms of ω. Linearizing as we did in Section 2 and with the Riemann tensor, we obtain D1 with dim(F1 ) = n(n − 1)(n − 2)/6 in a coherent way. Q.E.D. 29 We use the previous results in order to revisit the Hamilton-Jacobi equation and prove the need to use differential algebra for studying the nonlinear systems involved. This is a difficult problem indeed, in the sense that no classical approach by means of exterior calculus can be adapted as formal integrability or involution become crucial tools that cannot be avoided. Let z = f (t, x) be a solution of the non-linear PD equation zt + H(t, x, z, zx ) = 0 written with jet notations for the single unknown z. When dealing with applications, t will be time, x will be space, z will be the action and, as usual, we shall set p = zx for the momentum. It is important to notice that, in this general setting, H(t, x, z, p) cannot be called Hamiltonian as it involves z (See [32] and in particular [33], p 506 for more details): DEFINITION 6.2: A complete integral z = f (t, x; a, b) is a family of solutions depending on two constant parameters (a, b) in such a way that the Jacobian condition ∂(z, p)/∂(a, b) 6= 0 whenever p = ∂x f (t, x; a, b). Using the implicit function theorem, we may set THEOREM 6.3: The search for a complete integral of the PD equation: zt + H(t, x, z, zx ) = 0 is equivalent to the search for a single solution of the automorphic system A1 with n = 4, m = 3, obtained by eliminating ρ(t, x, z, p) in the Pfaffian system: dz − pdx + H(t, x, z, p)dt = ρ(dZ − P dX) The corresponding Lie pseudogroup is the pseudogroup Γ of contact transformations of (X, Z, P ) that reproduces the contact 1-form dZ − P dX up to a function factor. Proof: If z = f (t, x; a, b) is a complete integral, we have: ∂f ∂f da + db ∂a ∂b Using the implicit function theorem and the Jacobian condition, we may set: dz − pdx + H(t, x, z, p)dt = a = X(t, x, z, p), b = Z(t, x, z, p) ⇒ ρ(t, x, z, p) = ∂f ∂f ∂f , P (t, x, z, p) = / ∂b ∂a ∂b The converse is left to the reader. For another solution denoted wit a ”bar”, we have: dz − pdx + H(t, x, z, p)dt = ρ̄(dZ̄ − P̄ dX̄) ⇒ dZ̄ − P̄ dX̄ = ρ (dZ − P dX) ρ̄ Closing this system, we obtain at once: ρ dX̄ ∧ dZ̄ ∧ dP̄ = ( )2 dX ∧ dZ ∧ dP ρ̄ Closing again, we discover that ρ/ρ̄ is in fact a function of (X, Z, P ), a result bringing the Lie pseudogroup of contact transformations and showing that no restriction must be imposed to H(t, x, z, p). Q.E.D. It is quite more dificult to exhibit the equations of the above automorphic sytem and the corresponding equations of the Lie pseudogroup Γ in Lie form or even as involutive systems of PD equations. From what has been said, we obtain at least: ∂ Z̄ ∂X ∂ Z̄ ∂Z X̄ − P̄ ∂∂X X̄ − P̄ ∂∂Z = −P, ∂ Z̄ ∂P ∂ Z̄ ∂Z X̄ − P̄ ∂∂P X̄ − P̄ ∂∂Z =0⇒ ∂ X̄ ∂ Z̄ − P̄ =0 ∂P ∂P for defining R1 , that is to say: ∂ Z̄ ∂ X̄ ∂ Z̄ ∂ X̄ − P̄ + P( − P̄ ) = 0, ∂X ∂X ∂Z ∂Z 30 ∂ Z̄ ∂ X̄ − P̄ =0 ∂P ∂P Using now letters (x, z, p) instead of the capital letters (X, Z, P ) and (ξ, η, ζ) for the corresponding vertical bundles, we obtain by linearization the system of first order infinitesimal Lie equations: ∂η ∂ξ ∂η ∂ξ ∂η ∂ξ −p − ζ + p( − p ) = 0, −p =0 ∂x ∂x ∂z ∂z ∂p ∂p This system is not involutive as it is not even formally integrable. Using crossed derivatives in x/p, we obtain the only new first order equation: ∂ξ ∂ζ ∂η ∂η − + + 2p =0 ∂x ∂z ∂p ∂z (1) and the resulting system R1 is involutive with two equations of class x solved with respect to (1) ∂ξ ∂η ∂ξ ( ∂x , ∂x ) and one equation of class p solved with respecto ∂p , that is dimY (R1 ) = (3+3×3)−3 = 9. Accordingly, the non-linear system of Lie equations must become involutive by adding only one equation in Lie form, namely: ∂(Z̄,X̄,P̄ ) ∂(Z,X,P ) ∂ Z̄ X̄ 2 ( ∂Z − P̄ ∂∂X ) =1 and its linearization just provides: ∂η ∂ξ ∂ζ ∂ξ ∂η + + = 2( −p ) ∂x ∂z ∂p ∂z ∂z that is exactly the previous equation. Coming back to the original system and notations, we may suppose the 7 = 3 + 4 equations: ∂Z ∂z − P ∂X ∂z 6= 0 and introduce ∂X ∂Z ∂X ∂Z ∂X ∂Z ∂X ∂Z ∂X ∂Z −P + p( −P ) = 0, −P − H( −P ) = 0, −P =0 ∂x ∂x ∂z ∂z ∂t ∂t ∂z ∂z ∂p ∂p ∂(Z, X, P ) ∂Z ∂X 2 ∂(Z, X, P ) ∂H ∂Z ∂X 2 −( −P ) = 0, − ( −P ) = 0, ... ∂(z, x, p) ∂z ∂z ∂(z, p, t) ∂p ∂z ∂z Starting now, the next results canot be obtained by exterior calculus and are therefore not known. Indeed, developping the 3 × 3 Jacobian determinant, the fourth equation provided can be written as: ∂Z ∂X 2 ∂Z ∂(X, P ) ∂Z ∂((X, P ) ∂Z ∂(X, P ) . − . + . −( −P ) =0 ∂x ∂(x, p) ∂x ∂(z, p) ∂p ∂(z, x) ∂z ∂z Using the previous equations in order to eliminate ∂Z ∂x and ∂Z ∂p , we obtain: ∂Z ∂X ∂((X, P ) ∂X ∂(X, P ) ∂X ∂(X, P ) ∂Z ∂(X, P ) . + p( −P ). −P . +P . = ∂x ∂(x, p) ∂z ∂z ∂(z, p) ∂x ∂(z, p) ∂p ∂(z, x) ( ∂X ∂(X, P ) ∂(X, P ) ∂Z ∂X 2 ∂Z −P )( +p )=( −P ) ∂z ∂z ∂(x, p) ∂(z, p) ∂z ∂z and thus: ∂(X, P ) ∂Z ∂X ∂(X, P ) +p )−( −P )=0 ∂(x, p) ∂(z, p) ∂z ∂z which is nothing else than the first order equation that can be obtained from the first and third (1) among the previous 7 equations by using crossed derivatives in x/p. It follows that A1 may be (1) defined by 6 equations only and we have thus dimX (A1 ) = (3 + 4 × 3) − 6 = 9. This result proves (1) (1) that the involutive system A1 is an automorphic system for the involutive Lie groupoid R1 . 31 We finally show the link which is existing with differential algebra and the differential Galois theory because the Lie pseudogroup of contact transformations is an algebraic Lie pseudogroup. For this, using jet notations, let us consider the chain of strict inclusions of differential fields: K =Q< Z x − P Xx Z t − P Xt Z p − P Xp , , >, L = Q < X, Z, P > ⇒ Q ⊂ K ⊂ L Z z − P Xz Z z − P Xz Z z − P Xz Using the chain rule for derivatives, we let the reader prove as an exercise that each fraction is a differential invariant for the Lie pseudogroup Γ of contact transformations. Accordigly, L/K is a differential automorphic extension in the sense that the corresponding infinite dimensional model differential variety is a principal homogeneous space (PHS) for Γ. It is not so evident that: ∂(X, Z, P ) ∂Z ∂X 2 /( −P ) ∈K ∂(x, z, p) ∂z ∂z because it is also a differential invariant of Γ. The intermediate differential field K ⊂ K ′ ⊂ L with K ′ = K < Zz − P Xz > is the differential field of invariants of the Lie subpseudogroup Γ′ ⊂ Γ of strict or unimodular contact transformations preserving the contact form dZ − P dX and thus the volume 3-form dZ ∧dX ∧dP . We let the reader adapt the previous results to this particular case. 32 7) CONCLUSION Whenever Rq ⊆ Jq (E) is an involutive system of order q on E, we may define the Janet bundles Fr for r = 0, 1, ..., n by the short exact sequences: 0 → ∧r T ∗ ⊗ Rq + δ(∧r−1 T ∗ ⊗ Sq+1 T ∗ ⊗ E) → ∧r T ∗ ⊗ Jq (E) → Fr → 0 We may pick up a section of Fr , lift it up to a section of ∧r T ∗ ⊗ Jq (E) that we may lift up to a section of ∧r T ∗ ⊗ Jq+1 (E) and apply D in order to get a section of ∧r+1 T ∗ ⊗ Jq (E) that we may project onto a section of Fr+1 in order to construct an operator Dr+1 : Fr → Fr+1 generating the CC of Dr in the canonical linear Janet sequence ([34], p 145): D D D D n 2 1 Fn −→ 0 ... −→ F1 −→ 0 −→ Θ −→ E −→ F0 −→ If we have two involutive systems Rq ⊂ R̂q ⊂ Jq (E), the Janet sequence for Rq projects onto the Janet sequence for R̂q and we may define inductively canonical epimorphisms Fr → F̂r → 0 for r = 0, 1, ..., n by comparing the previous sequences for Rq and R̂q . A similar procedure can also be obtained if we define the Spencer bundles Cr for r = 0, 1, ..., n by the short exact sequences: 0 → δ(∧r−1 T ∗ ⊗ gq+1 ) → ∧r T ∗ ⊗ Rq → Cr → 0 We may pick up a section of Cr , lift it to a section of ∧r T ∗ ⊗Rq , lift it up to a section of ∧r T ∗ ⊗Rq+1 and apply D in order to construct a section of ∧r+1 ⊗ Rq that we may project to Cr+1 in order to construct an operator Dr+1 : Cr → Cr+1 generating the CC of Dr in the canonical linear Spencer sequence which is another completely different resolution of the set Θ of (formal) solutions of Rq : jq D D D D n 3 2 1 Cn −→ 0 ... −→ C2 −→ 0 −→ Θ −→ C0 −→ C1 −→ However, if we have two systems as above, the Spencer sequence for Rq is now contained into the Spencer sequence for R̂q and we may construct inductively canonical monomorphisms 0 → Cr → Ĉr for r = 0, 1, ..., n by comparing the previous sequences for Rq and R̂q . When dealing with applications, we have set E = T and considered systems of finite type Lie equations determined by Lie groups of transformations and ad(Dr ) generates the CC of ad(Dr+1 ) while ad(Dr ) generates the CC of ad(Dr+1 ). We have obtained in particular Cr = ∧r T ∗ ⊗ Rq ⊂ ∧r T ∗ ⊗ R̂q = Ĉr when comparing the classical and conformal Killing systems, but these bundles have never been used in physics. Therefore, instead of the classical Killing system R2 ⊂ J2 (T ) defined by Ω ≡ L(ξ)ω = 0 and Γ ≡ L(ξ)γ = 0 or the conformal Killing system R̂2 ⊂ J2 (T ) defined by Ω ≡ L(ξ)ω = A(x)ω and Γ ≡ L(ξ)γ = (δik Aj (x) + δjk Ai (x) − ωij ω ks As (x)) ∈ S2 T ∗ ⊗ T , we may introduce the intermediate differential system R̃2 ⊂ J2 (T ) defined by L(ξ)ω = Aω with A = cst and Γ ≡ L(ξ)γ = 0, for the Weyl group obtained by adding the only dilatation with infinitesimal generator xi ∂i to the Poincaré group. We have R1 ⊂ R̃1 = R̂1 but the strict inclusions R2 ⊂ R̃2 ⊂ R̂2 and we discover exactly the group scheme used through this paper, both with the need to shift by one step to the left the physical interpretation of the various differential D1 T ∗ ⊗ R̂2 is induced by the sequences used. Indeed, as ĝ2 ≃ T ∗ , the first Spencer operator R̂2 −→ D r r r ∗ r − 0) and thus , ∂i ξrj usual Spencer operator R̂3 −→ T ⊗ R̂2 : (0, 0, ξrj , ξrij = 0) → (0, ∂i 0 − ξri ∗ ∗ ∗ projects by cokernel onto the induced operator T → T ⊗ T . Composing with δ, it projects d therefore onto T ∗ → ∧2 T ∗ : A → dA = F as in EM and so on by using the fact that D1 and d are both involutive or the composite epimorphisms Ĉr → Ĉr /C̃r ≃ ∧r T ∗ ⊗ (R̂2 /R̃2 ) ≃ ∧r T ∗ ⊗ ĝ2 ≃ δ ∧r T ∗ ⊗ T ∗ −→ ∧r+1 T ∗ . The main result we have obtained is thus to be able to increase the order and dimension of the underlying jet bundles and groups, proving therefore that any 1-form with value in the second order jets ĝ2 (elations) of the conformal Killing system (conformal group) can be decomposed uniquely into the direct sum (R, F ) where R is a section of the Ricci bundle S2 T ∗ and the EM field F is a section of ∧2 T ∗ as in [41,42](Compare to [55]). The mathematical structures of electromagnetism and gravitation only depend on second order jets. 33 REFERENCES [1] Adler, F.W.: Über die Mach-Lippmannsche Analogie zum zweiten Hauptsatz, Anna. Phys. Chemie, 22, 578-594 (1907). [2] Airy, G.B.: On the Strains in the Interior of Beams, Phil. Trans. Roy. Soc.London, 153, 1863, 49-80 (1863). [3] Arnold, V.: Méthodes Mathématiques de la Mécanique Classique, Appendice 2 (Géodésiques des métriques invariantes à gauche sur des groupes de Lie et hydrodynamique des fluides parfaits), MIR, Moscow (1974,1976). [4] Assem, I.: Algèbres et Modules, Masson, Paris (1997). [5] Beltrami, E.: Osservazioni sulla Nota Precedente, Atti Reale Accad. Naz. Lincei Rend., 5, 141-142 (1892). [6] Birkhoff, G.: Hydrodynamics, Princeton University Press (1954). [7] Bjork, J.E. (1993) Analytic D-Modules and Applications, Kluwer (1993). [8] Bourbaki, N.: Algèbre, Ch. 10, Algèbre Homologique, Masson, Paris (1980). [9] de Broglie, L.: Thermodynamique de la Particule isolée, Gauthiers-Villars, Pris 1964). [10] Choquet-Bruhat, Y.: Introduction to General Relativity, Black Holes and Cosmology, Oxford University Press (2015). [11] Chyzak, F.,Quadrat, A., Robertz, D.: Effective algorithms for parametrizing linear control systems over Ore algebras, Appl. Algebra Engrg. Comm. Comput., 16, 319-376, 2005. [12] Chyzak, F., Quadrat, A., Robertz, D.: OreModules: A symbolic package for the study of multidimensional linear systems, Springer, Lecture Notes in Control and Inform. Sci., 352, 233264, 2007. http://wwwb.math.rwth-aachen.de/OreModules [13] Cosserat, E., & Cosserat, F.: Théorie des Corps Déformables, Hermann, Paris, 1909. [14] Eisenhart, L.P.: Riemannian Geometry, Princeton University Press, Princeton (1926). [15] Foster, J., Nightingale, J.D.: A Short Course in General relativity, Longman (1979). [16] Gröbner, W.: Über die Algebraischen Eigenschaften der Integrale von Linearen Differentialgleichungen mit Konstanten Koeffizienten, Monatsh. der Math., 47, 247-284 (1939). [17] Hu,S.-T.: Introduction to Homological Algebra, Holden-Day (1968). [18] Hughston, L.P., Tod, K.P.: An Introduction to General Relativity, London Math. Soc. Students Texts 5, Cambridge University Press (1990). [19] Janet, M.: Sur les Systèmes aux Dérivées Partielles, Journal de Math., 8, 65-151 (1920). [20] Kashiwara, M.: Algebraic Study of Systems of Partial Differential Equations, Mémoires de la Société Mathématique de France, 63 (1995) (Transl. from Japanese of his 1970 Masters Thesis). [21] Kolchin, E.R.: Differential Algebra and Algebraic groups, Academic Press, New York (1973). [22] Kumpera, A., & Spencer, D.C.: Lie Equations, Ann. Math. Studies 73, Princeton University Press, Princeton (1972). [23] Kunz, E.: Introduction to Commutative Algebra and Algebraic Geometry, Birkhaser (1985). [24] Lippmann, G.: Extension du Principe de S. Carnot à la Théorie des Pénomènes électriques, C. R. Acad/ Sc. Paris, 82, 1425-1428 (1876). [25] Lippmann, G.: Über die Analogie zwischen Absoluter Temperatur un Elektrischem Potential, Ann. Phys. Chem., 23, 994-996 (1907). [26] Macaulay, F.S.: The Algebraic Theory of Modular Systems, Cambridge (1916). [27] Mach, E.: Die Geschichte und die Wurzel des Satzes von der Erhaltung der Arbeit, p 54, Prag: Calve (1872). [28]Mach, E.: Prinzipien der Wärmelehre, 2, Aufl., p 330, Leipzig: J.A. Barth (1900). [29] Maxwell, J.C.: On Reciprocal Figures, Frames and Diagrams of Forces, Trans. Roy. Soc. Ediinburgh, 26, 1-40 (1870). [30] Morera, G.: Soluzione Generale della Equazioni Indefinite dellEquilibrio di un Corpo Continuo, Atti. Reale. Accad. dei Lincei, 1, 137-141+233(1892). [31] Nordström, G.: Einstein’s Theory of Gravitation and Herglotz’s Mechanics of Continua, Proc. Kon. Ned. Akad. Wet., 19, 884-891 (1917). [32] Northcott, D.G.: An Introduction to Homological Algebra, Cambridge university Press (1966). [33] Northcott, D.G.: Lessons on Rings Modules and Multiplicities, Cambridge University Press (1968). [34] Oberst, U.: Multidimensional Constant Linear Systems, Acta Appl. Math., 20, 1-175 (1990). 34 [35] Oberst, U.: The Computation of Purity Filtrations over Commutative Noetherian Rings of Operators and their Applications to Behaviours, Multidim. Syst. Sign. Process. (MSSP) 26, 389-404 (2013). http://dx.doi.org/10.1007/s11045-013-0253-4 [36] Ougarov, V.: Théorie de la Relativité Restreinte, MIR, Moscow, 1969, (french translation, 1979). [37] Poincaré, H.: Sur une Forme Nouvelle des Equations de la Mécanique, C. R. Académie des Sciences Paris, 132 (7) (1901) 369-371. [38] Pommaret, J.-F.: Systems of Partial Differential Equations and Lie Pseudogroups, Gordon and Breach, New York, 1978; Russian translation: MIR, Moscow, 1983. [39] Pommaret, J.-F.: Differential Galois Theory, Gordon and Breach, New York, 1983. [40] Pommaret, J.-F.: Lie Pseudogroups and Mechanics, Gordon and Breach, New York, 1988. [41] Pommaret, J.-F.: Partial Differential Equations and Group Theory, Kluwer, 1994. http://dx.doi.org/10.1007/978-94-017-2539-2 [42] Pommaret, J.-F.: François Cosserat and the Secret of the Mathematical Theory of Elasticity, Annales des Ponts et Chaussées, 82, 59-66 (1997) (Translation by D.H. Delphenich). [43] Pommaret, J.-F.: Group Interpretation of Coupling Phenomena, Acta Mechanica, 149 (2001) 23-39. http://dx.doi.org/10.1007/BF01261661 [44] Pommaret, J.-F.: Partial Differential Control Theory, Kluwer, Dordrecht, 2001. [45] POMMARET, J.-F.: Algebraic Analysis of Control Systems Defined by Partial Differential Equations, in ”Advanced Topics in Control Systems Theory”, Springer, Lecture Notes in Control and Information Sciences 311 (2005) Chapter 5, pp. 155-223. [46] Pommaret, J.-F.: Arnold’s Hydrodynamics Revisited, AJSE-mathmatiques, 1, 1, 2009, pp. 157-174. [47] Pommaret, J.-F.: Parametrization of Cosserat Equations, Acta Mechanica, 215 (2010) 43-55. http://dx.doi.org/10.1007/s00707-010-0292-y [48] Pommaret, J.-F.: Macaulay Inverse Systems revisited, Journal of Symbolic Computation, 46, 1049-1069 (2011). [49] Pommaret, J.-F.: Spencer Operator and Applications: From Continuum Mechanics to Mathematical Physics, in ”Continuum Mechanics-Progress in Fundamentals and Engineering Applications”, Dr. Yong Gan (Ed.), ISBN: 978-953-51-0447–6, InTech, 2012, Available from: http://dx.doi.org/10.5772/35607 [50] Pommaret, J.-F.: The Mathematical Foundations of General Relativity Revisited, Journal of Modern Physics, 4 (2013) 223-239. http://dx.doi.org/10.4236/jmp.2013.48A022 [51] Pommaret, J.-F.: The Mathematical Foundations of Gauge Theory Revisited, Journal of Modern Physics, 5 (2014) 157-170. http://dx.doi.org/10.4236/jmp.2014.55026 [52] Pommaret, J.-F.: Relative Parametrization of Linear Multidimensional Systems, Multidim. Syst. Sign. Process., 26, 405-437 2015). DOI 10.1007/s11045-013-0265-0 [53] Pommaret,J.-F.:From Thermodynamics to Gauge Theory: the Virial Theorem Revisited, pp. 1-46 in ”Gauge Theories and Differential geometry,”, NOVA Science Publisher (2015). [54] Pommaret, J.-F.: Airy, Beltrami, Maxwell, Einstein and Lanczos Potentials revisited, Journal of Modern Physics, 7, 699-728 (2016). http://dx.doi.org/10.4236/jmp.2016.77068 [55] Pommaret, J.-F.: Deformation Theory of Algebraic and Geometric Structures, Lambert Academic Publisher (LAP), Saarbrucken, Germany (2016). A short summary can be found in ”Topics in Invariant Theory ”, Séminaire P. Dubreil/M.-P. Malliavin, Springer Lecture Notes in Mathematics, 1478, 244-254 (1990). http://arxiv.org/abs/1207.1964 [56] Pommaret, J.-F. and Quadrat, A.: Localization and Parametrization of Linear Multidimensional Control Systems, Systems & Control Letters, 37, 247-260 (1999). [57] Pommaret, J.-F., Quadrat, A.: Algebraic Analysis of Linear Multidimensional Control Systems, IMA Journal of Mathematical Control and Informations, 16, 275-297 (1999). [58] Quadrat, A., Robertz, D.: Parametrizing all solutions of uncontrollable multidimensional lin35 ear systems, Proceedings of the 16th IFAC World Congress, Prague, July 4-8, 2005. [59] Quadrat, A.: An Introduction to Constructive Algebraic Analysis and its Applications, Les cours du CIRM, Journees Nationales de Calcul Formel, 1(2), 281-471 (2010). [60] Quadrat, A., Robertz, R.: A Constructive Study of the Module Structure of Rings of Partial Differential Operators, Acta Applicandae Mathematicae, 133, 187-234 (2014). http://hal-supelec.archives-ouvertes.fr/hal-00925533 [61] Rotman, J.J.: An Introduction to Homological Algebra, Pure and Applied Mathematics, Academic Press (1979). [62] Schneiders, J.-P.: An Introduction to D-Modules, Bull. Soc. Roy. Sci. Liège, 63, 223-295 (1994). [63] Spencer, D.C.: Overdetermined Systems of Partial Differential Equations, Bull. Am. Math. Soc., 75 (1965) 1-114. [64] Teodorescu, P.P.: Dynamics of Linear Elastic Bodies, Abacus Press, Tunbridge, Wells (1975) (Editura Academiei, Bucuresti, Romania). [65] Vessiot, E.: Sur la Théorie des Groupes Infinis, Ann. Ec. Norm. Sup., 20, 411-451 (1903) (Can be obtained from http://numdam.org). [66] Weyl, H.: Space, Time, Matter, Springer, 1918, 1958; Dover, 1952. [67] Zerz, E.: Topics in Multidimensional Linear Systems Theory, Lecture Notes in Control and Information Sciences (LNCIS) 256, Springer (2000). [68] Zou, Z., Huang, P., Zang ,Y., Li, G.: Some Researches on Gauge Theories of Gravitation, Scientia Sinica, XXII, 6, 628-636 (1979). 36
0math.AC
Fast Deterministic Selection Andrei Alexandrescu arXiv:1606.00484v2 [cs.DS] 4 Aug 2016 The D Language Foundation [email protected] Abstract lection algorithm most used in practice [8, 27, 31]. It can be thought of as a partial Q UICKSORT [16]: Like Q UICK SORT , Q UICKSELECT relies on a separate routine to divide the input array into elements less than or equal to and greater than or equal to a chosen element called the pivot. Unlike QUICKSORT which recurses on both subarrays left and right of the pivot, Q UICKSELECT only recurses on the side known to contain the kth smallest element. (The side to choose is known because the partitioning computes the rank of the pivot.) The pivot choosing strategy strongly influences Q UICK SELECT’s performance. If each partitioning step reduces the array portion containing the kth order statistic by at least a fixed fraction, Q UICKSELECT runs in O(n) time; otherwise, Q UICKSELECT is liable to run in quadratic time. Therefore, strategies for pivot picking are a central theme in Q UICKSE LECT. Some of the most popular and well-studied heuristics choose the median out of a small (1–9) number of elements (either from predetermined positions or sampled uniformly at random) and use that as a pivot [3, 8, 14, 32]. However, such heuristics cannot provide strong worst-case guarantees. Selection in guaranteed linear time remained an open problem until 1973, when Blum, Floyd, Pratt, Rivest, and Tarjan introduced the seminal “Median of Medians” algorithm [4] (also known as BFPRT after the initials of its authors), an ingenious pivot selection method that works in conjunction with Q UICKSELECT. § 3 discusses both Q UICK SELECT and M EDIAN O F M EDIANS in detail. Although widely described and studied, M EDIAN O F M E DIANS is seldom used in practice. This is because its pivot finding procedure has run time proportional to the input size and is relatively intensive in both element comparisons and swaps. In contrast, sampling-based pivot picking only does a small constant amount of work. In practice, the better quality of the pivot found by M EDIAN O F M EDIANS does not justify its higher cost. Therefore, the state of the art in selection with partitioning has been Q UICKSELECT in conjunction with simple pivot choosing heuristics. It would seem that heuristics-based selection has won the server room, leaving deterministic selection to the classroom. However, fast deterministic selection remains desirable for several practical reasons: The Median of Medians (also known as BFPRT) algorithm, although a landmark theoretical achievement, is seldom used in practice because it and its variants are slower than simple approaches based on sampling. The main contribution of this paper is a fast linear-time deterministic selection algorithm Q UICKSELECTA DAPTIVE based on a refined definition of M EDIAN O F M EDIANS. The algorithm’s performance brings deterministic selection—along with its desirable properties of reproducible runs, predictable run times, and immunity to pathological inputs—in the range of practicality. We demonstrate results on independent and identically distributed random inputs and on normally-distributed inputs. Measurements show that Q UICKSELECTA DAPTIVE is faster than state-of-the-art baselines. Categories and Subject Descriptors I.1.2 [Symbolic and Algebraic Manipulation]: Algorithms 1. Introduction The selection problem is widely researched and has many applications. In its simplest formulation, selection is finding the kth smallest element (also known as the kth order statistic) of an array: given an unstructured array A, a nonstrict order ≤ over elements of A, and an index k, the task is to find the element that would be at position A[k] if the array were fully sorted. A variant that is the focus of this paper is partition-based selection: in addition to finding the kth smallest element, the algorithm must also permute elements of A such that A[i] ≤ A[k] ∀i, 0 ≤ i < k, and A[k] ≤ A[i] ∀i, k ≤ i < n. Sorting A solves the problem in O(n log n), so the challenge is to achieve selection in O(n) time. Selection often occurs as a step in more complex algorithms such as shortest path, nearest neighbor, and ranking. Q UICKSELECT, invented by Hoare in 1961 [15], is the se- [Copyright notice will appear here once ’preprint’ option is removed.] 1 2016/7/27 • Immunity to pathological inputs: Deterministic sampling dard library, where it can serve as a reference and basis for porting to other languages and systems. In the following sections we use the customary pseudocode and algebraic notations to define algorithms. Divisions of integrals are integral with truncation as in many programming languages, e.g. n/k is b nk c. When real division is needed, we write real(n)/real(k) to emphasize conversion of operands to real numbers prior to the division. Arrays are zero-based so as to avoid minute differences between the pseudocode algorithms and their implementations available online. The length of array A is written as |A|. We denote with A[a : b] (if a < b) a “slice” of A starting with A[a] and ending with (and including) A[b − 1]. The slice A[a : b] is empty if a = b. Elements of the array are not copied—the slice is a bounded view into the existing array. The next section discusses related work. § 3 reviews the algorithm definitions we start from. § 4 introduces the improvements we propose to M EDIAN O F M EDIANS and R E PEATED S TEP , which are key to better performance. § 5 discusses adaptation for M EDIAN O F M EDIANS and derivatives. § 6 includes a few engineering considerations. § 7 presents experiments and results with the proposed algorithms. A summary concludes the paper. heuristics (such as “median of first, middle, and last element”) are all susceptible to pathological inputs that make Q UICKSELECT’s run time quadratic. These inputs are easy to generate and contain patterns that are plausible in real data [26, 27, 34]. In order to provide linearity guarantees, many current implementations of Q UICK SELECT include code that detects and avoids such situations, at the cost of sometimes falling back to a slower (albeit not quadratic) algorithm, such as M EDIAN O F M EDIANS itself. The archetypal example is I NTROSE LECT [27]. A linear deterministic algorithm that is also fast would avoid these inefficiencies and complications by design. • Deterministic behavior: Randomized pivot selection leaves the input array in a different configuration after each call (even for identical inputs), which makes it difficult to reproduce runs (e.g. for debugging purposes). In contrast, deterministic selection always permutes elements of a given array the same way. • Predictability of running time: In real-time systems (e.g. that compute the median of streaming packets) a randomized pivot choice may cause problems. The first 1–3 pivot choices have a high impact on the overall run time of quickselect with randomized pivots. This makes for a large variance in individual run times [9, 18], even against the same input. Deterministic algorithms have a more predictable run time. 2. Related Work The selection problem has a long history, starting with Lewis Carrol’s 1883 essay on the fairness of tennis tournaments (as recounted by Knuth [20, Vol. 3]). Hoare [15] created the Q UICKSELECT algorithm in 1961, which still is the preferred choice of practical implementations, in conjunction with various pivot choosing strategies. Sophisticated running time analyses exist for quickselect [13, 18, 19, 23, 28]. Martı́nez, Panario, and Viola [24] analyze the behavior of Q UICKSELECT with small data sets and propose stopping Q UICKSELECT’s recursion early and using sorting as an alternative policy below a cutoff, essentially a simple multi-strategy Q UICKSELECT. Same authors [25] propose several adaptive sampling strategies for Q UICKSELECT that take into account the index searched. Blum, Floyd, Pratt, Rivest, and Tarjan created the M EDI AN O F M EDIANS algorithm [4]. Subsequent work provided variants and improved on its theoretical bounds [5, 11, 12, 21, 36, 37]. Chen and Dumitrescu [6] propose variants of M EDIAN O F M EDIANS that group 3 or 4 elements at a time (the original uses groups of 5 or more elements). Most variants offer better bounds and performance than the original, but to date neither has been shown to be competitive against heuristics-based algorithms. Battiato et al. [2] describe Sicilian Median Selection, a fast algorithm for computing an approximate median. It could be considered the transitive closure of Chen and Dumitrescu’s R EPEATED S TEP algorithm. In spite of good average performance, the algorithm’s worst-case pivot quality is insufficient for guaranteeing exact selection in linear time. We seek to improve the state of the art in fast deterministic selection, specifically aiming practical large-scale applicability. First, we propose a refined definition of M EDI AN O F M EDIANS. The array permutations necessary for finding the pivot also contribute to the partitioning process, thus reducing both overall comparisons and data swaps. We apply this idea to Chen and Dumitrescu’s recent R EPEATED S TEP algorithm [6], a M EDIAN O F M EDIANS variant particularly amenable to our improvements, and we obtain a competitive baseline. Second, we add adaptation to M EDIAN O F M EDIANS. The basic observation is that M EDIAN O F M EDIANS is specialized in finding the median, not some arbitrary order statistic. That makes the performance of M EDIAN O F M E DIANS degrade considerably when selecting order statistics away from the median (e.g. 25th percentile). We devise simple and efficient specialized algorithms for searching for indexes away from the middle of the searched array. The best algorithm to use is chosen dynamically. The resulting composite algorithm Q UICKSELECTA DAP TIVE was measured to be faster than relevant state-of-the-art baselines, which makes it a candidate for solving the selection problem in practical libraries and applications. We propose a generic open-source implementation of Q UICK SELECTA DAPTIVE for inclusion in the D language’s stan2 2016/7/27 3. Background 3.1 Q UICKSELECT and M EDIAN O F M EDIANS Most pivot selection schemes are based on heuristics: they choose an array element likely to be not too close to the minimum or maximum, and then use H OARE PARTI TION [16] (Algorithm 2), which partitions the array around that element in linear time. Some popular and well researched heuristics include: We provide a quick overview of the Q UICKSELECT and M EDIAN O F M EDIANS algorithms [8, 20] with an emphasis on practical implementations. Algorithm 1 illustrates Q UICKSELECT. It takes as parameters not only the data (array A and index k), but also a partitioning primitive called PARTITION, in a higher-order function fashion. PARTITION(A, k) returns an index p (called pivot) with 0 ≤ p < |A| and also partitions A such that A[j] ≤ A[p] ∀j, 0 ≤ j < p, and A[p] ≤ A[j] ∀j, p < j < |A|. Q UICKSELECT, in a divide and conquer manner, uses the pivot to either reduce the portion of the array searched from the left when p < k, reduce it from the right when k < p, or finish the search when p = k. Overall, Q UICKSE LECT uses an approximate partitioning primitive repeatedly to obtain a precise partition around the specific index k. • Random pivot [8]: the pivot is chosen uniformly at ran- dom from A; • Median of 3 [32]: the pivot is the median of A [0], A [|A|/2], and A [|A| − 1]; • Median of 3 randomized [17, 32]: the pivot is the median of three elements chosen uniformly at random from A; • Tukey’s ninther [3, 33]: Choose A [0], A [|A|/8], A [2|A|/8], A [3|A|/8], A [4|A|/8], A [5|A|/8], A [6|A|/8], A [7|A|/8], and A [|A| − 1], then compute the median of first three, middle three, and last three, and finally the pivot is the median of the three medians; Algorithm 1: Q UICKSELECT Data: PARTITION, A, k with |A| > 0, 0 ≤ k < |A| Result: Puts kth smallest element of A in A[k] and partitions A around it. 1 while true do 2 p ← PARTITION(A, k); 3 if p = k then 4 return; 5 end 6 if p > k then 7 A ← A[0 : p]; 8 else 9 k ← k − p − 1; 10 A ← A[p + 1 : |A|]; 11 end 12 end • Tukey’s ninther randomized [34]: Similar to the ninther, but the nine samples are chosen uniformly at random from A. Algorithm 2: H OARE PARTITION Data: A, p with |A| > 0, 0 ≤ p < |A| Result: p0 , the new position of A[p]; A partitioned at A[p0 ] 1 S WAP (A[p], A[0]); 2 a = 1; b = |A| − 1; 3 loop: while true do 4 while true do 5 if a > b then break loop; 6 if A[a] ≥ A[0] then break; 7 a ← a + 1; 8 end 9 while A[0] < A[b] do b ← b − 1; 10 if a ≥ b then break; 11 S WAP(A[a], A[b]); 12 a ← a + 1; 13 b ← b − 1; 14 end 15 S WAP (A[0], A[a − 1]); 16 return a − 1; The running time is linear if PARTITION(A, k) is linear and able to return a pivot p within some fixed fraction f < 1 from either end of A, i.e. p > f |A| and p < (1 − f )|A|, which allows Q UICKSELECT to eliminate at least f |A| elements at each pass. In that case, the time complexity T (n) (depending on n = |A|) of Q UICKSELECT satisfies: T (n) ≤ T ((1 − f )n) + O(n) (1) which results in T (n) = O(n) by the Master Theorem [30]. There is no required relationship between k and p, and in fact many partitioning routines do not use k. It may be considered a hint. Ideally, the partitioning primitive would return a pivot equal to k, or close to k (greater than it if k < |A| 2 , smaller otherwise). That allows Q UICKSELECT to either end the search or eliminate many elements at each pass. Contemporary approaches prevalently ignore k and attempt to partition close to the median, strategy shown recently to be suboptimal [25]. No heuristics-based approach can provide a good worstcase run time guarantee. However, the constant-time speed of computing the pivot compensates on average for its poor quality. In contrast, M EDIAN O F M EDIANS spends more time to systematically guarantee good pivot choices. Algorithm 3 illustrates the prevalent implementation of M EDIAN O F M E DIANS [7, 10, 29, 35]. 3 2016/7/27 Algorithm 3: BFPRTBASELINE Data: A, k (k not used) Result: Pivot 0 ≤ p < |A|; A partitioned at A[p] 1 if |A| < 5 then 2 return H OARE PARTITION(A, |A|/2); 3 end 4 i ← 0; j ← 0; 5 while i + 4 < |A| do 6 M EDIAN 5(A, i, i + 1, i + 2, i + 3, i + 4); 7 S WAP(A[i + 2], A[j]); // median to 1st quintile 8 i ← i + 5; 9 j ← j + 1; 10 end 11 Q UICKSELECT (BFPRTBASELINE , A[0 : j], j/2); 12 return H OARE PARTITION (A, j/2); Algorithm 4: M EDIAN 5 Data: A, a, b, c, d, e Result: Puts median of A[a], A[b], A[c], A[d], A[e] in A[c] and leaves the smaller items in A[a], A[b] and the larger ones in A[d], A[e]. 1 if A[c] < A[a] then S WAP (A[a], A[c]); 2 if A[d] < A[b] then S WAP (A[b], A[d]); 3 if A[d] < A[c] then 4 S WAP(A[c], A[d]); 5 S WAP(A[a], A[b]); 6 end 7 if A[e] < A[b] then S WAP (A[b], A[e]); 8 if A[e] < A[c] then 9 S WAP(A[c], A[e]); 10 if A[c] < A[a] then S WAP(A[a], A[c]); 11 else 12 if A[c] < A[b] then S WAP(A[b], A[c]); 13 end The algorithm first computes medians of groups of 5 elements at a time, for a total of |A| 5 groups. The primitive M EDIAN 5 takes an array and five distinct indexes, computes their median with a small specialized algorithm, and places it in the third index received. (The last |A| mod 5 elements of the array are ignored for simplicity.) Computing (recursively) the median of these medians yields a pivot with a desirable property. There are |A| 10 elements less than or equal to the pivot, but each of those is the median of some 5 distinct elements, so for each of those |A| 10 elements there are 2 others also less than or equal to the pivot. That guarantees at least 3|A| 10 elements less than or equal to the pivot. By symmetry, at least 3|A| 10 elements in the array are greater than or equal to the pivot. Selection is initiated by invoking Q UICKSE LECT(BFPRTBASELINE , A, k). Line 11 passes the name of the algorithm (BFPRTBASELINE) as an argument to Q UICKSELECT. This makes the two algorithms mutually recursive: BFPRTBASELINE is the partitioning primitive used by Q UICKSELECT, and in turn uses Q UICKSELECT itself. M EDIAN 5 is used intensively by the algorithm and therefore deserves a careful implementation. A good balance needs to be found between comparisons, swaps, and function size. We chose a function with 6 comparisons and 0–7 swaps (only 3.13 on average against distinct random numbers), shown in Algorithm 4. (To simplify notation we use A[a] < A[b] as a shortcut for ¬(A[b] ≤ A[a]).) The function is also idempotent: if the five slots are already partitioned, it performs no swaps. To prove linearity for M EDIAN O F M EDIANS, let us look at the number of comparisons C(n) that BFPRTBASELINE executes as a function of n = |A|. In the worst case, we have: C(n) ≤ C n 5 +C  7n 10  + 6n +n 5 (2) where the first term accounts for the recursive call to compute the median of medians, the second is the recursive call in Q UICKSELECT (in the worst case 3n 10 elements are eliminated in one partitioning step so 7n are left), the third is the 10 cost of computing the medians of five, and the last is the cost of H OARE PARTITION. Consequently C(n) ≤ 22n. The number of swaps S(n) is also of interest. That satisfies the recurrence: S(n) ≤ S n 5 +S  7n 10  + n 7n n − 10 + 5 2 (3) The terms correspond to those for C(n). Our median of five routine uses at most 7 swaps. Also in the last term we n eliminate the first 10 elements of the array. Those are known to be no greater than the median so they will not be swapped. Consequently S(n) ≤ 37n 2 . Although Algorithm 3 uses groups of 5, any greater constant works as well (for the implementation and the linearity proof above); in fact, Blum et al. discuss group sizes of 15 and 21 elements. Group size 5 is prevalently used today because it is the most effective in practice. 3.2 The R EPEATED S TEP Algorithm Recently Chen and Dumitrescu [6] proposed M EDIAN O F M EDIANS variants that use groups of 3 or 4 elements yet have linear worst-case running time, disproving longstanding conjectures to the contrary. Algorithm 5 shows the pseudocode of their R EPEATED S TEP algorithm with a group size of 3. 4 2016/7/27 of three (up to three comparisons per group of three), computing the medians of medians of three, and the partitioning. Consequently C(n) ≤ 21n. We now calculate a bound for S(n). Each median of three uses up to two swaps, to which we add one for placing the median at the front of the array. The partitioning costs at most n2 swaps in general, but in this case we already have n elements of the array known to be no greater the first 18 than the pivot, so they will not be swapped. We obtain: Algorithm 5: R EPEATED S TEP Data: A, k (k not used) Result: Pivot 0 ≤ p < |A|; A partitioned at A[p] 1 if |A| < 9 then 2 return H OARE PARTITION(A, |A|/2); 3 end 4 i ← 0; j ← 0; 5 while i + 2 < |A| do 6 M EDIAN 3(A, i, i + 1, i + 2); 7 S WAP(A[i + 1], A[j]); // median to 1st tertile 8 i ← i + 3; 9 j ← j + 1; 10 end 11 i ← 0; m ← 0; 12 while i + 2 < j do 13 M EDIAN 3(A, i, i + 1, i + 2); 14 S WAP(A[i + 1], A[m]); // median to 1st 9th-ile 15 i ← i + 3; 16 m ← m + 1; 17 end 18 Q UICKSELECT (R EPEATED S TEP , A[0 : m], m/2); 19 return H OARE PARTITION (A, m/2); S(n) ≤ S n 9 +C  7n 9  + 3n 3n + +n 3 9 9 +S  7n 9  +n+ n n n − 18 + 3 2 (5) which solves to S(n) ≤ 65n 4 . Both bounds are better than those of BFPRTBASELINE. 4. Improving Layout We now start improving these algorithms, first by laying out data in a more efficient manner. Note that BFPRTBASELINE (Algorithm 3) already embeds an important optimization— it reuses the first quintile of A for storing the medians. This approach avoids the additional overhead of creating and using a separate temporary array to store the medians of 5 and is in keeping with today’s most frequently encountered implementations [7, 10, 29, 35]. One key insight motivates a different layout choice: we aim to make the comparisons and swaps performed during the medians of 5 computation also count toward the partitioning. M EDIAN O F M EDIANS organizes the array in groups of 5 and computes the median of each. In addition, in each group of 5, the 2 smaller elements are to the left, and the 2 larger ones are to the right of the median. That imparts quite a non-trivial implicit structure onto the array in addition to computing the pivot. However, that structure is of no use to H OARE PARTITION. Ideally, that structure should be embedded in the array in a form favorable to the subsequent partitioning step; conversely, the partitioning step should make maximal use of the implicit information established in the array by the medians of 5 stage. Indeed, the original M EDI AN O F M EDIANS paper [4] provides an optimized algorithm called P ICK 1 that makes use of the implicit structuring of the input, but is still not efficient in practice. Our approach (BFPRTI MPROVED shown in Algorithm 6) is to make the groups of 5 non-contiguous and lay them out in a manner that is advantageous for the partitioning step. We place the subarray of medians in the third quintile, the smaller values to its left, and the larger values to its right. This is efficient because the third quintile is in the middle of the entire array. After that quintile is partitioned around its own median (by the recursive call to Q UICKSE LECT), it already is globally partitioned properly around the pivot; there is no more need to visit it. That way, the medians of 5 computation step contributes one fifth of the final result at no additional cost. The subsequent partitioning step only The algorithm is similar to BFPRTBASELINE with group size changed to 3, with one important addition: the median of medians step is repeated, essentially choosing the pivot as the median of medians of medians of three (sic), instead of median of medians of three. This degrades the quality of the pivot because of the double approximation: the pivot is guaranteed to be within 2n 9 elements from either edge of the array (weaker than n3 without the repeated step, or 3n 10 if using groups of 5). However, this loss in quality comes with an improvement in speed: the median of medians computation only needs to recurse on n9 elements instead of n3 . Intuitively, trading off some pivot quality for faster processing in M EDIAN O F M EDIANS is a good idea, since pivot heuristics that provide relatively poor pivot estimates very fast perform so well in practice. There are advantages specific to using groups of 3—computing the median of 3 is simpler and takes 2–3 comparisons whereas the median of 5 requires 6 comparisons. So it is expected that R EPEATED S TEP improves performance over BFPRTBASELINE. To assess that, let us estimate the number of comparisons C(n) performed by R EPEATED S TEP from the recurrence: C(n) ≤ C n (4) where the first term is the cost of recursion for computing the median of medians of medians, the second is the worst-case time spent processing the remaining elements, and the last three terms account respectively for computing the medians 5 2016/7/27 needs to partition quintiles 1, 2, 4, and 5. Better yet, quintiles 1 and 2 contain the statistically smaller elements and quintiles 4 and 5 contain the statistically larger elements so the medians of 5 computation also saves on swapping during partitioning. In order to distribute the groups of 5 appropriately, we take advantage of the fact that the M EDIAN 5 primitive (Algorithm 4) accepts any five distinct indexes, not only consecutive ones. So we can choose any convenient grouping and iteration schedule. Let f = |A| 5 such that quintiles start at A[0], A[f ], A[2f ], A[3f ], and A[4f ]. Then we choose the first group as M EDIAN 5(A, 0, 1, 2f, 3f, 3f + 1). These are respectively the leftmost two elements to the left of the third quintile, the first element of the third quintile, and the leftmost two elements to the right of the third quintile. Iteration proceeds with median calls following the schedule M E DIAN 5(A, i, i + 1, 2f + j, 3f + i, 3f + i + 1), with i iterating with step 2 and j iterating with step 1. The entire array is covered when j = f . Computing medians of five using the iteration strategy above and then computing the median of the third quintile leaves the array with the following layout: Algorithm 6: BFPRTI MPROVED Data: A, k (k not used) Result: Pivot p, 0 ≤ p < |A| 1 if |A| < 5 then 2 return H OARE PARTITION(A, |A|/2); 3 end 4 f ← |A|/5; i ← 0; 5 for j ← 2f through 3f − 1 do 6 M EDIAN 5(A, i, i + 1, j, 3f + i, 3f + i + 1); 7 i ← i + 2; 8 end 9 Q UICKSELECT (BFPRTI MPROVED , A[2f : 3f ], f /2); return E XPAND PARTITION(A, 2f, 2f + f /2, 3f − 1); We now derive worst-case bounds for BFPRTI MPROVED depending on n = |A|. The only difference in computing C(n) is one fifth of the elements do not need to be compared any more, which changes the last term: • The elements likely less than or equal to the pivot (at least 3n 10 ) C(n) ≤ C are already to the left of A’s middle. • The elements likely larger than or equal to the pivot (again at least 3n 10 ) S(n) ≤ S and are already partitioned around the pivot, so there is no more need for the partitioning step to compare n5 elements. 0 ≤ A[p] A[p] ≥ A[p] i→ a p ? b ←j n +S 5  7n 10  + 6n 4n + 5 5 (6) 5  7n 10  + 7n 2n + 5 10 (7) The last term changed because there are at most 2n 10 elements on either side to swap across the pivot, and the algorithm puts two elements in the right place with one swap whenever possible. The equation results in S(n) ≤ 16n. By these estimates, BFPRTI MPROVED reduces comparisons by about 9% and swaps by about 14% over BFPRTBASELINE. This leaves the array well suited for partitioning with only light swapping. The subarrays A[0 : 2f ] and A[3f : |A|] need to be visited and partitioned properly. This work is carried by E XPAND PARTITION (not shown as it is trivial yet replete with detail), a slightly modified H OARE PARTI TION that takes into account the already-partitioned subarray around the pivot. The call E XPAND PARTITION(A, a, p, b) proceeds by the following scheme, starting with i = 0 and j = |A| − 1 and moving them toward a and b, respectively: ? +C which leads to C(n) ≤ 20n. For swaps: are already to the right of A’s middle. • The medians of five are in the third quintile of the array ≤ A[p] n 4.1 Improving Layout for R EPEATED S TEP Let us now apply the same layout idea to the R EPEATED S TEP algorithm. The result is shown in Algorithm 7. The loop starting at line 5 computes medians of 3 noncontiguous elements using M EDIAN 3 (trivial, not shown): first from the first tertile, second from the middle tertile, and third from the last tertile. The three indexes move in lockstep, so only one iteration variable is needed. Similarly, the next loop uses the same iteration schedule to compute medians of three for the middle tertile. This leaves the medians of medians of medians of 3 in the fifth 9th ile (middle “novile”) of the array. The call to Q UICKSELECT partitions the mid 9th ile around its (exact) median. Right after line 11 the following conditions are satisfied: ≥ A[p] The procedure swaps as many elements as possible between A[i : a] and A[b + 1 : j + 1], because that is the most efficient use of swapping—one swap puts two elements in their final slots. Often there will be some asymmetry (one of i and j reaches its limit before the other) so the pivot position will need to shift to the left or to the right. E XPAND PARTITION returns the final position of the pivot, which BFPRTI MPROVED forwards to the caller. E XPAND PARTI TION (A, a, b) performs max(a, |A| − b) comparisons and at most max(a, |A| − b) swaps. • Pivot value is in A[p]; • A[4f : p] contains only elements less than or equal to the pivot; 6 2016/7/27 These bounds are adequate for proving linearity and useful as proxies, but not necessarily tight (producing worstcase inputs for M EDIAN O F M EDIANS remains an open problem); the measured speed improvements are larger. Although algorithms with better upper bounds (both comparisons and swaps) for selection have been devised [5, 21], they are more complex and entail large hidden costs; to date neither of those has been shown to be efficient in practice. This layout change has been crucial for obtaining efficiency from M EDIAN O F M EDIANS. The improved layout not only drastically improves performance, but also allows further optimizations to build upon it. R EPEATED S TEP I M PROVED is our core algorithm for fast deterministic selection. Algorithm 7: R EPEATED S TEP I MPROVED Data: A, k (k not used) Result: Pivot p, 0 ≤ p < |A|; A partitioned at p 1 if |A| < 9 then 2 return H OARE PARTITION(A, |A|/2); 3 end 4 f ← |A|/9; 5 for i ← 3f through 6f − 1 do 6 M EDIAN 3(A, i − 3f, i, i + 3f ); 7 end 8 for i ← 4f through 5f − 1 do 9 M EDIAN 3(A, i − f, i, i + f ); 10 end 11 Q UICKSELECT (R EPEATED S TEP I MPROVED , A[4f : 5f ], f /2); 12 return E XPAND PARTITION (A, 4f, 4f + f /2, 5f − 1); 5. The performance of R EPEATED S TEP I MPROVED compares favorably with state-of-the-art baselines when searching the median. However, performance degrades quickly as the index sought migrates from the middle of the array toward either of its ends. This is because R EPEATED S TEP I MPROVED (like all M EDIAN O F M EDIANS variations discussed so far) is specialized in finding a good approximate median, not a good approximate kth order statistic for any k. We acknowledged that by mentioning “k not used” in each algorithm’s parameters section. However, k may be very informative especially when far from the middle. For an extreme example, consider searching a position k only a few slots from one edge of the array. Then any heuristic will produce a good-quality pivot very quickly simply because the range of good pivots is large. In contrast, a M EDIAN O F M EDIANS algorithm would do considerable work to eliminate about half the array. This continues through the end of the search—heuristics eliminate swaths of the array at constant cost, whereas M EDIAN O F M EDIANS pedantically reduces the array by about half at every pass at linear cost. The average time complexity is linear for either approach, but heuristics-based algorithms will complete faster. Our approach to introducing adaptation is two-pronged. First, we use simple interpolation to improve the speed of R EPEATED S TEP I MPROVED with off-median indexes. Second, we define specialized algorithms for indexes close to one edge of the array. In the following we focus on small indexes (i.e. less than |A| 2 ). This is without loss of generality; large indexes work symmetrically. • A[p+1 : 5f ] contains only elements greater than or equal to the pivot; • At least 2n 9 to the pivot; elements in A[0 : 4f ] are less than or equal elements in A[5f : |A|] are greater than or equal to the pivot. • At least 2n 9 Let us derive bounds for C(n) and S(n) for this algorithm. The number of comparisons in R EPEATED S TEP I M PROVED satisfies the recurrence: C(n) ≤ C n 9 +C  7n 9  +n+ n 8n + 3 9 (8) The only difference from the basic algorithm is the last term, which is slightly smaller in this case because we don’t revisit the middle 9th ile during partitioning. This solves to C(n) ≤ 20n (5% better than R EPEATED S TEP). Each M EDIAN 3 call performs at most two swaps. Due to the layout choice the partitioning step already leaves at least 2n 9 elements less than or equal to the pivot to the pivot’s left, and at least as many elements greater than or equal to the pivot to its right, so in the worst case the algorithm needs 5n to swap 5n 18 elements from the left side and 18 elements from the right. However, the swaps don’t sum from the two sides because one swap operation takes care of two elements wherever possible. So the total number of swaps performed by E XPAND PARTITION is at most 5n 18 . S(n) ≤ S n 9 +S Consequently S(n) ≤ algorithm. PEATED S TEP  7n 9 21n 2 ,  + 2n 2n 5n + + 3 9 18 Adaptation 5.1 Making R EPEATED S TEP I MPROVED Adaptive Line 11 of R EPEATED S TEP I MPROVED computes the median of the fourth 9th ile with the call Q UICKSE LECT(R EPEATED S TEP I MPROVED , A[4f : 5f ], f /2). The last argument divides the subarray in half, computing an approximate median of the entire array. However, if k 6= |A| 2 , (9) over 35% fewer than R E - 7 2016/7/27 we are more interested in a pivot close to k than an approximate median. To make R EPEATED S TEP I MPROVED adaptive, we adopt a simple interpolation approach: replace f /2 with kf /|A| in the call above, idea first proposed and analyzed by Martı́nez et al. [25] with the name “proportional-of-s”. That way, k is proportionally represented in the fraction by which the subarray is partitioned. There is no change if k = |A|/2; as k gets smaller the pivot computed will move left, and as k gets larger the pivot will move right. Algorithm 8 shows the pseudocode of the resulting algorithm R EPEATED S TEPA DAP TIVE , which is the first discussed here to use k. particular interest to us because it partitions the array asymmetrically. Consider taking the lower median of 4 in the first step, then the median of 3 in the second step and use that as the pivot. We do so with the help of the trivial routine L OWER M EDIAN 4(A, a, b, c, d) (not shown), which places the lower median of A[a], A[b], A[c], A[d] in A[b] and the minimum in A[a]. In that case, after the two partition steps (with group sizes 4 then 3) are finished, there are at least |A| 6 elements less than or equal to the pivot on the left, and |A| 4 elements greater than or equal to the pivot on the right. (If the upper median of 4 were used, the numbers would be reversed.) The partitioned subarray is asymmetrically placed at A [|A|/3 : 5|A|/12], which reduces swaps if the pivot is also on the left. Algorithm 9 defines R EPEATED S TEP L EFT. The call to Q UICKSELECT uses the same interpolation approach as R E PEATED S TEPA DAPTIVE . Algorithm 8: R EPEATED S TEPA DAPTIVE Data: A, k Result: Pivot p, 0 ≤ p < |A|; A partitioned at A[p] 1 if |A| < 9 then 2 return H OARE PARTITION(A, |A|/2); 3 end 4 f ← |A|/9; 5 for i ← 3f through 6f − 1 do 6 M EDIAN 3(A, i − 3f, i, i + 3f ); 7 end 8 for i ← 4f through 5f − 1 do 9 M EDIAN 3(A, i − f, i, i + f ); 10 end 11 Q UICKSELECT (R EPEATED S TEPA DAPTIVE , A[4f : 5f ], kf /|A|); 12 return E XPAND PARTITION(A, 4f, 4f + kf /|A|, 5f − 1); 5.2 Algorithm 9: R EPEATED S TEP L EFT Data: A, k Result: Pivot p, 0 ≤ p < |A|; A partitioned at A[p] 1 if |A| < 12 then 2 return H OARE PARTITION(A, |A|/2); 3 end 4 f ← |A|/4; 5 for i ← 0 through f − 1 do 6 L OWER M EDIAN 4(A, i, i + f, i + 2f, i + 3f ); 7 end 0 8 f ← f /3; 0 9 for i ← f through f + f − 1 do 0 10 M EDIAN 3(A, i, i + f , i + 2f 0 ); 11 end 12 Q UICKSELECT (R EPEATED S TEP L EFT , A[f : f + f 0 ], kf 0 /|A|); 13 return E XPAND PARTITION(A, f, f + kf 0 /|A|, f + f 0 − 1); Searching for Indexes Left of Median Performance of R EPEATED S TEPA DAPTIVE is better than R EPEATED S TEP I MPROVED when k is off of |A| 2 . However, as k gets further away from the middle, the number of swaps performed by R EPEATED S TEPA DAPTIVE increases. This is because the 9th ile used for recursion is still in the middle of the array, so it is suboptimally placed; E XPAND PARTITION needs to shift elements from that middle 9th ile toward the pivot, which is off the middle. When k is far away from the median, a better way to improve performance is to partition the array asymmetrically. If the index sought is to the left of the median, placing the subarray of medians on the left and ensuring a larger margin on the right is better. That way the search has less swapping to do and is more likely to eliminate a large subarray. To get asymmetric margins, we modify the group size and placement as follows. Let us start by noting that R EPEATED S TEPA DAPTIVE does not necessarily need to use groups of 3. It may use different group sizes for the first and the repeated step, as long as linearity can be proven. An even group size is of The number of comparisons in the worst case obeys: C(n) ≤ C   n 5n 4n 3n +C + + +n 12 6 4 12 (10) with the same term positions as in Eq. 4 and the note that lower/upper median of 4 requires at most 4 comparisons. For this asymmetric algorithm, C(n) is also linear and bounded by 21n, even if inefficiently used for all values of k. R EPEATED S TEP L EFT is best used with indexes k below A’s middle (by a threshold we established experimentally). A similarly-defined routine R EPEATED S TEP R IGHT is to be used with indexes above the middle of A. For sought indexes close to the median, R EPEATED S TEPA DAPTIVE offers best results. 8 2016/7/27 5.3 Searching for Indexes Far Left of Median the subarray passed down to Q UICKSELECT is placed at A [2|A|/3 : 3|A|/4]. Consider now searching for very small indexes. In that case the motivation is high to not find a pivot to the left of the index, because that would only eliminate very little of the input. Martı́nez et al. discuss this risk for their related proportional-of-3 search strategy [25]. So we design an algorithm to find p such that p ≥ k. A different schema is useful here. R EPEATED S TEP FAR L EFT (Algorithm 10) takes the lower median of 4 in the first step, like R EPEATED S TEP L EFT. Then, instead of the median of 3 in the second step, it takes the minimum of 3. 5.4 How to tie these specialized algorithms together? We defined Q UICKSELECT as a higher-order function parameterized by the partitioning primitive used. That made it convenient to discuss and analyze a variety of partitioning algorithms using the same Q UICKSELECT skeleton. At this point, in order to implement full adaptation, we need to dynamically choose the partitioning algorithm from among R EPEATED S TEPA DAPTIVE, R EPEATED S TEP L EFT, R EPEATED S TEP R IGHT, R EPEATED S TEP FAR L EFT, and R EPEATED S TEP FAR R IGHT. A good place to decide strategy is the Q UICKSELECT routine itself, which has access to all information needed and controls iteration. Before each partitioning step, a partitioning algorithm is chosen depending on the relationship between |A| and k. After partitioning, both A and k are modified and a new decision is made, until the search is over. Q UICKSELECTA DAPTIVE (Algorithm 11) embodies this idea. 1.0 is dictated by the lower margin of R E The cutoff 12.0 PEATED S TEP FAR L EFT and R EPEATED S TEP FAR R IGHT ; as mentioned, in those cases we never want the pivot to be between the sought index and the closest array edge. The cutoff 7.0 16.0 has been chosen experimentally. Algorithm 10: R EPEATED S TEP FAR L EFT Data: A, k Result: Pivot p, 0 ≤ p < |A|; A partitioned at A[p] 1 if |A| < 12 then 2 return H OARE PARTITION(A, |A|/2); 3 end 4 f ← |A|/4; 5 for i ← f through 2f − 1 do 6 L OWER M EDIAN 4(A, i − f, i, i + f, i + 2f ); 7 end 0 8 f ← f /3; 0 9 for i ← f through f + f − 1 do 0 10 if A[i + f ] < A[i] then S WAP(A[i + f 0 ], A[i]); 11 if A[i + 2f 0 ] < A[i] then S WAP(A[i + 2f 0 ], A[i]); 12 end 13 Q UICKSELECT (R EPEATED S TEP FAR L EFT , A[f : f + f 0 ], kf 0 /|A|); 14 return E XPAND PARTITION(A, f, f + kf 0 /|A|, f + f 0 − 1); 6.   n 5n 4n 3n +C + + +n 12 6 4 12 Engineering Considerations The deterministic partitioning algorithms presented so far do not “cheat” (by estimating from samples, making assumptions about data distribution etc): they look at the entire data set and provide guaranteed margins. The absolute cost of a search is front-loaded, during the first few iterations of Q UICKSELECTA DAPTIVE, when the data examined is largest. For large data sets with usual distribution statistics, a good sampling strategy that finds a good pivot without inspecting the entire data may make a large speed difference. It is therefore very tempting for the optimization-minded engineer to do away with rigorous determinism and try a few shots at sampling when the data size is large. However, we resisted the lure of switching to one of the classic heuristics. When data is large, indeed the reward of a cheap good pivot is excellent, but conversely the cost of a bad pivot choice is high, and all heuristics may compute an arbitrarily bad pivot. We adopted an engineering solution that offers good speed improvements on average for only moderate slowdown in the worst case and a minor code change. Each search starts optimistically with a “sampling mode” flag on. As long as sampling is enabled, the first median step in all R EPEATED S TEP algorithm variations is skipped. For example, in Algorithm 7, the loop at line 5 is not executed if sampling is on. This makes the pivot to be evaluated only from the mid tertile; the first and last tertile are not inspected at In that case, there are at least |A| 12 elements less than or equal to the pivot on the left, and 3|A| elements 8 greater than or equal to the pivot on the right. (If the upper median was chosen, the numbers would be reversed.) The subarray passed down to Q UICKSELECT is placed at A [|A|/4 : |A|/3]. C(n) obeys: C(n) ≤ C Choosing Strategy Dynamically in Q UICKSELECT (11) with the same term positions as in Eq. 4. For this algorithm, C(n) is also linear and bounded by 21n. However, if R E |A| PEATED S TEP FAR L EFT is used only when k ≤ 12 , then the pivot is guaranteed on the right so the bound gets better because 3|A| 8 or more elements are discarded. The algorithm R EPEATED S TEP FAR R IGHT (not shown) is defined symmetrically with R EPEATED S TEP FAR L EFT: it takes the upper medians of 4 and places them in the 3rd quartile, then within that quartile it takes the maximum of 3. |A| The margins are 3|A| 8 on the left and 12 on the right, and 9 2016/7/27 7. Algorithm 11: Q UICKSELECTA DAPTIVE Data: A, k with 0 ≤ k < |A| Result: Puts kth smallest element of A in A[k] and partitions A around it. 1 while true do 2 r ← real(k)/real(|A|); 3 if |A| < 12 then 4 p ← H OARE PARTITION(A, |A|/2); 5 else if r ≤ 7.0/16.0 then 6 if r ≤ 1.0/12.0 then 7 p ← R EPEATED S TEP FAR L EFT(A, k); 8 else 9 p ← R EPEATED S TEP L EFT(A, k); 10 end 11 else if r ≥ 1.0 − 7.0/16.0 then 12 if r ≥ 1.0 − 1.0/12.0 then 13 p ← R EPEATED S TEP FAR R IGHT(A, k); 14 else 15 p ← R EPEATED S TEP R IGHT(A, k); 16 end 17 else 18 p ← R EPEATED S TEP I MPROVED(A, k); 19 end 20 if p = k then return; 21 if p > k then 22 A ← A[0 : p]; 23 else 24 i ← k − p − 1; 25 A ← A[p + 1 : |A|]; 26 end 27 end Experiments and Results We tested performance on a HP ENVY 810qe Desktop (Intel Core i7 3.6 GHz) machine with 32GB RAM, against arrays of various sizes of 64-bit floating point data (results on 32and 64-bit integrals are similar). The code and tests were written in the D programming language [1]. The compiler used was the LLVM-based ldc [22] version 0.14.0 (we obtained similar results and rankings with dmd 2.069). We ran each experiment five times (with different random data sets) and took the median of the five timings obtained. The data sets used are: • Uniformly-distributed random floating-point numbers in the range −5 000 000 through 5 000 000. • Numbers generated as above, but sorted prior to testing. • Normally-distributed data with mean 0 and standard de- viation 3 333 333. Many pivot choosing strategies have been proposed in the literature. We chose the most competitive and in prevalent industrial use, also mentioned in the introduction: • M EDIAN 3: Median of 3 deterministic; • M EDIAN 3R ANDOMIZED: Median of 3 randomized; • N INTHER: Tukey’s ninther deterministic; and • N INTHER R ANDOMIZED: Ninther randomized. The deterministic heuristics are particularly relevant on almost sorted data, where they perform very well. We tried but did not plot two more heuristics: single random pivot performed poorly, and medians of 5 did not perform better than the ninther. 7.1 Finding the Median First we focus on finding the median. Fig. 1 plots the absolute run times of the algorithms tested for finding the median in arrays of uniformly-distributed floating point numbers. To avoid clutter, we did not plot M EDIAN 3 and N INTHER because their behavior on random data is similar to their respective randomized versions. To give a clearer image of the relative performance of the algorithms, Fig. 2 shows the relative speedup of Q UICK SELECTA DAPTIVE over all other algorithms. Fig. 3 shows speedup only over heuristics-based algorithms. Ranking is similar on Gaussian-distributed floating point numbers. Fig. 4 shows the speedup of Q UICKSELECTA DAP TIVE over the others, and Fig. 5 shows its speedup only over heuristics-based algorithms. One interesting aspect is that R EPEATED S TEPA DAPTIVE performed better than R EPEATED S TEP even on this task (searching for the median), where adaptation is not ostensibly involved. The reason is that adaptation still helps, just not in the first iteration: after one or more iterations in Q UICK SELECTA DAPTIVE ’s main loop, the index, the array limits, all, so this mechanism effectively implements sampling. The rest of the function proceeds the same. The pivot now den grades in quality from within 2n 9 to within 9 of either end of the array. However, a quality check step in Q UICKSELECTA DAPTIVE turns the sampling mode flag off as soon as one partitioning step did not meet its margin guarantees. Therefore, there may be at most one bad pivot choice per search, and even that is not arbitrarily bad. The time complexity is not affected. This sampling strategy makes Q UICKSELECTA DAPTIVE adaptive to both k and the data distribution and takes its performance from passable to compelling. The implementation also contains a few microoptimizations not shown in the pseudocode: some computations are memoized and sentinel techniques are used in some loops to reduce overheads. The performance gains from most of these optimizations are minor but measurable. 10 2016/7/27 BFPRTBASELINE R EPEATED S TEP BASELINE M EDIAN O F 3R ANDOMIZED A DAPTIVE N O S AMPLING Time [ms] 4,000 BFPRTI MPROVED R EPEATED S TEP I MPROVED N INTHER R ANDOMIZED Q UICKSELECTA DAPTIVE 2,000 0 10 25 40 55 70 Input size [millions of elements] 85 100 Figure 1. Run times of various selection algorithms (64-bit uniformly distributed floating point numbers) BFPRTI MPROVED R EPEATED S TEP I MPROVED N INTHER R ANDOMIZED M EDIAN O F 3 M EDIAN O F 3R ANDOMIZED Speedup of Q UICKSELECTA DAPTIVE [%] Speedup of Q UICKSELECTA DAPTIVE [%] BFPRTBASELINE R EPEATED S TEP BASELINE M EDIAN O F 3R ANDOMIZED 300 200 100 0 40 30 20 10 0 10 10 25 40 55 70 85 Input size [millions of elements] 100 N INTHER N INTHER R ANDOMIZED 25 40 55 70 85 Input size [millions of elements] 100 Figure 3. Detail: Relative speedup of Q UICKSELECTA DAPTIVE over heuristics-based algorithms (64-bit uniformly distributed floating point numbers). Figure 2. Relative speedup of Q UICKSELECTA DAPTIVE over other algorithms (64-bit uniformly distributed floating point numbers). DIAN O F 3R ANDOMIZED and N INTHER R ANDOMIZED also perform well on this highly structured input. and their relationship changes. For example, if the first partition pass finds a good approximate pivot, the second pass will process a k close to one edge of the array, where adaptive algorithms have an advantage. On sorted data, as expected, the deterministic heuristics (M EDIAN O F 3 and N INTHER) perform the best by a large margin. This is because they are engineered to find the exact median if the data is already sorted, so the cost of Q UICKSELECT is essentially that of one pass through H OARE PARTITION. The randomized versions M E - 7.2 Finding Indexes Other than the Median This experiment measures how adaptation helps in searching for indexes other than the median. This time, |A| is fixed at 1 000 000 and the ratio between k and |A| varies between 5% and 95%. Fig. 8 plots absolute run times for the algorithms tested. Fig. 9 shows the relative speedup of Q UICK SELECTA DAPTIVE over the other algorithms. The improvements over non-adaptive M EDIAN O F M EDIANS derivatives are strong for all percentiles tested, especially toward the 11 2016/7/27 BFPRTI MPROVED R EPEATED S TEP I MPROVED N INTHER R ANDOMIZED 300 200 100 0 10 25 40 55 70 85 Input size [millions of elements] 100 100 0 N INTHER N INTHER R ANDOMIZED 30 20 10 25 40 55 70 85 Input size [millions of elements] 25 40 55 70 85 Input size [millions of elements] M EDIAN O F 3 M EDIAN O F 3R ANDOMIZED Speedup of Q UICK S ELECTA DAPTIVE [%] Speedup of Q UICK S ELECTA DAPTIVE [%] 200 100 Figure 6. Relative speedup (slowdown if negative) of Q UICKSELECTA DAPTIVE over other algorithms (64-bit sorted floating point numbers). 40 10 BFPRTI MPROVED R EPEATED S TEP I MPROVED N INTHER N INTHER R ANDOMIZED 300 10 Figure 4. Relative speedup of Q UICKSELECTA DAPTIVE over other algorithms (64-bit Gaussian-distributed floating point numbers). M EDIAN O F 3 M EDIAN O F 3R ANDOMIZED BFPRTBASELINE R EPEATED S TEP BASELINE M EDIAN O F 3 M EDIAN O F 3R ANDOMIZED Speedup of Q UICK S ELECTA DAPTIVE [%] Speedup of Q UICK S ELECTA DAPTIVE [%] BFPRTBASELINE R EPEATED S TEP BASELINE M EDIAN OF 3 R ANDOMIZED 100 Figure 5. Detail: Relative speedup of Q UICKSELECTA DAPTIVE over heuristics-based algorithms (64-bit Gaussian-distributed floating point numbers). N INTHER N INTHER R ANDOMIZED 20 0 −20 −40 10 25 40 55 70 85 Input size [millions of elements] 100 Figure 7. Detail: Relative speedup (slowdown if negative) of Q UICKSELECTA DAPTIVE over heuristics-based algorithms (64-bit sorted floating point numbers). end of the scale, as expected. Fig. 10 gives only the relative speedup over heuristics-based strategies, again showing 12 2016/7/27 good improvements. Results on Gaussian-distributed data (not shown) are similar. 8. Summary and Future Work We refine the definition of M EDIAN O F M EDIANS and its variant R EPEATED S TEP to improve their speed. Measurements show that the best deterministic algorithm Q UICK SELECTA DAPTIVE outperforms state-of-the-art baselines in the task of partitioning an array around a specified quantile. There are several future directions we plan to follow. One is to devise principled methods of choosing the group sizes and layouts for each of the specialized algorithms, depending on the index searched. Currently we use three algorithms chosen experimentally, but perhaps a single algorithm with the proper parameterization might replace them all. We also plan to investigate the use of fast deterministic selection algorithms for sorting. Acknowledgments Thanks to Timon Gehr, Ivan Kazmenko, Scott Meyers, Todd Millstein who reviewed drafts of this document. Many participants to the D Programming Languge forum have submitted partition of 5 primitives (http://forum.dlang.org/ post/[email protected]), of which the one by Teppo Niinimäki was used in this paper. 13 2016/7/27 BFPRTBASELINE M EDIAN O F 3R ANDOMIZED BFPRTI MPROVED N INTHER R ANDOMIZED R EPEATED S TEP BASELINE A DAPTIVE N O S AMPLING R EPEATED S TEP I MPROVED R EPEATED S TEPA DAPTIVE Time [ms] 40 30 20 10 10 20 30 40 50 60 Index sought relative to size [%] 70 80 90 Figure 8. Run times of various selection algorithms (64-bit uniformly distributed floating point numbers) BFPRTI MPROVED R EPEATED S TEP I MPROVED N INTHER N INTHER R ANDOMIZED 400 300 200 100 0 M EDIAN O F 3 M EDIAN O F 3R ANDOMIZED Speedup of Q UICKSELECTA DAPTIVE [%] Speedup of Q UICKSELECTA DAPTIVE [%] BFPRTBASELINE R EPEATED S TEP BASELINE M EDIAN O F 3 M EDIAN O F 3R ANDOMIZED 60 40 20 0 −20 10 10 20 30 40 50 60 70 80 Index sought relative to size [%] 90 N INTHER N INTHER R ANDOMIZED 20 30 40 50 60 70 Percentile sought [%] 80 90 Figure 10. Detail: Relative speedup of Q UICKSELECTA DAPTIVE over heuristics-based algorithms for varying order statistics. Figure 9. Relative speedup of Q UICKSELECTA DAPTIVE over other algorithms for varying order statistics. 14 2016/7/27 References [17] P. Kirschenhofer and C. M. Inez. Analysis of Hoare’s find algorithm with median–of–three partition, 1997. [1] A. Alexandrescu. The D Programming Language. AddisonWesley Professional, 1st edition, 2010. ISBN 0321635361, 9780321635365. [18] P. Kirschenhofer and H. Prodinger. Comparisons in Hoare’s find algorithm. Combinatorics, Probability and Computing, 7:111–120, 3 1998. ISSN 1469-2163. doi: null. URL http://journals.cambridge.org/article_ S0963548397003325. [2] S. Battiato, D. Cantone, D. Catalano, G. Cincotti, and M. Hofri. An efficient algorithm for the approximate median selection problem. In Algorithms and Complexity, pages 226– 238. Springer, 2000. [19] D. E. Knuth. Mathematical analysis of algorithms. Technical report, DTIC Document, 1971. [3] J. L. Bentley and M. D. McIlroy. Engineering a sort function. Software: Practice and Experience, 23(11):1249–1265, 1993. [20] D. E. Knuth. The Art of Computer Programming, Volume 3: (2Nd Ed.) Sorting and Searching. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1998. ISBN 0-201-89685-0. [4] M. Blum, R. W. Floyd, V. Pratt, R. L. Rivest, and R. E. Tarjan. Time bounds for selection. J. Comput. Syst. Sci., 7(4):448– 461, Aug. 1973. ISSN 0022-0000. doi: 10.1016/S00220000(73)80033-9. [21] T. W. Lai and D. Wood. SWAT 88: 1st Scandinavian Workshop on Algorithm Theory Halmstad, Sweden, July 5–8, 1988 Proceedings, chapter Implicit selection, pages 14–23. Springer Berlin Heidelberg, Berlin, Heidelberg, 1988. ISBN 978-3540-39288-0. doi: 10.1007/3-540-19487-8 2. [5] S. Carlsson and M. Sundström. Algorithms and Computations: 6th International Symposium, ISAAC ’95 Cairns, Australia, December 4–6, 1995 Proceedings, chapter Linear-time in-place selection in less than 3n comparisons, pages 244– 253. Springer Berlin Heidelberg, Berlin, Heidelberg, 1995. ISBN 978-3-540-47766-2. doi: 10.1007/BFb0015429. [22] LDC Team. LDC—the LLVM-based D compiler, 2016. URL https://github.com/ldc-developers/ldc. [Online; accessed 8-March-2016]. [6] K. Chen and A. Dumitrescu. Select with groups of 3 or 4. In Algorithms and Data Structures: 14th International Symposium, WADS, 2015. [23] H. M. Mahmoud. Distributional analysis of swaps in quick select. Theor. Comput. Sci., 411(16-18):1763–1769, Mar. 2010. ISSN 0304-3975. doi: 10.1016/j.tcs.2010.01.029. [7] D. Coetzee. An efficient implementation of Blum, Floyd, Pratt, Rivest, and Tarjan’s worst-case linear selection algorithm. 2004. URL http://moonflare.com/code/ select/select.pdf. [24] C. Martı́nez, D. Panario, and A. Viola. Mathematics and Computer Science II: Algorithms, Trees, Combinatorics and Probabilities, chapter Analysis of Quickfind with Small Subfiles, pages 329–340. Birkhäuser Basel, Basel, 2002. ISBN 978-30348-8211-8. doi: 10.1007/978-3-0348-8211-8 20. [8] T. H. Cormen, C. Stein, R. L. Rivest, and C. E. Leiserson. Introduction to Algorithms. McGraw-Hill Higher Education, 2nd edition, 2001. ISBN 0070131511. [25] C. Martı́nez, D. Panario, and A. Viola. Adaptive sampling strategies for quickselect. ACM Trans. Algorithms, 6(3):53:1– 53:45, July 2010. ISSN 1549-6325. doi: 10.1145/1798596. 1798606. [9] J. Daligault and C. Martı́nez. On the variance of quickselect. In Proceedings of the Meeting on Analytic Algorithmics and Combinatorics, pages 205–210. Society for Industrial and Applied Mathematics, 2006. [26] M. D. McIlroy. A killer adversary for quicksort. Softw., Pract. Exper., 29(4):341–344, 1999. [10] K. Dinkel and A. Zizzi. Fast median finding on digital images. In AIAA Regional Student Paper Conference, 2012. [27] D. R. Musser. Introspective sorting and selection algorithms. SoftwarePractice & Experience, 27(8):983–993, 1997. [11] D. Dor and U. Zwick. Median selection requires (2 + )N comparisons. SIAM J. Discret. Math., 14(3):312–325, Mar. 2001. ISSN 0895-4801. doi: 10.1137/S0895480199353895. [28] H. Prodinger. Analysis of quickselect. RAPPORT DE RECHERCHE-INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET EN AUTOMATIQUE, pages 95–98, 1996. [12] R. W. Floyd and R. L. Rivest. Expected time bounds for selection. Commun. ACM, 18(3):165–172, Mar. 1975. ISSN 0001-0782. doi: 10.1145/360680.360691. [29] H. Saraogi. Median of medians algorithm. 2013. URL http://himangi774.blogspot.com/2013/09/medianof-medians.html. [13] M. Fouz, M. Kufleitner, B. Manthey, and N. Z. Jahromi. On smoothed analysis of quicksort and Hoare’s find. Algorithmica, 62(3-4):879–905, 2012. [30] U. Schning. Mastering the master theorem. Bulletin of the EATCS, 71:165–166, 2000. URL http://dblp.uni-trier.de/db/journals/eatcs/ eatcs71.html#Schoning00. [14] R. Griffin and K. A. Redish. Remark on algorithm 347 [m1]: An efficient algorithm for sorting with minimal storage. Commun. ACM, 13(1):54–, Jan. 1970. ISSN 0001-0782. doi: 10.1145/361953.361993. [31] R. Sedgewick and K. Wayne. Algorithms. Pearson Education, 2011. ISBN 9780132762564. URL https://books. google.com/books?id=idUdqdDXqnAC. [15] C. A. R. Hoare. Algorithm 65: Find. Commun. ACM, 4(7): 321–322, July 1961. ISSN 0001-0782. doi: 10.1145/366622. 366647. [32] R. C. Singleton. Algorithm 347: An efficient algorithm for sorting with minimal storage [m1]. Commun. ACM, 12(3): 185–186, Mar. 1969. ISSN 0001-0782. doi: 10.1145/362875. 362901. [16] C. A. R. Hoare. Algorithm 64: Quicksort. Commun. ACM, 4 (7):321–, July 1961. ISSN 0001-0782. doi: 10.1145/366622. 366644. 15 2016/7/27 [33] J. Tukey. The ninther, a technique for low-effort robust (resistant) location in large samples. Contributions to Survey Sampling and Applied Statistics in Honor of HO Hartley, Academic Press, New York, pages 251–258, 1978. [34] L. Wang and X. Wang. On the worst case data sets for order statistics. Appl. Math, 6(2):357–362, 2012. [35] Wikipedia. Median of medians, 2016. URL https://en. wikipedia.org/wiki/Median_of_medians. [Online; accessed 25-Feb-2016]. [36] A. C. Yao and F. F. Yao. On the average-case complexity of selecting the k-th best. Technical report, Stanford, CA, USA, 1979. [37] C. K. Yap. New upper bounds for selection. Commun. ACM, 19(9):501–508, Sept. 1976. ISSN 0001-0782. doi: 10.1145/360336.360339. 16 2016/7/27
8cs.DS
arXiv:1709.06244v1 [math.AC] 19 Sep 2017 ON ASYMPTOTIC DEPTH OF INTEGRAL CLOSURE FILTRATION AND AN APPLICATION TONY J. PUTHENPURAKAL Abstract. Let (A, m) be an analytically unramified formally equidimensional Noetherian local ring with depth A ≥ 2. Let I be an m-primary ideal and set L n ∗ n+1 )∗ be the I ∗ to be the integral closure of I. Set G∗ (I) = n≥0 (I ) /(I associated graded ring of the integral closure filtration of I. We prove that depth G∗ (I n ) ≥ 2 for all n ≫ 0. As an application we prove that if A is also an excellent normal domain containing an algebraically closed field isomorphic to A/m then there exists s0 such that for all s ≥ s0 and J is an integrally closed ideal strictly containing (ms )∗ then we have a strict inequality µ(J) < µ((ms )∗ ) (here µ(J) is the number of minimal generators of J). 1. introduction 1.1. Setup: Throughout (A, m) is a Noetherian local ring and I is an m-primary ideal Throughout we consider multiplicative I-stable filtration of ideals F = {In }n≥0 , i.e., we assume (1) (2) (3) (4) I0 = A and In+1 ⊆ In for all n ≥ 0 I1 6= A and I ⊆ I1 . In Im ⊆ In+m for all n, m ≥ 0. IIn = In+1 for all n ≫ 0 L Let R(I) = n≥0 I n tn be the Rees-algebra of A with respect to I. Set R(F ) = L n n≥0 In t be the Rees-algebra of F . By our assumption R(F ) is a finite extension L of R(I) in A[t]. Also set G(F ) = n≥0 In /In+1 the associated graded ring of F . If G = {(In )∗ } the integral closure filtration of I then we set G∗ (I) = G(G). We b is reduced) then the integral closure note that if A is analytically unramified (i.e., A filtration of I is a multiplicative I-stable filtration of ideals. The following result is definitely known. We sketch a proof for the convenience of the reader. Proposition 1.2. (with hypotheses as in 1.1). Further assume that A is analytically unramified. We have In ⊆ (I n )∗ for all n ≥ 1. Date: September 20, 2017. 1991 Mathematics Subject Classification. Primary 13A30, 13D45 ; Secondary 13H10, 13H15. Key words and phrases. integral closure filtration, m-full ideals, asymptotic depth. 1 2 TONY J. PUTHENPURAKAL Sketch of a proof. The integral closure of R(I) in A[t] is the Rees-algebra of the integral closure filtration of I. By our assumption R(F ) is a finite extension of R(I) in A[t]. The result follows.  1.3. As A is reduced we have that depth A > 0. It follows that the ideals (I n )∗ are all Ratliff-Rush. So depth G∗ (I) > 0. Recall a Noetherian local ring A is b b called formally equidimensional if dim A/P = dim A for all minimal primes of A, the completion of A with respect to m. In the literature, the local rings with this property are also called quasi-unmixed. Our main result is Theorem 1.4. Let (A, m) be an analytically unramified formally equidimensional Noetherian local ring with depth A ≥ 2. Let I be an m-primary ideal and set I ∗ to be the integral closure of I. Then depth G∗ (I n ) ≥ 2 for all n ≫ 0. Remark 1.5. We note that there exists n0 such that (I n )∗ is a normal ideal for all n ≥ n0 . If A is Cohen-Macaulay then it follows from a result of Huckaba and Huneke, [3, 3.1], that depth G(((I n )∗ )k ) ≥ 2 for all k ≫ 0. Even in this case it does not immediately follow that depth G((I n )∗ ) ≥ 2 for all n ≫ 0. Application: Let (A, m) be a Noetherian local ring with d = dim A ≥ 1 and I an m-primary ideal of A. The notion of m-full ideals was introduced by D. Rees and J. Watanabe ([9]) and they proved the “Rees property” for m-full ideals, namely, if I is m-full ideal and J is an ideal containing I, then µ(J) ≤ µ(I), where µ(I) = ℓA (I/mI) is the minimal number of generators of I. Also, they proved that integrally closed ideals are m-full if A is normal. fn , the Ratliff-Rush closure of mn , is m-full ([1, Suppose depth A > 0. Then m Proposition 2.2]). Thus mn is m-full for sufficiently large n. Sometimes we need stronger property for µ(I) and we will call it “Strong Rees property” (SRP for short). Definition (Strong Rees Property). Let I be an m-primary ideal of A. Then we say that I satisfies the strong Rees property if for every ideal J ) I, we have µ(J) < µ(I). In a recent paper the author with K. Watanabe and K. Yoshida proved the following result, [8, 3.2]: Theorem 1.6. Let (A, m) be a Noetherian local ring. Assume that depth A ≥ 2 and 1 HM (G) has finite length, where G = G(m) = ⊕n≥0 mn /mn+1 . If mℓ is Ratliff-Rush closed, then mℓ has SRP. For integrally closed ideals we have the following weaker form of SRP. Definition (SRP ∗ for integrally closed ideals ). Let I be an m-primary integrally closed ideal of A. Then we say that I satisfies the *-strong Rees property for integrally closed ideals if for every ideal J ) I with J integrally closed, we have µ(J) < µ(I). INTEGRAL CLOSURE FILTRATION 3 Our application of Theorem 1.4 is the following: Theorem 1.7. Let (A, m) be an excellent normal domain of dimension d ≥ 2 with algebraically closed residue field. Then there exists s0 such that if j ≥ s0 and I is an integrally closed ideal with I ! (mj )∗ ; then µ(I) < µ((mj )∗ ). Technique used to prove our results: L The main technique for this paper is to consider LF = n≥0 A/In+1 . This is a module over R(I), see 3.1. When F is the I-adic filtration then this technique was developed in [6],[7]. Although this module is not finitely generated as a R-module it has the following good properties: Proposition 1.8. Assume A is an analytically unramified local ring. Let F be a multiplicative I-stable filtration over an m-primary ideal I. Let M be the maximal homogeneous ideal of R(I). Then 0 (1) HM (LF )n = 0 for all n ≫ 0. 0 ◦ ◦ (2) Set HM (LF )n = In+1 /I n+1 . Then In+1 ⊆ (In+1 )∗ . (3) If depth A ≥ 2 then we have 1 (a) HM (LF )n = 0 for all n ≫ 0. 1 (b) ℓ(HM (LF )n ) < ∞ for all n ∈ Z. 1 1 (c) For all n < 0 we have ℓ(HM (LF )n−1 ) ≤ ℓ(HM (LF )n ). We now describe in brief the contents of this paper. In section two we describe a few preliminaries that we need. In section three we describe our construction LF and prove Proposition 1.8. In section four we prove Theorem 1.4. Finally in section five we prove Theorem 1.7. 2. preliminaries In this section we collect a few preliminaries that we need. 2.1. Some properties of multiplicative I-stable filtrations: (1) Let F = {In }n≥0 be a multiplicative I-stable filtration and let x ∈ I. Set B = A/(x), I = I/(x) and let F = {(In + (x))/(x)}n≥0 be the quotient filtration of F . Then F is a multiplicative I-stable filtration. (2) If the residue field k is infinite then we may choose x which is both I and F -superficial. (3) Set F <l> = {Inl }n≥0 . Then F <l> is a multiplicative I l -stable filtration. 2.2. Flat Base Change: In our paper we do many flat changes of rings. The general set up we consider is as follows: Let φ : (A, m) → (A′ , m′ ) be a flat local ring homomorphism with mA′ = m′ . Set I ′ = IA′ and if N is an A-module set N ′ = N ⊗ A′ . Set k = A/m and k ′ = A′ /m′ . Let F = {In }n≥0 be a multiplicative I-stable filtration. Then F ′ = {In′ }n≥0 is a multiplicative I ′ -stable filtration. 4 TONY J. PUTHENPURAKAL Properties preserved during our flat base-changes: (1) ℓA (N ) = ℓA′ (N ′ ). (2) dim M = dim M ′ and grade(K, M ) = grade(KA′ , M ′ ) for any ideal K of A. (3) depth G(F ) = depth G(F ′ ). Specific flat Base-changes: (a) A′ = A[X]S where S = A[X] \ mA[X]. The maximal ideal of A′ is n = mA′ . The residue field of A′ is k ′ = k(X). Notice that k ′ is infinite. b the completion of A with respect to the maximal ideal. (b) A′ = A ′ (c) A = A[X1 , . . . , Xn ]S where S = A[X1 , . . . , Xn ]\mA[X1 , . . . , Xn ]. The maximal ideal of A′ is n = mA′ . The residue field of A′ is l = k(X1 , . . . , Xn ). Notice that if I is integrally closed then I ′ is also integrally closed. (d) When depth A ≥ 2 and A is formally equidimensional, then Ciupercă [2, Corollary 2] shows that in A′ (for n = µ(I) in (ii)) there exists a superficial element y ∈ I ′ such that the A′ /(y) ideal J = I ′ /(y) is also integrally closed (if I is integrally closed). We call A′ general extension of A with respect to I. Also if Pn I = (a1 , . . . , an ) then we can choose y to be i=1 ai Xi . We call the latter a generic element of I ′ . We note that Ciupercă observes that y is also superficial for the integral closure filtration of I, see [2, Section 2.5]. We will need the following result in the proof of Theorem 1.4. It is definitely known to experts. We give a proof for the convenience of the reader Lemma 2.3. Let (A, m) be an analytically unramified, formally equidimensional Noetherian local ring with depth A ≥ 2. Let K be an m-primaryideal of A. Then there exists a flat local homomorphism φ : A → A′ with mA′ = m′ and that there exists y ∈ K ′ such that (1) the ring A′ /(y) is analytically unramified. (2) y is superficial for both the K ′ -adic filtration and the integral closure filtration of K ′ . (3) the ideal (K ′ )∗ A′ /(y) is integrally closed in A′ /(y). (4) (K n )∗ A′ = ((K ′ )n )∗ for all n ≥ 1. Proof. We construct A′ in two steps. First we complete A. Notice by assumption b is equidimensional and reduced. Let K = (a1 , . . . , am ). Then K A b is generated A Pm b Set A′ = A[X b 1 , . . . , Xm ] b by images of ai in A. i=1 ai Xi . b A[X1 ,...,Xm ] and y = m Then as noted in 2.2(d) we get that (2), (3) hold true. Also trivially (4) holds. b 1 , . . . , Xm ]. Let P be a minimal prime ideal of (y) in A′ . (1) Set T = A[X Then height P = 1. There exists a prime ideal Q of T containing (y) such that height Q = 1 and QA′ = P . As depth A′ ≥ 2 we get that there exists ai such that b 1 , . . . , Xm−1 ]. The ai ∈ / Q. Say am ∈ / Q. Then (T /(y))Q is a localization of A[X ′ latter ring is reduced. So (T /(y))Q is reduced. As (A /(y))P is a localization of INTEGRAL CLOSURE FILTRATION 5 (T /(y))Q it is also reduced. Thus A′ /(y) is reduced. As it is also excellent we get that A′ /(y) is analytically unramified.  3. LF In this section we define LF and study few of its properties. We also prove prove Proposition 1.8 which is the most important technical result of this paper. 3.1. Let (A, m) be a Noetherian local ring and let I be an m-primary ideal of A. Let L F = {In }n≥0 be an I-stable multiplicative filtration of A. Set LF = n≥0 A/In+1 . Note that we have a short exact sequence of R(I)-modules (1) 0 → R(F ) → A[t] → LF (−1) → 0. It follows that LF is a R(I)-module. Note that it is not finitely generated R(I)module. Throughout we take local cohomology of R(I)-modules with respect to M = m ⊕ R(I)+ , the maximal homogeneous ideal of R(I). Recall a graded R(I)-module V is said to be ∗-Artinian if every descending chain of graded submodules of V stablizes. For instance if E is a finitely generated graded R(I)-module then for all i i ≥ 0 the R(I)-modules HM (E) is ∗-Artinian. 3.2. We will use the following well-known result regarding *-Artinian modules quite often: Let V be a *-Artinian R(I)-module. Then (a) Vn = 0 for all n ≫ 0 (b) If ψ : V (−1) → V is a monomorphism then V = 0. (c) If φ : V → V (−1) is a monomorphism then V = 0. We begin with the following easy result i (LF ) is Lemma 3.3. Let depth A = c ≥ 1. Then for i = 0, . . . , c − 1 we have HM i ∗-Artinian. In particular HM (LF )n = 0 for n ≫ 0. Proof. We take local cohomology of short exact sequence (1) in 3.1 with respect to M. We note that if a1 , . . . , ac is an A-regular sequence then a1 t0 , . . . , ac t0 ∈ M0 is i an A[t]-regular sequence. This yields that HM (LF (−1)) to be a R(I)-sub-module i+1 of HM (R(F )) for i = 0, . . . , c − 1. The result follows.  As an easy consequence we get the following Corollary 3.4. Assume A is analytically unramified. Set L∗I = Then H 0 (L∗I ) = 0. L n≥0 A/(I n+1 )∗ . 0 Proof. We note that depth A > 0. So by 3.3 we get that HM (LF ) is 8-Artinian. n ∗ Also note that (I ) is Ratliff-Rush for all n ≥ 1. In particular we have that G∗ (I) has positive depth, in particular H 0 (G∗ (I)) = 0. 6 TONY J. PUTHENPURAKAL We have a short exact sequence 0 → G∗ (I) → L∗I → L∗I (−1) → 0. Taking local 0 0 cohomology with respect to M we get an inclusion HM (L∗I ) ֒→ HM (L∗I )(−1). The result follows from 3.2.  We now give Proof of Proposition 1.8. (1) This follows from 3.3. L (2) As A is analytically unramified the module R∗ (I)/R(F ) = n≥1 (In )∗ /In is a finintely generated R(I)-module. We have a short exact sequence of R(I)modules 0 → W (1) → LF → L∗I → 0. Taking local cohomology with respect to M we get 0 0 0 (L∗I ) (LF ) → HM 0 → HM (W (1)) → HM 0 But HM ((L∗I ) = 0 by 3.4. So we have ◦ In+1 (I n+1 )∗ 0 0 = HM (LF )n = HM (W (1))n ⊆ W (1)n = . In+1 I n+1 The result follows. (3) (a) This follows from 3.3. 3(b) Let x be both F and I-superficial. Then note we have a short exact sequence for all n ≥ 0 0→ A αn A A (In+1 : x) → → → 0, −−→ In In In+1 (In+1 , x) where αn (a + In ) = xa + In+1 . Set B = A/(x). Let F be the quotient filtration of F . Thus we have a short exact sequence of R(I)-modules xt 0 → W → LF (−1) −→ LF → LF → 0. As x is F -superficial we get that W has finite length. So we have a short exact sequence (†) 0 1 1 HM (LF )n → HM (LF )n−1 → HM (LF )n 1 0 Say HM (LF )n = 0 for all n ≥ s. We note that HM (LF )n has finite length for 1 all n ≥ 0 and is zero for n < 0. Evaluating (†) at n = s we get that HM (LF )s−1 has finite length. Evaluating (†) at n = s − 1 yields an exact sequence 0 1 1 HM (LF )s−1 → HM (LF )s−2 → HM (LF )s−1 1 1 It follows that HM (LF )s−2 has finite length. Iterating we get that HM (LF )n has finite length for all n ≤ s. 0  3(c) This follows from (†) as HM (LF )n is zero for n < 0. INTEGRAL CLOSURE FILTRATION 7 4. Proof of Theorem 1.4 In this section we give proof of Theorem 1.4. We also prove an additional result which will be useful in the proof of Theorem 1.7. Proof of Theorem 1.4. Let F = {(I n )∗ } be the integral closure filtration of I. We note that for r ≥ 1, F <r> is the integral closure of filtration of I r . Observe that <r> <r> LF (−1) = LF (−1) Also note that M<r> is the maximal homogenous ideal of R(I r ). As local coho1 mology commutes with the Veronese functor and as HM (LF )j = 0 for j ≫ 0 it 1 F <r> follows that there exists r0 such that for r ≥ r0 we have HM (−1))j = 0 <r> (L for all j ≥ 1. Fix r ≥ r0 . Set K = I r . We do the construction as in 2.3. So we may assume that there exists y ∈ K which is superficial for both the K-adic filtration and the integral closure filtration of K. Furthermore A/(y) is analytically unramified. Let G = {(K n )∗ } be the integral closure filtration of K and let G be it’s quotient filtration in A/(y). Note we have an short exact sequence of R(K)-modules yt 0 → LG (−1) −→ LG → LG → 0. This induces a long exact sequence in cohomology. Note H 0 (LG ) = 0. Furthermore by construction H 1 (LG )j = 0 for j ≥ 0. So for all n ∈ Z we have an exact sequence 0 → H 0 (LG )n → H 1 (LG )n−1 It follows that H 0 (LG )n = 0 for n ≥ 1. We note that as A/(y) is analytically unramified we have by 1.8(2) H 0 (LG )0 = U/V, where V = K ∗ and U ⊆ (K ∗ )∗ , by 1.8(2). But by our construction K ∗ is integrally closed in A/(y). So H 0 (LG ) = 0. We also have a short exact sequence 0 → G(G) → LG → LG (−1) → 0. Taking cohomology we get depth G(G) ≥ 1. By Sally descent, [4, 2.2] we get depth G(G) ≥ 2. The result follows.  The following result is needed in the proof of Theorem 1.7. Lemma 4.1. Let (A, m) be an analytically unramified formally equidimensional Noetherian local ring with depth A ≥ 2. Let I be an m-primary ideal. Set F = {(I n )∗ }n≥0 to be the integral closure filtration of I. Then H 1 (LF ) has finite length. Proof. By Theorem 1.4 there exists r ≥ 1 such that G∗ (I r ) has depth atleast r. Let G be the integral closure filtration of I r . So we have an exact sequence 0 → G(G) → LG → LG (−1) → 0. 8 TONY J. PUTHENPURAKAL Taking cohomology we get an injective map H 1 (LG ) → H 1 (LG )(−1). By 3.2 we get H 1 (LG ) = 0. As observed before (LF (−1))<r> = LG (−1). As local cohomology commutes with the Veronese functor we get that H 1 (LF )−r−1 = 0. The result now follows from 1.8(3).  5. Proof of Theorem 1.7 Our proof is quite similar in spirit to proof of Theorem 1.6. However it is different in some places. So we are forced to give the whole proof. b is also a Proof of Theorem 1.7. We first note that as A is excellent and normal A normal domain of dimension d ≥ 2, see [5, 32.2]. In particular A is analytically unramified, formally equidimensional with depth A ≥ 2. So all the techniques developed in the earlier sections are applicable. The Rees algebra of the integral closure filtration of m is a finite module over R(m). In particular there exists an s0 such that for all j ≥ s0 we have m(mj )∗ = (mj+1 )∗ . Choose j ≥ s0 . Step-1 We we may assume λ(I/(mj )∗ ) = 1. By [10, 2.1] there exists a chain of integrally closed ideals I = I0 ! I1 ! I2 ! · · · ! Is1 ! Is = (mj )∗ , with λ(Ii /Ii+1 ) = 1 for i = 0, . . . , s − 1. As Ij are integrally closed and A is normal they are m-full. So we have µ(I) = µ(I0 ) ≤ µ(I1 ) ≤ µ(I2 ) ≤ · · · ≤ µ(Is−1 ) ≤ µ((mj )∗ ). Thus it suffices to prove µ(Is−1 ) < µ((mj )∗ ). Thus we may assume λ(I/(mj )∗ ) = 1. Step-2 A consequence of assuming λ(I/(mj )∗ ) = 1. Note mI ⊆ (mj )∗ . Also note that (mj+1 )∗ = m(mj )∗ ⊆ mI. We have an exact sequence 0→ (mj )∗ I I (mj )∗ ∩ mI → → → → 0. j+1 ∗ j+1 ∗ j ∗ (m ) (m ) mI (m ) + mI We note that (mj )∗ + mI = (mj )∗ and (mj )∗ ∩ mI = mI. Furthermore m(mj )∗ = (mj+1 )∗ . Thus the above exact sequence yields an exact sequence 0→ mI (mj )∗ I I → → → j → 0. (mj+1 )∗ m(mj )∗ mI m Thus to prove our result it suffices to show c = λ(mI/(mj+1 )∗ ) ≥ 2. To show c ≥ 2 we have to consider some modules over the Rees algebra R(m) = A[mt] of m. INTEGRAL CLOSURE FILTRATION 9 Step 3: Some modules over the Rees algebra R(m). We first list some finitely generated R(m)-modules that are pertinent to our result. L (1) R∗ = i≥0 (mi )∗ ti is a finitely generated R(m)-module. L (2) R∗≥j = i≥j (mi )∗ ti is an R(m)-submodule of R∗ . L So R∗≥j (+j) = i≥0 (mj+i )∗ ti is a finitely generated R(m)-module. (3) The filtration I ⊇ mI ⊇ m2 I ⊇ · · · ⊇ mi I ⊇ mi+1 I ⊇ · · · L is m-stable (note that it is not multiplicative). So E = i≥0 mi Iti is a finitely generated R(m)-module. (4) By our assumption on j we get that R∗≥j (+j) ⊆ E. So C = E/R∗≥j (+j) is a fintely generated R-module. Note C= I mI m2 I mi I ⊕ j+1 ∗ t ⊕ j+2 ∗ t2 ⊕ · · · j+i ∗ ti ⊕ · · · , j ∗ (m ) (m ) (m ) (m ) = mI m2 I mi I I 2 ⊕ t ⊕ t ⊕ · · · ti ⊕ · · · . (mj )∗ m(mj )∗ m2 (mj )∗ mi (mj )∗ We now list two NOT finitely generated modules over R(m) which is of interest to us: L (1) L = i≥0 A/(mi+1 )∗ . By 3.1 we get that L is a R(m)-module. (2) We also have an exact sequence 0 → E → A[t] → V → 0, where V = L i≥0 A/mi I. It follows that V is a R-module. Step 4: Some local cohomology computations. Throughout we compute local cohomology with respect to M, the maximal homogeneous ideal of R(m). As depth A ≥ 2 there exists x, y ∈ m such that x, y is an A-regular sequence. We note that xt0 , yt0 ∈ M0 is an A[t]-regular sequence. So H 0 (A[t]) = H 1 (A[t]) = 0. It follows that H 0 (V ) = H 1 (E). (1) Claim-1: H 0 (V ) has finite length as an A-module. It is well-known that for all l ≥ 0 we have H l (E)n = 0 for n ≫ 0. As H 0 (V ) = H 1 (E) we get that H 0 (V )n = 0 for n ≫ 0. Also as H 0 (V ) ⊆ V we have H 0 (V )n = 0 for n < 0. Furthermore as H 0 (V )n ⊆ Vn it follows that H 0 (V )n has finite length for all n. So Claim-1 follows. (2) By 3.4 we get H 0 (L) = 0. By 4.1 we get that H 1 (L) have finite length. Set L L(−1)≥j = i≥j A/mi ti . We have an exact sequence 0 → L(−1)≥j → L(−1) → W → 0, where W has finite length. It follows that H 0 (L(−1)≥j ) = 0 and H 1 (L(−1)≥j ) has finite length.  10 TONY J. PUTHENPURAKAL Step 5: c = λ(mI/(mj+1 )∗ ) > 1. L i+j ∗ Set D = (L(−1)≥j )(+n) = ) . Note we have a short exact sei≥0 A/(m quence of R(m)-modules 0 → C → D → V → 0. Let x be A-superficial with respect to m. Then it is also superficial with respect to to the integral closure filtration of m; see [2, section 2.5]. Notice that ((mn+1 )∗ : x) = (mn )∗ for all n ≥ 1. Set u = xt ∈ R1 . Let fuD : D(−1) → D be multiplication by u. Notice ker fuD = 0. It follows that ker(fuC ) = 0. Notice ker u is D-regular. So u is C-regular. Suppose if possible c = 1. We note that C0 = I/(mj )∗ and C1 = mI/m(mj )∗ . u → C1 is an isomorphism. So we get Note As ker(fuC ) = 0 we get the map C0 − mI = xI + m(mj )∗ . It follows that for all i ≥ 1 we have mi+1 I = xmi I + mi (mj )∗ . Thus we have that u 0 →→ C(−1) − → C → I/mj → 0. (here I/mj is concentrated in degree zero). It follows that dimR C = 1. As dimR C = 1 we get that H 1 (C) is NOT finitely generated as an A-module. However the exact sequence 0 → C → D → V → 0 yields an exact sequence H 0 (V ) → H 1 (C) → H 1 (D) which implies that H 1 (C) has finite length. Thus our assumption c = 1 is not possible. So c ≥ 2 and this proves our result. References [1] J. Asadollahi and T. J. Puthenpurakal, An analogue of a theorem due to Levin and Vasconcelos, Commutative algebra and algebraic geometry, 9–15, Contemp. Math., 390, Amer. Math. Soc., Providence, RI, 2005. [2] C. Ciupercă, Integral closure and generic elements, J. Algebra 328 (2011), 122-131 [3] S. Huckaba and C. Huneke, Normal ideals in regular rings, J. Reine Angew. Math. 510 (1999), 63-82. [4] S. Huckaba and T. Marley, Hilbert coefficients and the depths of associated graded rings, J. London Math. Soc. 56 (2) (1997) 64-76. [5] H. Matsumura, Commutative ring theory, Cambridge Studies in Advanced Mathematics, vol. 8, Cambridge University Press, Cambridge, 1986. [6] T. J. Puthenpurakal, Ratliff-Rush filtration, regularity and depth of higher associated graded modules. I, J. Pure Appl. Algebra 208 (2007), no.1, 159–176. [7] T. J. Puthenpurakal, Ratliff-Rush filtration, regularity and depth of higher associated graded modules. Part II, J. Pure Appl. Algebra 221 (2017), no. 3, 611–631. [8] T. J. Puthenpurakal, K. Watanabe and K. Yoshida, The strong Rees property of powers of the maximal ideal and Takahashi-Dao’s question. Preprint. arXiv:1708.06090 [9] J. Watanabe, m-full ideals, Nagoya Math. J. 106 (1987), 101–111. [10] K.-i. Watanabe, Chains of integrally closed ideals, Commutative algebra (Grenoble/Lyon, 2001), 353–358, Contemp. Math., 331, Amer. Math. Soc., Providence, RI, 2003. INTEGRAL CLOSURE FILTRATION 11 Department of Mathematics, Indian Institute of Technology Bombay, Powai, Mumbai 400 076, India E-mail address: [email protected]
0math.AC
Published as a conference paper at ICLR 2018 S HAKE D ROP REGULARIZATION Yoshihiro Yamada, Masakazu Iwamura and Koichi Kise Graduate School of Engineering Osaka Prefecture University 1-1 Gakuen-cho, Naka-ku Sakai-shi, Osaka [email protected],{masa,kise}@cs.osakafu-u.ac.jp arXiv:1802.02375v1 [cs.CV] 7 Feb 2018 A BSTRACT This paper proposes a powerful regularization method named ShakeDrop regularization. ShakeDrop is inspired by Shake-Shake regularization that decreases error rates by disturbing learning. While Shake-Shake can be applied to only ResNeXt which has multiple branches, ShakeDrop can be applied to not only ResNeXt but also ResNet, Wide ResNet and PyramidNet in a memory efficient way. Important and interesting feature of ShakeDrop is that it strongly disturbs learning by multiplying even a negative factor to the output of a convolutional layer in the forward training pass. The effectiveness of ShakeDrop is confirmed by experiments on CIFAR-10/100 and Tiny ImageNet datasets. 1 I NTRODUCTION Recent advances in generic object recognition have been brought by deep neural networks. After ResNet (He et al., 2016) opened the door to very deep CNNs of over a hundred layers by introducing the residual block, its improvements such as Wide ResNet (Zagoruyko & Komodakis, 2016), PyramdNet (Han et al., 2017a;b) and ResNeXt (Xie et al., 2017) have broken the records of lowest error rates. On the other hand, in learning, they often suffer from problems such as vanishing gradients. Hence, regularization methods help to learn and boost the performance of such base network architectures. Stochastic Depth (ResDrop) (Huang et al., 2016) and Shake-Shake (Gastaldi, 2017) are known to be effective regularization methods for ResNet and its improvements. Among them, Shake-Shake applied to ResNeXt is the one achieving the lowest error rates on CIFAR-10/100 datasets (Gastaldi, 2017). Shake-Shake, however, has following two drawbacks. (1) Shake-Shake can be applied to only multibranch architectures (i.e., ResNeXt). (2) Shake-Shake is not memory efficient. Both drawbacks come from the same root. That is, Shake-Shake requires two branches of residual blocks to apply. If it is true, it is not difficult to conceive its solution: a similar disturbance to Shake-Shake on a single residual block. It is, however, not trivial to realize it. The current paper addresses the problem of realizing a similar disturbance to Shake-Shake on a single residual block, and proposes a powerful regularization method, named ShakeDrop regularization. While the proposed ShakeDrop is inspired by Shake-Shake, the mechanism of disturbing learning is completely different. ShakeDrop disturbs learning more strongly by multiplying even a negative factor to the output of a convolutional layer in the forward training pass. In addition, a different factor from the forward pass is multiplied in the backward training pass. As a byproduct, however, learning process gets unstable. Our solution to this problem is to stabilize the learning process by employing ResDrop in a different usage from the usual. Based on experiments using various base network architectures, we reveal the condition that the proposed ShakeDrop successfully works. 2 2.1 E XISTING M ETHODS R EQUIRED TO I NTRODUCE THE P ROPOSED M ETHOD D EEP N ETWORK ARCHITECTURES ResNet (He et al., 2016) opened the door to very deep CNNs of over a hundred layers by introducing the residual block, given as G(x) = x + F (x), (1) 1 Published as a conference paper at ICLR 2018 Conv Conv Conv Conv Train (Forward) Conv Conv Conv Conv Conv Conv Conv Conv Conv Conv Conv Conv Conv ×𝜶 ×𝜷 Train (Forward) × 𝑬(𝜶) Test Train (Backward) Conv Conv Conv Conv Conv Conv Conv Conv ×𝜶 × (𝟏 − 𝜶) ×𝜷 × (𝟏 − 𝜷) × 𝟎. 𝟓 × 𝟎. 𝟓 Test Train (Backward) (b) Shake-Shake (ResNeXt + Shake-Shake) (Gastaldi, 2017), in which some processing layers omitted for conciseness. (a) ResNeXt (Xie et al., 2017), in which some processing layers omitted for conciseness. Conv Conv Conv Train (Forward) Test Train (Backward) Conv Conv Conv Conv Conv Conv Conv Conv × (𝒃𝒍 + 𝜶 − 𝒃𝒍 𝜶) × (𝒃𝒍 + 𝜷 − 𝒃𝒍 𝜷) × 𝑬(𝒃𝒍 + 𝜶 − 𝒃𝒍 𝜶) Train (Forward) (c) PyramidNet + “1-branch Shake.” “1-branch Shake” is an intermediate regularization method to the proposed ShakeDrop. Train (Backward) Test (d) PyramidNet + ShakeDrop. ShakeDrop is the proposed regularization method. Figure 1: Network architectures. where x and G(x) are the input and output of the residual block, respectively, and F (x) is the output of the residual branch on the residual block. While ResNet realized deep networks, it is imperfect. He et al. (2016) pointed out that high error rates obtained by the 1202-layer ResNet on the CIFAR datasets (Krizhevsky, 2009) is caused by overfitting. Veit et al. (2016) experimentally showed that some residual blocks whose channels greatly increase cause high error rates. PyramidNet (Han et al., 2017a;b) overcame the problem of ResNet by gradually increasing channels on each residual block. It has almost same residual block as Eqn. (1). It successfully realized deep CNNs of up to 272 layers and achieved the lowest error rates among the vanilla residual networks on the CIFAR datasets. 2.2 N ON -D EEP NETWORK ARCHITECTURES Wide ResNet (Zagoruyko & Komodakis, 2016) improved error rates by simply increasing channels of ResNet. While it has almost same residual block as Eqn. (1), it has wider and shallower architecture than ResNet. Jastrzebski et al. (2017) experimentally showed that like PyramidNet, Wide ResNet overcomes the problem of ResNet. ResNeXt (Xie et al., 2017) achieved lower error rates than Wide ResNet on almost same number of parameters. The basic architecture of ResNeXt is given as G(x) = x + F1 (x) + F2 (x), (2) where F1 (x) and F2 (x) are the outputs of the residual branches as shown in Figure 1(a). The number of residual branches is not limited to 2, and the number is the most important factor to control the result. 2.3 R EGULARIZATION METHODS Stochastic Depth (Huang et al., 2016) is a regularization method which overcame problems of ResNet such as vanishing gradients. It makes the network apparently shallow in learning by dropping residual blocks stochastically selected. On the lth residual block from input layer, the Stochastic Depth process is given as G(x) = x + bl F (x), (3) 2 Published as a conference paper at ICLR 2018 where bl ∈ {0, 1} is a Bernoulli random variable with the probability of pl . Huang et al. (2016) tested two rules for determining pl : uniform rule and linear decay rule. The uniform rule using a constant for all pl did not work well. The linear decay rule which defines pl as l (1 − pL ), L where L is the number of all layers and pL is the initial parameter, worked well. pl = 1 − (4) It was originally proposed for improving ResNet. It was also applied to PyramidNet; the combination of PyramidNet and Stochastic Depth was named PyramidDrop (Yamada et al., 2016). Shake-Shake (Gastaldi, 2017) is a powerful regularization method for improving ResNeXt architectures. It is given as G(x) = x + αF1 (x) + (1 − α)F2 (x), (5) where α is a random coefficient given as α ∈ [0, 1]. As shown in Figure 1(b), calculation of the backward pass is disturbed by another random coefficient β ∈ [0, 1] instead of α. As a result, Shake-Shake decreased error rates than ResNeXt. 3 3.1 P ROPOSED M ETHOD I NTERPRETATION OF S HAKE -S HAKE REGULARIZATION AND ITS DRAWBACKS We give an intuitive interpretation of the forward pass of Shake-Shake regularization. To the best of our knowledge, it has not been given yet, while the phenomenon in the backward pass is experimentally investigated by Gastaldi (2017). As shown in Eqn. (5) (and also in Fig. 1(b)), in the forward pass, Shake-Shake interpolates the outputs of two residual branches (i.e., F1 (x) and F2 (x)) with a random variable α that controls the degree of interpolation. As DeVries & Taylor (2017a) demonstrated that interpolation of two data in the feature space can synthesize reasonable augmented data, the interpolation of two residual blocks of Shake-Shake in the forward pass can be interpreted as synthesizing data. Use of a random variable α generates many different augmented data. On the other hand, in the backward pass, a different random variable β is used to disturb learning to make the network learnable long time. Gastaldi (2017) demonstrated how the difference between α and β affects. The regularization mechanism of Shake-Shake relies on two or more residual branches, so that it can be applied only to 2-branch networks architectures. In addition, 2-branch network architectures consume more memory than 1-branch network architectures. One may think the number of learnable parameters of ResNeXt can be kept in 1-branch and 2-branch network architectures by controlling its cardinality and the number of channels (filters). For example, a 1-branch network (e.g., ResNeXt 1-64d) and its corresponding 2-branch network (e.g., ResNeXt 2-40d) have almost same number of learnable parameters. However, even so, it increases memory consumption due to the overhead to keep the inputs of residual blocks and so on. By comparing ResNeXt 1-64d and 2-40d, the latter requires more memory than the former by 8% in theory (for one layer) and by 11% in measured values (for 152 layers). 3.2 S IMILAR REGULARIZATION TO ARCHITECTURES S HAKE -S HAKE ON 1- BRANCH NETWORK In order to realize a similar regularization to Shake-Shake on 1-branch network architectures, in the forward pass, we need a mechanism, different from interpolation, to synthesize augmented data in the feature space. Actually, DeVries & Taylor (2017a) demonstrated not only interpolation but also noise addition in the feature space works well. Hence, following Shake-Shake, we apply random perturbation, using α, to the output of a residual branch (i.e., F (x) of Eqn. (1)). In the backward pass, we can use the same way as Shake-Shake for 1-branch network architectures. We call the regularization method mentioned above 1-branch Shake. It is given as G(x) = x + αF (x), (6) where α is a coefficient that disturbs learning in the forward pass. As shown in Figure 1(c), β is a coefficient similar to the one of Shake-Shake and used in the backward pass. The 1-branch Shake is 3 Published as a conference paper at ICLR 2018 expected to realize powerful generalization like Shake-Shake regularization. However, by applying it to 110-layer PyramidNet with α ∈ [0, 1] and β ∈ [0, 1] following Shake-Shake, the result on the CIFAR-100 dataset was hopelessly bad (i.e., an error rate of 77.99%). 3.3 S TABILIZING LEARNING WITH INTRODUCTION OF MECHANISM OF R ES D ROP Failure of 1-branch Shake is caused by too strong perturbation. However, weakening the perturbation would also weaken the effect of regularization. Thus, we need a trick to promote learning under strong perturbation. Our idea is to use the mechanism of ResDrop for solving the issue. As is written in Sec.2.3, in the original form, ResDrop promotes learning by dropping some residual blocks. In other words, it makes a network apparently shallow in learning. In our situation, however, the original usage of ResDrop does not contribute because a shallower network to which 1-branch Shake is applied would also suffer from strong perturbation. Thus, we use the mechanism of ResDrop as a probabilistic switch of two network architectures: the original network (e.g., PyramidNet) and the one to which 1-branch Shake is applied (e.g., PyramidNet + 1-branch Shake). By mixing up two networks, the following effects are expected. 1. When the original network (e.g., PyramidNet) is selected, learning is correctly promoted. 2. When the network with strong perturbation (e.g., PyramidNet + 1-branch Shake) is selected, learning is disturbed. To achieve a good performance, two networks should be in a good balance. The proposed ShakeDrop is given as G(x) = x + (bl + α − bl α)F (x), (7) where bl is a Bernoulli random variable following the linear decay rule. We call the new method “ShakeDrop.” According to the value of bl , Eqn. (7) is deformed as  x + F (x), if bl = 1 G(x) = (8) x + αF (x), otherwise (i.e., if bl = 0). In the case that the base network is PyramidNet, ShakeDrop is equivalent to PyramidNet if bl = 1, and it is equivalent to “PyramidNet + 1-branch Shake” if bl = 0. We found that the linear decay rule of ResDrop (Eqn. (4)) works well, while we also tested the uniform rule which did not work well. As shown in Figure 1(d), similar to Shake-Shake, β is used in the backward pass instead of α. It is noteworthy that regardless of the value of β, the weights of the network are updated. For example, let us consider the case of β = 0. In such a case, the weights of the residual blocks selected to perturbate (i.e., the layers with bl = 0) are not updated. However, the inputs to their succeeding residual blocks are perturbated and the weights of the residual blocks are updated reflecting the perturbation. 4 E XPERIMENTS See Sec. A for implementation details. 4.1 P RELIMINARY EXPERIMENTS : SEARCH FOR PARAMETER SETTINGS OF THE PROPOSED METHOD The best parameter settings of the proposed method, ShapeDrop, are searched when it is applied to PyramidNet. They include parameter ranges of α and β, and the timing these parameters are updated. In the preliminary experiments, the CIFAR-100 dataset was used. PyramidNet had 110 layers, which consisted of a convolution layer, 54 additive pyramidal residual blocks and a fully connected layer. The number of channels at the last residual block was 286. Table 1 shows representative parameter ranges of α and β we tested and their results. From the results, we can see how the combinations of α and β affect. First of all, except PyramidDrop (α = 0, β = 0), only case F (α ∈ [−1, 1], β = 0) and case H (α ∈ [−1, 1], β ∈ [0, 1]) were better than the original PyramidNet 4 Published as a conference paper at ICLR 2018 Table 1: Average Top-1 errors (%) of “PyramidNet + ShakeDrop” with several ranges of parameters of 4 runs at the final (300th) epoch on CIFAR-100 dataset in the “Batch” level. In some settings, it is equivalent to PyramidNet and PyramidDrop. A B C D E F G H α 1 0 [0, 1] [0, 1] [−1, 1] [−1, 1] [−1, 1] [−1, 1] β 1 0 [−1, 1] [0, 1] 1 0 [−1, 1] [0, 1] Error (%) 18.01 17.74 20.61 18.27 18.68 17.28 18.26 16.22 Note Equivalent to PyramidNet Equivalent to PyramidDrop Table 2: Average Top-1 errors (%) of “PyramidNet + ShakeDrop” with different levels of 4 runs at the final (300th) epoch on CIFAR-100 dataset. α β [−1, 1] [0, 1] Level Batch Image Channel Pixel Error (%) 16.22 16.04 16.12 15.78 (case A: α = 1, β = 1). Among them, case H was the best. It is interesting to observe three cases E (α ∈ [−1, 1], β = 1), F and H all of which take the same range of α. Since cases F and H were better than PyramidNet, we confirm strong perturbation is effective. However, case E was even worse than PyramidNet. This implies that if strong perturbation is applied, the residual blocks selected to perturbate strongly suffer from the perturbation, so that the weights of the residual blocks should not be fully updated (i.e., β = 1 should be avoided). On the other hand, the range of β of the best case H was in-between cases E and F. This implies that the values of β should be well balanced. The best strategy to update the parameters (referred as scaling coefficient) among “Batch,” “Image,” “Channel” and “Pixel” are explored. “Batch” means that the same scaling coefficients are used for all the images in the mini-batch for each residual block. “Image” means that the same scaling coefficients are used for each image for each residual block. “Channel” means that the same scaling coefficients are used for the each channel for each residual block. “Pixel” means that the same scaling coefficients are used for each element for each residual block. ShakeDrop was trained using the best parameters found in the experiment above, i.e, ranges α ∈ [−1, 1], β ∈ [0, 1]. Table 2 shows that “Pixel” level was the best. However, it required a lot of memory. Hence, we selected “Image” level, which was the second best, considering memory efficiency. Through the preliminary experiments, we found that the most effective parameters for α and β are α ∈ [−1, 1] and β ∈ [0, 1], and the effective and memory efficient level is “Image” level. We conduct the following experiments using these parameters. 4.2 C OMPARISON WITH REGULARIZATION METHODS The proposed ShakeDrop is compared with vanilla (without regularization), ResDrop and 1-branch Shake in different network architectures including ResNet, PyramidNet, Wide ResNet and ResNeXt. Tables 3 and 4 show experimental results on CIFAR-100 dataset (Krizhevsky, 2009) and Tiny ImageNet dataset 1 , respectively. Table 3 shows that the proposed ShakeDrop can be applied to not only PyramidNet but also ResNet, Wide ResNet and ResNeXt. However, to successfully apply it, we found that the residual blocks have to end with batch normalization (BN) (Ioffe & Szegedy, 2015). Since without BN, the outputs of residual blocks are not in a certain range, sometimes factors α and β could be too big. This seems to cause diverge in learning. With this regard, EraseReLU (Dong et al., 2017) which elimi1 https://tiny-imagenet.herokuapp.com/ 5 Published as a conference paper at ICLR 2018 Table 3: Top-1 errors (%) at the final (300th) epoch of ResNet and its improvements to which different regularization methods are applied on CIFAR-100 dataset. Method names are followed by components of their residual blocks. For ResNet and ResNeXt, in addition to the original form, ones without ReLU unit in the end of residual blocks following EraseReLU (Dong et al., 2017) are also examined. For Wide ResNet, ones with bath normalization added in the end of residual blocks, referred as “w/ BN,” are also examined. “Type A” and “Type B” of ResDrop and ShakeDrop mean that regularization unit is inserted before and after “add” unit for residual branches, respectively. “×” means learning did not converge. ∗ indicates the result is quoted from the literature. (a) 1-residual-branch network architectures (ResNet, ResNeXt and PyramidNet) Methods ResNet-110 <Conv-BN-ReLU-Conv-BN-add(ReLU)> ResNet-164 Bottleneck <Conv-BN-ReLU-Conv-BN-ReLUConv-BN-add-(ReLU)> ResNeXt-29 8-64d Bottleneck <Conv-BN-ReLU-Conv-BN-ReLUConv-BN-add-(ReLU)> PyramidNet-272 α200 Bottleneck <BN-Conv-BN-ReLU-Conv-BN-ReLUConv-BN-add> Regularization Vanilla ResDrop 1-branch Shake ShakeDrop Vanilla ResDrop 1-branch Shake ShakeDrop Vanilla ResDrop 1-branch Shake ShakeDrop Vanilla ResDrop 1-branch Shake ShakeDrop Original (%) 28.51 24.09 24.18 × 22.00 21.96 22.20 × 20.90 20.66 22.70 × ∗ 16.35 15.94 71.51 14.90 EraseReLU (%) 24.93 22.88 23.80 22.68 21.96 20.35 21.60 19.89 20.25 20.28 24.00 19.90 N/A (b) 1-residual-branch network architectures (Wide ResNet) Methods Wide-ResNet-28-10k <BN-ReLU-Conv-BN-ReLU-Conv-(BN)-add> Regularization Vanilla ResDrop 1-branch Shake ShakeDrop Original (%) 26.49 34.19 90.73 76.87 w/ BN (%) 24.24 26.64 58.89 19.12 (c) 2-residual-branch network architectures Methods ResNeXt-164 2-1-40d Bottleneck <Conv-BN-ReLU-Conv-BN-ReLUConv-BN-add-(ReLU)> ResNeXt-29 2-4-64d Bottleneck <Conv-BN-ReLU-Conv-BN-ReLUConv-BN-add-(ReLU)> Regularization Vanilla ResDrop Type-A ResDrop Type-B Shake-Shake ShakeDrop Type-A ShakeDrop Type-B Vanilla ResDrop Type-A ResDrop Type-B Shake-Shake ShakeDrop Type-A ShakeDrop Type-B Original (%) 23.82 21.38 21.34 22.35 × × 21.19 21.12 19.27 19.16 × × EraseReLU (%) 21.75 20.44 20.21 22.51 19.98 19.83 × 20.13 19.01 18.82 20.07 18.17 nates the last ReLU is a very convenient for us because in the EraseReLU versions of ResNet and ResNeXt, the residual blocks ends with BN. On the other hand, in the case of Wide ResNet, we need to intentionally add BN in the end of the residual blocks. In ResNeXt, we examined two ways, referred as “Type A” and “Type B,” to apply ResDrop and ShakeDrop. They mean the regularization module is inserted before and after “add” module, respectively. As far as we examined, Type B was 6 Published as a conference paper at ICLR 2018 Table 4: Top-1 errors (%) at the final (300th) epoch of ResNet and its improvements to which different regularization methods are applied on Tiny ImageNet dataset. Method names are followed by components of their residual blocks. For ResNet and ResNeXt, in addition to the original form, ones without ReLU unit in the end of residual blocks following EraseReLU (Dong et al., 2017) are also examined. For Wide ResNet, ones with bath normalization added in the end of residual blocks, referred as “w/ BN,” are also examined. “Type A” and “Type B” of ResDrop and ShakeDrop mean that regularization unit is inserted before and after “add” unit for residual branches, respectively. “×” means learning did not converge. ∗ indicates the result is quoted from the literature. (a) 1-residual-branch network architectures (ResNet, ResNeXt and PyramidNet) Methods ResNet-110 <Conv-BN-ReLU-Conv-BN-add(ReLU)> ResNet-164 Bottleneck <Conv-BN-ReLU-Conv-BN-ReLUConv-BN-add-(ReLU)> PyramidNet-110 α270 <BN-Conv-BN-ReLU-Conv-BN-add> PyramidNet-200 α300 Bottleneck <BN-Conv-BN-ReLU-Conv-BN-ReLUConv-BN-add> Regularization Vanilla ResDrop 1-branch Shake ShakeDrop Vanilla ResDrop 1-branch Shake ShakeDrop Vanilla ResDrop 1-branch Shake ShakeDrop Vanilla ResDrop 1-branch Shake ShakeDrop Original (%) 42.07 43.74 45.56 × 38.20 37.17 39.29 × 36.52 33.97 85.84 32.44 32.92 32.17 78.12 31.15 EraseReLU (%) 41.24 42.50 45.16 48.92 36.52 38.09 42.10 42.80 N/A N/A (b) 1-residual-branch network architectures (Wide ResNet) Methods Wide-ResNet-28-10k <BN-ReLU-Conv-BN-ReLU-Conv-(BN)-add> Regularization Vanilla ResDrop 1-branch Shake ShakeDrop Original (%) 99.50 99.50 98.68 91.11 w/ BN (%) 37.88 45.80 93.62 36.39 always better than Type A. We also confirmed that ShakeDrop Type B outperformed Shake-Shake in RexNeXt. As a conclusion, the table shows that as long as the residual blocks end with BN, the proposed ShakeDrop achieved the lowest error rates. Table 4 shows the results on Tiny ImageNet. To conduct the experiments, it is better to use networks tuned for ImageNet. However, except PyramidNet, we could apply the same networks tuned for CIFAR-100 dataset were used due to time constraint. As a result, in ResNet, the lowest error rates were achieved by vanilla EraseReLU networks. This could be caused by use of inappropriate base networks for the task since learning ended with relatively high training loss and no regularization methods correctly worked. However, in PyramidNet and Wide ResNet, the proposed ShakeDrop achieved the lowest error rates. This confirms that the proposed ShakeDrop works on Tiny ImageNet dataset. 4.3 C OMPARISON WITH STATE - OF - THE - ART METHODS The proposed method was compared with state-of-the-arts on the CIFAR-10/100 datasets. Stateof-the-art methods introduced some techniques that can be applied to many methods in the learning process. One is longer learning. While most of methods related to ResNet use 300-epoch scheduling for learning like the preliminary experiment in Sec. 4.1, Shake-Shake use 1800-epoch cosine annealing, on which the initial learning rate is annealed using a cosine function without restart (Gastaldi, 2017). Another one is image preprocessing. DeVries & Taylor (2017b) and Zhong et al. (2017) 7 Published as a conference paper at ICLR 2018 showed that accuracy is improved by data augmentation which randomly fills a part of learning images. For fair comparison with these methods, we also applied them to the proposed method. PyramidNet (including PyramidDrop and “PyramidDrop + ShakeDrop”) had 272 layers, which consisted of a convolution layer, 90 additive pyramidal “bottleneck” blocks (He et al., 2016) and a fully connected layer. The number of channels at the last pyramidal residual block was 864. Table 5 shows the error rates. The proposed method, “PyramidNet + ShakeDrop,” without longer learning and image preprocessing, was 3.41% on the CIFAR-10 dataset and 14.90% on the CIFAR-100 dataset. We make following comparisons with existing methods. Note that the proposed method used less numbers of parameters than rival methods in all conditions. (1) Fair comparison with Shake-Shake (ResNeXt + Shake-Shake) in the same condition “PyramidNet + ShakeDrop” combined with longer training achieved error rates of 2.67% (better by 0.19%) on the CIFAR-10 dataset and 13.99% (better by 1.86%) on the CIFAR-100 dataset. (2) Fair comparison with Cutout (ResNeXt + Shake-Shake + Cutout) in the same condition “PyramidNet + ShakeDrop” combined with both longer learning and image preprocessing achieved error rates of 2.31% (better by 0.25%) and 12.19% (better by 3.01%) on the CIFAR-10/100 datasets, respectively. (3) Comparison with the state-of-the-arts, Cutout on CIFAR-10 and Coupled Ensemble on CIFAR-100 “PyramidNet + ShakeDrop” combined with both longer learning and image preprocessing achieved error rates of 2.31% (better by 0.25% than Cutout) and 12.19% (better by 2.85% than Coupled Ensemble) on the CIFAR-10/100 datasets, respectively. 5 C ONCLUSION We proposed a new stochastic regularization method ShakeDrop which can be successfully applied to ResNet and its improvements as long as the residual blocks ends with BN. Its effectiveness was confirmed through the experiments on CIFAR-10/100 and Tiny ImageNet datasets. ShakeDrop achieved the state-of-the-art performance in the CIFAR-10/100 datasets, and the best results among existing regularization methods on Tiny ImageNet dataset except some cases using inappropriate networks. R EFERENCES Terrance DeVries and Graham W. Taylor. Dataset augmentation in feature space. In Proc. ICLR Workshop, 2017a. Terrance DeVries and Graham W. Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017b. Xuanyi Dong, Guoliang Kang, Kun Zhan, and Yi Yang. EraseReLU: A simple way to ease the training of deep convolution neural networks. arXiv preprint 1709.07634, 2017. Anuvabh Dutt, Denis Pellerin, and Georges Qunot. Coupled ensembles of neural networks. arXiv preprint 1709.06053v1, 2017. Xavier Gastaldi. Shake-shake regularization. arXiv preprint arXiv:1705.07485v2, 2017. Dongyoon Han, Jiwhan Kim, and Junmo Kim. Deep pyramidal residual networks. In Proc. CVPR, 2017a. Dongyoon Han, Jiwhan Kim, and Junmo Kim. Deep pyramidal residual networks. arXiv preprint arXiv:1610.02915v4, 2017b. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on ImageNet classification. In Proc. ICCV, 2015. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. CVPR, 2016. 8 Published as a conference paper at ICLR 2018 Table 5: Top-1 errors (%) at the final epoch (300th or 1800th) on the CIFAR-10/100 datasets. Representative methods and the proposed ShakeDrop applied to PyramidNet are compared. “Reg” represents regularization methods including ResDrop (RD), Shake-Shake (SS) and proposed ShakeDrop (SD). If “Cos” is checked, 1800-epoch cosine annealing schedule (Loshchilov & Hutter, 2016) is used following Gastaldi (2017). Otherwise, 300-epoch multi-step learning rate decay schedule is used following each method. If “Fil” is checked, the data augmentation used in Cutout (CO) (DeVries & Taylor, 2017b) or Random Erasing (RE) (Zhong et al., 2017), which randomly fills a part of learning images, is used. ∗ indicates the result is quoted from the literature. + indicates the result is quoted from Gastaldi (2017). Compared to the same condition of Cutout, the state-of-the-art, the proposed method reduced the error rate by 0.25% on CIFAR-10 and 3.01% on CIFAR-100. Method Reg Cos Fil Coupled Ensemble (Dutt et al., 2017) ResNeXt (Xie et al., 2017) ResNeXt + Shake-Shake (Gastaldi, 2017) ResNeXt + Shake-Shake + Cutout (DeVries & Taylor, 2017b) PyramidNet (Han et al., 2017b) PyramidDrop (Yamada et al., 2016) PyramdNet + ShakeDrop (Proposed) X SS X SS X CO X RE X RE RD RD SD SD SD SD RE X X RE Depth #Param 118 106 76 64 26 29 26 29 26 29 272 272 272 272 272 272 272 272 25.7M 25.1M 24.6M 24.9M 50M 75M 100M 26.2M 34.4M 26.2M 34.4M 26.2M 34.4M 26.0M 26.0M 26.0M 26.0M 26.0M 26.0M 26.0M 26.0M CIFAR -10 (%) ∗ 2.99 ∗ 2.99 ∗ 2.92 ∗ 3.13 ∗ 2.72 ∗ 2.68 ∗ 2.73 + 3.58 ∗ 2.86 ∗ 2.56 ∗ 3.31 3.42 3.83 2.91 3.41 2.89 2.67 2.31 CIFAR -100 (%) ∗ 16.18 ∗ 15.68 ∗ 15.76 ∗ 15.95 ∗ 15.13 ∗ 15.04 ∗ 15.05 + 16.34 ∗ 15.85 ∗ 15.20 ∗ 16.35 16.66 15.94 15.48 14.90 13.85 13.99 12.19 Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Weinberger. Deep networks with stochastic depth. arXiv preprint arXiv:1603.09382v3, 2016. Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Francis Bach and David Blei (eds.), Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pp. 448–456, Lille, France, 07–09 Jul 2015. PMLR. URL http://proceedings. mlr.press/v37/ioffe15.html. Stanisaw Jastrzebski, Devansh Arpit, Nicolas Ballas, Vikas Verma, Tong Che, and Yoshua Bengio. Residual connections encourage iterative inference. arXiv preprint arXiv:1710.04773, 2017. Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016. Yurii Nesterov. A method of solving a convex programming problem with convergence rate o(1/k 2 ). Soviet Mathematics Doklady, 27:372–376, 1983. David E. Rumelhart, Geoffrey E. Hinton, and Ronald J. Williams. Learning representations by back-propagating errors. Nature, 323:533–536, 1986. Andreas Veit, Michael J Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. Advances in Neural Information Processing Systems 29, 2016. 9 Published as a conference paper at ICLR 2018 Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proc. CVPR, 2017. Yoshihiro Yamada, Masakazu Iwamura, and Koichi Kise. Deep pyramidal residual networks with separated stochastic depth. arXiv preprint arXiv:1612.01230, 2016. Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In Proc. BMVC, 2016. Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. arXiv preprint arXiv:1708.04896, 2017. A I MPLEMENTATION DETAILS All implementations used in the experiments were based on the publicly available code of fb.resnet.torch2 . ShakeDrop was trained using back-propagation by stochastic gradient descent with an approximate version3 of Nesterov accelerated gradient (Nesterov, 1983) and momentum method (Rumelhart et al., 1986). 4 GPUs were used for learning acceleration; due to parallel processing, even the same layer had different values of parameters bl , α and β depending on GPUs. CIFAR-10/100 datasets Input images of CIFAR-10/100 datasets were processed in the following manner. An original image of 32 × 32 pixels was color-normalized, followed by horizontally flipped with a 50% probability. Then, it was zero-padded to be 40 × 40 pixels and randomly cropped to be an image of 32 × 32 pixels. On PyramidNet, the initial learning late was set to 0.5 for both CIFAR-10/100 datasets following the version 2 of Han et al. (2017b), while they use 0.1 for the CIFAR-10 dataset and 0.5 for the CIFAR-100 dataset since version 3. Other than PyramidNet, the initial learning late was set to 0.1. The initial learning rate was decayed by a factor of 0.1 at 1/2 and 3/4 of the entire learning process (300 epochs), respectively, following Han et al. (2017b). As the filter parameters initializer, “MSRA” (He et al., 2015) was used. In addition, a weight decay of 0.0001, a momentum of 0.9, and a batch size of 128 were used with 4 GPUs. On PyramidDrop and “PyramidNet + ShakeDrop,” the linear decay parameter pL = 0.5 was used following Huang et al. (2016). 1-branch Shake used α = [0, 1], β = [0, 1]. ShakeDrop used parameters of α = [−1, 1], β = [0, 1] and “Image” level scaling coefficient. Tiny ImaneNet dataset Input images of Tiny ImageNet were processed in the following manner. An original image of 64 × 64 pixels was distorted aspect ratio and randomly cropped to be an image of 56 × 56 pixels. Then, brightness, contrast, and saturation of the image were randomly changed. After that, the image was color-normalized by mean and standard deviation of ImageNet, followed by horizontally flipped with a 50% probability. Learning settings of 110-layer PyramidNet on Tiny ImageNet were almost same as on CIFAR10/100. The initial learning late was set to 0.5. The initial learning rate was decayed by a factor of 0.1 at 1/2 and 3/4 of the entire learning process (300 epochs), respectively, following Han et al. (2017b). As the filter parameters initializer, “MSRA” (He et al., 2015) was used. In addition, a weight decay of 0.0001, a momentum of 0.9, and a batch size of 128 were used with 4 GPUs. Stride size of the first convolution layer was set to 2, and stride of average Pooling layer was set to 7. Learning settings of other than 200-layer PyramidNet on Tiny ImageNet were almost same as 110-layer PyramidNet. The initial learning late was set to 0.1. Learning settings of 200-layer PyramidNet on Tiny ImageNet were almost same as on ImageNet. The initial learning late was set to 0.0125. The initial learning rate was decayed by a factor of 0.1 at 1/2, 3/4 and 7/8 of the entire learning process (120 epochs), respectively, following Han et al. 2 https://github.com/facebook/fb.resnet.torch Please be aware that the implementation in sgd.lua of Torch7 with nesterov mode is an approximation of the original Nesterov accelerated gradient and momentum method. See https://github.com/torch/ optim/issues/27. 3 10 Published as a conference paper at ICLR 2018 Vanilla ResDrop ShakeDrop Vanilla ResDrop ShakeDrop (b) 1800-epoch training loss. (a) 300-epoch training loss. Figure 2: Change of training loss of PyramidNet with no regularization method (vanilla), ResDrop and ShakeDrop. (2017b). As the filter parameters initializer, “MSRA” (He et al., 2015) was used. In addition, a weight decay of 0.0001, a momentum of 0.9, and a batch size of 32 were used with 4 GPUs. Stride size of the first convolution layer was set to 1, and Stride of Max Pooling layer was set to 1. B D ISCUSSION In order to find out why the proposed method achieved the low error rates, we investigate what kind of difference exists with the conventional methods, particularly with PyramidNet and PyramidDrop. B.1 T RAINING LOSS Fig. 2 shows change of training loss. Fig. 2(a) is of the 300-epoch multi-step learning rate decay schedule with 110-layer networks. Fig. 2(b) is of 1800-epoch cosine annealing schedule with 272layer networks. ResDrop and ShakeDrop, which are probabilistic regularization methods, decreased the training loss more slowly than vanilla PyramidNet in both figures. Even at the final epoch, the loss of ResDrop and ShakeDrop are much larger than 0 in contrast to vanilla PyramidNet whose loss is close to 0. B.2 M EAN AND VARIANCE OF GRADIENTS In addition to the training loss, we examined the mean and variance of gradients on each iteration for each regularization method. Under the same conditions as the preliminary experiment in Sec. 4.1, we compared PyramidNet with no regularization method (vanilla), ResDrop and ShakeDrop in the “Batch” level. We focused on 3 residual blocks out of 54 residual blocks and named “first,” “middle” and “final.” They mean the first, 27th and final residual blocks, respectively. For each, we checked the 2nd convolutional layer. Figs. 3 and 4 show change of mean and variance of gradients, respectively. Although ResDrop and ShakeDrop were similar in Fig. 2, ShakeDrop took much larger values than ResDrop in Figs. 3 and 4. Particularly, the difference was significant in “first,” and also large in “middle.” They would indicate that relatively intensive training lasts in ShakeDrop. 11 Published as a conference paper at ICLR 2018 0.0006 first middle final 0.0004 0.0006 first middle final 0.0004 0.0006 0.0002 0.0002 0.0002 0.0000 0.0000 0.0000 0.0002 0.0002 0.0002 0.0004 0.0004 0.0004 0.0006 0.0006 0 20000 40000 60000 80000 100000 0 20000 (a) Vanilla 40000 60000 80000 100000 first middle final 0.0004 0.0006 0 (b) ResDrop 20000 40000 60000 80000 100000 (c) ShakeDrop Figure 3: The average of the gradients on each iteration in PyramidNet. 0.000010 first middle final 0.000008 0.000010 first middle final 0.000008 0.000010 0.000006 0.000006 0.000006 0.000004 0.000004 0.000004 0.000002 0.000002 0.000002 0.000000 0 20000 40000 60000 (a) Vanilla 80000 100000 0.000000 0 20000 40000 60000 (b) ResDrop 80000 100000 first middle final 0.000008 0.000000 0 20000 40000 60000 (c) ShakeDrop Figure 4: The variance of the gradients on each iteration in PyramidNet. 12 80000 100000
1cs.CV
1 Retrodirective Large Antenna Energy Beamforming in Backscatter Multi-User Networks arXiv:1802.09035v1 [cs.IT] 25 Feb 2018 Ioannis Krikidis, Senior Member, IEEE Abstract—In this letter, we study a new technique for energy beamforming (EB) in multi-user networks, which combines large antenna retrodirectivity at the transmitter side with signal backscattering at the energy receivers. The proposed technique has low complexity and achieves EB without any active operation at the receivers or complicated signal processing techniques at the transmitter. Since the average harvested energy depends on the backscattering coefficients, we investigate different reflection policies for various design objectives. The proposed policies are analyzed from a system level standpoint by taking into account spatial randomness. Index Terms—Wireless power transfer, retrodirectivity, backscattering, massive MIMO, stochastic geometry. I. I NTRODUCTION W IRELESS power transfer (WPT) through dedicated radio-frequency (RF) radiation has been introduced as a promising technology for energizing low-power devices [1]. It is relevant for future mobile networks, where the majority of billion of devices will be low-powered and autonomous. To increase the range of WPT and boost the end-to-end power transfer efficiency, several techniques have been proposed in the literature that incorporate new circuit designs, network architectures and recent advances in signal processing such as energy beamforming (EB) [2]. EB refers to systems with multiple antennas and enables focusing the transmitted energy to the direction of the receivers. The implementation of EB requires channel state information (CSI) at the energy transmitter (ET), which becomes a critical assumption for WPT systems, since the energy capabilities of the energy receivers (ERs) are limited. To tackle this problem, most of works consider a quantized feedback and/or exploit the channel reciprocity in association with different channel learning methods [3], [4]. In [5], the authors introduce an alternative EB scheme that does not require channel estimation, by exploiting the concept of large antenna retrodirectivity. However, its implementation requires signal transmission from the ERs, which could be costly for WPT scenarios. On the other hand, the work in [6] studies EB in a backscatter communication system, where CSI is acquired by leveraging the backscatter signal that is reflected back from the ERs. A beneficial combination of backscatter communication and retrodirective beamforming for EB is introduced in [7]; however, a theoretical analysis is not provided. In this letter, we study a new EB technique for multiuser networks that combines large antenna retrodirectivity with signal backscattering. The proposed technique overcomes the limitations of the previous works in [5], [6], and achieves EB without CSI estimation at the ET and without signal I. Krikidis is with the Department of Electrical and Computer Engineering, University of Cyprus, Nicosia 1678 (E-mail: [email protected]). transmission at the ERs. We show that the achieved energy harvesting performance depends on the backscattering reflection coefficients. Different reflection policies that correspond to different complexities and energy harvesting performances are investigated. The proposed EB technique and the associated reflection policies are analyzed from a system level point of view by using stochastic geometry tools. II. S YSTEM MODEL We consider a single-cell consisting of an ET and multiple randomly deployed ERs, where the coverage area is modeled as a disc D with radius ρ and an exclusion zone of radius ξ > 1. The exclusion zone captures potential safety issues i.e., ERs are prohibited to be close to the ET [8]. The ET employs a large number of antennas, denoted by M , while the ERs are equipped with single antennas. We assume that the ERs are located according to a homogeneous Poisson point process (PPP) Φ = {xi } with a density λ that ensures M ≫ K, where K is the number of ERs in D (i.e., Poisson distribution with mean λπ(ρ2 − ξ 2 ) [9]). The ET is connected to the power grid and transmits with a fixed power Pt ; its antenna array has (digital) retrodirectivity properties and thus it can re-transmit a signal back along the spatial direction of the incoming signal without any a-priori knowledge of its point of origin [10]. On the other hand, the ERs do not have any local power supply and they power their functionalities through WPT by using the signal of the ET. Specifically, the ERs operate in a backscattering mode, where part of the received signal is reflected back by adapting the level of antenna impedance mismatch; let 0 ≤ βi ≤ 1 be the reflection coefficient for the i-th ER. The large-scale path loss is assumed to be d−α i , where di ≥ ξ denotes the Euclidean distance between the i-th ER and the ET, and α > 2 is the path-loss exponent; the exclusion zone ensures a bounded path loss region with radius ξ. We assume a Rayleigh block fading [5], [8], where the channel between the ET and the i-th ER is an uncorrelated Gaussian vector with elements having zero mean and unit variance i.e., f i = [fi,1 , . . . , fi,M ]T ∼ CN (00, I M ). We assume channel reciprocity and thus the channels for uplink and downlink are equivalent and constant during one block, but vary independently from block to block. It is worth noting that the proposed scheme becomes less interesting for scenarios with strong line-of-sight components (e.g., for Rice fading channel, the omnidirectional EB approaches the performance of the perfect EB as the Rice factor increases). III. R ETRODIRECTIVE EB WITH BACKSCATTERING The proposed EB technique combines a retrodirective beamforming at the ET with a passive backscattering process at the 2 ERs. The EB technique consists of two phases, as described below. A. Backscattering phase The first phase enforces the ERs to notify their spatial direction to the ET by using their backscattering capabilities. More specifically, the ET generates and √ broadcasts an unmodulated single-tone waveform x(t) = 2Pt cos(2πfc t) with 0 < t < τ , where fc is the carrier frequency and τ is the duration of the waveform1 ; the power is symmetrically divided to M antennas. Each ER operates in the backscattering mode and reflects back a part of the received signal without further processing. The received signal (complex baseband representation) at the q ET is given by X βk (Pt /M )d−2α gkf k + n (t), (1) y (t) = k xk ∈Φ PM where gk = m=1 fk,m denotes the equivalent channel for the downlink (sum of M complex Gaussian random variables with unit variance), f k is the uplink channel due to the reciprocity, and n (t) is the additive white Gaussian noise (AWGN) vector with n (t) ∼ CN (00, σ 2I M ). Note that the path-loss exponent is doubled as a result of the dyadic backscatter channel. B. EB phase In the second phase, the ET exploits large antenna retrodirectivity and uplink/downlink channel reciprocity and effectively forms coherent beams back to the ERs. More specifically, the ET performs matching filtering on y (t) to detect the phase of the received signal; then it transmits an energy signal with a power Pt by employing phase conjugation. The w+ energy transmit signal (baseband) can q be written as x e = (w P −2α ∗ H H n) /||w w + ñ n||, where w = βk (Pt /M )dk gkf k ñ xk ∈Φ 2 n ∼ CN (00, (σ /τ )II M ) denotes the noise at the output and ñ of the matched filter. Due to the channel reciprocity, the received signal at the i-th ER can be expressed as yi = q Pt d−α x ef i +z, where z is the AWGN component. By using i the energy conversion law and by ignoring energy harvesting from AWGN, the harvested energy at the i-th ER becomes ζPt M d−3α βi |gi |2 i β , di ) = ζ|yi |2 = ζPt d−α +P Q(β i −2α | {z } βk |gk |2 + x ∈Φ dk {z | k QOM (di ) β QΦ RE (β ,di ) In this section, we study the impact of reflection coefficients on the achieved performance and we investigate different reflection strategies. A. Distance-inversion backscattering (DIB) In this strategy, we enforce the average harvested energy associated with the retrodirective component to be equal for each ER. To satisfy this fairness requirement, we assume that the reflection coefficient is a function of the location of each ER i.e., βi = (di /ρ)2α ; this assumption ensures that the reflection coefficient increases with the distance and takes the maximum value (full reflection) at the edge of the cell. In this case, the expression in (2) can be simplified as # " M |gi |2 −α P for σ 2 → 0, Q(pp, di ) ≈ ζPt di 1+ |gi |2 + xk ∈Φ,i6=k |gk |2 (3) where p = [(d1 /ρ)2α , . . . , (dK /ρ)2α ] and the average harvested energy is given by " #! 2 |g | i P QDIB = ζPt EΦ [d−α i ] 1 + ME |gi |2 + xk ∈Φ,i6=k |gk |2   Z 2π Z ρ = ζPt x1−a fd (x)dθdx 1 + M E[Z] (4a) 0 ξ   M 2ζPt (ρ2−α − ξ 2−α ) 1 + , (4b) = (2 − α)(ρ2 − ξ 2 ) λπ(ρ2 − ξ 2 ) {z } | Λ(ξ,ρ) where fd (x) = 1/π(ρ2 − ξ 2 ) denotes the probability density function (PDF) of each point in the disc D, and (4b) is based on the expected value of Beta distribution with shape parameters M and (E[K] − 1)M , respectively, i.e., Z ∼ Beta(M, [λπ(ρ2 − ξ 2 ) − 1]M ). B. Full backscattering (FB) Mσ2 Pt τ , } (2) where ζ denotes the RF-to-DC energy conversion efficiency2. Proof: The proof follows similar arguments with [5, Lemma 3.1] and is based on the asymptotic massive multiple-input multiple-output (MIMO) expressions [11] i.e., 1 1 1 H f 4 f 2 1, M f k f i → 0 (with k 6= i), M ||f i || → M +1, M ||f i || → 1 σ2 1 σ2 1 H H 2 f n 2 n n f ||f , and ñ → 0, ñ || → k M k M τ M ||ñ || → τ . 1 The The harvested energy consists of two main components i) an omnidirectional component QOM which only depends on the location of the ER, and b) a retrodirective component QΦ RE that depends on the reflection coefficients βi of the ERs. IV. AVERAGE HARVESTED ENERGY proposed scheme requires the orthogonality between single-tone waveform transmission and retrodirectivity at the ET. An appropriate design of the parameters τ , ξ as well as a time delay between reception/reflection at the ERs ensures that the duration of the waveform is shorter than the round-trip delays. 2 A linear power channel is sufficient to demonstrate the proposed EB technique [3], [4]; wireless power nonlinearities are beyond the scope of this letter. The FB reflection strategy refers to systems without further intelligence, where the ERs fully reflect back their received signals i.e., βi = 1 (∀ xi ∈ Φ). This scheme does not require any coordination between the ERs and therefore provides implementation simplicity. For the average harvested energy, we state the following theorem. Theorem 1. The average harvested energy achieved by the FB scheme, is given by QFB = Λ(ξ, ρ) + QFB (ξ, λ). (5) Proof: The first term is associated with the omnidirectional component of the harvested energy and is similar to the first term of the DIB scheme (see (4b)), QFB (ξ, λ) refers to the retrodirective component and is given in an integral form in the Appendix. For the special cases of highly dense/sparse networks with σ 2 → 0, we introduce the following statement. 3 Statement 1. For σ 2 → 0, the average harvested energy for highly dense (λ → ∞) and sparse networks (λ → 0) converges to the one achieved by the non-backscattering (βi = 0) and beamforming (perfect CSI) schemes, respectively, i.e., QFB → Λ(ξ, ρ) for λ → ∞, [Non-backscattering], (6) QFB → M Λ(ξ, ρ) for λ → 0, [Beamforming]. C. Binary backscattering schemes (7) In this strategy, the ERs operate either in a fullbackscattering mode or in a non-backscattering mode i.e., βi ∈ {0, 1}. Through this binary reflection mechanism, we can control the harvested energy related to the retrodirective component and provide design flexibility. The selection of the operation mode is driven by two criteria, which are given in the following discussion. 1) Distance-based binary backscattering (DBB): The first criterion takes into account the spatial location of the ERs; ERs that are located at a distance higher than ∆ from the ET, fully reflect the received signal (βi = 1), otherwise remain inactive (βi = 0). In this case, the average harvested energy can be written as   QDBB = ǫΛ(ξ, ∆) + (1 − ǫ) Λ(∆, ρ) + QFB (∆, λ) , (8) where the first and second terms refer to the location range (ξ, ∆) and (∆, ρ), respectively, and ǫ = (ξ 2 − ∆2 )/(ρ2 − ξ 2 ). The design parameter ∆ can be used as a means to provide an energy harvesting balance among the ERs. More specifically, the ERs that are close to the ET (di ≤ ∆) harvest sufficient energy from the omnidirectional component and facilitate the energy harvesting of the distant ERs by keeping silent. We can design ∆ based on the max-min fairness that maximizes the minimum average harvested energy and is given as follows o n Φ(∆) ∆∗ = arg∆∈(ξ,ρ) max min QOM (∆), QOM (ρ) + Q̄RE (11, ρ) ( Φ(∆) Q (ξ) = QOM (ρ) + Q̄RE (11, ρ) If T is true, = ∆ OM Φ(∆) QOM (∆) = QOM (ρ) + Q̄RE (11, ρ) elsewhere, (9) Φ(ρ) where T = {QOM (ξ) ≤ QOM (ρ) + Q̄RE (11, ρ)}, and Φ(∆) = {xi ∈ Φ : ||xi || ≥ ∆}. The above expression takes into account the active/inactive ERs with the worst energy harvesting performance and maximizes the minimum between them; since we have closed form expressions for the harvesting performance for both cases ((2), (14)), the optimal value ∆∗ can be found by numerically solving the equation in (9). 2) Probabilistic binary backscattering (PBB): Similar to the DBB technique, the ERs either fully reflect the received signal or remain inactive. In this case, the mode selection is performed in a probabilistic way and thus the ERs with a probability p operate in backscattering mode and with a probability 1 − p remain silent. The average harvested energy can be expressed as QPBB (p) = Λ(ξ, ρ) + pQFB (ξ, λp). (10) Equivalently to the DBB scheme, p can be designed to boost the energy harvesting performance of the worst case (i.e., ERs located in the edge) such as ′  ′ 1, ρ) , p∗ = argp∈(0,1) max Q̄Φ RE (1 (11) where φ denotes a PPP with density pλ; due to the complexity of the expression, p∗ does not have closed-form solution and can be evaluated numerically. D. Harvesting-target backscattering (HTB) In the HTB scheme, we assume that each ER aims to achieve a minimum harvested energy from the retrodirective component of the received signal. Let Γi ≥ 0 denote the energy harvesting target for the i-th ER. In this case, the problem resembles to the conventional power control problem for time varying channels with user-specific signal-tointerference-plus-noise ratio requirements, which admits online distributed implementation (Foschini-Miljanic algorithm [12]). Specifically, the reflection coefficient βi for the i-th ER is given by the following iterative algorithm   Γi βi (l) . (12) βi (l + 1) = min 1, Φ β (l), di ) QRE (β The convergence properties of the iterative scheme have been studied by Yates [13]; it is worth noting that the channel gains between the ET and the ERs remain constant during the iterations (e.g., stationary users with slowly-varying channels). For the case where the problem is feasible and thus all ERs satisfy the minimum harvested energy constraint with βi ≤ 1, the backscattering coefficients are hgiven in closed form i.e., i Γ1 ñ1 ΓK ñK β ∗ = (II K − F )−1u , where u = d−3α , . . . , d−3α , |g |2 |g |2 1 1 and F is a K × K matrix with Fi,j = i, j = 1, . . . , K [12]. V. N UMERICAL K Γi |gj |2 d−2α j |gi |2 d−3α i K and RESULTS The simulation setup follows the description in Sec. II with M = 500, λ = 0.01, fc = 900 MHz, α = 3, σ 2 = −150 dBm, τ = 10−8 sec, ξ = 2 m, ρ = 30 m, and ζ = 1 (unless otherwise stated). In Fig. 1, we present the average harvested energy versus the transmit power Pt for the proposed reflection policies. The performance of perfect beamforming (full CSI at the ET) and non-backscattering (omnidirectional transmission) are given as benchmarks. As it can be seen, the FB scheme significantly outperforms the non-backscattering scheme and provides a performance that is close to the perfect beamforming case. On the other hand, the DIB scheme outperforms non-backscattering, while it provides fairness among ERs (in comparison to FB). Fig. 2(a) plots the average harvested energy of the DBB scheme for different ER locations versus the distance threshold ∆. As it can be seen, the parameter ∆ provides an energy harvesting balance among ERs located in different distances from the ET. According to the expression in (9), the value ∆∗ that ensures max − min fairness corresponds to the crossover point between the average harvested energy of the ERs located in distance ξ and ρ, respectively. In Fig. 2(b), we deal with the performance of the PBB scheme. By controlling the probability p, we achieve different energy harvesting balances among the ERs; the optimal value p∗ is selected to maximize the energy harvesting at the edge of the cell. Finally, Fig. 3 deals with the HTB scheme and plots the percentage of the ERs that can achieve a common harvesting 4 10 10 10 10 10 −1 DIB (Simulation) DIB (Bound Eq. (4)) FB (Simulation) FB (Theory) Non−backscattering (Simulation) Non−backscattering (Eq. (6)) Beamforming (Simulation) Beamforming (Eq. (7)) −2 10 10 10 10 100 2 d=ξ d=ρ d=15 m d=20 m 0 90 ∆* 80 −2 70 −4 8 10 12 14 16 18 20 ∆ [m] (a) 22 24 26 28 30 −3 −4 −5 −6 0 5 10 15 20 P [dBm] 25 30 35 40 10 10 0 −1 Av. harvested energy Q −2 50 40 PBB 20 −3 10 10 −4 0 0.1 0.2 0.3 0.4 (b) t 60 (p) Av. harvested energy d=ρ 10 HTB, λ=0.01, Γ=−10 dBm FB, λ=0.01, Γ=−10 dBm HTB, λ=0.01, Γ=0 dBm FB, λ=0.01, Γ=0 dBm HTB, λ=0.01, Γ=10 dBm FB, λ=0.01, Γ=10 dBm HTB, λ=0.1, Γ=−10 dBm FB, λ=0.1, Γ=−10 dBm 30 p* 10 Percentage of ERs [%] Average Harvested Energy [W] 10 0 Average Harvested Energy [W] 10 1 Average Harvested Energy [W] 10 0.5 0.6 0.7 0.8 0.9 1 0 0 p 5 10 15 20 Pt [dBm] 25 30 35 40 Fig. 1. Average harvested energy versus the transmit Fig. 2. (a) DBB scheme- average harvested energy Fig. 3. Percentage of ERs that satisfy the energy power (DIB, FB, Non-backscattering, Beamform- versus ∆, (b) PBB scheme- average harvested energy harvesting constraint for the HTB scheme. ing.). versus p; ξ = 8 m, Pt = 40 dBm target Γi = Γ from the retrodirective component versus the transmit power Pt . The HTB scheme is based on the distributed implementation (see (12)) with (maximum) 100 iterations; the FB scheme is used as a benchmark. We can observe that as the harvesting threshold and the density of users increase, the percentage of the ERs that satisfy the energy harvesting constraint decreases. In addition, the HTB scheme significantly outperforms the FB scheme and the performance gain becomes more important as the transmit power increases. VI. C ONCLUSION This letter has dealt with a new EB scheme for WPT multiuser networks, which jointly combines large antenna retrodirectivity with passive signal backscattering. The proposed technique does not require CSI or active signal transmission at the ERs, and the energy harvesting performance depends on the reflection coefficients. Several reflection strategies have been investigated and analyzed by taking into account location randomness. The proposed EB technique has lower power consumption than conventional counterparts and is a promising solution for future machine-type communications. An interesting extension of this work is to investigate the proposed scheme for more complex networks with multiple ETs. A PPENDIX The complementary cumulative distribution function (CCDF) of the harvested energy (associated with the retrodirective component of the received signal) for a given path-loss value d is written as 1, d) > x) F (x|d) = F (x|di = d) = P(QΦ RE (1     2  X M σ  = P |gi |2 > Y (x)  d−2α |gk |2 + k  ζPt τ  xk ∈Φ,k6=i   X Y (x) d−2α |gk |2  = exp (−U (x)) EΦ,g exp − k M xk ∈Φ,k6=i     Z  Y (x)|g|2 y −2α ydy = exp(−U (x)) exp −λ 1−Eg exp − M  D Z ρ  Y (x)y = exp(−U (x)) exp −2πλ dy , (13) Y (x) + y 2α ξ where Y (x) = x −1 ζPt d−α x (M+1− )d−2α −α ζPt d , U (x) = Y (x)σ2 ζPt τ , |gi |2 follows an exponential distribution with rate parameter 1/M and (13) follows from the probability generating functional of a PPP [9, Sec. 4.6]. From the CCDF, we can calculate the average harvested energy for a given path-loss value d as follows −α Z 1, d) = Q̄Φ RE (1 (M+1)ζPt d F (x|d)dx. (14) ζPt d−α With expectation over the path-loss Z values, we have Φ 1, y)fd (y)ydy Q̄Φ QFB (ξ, λ) = E[Q̄RE (11, d)] = RE (1 = 2 ρ2 − ξ 2 Z ξ ρ Z D (M+1)ζPt y −α F (x|y)ydxdy. (15) ζPt y −α R EFERENCES [1] Y. Zeng, B. Clerckx, and R. Zhang, “Communications and signal design for wireless power transmission,” IEEE Trans. Commun., vol. 65, pp. 2264–2290, May 2017. [2] R. Zhang and C. K. Ho, “MIMO broadcasting for simultaneous wireless information and power,” IEEE Trans. Wireless Commun., vol. 12, pp. 1989–2001, May 2013. [3] J. Xu and R. Zhang, “Energy beamforming with one-bit feedback,” IEEE Trans. Signal Process., vol. 62, pp. 5370–5381, Oct. 2014. [4] Y. Zeng and R. Zhang, “Optimized training design for wireless energy transfer,” IEEE Trans. Commun., vol. 63, pp. 536–550, Feb. 2015. [5] S. Lee, Y. Zeng, and R. Zhang, “Retrodirective multi-user wireless power transfer with massive MIMO,” IEEE Wireless Commun. Lett., (accepted for publication), 2017. [6] G. Yang, C. K. Ho, and Y. L. Guan, “Multi-antenna wireless energy transfer for backscatter communication systems,” IEEE J. Selec. Areas Commun., vol 33, pp. 2974–2987, Dec. 2015. [7] K. Huang, C. Zhong, and G. Zhu, “Some new research trends in wirelessly powered communications,” IEEE Wireless Commun., vol. 23, pp. 19–27, April 2016. [8] M. Xia and S. Aissa,“On the efficiency of far-field wireless power transfer,” IEEE Trans. Sign. Proc., vol. 63, pp. 2835–2847, June 2015. [9] M. Haenggi, Stochastic geometry for wireless networks, Cambridge Univ. Press, 2013. [10] D. Masotti, A. Costanzo, M. Del Prete, and V. Rizzoli,“Retrodirective arrays for wireless communications,” IEE Micro. Mag., vol. 3, pp. 71–79, March 2002. [11] Y. -G. Lim, C. -B. Chae, and G. Caire, “Performance analysis of massive MIMO for cell-boundary users,” IEEE Trans. Wireless Commun., vol. 14, pp. 6827–6842, Dec. 2015. [12] G.J. Foschini, Z. Miljanic, “A simple distributed autonomous power control algorithm and its convergence,” IEEE Trans. Veh. Tech., vol. 42, pp. 641–646, Apr. 1993 [13] R. D. Yates, “A framework for uplink power control in cellular radio systems,” IEEE J. Sel. Areas Commun., vol. 13,pp. 1341–1347, 1995.
7cs.IT
arXiv:1604.06392v2 [math.CO] 13 Apr 2017 Convergence criteria for FIW –algebras and polynomial statistics on maximal tori in type B/C Rita Jiménez Rolland∗ and Jennifer C. H. Wilson† April 14, 2017 Abstract A result of Lehrer describes a beautiful relationship between topological and combinatorial data on certain families of varieties with actions of finite reflection groups. His formula relates the cohomology of complex varieties to point counts on associated varieties over finite fields. Church, Ellenberg, and Farb use their representation stability results on the cohomology of flag manifolds, together with classical results on the cohomology rings, to prove asymptotic stability for “polynomial” statistics on associated varieties over finite fields. In this paper we investigate the underlying algebraic structure of these families’ cohomology rings that makes the formulas convergent. We prove that asymptotic stability holds in general for subquotients of FIW –algebras finitely generated in degree at most one, a result that is in a sense sharp. As a consequence, we obtain convergence results for polynomial statistics on the set of maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) that are invariant under the Frobenius morphism. Our results also give a new proof of the stability theorem for invariant maximal tori in GLn (Fq ) due to Church–Ellenberg–Farb. Contents 1 Introduction 2 2 Preliminaries 2.1 Representation theory of the hyperoctahedral group Bn . . . . . . . . . . . . . . . . . 2.2 The theory of FIW –modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Asymptotics and asymptotic notation . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6 8 10 3 Asymptotic stability 3.1 Asymptotics of character polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Convergence for subquotients of FIW -algebras generated in low degree . . . . . . . . 10 10 13 4 Point counts for maximal tori in type B and C 4.1 Maximal tori in types B and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Asymptotic results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) . . . . . . . . 17 18 22 24 ∗ The first author is grateful for support from the Sofı́a Kovalévskaia Foundation, the Sociedad Matemática Mexicana and PAPIIT-UNAM grant IA100816. † The second author is grateful for the support of an AMS-Simons Travel Grant. 1 R Jiménez Rolland J C H Wilson Introduction 1 Introduction In this paper we study the complete complex flag varieties associated to the linear groups SO2n+1 (C) and Sp2n (C) of type B and C, respectively. These spaces and their cohomology algebras are described in Section 4.1; their cohomology admits actions of the signed permutation group Bn . A remarkable formula due to Lehrer [Leh92] relates the representation theory of these cohomology groups with point-counts on varieties over Fq that parametrize maximal tori in SO2n+1 (Fq ) and Sp2n (Fq ). One result of this paper is to exhibit a form of convergence for these formulas as the parameter n tends to infinity. Church, Ellenberg, and Farb prove that the cohomology groups of the flag varieties associated to GLn (C) are representation stable with respect to the Sn –action [CEF15, Theorem 1.11]. Using this result and a description of the cohomology due to Chevalley, they establish asymptotic stability for “polynomial” statistics on the set of Frobenius-stable maximal tori in GLn (Fq ) [CEF14, Theorem 5.6]. In Theorem 4.3 we prove the corresponding result in type B and C, using a representation stability result of the second author [Wil14]. To establish our results, we give general combinatorial criteria on the cohomology algebras of the complex varieties that ensure convergence. This is one of few results in the FI–module literature that makes full use of the multiplicative structure on the FIW –algebras. Church–Ellenberg– Farb prove convergence for statistics on maximal tori in type A using sophisticated results specific to these cohomology algebras. This paper shows that convergence in fact follows from much simpler features of the algebras. Table 1: Some statistics for Frobenius-stable maximal tori of Sp2n (Fq ) and SO2n+1 (Fq ) Frq -stable maximal tori statistic for Sp2n (Fq ) and SO2n+1 (Fq ) Hyperoctahedral character Formula in terms of n Limit as n → ∞ Total number of Frq -stable maximal tori 1 q 2n (Steinberg) Expected number of X1 + Y 1 2 1+ q2 (q 2 − 1) 1 1 1 + 4 + · · · 2n−2 q2 q q 1-dimensional Frq -stable subtori Expected number of split 1 2 X1  1+ 1 1 1 + 2 + · · · 2n−1 q q q  q 2(q − 1) 1-dimensional Frq -stable subtori Expected value of reducible minus irreducible Frq -stable 2-dimensional subtori Expected value of split minus X + Y  1 1 − (X2 + Y2 ) 2  q4 −  q2 1 − X2 − Y 2 non-split Frq -stable 2-dimensional irreducible subtori 2  1− 1 q 2n (q 2 − 1 q 2n 1 q 2(n−1) 1) (q 4 − 1)  2 (q 4 1− − 1)  1 q 2(n−1)  q4 (q 2 − 1)(q 4 − 1) q2 − 1) 2 (q 4 R Jiménez Rolland J C H Wilson Introduction Examples of limiting statistics computed in Section 4.3 are presented in Table 1; the notation in this table is defined below. The first of these result is due to Steinberg [Ste68, Corollary 14.16], and the other results appear to be new. A general convergence result: algebras generated in low degree A primary goal of this paper is to describe the underlying algebraic structure on the cohomology algebras that drives these stability results. Throughout, we will use the notation Wn to denote either the family of symmetric groups Sn (the Weyl groups in type A) or the family of hyperoctahedral groups Bn (the Weyl groups in type B/C). We prove in Section 3.2 that convergence of the statistics on maximal tori in type A and B/C holds because the graded pieces of the associated coinvariant algebras are, as a sequence of graded Wn –representations, subquotients of what we call an FIW –algebra finitely generated in degree at most 1. Terminology and basic theory of FIW – modules is summarized in Section 2.2. Speaking informally, these FIW –algebras are sequences of graded algebras with Wn –actions that are generated by representations of W0 and W1 . Concretely, they include the sequence of algebras Γ∗Wn which we now define. Let k be a subfield of C. Let M (1)n denote the k–vector space with basis x1 , x2 , . . . , xn . The symmetric group Sn acts on the variables xi by permuting the subscripts. Let M (0)n denote the k–vector space generated by the single element y with trivial Sn –action. Then for any integers b, c ≥ 0 let Γ∗Sn be the graded algebra generated by M (0)n⊕b ⊕ M (1)n⊕c with each copy of M (0)n and M (1)n assigned a positive grading. The algebra Γ∗Sn may be taken to be commutative, anticommutative, or graded-commutative. It inherits a diagonal action of Sn on its monomials. Analogously, let MBC (1)n be the k–vector space with basis x1 , x1 , x2 , x2 , . . . , xn , xn . The hyperoctahedral group Bn acts on the variables xi by permuting and negating the subscripts. Again let MBC (0)n be the k–vector space generated by a variable y with trivial Bn action. Let Γ∗Bn be the symmetric, exterior, or graded-commutative algebra generated by ⊕c MBC (0)⊕b n ⊕ MBC (1)n with each family of variables graded in positive degree. Theorem 3.5 shows the algebras Γ∗Wn and their subquotients satisfy a convergence property with respect to certain family of ‘polynomial’ class functions, first defined on the symmetric groups by MacDonald [Mac79, I.7 Example 14] as follows. For any permutation σ and positive integer r, let Xr be the function that outputs the number Xr (σ) of r–cycles in the cycle type of σ. Polynomials in the functions Xr , called character polynomials, play a major role in the theory of representation stability developed by Church–Ellenberg–Farb [CEF15]. In Section 2.1.2 we recall an analogous definition for the Weyl group Bn in type B and C. These hyperoctahedral character polynomials are polynomials P ∈ k[X1 , Y1 , X2 , Y2 , . . .] in the ‘signed cycle counting functions’ Xr and Yr on Bn . See Section 2.1 for the prerequisite background on the representation theory of the groups Bn and a precise definition of these class functions. 3 R Jiménez Rolland J C H Wilson Introduction Theorem 3.5 is a stability result for the asymptotics of the inner products hPn , Adn iWn of a character polynomial P with a subquotient Adn of ΓdWn . This is precisely the stability result needed to prove convergence of the point-counts that appear in Lehrer’s formulas. Theorem 3.5 (Criteria for convergence). Let Wn denote one of the families Sn or Bn . Let Γ∗Wn be one of the commutative, exterior, or graded commutative algebras defined above, and let {Adn } be any sequence of graded Wn –representations such that Adn is a subrepresentation of ΓdWn . Then for any Wn character polynomial P and integer q > 1 the following series converges absolutely ∞ X limn→∞ hPn , Ad iW n d=0 n qd . The proof (given in Section 3.2) uses an analysis of the combinatorics of coloured partitions. A closely related result in Type A is proved in [FW] using very different methods; see Remark 3.9. A failure of convergence In forthcoming work [JRW17] the authors show that, in contrast to Theorem 3.5, convergence may fail for FIW –algebras generated in degree 2 or greater. To give a concrete example, let A∗n be the polynomial algebra k[x1,2 , x1,3 , x2,3 , x1,4 , . . . , xn−1,n ] generated by commuting variables xi,j = xj,i , i 6= j, in graded degree 1, with an action of Wn by permuting the indices. Then the series ∞ X limn→∞ hPn , Ad iW n n qd d=0 does not converge for any positive integer q even for the constant character polynomial P = 1. This counterexample shows a fundamental difference in the asymptotic behaviour of FIW –algebras generated by representations of W0 or W1 and those generated by representations of Wn in degree n ≥ 2. An application: polynomial statistics for coinvariant algebras and Frq -stable maximal tori We apply Theorem 3.5 to the family {Rnd }, where Rnd denotes the dth -graded piece of the complex coinvariant algebra Rn∗ in type A or in type B/C. A description of these algebras appears in Section 4.1.3. We obtain a convergent formula in Proposition 4.4 for coinvariant algebras of type B/C and give a new proof of the result in type A (see [CEF14, Theorem 5.6] and Remark 4.5). Theorem 3.5 shows that the convergence of this formula follows because the complex coinvariant algebras are quotients of the polynomial rings C[x1 , x2 , . . . , xn ]; convergence does not depend on any deeper structural features of these algebras. For a general connected reductive group G defined over Fq , let T Frq denote the set of maximal tori of G(Fq ) that are stable under the action of Frq , the Frobenius morphism. Frq -stable maximal tori of reductive groups G defined over Fq are fundamental to the study of the representation theory of the finite group GFrq [DL76]. More background is given in Section 4.1. Lehrer [Leh92] obtained remarkable formulas that relate functions that are defined on the set T Frq with 4 R Jiménez Rolland J C H Wilson Introduction the character theory of the Weyl group of G. We recall one of Lehrer’s formulas in Theorem 4.2 for the cases when G is the symplectic group Sp2n or the special orthogonal group SO2n+1 ; the formula connects functions on T Frq and the cohomology of the generalized flag varieties associated to G(C). In Section 4.1.2 we describe how the hyperoctahedral character polynomials of Section 2.1.2 define functions on T Frq . Specifically, for T ∈ T Frq , Xr (T ) is the number of r-dimensional Frq -stable subtori of T irreducible over Fq that split over Fqr , and Yr (T ) is the number of r-dimensional Frq stable subtori of T irreducible over Fq that do not split over Fqr . In Section 4, we combine Lehrer’s formula with Proposition 4.4 to establish asymptotic results for these polynomial statistics on the set of Frq -stable maximal tori of Sp2n (Fq ) and of SO2n+1 (Fq ). We obtain Theorem 4.3 below, the type B and C analogues to [CEF15, Theorem 5.6] for Frq -stable maximal tori for GLn (Fq ). Theorem 4.3. (Stability of maximal tori statistics). Let q be an integral power of a prime p. For n ≥ 1, Fr d denote by Tn q the set of Frq -stable maximal tori for either Sp2n (Fp ) or SO2n+1 (Fp ). Let Rm denote the th ∗ d -graded piece of the complex coinvariant algebra Rm in type B/C. If P ∈ C[X1 , Y1 , X2 , Y2 , . . .] is any hyperoctahedral character polynomial, then the normalized statistic X 2 P (T ) q −2n Frq T ∈Tn converges as n → ∞. In fact, 2 lim q −2n n→∞ X ∞ d X limm→∞ hPm , Rm iBm , d q P (T ) = Frq d=0 T ∈Tn and the series in the right hand converges. At the end of Section 4, we use Theorem 4.3 and Stembridge’s formula for decomposing the Bn –representation Rnd (see Theorem 4.7) to compute the specific asymptotic counts in Table 1. Related work Fulman [Ful16, Section 3] uses generating functions to recover the specific counts obtained by Church–Ellenberg–Farb [CEF14] for Frq -stable maximal tori in GLn (Fq ). Chen uses generating function techniques to obtain a linear recurrence on the stable twisted Betti numbers of the associated flag varieties[Che, Corollary 2 (II)]. These methods should also apply to study maximal tori of other classical groups, including the ones considered in this paper. They offer an alternate approach to performing the computations in Section 4.3, and may shed further light on the structure of the asymptotic formulas. Farb and Wolfson [FW] extend the methods of Church–Ellenberg–Farb [CEF14] to establish new algebro-geometric results. In [FW, Theorem B] they prove that configuration spaces of n points in smooth varieties have convergent cohomology [FW, Definition 3.1] and obtain arithmetic statistics for configuration spaces over finite fields [FW, Theorem C]. The results of this paper and the work of Church–Ellenberg–Farb [CEF14] complement the existing literature on enumerative properties of matrix groups over finite fields; see for example 5 R Jiménez Rolland J C H Wilson Preliminaries [NP95, NP98, Ful99, Wal99, NP00, Bri02, FNP05, LNP09, NP10, NPP10, NPS13, BGPW13, NPP14]. These authors seek, for example, to determine the proportion of elements in certain finite matrix groups that are cyclic, separable, semisimple, or regular. Their methods are different from those in this paper, and include the calculus of generating functions, complex analysis, classical Lie theory, finite group theory, analytic number theory, and statistics. This probabilistic approach to the study of finite groups has applications to algorithm design in group theory, random matrix theory, and combinatorics. Acknowledgments We would like to thank Benson Farb for proposing this project. We thank Weiyan Chen, Tom Church, and Jason Fulman for useful conversations. We are grateful to Ohad Feldheim for suggesting the proof of Proposition 3.6. We thank Jason Fulman for finding an error in a formula in Table 1 in an early version of this paper. The first author would also like to thank the Centro de Ciencias Matemáticas, UNAM-Morelia, for all its support during the writing of this paper. 2 Preliminaries In this section we summarize some necessary background material and terminology. Section 2.1 describes the representation theory of the hyperoctahedral groups in characteristic zero. In Section 2.2 we review the foundations of FIW –modules developed by Church–Ellenberg–Farb [CEF15] in type A and by the second author [Wil14, Wil15] in type B/C. Section 2.3 defines the asymptotic notation that will be used in this paper. Notation 2.1. (The inner product h− , −iG ). Throughout the paper, given a finite group G we write h− , −iG to denote the standard inner product on the space of class functions of G. By abuse of notation we may write a G–representation V in one or both arguments to indicate the character of V . 2.1 Representation theory of the hyperoctahedral group Bn Let Bn denote the Weyl group in type Bn /Cn , the wreath product Bn ∼ = Z/2Z ≀ Sn = (Z/2Z)n ⋊ Sn , which we call the hyperoctahedral group or signed permutation group. By convention B0 is the trivial group. We may view Bn as the subgroup of permutations SΩ ∼ = S2n on the set Ω = {1, 1, 2, 2, . . . , n, n} defined by Bn = {σ ∈ SΩ | σ(a) = σ(a) for all 1 ≤ a ≤ n }. Here a denotes negative a; in general the bar represents the operation of negation and satisfies a = a for a ∈ Ω. 2.1.1 Conjugacy classes of the hyperoctahedral groups The conjugacy classes of Bn are classified by signed cycle type, defined as follows. A positive r–cycle is a signed permutation of the form (s1 s2 · · · sr )(s1 s2 · · · sr ) ∈ SΩ , si ∈ Ω. This element reverses 6 2.1 Representation theory of the hyperoctahedral group Bn R Jiménez Rolland J C H Wilson the sign of an even number of letters. A negative r–cycle is a signed permutation of the form (s1 s2 · · · sr s1 · · · sr ) ∈ SΩ , which reverses an odd number of signs. The rth power of a positive r– cycle is the identity, whereas the rth power of a negative r–cycle is the product of r transpositions (si si ). Positive and negative r–cycles project to r–cycles under the natural surjection Bn → Sn . For example, (1 3 2)(1 3 2) is a positive 3-cycle and (1 3 2 1 3 2) is a negative 3-cycle which both project to the 3–cycle (1 3 2) ∈ Sn . In 1930 Young [You30] proved that signed permutations factor uniquely as a product of positive and negative cycles, and two signed permutations are conjugate if and only if they have the same signed cycle type. We represent the signed cycle type of a signed permutation by a double partition (λ, µ), where λ is a partition with a part of length r for each positive r–cycle, and µ a partition encoding the negative r–cycles. 2.1.2 Character polynomials for Bn Given a signed permutation σ, let Xr (σ) denote the number of positive r–cycles in its signed cycle type, and let Yr (σ)`be the number of negative r–cycles. Then Xr and Yr define class functions on the disjoint union n≥0 Bn . A character polynomial with coefficients in a ring k is a polynomial P ∈ k[X1 , Y1 , X2 , Y2 , . . .], in analogy to the character polynomials for the symmetric groups defined by MacDonald [Mac79, I.7 Example 14]. A character polynomial P restricts to a class function on Bn for every n ≥ 0; we denote its restriction by Pn . We define the degree of a character polynomial by setting deg(Xr ) = deg(Yr ) = r for all r ≥ 1. Let µ and λ be partitions, and let nr be the function on the set of partitions that takes a partition and outputs the number of parts of size r. The space of character polynomials is spanned by polynomials of the form    Y  Xr  Yr  X Y . Pµ,λ = := nr (µ) nr (λ) µ λ r≥1 When n = |λ| + |µ| the restriction of Pµ,λ to Bn is the indicator function for signed permutations of signed cycle type (λ, µ). 2.1.3 Classification of irreducible Bn –representations The irreducible complex representations of Bn are in natural bijection with double partitions of n, that is, ordered pairs of partitions (λ, µ) such that |λ| + |µ| = n. These irreducible representations are constructed from representations of the symmetric group Sn ; this construction is described (for example) in Geck–Pfeiffer [GP00]. From the canonical surjection Bn → Sn we can pull back representations of Sn to Bn . Let V(λ,∅) denote the irreducible Bn –representation pulled back from the Sn –representation associated to the partition λ of n. Let V(∅,(n)) denote the 1-dimensional representation of Bn where a signed permutation acts by 1 or −1 depending on whether it reverses an even or odd number of signs. Then for any partition µ of n we denote V(∅,µ) := V(µ,∅) ⊗C V(∅,(n)) . In general, for partitions λ of k and µ of m, we define the Bk+m –representation B V(λ,µ) := IndBk+m V ⊠ V(∅,µ) . k ×Bm (λ,∅) 7 R Jiménez Rolland J C H Wilson 2.2 The theory of FIW –modules For each double partition (λ, µ) the representation V(λ,µ) is distinct and irreducible, and this construction gives a complete list of irreducible complex Bn –representations. As with the symmetric group, each complex irreducible representation is defined over the rational numbers, and each representation is self-dual [GP00, Corollary 3.2.14]. 2.2 The theory of FIW –modules Church–Ellenberg–Farb [CEF15] introduced the theory of FI–modules to study sequences of representations of the symmetric groups Sn . FI denotes the category of finite sets and injective maps; an FI–module over a ring R is a functor from FI to the category of R–modules. Their results were generalized by the second author to sequences of representations of the classical Weyl groups in type B/C and D [Wil14, Wil15]. Definition 2.2. (The categories FI and FIBC ). Following Church–Ellenberg–Farb [CEF15], we let FI denote the category of finite sets and injective maps. We write n or [n] to denote the object {1, 2, . . . , n} and 0 := ∅. Following work of the second author [Wil14, Wil15], we let FIBC denote the type B/C analogue of FI; we may define FIBC to be the category where the objects are finite sets n := {1, 1, . . . , n, n}, and the morphisms are all injective maps f : m → n satisfying f (a) = f (a) for all a in m. Notably the endomorphisms End(n) of FI are the symmetric groups Sn , and the endomorphisms End(n) of FIBC are the hyperoctahedral groups Bn . We denote the families of Weyl groups Sn and Bn generically by Wn , and we denote the categories FI and FIBC generically by FIW . The following definitions appear in Church–Ellenberg–Farb [CEF15] and Wilson [Wil14]. Definition 2.3. ((Graded) FIW –modules and FIW –algebras). Fix Wn to denote either Sn or Bn . Let k be a ring, assumed commutative and with unit. An FIW –module V over k is a functor from FIW to the category of k–modules; its image is sequence of Wn –representations Vn := V (n) with actions of the FIW morphisms. A graded FIBC –module V ∗ over a ring k is a functor from FIBC to the category of graded k–modules; a graded FIW –algebra A∗ over k is a functor from FIW to the category of graded k–algebras. Each graded piece V d or Ad inherits an FIW –module structure. We will refer to d as the graded–degree and n as the FIW –degree of the k–module Vnd . Definition 2.4. (Finite generation; degree of generation; finite type). Let Wn denoted either the family of symmetric groups or the family of signed ` permutation groups. An FIW –module V is generated (as an FIW –module) by elements {vi } ⊆ n Vn if V is the smallest FIW –submodule containing elements. A graded FIW –algebra A∗ is generated (as an FIW –algebra) by the set ` those ∗ {vi } ⊆ n An if A is the smallest FIW –subalgebra containing {vi }. An FIW –module or FIW – algebra V is finitely generated if it has a finite generating set, and V is generated in FIW –degree ≤ m if it has a generating set vi ∈ Vmi such that mi ≤ m for all i. A graded FIW –module or algebra V ∗ has finite type if each graded piece V d is a finitely generated FIW –module. Definition 2.5. (Weight; slope). Church–Ellenberg–Farb defined an FI–module V over a subfield k of C to have weight ≤ m if for every n, every irreducible Sn –representation Vλ , λ = (λ1 , λ2 , . . . , λr ), occuring in Vn satisfies (n − λ1 ) ≤ m. Analogously an FIBC –module V over a subfield of C has weight ≤ m if for all n every irreudcible Bn –representation V(λ,µ) , λ = (λ1 , λ2 , . . . , λr ), satisfies (n − λ1 ) ≤ m. A graded FIW –module or algebra V ∗ has finite slope M if V d has weight at most dM . 8 R Jiménez Rolland J C H Wilson 2.2 The theory of FIW –modules FI– and FIBC –modules over k generated in degree at most m necessarily have weight at most m [CEF15, Proposition 2.3.5], [Wil14, Theorem 4.4]. Some of the early results on FI– and FIBC –modules concern the implications of finite generation for the structure of an FIW –module and its characters: over characteristic zero, a finitely generated FIW –module is uniformly representation stable in the sense of Church–Farb [CF13, Definition 2.3], and its characters are eventually polynomial. The following result was proved by Church–Ellenberg– Farb [CEF15] in type A and the second author [Wil14, Wil15] in types B/C and D. Theorem 2.6. (Constraints on finitely generated FIW –modules). Let V be an FIW –module over a subfield k of C which is finitely generated in degree ≤ m. • (Uniform representation stability)([CEF15, Theorem 1.13], [Wil14, Theorem 4.27]). The sequence Vn is uniformly representation stable with respect to the maps induced by the FIW –morphisms the natural inclusions In : n → (n + 1), stabilizing once n ≥ m + stabdeg(V ). In particular, in the decomposition of Vn into irreducible Wn –representations, the multiplicities of the irreducible representations are eventually independent of n in the sense of representation stability [CF13, Definition 2.3]. • (Character polynomials)([CEF15, Proposition 3.3.3 and Theorem 3.3.4], [Wil15, Theorem 4.6]). Let χn denote the character of the Wn –representation Vn . Then there exists a unique character polynomial FV of degree at most m such that FV (σ) = χn (σ) for all σ ∈ Wn , for all n sufficiently large. A major tool in the analysis of finitely generated FI– and FIBC –modules is their relationship to represented functors and their subfunctors. Definition 2.7. (The FIW –modules M (m)). We denote the represented FI or FIBC –module over k by     MBC (m) := k HomFIBC (m, −) M (m) := k HomFI (m, −)   The FI–module M (m)n ∼ = k HomFI (m, n) has k–basis Sn /Sn−m ∼ = {ei1 ,i2 ,...,im | (i1 , i2 , . . . , im ) is an ordered m–tuple of distinct positive elements of n} where the m–tuple (i1 , i2 , . . . , im ) encodes the image of the melements (1, 2, . . . m) under an FI– morphism m → n. Similarly, the FIBC –module MBC (m)n ∼ = k HomFIBC (m, n) has k–basis   (i1 , i2 , . . . , im ) is an ordered m–tuple of elements of n; ∼ e Bn /Bn−m = i1 ,i2 ,...,im at most one of a or a appears at most once where the m–tuple (i1 , i2 , . . . , im ) encodes the image of the m elements (1, 2, . . . m) under an FIBC – morphism m → n. By an orbit–stabilizer argument we have isomorphisms of Wn –representations     M (m)n ∼ MBC (m)n ∼ = k Sn /Sn−m = k Bn /Bn−m . We denote the functors M (m) and MBC (m) generically by MW (m). An FIW –module V over k is finitely generated in degree ≤ p if and only if it is a quotient of a finite direct sum of represented functors MW (m) with m ≤ p; see Church–Ellenberg–Farb [CEF15, Proposition 2.3.5] and Wilson [Wil14, Proposition 3.15]. 9 R Jiménez Rolland J C H Wilson 2.3 Asymptotics and asymptotic notation 2.3 Asymptotics and asymptotic notation The following terminology features in the results of Section 3 on asymptotic stability. Definition 2.8. (Asymptotic equivalence; asymptotic bounds; Big and little O notation). For functions f (d) and g(d), d ∈ Z≥0 , we say that f is asymptotically equivalent to g and write f ∼ g if lim d→∞ f (d) = 1. g(d) We say f is order o(g) if f (d) = 0. d→∞ g(d) lim We say that f is order O(g) or that f is asymptotically bounded by g if |f (d)| ≤ C|g(d)| for some constant C and all d sufficiently large. Note that the set of functions in O(g) are closed under linear combinations (though not products). Definition 2.9. (Subexponential growth). We say that a function f (d) is P subexponential if f is order 2o(d) . Notably, if f is subexponential in d and 0 ≤ r < 1 then the series d f (d)rd converges absolutely. A classical example: Proposition 2.10 (Hardy–Ramanujan [HR18], Uspensky [Usp20]). (Growth of partitions). The number P(n) of partitons of n satisfies P(n) ∼ √ 2n 1 √ eπ 3 . 4n 3 In particular P(n) is subexponential in n. 3 Asymptotic stability The main goal of this section is to prove Theorem 3.5, a general convergence result for FIW -algebras finitely generated in FIW -degrees 0 and 1. Using the terminology and notation from the previous section, Theorem B can be restated as Theorem 3.5 below. We collect first some preliminary combinatorial results in Section 3.1 to study the asymptotic behavior of FIW –modules and their character polynomials. We then use these results in Section 3.2 to obtain Theorem 3.5. 3.1 Asymptotics of character polynomials Each of the results Propositions 3.1, Lemma 3.2, and Lemma 3.4 mirrors a result proven by Church– Ellenberg–Farb [CEF14] in Type A, and their methods can generally be modified to give arguments in Type B/C. For the sake of completeness we briefly describe these proofs in the case of the hyperoctahedral groups. 10 R Jiménez Rolland J C H Wilson 3.1 Asymptotics of character polynomials Proposition 3.1. (Stability for inner products of character polynomials). Fix a family Wn to be Sn or Bn . Let k be a subfield of C. Let P, Q be two Wn character polynomials. Then the inner product hQn , Pn iWn is independent of n for n ≥ deg(P ) + deg(Q). Proof. This result was proved for Sn by Church–Ellenberg–Farb [CEF14, Proposition 3.9] and their proof adapts readily to type B/C; we briefly summarize this proof. Since hQn , Pn iBn = h1, Qn Pn iBn it suffices to check in the case when Q = 1 and P is the element    Y  Xr  Yr  X Y Pµ,λ = := µ nr (µ) nr (λ) λ r≥1 associated to two partitions µ and λ. Let d = |µ| + |λ|, and notice that deg(P ) = d. Let δλ,µ denote the indicator function for the conjugacy class (µ, λ) in Bd . Let Nµ,λ denote the size of the conjugacy class (µ, λ) in Bd . Then for n ≥ d,     X X Y 1 X ,1 = δλ,µ (σ|S∪S ) µ λ |Bn | Bn σ∈Bn S⊆[n],|S|=d where δλ,µ (σ|S∪S ) := 0 if S ∪ S is not stabilized by σ. So       X Y 1 n ,1 = Nµ,λ |Bn−d | µ λ |B | d n Bn Nµ,λ = d 2 d! Hence for n ≥ d = deg(P ) + deg(Q) this inner product is independent of n, as claimed. Lemma 3.2. (A convergence result for FIW –algebras of finite type and slope). Let Wn denote one of the families Sn or Bn . Let k be a subfield of C. Suppose that A∗ is a FIW –algebra over k of finite type and slope M . Then for each d and any Wn character polynomial P , the following limit exists: lim hPn , Adn iWn . n→∞ Proof. This result is proved in Type A by Church–Ellenberg–Farb; see the paragraph before [CEF14, Corollary 3.11]. Their argument carries over to Type B/C as follows. By assumption, for each fixed d the FIBC –module Adn is finitely generated and has weight at most dM . The second author proved that therefore for some Dd ∈ Z, the characters of the sequence {Adn }n are given by a character polynomial of degree at most dM for all n ≥ Dd [Wil15, Theorem 4.16]; see Theorem 2.6. By Proposition 3.1, then, the value hPn , Adn iBn is independent of n once n = max{Dd , dM + deg(P )}. This stable value gives the limit lim hPn , Adn iBn = hPN , AdN iBN , N = max{Dd , dM + deg(P )}. n→∞ Lemma 3.3. (A convergence result for finitely generated FIW –algebras). Let k be a subfield of C, and let Wn represent one of the families Sn or Bn . Suppose that A∗ is an associative FIW –algebra over k that is generated as an FIW –algebra by finitely many elements of positive graded-degree. Then for each d and any Wn character polynomial P , the following limit exists: lim hPn , Adn iWn . n→∞ 11 R Jiménez Rolland J C H Wilson 3.1 Asymptotics of character polynomials Proof. We first prove the result in type B/C. Let V be the graded FIBC –module additively generated by the generating set for the graded FIBC –algebra A∗ . By assumption on the generators V will be supported in finitely many positive degrees. By construction V has finite type, and by Wilson [Wil14, Theorem 4.4], V has finite slope. It follows that A∗ is a quotient of the free associative FIBC –algebra on V , ∞ M V ⊗j ; khV i := j=0 see [Wil14, Definition 5.9]. By [Wil14, Proposition 5.2], tensor products respect finite generation, and degree of generation is additive. Hence if we let M be the largest FIBC –degree of the generators of A∗ , the FIBC –module Ad is finitely generated in degree ≤ dM . Thus A∗ has finite type and finite slope M ; see [Wil14, Proposition 5.10]. By Lemma 3.2, the limit limn→∞ hP, Akn iBn exists. The proof for FI follows the same argument. The graded FI–algebra A∗ has finite type and slope by Church–Ellenberg–Farb [CEF15, Proposition 3.2.5 and Theorem 4.2.3]. The following result will be used in the proof of Theorem 3.5. Lemma 3.4. (On bounding growth of the graded pieces of FIW –algebras). Let Ad be the dth graded piece of a graded FIW –module over a subfield k of C. Let g(d) be a function. The following are equivalent: I. For each a ≥ 0 there is a function Fa (d) that independent of n and order O(g) such that   for all d and n. dimk (Adn )Wn−a ≤ Fa (d) II. For each Wn character polynomial P there is a function FP (d) that is independent of n and order O(g) such that for all d and n. |hPn , Adn iBn | ≤ FP (d) Proof. A special case of this result is the equivalence of the two conditions in [CEF14, Definition 3.12] for Sn ; although Church–Ellenberg–Farb only state the equivalence in Type A for the case that g is subexponential, their proof implies the result in Type A for general functions g. Their arguments may be adapted to the hyperoctahedral groups, and we summarize the proof in type B/C below. Let k denote the trivial Bn –representation. Assume (II) holds. By Frobenius reciprocity, d n dimk ((Adn )Bn−a ) = hk, ResB Bn−a An iBn−a d n = hIndB Bn−a k, An iBn = hk[Bn /Bn−a ], Adn iBn   X1 a , Adn iBn = h2 a! a ≤ F2a a!(X1 ) (d) a for all d and n. So (II) implies (I). Now assume (I) holds and consider any double partition λ of a and the associated Ba –representation Vλ with character χλ . The character of the induced representation n IndB Ba ×Bn−a Vλ ⊠ k 12 3.2 Convergence for subquotients of FIW -algebras generated in low degree is equal (for any n) to the character polynomial Y  Xr  Y  Yr  X χλ (α, β) := Pλ = nr (α) r nr (β) r (α,β) |α|+|β|=a X (α,β) |α|+|β|=a R Jiménez Rolland J C H Wilson    X Y χλ (α, β) . α β Here χλ (α, β) denotes the value of the character χλ on a signed permutation of signed cycle type (α, β). The character polynomials P λ are an additive basis for the space of hyperoctahedral character polynomials, and so it suffices to bound |hPnλ , Adn iBn |. Observe that dimk ((Adn )Bn−a ) ≥ hVλ , (Adn )Bn−a iBa d n = hVλ ⊠ k , ResB Ba ×Bn−a An iBa ×Bn−a d n = hIndB Ba ×Bn−a Vλ ⊠ k , An iBn = hPnλ , Adn iBn which gives the desired bound. 3.2 Convergence for subquotients of FIW -algebras generated in low degree The main result of this section is Theorem 3.5, which states that graded submodules of FIW – algebras finitely generated in FIW –degree at most 1 satisfy our desired convergence result. Theorem 3.5. (Criteria for convergent FIW –algebras). Let Wn denote one of the families Sn or Bn . For nonnegative integers b, c, define a graded FIW –module V ∼ = MW (0)⊕b ⊕ MW (1)⊕c over a subfield k of C with positive gradings. Let Γ∗ denote the free symmetric, exterior, or graded–commutative FIW –algebra generated by V . Let A∗ be any FIW –algebra subquotient of Γ∗ . Then for any character polynomial P and q > 1 the following sum converges absolutely ∞ X limn→∞ hPn , Ad iW n d=0 qd n . More generally, this sum will converge absolutely for any collection of Wn –representations {Adn | d, n ≥ 0} such that Adn is a Wn –equivariant subquotient of Γdn . We assume that the gradings on the algebra generators MW (0)⊕b ⊕ MW (1)⊕c are Wn –invariant. We will use Theorem 3.5 to show convergence for coinvariant algebras in Proposition 4.4, and to obtain Theorem 4.3 on stability for statistics on maximal tori. The proof of Theorem 3.5 will use the following result on the asymptotics of enumerating coloured partitions. Proposition 3.6 generalizes the result that partitions of n grow subexponentitally in n (see Proposition 2.10). Proposition 3.6. For integers N and C, let T (N, C) denote the number of ways that N balls may be first each coloured by one of C colours, and then partitioned into any number of multisets. Balls of the same colour are indistinguishable. For every fixed C the sequence T (N, C) grows subexponentially in N . For example, T (3, 2) = 14, corresponding to the 14 coloured partitions {•, •, •}, {•, •, ◦}, {•, ◦, ◦}, {◦, ◦, ◦}, {•, •} ∪ {•}, {•, •} ∪ {◦}, {•, ◦} ∪ {•}, {•, ◦} ∪ {◦}, {◦, ◦} ∪ {•}, {◦, ◦} ∪ {◦}, {•} ∪ {•} ∪ {•}, {•} ∪ {•} ∪ {◦}, {•} ∪ {◦} ∪ {◦}, {◦} ∪ {◦} ∪ {◦}. 13 3.2 Convergence for subquotients of FIW -algebras generated in low degree R Jiménez Rolland J C H Wilson Proof. Suppose throughout that C is fixed. We will create a code with a codeword recording each partition of N balls coloured with C colours. To verify that T (N, C) is subexponential in N , it suffices to check that the maximal length of these codewords is sublinear in N . Consider a partition P = {P1 , P2 , . . . , Pℓ } of N coloured balls. We will create a distinct coding scheme for (i) the “small” parts Pi containing at most s := (log N )2 balls, and (ii) the “large” parts with more than s balls.  (i) (Small parts). There are s+C possible sets of at most s balls coloured by C colours (this is C the equal to the number of monomials of C variables of degree at most s). Each of these sets appears as a part Pi in our  coloured partition P at most N times. We can then encode these s+C sets by an ordered C –tuple of integers from 0 to N , each recording the number of times the corresponding set appears in P . The number of characters needed to encode this tuple is asymptotically bounded in N by the function   s+C (log N ) C < (s + C)C (log N ) = ((log N )2 + C)C (log N ). (ii) (Large parts). There are fewer than Ns parts Pi in P with cardinality strictly greater than s. For each of these parts, we record an ordered C–tuple of integers from 0 to N encoding the number of balls of each given colour in that part. The total number of characters needed to do this is asymptotically bounded by   N CN C (log N ) = s (log N ) Combining (i) and (ii) we find that the maximal length of a codeword is asymptotically bounded by  (log N )2 + C C (log N ) + CN . log N We conclude that log(T (N, C)) grows sublinearly in N , and so T (N, C) is subexponential in N as claimed. Having established a bound on the growth of T (N, C), we now need one final result in order to prove Theorem 3.5. Lemma 3.7. Let Wn denote one of the families Sn or Bn . For nonnegative integers b, c, define a graded FIW –module V ∼ = MW (0)⊕b ⊕ MW (1)⊕c over a subfield k of C with positive gradings. Let Γ∗ denote the free symmetric, exterior, or graded–commutative FIW –algebra generated by V . Let A∗ be any FIW –algebra subquotient of Γ∗ . Then for each a ≥ 0 there is a function Fa (d) that is independent of n and subexponential in d so that  dimk (Adn )Bn−a ≤ Fa (d) for all n and d. 14 3.2 Convergence for subquotients of FIW -algebras generated in low degree R Jiménez Rolland J C H Wilson It follows that, for any Wn character polynomial P , there exists a function FP (d) independent of n and subexponential in d such that |hPn , Adn iWn | ≤ FP (d). More generally, if {Adn | d, n ≥ 0} is any collection of Wn –representations such that Adn is an Wn – equivariant subquotient of Γdn , then there exists a function FP (d) as above. Proof. The proof in Types A and B/C are extremely similar; we describe the proof in detail for the hyperoctahedral groups and then briefly outline how to adapt the proof to the symmetric groups. By Lemma 3.4 it suffices to show the first statement: for each a ≥ 0 there is a function Fa (d) that is independent of n and subexponential in d so that  dimk (Adn )Bn−a ≤ Fa (d) for all n and d. Fix a ≥ 0. By assumption Adn is a Wn –subquotient of the Wn –representation Γdn . Since taking Bn−a –invariants is exact in characteristic zero, the graded algebra (A∗n )Bn−a is a subquotient of (Γ∗n )Bn−a . It suffices then to find a function Fa (d) that is independent of n and subexponential in d so that  for all n and d. dimk (Γdn )Bn−a ≤ Fa (d) The monomials of Γdn are (graded– or anti–) commutative words in the (b + 2nc) variables y (1) , y (2) , . . . , y (b) (1) (1) (1) (1) ∈ MBC (0)⊕b n (1) (c) (c) and (c) (c) x1 , x1 , x2 , x2 , . . . , x(1) n , xn , . . . . . . , x1 , x1 , . . . , xn xn ∈ MBC (1)⊕c n . By assumption each variable has positive graded-degree, so the degree-d monomials must have length at most d. The subgroup Bn−a acts on these monomials diagonally by signed permutations on the subscript indices {a + 1, a + 1, . . . , n, n}. Superscripts are fixed. To bound the number of Bn−a orbits of monomials, we will in fact bound the (larger) number of Sn−a orbits; Sn−a acts by permuting the set {a + 1, . . . , n} and simultaneously permuting the set {a + 1, . . . , n}. We can classify Sn−a –orbits of these monomials as follows: Each monomial contains a (possibly empty) subword in the (b + 2ac) variables y (1) , y (2) , . . . , y (b) (1) (1) (1) (1) ∈ MBC (0)⊕b n (c) (1) (c) and (c) (c) ∈ MBC (1)⊕c x1 , x1 , x2 , x2 , . . . , x(1) n a , xa , . . . . . . , x1 , x1 , . . . , xa xa  There are (b+2ac)+d monomials of length at most d in the first (b + 2ac) variables. For fixed a, b, c (b+2ac) this formula grows polynomially in d. (j) Now, consider each of the remaining variables xi to be ’coloured’ by one of the (2c) symbols (j) (j) x+ or x− , where the sign represents whether i is positive or negative, for j = 1, . . . , c. Next we partition these coloured variables into multisets with one set for each subscript i. The action of Sn−a preserves this decomposition. Concretely, for example, if a = 2 then the Sn−a –orbit of the monomial  3 2 2  2  3   (3) (5) (3) (4) (1) (1) (4) (3) (4) (2) (2) (1) (3) x5 x5 x3 x3 x4 x2 x2 x3 x3 x6 x8 x8 y (2) y (4) y (5) x1 15 3.2 Convergence for subquotients of FIW -algebras generated in low degree would be represented by the monomial y (2) (2) (4) (4) (3) (4) (1) (1) (1) 3 R Jiménez Rolland J C H Wilson  2 (1) (3) (4) y (4) y (5) x1 x2 x2 and the coloured partition (5) (3) (3) (2) (1) (3) {x+ , x+ , x+ , x− , x− } ∪ {x+ , x+ , x+ } ∪ {x+ , x− , x− } ∪ {x− } ∪ {x+ , x+ }. Given monomials of N variables, the number of coloured partitions we may obtain in this fashion is, in the notation of Proposition 3.6, T (N, 2c), which we proved in Proposition 3.6 grows subexponentially in N for each fixed c. To get an upper bound for the number of Bn−a –orbits for the monomials in Γ∗ of degree d, we will bound the number of Bn−a –orbit of monomials in at most d variables. Some of these monomials will have degree less than d. If some variables anticommute, then some monomials will be zero in Γd and some monomials will vanish on passing to coinvariants, so we obtain a strict overcount. # of Bn−a –orbits of monomials in at most d variables  X  # degree j monomials   # Bn−a -orbits of degree k = (c) monomials in remaining variables in y (1) , . . . , xa j,k j+k≤d        X # degree j monomials  # Bn−a -orbits of degree d   ≤ (c)  monomials in remaining variables in y (1) , . . . , xa j,k j+k≤d   (b + 2ac) + d ≤ T (d, 2c) (b + 2ac) We thus obtain a bound that (for constant a, b, c) is independent of n and subexponential in d. The proof in the case of the symmetric group is similar and slightly simpler: our Sn−a orbits may be represented by a submonomial in the (b + ac) variables y (1) , y (2) , . . . , y (b) (1) ∈ M (0)⊕b n (c) (1) (c) (c) x1 , x2 , . . . , x(1) a , . . . . . . , x1 , x2 . . . , xa and ∈ M (1)n⊕c and a partition that is coloured by the c colours j = 1, 2, . . . c. We obtain an asymptotic bound   (b + ac) + d T (d, c) (b + ac) that is independent of n and subexponential in d. Proof of Theorem 3.5. By Lemma 3.3, the limit in the numerator limn→∞ hPn , Adn iWn exists for every d and moreover equals hPN , AdN iWN for N sufficiently large. By Lemma 3.7, there exist a function FP (d) subexponential in d such that | lim hPn , Adn iWn | ≤ FP (d). n→∞ It follows that the sum X limn→∞ hPn , Ad iW n d=0 converges absolutely. qd 16 n R Jiménez Rolland J C H Wilson Point counts for maximal tori in type B and C op Remark 3.8. (Convergence for graded FIW –algebras generated in low degree). Recall the FIW – op module V ∼ = MW (0)⊕b ⊕ MW (1)⊕c of Theorem 3.5. The module V has a natural FIW –module structure defined (in the notation of Definition 2.7) by the maps MW (1)n+1 −→ MW (1)n  ei , |i| = 1, . . . , n ei 7−→ 0, |i| = n + 1. and the isomorphisms MW (0)n+1 ∼ = MW (0)n . (See Church–Ellenberg–Farb [CEF15, Section 4.1] op and Wilson [Wil15, Section 3] for details on the structure of simultaneous FIW and FIW –modules.) op These maps endow Γ∗ with the structure of an FIW –algebra. Since Wn –representations are selfdual, the representations Γ∗n are isomorphic whether viewed as representations of EndFIW (n) ∼ = op Wn or EndFIop (n) ∼ Wn . If A is any FIW –algebra subquotient of Γ∗ , then in particular the bigraded = W piece Adn is a subquotient of Γdn , and Theorem 3.5 applies: for any character polynomial P and q > 1 the following sum converges absolutely ∞ X limn→∞ hPn , Ad iW n d=0 qd n . Remark 3.9. After circulating a preprint of this paper we discovered that in [FW, Theorem 3.2 and Corollary 3.3], Farb and Wolfson prove a result which is closely related to our Theorem 3.5. Theorem 3.10 ([FW, Theorem 3.2 and Corollary 3.3]). Let X be a connected space such that dimH ∗ (X; Q) < ∞. Then there exist constants K, L > 0 so that for each i ≥ 0, and for all n ≥ 1, the Betti numbers of the n-fold symmetric product of X are bounded subexponentially: √ dimH i (Symn (X); Q) < KeL i . For each 0 ≤ a ≤ n exist constants K, L > 0 so that for each i ≥ 0, and for all n ≥ 1, the coinvariants of the cohomology of X n are bounded subexponentially:   √ dim H i (X n ; Q)Sn−a < KeL i . Farb–Wolfson use methods that are quite different from those of Theorem 3.5: their proof uses a result of Macdonald on the Poincaré polynomial of symmetric products [Mac62], and an analysis of this generating functions drawing on complex analysis. It should be possible to deduce the subexponential growth of the Betti numbers and their coinvariants in Theorem 3.10 from Theorem 3.5 and its proof; it would take additional work to conclude their precise asymptotic formulas. Conversely, by applying Theorem 3.10 with appropriately chosen spaces X and using the Künneth Formula, it should be possible to deduce Theorem 3.5 in the case of graded-commutative algebras in type A. With some additional work it should be possible to leverage these results to give an alternate route to proving Theorem 3.5 in all cases. 4 Point counts for maximal tori in type B and C In this section we obtain the type B and C analogues of [CEF15, Theorem 5.6], a convergence result for certain statistics on tori in GLn (Fq ). We combine a theorem of Lehrer with representation 17 R Jiménez Rolland J C H Wilson 4.1 Maximal tori in types B and C stability results of the second author and our discussion in Section 3 to compute asymptotic counts for Frq -stable maximal tori for the symplectic and special orthogonal groups. 4.1 Maximal tori in types B and C Let k be an algebraically closed field. We denote by G one of the following two semisimple connected linear algebraic groups defined over k: the symplectic group Sp2n (type C) or the special orthogonal group SO2n+1 (type B). In the discussion below we identify the algebraic group G with its set of k-rational points G(k). Recall that the symplectic group is the algebraic group defined over k by Sp2n (k) = {A ∈ GL2n (k) : AT JA = J},   0 In is the matrix associated to the standard symplectic form where J = −In 0 ω(~u, ~v ) = u1 vn+1 + . . . + un v2n − un+1 v1 − . . . − u2n vn , for ~u, ~v ∈ k2n . The special orthogonal group is defined as  1 0 where Q =  0 0 0 In SO2n+1 (k) = {A ∈ SL2n+1 (k) : AT QA = Q},  0 In  is the matrix associated to the quadratic form of Witt index n 0 q(u0 , u1 , . . . , u2n ) = u20 + u1 un+1 + . . . + un u2n , for (u0 , u1 , . . . , u2n ) ∈ k2n+1 . A subgroup of G is called a torus if it is k-isomorphic to a product of multiplicative groups Gm := GL1 . For instance, we define standard maximal tori T0 to be the diagonal subgroups  × −1 ⊆ Sp2n (k) T0 := diag(λ1 , . . . , λn , λ−1 1 , . . . , λn ) : λi ∈ k and  × −1 ⊆ SO2n+1 (k). T0 := diag(1, λ1 , . . . , λn , λ−1 1 , . . . , λn ) : λi ∈ k In both cases, the maximal torus T0 has dimension n. Let T denote the set of maximal tori of G. Since all maximal tori in G are conjugate ([Sri79, Proposition 1.1]), the action of G on T by conjugation is transitive and T ∼ = G/N (T0 ), where N (T0 ) is the normalizer of the torus T0 . In type B and C, the Weyl group W (T0 ) := N (T0 )/T0 is isomorphic to the hyperoctahedral group Bn . The group Bn acts on matrices in T0 by conjugation by permuting the n eigenvalues λ1 , . . . , λn and transposing the inverse pairs λi and λ−1 i . 4.1.1 The action of Frobenius Let q be an integral power of a prime p and let k = Fp . The standard Frobenius morphism Frq acts on a matrix (xij ) ∈ G = G(Fq ) by Frq : (xij ) 7→ (xqij ). The set of fixed points GFrq := {g ∈ G : Frq (g) = g} corresponds to the Fq -points G(Fq ) of G: the finite groups Sp2n (Fq ) and SO2n+1 (Fq ). A maximal torus of GFrq is a subgroup of G(Fq ) of the form T Frq = {g ∈ T : Frq (g) = g} for some Frq -stable maximal torus T of G. In particular, since T0 is Frq -stable, 18 R Jiménez Rolland J C H Wilson 4.1 Maximal tori in types B and C Frq T0 and Frq T0  −1 × is a maximal torus of Sp2n (Fq ) = diag(λ1 , . . . , λn , λ−1 1 , . . . , λn ) : λi ∈ Fq  −1 × is a maximal torus of SO2n+1 (Fq ). = diag(1, λ1 , . . . , λn , λ−1 1 , . . . , λn ) : λi ∈ Fq Other examples of Frq -stable maximal tori in Sp2 (Fp ) are given in Example 4.1 below. An Frq -stable torus of G is defined over Fq . We say that such a torus T splits over Fq if T is Fq -isomorphic to a product of multiplicative groups Gm . There is always a finite Galois extension of Fq over which a given torus becomes diagonalizable, hence a split torus. The maximal torus T0 above splits over Fq (or any field) and the group G is said to be a split algebraic group. We will investigate statistics on the set T Frq of Frq -stable maximal tori of G. For an introduction to split reductive groups and maximal tori we refer the reader to [Mil12, Chapter I] and [Car93, Chapters 1 & 3]. See also Niemeyer–Praeger [NP10, Section 3] for a description of the maximal tori in finite classical groups GFrq of Lie type. 4.1.2 Frq -stable maximal tori and characters of the Weyl group The G(Fq )-conjugacy classes in T Frq correspond to conjugacy classes in the Weyl group Bn . Lehrer observed that this implies that, in principle, functions which are defined on Frq -stable maximal tori (for instance, functions which count rational tori) may be described in terms of the character theory of Bn . This correspondence between G(Fq )-conjugacy classes in T Frq and conjugacy classes in Bn is defined as follows. Consider a torus T ∈ T Frq , so T = gT0 g −1 for some g ∈ G . Since gT0 g −1 = T = Frq (T ) = Frq (g)Frq (T0 )Frq (g)−1 = Frq (g)T0 Frq (g)−1  it follows that g −1 ·Frq (g) ∈ N (T0 ). We denote by wT the element in the Weyl group W (T0 ) ∼ = Bn that is given by the projection of w̃T = g −1 · Frq (g) onto the quotient W (T0 ) = N (T0 )/T0 . Since G is split, it turns out that each Frq -stable maximal torus determines a conjugacy class in the Weyl group Bn ([Car93, Proposition 3.3.2]). Hence, given a class function χ on Bn , we can regard χ as a function on Frq -stable maximal tori of G, by defining χ(T ) := χ(wT ), for T ∈ T Fq . This correspondence between conjugacy classes of tori and conjugacy classes in the Weyl group is illustrated in Example 4.1 for Sp2 (Fp ). Example 4.1. (Frq -stable maximal tori of Sp2 ). For the algebraic group Sp2 (Fp ) = SL2 (Fp ), the Frq -stable maximal torus    × λ1 0 F T0 = λ ∈ p 1 0 λ1−1   1 0 is a split torus corresponding to the identity coset T0 in the Weyl group W (T0 ), that is, 0 1 the identity element of the Weyl group B1 . On the other hand, given an element ǫ ∈ F× q which is not a square in Fq , consider the abelian subgroup of SL2 (Fp )    x y Tǫ = x, y ∈ Fp , x2 − ǫy 2 = 1 . ǫy x 19 R Jiménez Rolland J C H Wilson 4.1 Maximal tori in types B and C Choose a square root √ ǫ ∈ Fp of ǫ. If we take g = g −1 ·  x ǫy y x  ·g =  1 √ 2 ǫ  √1 ǫ √ x+y ǫ 0 −1 √ ǫ  ∈ SL2 (Fp ), then 0√ x−y ǫ  , therefore g −1 Tǫ g = T0 and Tǫ is a Frq -stable maximal torus. The matrix     √ 1 ǫ 1 1 −1 0 −1 −1 √ √ = √ w̃Tǫ = g · Frq (g) = √ −1 0 2 ǫ − ǫ 1 − ǫ − ǫ   0 1 projects to the coset T0 in the Weyl group W (T0 ). Hence wTǫ is the negative 1-cycle 1 0 (1 1) ∈ B1 . 4.1.3 The coinvariant algebra and statistics on maximal tori There is a beautiful connection between the conjugacy-invariant functions χ(T ) on the maximal tori of G defined over Fq , and the topological structure of certain complex varieties related to G(C). We now describe the complex cohomology algebra of these varieties, the generalized complete complex flag manifolds in type B and C. Let V ∼ = Cn denote the canonical complex representation of the hyperoctahedral group Bn by signed permutation matrices. Then the symmetric powers Sym(V ) are isomorphic to C[x1 , . . . , xn ], and we denote by In the homogeneous ideal generated by the Bn –invariant polynomials with constant term zero. The complex type B/C coinvariant algebra is defined as Rn ∼ = C[x1 , . . . , xn ]/In Let Rnd denote the dth graded piece of Rn . Borel [Bor53] proves that Rn∗ is isomorphic as a graded C[Bn ]-algebra to the cohomology of the generalized complete complex flag manifolds in type B and C. The cohomology groups are supported in even cohomological degree; this isomorphism multiplies the grading by 2. We recall the definition of these varieties: in type B, let BB n be a Borel subgroup of SO2n+1 (C). Then the associated generalized flag manifold is 2n+1 SO2n+1 (C)/BB | dimC Vm = m, q(Vi , V2n+1−i ) = 0}, n = {0 ⊆ V1 ⊆ . . . ⊆ V2n+1 = C the variety of complete flags equal to their orthogonal complements. In type C, take a Borel subgroup BC n of Sp2n (C). The associated generalized flag manifold is 2n Sp2n (C)/BC n = {0 ⊆ V1 ⊆ . . . ⊆ V2n = C | dimC Vm = m, ω(Vi , V2n−i ) = 0}, the variety of complete flags equal to their symplectic complements. A result of Lehrer [Leh92, Corollary 1.10’] relates the characters of Rnd to the space of maximal tori. In the case of the split reductive groups Sp2n and SO2n+1 defined over Fp with 2n2 roots, Lehrer’s result specializes to the following formula. 20 R Jiménez Rolland J C H Wilson 4.1 Maximal tori in types B and C Theorem 4.2 (Corollary 1.10’ [Leh92]). Let q be an integral power of a prime p and let G be the linear algebraic group Sp2n (Fp ) or SO2n+1 (Fp ). If χ is a class function on Bn , then X T ∈T 2 χ(T ) = q 2n Frq X q −d χ, Rnd Bn , (1) d≥0 where T Frq is the set of Frq -stable maximal tori of G and Rnd is the dth -graded piece of the complex coinvariant algebra Rn in type B/C. We remark that, in this formula, Rnd is generated in graded degree d = 1, and not (as with the cohomology algebra) supported only in even degrees. Formula (1) in Theorem 4.2 describes a deep relationship between the maximal tori over finite fields and the cohomology of the topological spaces related to G(C); with these results we will (in Sections 4.2 and 4.3) relate representation-theoretic stability results on the coinvariant algebras to stability results for point-counts on our varieties over finite fields. 4.1.4 Character polynomials and interpreting statistics When χ is a character polynomial, the left-hand side of Formula (1) is, in a sense, quantifying the numbers and decompositions of maximal tori over Fq . To make this precise, we first consider the statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) that correspond to the class functions Xr and Yr . Let T ∈ T Frq as before with T0 = g −1 T g for g ∈ G. Consider the ordered set of eigenvectors v1 , . . . , vn , v 1 , . . . , v n of T given by the columns of g. Since T is defined over Fq , the Frobenius 2n morphism Frq takes eigenvectors to eigenvectors. Then Frq acts on the set of lines in Fq LT = {L1 , . . . , Ln , L1 , . . . , Ln } where Li := spanFq (vi ) and Li := spanFq (v i ). Moreover, since Frq (g) = g w̃T , the Frobenius morphism acts on LT by the element wT ∈ Bn that permutes the lines Li and swaps pairs Li /Li . Let T ∈ T Fq . For each positive or negative r-cycle of wT , we can consider its corresponding support {Li1 , . . . , Lir , Li1 , . . . , Lir } in LT and the subtorus of T0  × −1 . T0r := diag(1, . . . λi1 , . . . , λir , . . . , 1, 1, . . . λ−1 i1 , . . . , λir , . . . , 1) : λij ∈ Fq Then Tr := gT0r g −1 is an Frq -stable r-dimensional subtorus of T irreducible over Fq . A torus defined over a field k is irreducible if it is not isomorphic over k to a product of tori. Furthermore: • If the orbit {Li1 , . . . , Lir , Li1 , . . . , Lir } corresponds to a positive r-cycle of wT , then (Frq )r = Frqr fixes each Lij and each Lij . This means that there is a matrix gr with entries in Fqr such that gr−1 Tr gr = T0r and the subtorus Tr splits over Fqr . • If the orbit {Li1 , . . . , Lir , Li1 , . . . , Lir } corresponds to a negative r-cycle of wT , then (Frq )r = Frqr swaps the lines Lij and Lij . This implies that no matrix gr with entries in Fqr diagonalizes the subtorus Tr and hence Tr does not split over Fqr . 21 R Jiménez Rolland J C H Wilson 4.2 Asymptotic results Therefore, if T ∈ T Fq , for r ≥ 1 the polynomial characters Xr (T ) and Yr (T ) count the following: Xr (T ) is the number of r-dimensional Frq -stable subtori of T irreducible over Fq that split over Fqr , Yr (T ) is the number of r-dimensional Frq -stable subtori of T irreducible over Fq that do not split over Fqr . Example 4.1 continued (Statistics for maximal tori in Sp2 ). Recall the maximual torus Tǫ ∈ Sp2 (Fp ) from Example 4.1:    x y 2 2 Tǫ = x, y ∈ Fp , x − ǫy = 1 , ǫy x   1 −1 1 √ √ √ in Sp2 (Fp ), and is invariant under the The torus Tǫ is diagonalized by the matrix 2 ǫ ǫ ǫ action of Frobenius. It corresponds to the nontrivial conjugacy class wTǫ = (1 1) ∈ B1 . The Frobenius morphism Frq acts by transposing the eigenspaces     −1 √1 √ and L1 = spanFp . L1 = spanFp ǫ ǫ Correspondingly, no matrix that diagonalizes Tǫ can have entries in Fq . The one–dimensional torus Tǫ is irreducible and does not split over Fq . This is consistent with its statistics X1 (Tǫ ) = X1 ((1 1)) = 0 4.2 and Y1 (Tǫ ) = Y1 ((1 1)) = 1. Asymptotic results In this section we prove Theorem 4.3, a stability result for asymptotic polynomial statistics on Frq -stable maximal tori of the symplectic and special orthogonal groups. Theorem 4.3 (Stability of maximal tori statistics). Let q be an integral power of a prime p. For n ≥ 1, Fr d denote denote by Tn q the set of Frq -stable maximal tori for either Sp2n (Fp ) or SO2n+1 (Fp ). Let Rm th ∗ the d -graded piece of the complex coinvariant algebra Rm in type B/C. If P ∈ C[X1 , Y1 , X2 , Y2 , . . .] is 2 P any hyperoctahedral character polynomial, then the normalized statistic q −2n Fr P (T ) converges as T ∈Tn q n → ∞. In fact, ∞ d X X 2 limm→∞ hPm , Rm iBm lim q −2n P (T ) = , d n→∞ q Frq T ∈Tn d=0 and the series in the right hand converges. To prove this theorem we first establish a convergence result for characters of coinvariant algebras of type B/C. Let Cn∗ denote the complex polynomial algebra C[x1 , . . . , xn ] on n variables, with generators xi in graded degree d = 1. These polynomial rings form a complex FIBC –algebra under the natural ∗ inclusions Cn∗ ֒→ Cn+1 , which is generated as an FIBC –algebra in FIBC –degree n = 1 by C11 = hx1 i. 22 R Jiménez Rolland J C H Wilson 4.2 Asymptotic results Our sequence of algebras is then generated by the FIBC –module of canonical signed permutation representations, C•1 ∼ = MBC (∅, )• := MBC (1)• ⊗C[B1 ] V(∅, ) ∼ = hx1 , . . . , x• i. The coinvariant algebra Rn∗ ∼ = Cn∗ /In does not admit an FIBC –module structure; the FIBC –module structure on the polynomial rings Cn∗ does not respect the ideals In . Instead, the coinvariant algeop bras are C–algebras over FIBC , induced by the maps ∗ Cn+1 −→ Cn∗  xi , i = 1, . . . , n xi 7−→ 0, i = n + 1. cd of each graded piece do form finitely generated sub– The reader may verify that the duals R • d cd ∼ FIBC –modules of the dual modules C • = C• ; see work of the second author [Wil14, Definition 5.14, Proposition 5.15, and Section 6] for details. For the following result, however, we do not need this FIBC –module structure; we only need the observation that for each n and d, the Bn – representation Rnd is a subquotient of the homogeneous polynomial space Cnd . Proposition 4.4. Let Rnd the dth –graded piece of the complex type B/C coinvariant algebra Rn . Then for any hyperoctahedral character polynomial P ∈ C[X1 , Y1 , X2 , Y2 , . . .] the following sum converges absolutely. ∞ X limn→∞ hPn , Rd iB n qd d=0 n . op Proof. We have observed that Rn∗ is an FIBC –algebra quotient of the free graded-commutative algebra C ∗ on MBC (∅, )• := MBC (1)• ⊗C[B1 ] V(∅, ) The FIBC –module MBC (∅, )• is, in the notation of Definition 2.7, the submodule of MBC (1) on the generators xi := ei − ei . By Remark 3.8, the result follows from Theorem 3.5. Remark 4.5. This result was proved by Church–Ellenberg–Farb in type A [CEF14, Theorem 5.6] using in part work of Chevalley [Che55] on the structure of the type A coinvariant algebra. Our Theorem 3.5 allows for a combinatorial proof of [CEF14, Theorem 5.6] using only the fact that the coinvariant algebras are quotient of the dual of the free commutative FI–algebra C[x1 , x2 , . . . , xn ] generated by M (1)n = hx1 , x2 , . . . , xn i. This proof demonstrates that this convergence theorem does not depend on any deeper structural features of the coinvariant algebra. Remark 4.6. Work of the second author [Wil14, Theorem 6.1 and Corollary 6.3] observes that, for cd dual to Rd assemble to form a finitely genereach graded–degree d, the Bn –representations R n n cd , a submodule of the sequence of homogenous polynomials C cd . The FIBC – ated FIBC –module R • • c c d d module C• , and hence R• , has weight at most d. Hence for each d there is some Dd ∈ Z such cd are given by a character polynomial of degree ≤ d for all n ≥ Dd [Wil15, that the characters of R • Theorem 4.16]. Since Bn –representations are self-dual, there is an isomorphism of representations d d cd ∼ R n = Rn , and this character polynomial gives the characters of Rn for all n ≥ Dd . It follows from Proposition 3.1 that d lim hPm , Rm iBm = hPn , Rnd iBn , for any n ≥ max{Dd , d + deg(P )}. m→∞ 23 4.3 Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) R Jiménez Rolland J C H Wilson Proof of Theorem 4.3. We adapt the arguments given by Church–Ellenberg–Farb [CEF14, Theorem 3.13]. From Lemma 3.7, there exist a function FP (d) independent of n and subexponential in d such that |hPn , Rnd iBn | ≤ FP (d) for all n. Then d lim hPm , Rm iBm ≤ FP (d). m→∞ Let ǫ > 0. The series X FP (d) d≥0 qd converges absolutely, so there exist some I ∈ N such that X FP (d) < ǫ/2. qd d≥I+1 Using the notation from Remark 4.6, we choose N = max{D1 , D2 , . . . , DI , I + deg(P )}. Then d lim hPm , Rm iBm = hPn , Rnd iBn m→∞ From Proposition 4.4, the series for d ≤ I and n≥ N . ∞ d X limm→∞ hPm , Rm iBm qd d=0 converges to a limit L < ∞. On the other hand, by Theorem 4.2, we have that 2 q −2n X P (T ) = Frq X hPn , Rd iB n d≥0 T ∈Tn qd n . Therefore, if n ≥ N 2 L − q −2n X X limm→∞ hPm , Rd iB − hPn , Rd iB n n m m qd P (T ) = Frq d≥I+1 T ∈Tn ≤ d≥I+1 <ǫ 4.3 X FP (d) + FP (d) qd Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) In this section we compute some examples of statistics of the form given in Theorem 4.3. We use a result on the decomposition of the coinvariant algebra Rn∗ as a Bn –representation; see Stembridge [Ste89, Formula (2.2), Theorem 5.3], analogous to the approach taken by Church–Ellenberg–Farb [CEF14, Theorems 5.8, 5.9, and 5.10]. These computations could also be accomplished with generating functions, using the approach of Fulman [Ful16] in type A. 24 4.3 Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) R Jiménez Rolland J C H Wilson Decomposing the Bn –representation Rnd . The decomposition of the graded pieces Rnd into irreducible Bn –representations is described by Stembridge [Ste89] in terms of their relationships to data called the fake degrees of Bn . Given a double partition λ = (λ+ , λ− ) of n, the multiplicity of irreducible representation Vλ in Rnd is computed by the following formula. A double standard tableau of shape λ is a bijective labelling of the Young diagrams λ+ and λ− with the digits 1 through n, such that the numbers are strictly increasing in each row and column. Define the flag descent set D(T ) of a double standard tableau T as follows: draw the tableaux of shape λ+ and λ− in the plane, with the tableau of shape λ− placed above and to the right of tableau of shape λ+ . Then D(T ) = { j | (j + 1) appears in a row below j }. and the flag major index of the double standard tableau T is the quantity   X j  + |λ− |. f (T ) = 2  j∈D(T ) Then the multiplicity of the irreducible representation Vλ in the dth -graded piece of the coinvariant algebra Rnd is given by the number of standard double tableaux of shape λ and flag major index d. Theorem 4.7 (See Stembridge [Ste89] Formula (2.2), Theorem 5.3). hRnd , Vλ iBn = # { T | T standard double tableau of shape λ with f (T ) = d }. We can use Theorem 4.7 to compute some examples of the normalized statistics for maximal tori whose convergence is guaranteed by Theorem 4.3. A formula identifying stable sequences of irreducible Bn –representations Vλ with a character polynomial P is given in Wilson [Wil15, Theorem 4.11]. Some stable multiplicities that we compute below, using Theorem 4.7, are summarized in Table 3. Dots represent zero. Our first computation is a classical result due to Steinberg (see [Ste68, Corollary 14.16]). Theorem 4.8 (Number of Frq -stable maximal tori). The number of Frq -stable maximal tori of Sp2n (Fq ) 2 and of SO2n+1 (Fq ) is q 2n . Proof. We can compute the number of Frq -stable maximal tori using Theorem 4.2 by taking χ to be the trivial class function on Bn . The sequence of trivial representations are given by the character ! n z }| { polynomial χ = 1, and are encoded by the double partition λ = · · · , ∅ . The single double standard tableau of shape λ is  2 1 T = 3 ··· n  , ∅ which has descent set D(T ) = ∅ and flag major index f (T ) = 0. Thus by Theorem 4.7 the trivial representation appears with multiplicity one in degree 0 and does not occur in positive degree. 25 R Jiménez Rolland J C H Wilson 4.3 Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) Table 3: Some stable multiplicities of irreducible Bn –representations in the coinvariant alegebra Irreducible Bn representation Hyperocthahedral character polynomial d=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 V ((n), ∅) 1 1 · · · · · · · · · · · · · · · V ((n − 1), (1)) X1 − Y1 · 1 · 1 · 1 · 1 · 1 · 1 · 1 · 1 X1 + Y1 − 1 · · 1 · 1 · 1 · 1 · 1 · 1 · 1 · · · 1 · 1 · 2 · 2 · 3 · 3 · 4 · · · · · 1 · 1 · 2 · 2 · 3 · 3 · · · · · · · 1 · 1 · 2 · 2 · 3 · · · · 1 · 2 · 3 · 4 · 5 · 6 · 7 V ((n − 1, 1), ∅) V ((n − 2), (2)) V ((n − 2), (1, 1)) V ((n − 2, 1, 1), ∅) V ((n − 2, 1), (1))     Y1 X1 − X1 Y1 + X2 − Y2 + 2 2     Y1 X1 − X1 Y1 − X2 + Y2 + 2 2   X1 + Y1 − X2 − Y2 − X1 − Y1 + 1 2 X12 − Y12 − 2X1 + 2Y1 Remark 4.9. Observe that the normalized formula P P Fr P (T ) Fr P (T ) T ∈Tn q T ∈Tn q = 2 Fr 2n q |Tn q | corresponds to the average of the statistic P (T ) over all maximal tori T . Using Theorem 4.3 we obtain asymptotics of these expected values. Proposition 4.10 (Expected number of 1-dimensional Frq -stable subtori). The expected number of 1-dimensional Frq -stable subtori of a random Frq -stable maximal torus in Sp2n (Fq ) or in SO2n+1 (Fq ) equals   1 q 2 − q2(n−1) 1 1 1 1 + 2 + 4 + · · · + 2n−2 = q q q (q 2 − 1) n→∞ −−−−→ q2 . q2 − 1 Proof. To count the total number of 1-dimensional Frq -stable subtori for all maximal tori in T Frq , we apply Formula (1) to the character polynomial P = X1 +Y1 . The goal is to show that P, Rnd B = 1 n for d = 0, 2, 4, . . . , 2n − 2 and 0 otherwise. The pullback of the (n − 1)–dimensional standard Sn –representation to Bn has character polynomial χ = X1 + Y1 − 1 and corresponds to the double partition   n−1 z }| {   ··· , ∅ . λ= There are (n − 1) possible double standard tableaux of shape λ, each determined by the letter i in 26 4.3 Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) the second row. Let   Ti =  1 2 ··· i−1 i+1 ··· i n ,   ∅  R Jiménez Rolland J C H Wilson for i = 2, . . . , n. Note that we require i > 1 for Ti to form a valid standard tableau. Then D(Ti ) = {i − 1} for i = 2, . . . , n. The flag major indices are f (Ti ) = 2i − 2 for i = 2, . . . , n, and there is one copy of V(n−1,1),∅ in each even degree 2, 4, . . . , 2n − 2. The character polynomial (X1 + Y1 ) is the sum (X1 + Y1 ) = (X1 + Y1 − 1) + 1, so combining this result for multiplicities of the representation V((n−1,1),∅) and the result for V((n),∅) of Theorem 4.8 gives the desired formula. Proposition 4.11 (Expected number of split 1-dimensional Frq -stable subtori). The expected number of split 1-dimensional Frq -stable subtori of of a random Frq -stable maximal torus in Sp2n (Fq ) or in SO2n+1 (Fq ) equals   1   q − q2n−1 1 q 1 1 1 1 n→∞ 1 + + 2 + 3 + · · · + 2n−1 = −−−−→ . 2 q q q q 2(q − 1) 2(q − 1) Proof. We wish to evaluate the character polynomial P = X1 = 12 [(X1 + Y1 ) + (X1 − Y1 )] in formula (1). The canonical n–dimensional representation of Bn by signed permutation matrices has character polynomial χ = X1 − Y1 and corresponds to the double partition   n−1 z }| { λ= ··· , . There are n possible double standard tableaux of shape λ, each determined by the letter i in λ− . Let   1 i 2 · · · i−1 i+1 · · · n  Ti =  for i = 1, . . . n. , Then D(Tn ) = ∅, and D(Ti ) = {i} for i = 1, . . . , n − 1. The flag major indices are  1, i=n f (Ti ) = 2i + 1, i = 1, 2, . . . , (n − 1) and then there is a single copy of V((n−1),(1)) in each odd degree 1, 3, . . . , 2n − 1. By combining this result with our computation for X1 + Y1 in Proposition 4.10 above, we conclude that 2X1 , Rnd Bn = 1 for d = 0, 1, 2, 3, . . . , 2n − 1 and 2X1 , Rnd Bn = 0 otherwise. Corollary 4.12 (Expected number of eigenvectors in F2n q ). The expected number of simultaneous 2n eigenvectors in Fq of a random Frq -stable maximal torus in Sp2n (Fq ) equals 1+ 1 1 1 1 + 2 + 3 + · · · + 2n−1 q q q q 27 4.3 Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) R Jiménez Rolland J C H Wilson Proof. The fixed points of wT correspond to eigenvectors vi of T in F2n q . Since the eigenvectors come in inverse pairs (vi /v i ) for Frq -stable maximal tori in Sp(Fq ), we apply Formula (1) to the character polynomial P = 2X1 . The result follows from the above computation. Proposition 4.13 (Reducible v.s. Irreducible Frq -stable 2-dimensional subtori). Given a Frq -stable torus T in Sp2n (Fq ) or in SO2n+1 (Fq ), let Rn (T ) denote the number of reducible 2-dimensional Frq -stable subtori of T and In (T ) denote the number of irreducible 2-dimensional Frq -stable subtori of T . Then the expected value of the function Rn − In over all Frq -stable maximal tori of Sp2n (Fq ) or SO2n+1 (Fq ) is given by    q4 − 1 q2n 1− 1 q2(n−1) (q 2 − 1) (q 4 − 1) and converges to the sum ⌊ 2d−2 1 2 2 3 3 1 4 ⌋ + + + + + + . . . + + ... 2 4 6 8 10 12 2d−4 q q q q q q q = q4 (q 2 − 1)(q 4 − 1) as n tends to infinity. Proof. To count the difference in the number of reducible and irreducible 2-dimensional Frq -stable Fr subtori of T ∈ Tn q , we compute     X1 (T ) + Y1 (T ) P (T ) = − X2 (T ) + Y2 (T ) 2 V2 V(n−1,1),∅ has character and employ Formula (1). The irreducible Bn –representation   X1 + Y1 − (X2 + Y2 ) − (X1 + Y1 ) + 1 χ= 2 and associated double partition Define  Ti,j     =       λ=  1 2 ··· i−1 i+1 ··· z n−2 j−1 j+1 }| ··· ··· i j {   , ∅ . n  ,∅          for i < j, i, j ∈ {2, . . . , n}. We have D(Ti,j ) = {i − 1, j − 1} for all 2 ≤ i < j ≤ n, and so f (Ti,j ) = 2(i + j) − 4 for all 2 ≤ i < j ≤ n. Stably, it follows that the multiplicity is zero in degree d if d is odd, and for d ≥ 6 28 4.3 Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) R Jiménez Rolland J C H Wilson d d+2 even, f (Ti,j ) = d for the ⌊ d−2 j) = (2, d2 ), (3, d2 − 1), . . . , (⌊ d+2 4 ⌋ pairs (i, 4 ⌋, 2 − ⌊ 4 ⌋ + 2). For a X 2 given n ≥ 2, the expected value q −2n χ(T ) of χ(T ) is given in terms of the Gaussian binomial   n coefficient 2 Frq T ∈Tn by the formula 1 q2 X hχ, Rd iB n d≥0 qd n   1 n = 6 q 2 1 q2       1 1 1 1 1 − q2n 1 − q2(n−1) 1 − q2(n−1) 1  1 − q2n   =  := 6 1 1 q (q 2 − 1) (q 4 − 1) 1− 1− q2 q4 As n tends to infinity, the expected value converges to ⌊ 2d−2 1 2 2 3 3 1 4 ⌋ + + + + + + . . . + + ... 6 8 10 12 14 16 q q q q q q q 2d = (q 2 1 − 1)(q 4 − 1) To obtain the result for the character polynomial        X1 + Y1 X1 + Y1 − (X2 + Y2 ) − (X1 + Y1 ) + 1 + (X1 + Y1 ) − 1 − (X2 + Y2 ) = 2 2 we combine this result with the result for irreducible representation V(n−1,1),∅ from Proposition 4.10. We find that the desired formula is      1 1 1 1 − q2n q 2 − q2(n−1) 1 − q2(n−1) + −1 (q 2 − 1) (q 4 − 1) (q 2 − 1)    1 1 1 − q2(n−1) q 4 − q2n = (q 2 − 1) (q 4 − 1) 1 2 2 3 3 1 q4 n→∞ = 2 + 4 + 6 + 8 + 10 + 12 + . . . −−−−→ 2 (q − 1) (q 4 − 1) q q q q q q Proposition 4.14 (Split v.s. non-split Frq -stable irreducible 2-dimensional subtori). The expected value of split minus non-split Frq -stable irreducible 2-dimensional subtori over all Frq -stable maximal tori of Sp2n (Fq ) or SO2n+1 (Fq ) is given by    1 1 1 − q2(n−1) q 2 1 − q2n q2 n→∞ − − − − → . 2 (q 4 − 1) 2 (q 4 − 1) Proof. We need to consider the character polynomial X2 − Y2 in Formula (1). The irreducible Bn –representation Λ2 V(n−1),(1) has character polynomial χ = X1 Y1 − X2 + Y2 and corresponds to the double partition   n−2 z }| { λ= ··· , . 29     Y1 X1 − + 2 2 R Jiménez Rolland J C H Wilson 4.3 Some statistics for Frq -stable maximal tori in Sp2n (Fq ) and SO2n+1 (Fq ) There are   n possible double standard tableaux of shape λ. For i < j, with i, j ∈ {1, . . . , n}, let 2    Ti,j =  1 2 ··· i−1 ··· i+1 j−1 j+1 ··· n , i j   Then D(Ti,n ) = {i} D(Ti,j ) = {i, j} f (Ti,n ) = 2i + 2 for f (Ti,j ) = 2i + 2j + 2 for i = 1, . . . , n − 1 1≤i<j ≤n−1 Hence for even d with 4 ≤ d ≤ 2n, f (T d−2 ,n ) = d, and for even d with 4 ≤ d ≤ 2n−2, f (Ti,j ) = d 2   d for all i < j < n such that i + j = d2 − 1. Stably there are copies of V(n−2),(1,1) in each even 4 degree d ≥ 4 and zero copies in odd degree. For given n ≥ 2, the expected value of the character polynomial statistic is    1 1 1   1 − 1 − X hχ, Rd iB 4 2n q q 1 n q2(n−1) n n    = 4 := 1 qd q 2 1 1− 1− 1 d≥0 q2 q2 n→∞ −−−−→ q4 2 q (q 2 − 1) (q 4 − 1) The irreducible Bn –representation with character polynomial χ = and corresponds to the double partition  z λ= There are Then n−2 }| { ··· ,     Y1 X1 − X1 Y1 + X2 − Y2 + 2 2  .   n possible double standard tableaux of shape λ. For i < j, with i, j ∈ {1, . . . , n}, let 2   1 2 · · · i−1 i+1 · · · j−1 j+1 · · · n j i  Ti,j =  , D(Tn−1,n ) = ∅ f (Tn−1,n ) = 2 D(Ti,n ) = {i} D(Ti−1,i ) = {i} f (Ti,n ) = 2i + 2 f (Ti−1,i ) = 2i + 2 for for f (Ti,j+1 ) = 2i + 2j + 4 for D(Ti,j+1 ) = {i, j + 1} 30 i = 1, . . . , n − 2 i = 2, . . . , n − 1 1≤i<j ≤n−2 R Jiménez Rolland J C H Wilson REFERENCES Stably, degrees and multiplicity   there this irreducible representation has multiplicity zero in odd X d −2n2 in each even degree d ≥ 2. For n ≥ 2, the expected value q χ(T ) is 4 Frq T ∈Tn   X hχ, Rd iB 1 n n n = 2 qd q 2 d≥0 := 1 q2 1 q2       1 1 1 1 1 − q2n 1 − q2(n−1) 1 − q2(n−1) q 4 1 − q2n    = (q 2 − 1) (q 4 − 1) 1 − q12 1 − q14 n→∞ −−−−→ q4 (q 2 − 1) (q 4 − 1) Then for the character polynomial           Y1 X1 Y1 X1 1 − X1 Y1 − X2 + Y2 + − X1 Y1 + X2 − Y2 − + P = (X2 −Y2 ) = 2 2 2 2 2 X 2 P (T ) for n ≥ 2 is given by the corresponding expected value q −2n Frq T ∈Tn          1 1 1 1 1 1 1 − q2(n−1) 1 − q2(n−1) q4 1 − q2n 1  q2 1 − q2n −        1 1 1 1 2 1 − q2 1 − q2 1 − q4 1 − q4    1 1 1 − q2(n−1) q 2 1 − q2n = 2 (q 4 − 1) In the limit as n tends to infinity, this converges to q2 . − 1) 2 (q 4 References [BGPW13] L. Babai, S. Guest, C. E. Praeger, and R. A. Wilson, Proportions of r-regular elements in finite classical groups, Journal of the London Mathematical Society (2013), jdt011. [Bor53] A. Borel, Sur la cohomologie des espaces fibrés principaux et des espaces homogènes de groupes de Lie compacts, Ann. of Math. (2) 57 (1953), 115–207. MR 0051508 (14,490e) [Bri02] J. R. Britnell, Cyclic, separable and semisimple matrices in the special linear groups over a finite field, J. London Math. Soc. (2) 66 (2002), no. 3, 605–622. MR 1934295 [Car93] R. W. Carter, Finite groups of Lie type, Wiley Classics Library, John Wiley & Sons, Ltd., Chichester, 1993, Conjugacy classes and complex characters, Reprint of the 1985 original, A WileyInterscience Publication. [CEF14] T. Church, J. Ellenberg, and B. Farb, Representation stability in cohomology and asymptotics for families of varieties over finite fields, Algebraic topology: applications and new directions, Contemp. Math., vol. 620, Amer. Math. Soc., Providence, RI, 2014, pp. 1–54. [CEF15] , FI-modules and stability for representations of symmetric groups, Duke Math. J. 164 (2015), no. 9, 1833–1910. 31 R Jiménez Rolland J C H Wilson REFERENCES [CF13] T. Church and B. Farb, Representation theory and homological stability, Adv. Math. 245 (2013), 250– 314. [Che] W. Chen, Twisted cohomology of configuration spaces and spaces of maximal tori via point-counting, arXiv preprint:1603.03931. [Che55] C. Chevalley, Invariants of finite groups generated by reflections, American Journal of Mathematics (1955), 778–782. [DL76] P. Deligne and G. Lusztig, Representations of reductive groups over finite fields, Ann. of Math. (2) 103 (1976), no. 1, 103–161. [FNP05] J. Fulman, P. M. Neumann, and C. E. Praeger, A generating function approach to the enumeration of matrices in classical groups over finite fields, Mem. Amer. Math. Soc. 176 (2005), no. 830, vi+90. [Ful99] J. Fulman, Cycle indices for the finite classical groups, J. Group Theory 2 (1999), no. 3, 251–289. MR 1696313 [Ful16] , A generating function approach to counting theorems for square-free polynomials and maximal tori, Annals of Combinatorics 20 (2016), 587–599. [FW] B. Farb and J. Wolfson, Étale homological stability and arithmetic statistics, arXiv preprint: 1512.00415. [GP00] M. Geck and G. Pfeiffer, Characters of finite Coxeter groups and IwahoriHecke algebras, Oxford University Press, USA, 2000. [HR18] G. H. Hardy and S. Ramanujan, Asymptotic formulaæ in combinatory analysis, Proceedings of the London Mathematical Society 2 (1918), no. 1, 75–115. [JRW17] R. Jiménez Rolland and Jennifer CH Wilson, Stability for hyperplane complements of type B/C and statistics on squarefree polynomials over finite fields, arXiv preprint arXiv:1703.06349 (2017). [Leh92] G. I. Lehrer, Rational tori, semisimple orbits and the topology of hyperplane complements, Comment. Math. Helv. 67 (1992), no. 2, 226–251. [LNP09] F. Lübeck, A. C. Niemeyer, and C. E. Praeger, Finding involutions in finite Lie type groups of odd characteristic, Journal of Algebra 321 (2009), no. 11, 3397–3417. [Mac62] I. G. Macdonald, The Poincaré polynomial of a symmetric product, Mathematical Proceedings of the Cambridge Philosophical Society, vol. 58, Cambridge Univ Press, 1962, pp. 563–568. , Symmetric functions and Hall polynomials, Clarendon Press Oxford, 1979. [Mac79] [Mil12] J. S. Milne, Reductive groups, 2012, Available at www.jmilne.org/math/. [NP95] P. M. Neumann and C. E. Praeger, Cyclic matrices over finite fields, Journal of the London Mathematical Society 52 (1995), no. 2, 263–284. [NP98] , Derangements and eigenvalue-free elements in finite classical groups, Journal of the London Mathematical Society 58 (1998), no. 3, 564–586. , Cyclic matrices in classical groups over finite fields, Journal of Algebra 234 (2000), no. 2, 367– [NP00] 418. [NP10] A. C. Niemeyer and C. E. Praeger, Estimating proportions of elements in finite groups of Lie type, J. Algebra 324 (2010), no. 1, 122–145. [NPP10] A. C. Niemeyer, T. Popiel, and C. E. Praeger, On proportions of pre-involutions in finite classical groups, Journal of Algebra 324 (2010), no. 5, 1016–1043. , Abundant p-singular elements in finite classical groups, Journal of Algebra 408 (2014), 189– [NPP14] 204. [NPS13] A. C. Niemeyer, C. E. Praeger, and A. Seress, Estimation problems and randomised group algorithms, Probabilistic Group Theory, Combinatorics, and Computing, Springer, 2013, pp. 35–82. 32 R Jiménez Rolland J C H Wilson REFERENCES [Sri79] B. Srinivasan, Representations of finite Chevalley groups, Lecture Notes in Mathematics, vol. 764, Springer-Verlag, Berlin-New York, 1979. [Ste68] R. Steinberg, Endomorphisms of linear algebraic groups, Memoirs of the American Mathematical Society, No. 80, American Mathematical Society, Providence, R.I., 1968. [Ste89] J. R. Stembridge, On the eigenvalues of representations of reflection groups and wreath products, Pacific J. Math 140 (1989), no. 2, 353–396. [Usp20] J. V. Uspensky, Asymptotic formulae for numerical functions which occur in the theory of partitions, Bulletin of the Russian Academy of Sciences 14 (1920), no. 6, 199–218. [Wal99] G. E. Wall, Counting cyclic and separable matrices over a finite field, Bull. Austral. Math. Soc. 60 (1999), no. 2, 253–284. MR 1711918 [Wil14] J. C. H. Wilson, F IW -modules and stability criteria for representations of classical Weyl groups, Journal of Algebra 420 (2014), 269–332. [Wil15] J. C. H. Wilson, F IW –modules and constraints on classical Weyl group characters, Mathematische Zeitschrift 281 (2015), 1–42. [You30] A. Young, On quantitative substitutional analysis (fifth paper), Proceedings of the London Mathematical Society 2 (1930), no. 1, 273. Rita Jiménez Rolland Instituto de Matemáticas, Universidad Nacional Autónoma de México Oaxaca de Juárez, Oaxaca, México 68000 [email protected] Jennifer C. H. Wilson Stanford University, Department of Mathematics Sloan Hall, 450 Serra Mall, Building 380, Stanford, CA 94305 [email protected] 33
4math.GR
NMODE — Neuro-MODule Evolution Keyan Ghazi-Zahedi 1 ∗1 Max Planck Institute for Mathematics in the Sciences, Leipzig, Germany arXiv:1701.05121v1 [cs.NE] 18 Jan 2017 January 19, 2017 Abstract Modularisation, repetition, and symmetry are structural features shared by almost all biological neural networks. These features are very unlikely to be found by the means of structural evolution of artificial neural networks. This paper introduces NMODE, which is specifically designed to operate on neuro-modules. NMODE addresses a second problem in the context of evolutionary robotics, which is incremental evolution of complex behaviours for complex machines, by offering a way to interface neuro-modules. The scenario in mind is a complex walking machine, for which a locomotion module is evolved first, that is then extended by other modules in later stages. We show that NMODE is able to evolve a locomotion behaviour for a standard six-legged walking machine in approximately 10 generations and show how it can be used for incremental evolution of a complex walking machine. The entire source code used in this paper is publicly available through GitHub. 1 Introduction One of the advantages of evolutionary algorithms is that these type of algorithms can be used to find novel solutions with a minimal amount of pre-structuring. That means that there is no inherent need to e.g. a priori specify the structure of a neural network. In the context of embodied artificial intelligence, this means that for an embodied agent, only the number of sensors and motors need to be specified and everything else can be left open to evolution. In particular, artificial evolution can be used to find optimal control structures by sequentially growing and pruning networks. We use the term optimal in the sense of [18], i.e. in the context of structurally minimal networks that solve a given set of tasks. Furthermore, evolutionary algorithms can be used to co-evolve the brain and body of embodied agents. Impressive examples date back to Karl Sim’s work [26, 25], but can also be found in more recent work (e.g. [1, 19]). A common trait of almost all experiments (early as well as contemporary) in the context of evolutionary robotics are that the morphology or the behaviour is kept simple, while the other might vary. In cases of simple morphologies, i.e. wheel-driven robots, one can find examples of interesting behaviours such as predator-prey scenarios [20]. If the morphology is more complex, i.e. walking machines, then evolved behaviours, mainly solve locomotion problems (e.g. [30]), which does not mean that the results are less impressive. Yet, it indicates that it is a challenge to evolve complex behaviours for complex systems. We believe that these challenges result from two main problems. In the early days, genetic algorithms [15] (GAs) were used predominantly. GAs were often applied to fully connected recurrent neural networks, which means that the string length would increased exponentially with every additional sensor or motor. Hence, for simple systems with limited sensors and motors, the space of policies was small enough to search for interesting behaviours, whereas for complex morphologies, such as walking machines, evolving a robust walking behaviour already posed a challenge. A workaround was to use ∗ [email protected] 1 neural networks of particular structures, but then the question arose, what are best suited structures to learn a specific behaviour? An interesting alternative, which is known as HyperNEAT, will be discussed below. The second problem, in our opinion, is that it is very difficult to add functionality to a network in an evolutionary setting. Let us assume that we have evolved a locomotion network for a hexapod. How can we add the functionality to add e.g. a light-seeking behaviour, while ensuring that the already learned behaviour is preserved. One can fixate the synaptic weights of the locomotion network, but how should the newly grown structure interface with the already existing locomotion structure? NMODE is specifically designed to address these two problems, i.e., to reduce the search space for the evolution of neuro-modules in a meaningful way and to provide a principled way to interface new module ,,on-top” of already evolved structures. Before we introduce NMODE, we first present contemporary algorithms and discuss why we did not choose to extend an existing framework instead of creating yet another artificial evolution algorithm. To the best of the authors knowledge, there is only one algorithm that can be considered anything close to a standard in this context. HyperNEAT [23] is a very popular evolutionary algorithm that allows to simultaneously evolve morphologies and neural networks. To understand how HyperNEAT works, it is important to look at its predecessors, NEAT [27] and CPPN [24]. NEAT is a very interesting algorithm to evolve neural networks of arbitrary structure. Two key features of NEAT are its ability to allow for cross-over between to arbitrary structures and speciation as a method to protect innovations. CPPNs (compositional pattern producing networks) are NEAT networks which use a set of function instead of the standard sigmoidal transfer function. This means that one parameter of the neuron selects the transfer function from a set of possible functions (sine wave, linear, saw tooth, . . . ). Let us assume, that we have evolved a CPPN with two inputs and a three outputs. Let us further assume, that the two inputs are the x and y coordinates of a two-dimensional bounded plane and the three outputs are RGB colour values. This means that the CPPN is now able to produce a picture. The Picbreeder website1 [24] shows impressive examples of pictures that were evolved by visitors of the website. It is striking how CPPNs can make use of symmetries, repetitions, etc., to create complex and appealing images. The website Endless Forms2 applies the same idea to 3D shapes [5]. The output of the CPPN is now used to determine the boundary of geometric figures. HyperNEAT uses CPPNs to generate the synaptic weights in a layered neural network. Each layer of a neural network is placed on a two-dimensional plane and two layers are fully connected, which means that every neuron in the input layer is connected with every neuron in the hidden layer and every neuron in the hidden layer is connected to every neuron in the output layer. A CPPN is now fed with the geometric location of the pre- and post-synaptic neurons on their layers and the output of the CPPN is the synaptic connection between the two neurons. Although there are very interesting experiments published that use HyperNEAT (e.g. [1]), there are currently no publications that show a successful application of HyperNEAT to complex robotic systems. For example, HyperNEAT has not been used to evolve behaviours for non-trivial walking machines such as Svenja or even Heaxaboard, which is discussed in Section 3.1 and Section 3.2. One reason is that HyperNEAT is very good at finding patterns, but not very good in fine tuning parameters [4]. From our perspective, the significant reason not to use HyperNEAT is the its requirement to use a predefined neural network architecture. The number of layers and their respective connectivity must be specified by the experimenter before running the evolutionary algorithm. We are interested in finding minimal and optimal neural network architectures, which is why the structure of the network (including the number of synapses and neurons) must be be open to evolution. NEAT allows to evolve the structure of a network together with its parameters but does not allow for modularisation. One idea that will be followed in future work is to combine NEAT with the modular structure of NMODE. This would allow to use cross-over operators not only on the level of modules (see Sec. 2) but also allow cross-over between modules. 1 2 http://www.picbreeder.com http://www.endlessforms.com 2 Besides NEAT, there aren’t many algorithms that support the co-evolution of structure and parameters of a neural network. One of the first frameworks probably is ISEE (integrated structure evolution environment), which is described in detail in [14] and based on the ENS 3 algorithm [10]. ISEE not only included software to evolve neural networks but also sophisticated tools to inspect the dynamics of neural network while they were operating in the sensorimotor loop as wells as ex vitro analysis of their dynamics. It has been applied very successfully in numerous experiments to evolve networks in simulation that were then used with minimal adaptation effort to control real robots (see e.g. [17, 29, ?, ?]). Unfortunately, the initial implementation did not support the evolution of disjunct neuro-modules. As an example, consider the AiboTM robot for which a behaviour was evolved in [17]. This system has a left-right symmetry that an evolutionary algorithm can take advantage of to reduce the search space. In ISEE, this required a few workarounds. NERD [22] is a full evolutionary environment, designed to overcome the limitations of ISEE with a lot of additional functionality. It allows to define neuro-modules with a rich repertoire of operators. An interesting feature is that NERD allows the definition of connection rules, e.g. to force that a specific sensor has to be connected to a specific actuator. The software is very powerful, which comes with the cost that it is not easy to use out of the box. Additionally, NERD is also unfortunately no longer maintained as the development has stopped. NMODE’s development was initiated to overcome ISEE limitations by adapting NERD’s neuromodular concept in a minimalistic and easy to use way, thereby adapting interesting ideas from NEAT. The novel idea that guided NMODE’s development is the principled way of augmenting already evolved networks by new modules, which we see as one of the biggest problems in the context of evolutionary robotics to achieve behaviours of higher complexity. If we look at the impressive work by Karl Sims [26, 25], then it is difficult to see a significant progress since these early experiments. Otherwise stated, in the context of evolutionary robotics, we are still mostly working on the level of Braitenberg vehicles [3], which means that we mostly work with purely reactive systems. Although the complexity of the morphology has clearly increased over the decades, the behaviours that these systems show are still mainly reactive. To the best of the authors knowledge, there are currently no systems in which a non-trivial morphology has been evolved beyond the realms of reactive behaviours. This is where the development of NMODE is targeted at; evolving complex behaviours for complex morphologies. This requires a method to incrementally increase the complexity of the behaviours without loosing already gained functionality. The method of adding new functionality in this context is called incremental evolution and is it not a new concept [20]. The core ideas of NMODE can be summarised in the following way. A neural network is decomposed into neuro-modules. Neural networks are composed of modules and mutations can only the change the structure within a modules. In particular, this means that synaptic connection cannot be created between neurones of different modules. Instead, the interaction between two modules is controlled by interface neurones (see next Sec.). This allows to incrementally extend previously evolved modules with new modules in a controlled manor. NMODE is not designed to be biologically plausible, but to allow to evolve neural networks for non-trivial behaviours of complex systems. The intention of this work is to introduce NMODE and investigate how it works on a well-known morphology (see Sec. 3.1) as well as a more complex, biologically motivated morphology (see Sec. 3.2). Evolving non-reactive behaviours will be investigated in future publications. This work is organised in the following way. The next section discusses the neuro-modules and evolutionary algorithm in detail. The source code is freely available at [12]. The following section presents two experiments, before this work concludes with a discussion and outlook. 2 NMODE Evolutionary algorithms can generally be divided into four functions that each operate on a population of individuals, namely evaluation, selection, reproduction, and mutation. Let P be a population of 3 individuals, and let E : P 7→ P, S : P 7→ P, R : P 7→ P, and M : P 7→ P be the evaluation, selection, reproduction, and mutation functions. Then, the evolution from one generation to the next can be written as      P (n+1) = M R S E P (n) , (1) where n refers to the generation index. NMODE is designed to reduce the search space by modularisation of the neural network structure. Therefore, we will first discuss how the modularisation is specified, before we present the algorithmic details. 2.1 Neuro-Modules The basic idea of NMODE is that the morphology of an embodied agent can be used to determine how a neural network should be modularised. It is known from, e.g. stick insects, that each leg has its own local controller and that the local leg controller are synchronised by a central nervous system (see e.g. [8, 9, 11, 16, 29]). Hence, if we have a geometric description of an agent’s morphology (e.g. Fig. 2), which includes the pose of the segments and the location of the sensors and actuators, we can use that information to generate a geometric description of a neural network. By that we mean that neurons will have 3D coordinates that refer to their position in a global Cartesian coordinate system. Currently, this geometric description must be defined manually in NMODE, but there is no reason why this could not be automatised in future versions. An example is the RoSiML3 robot simulation mark-up language that is used by YARS [13] to define an experiment. It contains the pose of each segment as well as the location of each actuator and sensor. Gazeboo [21] uses a similar file structure that could also be used to automatically generate a neural network configuration. These files can be parsed for the names and location of segments, sensors and actuators and also determine symmetries and repetitions. A module in NMODE contains six different types of neurons and a list of synapses. The next paragraph will describe each of them in detail, but we will first present the type of neuron model that is currently implemented. We use the standard additive neuron model, which is given by the following set of equations: X ai (t + 1) = θi + wji oj (t) (2) j oi (t + 1) = τ (ai (t)), (3) where ai (t) ∈ R is the activation of neuron i ∈ N at time t ∈ N, oi ∈ R is the output of neuron i at time t, wji ∈ R is the synaptic strength between the pre-synaptic neuron j ∈ N and the post-synaptic neuron i, and finally, τ : R 7→ R is the transfer function. All neurons are updated synchronously, which means that first the activations ai (t + 1) are calculated based on the neuron outputs of the previous time step oi (t). Once all activations are updated, the neuron outputs follow, i.e., all outputs oi (t + 1) are calculated based on the updated actuators states ai (t + 1). As already indicated, we currently work with time discrete neural networks. It must be noted here that the specification given in the NMODE XML file is generic enough to allow NMODE to be extended to work with any type of neural networks or graphical models. This is why we will sometimes refer to neurons as nodes and synapses as edges. Currently, we support three type of transfer functions, namely τ ∈ {id, sigm, tanh}, where id(x) = x is the identity function, sigm(x) = 1/1+e −x is the standard sigmoid function, and finally tanh is the Hyperbolic Tangent. Next, we will discuss the six different types of nodes, which are; sensor, actuator, hidden, input, output, and connector. The first three node types are well-known from other neural network contexts. 3 http://keyan.ghazi-zahedi.eu/rosiml 4 Shoulder Knee Input Output Leg Module FCS Sensor nodes Actuator nodes Shoulder Knee CPG Resulting Network Comparable unrestricted network Figure 1: Hexaboard NMODE configuration vs. unrestricted configuration. FCS refers to foot contact sensors. Sensor nodes receive input from the agent’s sensors and are typically equipped with a linear (id) transfer function. Analogously, actuator nodes are directly connected to the actuators of the agent, and finally, hidden nodes are only connected to other nodes within the same module. Actuator and hidden neurons are usually equipped with one of the two sigmoidal functions presented above. Two of the new node types are named input and output. The role of these nodes is to function as connectors between modules. Input nodes only allow connections from itself to other neurons within the module it is assigned to, whereas output nodes only allow connections from nodes of the corresponding module to itself. To connect a module with another module that has input and output nodes, the connecting module has to use a connector node. The connector node will copy the position and properties of the node it is referring to. In particular, this means that if a connector nodes refers to an input node, it will automatically become an output node of the connecting module. As an example, consider the hexapod used in the first experiment presented below (see Sec. 3.1). Its NMODE structure is shown in Figure 1. Sensor nodes are shown in red, actuator nodes in green, input nodes in cyan, output nodes in purple, and finally, connector nodes in orange. In the experiment discussed below, only one leg module and one CPG module are evolved. By definition, a leg module controls a leg, which means that requires needs sensor and actuator nodes to access the leg’s state and control its movement. For a simple locomotion movement, the CPG does not require any sensor or actuator nodes. Instead, the CPG only consists of connector nodes to interface with the evolved leg modules. Because all legs are morphologically identical in this example, only one leg module has to be evolved, which is the used several times for the final controller (see Fig. 1). We demonstrate the parameter reduction that results from this modularisation based on the hexapod example and with the assumption that the insertion of hidden units is not allowed. This allows us to calculate the maximal number of edge for a modularised and non-modularised neural network (see Fig. 1), where the latter means that synapses can connect any two neurons. It must be noted, that sensor nodes can only have outgoing connections in the current implementation, i.e., they only function as proxy for the sensor values. Let ns,a,i,o,h be the number of sensor, actuator, input, output, and hidden nodes. For a fair comparison, we replace all pairs of input/output nodes by a single hidden node in the unrestricted configuration, which follows structure that was used in [17, 31]. Then the dimension of the weight matrices for the two configurations is given by Tab. 1. For the example of a six-legged walking machine with 2DOF per leg, we see that the unrestricted configuration has up to 540 free parameters that the evolutionary algorithm has to take care of, compared to the modularised network structure, which only requires the evolution of maximally 93 parameters. In other words, the search space in the unrestricted case is about 5.8 times larger compared to the modularised case. The next section discusses the selection, mutation, and reproduction operators on modules. 5 NMODE configuration: Leg Module ns · (no + na ) + ni · (ni + na ) + no · (ni + na ) + na · (no + na ) = 21 NMODE configuration: CPG Module ni · no + no · ni = 72 NMODE configuration: Total = 93 Unrestricted configuration: ns · (nh + na ) + nh · (nh + na ) + na · (nh + na ) = 540 Table 1: Comparison of search space dimension for the Hexapod example. 2.2 Selection We decided to use the simplest form of selection, which is a rank based approach. After evaluation, the individuals are ranked based on their fitness value. The top n% (user defined) are then selected for reproduction. In the previously used ENS3 approach [10, 14], offspring were assigned to individuals with respect to a Poisson distribution based on the individual’s fitness values. Individuals without offspring after the reproduction process, were removed from the population. An additional parameter allowed to save the best n individuals, which might have not been assigned an offspring despite having a high fitness value. The idea was that, because of its stochastic nature, this selection method would provide more diversity in the population. We believe that the speciation method introduced by [23] is more valuable in this respect, which is why it will be included and evaluated in future versions of NMODE. We also believe that cross-over is more useful with respect to ensuring diversity in the population, which is why a crossover mechanism based on the exchange of modules is included (see below). In future versions of NMODE, we will evaluate a NEAT-based cross-over technique to allow crossover between two modules instead of a full exchange. 2.3 Reproduction The task of the reproduction operator is to assign the right amount of offspring to each individual that was selected after the evaluation. By right amount we mean that the number of offspring assigned to each individual should reflect the individual’s fitness values. For this purpose, all fitness values are normalised in the following way:  η fi − mini {fi } si si = (4) , ri = P , maxi {fi } − mini {fi } i si where i = 1, 2, ... , N is the index of the i-th individual, and fi is the corresponding fitness value, η is the elitism parameter, and ri is the reproduction factor. A constant value for si is used, if max{fi } = min{fi }. A high value of η leads to a concentration of the offspring to the individuals with the highest fitness values. Analogously, a low value of η results in an equal distribution of offspring among the selected individual. The resulting reproduction factors ri sum up to one, which means that the normalised ri can directly be used to distribute the number of offspring. One reason for the modularisation of the neural networks and the definition of the interface nodes is that the modules can easily be exchanged between individuals. If the cross-over parameter is positive, i.e. ζ > 0, then for each offspring (which is a copy of its mother) a father is chosen randomly from the set of parents depending on their normalised reproduction factor ri . This means that individuals with a high reproduction will be chosen more often as a mating partners. If two mates are found, then ζ also determines the probability with which a module is chosen from the father instead of the mother. This can be fatal in many cases, because the modules were not co-evolved, and hence, there is a high probability that e.g. a leg module that works fine with a particular CPG will not work at all with another CPG. This is accounted for, because very fit individuals will often mate with themselves (due to their high 6 fitness value), and hence, good networks will be preserved. On the other hand, less successful networks will more likely be crossed with more successful networks, which could increase their survival chances. As briefly mentioned above, one might think about using NEAT as a method to evolve networks within in module. This would then allow to cross module-networks instead of completely switching them. We will investigate this possibility in future versions of NMODE. 2.4 Mutation NMODE is designed particularly to evolve neural networks of arbitrary structure while restricting the search space in an meaningful way. This means that the mutations are performed on the level of modules and not on the entire neural network. Consequently, in the following sections, E and N denote the set of all edges and nodes within a single module. Synapse insertion Because nodes have a three-dimensional position (see above), it makes sense to insert edges based on the Euclidean distance between nodes. Nodes which are closer together, will have a higher probability of being connected than those which are separated by a longer distance. This way, sensors and actuators which e.g. read and control the same joint are more likely to be connected early during the evolutionary process than sensors and actuators which have a larger distance. We will investigate how a distance-based edge generation method differs from an uniformly distributed insertion of edges with respect to the evolutionary success and the generated behaviours in an experiment discussed below (see Sec. 3.1). Both methods are explained in the following paragraph. At first, NMODE generates a dis-connectivity matrix. This means, that the matrix D has a positive, non-zero entry at dij when the synapse from node j to node i does not exist. There are currently two ways in which the non-zero entries are calculated (see Alg. 1). The first possibility is to set them uniformly to one. This means that each new connection has the same probability of being created. This refers to a uniformly distributed insertion of synapses. The second possibility is to set the values proportionally to the distance between the two corresponding neurons. This means that neurons which are closer to each other will have a higher chance of being connected by a synapse. In both cases, each entry in the dis-connectivity matrix is then multiplied with the user-defined synapse insertion probability, which means that the resulting matrix determines with which probability each non-existing synapse will be created (see Alg. 1). Synapse deletion The user specifies how many synapses can be removed during the mutation of a module. Hence, if the user specifies p = 1, than any fraction from 0% to 100% of the synapses can be deleted, whereas p = 0.5 means that maximally 50% of all existing synapses can be deleted. The synapse deletion algorithm is comparably simple (see Alg. 2). One could argue that this form of synapse insertion and deletion are too invasive, as they can both lead to significant changes of the network structure. This is intentional for the following reason. NMODE was not designed to be a biologically plausible evolutionary algorithm to understand how biology has evolved complex systems. NMODE was initiated to find controller for complex systems in cases where other approaches fail. In other words, the solution is more important than the algorithm that found it. Therefore, if a local maximum is reached, it is desirable to increase the stochastic search area to find other maxima. A good way of doing this is to significantly alter the structure of the neural network, which is why we allow such large structural variations. Synapse modification The modification of synapses is straight forward. Each synapse is modified with a probability specified by the experimenter. The parameter δ determines the maximal variation of the synapse and the max parameter determines the limit of the synaptic strength (see Alg. 3). 7 Algorithm 1 Synapse insertion Require: p ∈ [0, 1] . Probability to insert a synapse Require: u() ∈ [0, 1] . Function to draw a uniformly distributed random number Require: D = (dij ) = 0, ∀i, j = 1, 2, ... , N Require: E ∈ N2 . is the set of all existing nodes, which is empty only for the initial generation. 1: for i = 1, 2, ... , N do 2: for j = 1, 2, ... , N do 3: if (i, j) 6∈ E then 4: if uniform then 5: dij = 1 6: else if distance then 7: dij = 1/dist(ni ,nj ) 8: end if 9: end if 10: end for 11: end for D 12: D = max . Normalise D such that the largest entry is equal to one. D 13: for i = 1, 2, ... , N do 14: for j = 1, 2, ... , N do 15: if u() < p · dij then 16: Add synapse (i, j) to E 17: end ifu() < psi 18: end for 19: end for Algorithm 2 Synapse deletion Require: p ∈ [0, 1] . Probability to delete a synapse Require: u() ∈ [0, 1] . Function to draw a uniformly distributed random number 1: N = u() · p · |E| 2: for i = 1, 2, ... , N do 3: Delete a synapse randomly drawn from E 4: end for Algorithm 3 Synapse modification Require: p ∈ [0, 1] . Probability to modify a synapse Require: m ∈ R+ . Maximal absolute value for the synaptic strength Require: δ ∈ R+ . Maximal absolute change of a synaptic strength Require: u() ∈ [0, 1] . Function to draw a uniformly distributed random number 1: for (i, u) ∈ E do 2: if u() < p then 3: wij = wij + δ(2u() − 1) 4: Prune wij , such that wij ∈ [−m, m]. 5: end if 6: end for Neuron insertion In growing a network, it is useful to insert neurons carefully, without massive structural changes [27]. In our previous implementation [14, 10], we used to add a neuron and automatically connect it to a given percentage of the neural network. This means that every new neuron has a potentially large impact on the network structure, and hence, its function. We decided to insert neurons more 8 carefully. Hence, we adopted NEAT’s method of inserting a neuron, which means that with probability p a synapse is chosen which is split by the new neuron. The synaptic weight of the new incoming synapse is set to one, whereas the outgoing synaptic strength is equal to the strength of the original synapse (see Alg. 4). The new neurons position is set to centre of the original synapse. Algorithm 4 Neuron insertion Require: p ∈ [0, 1] Require: u() ∈ [0, 1] 1: if u() < p then 2: (i, j) is drawn uniformly from E 3: Insert new neuron k in N 4: Remove (i, j) from E 5: Add (i, k) with wik = 1 to E 6: Add (k, j) with wki = wij to E 7: end if . Probability to add a neuron . Function to draw a uniformly distributed random number Neuron deletion Depending on the number of connections, the deletion of a neuron can have a strong influence on the function of the recurrent neural network. For this reason, neurons should be removed with care, which is why in each mutation at most one neuron is removed (see Alg. 5). Algorithm 5 neuron deletion Require: p ∈ [0, 1] . Probability to remove a neuron Require: u() ∈ [0, 1] . Function to draw a uniformly distributed random number 1: if u() < p then 2: Remove a neuron randomly drawn from N 3: end if Neuron modification Neurons are modified in the same way that synapses are modified. Each neuron is modified with the specified probability. The bias value is changed with the limits specified by δ and cropped within the limits of the specified maximal value (see Alg. 6) Algorithm 6 neuron modification Require: p ∈ [0, 1] . Probability to modify a neuron Require: m ∈ R+ . Maximal absolute value for the bias Require: δ ∈ R+ . Maximal absolute change of the bias Require: u() ∈ [0, 1] . Function to draw a uniformly distributed random number 1: for n ∈ N do 2: if u() < p then 3: bn = bn + δ(2u() − 1) 4: Prune bn , such that bn ∈ [−m, m]. 5: end if 6: end for 2.5 Evaluation NMODE is primarily designed to work with YARS, although other simulators and evaluation methods can be easily included too. YARS is a fast mobile robot simulator especially designed for evolutionary 9 robotics. It uses the bullet physics engine [6] for the physics and Ogre3D [28] for the visualisation. Robots can be created in blender [2] and imported to YARS and blender animation data can be exported from YARS allowing to replay and render the simulation from any camera angle. YARS and NMODE are both available from GitHub [13, 12]. Therefore, the question of evaluation (except for a brief discussion on fitness functions below) will not be addressed in this work but in a following publication on the current version of YARS. This section does not discuss fitness functions in general. There is a vast amount of literature available on this topic (see e.g. [15, 20])). Instead, this section describes how fitness functions are implemented in NMODE, because this is only part that requires programming by the user. Fitness functions are dynamically loaded during runtime of the NMODE executable. The name of the fitness function given in XML file must correspond to the name of the library. The class must inherit the Evaluate class and implement the following functions; void updateController(), void updateFitnessFunction(), bool abort(), void newIndividual(), void evaluationCompleted(). The first function updateController is called after each step in the simulation, e.g. after each update of the sensor states. All sensor values are presented in an one-dimensional array and can be used to calculate the intermediate fitness. The function abort is then checked by NMODE to see if the evaluation should be terminated early. This function can be used by the experimenter to indicate that some abort condition was met, e.g. if a collision with a wall occurred. If an individual reached the full evaluation time, the evaluationCompleted function will be called to allow post-processing. In the examples given below, the entropy [7] over joint angles could be used as part of the fitness function. This calculation only makes sense at the end of each evaluation for two reasons. First, the calculation of entropies can be very time consuming, and hence, should not be performed after every simulation update. Second, such calculations are most usefull if the full data is available, which is why the evaluationCompleted function was added. The newIndividual function is called at the beginning of each evaluation and is meant for the initialisation and resetting of variables. This concludes the introduction of NMODE. The next section presents two experiments in which NMODE was used to evolve locomotion behaviours in YARS. 3 Experiments In the following, we will present two different experiments, namely, Hexaboard and Svenja. The reason why we present these experiments is that the Hexaboard can be considered to be a standard hexapod morphology with 2DOF per leg (see Fig. 2). This is a kind of benchmark experiment to show how well NMODE performs on such tasks. The second experiment, Svenja, is a hexapod morphology that was freely modelled after an insect. It has four degrees of freedom in each leg and the three leg pairs are morphologically different (see Fig. 2). Svenja is particularly challenging to control because of the arrangements of the legs and actuators. Contrary to Hexaboard, one cannot use the same network for each leg, as the three leg pairs will have different tasks, due to their differing morphologies. The front legs will have to pull, while the rear legs will have to push. The two centre legs have the same morphology as Hexaboard’s legs, and hence, will have a similar task. Manually programming a behaviour for this morphology turned out to be very challenging. This experiment was also chosen to demonstrate that NMODE’s modularisation is well-suited for incremental evolution. Each leg-pair was evolved individually, with its own CPG. For the final evolutionary phase, the three disjunct networks were simply merged. 3.1 Hexaboard This experiment was chosen because it is a good representation of a standard experiment in the context of embodied artificial intelligence. The task is to evolve a neural network for the locomotion of a sixlegged walking machine. Most walking machines are constructed with identical legs, i.e. each leg has the same morphology and is attached to the main body in exactly the same way. This reduces the complexity 10 Figure 2: Experimental platforms. Left: Hexaboard is standard hexapod with 2DOF per leg. Right: Svenja is a hexapod that is loosely modelled after an insect with 4DOF per leg and two light sensors. of the control significantly, because the controller does not have to distinguish between different leg pairs. The movements of the two front legs have the same effect on the locomotion behaviour as the movements of the rear legs. This is in contrast to natural systems, e.g. cockroaches, for which the front legs perform a pulling movement, whereas the rear legs can be said to push. Later in this work, we will evolve a neural network for a hexapod with a more natural task distribution for its legs (see Sec. 3.2). In this section we will first concentrate on the standard configuration of six identical legs, which are mounted parallel to each other to a single segment (see Fig. 2). For such a system, is it natural to assume that each leg should have the same local leg controller, because each leg should show the same behavioural pattern in e.g. a tripod walking gait. Hence, to reduce the search space, we only need to evolve a single leg controller and copy it five times for the final controller. In addition to the leg controller, only the connecting structure (central pattern generator or CPG) needs to be evolved, which means that the search space can be reduced significantly (see Tab. 1 an and Fig. 1). In what follows, we will first describe the morphology, followed by the user-defined evolution parameters, before the results are presented. It must be noted here, that all experiments were conducted as batch process, i.e., the parameters were set at the beginning of the experiments, kept constant and the same for all experiments. This is not how NMODE was intended to be used and other parameters might lead to even better results. The goal here is to show how fast NMODE can evolve a good behaviour for such a standard platform. The goal is not to evolve an optimal network structure (with respect to size and robustness against disturbances), which would require alternative growing and pruning phases, modification of fitness function parameters, etc., and hence, a monitoring of the evolutionary process. Interactive evolution would not allow to make statistical statements about the evolutionary progress, which is why we chose to evolve in batch mode. 3.1.1 Morphology We chose Hexaboard as our experimental platform for two reasons. First, it is provided in the YARS distribution, which means that the results presented here can be easily verified, and second, it was successfully used in previous experiments [18]. Overall, the robot was designed especially for the purpose of learning locomotion, which means that the body part dimensions, weights, forces, angular range, etc. were set such that the system is highly dynamic but has a very low probability of flipping over. The exact parameters are presented in Table 1. Figure 2 visualises the arrangement of the joints and their rotation axes. All shapes were modelled in blender and the visual appearance of the robot is equivalent to it’s physical form, which means that the shapes that are used for collision detection etc. are the same shapes that are also used for the visualisation. This is also true for Svenja (see below). 11 Bounding Box (x,y,z) Mass Main Body 0.75 m 4.41 m 0.5 m 2.0 kg Femur 0.23 m 0.23 m 1.17 m 0.2 kg Tibia 0.1 m 0.09 m 0.9 m 0.15 kg Tarsus 0.1 m 0.08 m 1.04 m 0.1 kg αmin αmax Fmax Vmax ◦ ◦ Shoulder -35 35 20.0 N/m 0.75 rad/s ◦ ◦ Knee -15 25 20.0 N/m 0.75 rad/s Table 2: Hexaboard’s specification 3.1.2 NMODE parameters To evaluate how well NMODE evolves a locomotion network for a standard hexapod platform, we ran each experiment 10 times with the same set of parameters. From previous experience [17], we decided to focus primarily on the evolution of the connectivity structure and omitted the insertion and deletion of neurons in this set of experiments. Hence, the probability to add or remove a node was set to zero. For the reproduction parameters, we chose a population size of 100 with a selection pressure of 0.1. The elitism parameter is set to 10.0, which we determined empirically. Crossover was set to 0.1. The mutation parameters were set to node modification of 0.01 with a maximal absolute value for the bias of 1.0 and a maximal change of the bias value to 0.01. Edge modification was set to 0.2, with a maximum of 5.0 and a maximal step size of 0.5. Edges can be inserted with a probability of 0.05 and a maximal absolute synaptic strength of 1.0. For the experiment in which the probability of an edge insertion is dependent on the distance of the nodes, the minimal distance was set to 0.1, which means that neurons with a distance smaller than 10 cm are set to 10 cm (this also applies to self-connections). 3.1.3 Fitness Function The fitness function is the summed distance in direction of the initial orientation of Hexaboard, which is along the positive y -axis. Let t = 1, 2, ... , T indicate the time steps, then the fitness function is defined as F = T X y (t). (5) t=1 The reason for using the summed distance instead of the maximal distance is that a small progress in distance leads to higher selection pressure, i.e. significantly more offspring are assigned to individuals which are slightly better than their peers. 3.1.4 Results The plot on the left-hand side of Figure 3 shows the fitness over generations for a uniform insertion of synapses, while the plot on the right-hand side of Figure 3 shows the fitness over generations for distance-based insertion of synapses. The standard deviations and mean values are taken with respect to all selected individuals of all 10 experimental trials. The smaller plots in each figure show the mean and standard deviation for only the best individuals over all 10 experiments. Hence, the large plots show the values for 100 individuals in each generation (10 for each of the 10 experiments), whereas the smaller plots only show the calculated values for 10 individuals (the best of each experiment). Figure 4 shows the resulting walking patterns for three different evolved individuals. 12 Best fitness averaged over 10 experiments (uniform) Best fitness averaged over 10 experiments (distance) 20 000 15 000 Fitness Fitness 15 000 10 000 Fitness averaged over 10 experiments 5000 10 000 Fitness averaged over 10 experiments 5000 0 0 0 10 20 30 40 50 0 Generation 10 20 30 40 50 Generation Figure 3: Hexaboard fitness. Left: Edges are added uniformly, which means that the distance between the connected node is not taken into account. Right: The probability of inserting and edge decreases with the distance between the connected nodes. Both plots show the best fitness averaged over 10 experiments, with the corresponding standard deviation. The picture-in-picture plots show the fitness of all selected individuals in each generation averaged over 10 experiments. For comparison, the best fitness values in each generation is added to the smaller plot as blue line. Figure 4: Examples of evolved walking patterns for Hexaboard. Left and centre: These are two walking patterns that resulted from inserting edges dependent on the distance. Right: The classical tripod walking behaviour that was most dominant when synapses were inserted uniformly. The tripod walking pattern was also found in experiments in which the distance-based approach was used, but there was a larger variety compared to the uniform approach. For the latter, the walking patterns mostly differed in the length of the leg stance and swing phases. Videos of the walking patterns are available online. In the same order as they are shown above: https://youtu.be/a0OtDBHpe1c, https://youtu.be/ UwFKYTIn56w, https://youtu.be/fZlmPTSmCi0. From the results shown in Figs. 3 and 4 we can draw the following conclusions. First, both approaches lead to a good locomotion behaviour already after approximately 10 generations. To the best of the authors knowledge, no similar results were published for any other evolutionary algorithm. The second conclusion is that both approaches, uniform and distance-based insertion of synapses on average lead to similar results. In both cases, the best walking behaviours showed a tripod walking behaviour (see Fig. 4, left-hand side). Note that the fitness function (see Eq. (5)) only favours fast walking but does not reward a specific walking pattern. In the case of the distance-based approach, we see a higher variance in the fitness over the different experiments. This is also reflected in the resulting walking patterns. Two examples of the best behaviours from the ten experiments with distance-based insertion of synapses are shown in Figure 4 (centre and right-hand side). This leads to the conclusion that if optimality is the highest priority, uniform insertion of synapses (position-independent) seems to be the approach of choice, whereas distance-based insertion of synapses should be used if diversity of the solutions is desired. 3.2 Svenja Svenja was chosen for presentation here to demonstrate how NMODE can be used for incremental 13 evolution of complex systems. Svenja’s morphology is significantly more complex compared to Hexaboard for four main reasons. First, each leg has 4 DOF (instead of 2). Second, the leg-pairs significantly differ in their shape and attachment to the main body. Third, the main body is segmented, with a non-even distribution of the weight, in particular, the rear end of Svenja is twice as heavy as the head, which means that the center of mass is not within the convex hull of the leg’s anchor points (see Fig. 2 and Tab. 3). Fourth, due to the leg morphology and weight distribution, Svenja is very likely to flip over if the legs are not moved properly. To further increase the difficulty of the task, we included obstacles in the environment (see Fig. 5, right-hand side). The approach we chose to evolve Svenja is incremental in the sense that we first evolve every leg-pair independently and then merge the resulting networks to evolve the coordination among the legs. As for Hexaboard, evolution was performed as a batch process, with initially fixed parameters. Figure 5 sketches the incremental approach. On the left-hand side, the evolution of each leg pair is shown. The leg-pairs were evolved with a single leg controller, that was mirrored for the other leg, and a CPG that only consisted of connector nodes to the leg modules (one input and one output node per leg module). For the final controller (see Fig. 5, left-hand side), the three leg modules were simply appended in a single XML file. The three disjunct CPGs were appended into a single module, which was then appended to the list of leg modules. A small Python script was enough to automate this process, which also could have been done manually with a simple XML editor. Figure 5 (right-hand side), shows the three different evolutionary settings for the first step of the incremental evolution. The main body is attached to an invisible rail that only allows movements along the z- and y -axes (up/down and forwards/backwards movements). Movements along the x-axes and rotations in general are constrained to zero. Front leg-pair controller copied Centre leg-pair controller copied Rear leg-pair controller copied First step: Evolve individual leg controller Initial controller for the second step Figure 5: Incremental evolution of Svenja. Left-hand side: Controller set-up. First, for each leg-pair, individual controller are evolved (first image on the left hand side). The evolved leg controller are then combined to control the full morphology (second image on the left-hand side). Note that the combination of the three controller is straight forward (see text for details). Right-hand side: The corresponding evaluation environments in YARS. From left to right and top to bottom, rear legs, centre legs, front legs, and full morphology. In the following paragraphs, we will first give the specifications of the morphology, then describe the NMODE parameters and fitness function, before the results are presented. 3.2.1 Morphology Svenja has 4DOF of which the first are located in the first joint. This means that the femur can be rotated around two axes simultaneously (see Fig. 2). The other two DOFs allow rotations around a single axes and connect the femur with the tibia and the tibia with the tarsus. Svenja’s main body 14 consists of three segments. This affects the centre of mass of the entire system. The head and main segments (two which all legs are attached) have a weight of 10 kg, whereas the rear segment has a weight of 20 kg. The full specifications of Svenja are summarised in Table 3 (see Appendix). 3.2.2 NMODE parameters During the first phase, three independent evolutionary experiments were conducted, one for each leg pair. In all runs (repeated five times each), we used the same NMODE parameters, which are set to; life time is 500 iterations, generations are limited to 250, population size is set to 50, elite pressure is set to 5.0, with a cross over probability of 0.25, node mutation probability is set to 0.1, with a maximum of 1.0 and maximal step width of 0.2, nodes are added with with a probability of 0.1 (and a maximal bias values of 1.0) and deleted with with probability of 0.1, edge mutation probability is set to 0.3, with a maximum of 5.0 and maximal step width of 1.0, edges are added with with a probability of 0.05 (and a synaptic strength of 1.0) and deleted with with probability of 0.05. 3.2.3 Fitness function The main part of the fitness is equivalent to the fitness function used for Hexaboard, which means that we used the sum over the main body’s y -coordinate in the world coordinate frame. For the evolution of the leg pairs, an additional punishment was added for changes of the main body’s z-coordinate. This means that in principle each evolved leg pair run could result in different walking heights as long as the main body height changes were minimal. The fitness function read as: F = t X [y (t) − γ(z(t) − z(t − 1))], (6) t=1 where z(0) is the initial position of the main body before the simulation is iterated for the first time. 3.2.4 Results The results are captured in Figure 6 and Figure 7. Figure 6 shows the fitness over generations for the leg pairs (five runs each) and the evolution of the merged leg-pair controller. Figure 7 shows the final behaviour for a sequence in which Svenja climbs over an obstacle. Videos of all evolved behaviours can also be found online4 . The first observation is that the front legs seem to be more difficult to evolve than the other two leg pairs. It took about 100 generations to evolve a good behaviour compared to approximately 10-20 generations for the centre and rear leg pairs. The reason is that the way the front legs are attached to the main body makes it more difficult for them to climb over the obstacles (see Fig. 5, right-hand side). In early generations, each leg-pair’s controller would start with oscillatory movements of low amplitude and high frequency. For the rear and centre leg-pairs small increases of the amplitude would already increase the likelihood of climbing the obstacle, while the front legs would still be blocked by the first obstacle. The reason is that the oscillatory leg movements of the first leg pair repel the main body more easily from the obstacle than it is the case for the other leg pairs. Another observation is that the combined controller very quickly learned to coordinate the leg pairs. Remember that each leg pair was evolved independently, with no restriction of the walking height or walking pattern. Yet, within less than 10 generations the first coordination occurs. After approximately 20 generations a good walking behaviour has been found which is shown in Figure 7. In total, the evolution of a good walking behaviour for Svenja required only a few of hours of CPU time. It must be noted again, that this process was done as a batch process, and hence, the 4 https://www.youtube.com/playlist?list=PLrIVgT56nVQ7zwLRxUeEEXgxpFhIJk1BY 15 Front legs Centre legs 3000 1500 2500 Fitness Fitness 2000 1500 1000 1000 500 500 0 0 50 100 150 200 0 250 0 50 100 150 200 250 Generation Generation Rear legs Combined controller 2000 2.5 × 105 2. × 105 Fitness Fitness 1500 1000 500 1.5 × 105 1. × 105 5. × 104 0 0 50 100 150 200 250 Generation 20 40 60 80 Generation Figure 6: Fitness of Svenja controller over generations. For the final controller (lower right-hand side), the best individuals for the five runs of each leg pair were chosen. For details, please read the main text. final behaviour is not optimal with respect to size, robustness, etc. Still, this experiment shows that a behaviour for a complex morphology such as Svenja can be learned very fast with NMODE. 4 Discussion We presented a novel approach to artificial evolution of neural networks and demonstrated its applicability in two experiments. NMODE was not developed isolated from current research in evolutionary robotics, rather ideas of different approaches were combined in a minimalistic way. NMODE builds upon the main authors own experience in evolutionary robotics (ISEE), experience with a collaborator’s software framework (NERD) and own experience and literature research on the currently most dominant approach (HyperNEAT). We showed that NMODE is able to evolve a locomotion behaviour for two different hexapod experiments in very few generations. To the best of the authors knowledge, no similar results have been published so far, which shows the usefulness of NMODE in generating interesting behaviours for complex morphologies. This said, the development of NMODE is not completed yet. On the short-term, we will evaluate NEAT as a method to evolve the networks within a module to allow crossover between modules instead of completely switching modules. In addition, we will also include NEAT’s speciation method to protect innovations. Most importantly, We will have to show that NMODE is able to evolve non-reactive behaviours for complex morphologies, which is the topic of ongoing experiments. 16 Figure 7: This figure shows the walking behaviour of Svenja. Frames 28, 37, 46, 58, 66, and 75 are shown here (rendered with blender), which is equivalent to approximately 2.5 s. 5 Acknowledgement This work was partly funded by the DFG-SPP 1527 ,,Autonomous Learning” References [1] Auerbach, J.E., Bongard, J.C.: Environmental influence on the evolution of morphological complexity in machines. PLoS Comput Biol 10(1), 1–17 (2014) [2] Blender Foundatation: blender 2.78a. www.blender.org (2017) [3] Braitenberg, V.: Vehicles. MIT Press, Cambridge MA (1984) [4] Clune, J., Beckmann, B.E., Ofria, C., Pennock, R.T.: Evolving coordinated quadruped gaits with the hyperneat generative encoding. In: Proceedings of the Eleventh Conference on Congress on Evolutionary Computation, CEC’09, pp. 2764–2771. IEEE Press, Piscataway, NJ, USA (2009) [5] Clune, J., Lipson, H.: Evolving 3d objects with a generative encoding inspired by developmental biology. SIGEVOlution 5(4), 2–12 (2011) [6] Coumans, E.: Bullet physics simulation. In: ACM SIGGRAPH 2015 Courses, SIGGRAPH ’15. ACM, New York, NY, USA (2015) [7] Cover, T.M., Thomas, J.A.: Elements of Information Theory, vol. 2nd. Wiley, Hoboken, New Jersey, USA (2006) [8] Cruse, H.: What mechanisms coordinate leg movement in walking arthropods? Trends in Neurosciences 13(1), 15 – 21 (1990) [9] Cruse, H., Kindermann, T., Schumm, M., Dean, J., Schmitz, J.: Walknet—a biologically inspired network to control six-legged walking. Neural Networks 11(7–8), 1435 – 1447 (1998) 17 [10] Dieckmann, U., Pasemann, F.: Coevolution as an autonomous learning strategy for neuromodules. In: Proceedings of the European Conference on Artificial Life (ECAL’95). Granada, Spain (1995) [11] Ekeberg, Ö., Blümel, M., Büschges, A.: Dynamic simulation of insect walking. Arthropod Structure & Development 33(3), 287 – 300 (2004) [12] Ghazi-Zahedi, K.: NMODE Github Repository. https://github.com/kzahedi/NMODE (2016) [13] Ghazi-Zahedi, K.: YARS Github Repository. https://github.com/kzahedi/YARS (2016) [14] Ghazi-Zahedi, K.M.: Self-regulating neurons. a model for synaptic plasticity in artificial recurrent neural networks. Ph.D. thesis, Univeristy of Osnabrück (2009) [15] Holland, J.H.: Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control and Artificial Intelligence. MIT Press, Cambridge, MA, USA (1992) [16] Ijspeert, A.J.: Central pattern generators for locomotion control in animals and robots: A review. Neural Networks 21(4), 642 – 653 (2008) [17] Markelić, I., Zahedi, K.: An evolved neural network for fast quadrupedal locomotion. In: M. Xie, S. Dubowsky (eds.) Advances in Climbing and Walking Robots, Proceedings of 10th International Conference (CLAWAR 2007), pp. 65–72. World Scientific Publishing Company (2007) [18] Montúfar, G., Ghazi-Zahedi, K., Ay, N.: A theory of cheap control in embodied systems. PLoS Comput Biol 11(9), e1004,427 (2015) [19] Nicholas Cheney, J.C., Lipson, H.: Evolved electrophysiological soft robots. In: Proceedings of the Fourteenth International Conference on the Synthesis and Simulation of Living Systems (ALIFE 14) (2014) [20] Nolfi, S., Floreano, D.: Evolutionary Robotics. MIT Press (2000) [21] Open Robotics Foundation: (2016). URL http://gazebosim.org [22] Rempis, C., Thomas, V., Bachmann, F., Pasemann, F.: NERD Neurodynamics and Evolutionary Robotics Development Kit, pp. 121–132. Springer Berlin Heidelberg, Berlin, Heidelberg (2010) [23] Risi, S., Stanley, K.O.: An enhanced hypercube-based encoding for evolving the placement, density, and connectivity of neurons. Artif Life 18(4), 331–63 (2012) [24] Secretan, J., Beato, N., D’Ambrosio, D.B., Rodriguez, A., Campbell, A., Folsom-Kovarik, J.T., Stanley, K.O.: Picbreeder: A case study in collaborative evolutionary exploration of design space. Evolutionary Computation 19(3), 373–403 (2011) [25] Sims, K.: Evolving 3d morphology and behavior by competition. Artificial Life 1(4), 353–372 (1994) [26] Sims, K.: Evolving virtual creatures. In: SIGGRAPH ’94: Proceedings of the 21st annual conference on Computer graphics and interactive techniques, pp. 15–22. ACM, New York, NY, USA (1994) [27] Stanley, K.O., Miikkulainen, R.: Evolving neural networks through augmenting topologies. Evol. Comput. 10(2), 99–127 (2002) [28] Streeting, S., Xie, J., Castaneda, P.J., Muldowney, T., Doyle, J., O’Sullivan, J., van der Laan, W.J.: Ogre. http://www.ogre3d.org (2006) 18 [29] Twickel, A., Büschges, A., Pasemann, F.: Deriving neural network controllers from neuro-biological data: implementation of a single-leg stick insect controller. Biological Cybernetics 104(1-2), 95– 119 (2011) [30] von Twickel, A., Hild, M., Siedel, T., Patel, V., Pasemann, F.: Neural control of a modular multilegged walking machine: Simulation and hardware. Robotics and Autonomous Systems 60(2), 227 – 241 (2012) [31] Zahedi, K., Martius, G., Ay, N.: Linear combination of one-step predictive information with an external reward in an episodic policy gradient setting: a critical analysis. Frontiers in Psychology 4(801) (2013) A Svenja specification Bounding Box (x,y,z) Head 0.614 m 0.614 m 0.812 m Main Body 0.976 m 1.107 m 0.552 m 0.832 m 1.643 m 0.860 m Rear 0.612 m 0.945 m 0.977 m Front femur Front tibia 0.204 m 0.297 m 0.901 m Front tarsus 0.611 m 1.026 m 0.444 m Centre femur 0.767 m 0.230 m 1.972 m Centre tibia 0.103 m 0.094 m 0.909 m Centre tarsus 0.973 m 0.083 m 0.436 m Rear femur 0.804 m 1.283 m 1.004 m Rear tibia 0.273 m 0.417 m 0.897 m Rear tarsus 0.729 m 1.230 m 0.446 m αmin αmax Fmax ◦ ◦ Front Ma-Fe 1 -5 20 7.5 N/m Front Ma-Fe 2 -25 ◦ 35 ◦ 7.5 N/m Front Fe-Ti -10 ◦ 10 ◦ 7.5 N/m ◦ ◦ Front Ti-Ta -30 5 7.5 N/m ◦ ◦ Centre Ma-Fe 1 -0.5 45 7.5 N/m ◦ ◦ Centre Ma-Fe 2 -45 45 7.5 N/m Centre Fe-Ti -30 ◦ 5◦ 7.5 N/m ◦ ◦ Centre Ti-Ta -2.5 45 7.5 N/m ◦ ◦ Rear Ma-Fe 1 -5 20 7.5 N/m ◦ ◦ Rear Ma-Fe 2 -30 20 7.5 N/m ◦ ◦ Rear Fe-Ti -5 27.5 7.5 N/m ◦ ◦ Rear Ti-Ta -25 20 7.5 N/m Mass 10.0 kg 10.0 kg 20.0 kg 2.0 kg 1.5 kg 1.0 kg 2.0 kg 1.5 kg 1.0 kg 2.0 kg 1.5 kg 1.0 kg Vmax 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s 0.5 rad/s Table 3: Svenja’s specification. Please note, that the domains for the angular position are given for the legs on the right side. Depending on how the joint is attached, the values have different meaning, i.e., in which direction the leg will move give an specific value. The numbers are presented here to given an impression of the leg’s moving ranges. 19
9cs.NE
A DISCRETE ANALYSIS OF METAL-V BELT DRIVE A. KARAM and D. PLAY Université Libanaise Faculté des sciences II FANAR-MATEN B.P. 90656 Lebanon Abstract The metal-V belt drive includes a large number of parts which interact between them to transmit power from the input to the output pulleys. A compression belt composed of a great number of struts is maintained by a tension flat belt. Power is them shared into the two belts that moves generally in opposite directions. Due to the particular geometry of the elements and to the great number of parts, a numerical approach achieves the global equilibrium of the mechanism from the elementary part equilibrium. Sliding arc on each pulley can be thus defined both for the compression and tension belts. Finally, power sharing can be calculated as differential motion between the belts, is defined. The first part of the paper will present the different steps of the quasi-static mechanical analysis and their numerical implementations. Load distributions, speed profiles and sliding angle values will be discussed. The second part of the paper will deal to a systematic use of the computer software. Speed ratio, transmitted torque, strut geometry and friction coefficients effect will be analysed with the output parameter variations. Finally, the effect pulley deformable flanges will be discussed. I - Introduction The metal V-belt of VAN-DOORNE type [1], is used in C.V.T. mounted on cars. The pulleys are kept at a fixed axis distance and are subjected to axial forces which can be varied in order to adapt the radius of the belt wrapped on the pulleys so as to obtain different speed ratios. The belt (Fig. 1 a-b) consists of one set of thin flexible steel bands (or flat belt) on which rides a large number of small steel blocks (struts), whose lateral surfaces are in contact with the flanges of the pulleys. During the motion, a strut on the driving pulley is carried forward by the pulley via the interfacial friction between the pulley and the strut. Thus, a strut is pressed on the preceeding strut, generating a compressive force between them. This compressive force increases as the struts travel from the leading edge to the trailling edge of the driving contacting arc. On the driven pulley, this compressive force decreases until the end of the contact arc. Power is then transmitted from the driving pulley to the driven pulley through the linear compressed struts zone (upper part of the figure, Fig.1). Further, the flat belt do not only serve as a track constraints for the travelling struts, but also works as a part of the power transmission. The tight side of the flat belt is generally located at the lower linear zone (Fig.1). Fig. 1: Geometry and Modelization of C.V.T. transmission A fine knowledge of the behaviour of each mechanical part is obviously necessary to insure the life and the reliability of the system. As the experimental tests become more and more expensive, numerical models permit to give data for design considerations. Thus final experimental tests serve only for last minor modifications. Moreover, optimization of the car performances passes through the interactions between the mechanical system and the microprocessored actuators. For exemple, the axial force applied on the moveable flanges of the pulleys must be adapted in order to insure the transmitted torque conditions with a maximum life of the elements. Thus, the knowledge of mechanical governing parameters becomes necessary to design efficient actuators. The litterature on metal V-Belt behaviour appeared during the last decade [3-4-5]. All the papers are based on the wellknown approach of the V-belt behaviour proposed by Gerbert [6]. Their purposes were to establish models for this highly decretized V-belt. Various hypothesis have been made in order to get a first understanding of the behaviour. The purpose of this paper is to make a generalization of a model proposed in 1987 by the author [5] in order to obtain more details on the mechanical parameter variations. New geometries are also included and consequently the equations are redevelopped. This paper will present: - a theoretical mechanical analysis with the classical hypothesis of general mechanics, - a calculating numerical process and the resulting computing architecture, - results and discussion. II - Theoretical analysis and resolution The modelling of a mechanical system is complicated as the number of parts is large. The interaction between parts are also amplified if the stiffness variations gives changes of the initial geometry. On the other hand, into a metal V-belt drive, the set of parts is moving and the relative motions depend on the working conditions and the whole mechanical equilibrium. It is then necessary to describe simultaneously the equilibrium of all parts and the kinematic conditions. Due to the large number of parts, the resolution of the equations must be numerical. As the initial conditions are not fixed, the numerical resolution is iterative. In this first paragraph, the steps of calculations are summarized in a such way to facilitate the numerical resolution. The details of the modelization are given elsewhere [7]. II-1 Hypotheses The following hypotheses have been made in order to modelize the system: - the steel struts are always in compression that means an initial tension is considered when the metal V-belt is at rest, - the two sets of bands are identified as one flat belt which holds the struts in a symetrical manner, the analysis is thus bi-dimensionnal, - the flat belt is very rigid and its length is thus, considered constant during the motion. The strut are seeing more deformable due to their geometry. - the flanges of the pulleys will be considered rigid during the analysis. Note that a discussion on the effect of the deformable flanges will be made at the end of the paper. The model takes also into consideration the following assumptions: - the coefficients of friction of flat belt/struts and struts/pulleys is considered through the Coulomb model at this level of the mechanical analysis of the behaviour, - the radial and tangential displacements of struts occur relatively to the flat belt and the flanges of the pulleys, - full rotations of struts take place at their entry in the contacting arc, without futher variation of angular position until the end of the contact, - the strains of struts follow a classical bulk material law. After these hypotheses, the theorical analysis is detailled in three paragraphs:- Strut equilibrium - flat belt equilibrium - global equilibrium. II-2 Strut equilibrium During the study of strut equilibrium, the following simplified hypotheses are established: - a strut stays in a radial position, AiBi constitutes linear cord, AiA'i and BiB'i are supposed to be transversal contacts lines between the struts [(i+1),i] and [i,i-1], - the action between the pulley and a strut is characterized by a squew applied on the contact pulley strut surface at the Mpi point (fig. 2-a), - the inertia forces, operating only on the contacting arcs of the pulleys are radial. Fig. 2: Free body definition By application of general mechanical rules, the following equations are obtained: -Xi-1 + Xi cos(j) + 2 XLi + 2 Xpi = 0 Xi sin(j) + 2YLi + 2YPi + YGi = 0 -2ypi XPi + 2xpi YPi + xG YGi + 2xli YLi + R(cos(j)-1)Xi-1 + 2CPi = 0 where (xpi,ypi) is a coordinate of MPi, xG is an abscissa of G, xli = l/2, torque CPi is applied on a strut. Thus, this third equation is used only for the determination of CPi. II-3 Belt equilibrium The internal forces considered into the flat belt are longitudinal traction forces. Bending strengh and cordal effect are neglected. The equilibrium of a flat belt element which spreads out on a strut (fig. 2-b) gives the following equations: Fi-1 cos(j) - Fi - 2 XLi Fi-1 sin (j) + 2 YLi = 0 =0 The forces XLi and YLi applicated by the strut on the flat belt element are related to the Coulomb's model and to the direction of the relative motion between the two mechanical elements. XLi = µL Li YLi where Li is a coefficient equal to  1 whose the sign is defined by the relative motion. By substitution, the preceeding equations give: Fi = ALi Fi-1 where ALi = (cos i + µL Li sin i) If N1, N2 are respectively the number of struts into the contact arc 1 and 2, the global equilibrium of the flat belt is expressed by: FN2,2 = Fsup = F1,1 FN1,1 = Finf = F1,2 For j = 1,2 (j=1 : driven pulley, j=2 : driving pulley): Fi+1,j = ALi,j Fi,j. Then writing all the forces: N1 Finf = II ALi,1 Fsup; i=1 N2 Fsup = II ALi,2 Finf i=1 The result of the substitution is: N1 N2 II ALi,1 II ALi,2 = 1 i=1 i=1 This equation will be used later to determinate the average velocity VL of the flat belt. II-4 Struts/pulleys Interaction The contact between pulley/strut generates tangential force TPi and a normal force NPi which are related by the Coulomb's model: |TPi| < µp |NPi|. TPi is situed into the contact plane (strut-pulley). It makes an angle  pi (called sliding angle) with the tangential direction (Fig. 3-a). The components are related by: YPi = NPi sin  + TPi cos sin(  XPi = TPi cos  pi ) ZPi = NPi cos - TPi sin sin(  RPi = XPi tg(  pi ) pi pi ) ) a) Slipping of struts between the conic flanges of the pulleys. b) Velocity profile of struts and flat belt. fig. 3: Modelization of kinematic conditions Each contact arc is subdivised in two zones: - an adherence zone, where the actions between the struts X i and the actions of pulleys on these struts stay constant: Xi = Xi-1 ZPi = ZPi-1 - a sliding zone, where the forces decrease on the driven pulley and increase on the driving pulley. XPi =µpi YPi with µpi=[µp cos(  pi )]/[sin+ µp sin(  pi ) cos] The sliding angle  pi is defined by the deformations of a strut from a position (i) to an other position (i+1):  = Arctg[-GRi/GTi] where GRi and GTi are repectively the radial and tangential motion of the strut. Note that GT and GR are calculated from a global experimental nonlinear relation between load and displacement (Fig. 3-a). pi II-5 Strut Velocities The struts keep a constant velocity along the adherence zones of the contact arcs. Along the sliding zones, the velocity varies in an opposite manner to the actions Xi. Eurther, we assure that GR and GT are independant parameters. VTi = li/(  t) = VTi-1 +(  li)/(  t) so: VTi = ([1 - (  li-1)/l]/[1 - (  li)/l]) VTi-1 The velocity profile (Fig. 3-b) can be deduced. Note that at each entry and exit of the belt circular zones on the pulleys, a discontinuity apears because of the strut contact location change. Thus, a parameter a/Ri must be introduced. II-6 Flat belt velocity The flat belt is supposed to be rigid longitudinally comparing to the strut deformations. A constant average velocity VL is thus considered. A presupposed known velocity profile is considered (that means a known struts velocity) in order to calculate this velocity (Fig. 3-b). The two struts NL1 and NL2 are considered to have the same velocity which is the looked for one. With the global equilibrium equation of the flat belt and the passing over all contact arcs, determination of VL becomes possible. II-7 Global Equilibrium of C.V.T. The two linear strands and two contact arcs constitute the four zones along the belt. The flat belt equilibrium in each of these zones can be described by knowing the forces imposed on the extremites of the considered zones (fig. 1-b). By isolating the two parts (driving and driven) of the C.V.T., the following equations are written: FAXE = (Fsup + Finf - Psup - Pinf) sin(1) C2 = (R2 + GR2) Psup - R2 Pinf - (R2 + a + GR2)Fsup+ (R2 + a)Finf C1 = (R1 + GR1)Pinf -R1 Psup - (R1 + a + GR1)Finf+ (R1 + a)Fsup II-8 Power and efficency calculation These calculations are made when all the system equilibriums are established. If the torque on the two pulleys and the rotation velocity of each pulley are knwon, the power calculation is obvious: PW2 = C2 W2 and PW1 = C1 W1 The efficency is given by the following expression: µ = -PW1/PW2 In the upper and lower strands, the forces PSUP, PINF, FSUP and FINF are transmitted from the driving pulley to the driven pulley. Then, in these strands, no power loss is considered. The global loss of power is obtained by PW1 + PW2 with PW1 < 0. II-9 Method of Resolution and Computer Program The system of equations is solved in order to obtain all desired results. Considering the complexity of the system and the dependence between all variables, an iterative solving method is used. It always insures: - a forces equilibrium: N2  Zpi(i, 2)  FAXI i 1 - a geometrical equilibrium |  LM| <  where  LM is the difference between the length of the flat belt and the sum of strut thicknesses. Note that the strut thickness variations are calculated with the forces Xi from a non linear experimental compression curve. The calculation is done in three steps (Fig. 4): Fig. 4 : Flow chart of the computer softwere - Input data by reading data files (INPUT), - variables initialization considering a rigid model (CINIT), - following variables calculations are made with iterative methods (CITER). The iterative process of the system equilibrium is done then into the computer module CITER. This module calculates: - NG and NL by the equilibrium of torque (for NG) and the tension in the belt (for NL), - FAXI, the force imposed on the driving pulley, and FAXE a force inter-axes pulleys (Loop 2). The numerical secant methode has been used in order to obtain the convergence between the sum of the calculated individual strut-pulley interactions ZPi and the imposed input value of FAXI, - determination of FSUP which consists in turn of the determination of action XL, YL, PSUP, PINF, FINF, Xi, XP, YP, and the calculation of radial and tangential slidings of struts (that means  pi angles).After the achievement of the geometric compatibility, the angle  pi along the adherent zone are calculated from the computing module CRAD1. Finally, the velocity of struts and flat belt, the power distribution, the efficency, the relative motion of flat belt in relation to the struts and the distribution of powers are calculated. The power distribution can be visualized (Fig.5). Note that for the same input power (15706 W), two input mechanical conditions give two different power distributions: - in the figure 5-a, the input power is subdivized into the strut-power and flat belt power. As the struts along the driving contact arc drive the flat belt, the same counter clock wise power circulation is observed, - in contrary in the figure 5-b, the struts along the driven contact arc drive the flat belt. Then, in the driving zone, the strut power is the sum of the input power and the flat belt power. (a)- (R2R1=1, C2=60 Nm, MUL=0,01, MUP=0,12) (b)- (R2R1=1,4, C2=60Nm, MUL=0,01, MUP=0,12) Fig. 5 : The power distribution between different parts of system III - Results and discussion For one reduction ratio, a fixed inter-axe, an input torque, an axial force imposed on the driving pulleys and an initial load F0 (An initial load is necessary to insure the initial compression of the struts), the computer program gives the following results (Fig. 6): - tension in flat belt Fig. 6-a), - normal action pulley/struts (NP Fig. 6-b), - sliding angle (  p Fig. 6-c), - velocity of struts (VT Fig. 6-d), - pressure between struts (X Fig. 6-e), - amplitude of the sliding displacement between struts and pulleys Y [ Y  GT2 + GR2 ) ] (Fig. 6-f). - tangential action flat belt/struts (XL Fig. 6-g), - circumferential action pulleys/struts (XP Fig. 6-h), normal action pulleys/struts NPi 2150 tension in belt 2140 2130 2120 2110 2100 2090 2080 2070 0 20 40 60 80 0 -50 0 20 40 60 80 -100 -150 120 100 80 60 0 20 40 60 80 0 20 40 60 80 14,62 14,60 14,58 14,56 14,54 1000 800 600 400 200 0 0 10 20 30 40 50 60 70 80 sliding modulus struts/pulley Y 1200 1,6e-6 1,4e-6 1,2e-6 1,0e-6 8,0e-7 6,0e-7 4,0e-7 2,0e-7 0,0 0 circ. action pulleys/struts pressure between struts X tangential action belt/struts XL 140 14,52 -200 0,6 0,4 0,2 0,0 160 14,64 50 velocity of struts VT sliding angle  100 180 0 10 20 30 40 50 60 70 80 -0,2 -0,4 -0,6 20 40 60 80 20 10 0 0 10 20 30 40 50 60 -10 -20 -30 Driving Pulley Driven Pulley Fig. 6 : Numerical results issued from the computer, versus the position of struts along the contact arc (R2R1 = 1, C2 = 60 Nm, MUL = 0,01, MUP = 0,12) Note that, on the figure 6: - the pressure X between struts is constant along the adherence zone. It increases after that on the driving pulley (from the strut NG2) and decreases on the driven pulley (from strut NG1), - a change of the sign of the tangential action (XL) when the relative motion flat belt /struts is reversed, - the circonferencial action pulleys/struts (XP) depends on the sliding direction of struts in relation to pulleys. This action is positive on the driven pulley (the struts slides forward this pulley) and negative on the driving pulley (the struts slides backward), - the tension in the flat belt increases until NL1 and decreases after that to reach the value FSUP. On the driven pulley, this 70 80 evaluation is inverted on the driving pulley : decreasing until the strut NL2, then increasing to arrived to the FINF value. Note that the ratio Finf/Fsup is very dependant of the coefficient of friction µL between belt/struts [7] while it is practically independant of the others parameters, - the normal action pulley/struts (NP) is constant in the adherence zone (like the pressure between the struts). On the driving pulley, this action decreases, but it increases in the driven pulley. Therefore, this value stays more important on the driving pulley, - the struts velocity VT varies in the same way as the normal action. In the adherence zones, velocity does not vary. In the figure, note that the velocity along the linear strand is not represented, - the sliding angle ( p) on the driven pulley is comprised between 0° and 90°, the strut is backward pulley. On the driving pulley, it is in the sliding zone between -90° and -180°, the strut is then forward, - amplitude of the sliding displacement of a strut in relation to VT and p increases on the driven pulley (in the sliding zone) and decreases in the driving pulley. The computer program gives also other results as the efficency of the mechanical system, the percentage of the transmitted power by the flat belt and the struts, the way of distribution of power in the different parts of the system, the relative motion between the flat belt and the struts. III-1 Influence of input parameters The input parameters such as speed or reduction ratio R2R1, input torque C2, the friction coefficients MUL and MUP influence the results. In order to know the variation of the following results: - efficency, - percent of power transmitted by the flat belt, - tension in the lower strand of the flat belt, - pressure between the struts in the upper strand. - axial force imposed on the flanges of driving pulley, systematic numerical tests have been made in order to visualize tendencies depending on these parameters. When one parameter varies the others are kept constant and equal to : R2R1=1, C2=80Nm, MUL=0,01, MUP=0,12. III-2 The Efficiency In all cases, the general efficiency is high (more than 97% approximately). It is due to the hypothesis on power loss where different causes are ignored (contribution of friction between struts, hysteresis of materials, polygonal effect). Efficiency varies a little with the input parameters. In fact, for a reduction ratio R2R1 smaller than 1, the efficiency increases, but for a mulptiplicator C.V.T., the efficiency decreases with the ratio (Fig.7). This result is in accordance with experimental results and with conclusions of the litterature. For a ratio equal 1, the efficiency is pratically constant versus the torque (fig.7) and with the struts/pulley friction coefficient (fig.7) and increases with the flat belt/struts coefficient of friction. Fig. 7 : Variations of C.V.T. efficiency ETA with design parameters III-3 Percentage of transmitted power by the flat belt (%AME) Lubrication govern obviously the C.V.T. behaviour. In a global approach, average coefficients of friction have been considered. The distribution of the power between the different parts of the system is essentially related to the friction coefficients between the flat belt/struts (MUL) and struts/pulleys (MUP). Considering the friction coefficient between the flat belt and the struts, the percentage of transmitted power by the flat belt increases in relation to the coefficient (MUL). The parameter %AME decreases for a ratio R2R1 which increases between 0,8 and 1,4 and for a coefficient of friction struts/pulley between 0,05 and 0,12 (fig. 8). Fig. 8 : Variations of the inner power %AME transmitted by the flat belt III-4 The tension in the lower strand of the flat belt (FINF) The input torque is the more influent parameter on FINF. This tension FINF increases with this torque C2 (Fig. 9) as the percentage of power was shown to increase with torque. It decreases with the R2R1 ratio and the increasing of the struts/pulleys and flat belt/struts friction coefficients. Fig. 9 : Elongation force Finf into the lower part of the belt III-5 The pressure between the struts in the upper strand (PSUP) The pressure between the more compressed struts (in the upper strand) decreases with an increasing of reduction ratio (Fig. 10) and flat belt/struts friction coefficient (Fig. 10). This pressure increases with the input torque (Fig. 10) and the struts/pulleys friction coefficient(Fig. 10). Fig. 10 : Elongation fore Psup into the upper part of the struts III-6 The axial force imposed on the flanges of driving pulley (FAXI) Remember that the first part of this paper considers rigid flanges of the pulleys. The force applied on the flanges of the pulleys FAXI is governed by the input parameters (Fig. 11). FAXI decreases when the ratio R2R1 increases. The same trend is observed with the variations of the friction coefficients. FAXI increases obviously with torque. Fig. 11 : Variation of C.V.T. axial force FAXI with design parameters III-7 The initial tension F0 The initial tension F0 is acheived by adding struts when the belt have a global circular shape before mounting on the pulleys. Two zones are isolated from the figure, the larger F0 gives the higher efficiencies. The other parameters increases with F0 (Fig. 12). From a global point of view, the non linear deformations of the struts ask for a sufficient initial F0 in order to limit compressive displacement variations. It must be also pointed out that the flat belt becomes influent only for large F0. Fig. 12 : Initial tension F0 influence IV- Discussion Incerted in the contacting arc, the strut (i) exerts an axial force ZPi on the flange of the pulley. This forces provokes a deformation, and concequently, the flange displaces axially of the quantity EKF(ZPi). so, the flange has gaps with respect to the position (i-1) of the quantity: EKF(ZPi) - EKF(ZPi-1) where EKF is the fonction of the flange displacement by terms of the applied force of the pulley and the considered strut. This function has been determinated by the Finite Element program (AMME) [8,9,10]). It is noted that this function is not lineare. The deformation of the flange leads an additional sliding of the strut in the pulley grouve. In effect, the position (i-1) to another one (i), the flanges of the pulley have gaps of the quantity  ai (  ai = 2[EKF(ZPi) - EKF(ZPi-1)]). It provokes a radial sliding of the strut with a quantity GRPi: GRPi = - [  ai]/[2sin()]. The deformation of the struts provokes the radial sliding at the quantity GRMi: GRMi = -[EKL(ZPi)-EKL(ZPi-1)]/[2sin()]. So the radial sliding GRi becomes the som: GRi = GRPi + GRMi. In the adherent zone, we supposed that the force ZPi rests constants because the displacements induced by the flange deformations are small. Consequently, a radial sliding curve of the struts (due to the pulley deformation) is obtained. V- Conclusion The metal V-belt is a highly discretized mechanism with a large number of parts. The relative motion of the elements adds to the difficulties of the mechanical behaviour modelization. A theoretical study has been made with the equations of the general mechanics in a quasi-static working case. The originality of this approach lies on the consideration of the whole system constituted by an large number of interactive components. A computer software has been developped in order to make numerical simulations as the cost of experimental simulations become too expensive. The results have shown that: - the distribution of power between the different parts of the system is governed by the control of the friction coefficients, - the efficiency of the system depends essentially on the rigidity of the materials of struts. The use of less rigid materials than the steel struts reduce the efficiency, -the initial tension F0 has an influence on the results from a lower limit. Acknowledgement A part of this work have been made under industrial contract and the authors wish to thank Mr Douhairet and Trinquard for their helpfull comments. References [1] - VAN DER VEEN S.C. "Transmatic variable drive transmission" Hydraulic Pneumatic Mechanical Power Drives, Transmissions and Control Vol. 23. N°268 April 77 P 133-140. [2] - SWAIN J.C., KLAUSING T.A., WILCOX J.P. "Design study of steel V-Belt C.V.T. for electric vehicles" NASA CR159845 June 1980, 122 P. [3] - GERBERT, B.G. "Metal-V-Belt Mechanics", 1984, ASME paper 84-DET-227 9 P. [4] - SUN, D.C. "Performance Analysis of Variable Speed-Ration Metal V-Belt Drive". J. Mech. Transm. Autom. Des., Transactions of the ASME Vol. 110, December 1988, pp 472-481. [5] - CARVAJAL, J.M. VILLECHAISE, B. PLAY, D. "C.V.T. transmissions analysis, A Mechanical discrete analysis with computer". Proceedings of the 1987 ASME International Computers in Engineering Conference August 1987, New York, vol. 3, pp. 461-465 [6] - GERBERT, B.G. "Force and slip Behaviour in V-belt Drives", Acta polytechnica Scandinavica, Mechanical engineering series N° 67 Helsinki 1972, 101 P. [7] - KARAM A. "prévision de comportement et conception de variateur continu de vitesses. Application courroies trapézoïdales poussantes et tirantes." PhD INSA LYON July 1991. N° 91 ISAL 0051, 222 P. [8] - RIGAL J.F. "ANALYSE ET MODELISATION DES SYSTEMES MECANIQUES EN CONCEPTION ASSISTEE PAR ORDINATEUR. Application à la simulation du comportement statique des boîtes de transmission de puissance d'hélicoptères" PhD INSA LYON december 1989. N° 89 ISAL 0095, 243P. [9] - RIGAL J.F. and PLAY D. "Preliminary Design and Load Distribution of High Performance Mechanical Systems." ASME Congress: Computers in Engineering 89, Anheim Californie, USA, 1989, Vol.2,p.93-103 [10] - RIGAL J.F. and PLAY D. "Numerical Model Definition in te First Stages of Computer Aided Design." ASME Congress: Computers in Engineering 90,Boston, USA, 1990, Vol. 1, p. 309315
5cs.CE
Noname manuscript No. (will be inserted by the editor) Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets Tushar Rao · Saket Srivastava arXiv:1212.1107v1 [cs.CE] 5 Dec 2012 Received: 5th December 2012 Abstract Emerging interest of trading companies and hedge funds in mining social web has created new avenues for intelligent systems that make use of public opinion in driving investment decisions. It is well accepted that at high frequency trading, investors are tracking memes rising up in microblogging forums to count for the public behavior as an important feature while making short term investment decisions. We investigate the complex relationship between tweet board literature (like bullishness, volume, agreement etc) with the financial market instruments (like volatility, trading volume and stock prices). We have analyzed Twitter sentiments for more than 4 million tweets between June 2010 and July 2011 for DJIA, NASDAQ-100 and 11 other big cap technological stocks. Our results show high correlation (upto 0.88 for returns) between stock prices and twitter sentiments. Further, using Granger’s Causality Analysis, we have validated that the movement of stock prices and indices are greatly affected in the short term by Twitter discussions. Finally, we have implemented Expert Model Mining System (EMMS) to demonstrate that our forecasted returns give a high value of R-square (0.952) with low Maximum Absolute Percentage Error (MaxAPE) of 1.76% for Dow Jones Industrial Average (DJIA). We introduce a novel way to make use of market monitoring elements derived from public mood to retain a portfolio within limited risk state (highly improved hedging bets) during typical market conditions. Keywords Stock market · sentiment analysis · Twitter · microblogging · social network analysis T. Rao Netaji Subhas Institute of Technology, Delhi, India E-mail: [email protected] S. Srivastava Indraprastha Institute of Technology, Delhi, India E-mail: [email protected] 2 Tushar Rao, Saket Srivastava 1 INTRODUCTION Financial analysis and computational finance have been an active area of research for many decades[18]. Over the years, several new tools and methodologies have been developed that aim to predict the direction as well as range of financial market instruments as accurately as possible[17]. Before the emergence of internet, information regarding company’s stock price, direction and general sentiments took a long time to disseminate among people. Also, the companies and markets took a long time (weeks or months) to calm market rumors, news or false information (memes in Twitter context). Web 3.0 is characterized with fast pace information dissemination as well as retrieval [7]. Spreading good or bad information regarding a particular company, product, person etc. can be done at the click of a mouse [8], [1] or even using micro-blogging services such as Twitter[26]. Recently scholars have made use of twitter feeds in predicting box office revenues [2], political game wagons [30], rate of flu spread [29] and disaster news spread [12]. For short term trading decisions, short term sentiments play a very important role in short term performance of financial market instruments such as indexes, stocks and bonds [20]. Early works on stock market prediction can be summarized to answer the question - Can stock prices be really predicted? There are two theories - (1) random walk theory (2) and efficient market hypothesis (EMH)[25]. According to EMH stock index largely reflect the already existing news in the investor community rather than present and past prices. On the other hand, random walk theory argues that the prediction can never be accurate since the time instance of news is unpredictable. A research conducted by Qian et.al. compared and summarized several theories that challenge the basics of EMH as well as the random walk model completely[27]. Based on these theories, it has been proven that some level of prediction is possible based on various economic and commercial indicators. The widely accepted semi-strong version of the EMH claims that prices aggregate all publicly available information and instantly reflect new public version[21]. It is well accepted that news drive macro-economic movement in the markets, while researches suggests that social media buzz is highly influential at micro-economic level, specially in the big indices like DJIA [5], [22], [15] and [28]. Through earlier researches it has been validated that market is completely driven by sentiments and bullishness of the investor’s decisions [27]. Thus a comprehensive model that could incorporate these sentiments as a parameter is bound to give superior prediction at micro-economic level. Earlier work done by Bollen et. al. shows how collective mood on Twitter (aggregate of all positive and negative tweets) is reflected in the DJIA index movements [5]and [22]. In this work we have applied simplistic message board approach by defining bullishness and agreement terminologies derived from positive and negative vector ends of public sentiment w.r.t. each market security or index terms (such as returns, trading volume and volatility). Proposed method is not only scalable but also gives more accurate measure of large scale investor sentiment that can be potentially used for short term hedging Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 3 strategies as discussed ahead in section 6. This gives clear distinctive way for modeling sentiments for service based companies such as Google in contrast to product based companies such as Ebay, Amazon and Netflix. We validate that Twitter feed for any company reflects the public mood dynamics comprising of breaking news and discussions, which is causative in nature. Therefore it adversely affects any investment related decisions which are not limited to stock discussions or profile of mood states of entire Twitter feed. In section 2, we discuss the motivation of this work and related work in the area of stock market prediction in section 3. In section 4 we explain what and how of the techniques used in mining data and explain the terminologies used in market and tweet board literature. In section 5 we have given prediction methods used in this model with the forecasting results. In section 6 we discuss how Twitter based model can be used for improving hedging decisions in a diversified portfolio by any trader. Finally in section 7 we discuss the results and in section 8 we present the future prospects and conclude the work. 2 MOTIVATION ”Communities of active investors and day traders who are sharing opinions and in some case sophisticated research about stocks, bonds and other financial instruments will actually have the power to move share prices ...making Twitter-based input as important as any other data to the stock” -TIME (2009) [24] High Frequency Trading (HFT) comprises of very high percentage of trading volumes in the present US market. Traders make an investment position that is held only for very brief periods of time - even just seconds - and rapidly trades into and out of those positions, sometimes thousands or tens of thousands of times a day. Therefore the value of an investment is as good as last known index price. Investors will do anything that will give them an advantage in placing market bets. A large percentage of high frequency traders in US markets, have trained AI bots to capture buzzing trends in the social media feeds without learning dynamics of the sentiment and accurate context of the deeper information being diffused in the social networks. For example, in February 2011 during Oscars when Anne Hathaway was trending, stock prices of Berkshire Hathaway rose by 2.94% [3] Figure 1 highlight the incidents when the stock price of Berkshire Hathaway jumped coinciding with an increase of buzz on social networks/ micro-blogging websites regarding Anne Hathaway (for example during movie releases). The events are marked as red points in the Figure 1 , event specific news on the pointsA: Oct. 3, 2008 - Rachel Getting Married opens: BRK.A up 0.44% B: Jan. 5, 2009 - Bride Wars opens: BRK.A up 2.61% C: Feb. 8, 2010 - Valentine’s Day opens: BRK.A up 1.01% D: March 5, 2010 - Alice in Wonderland opens: BRK.A up 0.74% 4 Tushar Rao, Saket Srivastava Fig. 1 Historical chart of Berkshire Hathaway(BRK.A) stock over the last 3 years. Highlighted points (A-F) are the days when its stock price jumped due to an increased news volume on social networks and Twitter regarding Anne Hathaway. Courtesy Google Finance. E: Nov. 24, 2010 - Love and Other Drugs opens: BRK.A up 1.62% F: Nov. 29, 2010 - Anne announced as co-host of the Oscars: BRK.A up 0.25% G: Feb. 28. 2011 - Anne hosts Oscars with James Franco: BRK.A up 2.94% As seen in this example, large volume of tweets can create short term influential effects on stock prices. Events such as these motivate us to investigate deeper relationship between the dynamics of social media messages and market movements [18]. This work is not directed to find a new stock prediction technique which will counter in the effects of various other macroeconomic factors. The aim of this work, is to quantitatively evaluate the effects of twitter sentiment dynamics around a stocks indices/stock prices and use it in conjunction with the standard model to improve the accuracy of prediction. Further in section 6 we investigate into how tweets can be very useful in identifying trends in futures and options markets and to build hedging strategies to protect one’s investment position in the shorter term. 3 RELATED WORK There have been several works related to web mining of data (blogposts, discussion boards and news) [13], [4], [15] and to validate the significance of assessing behavioral changes in the public mood to track movements in stock markets. Some trivial work shows information from investor communities is causative of speculation regarding private and forthcoming information and commentaries[19], [31],[10] and [9]. Dewally in 2003 worked upon naive momentum strategy confirming recommended stocks through user ratings had significant prior performance in returns [11]. But now with the pragmatic shift in the online habits of communities around the worlds, platforms like StockTwits1 [32] and TweetTrader2 have come up and their usage is virally spreading out. Das and Chen made the initial attempts by using natural language 1 2 http://stocktwits.com/ http://tweettrader.net/ Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 5 Fig. 2 Flowchart of the proposed methodology showing the various phases of sentimental analysis beginning with Tweet collection to stock future prediction. In the final phase 4 set of results have been presented:(1) Correlation results for twitter sentiments and stock prices for different companies (2) Granger’s casuality analysis to prove that the stock prices are affected in the short term by Twitter sentiments (3) Using EMMS for quantitative comparison in stock market prediction using tweet features (4) Performance of Twitter sentiment forecasting method over different time windows processing algorithms classifying stock messages based on human trained samples. However their result did not carried statistically significant predictive relationships [10]. Gilbert et.al. and Zhang et.al. have used corpus from livejournal blogposts in assessing the bloggers sentiment in dimensions of fear , anxiety and worry making use of Monte Carlo simulation to reflect market movements in S&P 500 index [15, 33]. Similar and significantly accurate work is done by Bollen et. al who used dimensions of Google- Profile of Mood States to reflect changes in closing price of DJIA [5]. Sprengers et.al. analyzed individual stocks for S&P 100 companies and tried correlating tweet features about discussions of the stock discussions about the particular companies containing the Ticker symbol [28]. However these approaches have been restricted to community 6 Tushar Rao, Saket Srivastava sentiment at macro-economic level which doesn’t give explanatory dynamic system for individual stock index for companies. Thus deriving a model that is scalable for individual stocks/ companies and can be exploited to make successful hedging strategies as discussed in section 6. 4 WEB MINING AND DATA PROCESSING In this section we describe our method of Twitter and financial data collection as shown in Figure 2. In the first phase, we mine the tweet data and after removal of spam/noisy tweets, they are subsequently subjected to sentiment assessment tools in phase two. In later phases feature extraction, aggregation and analysis is done. 4.1 Tweets Collection and Processing Out of other investor forums and discussion boards, Twitter has widest acceptance in the financial community and all the messages are accessible through a simple search of requisite terms through an application programming interface (API)3 . Sub forums of Twitter like StockTwits and TweetTrader have emerged recently as hottest place for investor discussion buy/sell out at voluminous rate. Efficient mining of sentiment aggregated around these tweet feeds provides us an opportunity to trace out relationships happening around these market sentiment terminologies. Currently more than 250 million messages are posted on Twitter everyday (Techcrunch October 20114 ). This study was conducted over a period of 14 months period between June 2nd 2010 to 29th July 2011. During this period, we collected 4,025,595 (by around 1.08M users) English language tweets Each tweet record contains (a) tweet identifier, (b) date/time of submission(in GMT), (c) language and (d)text. Subsequently the stop words and punctuation are removed and the tweets are grouped for each day (which is the highest time precision window in this study since we do not group tweets further based on hours/minutes). We have directed our focus DJIA, NASDAQ-100 and 11 major companies listed in Table 1. These companies are some of the highly traded and discussed technology stocks having very high tweet volumes. As seen in Figure 3, the average message volume for the 11 companies used to validate the working model; is more than the average discussion volume of DJIA and NASDAQ-100. In this study we have observed that technology stocks generally have a higher tweet volume than non-technology stocks. One 3 Twitter API is easily accessible through an easy documentation available athttps://dev.twitter.com/docs. Also Gnip - http://gnip.com/twitter, the premium platform available for purchasing public firehose of tweets has many investors as financial customers researching in the area. 4 http://techcrunch.com/2011/10/17/twitter-is-at-250-million-tweets-per-day/ Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 7 Table 1 List of Companies Company Name Ticker Symbol Amazon Apple AT&T Dell EBay Google Microsoft Oracle Samsung Electronics SAP Yahoo AMZN AAPL T DELL EBAY GOOG MSFT ORCL SSNLF SAP YHOO reason for this may be that all technology companies come out with new products and announcements much more frequently than companies in other sectors(say infrastructure, energy, FMCG, etc.) thereby generating greater buzz on social media networks. However, our model may be applied to any company/indices that generate high tweet volume. Fig. 3 Graph for average of log of daily volume over the months under study 4.2 Sentiment Classification In order to compute sentiment for any tweet we had to classify each incoming tweet everyday into positive or negative using nave classifier. For each day total number of positive tweets is aggregated as P ositiveday while total number of negative tweets as N egativeday . We have made use of JSON API from Twittersentiment 5 , a service provided by Stanford NLP research group [16]. Online classifier has made use of Naive Bayesian classification method, which is one of the successful and highly researched algorithms for classification giving 5 https://sites.google.com/site/twittersentimenthelp/ 8 Tushar Rao, Saket Srivastava superior performance to other methods in context of tweets. Their classification training was done over a dataset of 1,600,000 tweets and achieved an accuracy of about 82.7%. These methods have high replicability and few arbitrary fine tuning elements. In our dataset roughly 61.68% of the tweets are positive, while 38.32% of the tweets are negative for the company stocks under study. The ratio of 3:2 indicates stock discussions to be much more balanced in terms of bullishness than internet board messages where the ratio of positive to negative ranges from 7:1 [11] to 5:1 [13]. Balanced distribution of stock discussion provides us with more confidence to study information content of the positive and negative dimensions of discussion about the stock prices on microblogs. 4.3 Tweet Feature Extraction One of the research questions this study explores is how investment decisions for technological stocks are affected by entropy of information spread about companies under study in the virtual space. Tweet messages are microeconomic factors that affect stock prices which is quite different type of relationship than factors like news aggregates from traditional media, chatboard room etc. which are covered in earlier studies over a particular period [11], [19]and [13]. Keeping this in mind we have only aggregated the tweet parameters (extracted from tweet features) over a day. In order to calculate parameters weekly, bi-weekly, tri-weekly, monthly, 5 weekly and 6 weekly we have simply taken average of daily twitter feeds over the requisite period of time. Fig. 4 Tweet Sentiment and Market Features Twitter literature in perspective of stock investment is summarized in Figure 4. We have carried forward work of Antweiler et.al. for defining bullishness (Bt ) for each day (or time window) given equation as: ! 1 + Mt P ositive Bt = ln (1) 1 + Mt N egative Where Mt P ositive and Mt N egative represent number of positive or negative tweets on a particular day t. Logarithm of bullishness measures the share of surplus positive signals and also gives more weight to larger number of Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 9 messages in a specific sentiment (positive or negative). Message volume for a time interval t is simply defined as natural logarithm of total number of tweets for a specific stock/index which is ln(Mt P ositive + Mt N egative ). The agreement among positive and negative tweet messages is given by: s M P ositive − MtN egative (2) At = 1 − 1 − t MtP ositive + MtN egative If all tweet messages about a particular company are bullish or bearish, agreement would be 1 in that case. Influence of silent tweets days in our study (trading days when no tweeting happens about particular company) is less than 0.1% which is significantly less than previous research [13, 28]. Carried terminologies for all the tweet features{Positive, Negative, Bullishness, Message Volume, Agreement} remain same for each day with the lag of one day. For example, carried bullishness for day d is given by CarriedBullishnessd−1 . 4.4 Financial Data Collection We have downloaded financial stock prices at daily intervals from Yahoo Finance API6 for DJIA, NASDAQ-100 and the companies under study given in Table 1. The financial features (parameters) under study are opening (Ot ) and closing (Ct ) value of the stock/index, highest (Ht ) and lowest (Lt ) value of the stock/index and returns. Returns are calculated as the difference of logarithm to the base e between the closing values of the stock price of a particular day and the previous day. Rt = {ln Close(t) − ln Close(t−1) } × 100 (3) Trading volume is the logarithm of number of traded shares. We estimate daily volatility based on intra-day highs and lows using Garman and Klass volatility measures [14] given by the formula: r Ht 2 Ct 2 1X1 [ln ] − [2 ln 2 − 1][ln ] (4) σ= n 2 Lt Ot 5 STATISTICAL ANALYSIS AND RESULTS We begin our study by identifying the correlation between the Twitter feed features and stock/index parameters which give the encouraging values of statistically significant relationships with respect to individual stocks(indices). To validate the causative effect of tweet feeds on stock movements we have used econometric technique of Granger’s Casuality Analysis. Furthermore, we make use of expert model mining system (EMMS) to propose an efficient prediction 6 http://finance.yahoo.com/ 10 Tushar Rao, Saket Srivastava model for closing price of DJIA and NASDAQ 100. Since this model does not allow us to draw conclusion about the accuracy of prediction (which will differ across size of the time window) subsequently discussed later in this section. 5.1 Correlation Matrix For the stock indices DJIA and NASDAQ and 11 tech companies under study we have come up with the correlation matrix given in Figure 10 in the appendix between the financial market and Twitter sentiment features explained in section 4. Financial features for each stock/index (Open, Close, Return, Trade Volume and Volatility) is correlated with Twitter features (Positive, Negative, Bullishness, Carried Positive, Carried Negative and Carried Bullishness).The time period under study is monthly average as it the most accurate time window that gives significant values as compared to other time windows which is discussed later section 5.4. Our approach shows strong correlation values between various features (upto −0.96 for opening price of Oracle and 0.88 for returns from DJIA index etc.) and the average value of correlation between various features is around 0.5. Comparatively highest correlation values from earlier work has been around 0.41 [28]. As the relationships between the stock(index) parameters and Twitter features show different behavior in magnitude and sign for different stocks(indices), a uniform standardized model would not applicable to all the stocks(indices). Therefore, building an individual model for each stock(index) is the correct approach for finding appreciable insight into the prediction techniques. Trading volume is mostly governed by agreement values of tweet feeds as −0.7 for same day agreement and −0.65 for DJIA. Returns are mostly correlated to same day bullishness by 0.61 and by lesser magnitude 0.6 for the carried bullishness for DJIA. Volatility is again dependent on most of the Twitter features, as high as 0.77 for same day message volume for NASDAQ-100. One of the anomalies that we have observed is that EBay gives negative correlation between the all the features due to heavy product based marketing on Twitter which turns out as not a correct indicator of average growth returns of the company itself. 5.2 Bivariate Granger Causality Analysis The results in previous section show strong correlation between financial market parameters and Twitter sentiments. However, the results also raise a point of discussion: Whether market movements affects Twitter sentiments or Twitter features causes changes in the markets? To verify this hypothesis we make use of Granger Causality Analysis (GCA) to the time series averaged to weekly time window to returns through DJIA and NASDAQ-100 with the Twitter features (positive, negative, bullishness, message volume and agreement). GCA Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 11 Table 2 Granger’s Casuality Analysis of DJIA and NASDAQ for 7 week lag Twitter sentiments. (NSDQ is short for NASDAQ) Index ⇓ Lag PositiveNegative Bull 1 2 3 DJIA 4 5 6 7 1 2 3 NSDQ 4 5 6 7 0.614 0.033** 0.219 0.353 0.732 0.825 0.759 0.106 0.048** 0.06* 0.104 0.413 0.587 0.119 0.122 0.307 0.909 0.551 0.066 0.705 0.581 0.12 0.219 0.685 0.545 0.997 0.321 0.645 0.891 0.037** 0.718 0.657 0.651 0.928 0.809 0.044** 0.893 0.367 0.572 0.645 0.421 0.089 Msg AgrmntVol Carr Positive Carr Carr Carr Carr Nega- Bull Agrmnt Msg tive Vol 0.316 0.094* 0.508 0.743 0.553 0.554 0.687 0.827 0.642 0.357 0.764 0.861 0.954 0.551 0.69 0.032** 0.016** 0.116 0.334 0.961 0.867 0.02** 0.001** 0.01** 0.194 0.157 0.795 0.382 0.103 0.301** 0.845 0.221 0.045** 0.432 0.631 0.04** 0.108 0.123 0.778 0.762 0.512 0.788 0.765 0.086** 0.237 0.743 0.562 0.732 0.807 0.064* 0.022** 0.135 0.092* 0.18 0.613 0.096 0.785 0.047** 0.635 0.357 0.394 0.764 0.987 0.043** 0.828 0.401 0.649 0.485 0.898 0.196 0.759 0.265 0.357 0.999 0.987 0.261 0.865 0.704 0.255 0.008** 0.464 0.945 0.834 0.648 0.934 0.045** 0.219 0.272 0.607 0.832 0.969 0.071* 0.001** 0.131 0.343 0.028 0.591 0.544 is not used to establish causality, but as an economist tool to investigate a statistical pattern of lagged correlation. A similar observation that cloud precede rain is widely accepted; proving cloud may may contain something that causes rain but itself may not be actual causative of the real event. GCA rests on the assumption that if a variable X causes Y then changes in X will be systematically occur before the changes in Y. We realize lagged values of X shall bear significant correlation with Y. However correlation is not necessarily behind causation. We have made use of GCA in similar fashion as [5, 15] This is to test if one time series is significant in predicting another time series. Let returns Rt be reflective of fast movements in the stock market. To verify the change in returns with the change in Twitter features we compare the variance given by following linear models in equation 5 and equation 6 n X Rt = α + βi Dt−i + t n n i=1 X X γi Xt−i + εt βi Dt−i + Rt = α + i=1 (5) (6) i=1 Equation 5 uses only ’n’ lagged values of Rt , i.e. (Rt−1 , ..., Rt−n ) for prediction, while Equation 6 uses the n lagged values of both Rt and the tweet features time series given by Xt−1 , . . . , Xt−n . We have taken weekly time window to validate the casuality performance, hence the lag values 7 will be calculated over the weekly intervals 1, 2, ..., 7. From the Table 2, we can reject the null hypothesis (Ho ) that the Twitter features do not affect returns in the financial markets i.e. β1,2,....,n 6= 0 with a high level of confidence (high p-values). However as we see the result applies to only specific negative and positive tweets (** for p-value < 0.05 and * for 7 lag at k for any parameter M at x week is the value of the parameter prior to x t t−k week. For example, value of returns for the month of April, at the lag of one month will be returnapril−1 which will be returnmarch 12 Tushar Rao, Saket Srivastava p-value < 0.1 which is 95% and 99% confidence interval respectively). Other features like agreement and message volume do not have significant casual relationship with the returns of a stock index (low p-values). 5.3 EMMS Model for Forecasting We have used Expert Model Mining System (EMMS) which incorporates a set of competing methods such as Exponential Smoothing (ES), Auto Regressive Integrated Moving Average (ARIMA) and seasonal ARIMA models. These methods are widely used in financial modeling to predict the values of stocks/bonds/commodities/etc [23, 6]. These methods are suitable for constant level, additive trend or multiplicative trend and with either no seasonality, additive seasonality, or multiplicative seasonality. In this work, selection criterion for the EMMS is coefficient of determination (R squared) which is square of the value of pearson-’r’ of fit values (from the EMMS model) and actual observed values. Mean absolute percentage error (MAPE) and maximum absolute percentage error (MaxAPE) are mean and maximum values of error (difference between fit value and observed value in percentage). To show the performance of tweet features in prediction model, we have applied the EMMS twice - first with tweets features as independent predictor events and second time without them. This provides us with a quantitative comparison of improvement in the prediction using tweet features. ARIMA (p,d,q) are in theory and practice, the most general class of models for forecasting a time series data, which is subsequently stationarized by series of transformation such as differencing or logging of the series Yi . For a non-seasonal ARIMA (p,d,q) model- p is autoregressive term, d is number of non-seasonal differences and q is the number of lagged forecast errors in the predictive equation. A stationary time series ∆Y differences d times has stochastic component ∆Yi ∼ N ormal(µi , σ 2 ) (7) 2 Where µi and σ are the mean and variance of normal distribution, respectively. The systematic component is modeled as: µi = αi ∆Yi−1 + ..... + αp ∆Yi−p + θi εi−1 (8) +..... + θi εi−q Where, ∆Y the lag-p observations from the stationary time series with associated parameter vector α and i the lagged errors of order q, with associated parameter vector. The expected value is the mean of simulations from the stochastic component, E(Yi ) = µi = αi ∆Yi−1 + ..... + αp ∆Yi−p + θi εi−1 +..... + θi εi−q (9) Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 13 Table 3 EMMS model fit characteristics for DJIA and NASDAQ-100 Index Dow-30 NASDAQ-100 Predictors Yes No Yes No Model Fit statistics Ljung-Box Q(18) R-squared MaxAPE Direction Statistics DF Sig. 0.95 0.92 0.68 0.65 1.76 2.37 2.69 2.94 90.8 60 82.8 55.8 11.36 9.9 23.33 16.93 18 18 18 17 0.88 0.94 0.18 0.46 Seasonal ARIMA model is of form ARIMA (p ,d ,q) (P,D,Q) where P specifies the seasonal autoregressive order, D is the seasonal differencing order and Q is the moving average order. Another advantage of EMMS model is that it automatically selects the most significant predictors among all others that are available. In the dataset we have time series for a total of approximately 60 weeks (422 days), out of which we use approximately 75% i.e. 45 weeks for the training both the models with and without the predictors for the time period June 2nd 2010 to April 14th 2011. Further we verify the model performance as one step ahead forecast over the testing period of 15 weeks from April 15th to 29th July 2011 which count for wide and robust range of market conditions. Forecasting accuracy in the testing period is compared for both the models in each case in terms of maximum absulute percentage error (MaxAPE), mean absolute percentage error (MAPE) and the direction accuracy. MAPE is given by the equation 10, where yˆi is the predicted value and yi is the actual value. M AP E = Σ n i | yiy−iyˆi | n × 100 (10) While direction accuracy is measure of how accurately market or commodity up/ down movement is predicted by the model, which is technically defined as logical values for (yi,t̂+1 − yi,t ) × (yi,t+1 − yi,t ) > 0 respectively. As we can see in the Table 3, there is significant reduction in MaxAPE for DJIA(2.37 to 1.76) and NASDAQ-100 (2.96 to 2.69) when EMMS model is used with predictors as events which in our case our all the Tweet features (positive, negative, bullishness, message volume and agreement). Using tweet features as part of the prediction process in the EMMS model, gives more robust approach than the traditional forecasting methods. There is significant decrease in the value of MAPE for DJIA which is 0.8 in our case than 1.79 for earlier approaches [5]. As we can from the values of R-square, MAPE and MaxAPE in Table 3 for both DJIA and NASDAQ 100, our proposed model uses Twitter sentiment analysis for a superior performance over traditional methods. Since EMMS is a customizable and scalable technique, our proposed model is bound to perform well in a wide range of stocks and indices. Figures 5 shows the EMMS model fit for weekly closing values for DJIA and NASDAQ 100. In the figure fit are model fit values, observed are values of actual index and UCL & LCL are upper and lower confidence limits of the prediction model. 14 Tushar Rao, Saket Srivastava Fig. 5 Plot of Fit values (from the EMMS model) and actual observed closing values for DJIA and NASDAQ-100. Fit are the modeled values through EMMS, observed are the actual values of the index and UCL & LCL are the upper and the lower confidence limit. 5.4 Prediction Accuracy using OLS Regression Our results in the previous section showed that forecasting performance of stocks/indices using Twitter sentiments varies for different time windows. Hence it is important to quantitatively deduce a suitable time window that will give us most accurate prediction. Figure 6 shows the plot of R-square metric for OLS regression for returns from stock indexes NASDAQ-100 and DJIA from tweet board features (like number of positive, negative, bullishness, agreement and message volume) both for carried (at 1-day lag) and same week. The R-square metric (explained in section 5.3) is calculated as prediction performance indicator for different time windows from daily, weekly, bi-weekly to 6 weekly time window. From the figure 6 it can be inferred as we increase the time window the accuracy in prediction increases but only till a certain point that is monthly in our case beyond which value of R-square starts decreasing again. Thus, for monthly predictions we have highest accuracy in predicting anomalies in the returns from the tweet board features. In the next section we will discuss the practical implementation of how short term hedging strategies can improve efficiency by modeling mass public opinion and behavior for a particular company or stock index through mining of tweet sentiments. Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 15 Fig. 6 Plot of R-square values over different time windows for DJIA and NASDAQ-100. Higher values denote greater prediction accuracy. 6 HEDGING STRATEGY USING TWITTER SENTIMENT ANALYSIS Portfolio protection is very important practice that is weighted as much as portfolio appreciation. Just like a normal user purchases insurance for its house, car or any commodity, one can also buy insurance for the investment that is made in the stock securities. This doesn’t prevent a negative event from happening, but if it does happen and you’re properly hedged, the impact of the event is reduced. In a diverse portfolio hedging against investment risk means strategically using instruments in the market to offset the risk of any adverse price movements. Technically, to hedge investor invests in two securities with negative correlations, which again in itself is time varying dynamic statistics. To explain how weekly forecast based on mass tweet sentiment features can be potentially useful for a singular investor, we will take help of a simple example. Let us assume that the share for a company C1 is available for $X per share and the cost of premium for a stock option of company C1 (with strike price $X) is $Y. A = total amount invested in shares of a company C1 which is number of shares (let it be N) × $X B= total amount invested in put option of company C1 (relevant blocksize × $Y) And always for an effective investment (N × $X) > ( Blocksize × $Y) An investor shall choose the value of N as per as their risk appetitive i.e. ratio of A:B = 2:1 (assumed in our example, will vary from from investor to investor). Which means in the rising market conditions, he would like to 16 Tushar Rao, Saket Srivastava keep 50% of his investment to be completely guarded, while rest 50% are risky components; whereas in the bearish market condition he would like to keep his complete investment fully hedged by buying put options equivalent of all the investment he has made in shares for the same security. From Figure 7, we infer for the P/L curves consisting of shares and 2 different put options for the company C1 purchased as different time intervals 8 ; hence the different premium price even with the same strike price of $X. Using married put strategy makes the investment risk free but reduces the rate of return in contrast to the case which comprises of only equity security which is completely free-fall to the market risk. Hence the success of married put strategy depends greatly on the accuracy of predicting whether the markets will rise of fall. Our proposed Tweet sentiment analysis can be highly effective in this prediction to determine accurate instances when the investor should readjust his portfolio before the actual changes happen in the market. Our proposed approach provides an innovative technique of using dynamic Twitter sentiment analysis toexploit the collective wisdom of the crowd for minimising the risk in a hedged portfolio. Below we summarize two different portfolio states at different market conditions. Table 4 Example investment breakdown in the two cases Partially Hedged Portfolio at 50% risk 1000 shares at price of $X = 1000X 1 Block size of 500 shares put options purchased at strike price of $X with premium of $Y each = 500Y Total= 1000X + 500Y Fully Hedged Portfolio at minimized risk 1000 shares at price of $X = 1000X 2 Block size of 500 shares each put options purchased at strike price of $X with premium of $Y each = 2×500Y = 1000Y Total = 1000X + 1000Y To check the effectiveness of our proposed tweet based hedging strategy, we run simulations and make portfolio adjustments in various market conditions (bullish, bearish, volatile etc). To elaborate, we take an example of DJIA ETF’s as the underlying security over the time period of 14th November 2010 to 30th June 2011. Approximately 76% of the time period is taken in the training phase to tune the SVM classifier (using tweet sentiment features from the prior week). This trained SVM classifier is then used to predict market direction (DJIA’s index movement) in the coming week. Testing phase for the classification model (class 1- bullish market ↑ and class 0- bearish market ↓) is from 8th May to 30th June 2011 consisting a total of 11 weeks. SVM model is build using KSVM classification technique with the linear (vanilladot) kernel 8 The reason behind purchase of long put options at different time intervals is because in a fully hedged portfolio, profit arrow has lower slope as compared to partially hedged portfolio (refer P/L graph). Thus the trade off between risk and security has to be carefully played keeping in mind the precise market conditions. Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 17 Fig. 7 Portfolio adjustment in cases of bearish (fully hedged) and bullish (partial hedged) market scenarios. In both the figures, strike price is the price at which a option is purchased, Break even point (BEP) is the instance when investment starts making profit. In case of bearish market scenario, two options at same strike price (but different premiums) are in purchased at different instances, Option1 brought at the time of initial investment and Option2 brought at a later stage (hence lower in premium value). using the package ’e1071’ in R statistical language. Over the training dataset, the tuned value of the objective function is obtained as −4.24 and the number of support vectors is 8. Confusion matrix for the predicted over the actual values (in percentage) is given in Table 5. Overall classifier accuracy over the testing phase is 90.91%. Receiver operator characteristics (ROC) curve measuring the accuracy of the classifier as true positive rate to false positive rate is given in the figure 8. It shows the tradeoff between sensitivity i.e. true positive rate and specificity i.e. true negative rate (any increase in sensitivity will be accompanied by a decrease in specificity). Good statistical significance for the classification accuracy can be inferred from the value of area under the ROC curve (AUC) which comes out to 0.88. Table 5 Prediction accuracy over the Testing phase (11 weeks). Values in percentage. Confusion Matrix Actual Direction Market Down Market Up Predicted Direction Market Down Market Up 45 0 9 45 Figure 9 shows the DJIA index during the testing period and the arrows mark the weeks when the adjustment is done in the portfolio based on prediction obtained from tweet sentiment analysis of prior week. At the end of the week (on Sunday), using tweet sentiment feature we predict what shall be the market condition in the coming week- whether the prices will go down or up. Based on the prediction portfolio adjustment - bearish −→ bullish or bullish −→ bearish. 18 Tushar Rao, Saket Srivastava Fig. 8 Receiver operating characteristic (ROC curve) curve for the KSVM classifier prediction over the testing phase. ROC is graphical plot of the sensitivity or true positive rate, vs. false positive rate (one minus the specificity or true negative rate). More the area under curve for typical ROC, more is the performance efficiency of the machine learning algorithm. Fig. 9 DJIA index during the testing period. In the figure green marker shows adjustment bearish −→ bullish, while red arrow shows adjustment bullish −→ bearish. (Data courtesy Yahoo! finance) 7 DISCUSSIONS In section 5, we observed how the statistical behavior of market through Twitter sentiment analysis provides dynamic window to the investor behavior. Furthermore, in the section 6 we discussed how behavioral finance can be exploited in portfolio decisions to make highly reduced risked investment. Our work answers the important question - If someone is talking bad/good about a company (say Apple etc.) as singular sentiment irrespective of the overall market movement, is it going to adversely affect the stock price? Among the 5 observed Twitter message features both at same day and lagged intervals we realize only some are Granger causative of the returns from DJIA and NASDAQ-100 indexes, while changes in the public sentiment is well reflected in the return series occurring at even lags of 1, 2 and 3 weeks. Remarkably the Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 19 most significant result is obtained for returns at lag 2 (which can be inferred as possible direction for the stock/index movements in the next week). Table 6 given below explains the different approaches to the problem that have been done in past by researchers [28], [5] and [15]. As can be seen from the table, our approach is scalable, customizable and verified over a large data set and time period as compared to other approaches. Our results are significantly better than the previous work. Furthermore, this model can be of effective use in formulating short-term hedging strategies (using our proposed Twitter based prediction model). Table 6 Comparison of Various Approaches for Modeling Markets Movements Through Twitter Previous Approaches Bollen et al. [5] and Sprenger et al. [28] → Gilbert et al. [15] Approach Dataset Techniques Results Feedback/ backs This Work Mood of complete Twit- Stock Discussion with Discussion based trackter feed ticker $ on Twitter ing of Twitter sentiments 28th Feb 2008 to 19th 1st Jan 2010 to 30th 2nd June 2010 to 29th Dec 2008, 9M tweets June 20100.24M July 2011- 4M tweets sampled as 1.5% of tweets through search API Twitter feed SOFNN, Grangers and OLS Regression and Corr, GCA, Expert linear models Correlation Model Mining System (EMMS) * High corr values (upto -0.96) for opening price * Strong corr values (upto 0.88) for re* 86.7% directional ac- * Max corr value of 0.41 turns curacy for DJIA for returns of S&P 100 * MaxAPE of 1.76% for DJIA stocks * Directional accuracy of 90.8% for DJIA Draw- Individual modeling for News not taken into ac- Comprehensive and stocks not feasible count, very less tweet customizable approach. volumes Can be used for hedging in F&O markets 8 CONCLUSION In this paper, we have worked upon identifying relationships between Twitter based sentiment analysis of a particular company/index and its short-term market performance using large scale collection of tweet data. Our results show that negative and positive dimensions of public mood carry improved power to track movements of individual stocks/indices. We have also investigated various other features like how previous week sentiment features control the next week’s opening, closing value of stock indexes for various tech companies and 20 Tushar Rao, Saket Srivastava major index like DJIA and NASDAQ-100. As compared to earlier approaches in the area which have been limited to wholesome public mood and stock ticker constricted discussions, we verify strong performance of our alternate model that captures mass public sentiment towards a particular index or company in scalable fashion and hence empower a singular investor to ideate coherent relative comparisons. Our analysis of individual company stocks gave strong correlation values (upto 0.88 for returns) with twitter sentiment features of that company. Further we also discuss how Twitter sentiments bring wisdom of the crowd to use by even a singular investor in the form of simplistic married put hedging strategy. Using this technique trader can retain his portfolio with minimum risk even during highly bullish/bearish market conditions. It is no surprise that this approach is far more robust and gives far better results (upto 91% directional accuracy) than any previous work. In the near future, Twitter sentiments analysis promises to be an effective strategy for hedging the investments in the financial markets. References 1. Daron Acemoglu, Asuman Ozdaglar, and Ali ParandehGheibi. Spread of (mis)information in social networks. Games and Economic Behavior, 70(2):194 – 227, 2010. 2. Sitaram Asur and Bernardo A Huberman. Predicting the future with social media. Computing, 25(1):492499, 2010. 3. The Atlantic. Does anne hathaway news drive berkshire hathaway’s stock?, 2011. This is an electronic document. Date of publication: [March 18 2011]. Date retrieved: October 12, 2011. Date last modified: [Date unavailable]. 4. Mark Bagnoli, Messod D. Beneish, and Susan G. Watts. Whisper forecasts of quarterly earnings per share. Journal of Accounting and Economics, 28(1):27 – 50, 1999. 5. Johan Bollen, Huina Mao, and Xiao-Jun Zeng. Twitter mood predicts the stock market. Computer, 1010(3003v1):1–8, 2010. 6. George Edward Pelham Box and Gwilym Jenkins. Time Series Analysis, Forecasting and Control. Holden-Day, Incorporated, 1990. 7. danah m. boyd and Nicole B. Ellison. Social network sites: Definition, history, and scholarship. Journal of Computer-Mediated Communication, 13(1):210–230, 2007. 8. John Seely Brown and Paul Duguid. The Social Life of Information. Harvard Business School Press, Boston, MA, USA, 2002. 9. Zhi Da, Joseph Engelberg, and Pengjie Gao. In search of attention. Russell The Journal Of The Bertrand Russell Archives, (919), 2010. 10. Sanjiv R. Das and Mike Y. Chen. Yahoo! for Amazon: Sentiment Parsing from Small Talk on the Web. SSRN eLibrary, 2001. 11. Michal Dewally. Internet investment advice: Investing with a rock of salt. Financial Analysts Journal, 59(4):65–77, 2003. 12. S. Doan, B.-K. H. Vo, and N. Collier. An analysis of Twitter messages in the 2011 Tohoku Earthquake. ArXiv e-prints, September 2011. 13. Murray Z. Frank and Werner Antweiler. Is All That Talk Just Noise? The Information Content of Internet Stock Message Boards. SSRN eLibrary, 2001. 14. Mark B. Garman and Michael J. Klass. On the estimation of security price volatilities from historical data. The Journal of Business, 53(1):67–78, 1980. 15. Eric Gilbert and Karrie Karahalios. Widespread worry and the stock market. Artificial Intelligence, pages 58–65, 2010. 16. Alec Go, Richa Bhayani, and Lei Huang. Twitter Sentiment Classification using Distant Supervision. Twitter Sentiment Analysis: How To Hedge Your Bets In The Stock Markets 21 17. Erkam Guresen, Gulgun Kayakutlu, and Tugrul U. Daim. Using artificial neural network models in stock market index prediction. Expert Systems with Applications, 38(8):10389 – 10397, 2011. 18. K.H. Lee and G.S. Jo. Expert system for predicting stock market timing using a candlestick chart. Expert Systems with Applications, 16(4):357 – 364, 1999. 19. Alina Lerman. Individual Investors’ Attention to Accounting Information: Message Board Discussions. SSRN eLibrary, 2011. 20. Huaxia Rui Liangfei Qiu and Andrew Whinston. A twitter-based prediction market: Social network approach. ICIS 2011 Proceedings. Paper 5, 2011. 21. Burton G. Malkiel. The efficient market hypothesis and its critics. Journal of Economic Perspectives, 17(1):59–82, 2003. 22. Huina Mao, Scott Counts, and Johan Bollen. Predicting financial markets: Comparing survey,news, twitter and search engine data. Quantitative Finance Papers 1112.1051, arXiv.org, December 2011. 23. Garth P. McCormick. Communications to the editorexponential forecasting: Some new variations. Management Science, 15(5):311–320, 1969. 24. Douglas McIntyre. Turning wall street on its head, 2009. This is an electronic document. Date of publication: [May 29, 09]. Date retrieved: September 24, 2011. Date last modified: [Date unavailable]. 25. Hong Miao, Sanjay Ramchander, and J. K. Zumwalt. Information Driven Price Jumps and Trading Strategy: Evidence from Stock Index Futures. SSRN eLibrary, 2011. 26. BBC News. Twitter predicts future of stocks, 2011. This is an electronic document. Date of publication: [April 6, 2011]. Date retrieved: October 21, 2011. Date last modified: [Date unavailable]. 27. Bo Qian and Khaled Rasheed. Stock market prediction with multiple classifiers. Applied Intelligence, 26:25–33, February 2007. 28. Timm O. Sprenger and Isabell M. Welpe. Tweets and Trades: The Information Content of Stock Microblogs. SSRN eLibrary, 2010. 29. Martin Szomszor, Patty Kostkova, and Ed De Quincey. swineflu : Twitter predicts swine flu outbreak in 2009. 3rd International ICST Conference on Electronic Healthcare for the 21st Century eHealth2010, (December), 2009. 30. Andranik Tumasjan, Timm O Sprenger, Philipp G Sandner, and Isabell M Welpe. Predicting elections with twitter: What 140 characters reveal about political sentiment. International AAAI Conference on Weblogs and Social Media Washington DC, pages 178–185, 2010. 31. Peter Wysocki. Cheap talk on the web: The determinants of postings on stock message boards. Working Paper, 1998. 32. Max Zeledon. Stocktwits may change how you trade, 2009. This is an electronic document. Date of publication: [2009]. Date retrieved: September 01, 2011. Date last modified: [Date unavailable]. 33. Xue Zhang, Hauke Fuehres, and Peter A Gloor. Predicting stock market indicators through twitter i hope it is not as bad as i fear. Anxiety, pages 1–8, 2009. 22 Tushar Rao, Saket Srivastava 9 APPENDIX Correlation heatmap indicative of significant relationships between various twitter features with the index features. Fig. 10 Heatmap showing pearson correlation coefficients between security indices vs features from Twitter and stock features.
5cs.CE
arXiv:1802.02258v1 [cs.CE] 6 Feb 2018 A computational framework for microstructural modelling of polycrystalline materials with damage and failure Ph.D. thesis submitted to the University of Palermo by Vincenzo Gulizzi Tutor Prof. Alberto Milazzo Prof. Ivano Benedetti Dipartimento di Ing. Civile Ambientale, Aerospaziale, dei Materiali Università degli Studi di Palermo Scuola Politecnica Viale delle Scienze, Ed. 8 - 90128 Palermo V INCENZO G ULIZZI Palermo, December 2016 e-mail:[email protected] Thesis of the Ph.D. course in Civil and Environmental Engineering - Materials (Ingegneria Civile e Ambientale - Materiali) Dipartimento di Ingegneria Civile Ambientale, Aerospaziale, dei Materiali Università degli Studi di Palermo Scuola Politecnica Viale delle Scienze, Ed.8 - 90128 Palermo, ITALY Preface In the present thesis, a computational framework for the analysis of the deformation and damage phenomena occurring at the scale of the constituent grains of polycrystalline materials is presented. The research falls within the area of Computational Micro-mechanics that has been attracting remarkable technological interest due to the capability of explaining the link between the micro-structural details of heterogenous materials and their macroscopic response, and the possibility of fine-tuning the macroscopic properties of engineered components through the manipulation of their micro-structure. However, despite the significant developments in the field of materials characterisation and the increasing availability of High Performance Computing facilities, explicit analyses of materials micro-structures are still hindered by their enormous cost due to the variegate multi-physics mechanisms involved. Micro-mechanics studies are commonly performed using the Finite Element Method (FEM) for its versatility and robustness. However, finite element formulations usually lead to an extremely high number of degrees of freedom of the considered micro-structures, thus making alternative formulations of great engineering interest. Among the others, the Boundary Element Method (BEM) represents a viable alternative to FEM approaches as it allows to express the problem in terms of boundary values only, thus reducing the total number of degrees of freedom. The computational framework developed in this thesis is based on a nonlinear multi-domain BEM approach for generally anisotropic materials and is devoted to the analysis of three-dimensional polycrystalline microstructures. Different theoretical and numerical aspects of the polycrystalline problem using the boundary element method are investigated: first, being the formulation based on a integral representation of the governing equations, a novel and more compact expression of the integration kernels capable of representing the multi-field behaviour of generally anisotropic materials is presented; iii iv second, the sources of the high computational cost of polycrystalline analyses are identified and suitably treated by means of different strategies including an ad-hoc grain boundary meshing technique developed to tackle the large statistical variability of polycrystalline micro-morphologies; third, nonlinear deformation and failure mechanisms that are typical of polycrystalline materials such as inter-granular and trans-granular cracking and generally anisotropic crystal plasticity are studied and the numerical results presented throughout the thesis demonstrate the potential of the developed framework. Contents 1 2 Grain Boundary formulation for polycrystalline micro-mechanics 1.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Generation of artificial polycrystalline morphologies . . . . . . 1.3 Grain boundary integral equations . . . . . . . . . . . . . . . . 1.3.1 Boundary conditions . . . . . . . . . . . . . . . . . . . . 1.3.2 Interface conditions . . . . . . . . . . . . . . . . . . . . 1.3.3 Anisotropic Kernels . . . . . . . . . . . . . . . . . . . . 1.3.4 Numerical Integration . . . . . . . . . . . . . . . . . . . 1.4 Polycrystalline implementation . . . . . . . . . . . . . . . . . . 1.4.1 System solution . . . . . . . . . . . . . . . . . . . . . . . 1.5 Key features of the formulation . . . . . . . . . . . . . . . . . . 1.6 Content of the thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fundamental solutions for multi-field materials based on spherical harmonics expansions 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Fourier transform and Rayleigh expansion . . . . . . . . . . . . 2.3.1 Fundamental solutions of general anisotropic materials . 2.3.2 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.3 Pseudo-Algorithm . . . . . . . . . . . . . . . . . . . . . . 2.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 Isotropic materials examples . . . . . . . . . . . . . . . . 2.4.2 Anisotropic materials examples . . . . . . . . . . . . . . . 2.5 Associated Legendre polynomials . . . . . . . . . . . . . . . . . 2.6 Spherical harmonics . . . . . . . . . . . . . . . . . . . . . . . . . 2.7 Materials properties . . . . . . . . . . . . . . . . . . . . . . . . . . v 1 5 6 11 14 16 18 19 20 21 22 23 25 25 28 30 32 35 36 37 38 41 58 59 61 vi 3 CONTENTS An enhanced grain-boundary framework 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . 3.2 Laguerre tessellations regularisation . . . . . . . . 3.3 Removal of cut boundary grains . . . . . . . . . . 3.4 Grain-boundary meshing . . . . . . . . . . . . . . 3.4.1 Geometrical nodes and collocation nodes . 3.4.2 Continuous/semi-discontinuous elements 3.5 Computational tests . . . . . . . . . . . . . . . . . . 3.5.1 Overall computational savings . . . . . . . 3.5.2 Computational homogenisation . . . . . . 3.5.3 Interface modelling for micro-cracking . . 3.5.4 Microcracking simulations . . . . . . . . . 3.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 . 65 . 68 . 68 . 72 . 73 . 78 . 82 . 82 . 85 . 89 . 91 . 107 4 Modelling inter-granular and trans-granular cracking in polycrystalline materials 109 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 4.2 Grain boundary formulation . . . . . . . . . . . . . . . . . . . . . 113 4.2.1 Boundary integral equations . . . . . . . . . . . . . . . . 113 4.2.2 Boundary conditions and interface equations . . . . . . . 114 4.2.3 Inter- and trans-granular fracture modes . . . . . . . . . 115 4.3 Numerical discretisation and solution . . . . . . . . . . . . . . . 119 4.3.1 Algorithm for inter- and trans-granular cracking . . . . . 120 4.4 Numerical tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 4.5 Discussion and future developments . . . . . . . . . . . . . . . . 125 5 Grain boundary formulation for crystal plasticity 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Anisotropic elasto-plastic boundary element formulation . . . . 5.2.1 Boundary integral equations . . . . . . . . . . . . . . . . 5.2.2 Numerical discretisation . . . . . . . . . . . . . . . . . . . 5.2.3 Numerical integration and singular integrals . . . . . . . 5.3 Crystal plasticity phenomenological modelling . . . . . . . . . . 5.4 The grain-boundary incremental-iterative algorithm for crystal plasticity in polycrystalline aggregates . . . . . . . . . . . . . . . 5.4.1 Numerical discretisation of polycrystalline aggregates . 5.4.2 Polycrystalline incremental-iterative system solution . . 5.5 Numerical tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 130 134 134 136 138 139 141 141 143 146 CONTENTS 5.6 5.7 5.5.1 Single crystal tests . . . . . . . 5.5.2 Polycrystalline tests . . . . . . Discussion and possible developments Flow rules and hardening laws . . . . 5.7.1 Bassani and Wu model . . . . . 5.7.2 Méric and Cailletaud model . . Conclusions vii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 152 163 164 164 165 167 viii CONTENTS Chapter 1 Grain Boundary formulation for polycrystalline micro-mechanics Many materials of technological interest, such as metals, alloys and ceramics, present a polycrystalline micro-structure at a scale usually ranging from nanoto micro-meters (see Figure (1.1)). A polycrystalline micro-structure is characterised by the size, shape, random crystallographic orientation and general anisotropic behaviour of each crystal, or grain, by the possible presence of randomly distributed flaws and pores and by the physical and chemical properties of the inter-crystalline interfaces, or grain boundaries, which play a crucial in polycrystalline micro-mechanics. µm cm Figure 1.1: Schematic representation of a polycrystalline micro-structure in an engineered structural component. 1 2 Grain Boundary formulation for polycrystalline micro-mechanics It is nowadays widely recognised that the macroscopic features of a material are strongly influenced by the properties of and the interaction between its micro-constituents, especially when damage initiation and evolution are involved. With current advancements in materials science and technology, there is interest in understanding the link between material micro-structures and macro-properties, i.e. the structure-property relation [85, 150, 246, 143, 151], which also attracts remarkable technological interest due to the possibility of controlling macroscopic properties, such as strength, stiffness, fracture toughness, etc. . . , through manipulations of the micro-structure [224]. In this context, experimental measurements and numerical simulations represent two complementary approaches that have been employed in the literature for understanding the micro-macro relation in polycrystalline materials. Experimental techniques based for example on serial sectioning [240, 78, 77, 179] or x-ray tomography [62, 126] and usually coupled to electron backscattering diffraction (EBSD) measurements have been used to reconstruct polycrystalline micro-morphologies and to determine the crystals’ orientation. However, although being essential for the extraction of the statistical features of the micro-morphologies, experimental approaches may be expensive and time-consuming and generally require sophisticated equipment and careful material preparation. On the other hand, computational approches allow to artificially reproduce the properties of polycrystalline materials and investigate their deformation and damage mechanisms by selectively focus on particular aspects that could be extremely challenging to reproduce in a laboratory. Furthermore, computational micro-mechanics is enormously benefitting from the increasing affordability of High Performance Computing (HPC), which is pushing the boundaries of multi-field micro-mechanics, and from the aforementioned developments in micro-structural materials characterisation, which provide micro-structural details that can be included in high-fidelity computational models, allowing deeper understanding of materials behaviour. In the literature, several computational approaches have been proposed for the modelling of two- and three-dimensional polycrystalline materials. An important concept in the field of computational micro-mechanics of heterogeneous micro-structures is the concept of the Representative Volume Element (RVE). An RVE is usually defined as material sample sufficiently large to statistically represent the heterogeneous nature of the micro-structure, but small enough to be considered as a infinitesimal volume at the macroscopic scale. The resolution of the micro-macro link is known as material homogenization 3 [152] and is usually performed by computing volume and/or ensemble averages of the fields of interests over multiple RVE realisations subjected to general loading conditions and possibly undergoing internal evolution. To this date, the most popular computational approach is probably still represented by the Finite Element Method (FEM). Several FEM studies have been proposed to evaluate the effective macroscopic properties of polycrystalline materials [111, 110] or to study the local behaviour at the grain boundaries [106, 243, 101]. The concept of the representative volume element has been investigated by Ren and Zheng [171, 172] and by Nygårds [153], who studied the dependence of the RVE size on the micro-structural properties of two- and three-dimensional polycrystalline aggregates and on the anisotropy of the crystals. Kanit et al. [102] focused on the concept of the RVE from statistical and numerical points of view, highlighting the possibility of computing the macroscopic properties by means of a sufficiently large number of small RVEs rather than by a large representative volume. The authors also studied the effect of different boundary conditions on the convergence of macroscopic properties of the RVEs. Fritzen et al. [70] focused on the generation and meshing of geometrically periodic polycrystalline RVEs. Finite element models have been also employed to study different deformation and damage mechanisms in polycrystalline materials. Due to the anisotropic nature of the constituent crystals, one of the most important as well as studied deformation mechanisms in polycrystalline materials is the mechanism of crystal plasticity [178], which denotes the plastic slip over specific crystallographic planes defined by the lattice of each crystal. The phenomenon, which has been widely studied within FEM frameworks, has been also addressed in the present thesis and more details are given in Chapter (5). Damage and fracture mechanisms have been usually addressed by means of the cohesive zone approach [21, 22] in which fracture evolution is represented by a traction-separation law that encloses the complex damage phenomena occurring at a process zone of the failing interface into a phenomenological model. Cohesive laws have been derived either by the definition of a cohesive potential [217, 234] or by simply assuming a functional form [44, 155] and have been used to model different fracture mechanisms [45, 193]. In the field of computational micro-mechanics, the cohesive zone approach has been employed by Zhai and Zhou [239, 238] to model static and dynamic micro-mechanical failure of two-phase Al2 O3 /TiB2 ceramics. Espinosa and Zavattieri [65, 66] studied inter-granular fracture of two-dimensional polycrystalline materials subject to static and dynamic loading. The competition 4 Grain Boundary formulation for polycrystalline micro-mechanics between the bulk deformation of grains interior and the fracture at the grain boundaries of three-dimensional columnar polycrystalline structures was investigated by Wei and Anand [225] by coupling a crystal plasticity and an elasto-plastic grain boundary model. Maiti et al. [128] used the cohesive zone approach to model the fragmentation of rapidly expanding polycrystalline ceramics. The cohesive model at the micro-structure scale was also used by Zhou et al. [245], who investigated the effect of grain size and grain boundary strength on the crack pattern and the fracture toughness of a ceramic polycrystalline material. The aforementioned works mainly focused on inter-granular fracture of polycrystalline materials, i.e. the fracture of the grain boundaries. Another failure mechanism occurring in polycrystalline materials is the fracture of the bulk grains, known as trans-granular fracture. Similarly to the crystal plasticity phenomenon, trans-granular fracture is a highly anisotropic fracture phenomenon mainly controlled by the orientation of the crystals within the aggregate. The problem of trans-granular fracture has been investigated by fewer authors [207, 145, 48] within the framework of the finite element method due to its inherent anisotropy and generally higher complexity with respect to the inter-granular fracture mechanism. Trans-granular fracture has been also discussed in the present thesis and further details on the problem are given in Chapter (4). Fracture in polycrystalline materials is also strongly affected by the operating conditions of the polycrystalline component. Naturally, ductile materials are known to present a brittle fracture behaviour in presence of an aggressive environment, and different studies [100, 145, 200, 201] focusing on the combined effect of the applied stress and the presence of corrosive species can be found in the literature. In addition to the finite element approach, the polycrystalline problem has also been addressed within the framework of the Boundary Element Method (BEM) [17, 228, 6]. Inter-granular micro-cracking has been developed for twodimensional [190, 191] and three-dimensional [29, 28, 80, 30, 79, 33] problems and the formulation has been usually referred to as grain boundary formulation for polycrystalline materials. More recently, a number of different numerical approaches have been proposed to model deformation and fracture mechanisms in polycrystalline materials. The phase-field framework has been proved to be effective for the modelling of different deformation and fracture mechanisms [9, 137, 206, 40]. Within the polycrystalline materials framework, the phase field approach has 1.1 Notation 5 been used to model the failure of both two- and three-dimensional elastic, elasto-plastic and ferroelectric materials [1, 2, 48, 49, 192]. A peridynamic model for the dynamic fracture of two-dimensional polycrystalline materials was proposed by Ghajari et al. [75]. The cellular automata approach [53, 197, 58] and the non-local particle method [46] have been also investigated for modelling inter- and trans-granular failure of polycrystalline materials. In this Chapter, the grain boundary formulation employed for modelling the micro-mechanics of polycrystalline aggregates is described. It is already worth mentioning here that the salient feature of the formulation is the expression of the polycrystalline micro-structural problem in terms of inter-granular displacements and tractions, which are the primary unknowns of the problem. In the present context, the term “grain-boundary” refers to this aspect. The formulation has been first proposed by Sfantos and Aliabadi [190, 191] for two-dimensional polycrystalline materials and by Benedetti and Aliabadi [29, 28, 30] for three-dimensional polycrystalline problems. The present Chapter is intended to introduce the problem of polycrystalline micro-mechanics, to present the 3D grain-boundary formulation and to set the stage of the subsequent developments of the present thesis. 1.1 Notation In this Section, the notation used in the present thesis is introduced. This work deals with three-dimensional polycrystalline materials in the 3D space denoted by R3 . Spatial coordinates in R3 are indicated using bold lower-case letters, i.e. x denotes the set of the three components { x1 , x2 , x3 }. Vectorial and tensorial quantities that depend on the spatial variable x are indicated using the indicial notation; for instance, ui (x) and σij (x) are used to denote the set of three components of the vector {u1 (x), u2 (x), u3 (x)} and the set of the nine components of the tensor {σ11 (x), σ12 (x), . . . , σ23 (x), σ33 (x)}, respectively. The same convention also holds for higher-order tensors. Unless otherwise stated, the range of the subscripts is always 1, 2, 3. By means of the indicial notation, the product of two vectorial or tensorial quantities with repeated subscripts implies the summation over the repeated subscripts; as an example, using the implied summation convention, the distance r between two points x and y is written as r= q ( x1 − y1 )2 + ( x2 − y2 )2 + ( x3 − y3 )2 = q ( xk − yk )( xk − yk ), 6 Grain Boundary formulation for polycrystalline micro-mechanics where the summation over the subscript k is implied. On the other hand, N × 1 vectors and N × M matrices usually stemming from a discretisation procedure and containing a fixed number of entries are written in bold uppercase letters. For instance, a linear system of N equations is simply written AX = B, being X the N × 1 vector containing the unknowns, A the N × N coefficients matrix and B the N × 1 vector representing the right-hand side. Eventually, superscripts are used to specify a particular dependence of a generic quantity. No summation is employed for repeated superscripts and their range is always specified. As an example, the surface of the generic grain g is indicated as S g . (a) (b) Figure 1.2: Example of a polycrystalline aggregate generated using a Voronoibased scheme: (a) 1000-grain polycrystalline aggregate inside a cubic box and (b) morphology of the internal grains of the aggregate. 1.2 Generation of artificial polycrystalline morphologies In this Section, the generation of the micro-morphologies for the study of the deformation and failure of polycrystalline materials is described. The morphology of polycrystalline materials can be reconstructed by experimental observations and measurements or by computer models that are able to reproduce the statistical features of the considered aggregate. Three-dimensional reconstructions of polycrystalline materials have been performed by using several techniques relying on x-ray micro-tomography [62], diffraction con- 1.2 Generation of artificial polycrystalline morphologies 7 trast tomography [104] and serial sectioning [240, 179] combined with electron backscatter diffraction (EBSD) maps [78, 77]. However, such techniques, although necessary to measure the statistical features of polycrystalline micromorphologies, require generally expensive laboratory equipment and involve time-consuming data processing. On the other hand, artificial morphologies, generated on the information provided by experimental measurements, offer a valid alternative to experimentally reconstructed aggregates. In the literature, simplified geometrical models (such as cubes or octahedra) of the grains have been employed [244, 170, 176]. Such regular grain shapes have been shown to produce satisfactory results in terms of homogenised properties in linear and crystal plasticity analyses. However, the consequent regular structure of the grain interfaces is not fully appropriate to model inter-granular failure mechanisms, which may require a more accurate representation of the grain boundaries. Besides regular morphologies, Voronoi tessellation algorithms [219] have been extensively used to artificially generate polycrystalline aggregates. Voronoi tessellation are analytically defined given a distribution of points (or seeds) scattered inside a domain. In general, the bounded threedimensional Voronoi tessellation can be defined given a bounded domain D ⊂ R3 , a set of generator seeds S = {x g ∈ D, g = 1, . . . , Ng }, being Ng the total number of seeds, and a distance function d defined in R3 . For each seed x g , the corresponding grain occupying the volume V g is defined as V g = {y ∈ D | d(y, x g ) < d(y, xh ) ∀h 6= g} (1.1) and the resulting bounded Voronoi diagram V (D, S ) is obtained as the union of all grains N V (D, S ) = [g V g. (1.2) g =1 Approximations of three-dimensional polycrystalline aggregates can be obtained using 3D Voronoi tessellations and the Euclidean distance. Voronoibased polycrystalline morphologies and their modifications [112, 67, 116], described in more details in the next part of this Section, have been widely used within different numerical approaches to model the behaviour of polycrystalline morphologies, see for examples Refs. [111, 110, 28, 73] to cite a few. As an example, Figure (1.2a) shows a polycrystalline aggregate generated using a Voronoi-based scheme inside a cubic box and Figure (1.2b) shows the interior grains of the same aggregate. 8 Grain Boundary formulation for polycrystalline micro-mechanics 3.2 0.16 α-iron Al-2%Sn Ti-21S β Voronoi Tessellation 2.8 2.0 0.12 Frequency Frequency 2.4 1.6 1.2 0.10 0.08 0.06 0.8 0.04 0.4 0.02 0 α-iron Al-2%Sn Ti-21S β Voronoi Tessellation 0.14 0 0 0.4 0.8 1.2 1.6 R/hRi (a) 2.0 2.4 2.8 3.2 0 5 10 15 20 25 30 35 40 Number of Faces (b) Figure 1.3: Statistics of three polycrystalline materials compared to those obtained by using Voronoi tessellations. (a) Grain size obtained as the ratio between the spherical equivalent grain radius R (i.e. the radius of a sphere with the same volume of the grain) and the mean radius h Ri. (b) Number of grain faces. Experimental data are taken from [240] (circles), [62] (squares) and [179] (diamonds). (a) (b) Figure 1.4: 100-grain hardcore Laguerre-Voronoi tessellation: (a) seeds and weights (indicated by the spheres) distribution inside a cubic box and (b) resulting tessellation. Voronoi tessellations can be generated by using open source libraries such as TetGen (http://wias-berlin.de/software/tetgen/) [198], Voro++ (http: 1.2 Generation of artificial polycrystalline morphologies 9 //math.lbl.gov/voro++/) [180] or Neper (http://neper.sourceforge.net) [167]. Eventually, artificial polycrystalline morphologies can also be generated by relying on grain growth model in combination with phase field [108] or cellular automata [60] techniques. In this thesis, the polycrystalline microstructures are generated starting from Voronoi tessellations. Figures (1.3a) and (1.3b) show two important statistical features of three polycrystalline materials (namely α-iron [240], Al2%Sn [62] and Ti-21Sβ [179]), and the corresponding statistical features measured for a 1000-grain Poisson-Voronoi tessellation. Figure (1.3a) shows that the artificial morphology underestimates the variability of grain size, whereas Figure (1.3b) shows that the Voronoi tessellation slightly overestimates the number of faces per grain. In order to reduce such differences between artificial Voronoi morphologies and real microstructures, modified Voronoi tessellations have been used in the literature. A first constraint prescribes a minimum distance between the tessellation seeds, to take into account the minimum size of stable nuclei before the solidification process initiates, which leads to the so called hardcore Voronoi tessellations. Second, a sphere with random radius from a suitable statistical distribution can be associated to each seed, requiring that the associated grain must contain it, which leads to the so called Laguerre tessellations [67, 116]. Calling r g the radius associated to the seed x g , the distance d L between x g and a generic point y used to compute the Laguerre tessellations is defined as d L (y, x g ) = {[d E (y, x g )]2 − (r g )2 }1/2 (1.3) where d E is the Euclidean distance. Figure (1.4) shows the Laguerre tessellation obtained combining the two modifications. The weight (radius) of each seed is indicated by a sphere, and the hardcore condition ensures that the spheres do not intersect. Fine-tuning the distribution of grains weights allows to generate micro morphologies that better represent the statistical features of real materials. Figure (1.5) compares the statistical features of a 1000-grain Poisson-Voronoi tessellation with those of a 1000-grain hardcore Laguerre tessellation, whose sphere radii distribution was determined from the following Weibull distribution:     b  x  b −1 x b ψ( x | a, b) = exp − (1.4) a a a where the parameters a and b have been chosen to fit the experimental data reported in Ref. [240]. The latter clearly better approximates the observed real 10 Grain Boundary formulation for polycrystalline micro-mechanics microstructure, in terms of both grain size and number of faces. For such reasons, the hardcore Laguerre tessellations are adopted in the present framework. 3.2 0.16 α-iron (exp.) Laguerre-Voronoi Poisson-Voronoi 2.8 0.12 2.0 Frequency Frequency 2.4 α-iron Laguerre-Voronoi Poisson-Voronoi 0.14 1.6 1.2 0.10 0.08 0.06 0.8 0.04 0.4 0.02 0 0 0 0.4 0.8 1.2 1.6 R/hRi (a) 2.0 2.4 2.8 3.2 0 5 10 15 20 25 30 35 40 Number of Faces (b) Figure 1.5: (a) Grain size distribution and (b) number of faces statistics generated from standard Poisson-Voronoi tessellations (dashed line), experimental measurements [240] (circles) and hardcore Laguerre-Voronoi tessellations based on experimental data (squares). Figure 1.6: Position of the generic grain g inside the polycrystalline aggregate. V g and S g = ∂V g denote the volume occupied by the grain and its boundary, respectively. A local reference system Rki (x) is attached at each point x of the boundary of the grain to facilitate the expression of the interface equations. 1.3 Grain boundary integral equations 1.3 11 Grain boundary integral equations The polycrystalline morphology is modelled using a multi-domain boundary integral formulation in which each grain g is considered as a generally anisotropic domain with a specific crystallographic orientation in the threedimensional space. Let us first consider a generic three-dimensional grain g in a polycrystalline aggregate occupying the volume V g ⊂ R3 and whose boundary is denoted by S g = ∂V g (see Figure (1.6)). In the linear elastic regime, the relag tion between the second-order stress tensor σij (x) and the second-order strain g tensor ε ij (x) can be generally expressed as g g g σij (x) = cijkl ε kl (x) (1.5) g where cijkl represents the components of the grain’s fourth-order stiffness tensor, which is assumed to be constant for the considered grain. It is recalled here that, in Eq.(1.5) and throughout the present thesis, repeated subscripts imply summation. In the formulation, the displacements field of the grain is g g denoted by ui (x) and is related to the strain tensor ε ij (x) whose components are given by # " g g ∂u j 1 ∂ui g ε ij (x) = (x) + (x) ; (1.6) 2 ∂x j ∂xi g the tractions field defined on a surface with normal ni (x) is denoted by ti (x) and its components are given by g g g g ti (x) = σij (x)n j (x) = n j (x)cijkl ∂uk ( x ). ∂xl (1.7) The boundary integral equations for the grain are derived by using the reciprocity relation between the elastic solution of the grain subject to prescribed boundary conditions and the elastic solution in the infinite 3D elastic space of a body force concentrated at the point y ∈ R3 . For any internal point y inside the domain V g , the displacement boundary integral equations (DBIE) in absence of body forces are written as follows [17, 228, 6] g u p (y) + Z g Sg g Tpi (x, y)ui (x)dS(x) = Z g Sg g U pi (x, y)ti (x)dS(x) (1.8) 12 Grain Boundary formulation for polycrystalline micro-mechanics where x is the integration point running over the boundary S g of the grain g. y is also denoted as the collocation point and represents the point at which the g boundary integral equations are evaluated. The integration kernels U pi (x, y) g and Tpi (x, y) depend on the elastic constants of the considered grain and their expressions are explicitly given in Section (1.3.3) in terms of the fundamental solutions of the general anisotropic linear elastic problem. The explicit expression of the fundamental solutions is given in Chapter (2). However, it is worth noting here that the kernels in the boundary integral equations considered in this thesis can always bepwritten as the product of a singular function depending on the distance r = ( xk − yk )( xk − yk ) between the collocation point y and the integration point x, and a regular function depending on the direction r̂ = (x − y)/r and the material properties, i.e. each kernel K (x, y) can generally be written as K (x, y) = r − β K (r̂) being β > 0 an integer representing the order of the singular function. g For three-dimensional problems, the kernel U pi (x, y) has an order of sing gularity β = 1, whereas the kernel Tpi (x, y) has an order of singularity β = 2. The order of singularity is of crucial importance when the collocation point is taken at the boundary S g [17, 228, 6]. In fact, in order to solve the elastic problem given a proper set of displacements and/or tractions boundary conditions over S g , the DBIE (1.8) must be evaluated for points belonging to the boundary S g of the volume V g . However, for a point y ∈ S g , given the singular nature of the integration kernels, the integrals appearing in Eq.(1.8) must be treated appropriately. The DBIE for a boundary point are obtained by suitable limiting processes that are well described in the BEM literature [17, 228, 6]. In order to give the intuition of a boundary limiting process when integrating over the surface S g , one can consider a reference system centered at y. In such a case, the beg g haviour of the terms dS(x), U pi (x, y) and Tpi (x, y), as x → y, are of the order r2 , r −1 and r −2 , respectively, being r the distance between x and y. As a cong sequence, the integral involving the U pi (x, y) is only weakly singular and the singularity can be cancelled by the Jacobian of the integration. On the other g hand, the integral involving the kernel Tpi (x, y) is strongly singular and the so-called free terms remain after the limiting process. For a detailed derivation of the DBIE for a point belonging to the boundary, the reader is referred to [17, 228, 6]. Following considering the limiting process, a more general form of the 1.3 Grain boundary integral equations 13 DBIE can then be written as g c pi (y)ui (y) + Z − Sg g g Tpi (x, y)ui (x)dS(x) = Z g Sg g U pi (x, y)ti (x)dS(x) (1.9) R where the integration symbol − denotes a Cauchy principal value integral g and the terms c pi (y)ui (y) are the free terms that stem from the limiting process. Depending on the position of the point y, the coefficients c pi (y) take the following values   δpi , c pi (y) = δpi /2,   0, if if if y inside V g y on S g smooth , y outside V g (1.10) where δpi is the Kronecker delta function. The strain and the stress fields at any internal point y inside the grain g can be computed by suitably taking the derivatives of Eq.(1.8) with respect to the coordinates yi of the collocation point y. The strain boundary integral equations are then obtained by using the strain-displacement relationships and are given as follows g ε pq (y) + Z ε,g Sg g Tpqi (x, y)ui (x)dS(x) = ε,g Z ε,g Sg g U pqi (x, y)ti (x)dS(x), (1.11) ε,g where the kernels U pqi (x, y) and Tpqi (x, y) are obtained in terms of the kernels g g U pi (x, y) and Tpi (x, y), respectively, and their expressions are given in Section (1.3.3). By using the grain’s constitutive relations, the stress boundary integral equations are expressed as g σmn (y) + Z σ,g Sg g Tmni (x, y)ui (x)dS(x) = σ,g σ,g Z σ,g Sg g Umni (x, y)ti (x)dS(x), (1.12) where the kernels Umni (x, y) and Tmni (x, y) are obtained by applying the conε,g ε,g stitutive relation to the kernels U pqi (x, y) and Tpqi (x, y), respectively. Eqs.(1.11) and (1.12) provide a relation to compute the strain and the stress fields, respectively, within the volume V g of the grain in terms of the values of the displacements and the tractions at the boundary S g and are usually employed in a post processing stage after the solution of the elastic problem is obtained by means of Eq.(1.9). 14 Grain Boundary formulation for polycrystalline micro-mechanics The DBIE given in Eq.(1.9) represent the starting point of the grain boundary formulation of polycrystalline mechanics. In fact, the DBIE must be written for each crystal of the aggregate and suitable boundary conditions and interface conditions must be enforced to the grain boundaries touching the external domain and to the internal grain boundaries, respectively. To simplify the expression of the interface boundary conditions, the displacements and the tractions at the internal grain boundaries are usually expressed in terms of their tangential and normal components. It is therefore convenient to define a local reference system over each face (see Figure (1.6)) of the boundaries of the constituent grains and express displacements and tractions in that reference system. In the local reference system, the displacements and the tractions are written in terms of the local transformation matrix Rij (x), which depends on the position of the considered point on the boundary. The DBIE can then be rewritten in a more convenient form as Z g e g (x, y)ueg (x)dS(x) = cepi (y)uei (y) + − T pi i Sg Z Sg e g (x, y)et g (x)dS(x), U pi i (1.13) where cepi (y) = c pk (y) Rki (y), e g (x, y) = U g (x, y) Rki (x), U pi pk (1.14) e g (x, y) = T g (x, y) Rki (x) T pi pk (1.15) and Rij (x) relate the components of the grain boundary displacements and tractions in the global reference system to the components in the local reference system, i.e. g g uk (x) = Rki (x)uei (x), g g tk (x) = Rki (x)eti (x). (1.16) In Eqs.(1.13) to (1.16) and throughout the present thesis, the symbol e· denotes a quantity expressed in the local reference system of the grain boundary. 1.3.1 Boundary conditions Boundary conditions (BCs) generally refer to prescribed values of displacements or tractions that are enforced at the boundary of each considered domain. However, in case of the polycrystalline problem external grain boundary and internal grain boundaries must be distinguished. Therefore, throughout the present thesis, boundary conditions will refer to prescribed values of displacements and tractions enforced over the external boundaries of the grains, that is those boundaries of the grains that touch the boundary of the 1.3 Grain boundary integral equations 15 Figure 1.7: Example of a grain for which the external and internal grain boundaries are distinguished. Boundary conditions are enforced on the external boundaries (in red) whereas interface conditions are enforced on internal boundaries (in green). external domain as shown in Figure (1.7), in which the internal grain boundaries of a representative boundary grain are coloured in green and the external grain boundary is coloured in red. Different sets of boundary conditions can be assigned to polycrystalline aggregates based on the considered applications. Kinematic or static BCs are usually employed to model the response of a polycrystalline structure to a particular loading condition. On the other hand, to extract homogenised properties of polycrystalline RVEs, periodic boundary conditions (PBCs) have been shown to provide faster convergence to the effective properties with respect to displacement or traction BCs [214]. Considering the external faces of the aggregate, and in particular the pair of opposite master point xm and slave point xs , PBCs are enforced as follows ui (xs ) = ui (xm ) + Γ̄ij ( x sj − x m j ), (1.17a) ti (xs ) + ti (xm ) = 0, (1.17b) where Γ̄ij represents the prescribed strain tensor. Even though it does not represent a requirement, the use of periodic boundary conditions is facilitated by the periodic structure of the aggregate and therefore by the conformity between the meshes of coupled opposite faces. Figure (1.8) shows a periodic polycrystalline morphology, whose generation is detailed is Section (3.3) of 16 Grain Boundary formulation for polycrystalline micro-mechanics Figure 1.8: Example of a periodic polycrystalline morphology and detail of the pair of opposite master point xm and slave point xs for the enforcement of periodic boundary conditions. Chapter (3), and the position of the master point xm and the slave point xs on opposite faces of the aggregate for which the PBCs given in Eq.(1.17) are enforced. 1.3.2 Interface conditions The interface conditions (ICs) express the relationships between the displacements and the traction fields at the interface between two adjacent grains. Consider the two grains in Figure (1.9), where the two adjacent grains g and h share the interface I gh = V g ∩ V h that is highlighted by darker green. The interface conditions can be generally expressed, ∀x ∈ I gh , as follows gh gh g g Ψi [uej (x), uehj (x), et j (x), ethj (x)] = 0, (1.18a) gh g Θi [et j (x), ethj (x)] = 0, (1.18b) gh where Θi represents grain boundary equilibrium conditions whereas Ψi represents generic relations between the grain boundary tractions and displacements that can include from pristine to completely failed interfaces based on the state of the grain boundaries. More details on the interface conditions used for the polycrystalline problems addressed in this thesis are given based on the specific considered application. 1.3 Grain boundary integral equations 17 As previously mentioned, it is more convenient to express the interface conditions in terms of the normal and tangential components of the grain boundary displacements and tractions and this is the reason why the functional dependence of the ICs in Eq.(1.18) is given in terms of the local fields uei and eti . Moreover, in case of a damaged or failing interface, Eq.(1.18a) is usually given in terms of the displacements jump at the interface. By defining opposite local reference systems at coupled points of the interface as shown in Figure (1.9), i.e. Rki (x ∈ V g ) = − Rki (x ∈ V h ), the local displacements jump gh δuei can be written as gh g δuei = −(uei + ueih ). (1.19) Similarly, the equilibrium conditions considering opposite local reference systems can be written as et g = etih = et gh . i i (1.20) gh where eti is used to denote the values of the tractions at the interface I gh . Figure 1.9: Schematic representation of two opposite reference systems at the interface I gh between the adjacent grains g and h. 18 1.3.3 Grain Boundary formulation for polycrystalline micro-mechanics Anisotropic Kernels The kernels appearing in the boundary integral equations (1.8), (1.9), (1.11) and (1.12) are computed in terms of the fundamental solutions of the generally anisotropic elastic problem. More specifically, the fundamental solutions Φ pi (x, y) of general anisotropic elasticity are obtained as solutions of the following problem g ∂2 Φ pk g cijkl (x, y) + δpi δ(x − y) = 0, (1.21) ∂x j ∂xl g where δ(x − y) is the Dirac delta function and the superscript g in Φ pk and g in the stiffness tensor cijkl highlights the fact that the fundamental solutions depend on the specific considered material. The explicit solution of Eq.(1.21) is discussed in a more general fashion in Chapter (2) wherein a novel and unified compact expression of the fundamental solutions of a broader class of partial differential operators, i.e. second-order homogeneous elliptic partial differential operators, is obtained in terms of spherical harmonics expansions. Once the fundamental solutions Φ pi (x, y) and their derivatives are computed, the kernels in Eqs. (1.8), (1.9) are obtained as follows g g U pi (x, y) = Φ pi (x, y), (1.22a) g g Σ pij (x, y) = g cijkl ∂Φ pk (x, y), ∂xl g g Tpi (x, y) = Σ pij (x, y)n j (x). (1.22b) (1.22c) The kernels appearing in Eq.(1.11) are computed by taking the derivatives of the kernels in Eq.(1.22) with respect to the collocation point coordinates yi and are written as " g # g ∂Φqi 1 ∂Φ pi g,ε U pqi (x, y) = (x, y) + (x, y) , (1.23a) 2 ∂yq ∂y p " g # g ∂Φqk 1 g ∂ ∂Φ pk g,ε Σ pqij (x, y) = cijkl (x, y) + (x, y) , (1.23b) 2 ∂xl ∂yq ∂y p g,ε g,ε Tpqi (x, y) = Σ pqij (x, y)n j (x). (1.23c) Finally, the kernels appearing in the stress boundary integral equations (1.12) are obtained upon applying the constitutive relations to the kernels 1.3 Grain boundary integral equations 19 given in Eq.(1.23) and their expressions are g g,σ Umni (x, y) = g cmnpq ∂Φ pi ∂yq (x, y), (1.24a) g g,σ Σmnij (x, y) = g,σ g g cmnpq cijkl ∂2 Φ pk ∂xl ∂yq (x, y), (1.24b) g,σ Tmni (x, y) = Σmnij (x, y)n j (x). (1.24c) g g,ε In Eqs.(1.22b), (1.23b) and (1.24b) the kernels Σ pij (x, y), Σ pqij (x, y) and g,σ Σmnij (x, y), respectively, have been introduced as their expressions will be used in Chapter (5). 1.3.4 Numerical Integration To solve numerically the polycrystalline problem, the boundary integral equations (1.9) are used in the context of the boundary element method for each grain g of the aggregate, according to the following steps: • The boundary S g of each grain is subdivided into sets of non-overlapping surface elements following the strategy described in Chapter (3), wherein an enhanced meshing technique for polycrystalline aggregates is developed for computational effectiveness; • The boundary displacements and tractions fields are then expressed in terms of suitable shape functions N(ξ ), defined over each element in a local 2D (surface) coordinate system ξ = {ξ 1 , ξ 2 }, and nodal values of boundary displacements and tractions expressed in a face local reference system. After this discretisation procedure, a set of nodal points, or simply nodes, and boundary elements are identifiable for each grain; • The DBIE (1.9) are then written for each node of the considered grain and it is numerically integrated, considering the explicit approximation of the boundary fields in terms of shape functions and nodal values. g In this way, a set of 3Np equations, where Np is the number of nodes used in the discretisation of the grain g, is written in terms of nodal values of displacements and tractions and the discrete version of the displacement boundary integral equations reads Hg Ug = Gg Tg (1.25) 20 Grain Boundary formulation for polycrystalline micro-mechanics g where the vectors U g and T g are 3Np vectors collecting the nodal values of boundary displacements and tractions, respectively, and the matrices H g and g g eg G g are 3Np × 3Np matrices stemming from the integration of the kernels T ij e g , respectively. In the numerical integration procedure, care must be and U ij taken when integrating over the elements that contain, for a given collocation point, the collocation point itself. Such singular elements are treated, in the present work, using element subdivision and coordinate transformation for e g , and rigid body conditions for the strongly singuthe weakly singular kernels U ij e g . The interested readers are referred to [17, 6] for such boundary lar kernels T ij element specific aspects. Enforcing displacement and traction boundary conditions on the faces of the grains lying on the loaded external boundary of the aggregate, Eq.(1.25) leads, for each grain, to the following system of equations A g X g = C g Y g (λ) (1.26) where X g collects the unknown nodal values of grain boundary displacements and tractions, Y g collects prescribed values of boundary displacements and tractions, and A g and C g contain suitable combination of the columns of the matrices H g and G g . In Eq.(1.26), the prescribed values of boundary displacements and tractions are given as a function of the load factor λ governing the loading history. It is clear that, at the internal grain boundaries, neither the displacements nor the tractions are known and therefore the matrix A g is not a square matrix; that is, the system of equations (1.26) for a single grain has more unknowns than equations. To solve the polycrystalline problem, Eq.(1.26) must be written for each grain and coupled to suitable interface conditions. The implementation of the polycrystalline system of equations is described next. 1.4 Polycrystalline implementation To obtain the system of equations of the entire polycrystalline aggregates, the system of equations given in (1.26) is written for each grain of the aggregate, that is for g = 1, . . . , Ng ; the integrity of the microstructure is retrieved in the model by enforcing suitable inter-granular conditions, which leads to the following system   AX − B(λ) =0 (1.27) M(X, λ) = I(X) 1.4 Polycrystalline implementation 21 where    A=  A1 0 · · · 0 A2 · · · .. .. .. . . . 0 0 ··· 0 0 .. . A Ng       , B =    C1 Y1 C2 Y2 .. . C Ng Y Ng       , X =    X1 X2 .. . X Ng    ,  (1.28) being X the vector collecting the unknown degrees of freedom of the polycrystalline system, i.e. the unknown displacements and tractions at the grain boundaries. In Eq.(1.27), I(X) implements the interfaces conditions, which are written for each pair of coupled interface nodes according to Eq.(1.18) and therefore are generally function of the unknown nodal displacements and tractions X. 1.4.1 System solution The system of equations given in (1.27) must be solved at each step of the loading history. Calling λn the load factor at the n-th load step of the loading history, the corresponding solution Xn is obtained by solving M(Xn , λn ) = 0. The solution is computed by employing a Newton-Raphson iterative algorithm, i.e., at the n-th load step, the (k + 1)-th approximation Xkn+1 of the system solution is obtained as Xkn+1 = Xkn − (Jkn )−1 Mkn , (1.29) where Mkn ≡ M(Xkn , λn ), the starting guess solution is chosen as the last converged solution, i.e. X0n ≡ Xn−1 , and Jkn ≡ J(Xkn , λn ) is the Jacobian of the system defined as ∂M J(X, λ) = (X, λ). (1.30) ∂X Given the structure of the overall system of equations (1.27), it is easy to see that the Jacobian defined in Eq.(1.30) is a highly sparse matrix, especially for a large number of grains. As a consequence, the package PARDISO (http://www.pardiso-project.org) [114, 185, 186] is used as a sparse solver to compute the term (Jkn )−1 Mkn in Eq.(1.29). To enhance the convergence and the whole solution calculation, the zero and non-zero elements of the Jacobian are defined at the beginning of the loading history in such a way that its sparsity pattern is retained throughout the analysis. Furthermore, the solver PARDISO is used both as a direct and an iterative solver. More specifically, 22 Grain Boundary formulation for polycrystalline micro-mechanics by considering that during subsequent load steps the changes in the Jacobian matrix are small, the same LU factorisation at a certain load step is used as a preconditioner of the iterative solution at the successive steps, whereas the new LU factorisation is computed only when the iterative approach does not converge. Such an approach drastically decreases the computational cost of the solution. The reader is referred to the PARDISO documentation for more details. A direction of further computational enhancement could involve the use of specialised high efficiency solvers, based for example on the use of the hierarchical format in conjunction with iterative solution strategies [31, 34]. 1.5 Key features of the formulation To summarise, the salient features of the method are: • The polycrystalline microstructural problem is entirely formulated in terms of boundary integral equations, in which the grain-boundary displacements and tractions are primary unknowns; in the present context, the term “grain-boundary” refers to this specific aspect; • The grain-boundary nature of the formulation induces a natural simplification of the pre-processing stage, as no volume meshing of the grains’ interior volume is required; in a context characterised by an inherent statistical variability of the physical problem morphology, this is an important computational aspect, as it confines potential meshing issues to the boundary of the grains; • Since the problem is solved using only nodal points lying on the surface of the grains, the formulation induces a reduction in the order of the solving system, i.e. in the number of degrees of freedom; in a multiscale perspective, this represents a computational benefit; • The strain and stress fields at interior points, within the grains, can be computed from grain-boundary variables using a stress boundary integral equation, in a post-processing stage; • In the present form, non-linear constitutive behaviors within the grains are not considered; this is not an inherent limitation of the formulation, as such constitutive behaviors can be included introducing suitable volume terms (and volume meshes) in the boundary integral equations, 1.6 Content of the thesis 23 without introducing additional degrees of freedom, as it will be shown in Chapter (5) when the problem of crystal plasticity is addressed. 1.6 Content of the thesis The following Chapters of this thesis are organised as follows: Chapter (2) presents a novel, unified and compact expression for the fundamental solutions of homogeneous second-order differential operators and their derivatives. An efficient evaluation of the fundamental solutions of partial differential equations is still of great engineering interest as they represent the key ingredient in the boundary integral equations of the boundary element method approach employed in the present thesis, see Eqs.(1.8,1.9,1.11,1.12). The expression found in this thesis has the advantages of being general for the considered class of differential operators and simpler with respect to the formulas found in the literature, especially when high-order derivatives of the fundamental solutions need to be computed. In Chapter (3), an enhanced grain boundary framework for the study of polycrystalline materials is presented. The framework is aimed at reducing the high computational cost that hinders the development of three-dimensional non-linear polycrystalline models using the boundary element approach. The use of a regularised tessellation and the development of a novel ad-hoc meshing strategy to tackle the high statistical variability of polycrystalline micromorphologies are key points of the enhanced framework. The effects of the adopted strategies on the number of degrees of freedom of polycrystalline systems and on the computational costs of micro-cracking analyses are described by several studies. In Chapter (4), a novel formulation for the competition between intergranular and trans-granular cracking in polycrystalline materials is developed. The two mechanisms are modelled using the cohesive zone approach. However, unlike inter-granular cracks, which are well defined when the polycrystalline morphologies are generated, trans-granular cracks are introduced on-the-fly during the micro-cracking analysis and the polycrystalline morphologies are remeshed accordingly. In Chapter (5), a grain-boundary formulation for the mechanism of small strain crystal plasticity is presented and implemented in polycrystalline materials for the first time. The boundary integral equations involving the presence of general anisotropic plastic strain in polycrystalline materials are extensively described. The iterative incremental algorithm for the solution of the 24 Grain Boundary formulation for polycrystalline micro-mechanics crystal plasticity polycrystalline problems is discussed and numerical tests involving single crystals and polycrystalline materials are presented. Chapter 2 Fundamental solutions for multi-field materials based on spherical harmonics expansions 2.1 Introduction Fundamental solutions are essential to the solution of many boundary value problems in engineering [143] and represent the key ingredient in boundary integral formulations [17, 228, 6]. Simple and closed form expressions are available only for simple cases, such as potential problems or isotropic elasticity. Therefore, the development of efficient schemes for computing the fundamental solutions of generic linear systems of partial differential equations (PDEs) still represents a challenge of great scientific interest. In the field of materials engineering, several works have been devoted to finding the displacements field [69, 120] and its derivatives [23] due to a point force in a three-dimensional anisotropic elastic medium. The formal expression of the fundamental solutions of a second order partial differential operator has been classically obtained using either Fourier or Radon transforms, which lead to expressions in terms of a contour integral on a unit circle [208]. By using suitable variable transformations, several researchers replaced the contour integral by an infinite line integral [220], whose solution has been obtained by means of the Cauchy’s residue theorem in terms of the Stroh eigenvalues [229, 181, 118] or eigenvectors [129, 148]. However, when the Stroh’s eigenvalues or eigenvectors approach is used, the issue of degeneracy needs 25 26 Fundamental solutions for multi-field materials based on spherical harmonics expansions to be robustly addressed, in particular when such an approach is used in a numerical code, e.g. in boundary element implementations. Non-degenerate cases were first studied by Dederichs and Leibfried [55] for cubic crystals. Phan et al. [163, 164] presented a technique to compute the fundamental solutions of a 3D anisotropic elastic solid and their first derivatives in presence of multiple roots and using the residue approach. Shiah et al. [195] used the spherical coordinates differentiation to obtain the explicit expressions of the derivatives of the fundamental solutions for an anisotropic elastic solid up to the second order. Although being exact, the main disadvantage of these approaches is the necessity of using different expressions for each different case of different roots, two coincident roots, and three coincident roots. A unified formulation, valid for degenerate as well as non-degenerate cases, has been first presented by Ting and Lee [215]. Their approach has been further investigated by the recent work of Xie et al. [233], in which the authors developed a unified approach to compute the fundamental solutions of 3D anisotropic solids valid for partially degenerate, fully degenerate and non-degenerate materials. Although not suffering from material’s degeneracy, the expressions presented in the work of Xie et al. [233] are valid only for anisotropic elastic materials, are given up to second order of differentiation and are rather long and complex, in particular when the derivatives are considered. A 2D Radon transform approach has been also used in the literature as an alternative approach to the problem [42, 232]. The aforementioned works have been mainly devoted to the derivation of the fundamental solution of elastic anisotropic materials. Recently, multi-field materials have been receiving an increasing interest for their application in composite multi-functional devices [149, 161]. Closed form expressions can be found for transversely isotropic materials showing piezo-electric [63, 64] and magneto-electro-elastic [223, 204, 92, 61] coupling. Pan and Tonon [158] used the Cauchy’s residue theorem to derive the fundamental solutions of nondegenerate anisotropic piezo-electric solids, and a finite difference scheme to obtain their derivatives. Buroni and Saez [43] used the Cauchy’s residue theorem and the Stroh’s formalism to obtain the fundamental solutions of degenerate or non-degenerate anisotropic magneto-electro-elastic materials. Their scheme was recently employed in a boundary element code for fracture analysis [142]. From a numerical perspective, the fundamental solutions represent the essential ingredient in boundary integral formulations, such as the Boundary Element Method (BEM) [17, 228, 6]. In practical BEM analyses of engineer- 2.1 Introduction 27 ing interest, the fundamental solutions and their derivatives are computed in the order of million times and the availability of efficient schemes for their evaluation is thus of great interest, especially for large 3D problems. To accelerate the computations for anisotropic elastic materials, Wilson and Cruse [227] proposed to pre-compute the values of the fundamental solutions at regularly spaced points of a spatial grid and to use an interpolation scheme with cubic splines to approximate their values in general points during the subsequent BEM analysis. Such an approach and similar interpolation techniques [184] have been widely employed in the BEM literature [34, 138, 29, 28, 80, 33]. Mura and Kinoshita [144] represented the fundamental solutions of a general anisotropic elastic medium in terms of spherical harmonics expansions and used a term-by-term differentiation to obtain the first derivative. Aubrys and Arsenalis [16] used the spherical harmonics expansions for dislocation dynamics in anisotropic elastic media and pointed out that line integrals and double line integrals could be obtained analytically once the series coefficients were computed. Recently, Shiah et al. [196] proposed an alternative scheme to compute the fundamental solutions of 3D anisotropic elastic solids based on a double Fourier series representation. The authors expressed the fundamental solutions as given by Ting and Lee [215] in the spherical reference system and then built their Fourier series representation relying on their periodic nature. The authors underlined that the coefficients of the series were computed only once for a given material and employed their method in a BEM code [209]. They also obtained the first and the second derivatives of the fundamental solutions whose complexity increases with the order of differentiation, despite the use of the spherical coordinates to obtain the derivatives. The interested reader is referred to the book by Pan and Chen [157] and to the recent paper by Xie et al. [232] for a comprehensive overview of the available methods to obtain the fundamental solutions. In the present Chapter, given a generic linear system of PDEs defined by a homogeneous elliptic partial differential operator, the fundamental solutions and their derivatives are computed in a unified fashion in terms of spherical harmonics expansions [81]. It is here demonstrated that the formula found by Mura and Kinoshita [144] is in fact a particular case of a more general representation of the fundamental solutions and their derivatives, which are not obtained by a term-by-term differentiation and can be computed up to the desired order. The coefficients of the series depend on the material constants and need to be computed only once, thus making the present scheme attractive for efficient boundary integral formulations. Eventually, mathemat- 28 Fundamental solutions for multi-field materials based on spherical harmonics expansions ically degenerate media do not require any specific treatment and the present scheme can be generally employed to cases ranging from simply isotropic to more complex general anisotropic differential operators. To the best of the author’s knowledge, it is the first time that the fundamental solutions for generally anisotropic multi-field materials and their derivatives up to any order are represented in such compact unified fashion. The Chapter is organised as follows: Section(2.2) introduces the class of systems of partial differential equations and the corresponding fundamental solutions that will be addressed in the present study; Section(2.3) illustrates the mathematical steps needed to obtain the expressions of the fundamental solutions and their derivatives in terms of spherical harmonics; Section(2.4) presents a few results from the proposed scheme: first it is shown that, in the case of isotropic operators, the proposed representation leads to exact expressions of the fundamental solutions; then a few numerical tests covering isotropic elastic, generally anisotropic elastic, transversely isotropic and generally anisotropic piezo-electric and magneto-electro-elastic media are presented and discussed. 2.2 Problem statement The linear behaviour of different classes of multi-field materials, such as PiezoElectric (PE), Magneto-Electric (ME), or Magneto-Electro-Elastic (MEE) materials, can be represented by a system of generally coupled partial differential equations (PDEs) Lij (∂ x )φj (x) + f i (x) = 0, (2.1) where x =∈ R3 is the spatial independent variable, φj (x) represent the unknown functions of x, f i (x) represent the known generalized volume forces, and i, j = 1, . . . , N where N is the number of equations as well as the number of unknown functions. Lij (∂ x ) is supposed to be a general homogeneous elliptic partial differential operator involving a linear combination of second order derivatives of x, i.e. Lij (∂ x ) = cijkl ∂2 (·) /∂xk ∂xl , where cijkl are the material constants. The system of PDEs (2.1) may be specialised to several specific problems ranging from the classical Laplace equation up to the governing equations for general anisotropic magneto-electro-elastic materials, as shown in Section (2.4). 2.2 Problem statement 29 The system of PDEs in Eq.(2.1) is defined ∀x ∈ V ⊆ R3 , being V the material domain, and it is mathematically closed by enforcing a suitable set of boundary conditions over the boundary S = ∂V of V. The Boundary Element Method [17, 228, 6] is based on the integral representation of Eq.(2.1). In particular, using the Green’s identities, it is possible to express the values of the functions φi (y) at any interior point y ∈ V in terms of the values of φi (x) and their derivatives on the boundary S as follows: φ p (y) = Z  S Φ pi (x, y)τi (x) − Tpi (x, y)φi (x) dS(x) +  Z V Φ pi (x, y) f i (x)dV (x), (2.2) where τi (x) = nk (x)cijkl ∂φj ( x ), ∂xl Tpi (x, y) = nl (x)c jikl ∂Φ pj (x, y). ∂xk (2.3) Φij (x, y) are the fundamental solutions of the system of PDEs (2.1) that, for a given material specified by the constants cijkl , depend only on the relative position between the collocation point y and the observation point x, i.e. Φij (x, y) ≡ Φij (x − y). Defining the distance vector r ≡ x − y, Φij (r) is obtained as the solution of the adjoint problem: Lij∗ (∂r )Φ jp (r) + δpi δ(r) = 0, (2.4) where Lij∗ (∂r ) = L ji (∂r ), δpi is the Kronecker delta function and δ(r) is the Dirac delta function: Φ jp (r) is then the value of the field component function φj (r) at the point r = x − y due to a generalised unit point force δpi at r = 0. Upon applying the Fourier transform to Eq.(2.4), the fundamental solutions Φij (r) can be written as Φij (r) = where 1 8π 3 Z R3 e ij (ξ ) exp(i ξ k rk )dξ Φ h i −1 e ij (ξ ) = Lij∗ (ξ ) Φ . (2.5) (2.6) 3 In Eqs.(2.5-2.6), the Fourier transform √ ξ ∈ R is the variable spanning domain and i = −1 denotes the imaginary unit; Lij∗ (ξ ) = c jikl ξ k ξ l is usually referred to as the symbol of the partial differential operator Lij∗ (∂ x ) [226]. Here and in the following, it is assumed that Lij∗ (ξ ) can be inverted ∀ξ ∈ R3 . It 30 Fundamental solutions for multi-field materials based on spherical harmonics expansions is worth noting that the symbol Lij∗ (ξ ) is homogeneous of order n = 2 and, e ij (ξ ) is homogeneous of order n = −2. therefore, Φ In Eq.(2.5), Φij (r) are given in integral form and an explicit closed form expression can be obtained for particular cases only, e.g. for isotropic materials (Kelvin solution); for general anisotropic materials, the integral in Eq.(2.5) can be explicitly given in terms of the Stroh’s eigenvalues [215, 119, 43, 233], which however have to be computed for each couple of collocation and observation points, thus inducing high computational costs when employed in numerical codes. In this work, the fundamental solutions Φij (r) and their derivatives are obtained using the spherical harmonics expansion. The method is illustrated in the next Section. 2.3 Fourier transform and Rayleigh expansion Let us consider a function F (r), r ∈ R3 , and its Fourier transform representation Z 1 F (r) = Fe(ξ ) exp(i ξ k rk )dξ (2.7) 8π 3 R3 where Fe(ξ ) is the Fourier transform of F (r), i.e. Fe(ξ ) = Z R3 F (r) exp(−i ξ k rk )dr. (2.8) Following Adkins [5] and using the Rayleigh expansion (see Eq.(2.64)), in combination with the spherical harmonic addition theorem (see Eq.(2.70)), the quantity exp (i ξ k xk ) in Eq.(2.7) can be expressed as ∞ exp (i ξ k rk ) = 4π ` ∑ ∑ i` J` (ξ r )Y`m (r̂)Ȳ`m (ξ̂ ) (2.9) `=0 m=−` √ √ where r = rk rk , ξ = ξ k ξ k , r̂ = r/r, ξ̂ = ξ/ξ, J` (·) are the spherical Bessel ¯ indicates complex conjufunctions, Y`m (·) are the spherical harmonics and (·) gation. Upon substituting Eq.(2.9) into Eq.(2.7), one obtains F (r) = 1 2π 2 ∞ ` ∑ ∑ `=0 m=−` i` Y`m (r̂) Z R3 Fe(ξ ) J` (ξ r )Ȳ`m (ξ̂ )dξ. (2.10) If we let Fe(ξ ) be homogeneous of order n, then Fe(ξ ξ̂ ) = ξ n Fe(ξ̂ ), and the integral over R3 in Eq.(2.10) can be separated into the integral over the unit 2.3 Fourier transform and Rayleigh expansion 31 sphere and the integral over ξ ∈ [0, ∞), i.e. 1 F (r) = 2π 2 ∞ ` ∑ ∑ i` Y`m (r̂) Z `=0 m=−` 1 = 2π 2 ∞ ` ∑ ∑ i` Y`m (r̂) `=0 m=−` R3 ξ n Fe(ξ̂ ) J` (ξ r )Ȳ`m (ξ̂ )dξ = Z ∞ ξ 0 n +2 J` (ξ r )dξ Z S1 Fe(ξ̂ )Ȳ`m (ξ̂ )dS(ξ̂ ), (2.11) where S1 the surface of the unit sphere. In Eq.(2.11), the integral with respect to ξ is evaluated as Z ∞ 0 ξ n+2 J` (ξ r )dξ = √ 2n+1 Γ[(` + n + 3)/2] π n +3 , r Γ[(` − n)/2] (2.12) where Γ(·) is the Gamma function. The result in Eq.(2.12) is in general valid for −3 < n + ` < −1 + `; however, it can be extended to the range n + ` > −3, as showed by Adkins [5]. Using the result obtained in Eq.(2.12), Eq.(2.11) becomes ∞ ` 1 F (r) = 2 n+3 ∑ a` (n) ∑ Fe`m Y`m (r̂) (2.13) π r `=0 m=−` where a` (n) = √ π i` 2n Γ[(` + n + 3)/2] = Γ[(` − n)/2]  π i Γ[(` + n + 3)/2] π  √ h ` + i · sin ` 2n π cos 2 2 Γ[(` − n)/2] and Fe`m = Z S1 Fe(ξ̂ )Ȳ`m (ξ̂ )dS(ξ̂ ). (2.14) (2.15) From the second equality in Eq.(2.14), it is possible to show that the coefficients a` (n) are linked to the associated Legendre polynomials P`m (t) and Qm ` ( t ) evaluated at t = 0. Indeed, using Eq.(2.62), the following identities hold (−1)n/2 n+2 (−1)n/2 n+2 P` (0) + i Q` (0), n even, (2.16a) 4 2 (−1)(n−1)/2 n+2 (−1)(n−1)/2 n+2 a` (n) = Q ` (0) + i π P` (0), n odd. (2.16b) 2 4 As an example, Figure (2.1) shows the behaviour of the coefficients a` (n) for n = −2 and n = 0, which, as it will be demonstrated next, are related to the fundamental solutions and their second derivatives, respectively. a` (n) = −π Fundamental solutions for multi-field materials based on spherical harmonics expansions 32 1.00 60 Re[aℓ (n)] Im[aℓ (n)] Re[aℓ (n)] Im[aℓ (n)] 45 0.50 30 0.25 15 aℓ (n = 0) aℓ (n = −2) 0.75 0.00 -0.25 0 -15 -0.50 -30 -0.75 -45 -1.00 -60 0 2 4 6 8 10 12 14 16 18 20 0 2 4 6 8 10 12 14 16 18 20 ℓ ℓ (a) (b) Figure 2.1: Behavior of the coefficients a` (n) for (a) n = −2, (b) n = 0. 2.3.1 Fundamental solutions of general anisotropic materials h i −1 e ij (ξ ) = L ∗ (ξ ) Starting from Eq.(2.5) and recalling that Φ is homogeneous ij of order n = −2, the fundamental solutions of the system of PDEs in (2.1) can be written using Eq.(2.13) and Eqs.(2.16). Before writing the series expression e ij (ξ ) is a real of the fundamental solutions, it is worth noting that, since Φ quantity, the sum over m in Eq.(2.13) is also real and, therefore, in order to obtain a real quantity with respect to the sum over `, only the real part of the coefficients a` (−2) is retained. The following expression is then obtained Φij (r) = 1 4πr where e ij`m = Φ ∞ ∑ `=0 ` even Z S1 ` P` (0) ∑ e ij`m Y m (r̂) Φ ` (2.17) m=−` e ij (ξ̂ )Ȳ m (ξ̂ )dS(ξ̂ ). Φ ` (2.18) In Eq.(2.17), the sum over ` ranges over even values since P` (0) = 0 for odd `. The first derivatives of the fundamental solutions can be computed using Eq.(2.6) and the properties of the Fourier transform of a function derivative. In the Fourier transform domain, the first derivative of the fundamental solue ij (ξ ), which is homogeneous of tions with respect to rα can be written as i ξ α Φ e ij (ξ ) is purely imagorder n = −1. In this case, n is odd and the quantity i ξ α Φ inary. Therefore, only the imaginary part of the coefficients a` (−1) is retained. 2.3 Fourier transform and Rayleigh expansion 33 The following expression is obtained ∂Φij 1 (r) = ∂rα 4πr2 where `m e ij,α Φ = Z S1 ∞ ∑ ` ∑ P`1 (0) `=1 ` odd `m m e ij,α Φ Y` (r̂) (2.19) m=−` e ij (ξ̂ )Ȳ m (ξ̂ )dS(ξ̂ ) ξ̂ α Φ ` (2.20) In Eq.(2.19), the sum over ` ranges over odd ` values as P`1 (0) = 0 for even `. Similarly, the spherical harmonics expansion fot the second derivative with respect to rα and r β is obtained as ∂2 Φij 1 (r) = ∂rα ∂r β 4πr3 where `m e ij,αβ Φ = Z S1 ∞ ∑ `=0 ` even P`2 (0) ` ∑ `m e ij,αβ Φ Y`m (r̂) (2.21) m=−` e ij (ξ̂ )Ȳ m (ξ̂ )dS(ξ̂ ). ξ̂ α ξ̂ β Φ ` (2.22) The results given in Eqs.(2.17), (2.19) and (2.21) can be generalised to higherorder derivatives of the fundamental solutions and written using the following unified form ∂( I ) Φij (i ) (i ) (i ∂r1 1 ∂r2 2 ∂r3 3 (r) = ) where e `m Φ ij,(i1 ,i2 ,i3 ) = 1 4πr I +1 Z S1 ∞ ` `∈L m=−` ∑ P`I (0) ∑ m e `m Φ ij,(i1 ,i2 ,i3 ) Y` ( r̂ ), e ij (ξ̂ )Ȳ m (ξ̂ )dS(ξ̂ ). (ξ̂ 1 )i1 (ξ̂ 2 )i2 (ξ̂ 3 )i3 Φ ` (2.23) (2.24) In Eq.(2.23), I = i1 + i2 + i3 , L is the set of positive even (odd) integers when I is even (odd). Mura and Kinoshita [144] pointed out that the `-th coefficients of the spherical harmonics expansion of the fundamental solutions is the value of the Legendre polynomial of degree ` evaluated at zero. Here, it is proved that such a relationship is in fact a particular case of the more general expression given in Eq.(2.23). Furthermore, Eq.(2.23) shows that the fundamental solutions as well as their derivatives can be written as the product of a regular part, expressed as a spherical harmonics expansion, by a singular part depending only on powers of r. 34 Fundamental solutions for multi-field materials based on spherical harmonics expansions e `m In the following, the compact notation Φ will be used to denote ij,(i1 ,i2 ,i3 ) the coefficients of degree ` and order m of the fundamental solutions Φij (r), whose derivative is taken i1 times with respect to r1 , i2 times with respect to e `m r2 and i3 times with respect to r3 . The terms Φ will then represent the ij,(0,0,0) coefficients of the fundamental solutions’ expansion. From the expression given by Eq.(2.24), two properties of the expansion e `m e `m coefficients Φ are worth mentioning. First, the coefficients Φ ij,(i1 ,i2 ,i3 ) ij,(i1 ,i2 ,i3 ) depend only on the material properties and can be computed only once, in advance in any numerical implementation; additionally, using Eq.(2.68), it is possible to show that `m ē ij,(i ,i ,i ) . e `(−m) = (−1)m Φ Φ 1 2 3 ij,(i ,i ,i ) (2.25) 1 2 3 Second, it is interesting to note that when the variable ξ̂ is expressed in spherical coordinates {ϑ, ϕ} as ξ̂ = {sin ϑ cos ϕ, sin ϑ sin ϕ, cos ϑ }, the following identities hold for its components r ξ̂ 1 = i 2π h −1 Y1 (ξ̂ ) − Y11 (ξ̂ ) , 3 (2.26a) r ξ̂ 2 = i i 2π h −1 Y1 (ξ̂ ) + Y11 (ξ̂ ) , 3 r 4π 0 ξ̂ 3 = Y (ξ̂ ). 3 1 (2.26b) (2.26c) Then, using the expression of the Clebsch-Gordon series in Eq.(2.69), it is e `m e `m possible to compute the expansion coefficients Φ ,Φ and ij,(i1 +1,i2 ,i3 ) ij,(i1 ,i2 +1,i3 ) ` m ` m e e Φ in terms of the coefficients Φ , thus avoiding further inteij,(i1 ,i2 ,i3 +1) ij,(i1 ,i2 ,i3 ) gration. In fact, it is sufficient to compute the coefficients of the fundamental solutions (including the coefficients with odd values of `), and the use the following recurrence relations for the coefficients of higher-order derivatives: r e `m Φ ij,(i1 +1,i2 ,i3 ) =  `+1 c̃`mk (−1) `+1  c̃`mk (1) 2` + 1  e k ( m +1) + ∑ √ e k ( m −1)  − ∑ √ Φ Φ ij,(i1 ,i2 ,i3 ) 2 2k + 1 2k + 1 ij,(i1 ,i2 ,i3 ) k =k` (−1) k = k ` (1) m m (2.27a) 2.3 Fourier transform and Rayleigh expansion r e `m Φ ij,(i1 ,i2 +1,i3 ) = i  `+1 35 `+1 c̃`mk (−1)  c̃`mk (1) 2` + 1  e k ( m +1) + ∑ √ e k ( m −1)  √ Φ Φ ∑ ij, ( i ,i ,i ) 2 3 1 2 2k + 1 2k + 1 ij,(i1 ,i2 ,i3 ) k =k` (−1) k = k ` (1) m m (2.27b) e `m Φ ij,(i1 ,i2 ,i3 +1) = √ `+1 2` + 1 ∑ k =k`m (0) c̃`mk (0) √ 2k + 1 e km Φ ij,(i1 ,i2 ,i3 ) (2.27c) ` k c 1` k where k`m (m0 ) ≡ max{|1 − `|, |m + m0 |} and c̃`mk (m0 ) ≡ c1000 . m0 (−m)(−m+m0 ) As a last remark on the series expansion given in Eq.(2.23), it is interesting to note that such a representation allows to obtain some integral properties of the fundamental solutions, which may be useful for numerical implementation. As an example, the technique proposed by Gao and Davis [72] for the evaluation of strongly singular volume integrals, arising e.g. in isotropic plasticity problems, required that the integral over the unit sphere S1 of the regular part of the strain kernel, involving the second derivatives of the fundamental solution, vanished. Such a requirement has been proved by Gao and Davis [72] for isotropic elasto-plasticity; however, it was only numerically verified by Benedetti et al. [33] for Ranisotropic crystal plasticity of copper. Using Eq.(2.23) and considering that S1 Y`m (r̂)dS(r̂) = 0 ∀`, m 6= 0 and P0I (0) = 0 ∀ I > 0, it is possible to show that, in fact, the integral over S1 of the regular part of all the derivatives of the fundamental solutions of any second-order homogeneous elliptic operator vanishes. This constitutes a relevant byproduct of the present unified treatment. 2.3.2 Convergence In this Section, it is shown that the spherical harmonics representation in Eq.(2.23) in fact coincides with the representation of the fundamental solution in terms of unit circle integration. Considering the fundamental solutions and using Eq.(2.23), one has Φij (r) = 1 4πr ∞ ` `=0 m=−` ∑ P` (0) ∑ e ij`m Y m (r̂) = Φ ` 1 8π 2 r Z ∞ 2` + 1 e ij (ξ̂ )dS(ξ̂ ) (2.28) P` (0) P` (ξ̂ k r̂k )Φ 2 S1 `=0 ∑ where the second equality is obtained using the addition theorem (2.70). Using the completeness property of the Legendre polynomials reported in Eq.(2.63), 36 Fundamental solutions for multi-field materials based on spherical harmonics expansions the above expression simplifies to 1 Φij (r) = 8π 2 r Z S1 e ij (ξ̂ )δ(ξ̂ k r̂k )dS(ξ̂ ) = Φ 1 8π 2 r I C e ij (ξ̂ )dc Φ (2.29) where the last integral is taken over the unit circle C defined over the plane ξ̂ k r̂k = 0, which is exactly the classical unit circle integral. Consider now the derivative with respect to rα of the fundamental solutions, which will be indicated as Φij,α ≡ ∂Φij /∂rα . Using the addition theorem (2.70), the spherical harmonics expansion reads 1 Φij,α (r) = 8π 2 r2 Z ∞ 2` + 1 1 e ij (ξ̂ )ξ̂ α dS(ξ̂ ). P` (0) P` (ξ̂ k r̂k )Φ 2 S1 `=0 ∑ (2.30) Using now the completeness relation given in Eq.(2.63) and applying the operator (−1)(1 − t2 )1/2 ∂(·)/∂t to both sides, one obtains ∞ 2` + 1 1 P` (t) P` (s) = (1 − t2 )1/2 δ0 (s − t). 2 `=0 ∑ (2.31) where the right-hand side is intended in a distributional sense. Using the above relation with t = 0, the definition of the derivative of the Dirac delta function and Eq.(2.30), one obtains Φij,α (r) = 1 8π 2 r2 Z S1 e ij (ξ̂ )ξ̂ α δ0 (ξ̂ k r̂k )dS(ξ̂ ) = Φ 1 8π 2 r2 I C e ij (ξ̂ )ξ̂ α ] ∂[Φ ∂(ξˆk r̂k ) dc. ξ̂ k r̂k =0 (2.32) Upon considering a reference system aligned with the direction r̂, the above expression coincides exactly with that used by Schclar [184] to derive the first derivative of the fundamental solutions of an anisotropic elastic material. The above technique can be generalised to higher-order derivatives and confirms that the spherical harmonics expansion in Eq.(2.23) is in fact an alternative representation of the fundamental solutions and their derivatives. 2.3.3 Pseudo-Algorithm To conclude the present Section, the following steps are presented to show the compactness of representing the fundamental solutions and their derivatives in terms of spherical harmonics, given a generic elliptic system of PDEs: 2.4 Results 37 1. Consider an elliptic system of PDEs defined by the operator Lij (∂ x ) as given in Eq.(2.1) 2. Define the symbol Lij∗ (ξ ) of the adjoint differential operator Lij∗ (∂ x ) ≡ L ji (∂ x ); e `m 3. Compute the coefficients Φ for the desired orders i1 , i2 , i3 using ij,(i1 ,i2 ,i3 ) Eqs.(2.24) and (2.27); e ij (r) and their derivatives using 4. Compute the fundamental solutions Φ Eq.(2.23). 2.4 Results In the present Section, the proposed technique is employed to compute the fundamental solutions of different classes of systems of PDEs (2.1). The present scheme is first used to exactly retrieve the fundamental solutions for two isotropic cases, namely the classic Laplace equation and the equations of isotropic elasticity. Then, the scheme is used to compute the fundamental solutions and their derivatives for transversely isotropic and generally anisotropic materials, covering from the elastic to the magneto-electro-elastic cases. In such e `m cases, the series in Eq.(2.23) are truncated and the coefficients Φ are ij,(i1 ,i2 ,i3 ) computed for ` = 0, 1, . . . , L, where L will be referred to as the series truncation number. To demonstrate the accuracy of the present scheme for any combination of source point y and observation point x, the following error is defined over the unit sphere S1 centered at y Φij (r̂) − ΦijR (r̂)   ∆ Φij (r̂) = . ||ΦijR (r̂)||S1 (2.33) Similarly, the norm of the error over S1 is defined as eS1 Φij (r̂) =   ||Φij (r̂) − ΦijR (r̂)||S1 ||ΦijR (r̂)||S1 . (2.34) R In Eqs.(2.33) and (2.34), || · ||S1 = S1 | · |dS(r̂), Φij (r̂) represents the fundamental solutions using the present scheme, and ΦijR (r̂) represents a reference value for the fundamental solutions computed using a reference technique. 38 Fundamental solutions for multi-field materials based on spherical harmonics expansions 2.4.1 Isotropic materials examples In this Section, two classic isotropic cases are considered. In particular, the well-known fundamental solutions of the Laplace equation and the isotropic elasticity are retrieved showing that, in both cases, the solutions are obtained in exact form as the series expansions involve only a finite number of terms. Fundamental solution of the isotropic Laplace equation In the present case, referring to Eq.(2.1), the unknown function is denoted by φ(x) and the differential operator Lij (∂ x ) is the Laplace operator, i.e. Lij ≡ ∇2 ≡ ∂2 (·) /∂xk ∂xk . The adjoint operator Lij∗ ≡ L ∗ coincides with ∇2 (selfadjoint operator) and its symbol is simply L ∗ (ξ ) ≡ ξ k ξ k ≡ ξ 2 . Then, it follows that [L ∗ (ξ̂ )]−1 = 1. In the previous expressions, the indices i, j have been dropped being φ(x) a scalar function. Denoting the fundamental solution by Φ(r) and considering Eq.(2.24), the coefficients of the spherical harmonics expansions are computed as follows e `m Φ ,(i1 ,i2 ,i3 ) = Z S1 (ξ̂ 1 )i1 (ξ̂ 2 )i2 (ξ̂ 3 )i3 Ȳ`m (ξ̂ )dS(ξ̂ ), (2.35) The integrals in Eqs.(2.35) can be analytically evaluated using Eqs.(2.26) and the orthogonality property of the spherical harmonics over the unit sphere, see Eq.(2.67); it is possible to show that the coefficients Φ,`(mi ,i2 ,i3 ) are identi1 cally zero for ` > i1 + i2 + i3 . As an example, the expressions of the fundamental solution Φ(r) and its derivatives Φ,1 (r), Φ,12 (r), Φ,112 (r) are explicitly computed in the following. The directional dependence of the fundamental solution is indicated by means of the unit vector r̂ = {r̂1 , r̂2 , r̂3 } = {sin ϑ cos ϕ, sin ϑ sin ϕ, cos ϑ}. Moreover, only the coefficients with m ≥ 0 will be given since the coefficients with negative m can be obtained using Eq.(2.25). Consider the fundamental solution Φ(r) first. From Eq.(2.35), the coefficients Φ,`(m0,0,0) represent the integrals of the spherical harmonics over S1 , which 0 are √ different from zero only for ` = m = 0. The integral of Ȳ0 (r̂) over S1 equals 2 π and, using Eq.(2.23), one has Φ(r) = 1 . 4πr (2.36) Next, consider the first derivative Φ,1 (r) of the fundamental solution. Us- 2.4 Results 39 ing Eq.(2.35), the coefficients Φ,`(m1,0,0) are computed as Φ,`(m1,0,0) = Z ξ̂ 1 Ȳ`m (ξ̂ )dS(ξ̂ ). S1 (2.37) The only non-zero coefficient is in fact √ e 11 Φ ,(1,0,0) = − 2π/3, (2.38) which, using Eq.(2.23), provides Φ,1 (r) = − r̂1 . 4πr2 (2.39) Then, consider the second derivative Φ,12 (r). The coefficients Φ,`(m1,1,0) are computed as Z e `m = ξ̂ 1 ξ̂ 2 Ȳ m (ξ̂ )dS(ξ̂ ). Φ (2.40) ,(1,1,0) ` S1 In this case, the only non-zero coefficient is √ e 22 Φ ,(1,1,0) = −i 2π/15, (2.41) which, using Eq.(2.23), provides Φ,12 (r) = 3r̂1 r̂2 . 4πr3 (2.42) Eventually, the third derivative Φ,112 (r) is considered. The coefficients Φ,`(m2,1,0) are computed as e `m Φ ,(2,1,0) = Z S1 (ξ̂ 1 )2 ξ̂ 2 Ȳ`m (ξ̂ )dS(ξ̂ ) (2.43) and the only non-zero coefficients are 1 e 11 Φ ,(2,1,0) = i 5 √ 2π/3, 1 e 31 Φ ,(2,1,0) = −i 5 √ π/21, √ e 33 Φ ,(2,1,0) = i π/35, (2.44) which, using Eq.(2.23), provide Φ,112 (r) = 3r̂2 (1 − 5r̂12 ) . 4πr4 (2.45) 40 Fundamental solutions for multi-field materials based on spherical harmonics expansions Fundamental solution of isotropic elasticity The fundamental solutions for isotropic elasticity are here retrieved using the proposed unified formulation. In the present case, the unknown functions are denoted by u j (x), j = 1, 2, 3 and represent the components of the displacement field. The operator Lij (∂ x ) is Lij = (λ + µ) ∂2 ∂2 δij +µ ∂xi ∂x j ∂xk ∂xk (2.46) where λ and µ are the Lamé constants. As Lij is symmetric, the adjoint operator Lij∗ coincides with Lij and its symbol is Lij∗ (ξ ) = (λ + µ)ξ i ξ j + µξ k ξ k δij . Then, it follows that the inverse of Lij∗ (ξ̂ ) is h Lij∗ (ξ̂ ) i −1 = 1 1 δij − ξ̂ i ξ̂ j µ 2µ(1 − ν) (2.47) where ν is the Poisson coefficient. Denoting the fundamental solutions of isotropic elasticity by Φij (r), the e `m coefficients Φ are computed as ij,(i1 ,i2 ,i3 )   Z 1 1 ` m i i i 2 3 1 e ξ̂ i ξ̂ j Ȳ`m (ξ̂ )dS(ξ̂ ). (2.48) δij − (ξ̂ 1 ) (ξ̂ 2 ) (ξ̂ 3 ) Φ ij,(i1 ,i2 ,i3 ) = µ 2µ(1 − ν) S1 The integrals in Eqs.(2.48) can be once again evaluated in closed form using Eqs.(2.26) and the orthogonality property Eq.(2.67) of the spherical harmonics e `m and, in particular, it is possible to show that Φ are identically zero for ij,(i1 ,i2 ,i3 ) ` > i1 + i2 + i3 + 2. As an example, the fundamental solution Φ11 (r) and its fourth derivative Φ11,1123 (r) will be computed. Also in this case, only the coefficients with m ≥ 0 will be reported as the coefficients with negative m can be obtained using Eq.(2.25). Let us consider the fundamental solution Φ11 (r). Using Eq.(2.48), the co`m efficients Φ11, (0,0,0) are computed as  Z  1 1 ` m e Φ δij − ξ̂ i ξ̂ j Ȳ`m (ξ̂ )dS(ξ̂ ). (2.49) 11,(0,0,0) = µ 2µ(1 − ν) S1 The only non-zero coefficients are √ √ π (5 − 6ν) π/5 00 20 e e Φ11,(0,0,0) = , Φ11,(0,0,0) = , 3µ(1 − ν) 3µ(1 − ν) √ e 22 Φ 11,(0,0,0) = − π/30 , µ (1 − ν ) (2.50) 2.4 Results 41 which, using Eq.(2.23), provide Φ11 (r) = 3 − 4ν + r̂12 . 16πµ(1 − ν)r (2.51) Consider now the fourth derivative Φ11,1123 (r) of the fundamental solution `m Φ11 (r). Using Eq.(2.48), the coefficients Φ11, (2,1,1) are computed as e `m Φ 11,(2,1,1) = Z 2 S1  (ξ̂ 1 ) ξ̂ 2 ξ̂ 3  1 1 ξ̂ i ξ̂ j Ȳ`m (ξ̂ )dS(ξ̂ ). δij − µ 2µ(1 − ν) (2.52) In this case, the non-zero coefficients are √ √ π/30 ( 5 − 6ν ) π/5(8 − 11ν) 21 41 e e Φ , Φ 11,(2,1,1) = i 11,(2,1,1) = −i 231µ (1 − ν ) , 21µ(1 − ν) √ √ π/35(8 − 11ν) π/546 61 e =i , Φ 11,(2,1,1) = i 33µ (1 − ν ) , 33µ(1 − ν) √ √ 3π/455 3π/1001 63 65 e e Φ Φ 11,(2,1,1) = i 22µ (1 − ν ) , 11,(2,1,1) = −i 6µ (1 − ν ) , e 43 Φ 11,(2,1,1) (2.53) which provide Φ11,1123 (r) = 2.4.2 15[1 − 4ν + 14(1 + 2ν)r̂12 − 63r̂14 ]r̂2 r̂3 . 16πµ(1 − ν)r5 (2.54) Anisotropic materials examples In the present Section, the proposed scheme is used to compute the fundamental solutions of anisotropic elastic, piezoelectric and magneto-electro-elastic materials. The governing equations are given for a general magneto-electroelastic material and then particularised to the elastic and piezo-electric cases. The system of PDEs for an anisotropic MEE material can be written as follows [156, 43, 142]: ∂2 φK (x) + f J (x) = 0 (2.55) ciJKl ∂xl ∂xi where the unknown functions φK (x), K = 1, 2, . . . , 5 are given by φK (x) = uK (x) if K ≤ 3, φK (x) = ϕ(x) if K = 4 and φK (x) = ψ(x) if K = 5, being uk (x), k = 1, 2, 3 the components of the displacement field, ϕ(x) the electric 42 Fundamental solutions for multi-field materials based on spherical harmonics expansions potential and ψ(x) the magnetic potential. The constants ciJKl are the multifield coupling coefficients of the MEE material and are defined by ciJKl  cijkl ,     elij ,     eikl ,    qlij , = qikl ,      −λil ,     −  ε il ,  −κil , J, K ≤ 3 J ≤ 3, K = 4 J = 4, K ≤ 3 J ≤ 3, K = 5 J = 5, K ≤ 3 J = 4, K = 5 or J = 5, K = 4 J=K=4 J=K=5 (2.56) where cijkl , ε il and κil are the elastic stiffness tensor, the dielectric permittivity tensor and the magnetic permeability tensor, respectively, whereas elij , qlij and λil are the piezoelectric, piezomagnetic and magneto-electric coupling tensors. The aforementioned tensors satisfy the following symmetries cijkl = c jikl = cklij , ε il = ε li , λil = λli , elij = elji , qkij = qkji (2.57) κil = κli , which ensure that the symbol L JK (ξ ) ≡ CiJKl ξ l ξ i of the system of PDEs (2.55) ∗ ( ξ ) are symmetric and coincident. Eventually, the genand its adjoint L JK eralised volume forces are { f J (x)} = { f 1 (x), f 2 (x), f 3 (x), − f e (x), − f m (x)}, being f j (x), j = 1, 2, 3 the mechanical body forces, f e (x) the electric charge density and f m (x) electric current density. The fundamental solutions of a generally anisotropic magneto-electro-elastic material are indicated by Φ JK (r) and are computed using the general form of Eq.(2.23), where the coefficients of the expansions are computed using Eq.(2.24) e JK (ξ̂ ) is defined as Φ e JK (ξ̂ ) = [L ∗ (ξ̂ )]−1 = [CiJKl ξ̂ l ξ̂ i ]−1 . and where Φ JK The fundamental solutions of elastic, piezoelectric and magneto-electroelastic materials are presented next. 2.4 Results 43 Elastic materials First, the fundamental solutions of anisotropic elastic materials are presented. In this case, the coupling tensors elij , qlij and λil are set to zero and only the elastic response is considered. Three FCC crystals are considered, namely Nickel (Ni), Gold (Au) and Copper (Cu). The non-zero elastic constants are reported in Table (2.1) of Section (2.7). Figure (2.2) reports the error eS1 over 10 0 10 Φ11 Φ12 Φ11,1 Φ12,1 Φ11,12 Φ12,12 -2 10 eS 1 eS 1 10 -4 -3 -6 10 -5 10 -8 10 -7 10 10 -9 10 -10 0 10 20 30 Φ11 Φ12 Φ11,1 Φ12,1 Φ11,12 Φ12,12 10 -1 40 0 10 L 10 -3 Φ11 Φ12 Φ11,1 Φ12,1 Φ11,12 Φ12,12 10 -5 10 -7 10 -9 0 10 20 L (c) Cu 40 (b) Au eS 1 eS 1 -1 30 L (a) Ni 10 20 30 40 10 -1 10 -3 Φ11 Φ12 Φ11,1 Φ12,1 Φ11,12 Φ12,12 10 -5 10 -7 10 -9 0 10 20 30 40 L (d) Cu rotated Figure 2.2: Error over the unit sphere for the fundamental solutions up to the second derivative as a function of the series truncation number L for three FCC crystals: (a) Nickel, (b) Gold, (c) Copper in principal reference system and (d) Copper in a rotated reference system. The reference values are computed using the unit circle integration. the unit sphere, as defined in Eq.(2.34), as a function of the series truncation 44 Fundamental solutions for multi-field materials based on spherical harmonics expansions number L. The unit circle integration with an accuracy of 14 digits (decimal places) is used as reference value. The figure reports the fundamental solutions up to the second derivative and shows that the higher the order of derivation the higher is the number of terms to be retained to obtain the same level of accuracy. Figure (2.2) also shows that the rate of convergence is linear in a logarithmic diagram with respect to the series truncation number. Furthermore, it is worth underlining that rotating the material reference system does not substantially affect the efficiency of the scheme. In particular, Figure (2.2d) shows the error over the unit sphere for the spherical harmonics expansion of the fundamental solutions of the FCC Copper whose reference system has been inclined by 60 degrees with respect to the x1 -x2 plane and rotated by 30 degrees in the x1 -x2 plane. The dashed lines represent the convergence of the spherical harmonics expansion when the material properties matrix is expressed in the principal reference system. Several combinations of rotation angles have been tested, but the convergence of the spherical harmonics expansions remained almost unaffected. The effect of the level of anisotropy on the accuracy of the spherical harmonics expansion is assessed considering an FCC elastic crystal with different values of the Zener anisotropy ratio. Figure (2.3) shows the error over the unit 10 0 eS 1 10 -5 10 -10 10 -15 10 -2 10 -1 10 0 10 1 10 2 A Figure 2.3: Error over the unit sphere for the fundamental solutions Φij (r̂) of FCC crystals as a function of the Zener anisotropic ratio for fixed series truncation number L = 40. sphere for the fundamental solutions of an FCC elastic crystal whose elastic coefficients c11 and c12 are taken from crystalline Copper, and the coefficient 2.4 Results 45 c44 is chosen as c44 = A(c11 − c12 )/2, where the Zener anisotropy ratio A takes values from 1/50 to 50. From the figure it is possible to assess the effect of the degree of anisotropy on the error. In particular, as the value of A moves away from 1, i.e. the isotropic case, the error increases. i={1,...,N } max ∆(r̂i ) × 100 [%] 10 2 Φuc ij Φuc ij,k Φuc ij,kl Φsh ij Φsh ij,k Φsh ij,kl 10 0 10 -4 10 -8 10 -12 0 0.5 1 1.5 2 2.5 computing time/N [ms] Figure 2.4: Fundamental solutions for crystalline Cu: computing time versus maximum error for the fundamental solutions Φij and their first and second derivatives obtained using the unit circle integration and the spherical harmonics expansion. N denotes the number of source and observation points. In the legend, the superscript uc stands for unit circle whereas the superscript sh for spherical harmonics. To show the efficiency of the spherical harmonics technique, Figure (2.4) plots the average computing time per collocation/observation couple versus the maximum error of the considered fundamental solutions with respect to the selected reference value. The figure has been obtained by computing the fundamental solutions of an FCC Cu crystal and their derivatives up to the second order for N couples of collocation and observation points, using both the unit circle integration and spherical harmonics expansion. The points in the figure have been obtained by varying the number of Gauss points of the unit circle integration and the series truncation number L. It is clear that the higher the number of Gauss points (as well as the series truncation number), the higher the computing time and the smaller the error. From the figure, it is possible to see that the use of the spherical harmonics technique is more efficient than the unit circle integration since, in order to achieve the same accuracy in the fundamental solutions, it requires less computing time. However, a few considerations should be made: 46 Fundamental solutions for multi-field materials based on spherical harmonics expansions • The figure does not include the time needed to compute the coefficients of the spherical harmonics series since such time is fixed for any number of evaluation points and can be predominant only if a small number of computation points is considered. Such coefficients would be computed ad stored in advance in any effective implementation; • The error of the unit circle integration is linear with respect to the required computing time, whereas the error of the spherical harmonics expansion has a quadratic behaviour with respect to the required computing time (since number of coefficients to be computed scales with L2 ); as a consequence, there is a level of accuracy at which the unit circle integration results more advantageous than the spherical harmonics expansion. However, reaching such a level of accuracy may be not always necessary in a numerical code or beyond the machine precision; • The presented results depend on the degree of anisotropy of the considered material as well as on the number of unknown functions of the considered system of PDEs. A more exhaustive understanding of the efficiency of the spherical harmonics expansion would definitely benefit from an a priori knowledge of the number of series coefficients required to obtain a certain level of accuracy, once the material properties are specified. However, the task is not trivial and is left open to further investigation. 10 0 Φ11 Φ11,1 Φ11,111 Φ11,112 Φ11,113 Φ11,122 Φ11,123 Φ11,133 Φ11,222 Φ11,223 Φ11,233 Φ11,333 eS 1 10 -2 10 -4 10 -6 10 -8 0 20 40 60 L Figure 2.5: Fundamental solutions for crystalline Cu: error, eS1 [Φ11,ijk (r̂)], over the unit sphere for the third derivatives of the fundamental solutions Φ11 as a function of the series truncation number L. The error for Φ11 (r̂) and Φ11,1 (r̂) are reported for comparison purposes. 2.4 Results 47 Figure (2.5) shows the error eS1 for the third derivatives of the fundamental solution Φ11 of FCC Cu crystals as a function of the series truncation number L. In this case, the fundamental solutions computed with L = 60 are used as reference. The value L = 60 has been selected as it has been verified that the addition of further terms would only affect after the 14th decimal place, thus the found values would practically coincide with those provided by the unit circle integral. For comparison purposes, the figure also reports the error eS1 for the fundamental solution Φ11 (r̂) and its first derivative Φ11,1 (r̂). Figure (2.6) presents a few selected fundamental solutions for Cu crystals. In order to appreciate their directional dependence, Figures (2.6a,c,e) plot the fundamental solutions Φ11 (r̂), Φ11,1 (r̂), Φ11,12 (r̂) respectively, using a spherical representation defined as   x (ϑ, ϕ) = $(ϑ, ϕ) sin ϑ cos ϕ y(ϑ, ϕ) = $(ϑ, ϕ) sin ϑ sin ϕ , (2.58)  z(ϑ, ϕ) = $(ϑ, ϕ) cos ϑ where the amplitude $(ϑ, ϕ) is given by the absolute value of the considered fundamental solution. Figures (2.6b,d,f) show the relative difference between the fundamental solutions computed using the spherical harmonics expansion and the fundamental solutions computed using the unit circle integration. The difference is plotted over the unit sphere S1 . In Figure (2.7), some selected third derivatives are plotted using the spherical representation (2.58). 48 Fundamental solutions for multi-field materials based on spherical harmonics expansions (a) Φ11 (r̂) [m] (b) ∆[Φ11 (r̂)] (c) Φ11,1 (r̂) [-] (d) ∆[Φ11,1 (r̂)] (e) Φ11,12 (r̂) [m−1 ] (f ) ∆[Φ11,12 (r̂)] Figure 2.6: Fundamental solutions of Cu crystal: (a,c,e) spherical plots of a few selected fundamental solutions; (b,d,f ) plot over the unit sphere of the difference between the fundamental solutions computed using the spherical harmonics expansions and the unit circle integration. 2.4 Results 49 (a) Φ11,111 (r̂) [m−2 ] (b) Φ11,112 (r̂) [m−2 ] (c) Φ11,113 (r̂) [m−2 ] (d) Φ11,122 (r̂) [m−2 ] (e) Φ11,123 (r̂) [m−2 ] (f ) Φ11,222 (r̂) [m−2 ] Figure 2.7: Fundamental solutions for crystalline Cu: spherical plots of some selected third derivatives of the fundamental solution Φ11 . Fundamental solutions for multi-field materials based on spherical harmonics expansions 50 Piezo-electric materials 10 -2 10 -6 10 [1, 1] [1, 2] [1, 3] [1, 4] [2, 2] [2, 3] [2, 4] [3, 3] [3, 4] [4, 4] -10 10 -14 0 10 20 L (a) 30 10 -2 10 -6 [1, 1] [1, 2] [1, 3] [1, 4] [2, 2] [2, 3] [2, 4] [3, 3] [3, 4] [4, 4] eS 1 R |Φij,2 − ΦR ij,2 |/|Φij,2 | Next, piezo-electric materials are studied. In this case, the coupling tensors qlij and λil are set to zero, whereas the piezoelectric coupling tensor elij is retained. Two piezoelectric materials are considered, namely a transversely isotropic lead zirconate titanate (PZT-4) ceramic and an orthotropic piezoelectric polyvinylidene fluoride (PVDF), whose non-zero elastic, piezoelectric and dielectric constants are reported in Table (2.2) and Table (2.3), respectively. The plane of isotropy of PZT-4 is the x1 -x2 plane. Figure (2.8a) shows the convergence of the spherical harmonics expansions of the first derivative Φij,2 (r) of PZT-4 computed at r = {1, 1, 1}. As reference, the results reported in Ref. [43] and computed using the explicit expressions of the fundamental solutions are used. Figure (2.8b) shows the error eS1 for the same derivative. 10 -10 10 -14 0 10 20 30 L (b) eS1 [Φij,2 (r̂)] Figure 2.8: Fundamental solutions for transversely isotropic PZT-4: a) error for the first derivative Φij,2 (r) computed at r = {1, 1, 1} as a function of the series truncation number L (the reference values are computed using the explicit expressions of the fundamental solutions as in Ref. [43]); b) error over the unit sphere for the first derivatives Φij,2 (r̂) for the fundamental solutions as a function of the series truncation number L (the reference values are computed using the unit circle integration). Figure (2.9) reports the error eS1 of the fundamental solutions and their derivatives up to the second order for the orthotropic piezoelectric material PVDF. The unit circle integration is used as reference value. Figure (2.10) presents a few selected fundamental solutions for PVDF. Figures (2.10a,c,e) 2.4 Results 51 plot the fundamental solutions Φ34 (r̂), Φ34,1 (r̂), Φ34,12 (r̂) respectively using the spherical representation (2.58), whereas Figures (2.10b,d,f) show the error with respect to the unit circle integration. -6 eS 1 10 10 -10 10 10 10 20 -6 10 -10 -14 0 [1, 1] [1, 2] [1, 3] [1, 4] [2, 2] [2, 3] [2, 4] [3, 3] [3, 4] [4, 4] 10 -2 eS 1 [1, 1] [1, 2] [1, 3] [1, 4] [2, 2] [2, 3] [2, 4] [3, 3] [3, 4] [4, 4] 10 -2 10 30 -14 0 10 L (a) eS1 [Φij (r̂)] 0 10 -3 10 -6 [1, 1] [1, 2] [1, 3] [1, 4] [2, 2] [2, 3] [2, 4] [3, 3] [3, 4] [4, 4] 10 -9 10 -12 0 10 30 (b) eS1 [Φij,1 (r̂)] 20 L (c) eS1 [Φij,11 (r̂)] 30 10 eS 1 eS 1 10 20 L 0 10 -3 10 -6 [1, 1] [1, 2] [1, 3] [1, 4] [2, 2] [2, 3] [2, 4] [3, 3] [3, 4] [4, 4] 10 -9 10 -12 0 10 20 30 L (d) eS1 [Φij,12 (r̂)] Figure 2.9: Fundamental solutions for orthotropic piezoelectric PVDF: error for a) the fundamental solutions Φij (r̂), b) the first derivative Φij,1 (r̂), c) the second derivative Φij,11 (r̂), and d) the second derivative Φij,12 (r̂) as a function of the series truncation number L. The reference values are computed using the unit circle integration. 52 Fundamental solutions for multi-field materials based on spherical harmonics expansions (a) Φ34 (r̂) [m] (b) ∆S1 [Φ34 (r̂)] (c) Φ34,1 (r̂) [-] (d) ∆S1 [Φ34,1 (r̂)] (e) Φ34,12 (r̂) [m−1 ] (f ) ∆S1 [Φ34,12 (r̂)] Figure 2.10: Fundamental solutions for orthotropic piezoelectric PVDF: (a,c,e) spherical plots of a few selected fundamental solutions; (b,d,f ) plot over the unit sphere of the difference between the fundamental solutions computed using the spherical harmonics expansions and the unit circle integration. 2.4 Results 53 Magneto-electro-elastic materials The fundamental solutions of magneto-electro-elastic materials are finally computed. Two MEE materials are considered: a transversely isotropic MEE material indicated by M1 and an orthotropic MEE material indicated by M2 , whose properties are reported in Tables (2.4) and (2.5), respectively. 10 -3 10 -6 10 -9 10 [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [3, 3] [3, 4] [3, 5] [4, 4] [4, 5] [5, 5] -12 0 10 20 L (a) 30 10 0 [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [3, 3] [3, 4] [3, 5] [4, 4] [4, 5] [5, 5] 10 -3 eS 1 R |Φij − ΦR ij |/|Φij | 10 0 10 -6 10 -9 10 -12 0 10 20 30 L (b) eS1 [Φij (r̂)] Figure 2.11: Fundamental solutions for transversely isotropic magnetoelectro-elastic material M1 : (a) error for the fundamental solutions Φij (r) computed at r = {1, 1, −1} as a function of the series truncation number L (the reference values are computed using the explicit expressions of the fundamental solutions as in Ref. [156]); (b) error over the unit sphere for the fundamental solution Φij (r̂) as a function of the series truncation number L (the reference values are computed using the unit circle integration). Figure (2.11a) shows the convergence of the spherical harmonics expansions of the fundamental solutions Φij (r) of the material M1 computed at r = {1, 1, −1}. As reference, the results reported in Ref. [156] and computed using the explicit expressions of the fundamental solutions are used. Figure (2.11b) shows the error eS1 for the same fundamental solutions. Figure (2.12) shows the error eS1 for the fundamental solutions and their derivatives up to the second order of the orthotropic MEE material M2 . The unit circle integration is used as reference value. Figure (2.14) displays a few selected fundamental solutions for the considered material: Figures (2.14a,c,e) plot the fundamental solutions Φ11 (r̂), Φ11,1 (r̂), Φ11,12 (r̂) respectively using the spherical representation (2.58), whereas Figures (2.14b,d,f) show the error with respect to the unit circle integration. Fundamental solutions for multi-field materials based on spherical harmonics expansions 54 Figure (2.13) shows the error eS1 for the fourth derivatives of the fundamental solution Φ11 of the MEE material M2 as a function of the series truncation number L. In this case, the fundamental solutions computed with L = 40 are used as reference. For comparison purposes, the figure also reports the error eS1 for the fundamental solution Φ11 (r̂) and its first, second and third derivative Φ11,1 (r̂), Φ11,11 (r̂) and Φ11,111 (r̂). In Figure (2.15) some selected fourth derivatives are plotted using the spherical representation (2.58). 0 10 -4 10 -8 10 -12 10 -16 0 10 20 30 [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [2, 2] [2, 3] [2, 4] [2, 5] [3, 3] [3, 4] [3, 5] [4, 4] [4, 5] [5, 5] 10 eS 1 eS 1 10 0 10 -4 10 -8 10 -12 10 -16 0 10 L (b) eS1 [Φij,1 (r̂)] eS 1 -6 10 -10 0 10 20 L (c) eS1 [Φij,11 (r̂)] 30 [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [2, 2] [2, 3] [2, 4] [2, 5] [3, 3] [3, 4] [3, 5] [4, 4] [4, 5] [5, 5] 10 -2 10 -6 eS 1 10 -2 10 -14 30 L (a) eS1 [Φij (r̂)] 10 20 [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [2, 2] [2, 3] [2, 4] [2, 5] [3, 3] [3, 4] [3, 5] [4, 4] [4, 5] [5, 5] 10 -10 10 -14 0 10 20 30 [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [2, 2] [2, 3] [2, 4] [2, 5] [3, 3] [3, 4] [3, 5] [4, 4] [4, 5] [5, 5] L (d) eS1 [Φij,12 (r̂)] Figure 2.12: Fundamental solutions for orthotropic magneto-electro-elastic material M2 : error for (a) the fundamental solutions Φij (r̂), (b) the first derivative Φij,1 (r̂), (c) the second derivative Φij,11 (r̂), and (d) the second derivative Φij,12 (r̂) as a function of the series truncation number L. The reference values are computed using the unit circle integration. 2.4 Results 55 10 -2 eS 1 10 -6 10 -10 10 -14 0 10 20 L 30 40 Φ11 Φ11,1 Φ11,11 Φ11,111 Φ11,1111 Φ11,1112 Φ11,1113 Φ11,1122 Φ11,1123 Φ11,1133 Φ11,1222 Φ11,1223 Φ11,1233 Φ11,1333 Φ11,2222 Φ11,2223 Φ11,2233 Φ11,2333 Φ11,3333 Figure 2.13: Fundamental solutions for orthotropic magneto-electro-elastic material M2 : error, eS1 [Φ11,ijkl (r̂)], over the unit sphere for the fourth derivatives of the fundamental solutions Φ11 as a function of the series truncation number L. The reference values are fundamental solutions computed for L = 40. The error for Φ11 (r̂), Φ11,11 (r̂), and Φ11,111 (r̂) are reported for comparison purposes. 56 Fundamental solutions for multi-field materials based on spherical harmonics expansions (a) Φ11 (r̂) [m] (b) ∆S1 [Φ11 (r̂)] (c) Φ11,1 (r̂) [-] (d) ∆S1 [Φ11,1 (r̂)] (e) Φ11,12 (r̂) [m−1 ] (f ) ∆S1 [Φ11,12 (r̂)] Figure 2.14: Fundamental solutions for orthotropic magneto-electro-elastic material M2 : (a,c,e) spherical plots of a few selected fundamental solutions; (b,d,f ) plot over the unit sphere of the difference between the fundamental solutions computed using the spherical harmonics expansions and the unit circle integration. 2.4 Results 57 (a) Φ11,1111 (r̂) [m−3 ] (b) Φ11,1122 (r̂) [m−3 ] (c) Φ11,1133 (r̂) [m−3 ] (d) Φ11,1223 (r̂) [m−3 ] (e) Φ11,1233 (r̂) [m−3 ] (f ) Φ11,3333 (r̂) [m−3 ] Figure 2.15: Fundamental solutions for orthotropic magneto-electro-elastic material M2 : spherical plots of a few selected fourth derivatives of the fundamental solution Φ11 . Fundamental solutions for multi-field materials based on spherical harmonics expansions 58 2.5 Associated Legendre polynomials This appendix summarises some of the properties of the associated Legendre polynomials used in this Chapter. Further details about orthogonal polynomials and more comprehensive discussions on their properties can be found in Ref. [4]. The associated Legendre polynomials are the particularisation to integer values of ` of the associated Legendre functions, which are solutions of the associated Legendre differential equation     d m2 2 d m ym (t) = 0. (1 − t ) y` (t) + `(` + 1) − dt dt 1 − t2 ` (2.59) m m The general solution of Eq.(2.59) is written as ym ` ( t ) = αP` ( t ) + βQ` ( t ), m m where α and β are constants and P` (t) and Q` (t) are referred to as the associated Legendre functions of the first and second kind, respectively. Since the associated Legendre polynomials P`m (t) are mainly employed for obtaining the fundamental solutions in terms of spherical harmonics expansions, some of their properties are listed in the present appendix. The associated Legendre polynomials of degree ` and order m, P`m (t), can be expressed in terms of the Legendre polynomials as `+m dm (−1)m 2 m/2 d P ( t ) = ) ( 1 − t ( t2 − 1) ` ` dtm 2` ` ! dt`+m (2.60) where (·)! denotes the factorial. From their definition, the associated Legendre polynomials with negative m, P`−m , can be written as P`m (t) = (−1)m (1 − t2 )m/2 P`−m (t) = (−1)m (` − m)! m P ( t ). (` + m)! ` (2.61) The associated Legendre polynomials satisfy several identities and recurrence relations that can be found in handbooks [4]. One of the identities, which is of interest for the developments presented here, is the value of P`m (t) and Qm ` ( t ) at t = 0: hπ i Γ[(` + m + 1)/2] 2m P`m (0) = √ cos (` + m) ; 2 Γ[(` − m + 2)/2] π hπ i Γ[(` + m + 1)/2] √ m −1 Qm ( 0 ) = − 2 π sin (` + m ) . ` 2 Γ[(` − m + 2)/2] (2.62a) (2.62b) 2.6 Spherical harmonics 59 For m = 0, the associated Legendre polynomials coincide with the Legendre polynomials that satisfy the following completeness relation ∞ 2` + 1 P` (t) P` (s) = δ(t − s) 2 `=0 ∑ (2.63) where δ(·) is the Dirac delta function and t, s ∈ (−1, 1). Furthermore, it is worth recalling here the Rayleigh expansion, also known as plane wave expansion, which expresses a plane wave as the infinite sum of spherical waves [12] and is written as follows ∞ exp(iξ k rk ) = ∑ (2` + 1)i` J` (ξ r) P` (ξ̂ k r̂k ) (2.64) `=0 where J` (·) are the spherical Bessel functions, r = {rk }√and ξ = {ξ k }, k = √ 1, 2, 3, are three-dimensional vectors and r = rk rk , ξ = ξ k ξ k , r̂k = rk /r and ξ̂ k = ξ k /ξ. 2.6 Spherical harmonics This appendix summarises some of the properties of the spherical harmonics Y`m (ξ̂ ) used in the present Chapter. Further details about the spherical harmonics and more comprehensive discussions on their properties can be found in Ref. [12]. Let ξ̂ = ξ̂ (ϑ, ϕ), ϑ ∈ [0, π ], ϕ ∈ [0, 2π ], a unit vector spanning the unit sphere S1 in R3 , the spherical harmonic Y`m (ξ̂ ) ≡ Y`m (ϑ, ϕ) of degree ` and order m is defined as follows: m Y`m (ξ̂ ) = Y`m (ϑ, ϕ) = cm ` P` (cos ϑ ) exp(imϕ ), with s cm ` = 2` + 1 (` − m)! , 4π (` + m)! (2.65) (2.66) √ and where i = −1 is the imaginary unit, (·)! denotes the factorial and P`m (·) are the associate Legendre polynomials. The normalisation coefficient cm ` is m1 m2 chosen such that two spherical harmonics Y`1 (ϑ, ϕ) and Y`2 (ϑ, ϕ) are orthogonal over S1 as follows Z S1 Y`m1 1 (ϑ, ϕ)Ȳ`m2 2 (ϑ, ϕ)dS(ϑ, ϕ) = δm1 m2 δ`1 `2 , (2.67) 60 Fundamental solutions for multi-field materials based on spherical harmonics expansions ¯ denotes the complex conjugate and δij is the Kronecker delta funcwhere (·) tion. The spherical harmonic with negative m, Y`−m , can be written as Y`−m (ϑ, ϕ) = (−1)m Ȳ`m (ϑ, ϕ). (2.68) The product of two spherical harmonics can be obtained using the ClebschGordon series s kf (2`1 + 1)(2`2 + 1) `1 `2 k `1 `2 k c000 cm m (m +m ) Ykm1 +m2 (ϑ, ϕ) Y`m1 1 (ϑ, ϕ)Y`m2 2 (ϑ, ϕ) = ∑ 2 1 2 1 4π ( 2k + 1 ) k=ki (2.69) `1 `2 ` where k i = max{|`1 − `2 |, |m1 + m2 |}, k f = `1 + `2 and cm1 m2 m denotes the Clebsch-Gordon coefficients, that is c`m11`m2 `2 m ≡ h`1 `2 m1 m2 |`1 `2 ` mi. The spherical harmonics are related to the Legendre polynomials through the following addition theorem ` 2` + 1 P` (ξ̂ k r̂k ) = 2π ∑ Y`m (ξ̂ )Y`m (r̂) 2 m=−` where r̂ and ξ̂ are two unit vectors, and ξ̂ k r̂k = ξ̂ 1 r̂1 + ξ̂ 2 r̂2 + ξ̂ 3 r̂3 . (2.70) 2.7 Materials properties 2.7 61 Materials properties Table 2.1: Elastic properties for Copper (Cu), Gold (Au) and Nickel (Ni) from Ref. [29]. material Cu property elastic constants [109 N/m2 ] Au elastic constants [109 N/m2 ] Ni elastic constants [109 N/m2 ] component c1111 , c2222 , c3333 c1122 , c1133 , c2233 c1212 , c1313 , c2323 c1111 , c2222 , c3333 c1122 , c1133 , c2233 c1212 , c1313 , c2323 c1111 , c2222 , c3333 c1122 , c1133 , c2233 c1212 , c1313 , c2323 value 168 121 75 185 158 39.7 251 150 124 Table 2.2: Piezoelectric properties for transversely isotropic lead zirconate titanate (PZT-4) ceramic from Ref. [158]. property elastic constants [109 N/m2 ] piezoelectric constants [C/m2 ] dielectric permeability constants [10−9 C/(V · m)] component c1111 , c2222 c3333 c1122 c1133 , c2233 c2323 , c1313 c1212 e113 , e223 e333 e322 , e311 ε 11 , ε 22 ε 33 value 139 115 77.8 74.3 25.6 (c1111 − c1122 )/2 12.7 15.1 -5.2 6.461 5.620 62 Fundamental solutions for multi-field materials based on spherical harmonics expansions Table 2.3: Piezoelectric properties for orthotropic piezoelectric polyvinylidene fluoride (PVDF) from Ref. [142]. property elastic constants [109 N/m2 ] piezoelectric constants [C/m2 ] dielectric permeability constants [10−9 C/(V · m)] component c1111 c1122 c1133 c2222 c2233 c3333 c2323 c1313 c1212 e113 e223 e333 e311 e322 ε 11 ε 22 ε 33 value 3.61 1.61 1.42 3.13 1.31 1.63 0.55 0.59 0.69 -0.016 -0.013 -0.021 0.032 -0.004 0.054 0.066 0.059 2.7 Materials properties 63 Table 2.4: Magneto-electro-elastic properties for the transversely isotropic material M1 from Ref. [156]. property elastic constants [109 N/m2 ] piezoelectric constants [C/m2 ] piezomagnetic constants [N/(A · m)] magneto-electric coefficients [N · s/(A · m)] dielectric permeability coefficients [10−9 C/(V · m)] magnetic permeability coefficients [10−6 N · s2 /C2 ] component c1111 , c2222 c3333 c1122 c1133 , c2233 c1313 , c2323 c1212 e113 , e223 e333 e322 , e311 q113 , q223 q333 q322 , q311 λ11 , λ22 λ33 e11 , e22 e33 κ11 , κ22 κ33 value 166 162 77 78 43 (c1111 − c1122 )/2 11.6 18.6 -4.4 550.0 699.7 580.3 0 0 11.2 12.6 5 10 64 Fundamental solutions for multi-field materials based on spherical harmonics expansions Table 2.5: Magneto-electro-elastic properties for the orthotropic material M2 from Ref. [142]. property elastic constants [109 N/m2 ] piezoelectric constants [C/m2 ] piezomagnetic constants [N/(A · m)] magneto-electric coefficients [N · s/(A · m)] dielectric permeability constants [10−9 C/(V · m)] magnetic permeability coefficients [10−6 N · s2 /C2 ] component c1111 c1122 c1133 c2222 c2233 c3333 c2323 c1313 c1212 e113 e223 e333 e311 e322 q113 q223 q333 q311 q322 λ11 λ22 λ33 ε 11 ε 22 ε 33 κ11 κ22 κ33 value 3.61 1.61 1.42 3.13 1.31 1.63 0.55 0.59 0.69 -0.016 -0.013 -0.021 0.032 -0.004 550.0 570.0 699.7 580.3 590.0 0.6 0.8 1.0 0.054 0.066 0.059 5.0 7.0 10.0 Chapter 3 An enhanced grain-boundary framework In this Chapter, an enhanced three-dimensional framework for computational homogenisation and intergranular cracking of polycrystalline materials is presented. The framework is aimed at reducing the computational cost of polycrystalline micro simulations. The scheme is based on the grain-boundary formulation described in Chapter (1). A regularisation scheme is used to avoid excessive mesh refinements often induced by the presence of small edges and surfaces in mathematically exact 3D Voronoi or Laguerre morphologies. For homogenisation purposes, periodic boundary conditions are enforced on nonprismatic periodic micro Representative Volume Elements (µRVEs), eliminating pathological grains generally induced by the procedures used to generate prismatic periodic µRVEs. An original meshing strategy is adopted to retain mesh effectiveness without inducing numerical complexities at grain edges and vertices. The proposed methodology offers remarkable computational savings and high robustness, both highly desirable in a multiscale perspective. The determination of the effective properties of several polycrystalline materials demonstrate the accuracy of the technique. Several microcracking simulations complete the study and confirm the performance of the method. 3.1 Introduction In Chapter (1), it was underlined how the high and less expensive affordability of HPC facilities has been pushing the boundaries of more and more 65 66 An enhanced grain-boundary framework realistic micro-mechanical models taking into account multiple aspects of the micro-structures of interest. However, despite such remarkable advancements, any analysis of macro components or structures including all the details of the micro-structure, although conceivable in principle, is practically unfeasible, due to its enormous computational cost. As a consequence, there is interest in developing techniques able to extract information from the finer scales that can be profitably used at the scale relevant to the technological application. Upon the premise of spatially separated length-scales, multi-scale modelling, responds to such demand, being in fact an effective way to exchange information between the scales, avoiding the excessive cost of fine-scale modelling of the whole problem domain. In this framework, computational homogenisation plays a key role: a µRVE is associated to each relevant point of a macro-continuum and provides, through computational homogenisation, the macro-continuum constitutive behaviour. The collection of µRVEs identify the micro-scale underlying the application macro-scale. Although multiscale modelling should in principle provide huge savings with respect to fine scale analyses of the whole domain, the need of resolving many micro Boundary Value Problems (µBVPs), nested within the macroscale, still generates huge computational costs, especially when 3D modelling is pursued, when fine details are included in the µRVEs morphologies, and when highly non-linear phenomena are investigated, e.g. initiation and propagation of damage. For such reasons, in recent years, remarkable efforts have been focused on the development of techniques for reducing the computational costs of µRVEs computations [235, 115]. Due to the increased affordability of HPC, three-dimensional modelling of polycrystalline RVEs has recently received much attention [145, 100, 201, 28, 30]. However, the computational cost of 3D µRVEs simulations is consistently reported as a limiting factor for the scalability of the proposed methods and, as a consequence, only few 3D multiscale frameworks have been developed. A two-scale finite element approach, successfully demonstrated on two 3D applications, has been developed by Han and Dawson [83]. Nakamachi et al. [147] proposed a multi-scale finite element procedure employing realistic 3D micro polycrystalline structures obtained by scanning electron microscopy and electron backscattering diffraction (SEM-EBSD) measurements. The technique was further refined for formability tests [113] and accelerated with HPC and domain partitioning techniques. Benedetti and Aliabadi [30] have recently proposed a 3D, homogenisation based, grain-boundary twoscale formulation for degradation and failure in polycrystalline materials: al- 3.1 Introduction 67 though the potential of the technique has been demonstrated, the two-scale 3D non-linear simulations have been hindered by the computational costs of the µRVEs simulations, pointing out the strong need for model order reduction. In this Chapter, the polycrystalline problem is tackled adopting a comprehensive strategy aimed at reducing the order of the µRVEs simulations. The methodology is based on the synergistic use of state-of-the-art techniques for the analysis of polycrystalline microstructures. First, regularised Laguerre tessellations [167] are employed to remove the majority of those mathematically exact, but physically inessential, small entities (edges and faces) that generally challenge the meshing algorithms, inducing unduly large mesh refinements. The regularised tessellations are then employed within the grain-boundary formulation developed in Chapter (1), which employs only grain-boundary variables, thus avoiding the grains internal meshing. The grain-boundary meshing is enhanced employing continuous and semidiscontinuous elements for the faces of the grains, allowing a smoother and computationally more effective representation of the intergranular fields with respect to the basic discontinuous scheme. Additionally, a modified version for the polycrystalline unit cell is adopted: usually, Voronoi or Laguerre unit cells are obtained by cutting the unbounded tessellation, generated by some initial seeds, through some cutting walls used to produce a prismatic RVE. The cutting operation, however, often re-introduces unnecessary mesh refinements, probably due to the impossibility of avoiding small or pathological residual entities produced by the cutting operation itself. This can be simply avoided by retaining, in the final morphology, only those grains generated by the original seeds. This simple strategy produces polycrystalline RVEs with more regular and affordable overall meshes, at the expense of irregular external shapes and a slightly more complex implementation of the RVEs’ boundary conditions. Although this is a relatively simple expedient, it has not been used often in the literature, see e.g. [154, 91, 73]. The above enhancements synergistically contribute to outstanding savings in terms of overall DoFs count. Their practical implementation and effectiveness is challenged by the high statistical variability of Voronoi or Laguerre aggregates, in terms of topology and morphology, so that many different cases can be met. These aspects are thoroughly discussed in the paper, which is organised as follows. The generation and regularisation of polycrystalline morphologies is discussed in Sections (3.2) and (3.3), while the adopted meshing strategy is described in Section (3.4). The tests in Section (3.5) complete the study. 68 3.2 An enhanced grain-boundary framework Laguerre tessellations regularisation The adoption of the hardcore and Laguerre constraints, described in Chapter (1), produces more regular morphologies with respect to the basic PoissonVoronoi tessellation, namely it reduces the occurrence of excessively small grains edges and faces; however, it does not ensure a minimum smallest edge length in the tessellation. In other words, very small entities are still mathematically possible in the tessellation and, if they occur, they usually induce pathological meshing behaviours, i.e. excessive mesh refinements. Quey et al. [167] have recently developed a regularisation scheme that iteratively removes the small edges whose length is below a predetermined threshold value. The removal is accomplished by merging the two vertices defining the small edges. If the algorithm encounters a face formed by three edges and one of them must be removed, the whole face is deleted. The technique naturally leads to topological and morphological modifications of the tessellation that, strictly speaking, it is not a Voronoi or a Laguerre tessellation anymore: the resulting tessellation may have more than four grains intersecting at one vertex and more than three faces intersecting at one edge. Moreover, while the grain faces lying on the external boundary of the aggregate remain flat, a regularised intergranular interface may result not planar, then inducing a loss of convexity for the two grains in contact through the considered interface itself. However, the regularised morphology results more affordable in terms of generated mesh, as the number of small geometrical entities (edges and faces) is drastically reduced. Further information on the effects of the regularization on the statistical features of the artificial polycrystalline topology and morphology can be found in Ref. [167]. In the present work, regularised tessellations, produced in accordance with the referred procedure, are used for the first time in conjunction with the grain-boundary formulation presented in Chapter (1). This is expected to produce noticeable computational advantages, which will be tested in the next sections. The regularisation is performed using the open source software Neper (http://neper.sourceforge.net/) [167]. 3.3 Removal of cut boundary grains Besides the adoption of regularised tessellations, another modification is proposed here for the generation of computationally effective polycrystalline µRVEs. In a material homogenisation framework, different boundary conditions 3.3 Removal of cut boundary grains 69 can be enforced on the µRVEs to retrieve the macro-scale properties [102]. Periodic boundary conditions (PBCs) have been shown to provide faster convergence to the overall macro properties with respect to displacement or traction boundary conditions [214]. Even though it does not represent a requirement, the use of PBCs is facilitated by the conformity between the meshes of coupled opposite faces, and therefore by a periodic structure of the µRVE. Fritzen et al. [70] suggested the following procedure to obtain periodic microstructures: 1. given the initial seeds distribution inside the original domain, the Ng seeds are copied into the 26 boxes surrounding the original one; 2. the obtained extended bounded domain, containing 27 × Ng seeds, is partitioned into convex polyhedra by means of a suitable tessellation algorithm; 3. the periodic RVE is extracted cutting out the original domain from the extended one. Although this procedure leads to an apparently simple cubic periodic microstructure, the use of the cutting planes introduces additional small geometrical entities, e.g. very small grains, which introduces additional sources of undesired mesh refinement. Periodic microstructures may also be obtained by repeating steps 1 and 2 above (see Figure (3.1)) and, instead of cutting out the extended tessellation, by considering only the cells originated by original seeds, that is, those seeds that have been copied. Given, the same initial distribution of seeds within a unit cube, two periodic morphologies generated using the above mentioned procedures are shown in Figure (3.2). Two couples of opposite boundary faces of the cut morphology are highlighted in Figure (3.3). The adopted construction algorithm enforces opposite faces of the domain to be of the same shape (they can be perfectly superimposed through simple translation). This feature facilitates the generation of conforming meshes between opposite faces of the domain external boundary, and thus the application of PBCs on the µRVEs. Although this procedure has been successfully employed in homogenisation and multi-scale analyses, see e.g. [30], the cutting process generally leads to the generation of very small grains. These small entities cannot be avoided during the analysis of the RVE and cannot be generally regularised, using for example Neper, and as a consequence they represent a source of overrefinement in the µRVE’s mesh. 70 An enhanced grain-boundary framework Extended domain Original domain Figure 3.1: Schematic generation of periodic morphologies: original domain containing Ng scattered seeds and extended volume surrounding the original box (marked in red) and containing additional 26 × Ng points. Figure (3.4) shows instead some of the coupled faces from the periodic microstructure, obtained by considering only the grains corresponding to the initial seeds, those contained within the original domain. In this case, the presence of small cells depends only on the seeds distribution and weights. Nevertheless, the microstructure retains the consistency between opposite faces of the tessellation. In fact, it can be shown that for each external grain face, i.e. each face that is not an intergranular interface, there exists an opposite periodic face of the same shape: PBCs can then be applied as in the case of cubic unit cells, the only difference resulting from a slightly more involved detection of coupled opposite periodic faces. The effects of the regularisation and of the non-prismatic periodic morphology on the number of degrees of freedom for polycrystalline RVEs are investigated and discussed in Section (3.5.1). 3.3 Removal of cut boundary grains (a) 71 (b) Figure 3.2: (a) periodic morphology as obtained after the cutting process; (b) periodic morphology obtained considering only the cells whose generator seeds fall within the original domain (the original box is sketched in black lines). (a) (b) Figure 3.3: (a-b) Two examples of opposite coupled faces obtained after the cutting process. 72 An enhanced grain-boundary framework (a) (b) Figure 3.4: (a-b) Two examples of opposite coupled faces from the nonprismatic periodic microstructure. 3.4 Grain-boundary meshing The generation of appropriate meshes for general polycrystalline microstructures is a demanding task, due to the need of preserving accuracy while maintaining affordable system order. Apart the case of regular morphologies (cubes, octahedra, dodecahedra, etc.), for which the inherent regularity enables regular meshes, the difficulty of meshing randomly generated morphologies originates from their high statistical variability. In the literature either structured or unstructured meshes have been employed for polycrystalline aggregates [70, 38, 20]. Structured meshes use elements of regular shape, such as cubes, to discretise the entire domain and attribute to each element the crystallographic properties of the grain they belong to. Such meshes are easy to generate and present high regularity. However, the interfaces between the grains are poorly resolved, even if in case of very refined meshes, so that they do not appear adequate for the modelling of intergranular fields. Unstructured meshes, on the other hand, are built on the morphology itself and are thus naturally suitable to represent grains boundaries. Unstructured meshes are usually generated starting from 1D meshes of the tessellation edges. The nodes of this 1D mesh are then used as input to mesh the grains faces (2D mesh), which in turn provide the nodes for meshing the grains interior volumes (3D mesh). However, the presence of small entities causes either the presence of very low quality element or overly 3.4 Grain-boundary meshing 73 resolved regions. Several meshing algorithms have been proposed in the literature to generate high quality polycrystalline meshes [194, 189, 74, 167]. In this study, the algorithm proposed by Persson and Strang [162] has been suitably modified for the generation of regular meshes of the grain faces. The difference with respect to the original scheme is that the mesh nodes of the grains edges were used as input for the grains faces meshing, to ensure consistency between the mesh of contiguous grain faces. Mesh homogeneity was enforced as in Ref. [29], and a mesh density parameter dm to control mesh refinement. Figures (3.5a), (3.5b) and (3.5c) show the surface mesh of a Laguerre cell for three different values of dm , respectively dm = 1.0, dm = 2.0, and dm = 3.0. (a) (b) (c) Figure 3.5: Surface mesh of a Laguerre cell for different values of the discretisation parameter dm : (a) dm = 1.0; (b) dm = 2.0; (c) dm = 3.0. 3.4.1 Geometrical nodes and collocation nodes As described in Section (1.3) of Chapter (1), the displacement boundary integral equations (1.13), which are reported here for the sake of readability Z g e g (x, y)uei (x)dS(x) = cepi (y)uei (y) + − T pi Sg Z Sg e g (x, y)eti (x)dS(x), U pi (3.1) are numerically evaluated at the collocation points y of the grain g in order to obtain the discretised version H g U g = G g T g (see Eq.(1.25)). The procedure is straightforward if such points lie on a smooth surface, as the normal unit outward vectors are uniquely defined; however, if the collocation points belong to edges or vertices of the tessellation, the unit normal vector is not unique. This is a well known issue in the boundary element literature: corner points, as they are usually referred to, induce more unknowns than equations 74 An enhanced grain-boundary framework when they are external points with prescribed displacements and when they are interface points [76]. In a polycrystalline µRVE, such issue is encountered at each grain edge and vertex, so that the approach adopted to tackle it has a noticeable effect on the overall effectiveness of the methodology. In [29, 28], for simplicity of implementation, discontinuous triangular elements were employed, so to ensure that the collocation points would always lie on smooth surfaces. However, this has been identified as a source of computational ineffectiveness, leading to an unnecessary increase of number of DoFs, particularly critical in the case of intergranular degradation modelling. In polycrystalline modelling, and in general in the framework of multi-scale modelling, the average number of DoFs used in the µBVP is of crucial importance when memory and solution time performances are of concern. For this reason and in this sense, model reduction with accuracy preservation are undoubtedly of great interest. Different strategies can be used to address corner points in boundary elements [76, 56]. In this work, to reduce the computational inefficiency of discontinuous meshing while keeping a relatively easy implementation, continuous and semi-discontinuous elements are simultaneously used for the representation of the grain boundary fields, while a continuous representation of the geometry is naturally retained. Consider a sample face as shown in Figure (3.6a), where the edge nodes are indicated with big dots. The 1D mesh of the edges of the entire tessellation is performed first and then used as input for the 2D mesh of the tessellation faces. The face is subdivided into non-overlapping triangles, Figure (3.6b) by means of the procedure described in Section (3.4). The use of discontinuous elements for the approximation of the field variables leads to 3 × Nt collocation nodes, where Nt denotes the number of discretisation triangles. Figure (3.6c) shows the position of the geometrical nodes, which are indicated with big dots, and the position of the collocation points, indicated with crosses. The use of continuous and semi-discontinuous elements considerably reduces the number of collocation points. Two different distributions of the collocation nodes can be obtained, depending on the algorithm selected. The first distribution, as shown in Figure (3.6d), is obtained by moving the nodes lying on a face’s edge inside the triangles. In this case each edge node generates as many collocation points as the number of triangles sharing that specific edge node. Internal geometrical nodes must be added to such edge collocation nodes to provide the overall number of collocation points associated with a given grain face. 3.4 Grain-boundary meshing 75 (a) (b) (c) (d) (e) Figure 3.6: (a) Sample face with marked edge nodes; (b) 2D triangulation of the face; (c) Position of the collocation nodes when a discontinuous mesh is adopted; (d,e) Position of the collocation nodes when two continuous/semidiscontinuous approximations are adopted. In the figures, the small circles represent the geometrical nodes whereas the small crosses represent the collocation nodes. 76 An enhanced grain-boundary framework The second distribution, as shown in Figure (3.6e), is instead obtained by moving the edge nodes along the edges of the mesh triangles. In this case, each edge node generates as many collocation points as the number of triangles’ edges meeting at the considered node. The overall number of collocation nodes is obtained by adding to these the number of internal geometrical nodes. As it can be inferred from Figures (3.6d) and (3.6e), the former distribution produces a higher number of collocation nodes with respect to the latter. However, each triangle may always contain only three collocation nodes. The latter distribution, on the contrary, produces a smaller number of collocation nodes, but the resulting triangles may contain from three to six collocation nodes. The latter distribution therefore requires a suitable specialisation of the shape functions for each possible case, i.e. number of collocation nodes per triangle. In the last part of this Section, it is shown that a surface mesh combining triangular and quadrangular elements leads to a further reduction of collocation nodes with respect to the approach shown in Figure (3.6e), while retaining simplicity in the shape functions representation. Figure (3.7a) shows some triangles containing more than three collocation nodes after the semidiscontinuous approximation described in Figure (3.6e). In particular, the four dark-grey triangles contain five collocation nodes, whereas the mid-grey triangle contains four collocation nodes. By looking at the neighbouring triangles, it can be noted that, by appropriately merging two triangles, a quadrangle with four collocation node can be obtained. This is shown in Figure (3.7b), where the mid-grey triangles represent the couples of triangles that, after the merging procedure, would produce a quadrangle with four collocation nodes. Figure (3.7b) also shows two triangles (in dark-grey) whose merging would not produce a quadrangle with four collocation nodes. To avoid the generation of this unwanted element, an additional internal node is added to the face, which is triangulated again as shown in Figure (3.7c). Additional internal nodes are added until the presence of either triangles with three nodes or quadrangles with four nodes is ensured (usually very few additional nodes are needed). Triangles with four collocation nodes are allowed, as they are treated as collapsed quadrangles. Finally, the merging algorithm is employed and a continuous/semi-discontinuous mesh is obtained as shown in Figure (3.7d). The resulting mesh has the advantage of drastically reducing the number of collocation nodes with respect to a completely discontinuous approach, as the one previously adopted in [29, 28]. Furthermore, as it combines triangular and quadrangular elements, the shape functions are straightforward to deal with. 3.4 Grain-boundary meshing 77 (a) (b) (c) (d) Figure 3.7: (a) Sample grain face showing semi-discontinuous triangles containing more than three collocation nodes; (b) Couples of matched triangles whose merging produces quadrangular elements with four (mid-grey) or five (dark-grey) collocation nodes; (c) New triangulation obtained by adding supplementary internal nodes to avoid generation of quadrangular elements with more than four collocation points; (d) Resulting mixed triangularquadrangular continuous-semidiscontinuous grain face’s mesh. In the figures, the small circles represent the geometrical nodes whereas the small crosses represent the collocation nodes. Figure (3.8) shows the surface mesh of the same Laguerre cell as in Figure (3.5) when the described merging algorithm is employed. It is worth noting that the internal structure of the mesh is retained as the triangles are very well-shaped thanks to the meshing algorithm of Section (3.4). More- 78 An enhanced grain-boundary framework over, merging two internal triangles into a quadrangle would not reduce the number of collocation nodes. On the other hand, on the faces edges, merging triangles into quadrangles leads to a reduction of the DoFs associated to the Laguerre cell. Figs (3.8a), (3.8b) and (3.8c) show the surface mesh for the three different values of dm , respectively dm = 1.0, dm = 2.0, and dm = 3.0, produced by the optimized meshing algorithm. In this thesis, the last described meshing algorithm, that is the one combining triangular and quadrangular semi-discontinuous elements, is adopted. (a) (b) (c) Figure 3.8: Surface mesh of a Laguerre cell obtained by using the optimised meshing algorithm with triangular and quadrangular elements, for different values of the discretisation parameter dm : (a) dm = 1.0; (b) dm = 2.0; (c) dm = 3.0. The small dots represent the collocation points of the mesh. 3.4.2 Continuous/semi-discontinuous elements In this Section, the triangular and quadrangular elements used for the grain boundary mesh are discussed with more details. Similarly to a finite element discretisation, the surface of a grain is discretised into non-overlapping elements. For each element, the geometrical position of a point x = { x1 , x2 , x3 } in the global coordinate system can be represented in terms of the coordinates ξ = {ξ 1 , ξ 2 } of the element’s local coordinate system by means of a transformation x = x(ξ ) that, for the triangular and quadrangular elements used in this thesis, can be expressed as follows µ x= ∑ M (α) ( ξ ) x(α) , (3.2) α =1 where M(α) (ξ ) represents the α-th shape function, x(α) represents the coordinates of the α-th geometrical node of the element and µ represent the num- 3.4 Grain-boundary meshing 79 ber of geometrical nodes of the elements. In this thesis, linear triangular and quadrangular boundary elements have been employed. The two types of elements are reported in Figure (3.9) where the black dots indicate the geometrical nodes. Unlike the geometry that is represented by continuous shape functions M(α) (ξ ), a generic unknown boundary field φ is approximated by means of continuous/semi-discontinuous shape functions that are suitably specialised to avoid corner problems discussed in Section (3.4.1). The field φ is approximated as follows ν φ= ∑ N (β) (ξ, d)φ(β) , (3.3) β =1 where N ( β) (ξ, d) represents the β-th shape function, d is a set of discontinuity parameters that can be adjusted to obtain continuous to completely discontinuous elements, φ( β) is the value of the field at the collocation node y( β) of the element and ν is the number of nodal values of the field as well as the number of collocation nodes of the element. Figures (3.9a) and (3.9b) show the position of the collocation nodes of a discontinuous triangular and a discontinuous quadrangular element, respectively, indicated by small crosses. The position of the collocation nodes and the expressions of the shape functions in terms of the discontinuity parameters d are discussed next. x (3) x (3) x (4) y (4) y (3) ξ2 ξ2 y (1) x y (3) ξ1 (1) y (2) ξ1 y (2) y (1) x (2) (a) x (2) x (1) (b) Figure 3.9: (a) discontinuous triangle; (b) discontinuous quadrangle. In the figures, x(α) , α = 1, . . . , µ are the geometrical nodes whereas y( β) , β = 1, . . . , ν are the collocation nodes. 80 An enhanced grain-boundary framework Continuous/semi-discontinuous triangles For continuous/semi-discontinuous triangular elements, the number of geometrical nodes µ as well as the number of collocation nodes ν is 3; the classical local triangular reference system is centred at x(1) , as shown in Figure (3.9a). The position of the collocation nodes y( β) and the expressions of the shape functions N ( β) (ξ, d) are given by two discontinuity parameters, i.e. d ≡ {λ1 , λ2 }. Referring to Figure (3.9a), the local coordinates ξ ( β) of the collocation nodes are given by ξ (1) = { λ 2 , λ 2 } (2) (3.4a) = {1 − λ1 − λ2 , λ2 } (3.4b) ξ (3) = { λ 2 , 1 − λ 1 − λ 2 } . (3.4c) ξ The geometrical position of the collocation node in the global reference system is then obtained as y( β) = ∑α M(α) [ξ ( β) ]x(α) . From Eqs. (3.4), it is clear that, if λ1 = λ2 = 0, then the collocation nodes coincide with the geometrical nodes, i.e. y( β) ≡ x( β) , β = 1, 2, 3, and the element is continuous. The shape functions N ( β) (ξ, d) of a continuous/semi-discontinuous triangular element can be expressed as follows 1 (1 − λ1 − ξ 1 − ξ 2 ) ∆ 1 N (2) (ξ, d) = (ξ 1 − λ2 ) ∆ 1 (3) N (ξ, d) = (ξ 2 − λ2 ) ∆ N (1) (ξ, d) = (3.5a) (3.5b) (3.5c) where ∆ = 1 − λ1 − 2λ2 . It is straightforward to see that the shape functions defined in Eqs. (3.5) satisfy the condition that N ( β) (ξ, d) has unit value at ξ = ξ ( β) and that ∑ β N ( β) (ξ, d) = 1. Continuous/semi-discontinuous quadrangles For continuous/semi-discontinuous quadrangular elements, the number of geometrical nodes µ as well as the number of collocation nodes ν is 4; the local reference system is centred at ξ = {0, 0}, as shown in Figure (3.9b). The position of the collocation nodes y( β) and the expressions of the shape functions N ( β) (ξ, d) are given by four discontinuity parameters, i.e. d ≡ {λ1 , λ2 , κ1 , κ2 }. 3.4 Grain-boundary meshing 81 Referring to Figure (3.9b), the local coordinates ξ ( β) of the collocation nodes are given by ξ (1) = {−1 + λ1 , −1 + κ1 } (3.6a) (2) = {+1 − λ2 , −1 + κ1 } (3.6b) (3) = {+1 − λ2 , +1 − κ2 } (3.6c) ξ (4) = {−1 + λ1 , +1 − κ2 } (3.6d) ξ ξ The geometrical position of the collocation node in the global reference system is then obtained as y( β) = ∑α M(α) [ξ ( β) ]x(α) . From Eqs. (3.6), it is clear that, if λ1 = λ2 = κ1 = κ2 = 0, then the collocation nodes coincide with the geometrical nodes, i.e. y( β) ≡ x( β) , β = 1, 2, 3, 4, and the element is continuous. The shape functions N ( β) (ξ, d) of a continuous/semi-discontinuous quadrangular element can be expressed as follows 1 (1 − λ2 − ξ 1 )(1 − κ2 − ξ 2 ) ∆ 1 N (2) (ξ, d) = (1 − λ1 + ξ 1 )(1 − κ2 − ξ 2 ) ∆ 1 N (3) (ξ, d) = (1 − λ1 + ξ 1 )(1 − κ1 + ξ 2 ) ∆ 1 (4) N (ξ, d) = (1 − λ2 − ξ 1 )(1 − κ1 + ξ 2 ) ∆ N (1) (ξ, d) = (3.7a) (3.7b) (3.7c) (3.7d) where ∆ = (2 − λ1 − λ2 )(2 − κ1 − κ2 ). Similarly to the triangular element, the shape functions defined in Eqs. (3.7) satisfy the condition that N ( β) (ξ, d) has unit value at ξ = ξ ( β) and that ∑ β N ( β) (ξ, d) = 1. 82 3.5 An enhanced grain-boundary framework Computational tests In this Section, the performance and accuracy of the developed framework are assessed: the overall computational savings in terms of DoFs count, the computational homogenisation accuracy and the performance of the microcracking algorithm are considered. The homogenisation and micro-cracking computations have been performed on single 8-core processors of the Galileo super-computing facility of the CINECA Super Computing Applications and Innovation Department in Bologna, Italy (http://www.hpc.cineca.it/hardware/ galileo). 3.5.1 Overall computational savings The computational savings obtained with the proposed methodology are presented and discussed in terms of overall number of DoFs. First, the effect of the adoption of the continuous and semi-discontinuous mesh elements is discussed, as it is valid for both non-periodic and periodic morphologies. Then, the number of DoFs of the non-prismatic periodic morphologies and cubic periodic morphologies are compared. Figure (3.10a) shows the number of DoFs, obtained using the different meshing approaches discussed in Section (3.4), as a function of the number of tessellation grains Ng . The represented data is the average value over 100 different realisations for each selected number of grains. The dashed lines with smaller markers refer to non-regularised tessellations, whereas the solid lines with bigger markers refer to regularised tessellations. It can be noted that, in all cases, the overall number of DoFs varies linearly with respect to the number of grains, as the DoFs of each grain add linearly over the DoFs of the aggregate, but the adoption of the continuous/semi-discontinuous approach, with simultaneous use of quadrangular and triangular elements, guarantees the lowest rate after that of the totally continuous approach, which would however introduce complexities in terms of corner nodes in the formulation. Considering, as an example, tessellations with Ng = 200, it might be of interest to observe that the use of only discontinuous elements increases the number of DoFs of approximately 210% with respect to the use of continuous elements only, whereas the use of the continuous/semi-discontinuous mesh increases the number of DoFs of only 60% with respect to the continuous mesh, see Table (3.1). The same savings ratios among different meshing schemes, for the considered number of grains, are maintained if regularised 3.5 Computational tests 83 tessellations are considered, as shown in the second row of Table (3.1). On the other hand, Table (3.2) exemplifies the effect of the morphology regularisation on the number of DoFs for the different meshing approaches, showing that the regularisation algorithm provides in average an additional 10% reduction in the number of DoFs with respect to a non-regularised morphology for tessellations with Ng = 200. Figure (3.10b) shows the average number of DoFs as a function of the mesh density parameter dm , for morphologies with Ng = 200 over 100 realisations. For discontinuous meshes, the number of DoFs grows faster with dm with respect to semi-discontinuous and continuous meshes. Figure (3.11) shows the number of DoFs as a function of the number of grains Ng , for the periodic morphologies discussed in Section (3.4). The nonprismatic periodic morphology allows to further reduce the number of DoFs in average from 45.3% for Ng = 10 to 27.8% for Ng = 200 with respect to the cubic periodic morphology. The fact that the higher the number of grains, the smaller the reduction is consistent with the fact less grains are affected by the finite size of the cube when Ng increases. Finally, as an example, considering Ng = 200, it can be interesting to note that by combining the continuous/semi-discontinuous mesh, the regularisation and the non-prismatic morphology, the overall reduction in terms of DoFs is around 70%. Table 3.1: Average increase in the number of DoFs with respect to the (ideal) continuous mesh for the different analysed meshing schemes, for tessellations with Ng = 200. The second row refers to regularised morphologies. DoF−DoFcont [%] DoFcont DoF−DoFcont DoFcont reg [%] disc. semidisc. A semidisc. B cont./semidisc. 216.8% 201.8% 111.2% 59.9% 211.1% 200.6% 110.7% 58.7% Table 3.2: Average effect of the morphology regularisation on the number of DoFs for tessellations with Ng = 200. DoF−DoFreg [%] DoF disc. semidisc. A semidisc. B cont./semidisc. 11.8% 10.5% 10.4% 9.7% 84 An enhanced grain-boundary framework 300k DoF 200k 1200k 900k discontinuous semidiscontinuous A semidiscontinuous B cont./semidiscont. continuous DoF 250k 1500k discontinuous semidiscontinuous A semidiscontinuous B cont./semidiscont. continuous 150k 600k 100k 300k 50k 0 1020 50 100 200 1.0 1.5 2.0 3.0 dm Ng (a) (b) Figure 3.10: (a) Comparison of the number of DoFs obtained using different meshing approaches. The dashed lines with smaller markers refer to nonregularised morphologies; the solid lines with bigger markers refer to regularised morphologies. Data collected on 100 realisations using dm = 1.0; (b) Number of DoFs as a function of the mesh density parameter dm . The dashed lines with smaller markers refer to non-regularised morphologies; the solid lines with bigger markers refer to regularised morphologies. Data collected on 100 realisations with Ng = 200. 200k prismatic morphology non-prismatic morphology DoF 150k 100k 50k 0 1020 50 100 200 Ng Figure 3.11: Number of DoFs vs Ng for non-prismatic and prismatic periodic morphologies using the continuous/semi-discontinuous mesh. Data collected over 100 realisations. 3.5 Computational tests 3.5.2 85 Computational homogenisation In this Section, the developed model is employed to determine the elastic properties of polycrystalline aggregates, using the non-prismatic periodic morphologies presented in Section (3.2) and the periodic BCs introduced in Section (1.3.1) of Chapter (1). For these analyses, the grain boundaries are considered as perfect and displacements continuity and tractions equilibrium are enforced, i.e. the interface equations (1.18) of Section (1.3.2) are particularised as follows gh g gh g gh Ψi = uei (x) + ueih (x) = −δuei (x) = 0, Θi = eti (x) − etih (x) = 0, (3.8a) (3.8b) where it is recalled that the symbol e· denotes a quantity expressed in the boundary local reference system, ui and ti denote the grain boundary displacements and tractions, respectively, δui denotes the displacements jumps and g and h are the two generic adjacent grains sharing an interface. Similarly, in order to account for the general orientation of the faces in the non-prismatic periodic morphology, the periodic boundary conditions given in Eq.(1.17) are expressed in the local reference system of the periodic faces, i.e. uei (xs ) + uei (xm ) = Rki (xs )Γ̄ki ( x sj − x m j ), (3.9a) eti (xs ) − eti (xm ) = 0, (3.9b) where the change of signs is obtained by choosing the rotation matrix Rki (xs ) at the slave point as opposite to the rotation matrix Rki (xm ) at the master point. The macro-stress and macro-strain averages are calculated for the µRVE using the following boundary integrals Σij = 1 V Z S ti (x) x j dS(x), Γij = 1 2V Z S (ui (x)n j (x) + u j (x)ni (x))dS(x), which eventually allow to compute the apparent properties Cijkl entering the constitutive relationships Σij = Cijkl Γkl , see e.g. [29]. As first test, the isotropy of the macroscopic elastic properties of an aggregate of Copper (Cu) crystals is assessed. Similar tests, for the basic grainboundary formulation, have been carried out in [29]. However, it necessary to assess that the new regularisation and meshing strategies, and the nonprismatic morphology, do not introduce any artefact in the homogenisation procedure, for example altering the isotropy of the apparent constants Cijkl . 86 An enhanced grain-boundary framework For this purpose, the complete apparent notation) of a single 200-grain aggregate obtaining:  200.1 105.9 102.1  105.1 199.3 105.2   102.9 105.0 201.1 C=  −0.3 0.5 0.6   −1.9 1.0 0.4 −1.5 2.8 −1.4 stiffness matrix C, (6 × 6, in Voigt of Cu crystals has been computed −0.6 −4.9 0.5 0.6 1.7 2.4 −0.5 0.3 −0.8 49.1 0.0 0.3 −1.4 46.4 −0.3 1.0 0.7 49.6     .    The matrix has been obtained from six linearly independent mechanical tests, conducted in displacement control (three independent tensile and three independent shear tests). As it appears, the aggregate, containing 200 randomly oriented crystals, tends to behave macroscopically as an isotropic material. It is underlined that only a single microstructural realisation has been considered, and increased accuracy is to be expected if ensemble averages over several microstructural realisations are carried out. However, the previous result confirms an almost isotropic behaviour and is completely satisfactory. For further details about the effect of the number of grains and number of realisations on the macroscopic averages, the interested reader is referred to Ref. [29]. After the previous assessment, other homogenisation tests are carried out and the results are presented in terms of effective Young’s and shear moduli, computed as ensemble averages of the apparent properties over 100 realisations, for aggregates with Ng = {10, 20, 50, 100, 200} grains. In this study, crystalline Cu, crystalline SiC and a two-phase steel have been considered as test materials. Figure (3.12) reports the apparent Young’s and shear moduli versus Ng for copper crystal aggregates. For comparison, also values obtained with kinematic boundary conditions [29] are displayed. As expected, it is apparent that when periodic boundary conditions are enforced, the apparent properties approach the effective ones much faster with respect to those obtained using displacement boundary conditions. The error bars represent the standard deviation of the homogenisation results. The dashed line, corresponding to the reference effective property, has been taken as the mean value of the fifth order bounds reported in Ref. [70]. In Figure (3.12), the theoretical bounds for the elastic properties of copper polycrystalline aggregates are reported [35]. More specifically, the light grey region corresponds to the upper and lower 1st-order bounds, which are the Voigt and Reuss bounds, respectively; the dark grey region corresponds to the Hashin and Shtrikman bounds 3.5 Computational tests 87 [86, 87]. Figure (3.13) shows the apparent Young’s and shear moduli for polycrystalline SiC. The error bars represent the standard deviation of the homogenisation results, whereas the reference value of the effective macroscopic properties has been taken from Ref. [28]. Also in this case, the theoretical bounds are reported. Again, the light grey region corresponds to the upper and lower 1st-order bounds, whereas the dark grey region corresponds to the Hashin and Shtrikman bounds. Finally, Figure (3.14) shows the apparent Young’s and shear moduli for a two-phase steel alloy, namely two-phase stainless steel SAF 2507. The properties of the micro-constituents have been taken from Ref. [97], and consist of 58% austenite (γ) and 42% ferrite (α) in volume. The figures show the apparent properties of ferrite aggregates, of austenite aggregates, and of the steel alloy. The theoretical bounds for the alloy constituents are also reported. In this case, only the Hashin and Shtrikman bounds are reported. It can be noted that the alloy’s apparent properties approach the known values for SAF 2507. The slight misalignment of the curves has been intentionally added for the sake of clarity in the figure. 150 60 Ref. [29] present Ref. [70] 1st-order bounds H-S bounds 140 130 120 110 100 1st-order bounds H-S bounds Shear modulus [GPa] Young’s modulus [GPa] 160 Ref. [29] present Ref. [70] 55 50 45 40 35 1020 50 100 200 1020 50 100 Ng Ng (a) (b) 200 Figure 3.12: Apparent (a) Young’s and (b) shear moduli for polycrystalline copper. Data collected on 100 realisations. The light grey region represents the 1st order bounds, whereas the dark grey region represents the Hashin and Shtrikman bounds. 88 An enhanced grain-boundary framework 200 1st-order bounds H-S bounds 1st-order bounds H-S bounds present Ref. [28] Shear modulus [GPa] Young’s modulus [GPa] 470 460 450 440 present Ref. [28] 195 190 185 1020 50 100 200 1020 50 100 Ng Ng (a) (b) 200 Figure 3.13: Apparent (a) Young’s and (b) shear moduli for polycrystalline SiC. Data collected on 100 realisations. The light grey region represents the 1st order bounds, whereas the dark grey region represents the Hashin and Shtrikman bounds. 250 105 230 α-iron γ-iron SAF 210 190 170 150 α-iron H-S bounds γ-iron H-S bounds Shear modulus [GPa] Young’s modulus [GPa] α-iron H-S bounds γ-iron H-S bounds 95 α-iron γ-iron SAF 85 75 65 55 1020 50 100 200 1020 50 100 Ng Ng (a) (b) 200 Figure 3.14: Apparent (a) Young’s and (b) shear moduli for polycrystalline aggregates of a two-phase steel. Data collected on 100 realisations. The grey regions represent the Hashin and Shtrikman bounds. 3.5 Computational tests 3.5.3 89 Interface modelling for micro-cracking Prior to presenting the results of micro-cracking simulations of polycrystalline aggregates, the explicit expression of the interface equations introduced in Section (1.3.2) and herein used for modelling polycrystalline micro-cracking is recalled for completeness. The ICs given in Eqs.(1.18) are particularised to be the cohesive laws used in Ref. [28] for modeling polycrystalline inter-granular micro-cracking. As detailed in [28], during the loading history the generic grain boundary interface I gh , shared by the grains g and h, undergoes different states, which are subsequently modelled using the appropriate interface equations. At the beginning of the analysis all the interfaces are assumed to be in a pristine state and, likewise the homogenisation analyses, displacements continuity and tractions equilibrium are enforced as in Eqs.(3.8). The pristine state of I gh holds as long as the following inter-granular threshold condition τe < Tmax (3.10) is satisfied. In Eq.(3.10), Tmax is the interface cohesive strength and τe is an effecgh tive traction expressed as a function of the local grain boundary traction eti as follows s  2 β 2 τe = hτn i + τs , (3.11) α where τn and τs are qthe normal and tangential tractions components defined as gh gh gh τn = et3 and τs = (et1 )2 + (et2 )2 , respectively, α and β are suitable constants weighing the sliding and opening failure modes of the interface and h·i are the gh Macaulay brackets, defined as hτ i = max(0, τ ). It is recalled that eti denotes the tractions at the interface I gh , which, due to the equilibrium conditions g at the interface (see Eq.(1.20)), is equal to the traction eti or the traction etih , i.e. et gh = et g = eth . i i i As soon as the effective traction overcomes the interface strength, the interface enters the damage state and micro-cracking initiation and evolution is modelled by replacing the displacement continuity equations (3.8a) with a cohesive law embodying suitably defined parameters representing the initiation and evolution of damage. The cohesive law can be derived from the definition of a potential [155] or its expression can assumed a priori. The reader is referred to Ref.[28] for the derivation of the cohesive law used in the present 90 An enhanced grain-boundary framework thesis. Here, the following irreversible extrinsic cohesive traction-separation law is introduced in place of Eq.(3.8a) gh gh gh gh )δue3 gh − et3 Ψi = Cs (d∗ )δuei − eti = 0, (3.12a) gh Ψ3 (3.12b) = Cn (d ∗ = 0, where Eq.(3.12a) is valid for i = 1, 2. The term irreversible refers to the fact the damage of the interface is allowed only to accumulate during the loading history and is represented by the monotonically increasing parameter d∗ ; the term extrinsic refers to the fact that such cohesive law is introduced only after the threshold condition ceases to hold; finally, the term traction-separation refers to the fact the the cohesive law expresses a relation between the tracgh gh tions eti and the displacements jump δuei at the interface between the grain g and h. In Eqs.(3.12), Cs and Cn are the constitutive constants of the cohesive law given as αTmax 1 − d∗ , δucr d∗ s Tmax 1 − d∗ , Cn (d∗ ) = δucr d∗ n Cs (d∗ ) = (3.13a) (3.13b) cr where δucr s and δun denote the critical values of the normal and sliding displacement jumps at which the interface fails in the case of pure opening mode or pure sliding mode, respectively. In Eqs.(3.12) and (3.13), d∗ denotes the irreversible damage parameter, which is given by the maximum value reached by an effective opening d during the loading history Hd , i.e. d∗ = max d ∈ [0, 1], (3.14) Hd gh where d is defined in terms of the local displacements jumps δuei at the interface I gh as s     δun 2 δus 2 d= + β cr (3.15) δucr δus n q gh gh gh being δus = (δue1 )2 + (δue2 )2 and δun = δue3 the tangential and normal components of the displacements jump, respectively. It is worth noting that Eqs.(3.12), in the case of very low levels of damage d∗ , still provide consistent interface conditions; in fact, it is straightforward 3.5 Computational tests 91 gh to see that, by multiplying Ψi by d∗ ≈ 0, Eqs.(3.12) corresponds to enforce gh δuei = 0, i.e. pristine interface conditions. Furthermore, in case the two grains g and h come in contact, the continuity of the displacements along the local gh normal direction is enforced, i.e. Eq.(3.12b) is replaced by δue3 = 0. Given the definition of τs and τn , it is easy to see that Eqs.(3.12) can also be written in terms of the tangential and normal components as τs = Cs (d∗ )δus , ∗ τn = Cn (d )δun , (3.16a) (3.16b) and, therefore, it is possible to show that the work of separation G I in case of pure normal mode and the work of separation G I I in pure sliding mode can be written as Z δucr n 1 Tmax δucr n, 2 0 Z δucr s α GI I = τs dδus = 2 Tmax δucr s , 2β 0 GI = τn dδun = (3.17a) (3.17b) respectively. Eqs.(3.17) will be used to compute the critical displacement δucr s in sliding mode in terms of the interface strength Tmax , the critical displacement δucr n in normal mode, the parameters α and β and the ratio G I I /G I . Eventually, the interface enters the failed state when d∗ reaches the critical values d∗ = 1. In such a case, the cohesive law given in Eqs.(3.12) is replaced gh by the condition of zero tractions, i.e. by the equations eti = 0, i = 1, 2, 3. gh However, also in this case, if the two grains come in contact, δue3 = 0 is enforced. For a clearer representation of cohesive law used in this thesis, Figures (3.15a) and (3.15b) show the behaviour of the tangential and normal tractionseparation law given in Eqs.(3.16a) and (3.16b), respectively. In the figures, the cr shaded region of the plane ( βδus /δucr s )-( δun /δun ) corresponds to the region d ≥ 1, i.e. the region where the interface is in the failed stated. For further details about the derivation of the cohesive law described in this Section and used in this thesis, the reader is referred to Ref.[28] and the references therein. 3.5.4 Microcracking simulations In this Section, the results of some micro-cracking simulations for SiC aggregates are reported. The SiC grains bulk elastic constants are taken from Ref. 92 An enhanced grain-boundary framework (a) (b) Figure 3.15: Schematic representation of the (a) tangential component τs and (b) normal component τn of the tractions of the cohesive law used in this thesis given in Eqs.(3.16a) and (3.16b), respectively. [28]. The work of separation G I is √estimated by the macroscopic values of the fracture toughness K IC = 3 MPa m in mode I and in the case of plain strain, of the Young modulus E = 448 GPa and of the Poisson’s ratio ν = 0.168 of SiC by means of the relation GI = 1 − ν2 2 K IC . E (3.18) The inter-granular cohesive √ properties are assumed to be: Tmax =cr500 MPa; G I /G I I = 1; α = 1; β = 2. The critical displacements δucr n and δus are then computed using Eqs.(3.17a) and (3.17b), respectively. Differently from what it has been done in the homogenisation tests, regularised prismatic and non-periodic microstructures are used in the cracking computations. This is due to the circumstance that the simple implementation of Eqs.(3.9), as periodic boundary conditions for a non-prismatic unit cell, without suitable modifications to take into account the presence of possible displacement jumps at the RVE’s external boundary, would over-constrain the micro-cracking, preventing the cracks from reaching the external walls of the unit cell. To avoid this, for simplicity, prismatic unit cells subjected to non-periodic kinematical boundary conditions are used here. This is not a limitation of the formulation: there is no problem in using periodic boundary conditions in a micro-cracking simulation, as shown in Ref. [30]. The only difficulty arises if non-prismatic RVEs are used without suitably modifying 3.5 Computational tests 93 Eqs.(3.9). On the other hand, general kinematic or static boundary conditions can be enforced on the non-prismatic cells. The results presented here serve thus the purpose of testing the use of regularised morphologies in conjunction with optimised meshes within the scope of microcracking simulations: it has been actually found that the introduction of such enhancements has a remarkable effect in cutting down the microcracking simulation time to several hours, for morphologies with few hundred grains, which represents an outstanding gain with respect to the computation times previously reported in Ref. [28], where similar computations required several days on similar machines. Another points of interest concerns the mesh size of the grain-boundary elements. For the basis formulation, this point has been carefully discussed in Ref. [28] where it has been highlighted that the characteristic length of the grain-boundary elements le should be fine enough to resolve the strain and stress distributions inside the cohesive zone [173, 66, 216]. This condition, which ensures the reproducibility of results, is always respected in the present formulation and implementation that, as a matter of fact, smooths the representation of the inter-granular fields without altering the reference mesh size. In the following, prismatic microstructures whose edges are aligned with the global reference system are tested. Figure (3.16) schematises the boundary conditions that will be used during the numerical tests: for each face, the boundary conditions are given as prescribed displacements along the normal of the face and written as uk nk = ūn where nk is the outward unit normal of the face and ūn is the prescribed value of displacement. Along the remaining directions, the external faces of the aggregate are traction-free. A first set of tests reports the micro-cracking behaviour of aggregates with Ng = 100 and different ASTM G values, namely ASTM G = 10, 12, 14 [205] under tensile loading in displacement control. The boundary conditions consist of prescribed displacements over the top and bottom faces of the aggregates given by ui ni = λ/2, whereas the lateral faces of the aggregates are subject ui ni = 0. The remaining loading directions are traction-free. Figure (3.17a) shows three 100-grain morphologies with ASTM G values G = 10, 12, 14 to scale, whereas Figure (3.17b) shows the mesh of the ASTM G = 10 aggregate. Figure (3.18a) reports the value of the macro-stress Σ33 corresponding to different values of enforced nominal strain Γ33 computed as Γ33 = λ/H being H the height of the aggregate. It is worth noting as different ASTM grain sizes induce different macro-behaviours in terms of brittleness: aggregates with bigger grains (ASTM G = 10) are generally more brittle with respect to morphologies with smaller grains, if the inter-granular cohesive strength and 94 An enhanced grain-boundary framework Figure 3.16: Scheme of the boundary conditions used to investigate the microcracking of polycrystalline aggregates. The boundary conditions are given as prescribed displacement along the direction defined by the normal of each face. toughness are kept constant; this is consistent with the model physics. Figures (3.18b), (3.18c) and (3.18d) show the microcracking patterns and the damage distribution for the above three morphologies with Ng = 100 and average ASTM grain size G = 10, 12, 14, respectively, at the last computed snapshot reported in Figure (3.18a). The second sets of tests investigates the effect of the number of grains on the micro-cracking response of the aggregates. Similarly to the previous set of tests, the top and bottom faces of the aggregates are subject to ui ni = λ/2, the lateral faces are subject to ui ni = 0 and the remaining directions are tractionfree. Figure (3.19a) shows three morphologies with average ASTM grain size G = 12 and number of grains Ng = 50, 100, 200 and Figure (3.19b) shows the boundary mesh of the internal grains of the 200-grain aggregate, i.e. those grains that non are affected by the presence of the prismatic box. The microcracking stress-strain behaviour is reported in Figure (3.20a) in which it is interesting to note that the morphologies with Ng = 100 and Ng = 200 have similar response in terms of averaged stress component, so that is appears reasonable to assume a representative behaviour. Figures (3.20b), (3.20c) and (3.20d) show the microcracking patterns and the damage distribution for the morphologies with Ng = 50, Ng = 100 and Ng = 200, respectively, at the last computed snapshot reported in Figure (3.20a). A third set of tests investigates the micro-cracking behaviour of a polycrys- 3.5 Computational tests 95 (a) (b) Figure 3.17: (a) Relative size of three different morphologies with Ng = 100 and different ASTM grain size G = 10, 12, 14. (b) Mesh of the ASTM G = 10 aggregate and particular of the mesh of a grain. talline aggregate subjected to loads in different directions, so to investigate the isotropic behavior of the macro-aggregate also in micro-cracking simulations. The investigated cubic 200-grain aggregate, with ASTM G = 12 grain-size, and the corresponding mesh are shown in Figures (3.21a) and (3.21b), respectively. Five different sets of boundary conditions are prescribed on the aggregate, which is subject to uniaxial tensile loading along the directions x1 , x2 and x3 , to biaxial tensile loading on the plane x1 -x2 and to triaxial tensile loading. Similarly to the two previous sets of tests, the uniaxial boundary conditions along the direction xk are enforced as follows ( ui ni = λ/2, 0, if nk = ±e pk , otherwise (3.19) where ni is the unit normal of the aggregate’s faces and e pk is the unit vector of the k-th loading direction. It is worth noting that when the aggregate is subject to uniaxial boundary conditions along the xk direction, the corresponding prescribed strain is given by Γ̄ = Γkk = λ/H being H the side of the aggregate. Figures (3.22a) and (3.23a) shows the values of the macro-stress components Σijkl versus the load factor λ. In the notation of Σijkl , the first two subscripts ij indicate the considered homogenized stress component, whereas the subscript k indicates the loaded face, i.e. the face with e pk as unit normal, and the 96 An enhanced grain-boundary framework 600 500 ASTM G = 14 ASTM G = 12 ASTM G = 10 Σ33 [MPa] 400 300 600 200 560 100 0 0.00 520 0.12 0.04 0.08 0.14 0.16 0.12 0.16 0.20 Strain Γ33 [%] (b) ASTM G = 10 (a) (c) ASTM G = 12 (d) ASTM G = 14 (e) Figure 3.18: (a) Volume average stress component Σ33 versus nominal applied strain Γ33 . (b-d) Microcracking patterns and damage distribution for three morphologies with Ng = 100 and average ASTM grain size (b) G = 10, (c) G = 12 and (d) G = 14. (e) Colormap of the damage. 3.5 Computational tests (a) 97 (b) Figure 3.19: (a) Relative size of three different morphologies with ASTM grain size G = 12 and different number of grains Ng = 200, 100, 50. (b) Grain boundary mesh of those grain not affected by the presence of the prismatic box (represented by black lines) of the 200-grain morphology. subscript l indicates the loading direction. In particular, Figure (3.22a) shows the values of the direct macro-stress components Σijkl , i.e. the components of the macro-stress Σii when a prescribed displacement in the direction i is applied on the face i, which corresponds to a prescribed macro-strain component Γii . Similarly, Figure (3.23a) shows the values of the cross macro-stress components Σijkl , that is the components of the macro-stress Σii when a prescribed displacement in the direction j is imposed on the face j, with j 6= i. The insets in Figures (3.22a) and (3.23a) are close-ups of the curves when the stresses reach their maximum values. Figures (3.22b-d) show the cracked morphology when subject to the three uniaxial loading conditions, whereas Figures (3.23b-d) show the corresponding damage distribution. It is worth noting the correspondence between the crack pattern,the distribution of damage and the homogenised curves. More specifically, when the morphology is loaded along the direction x2 and x3 , it shows an almost well-defined unique crack perpendicular to the direction of loading and the corresponding homogenised curves overlap reasonably well. On the other hand, when the morphology is loaded along the x1 direction, it shows a more tortuous crack, which corresponds to a slightly higher values of the homogenised stresses. However, in all three tests the isotropic behaviour of the macro direct and cross macro components is verified. Unlike Figures (3.18b-d) and (3.20b-d) that show all the damaged 98 An enhanced grain-boundary framework 600 500 Ng = 50 Ng = 100 Ng = 200 Σ33 [MPa] 400 300 200 100 0 0.00 0.04 0.08 0.12 0.16 0.20 Strain Γ33 [%] (b) Ng = 50 (a) (c) Ng = 100 (d) Ng = 200 (e) Figure 3.20: (a) Volume average stress component Σ33 versus nominal applied strain Γ33 . (b-d) Microcracking patterns and damage distribution for three morphologies with ASTM grain size G = 12 and number of grains (b) Ng = 50, (c) Ng = 100 and (d) Ng = 200. (e) Colormap of the damage. 3.5 Computational tests 99 interfaces in the aggregates, in order to have a clearer representation of the cracks, Figures (3.23b-d) display the interface whose damage is higher than 5%. Then, a tensile biaxial and a tensile triaxial test have been performed on the morphology shown in Figure (3.21). The biaxial has been simulated enforcing the following boundary conditions: ui ni = λ/2 on the lateral faces of the morphology and ui ni = 0 on the top and bottom faces. On the other hand, the triaxial has been simulated enforcing ui ni = λ/2 on all the faces of the morphology. Figure (3.24a) shows the macro-stress components Σ11 , Σ22 and Σ33 versus λ, when the morphology is subject to a biaxial tensile load. For comparison, also the macro-stress components Σ1111 and Σ1122 , taken from corresponding the uniaxial tests are reported in the figure. Similarly, Figure (3.24b) shows the macro-stress components Σ11 , Σ22 and Σ33 versus λ, when the morphology of is subject to a triaxial tensile load. The macro-stress components Σ1111 and Σ1122 taken from the corresponding uniaxial test and the macro-stress Σ11 taken from the biaxial test are reported in the figure. The crack patterns for the biaxial and triaxial loading conditions, at the last computed values of λ, are also reported in Figures (3.24c) and (3.24d) and the corresponding damage distribution are reported in Figures (3.24e) and (3.24f). It is interesting to note that for these last two tests, and in particular for the triaxial case, multiple cracks show during the loading history. Again, in Figures (3.24e,f) the interfaces whose damage is higher than 5% are reported. Finally, the microcracking response of a 1000-grain cubic polycrystalline aggregates with ASTM grain size G = 12 is considered. The 1000-grain morphology is generated in a cubic box by the distribution of the weighted seeds shown in Figure (3.25a). The resulting tessellation is reported in Figure (3.25b). The aggregate is subject to uniaxial tensile boundary conditions along the x3 , i.e. ui ni = λ/2 on the top and bottom faces and ui ni = 0 on the lateral faces. Figure (3.26a) show the volume stress averages Σ11 , Σ22 and Σ33 as a function of the load factor λ. The crack pattern at the last computed step of the loading history is shown in Figure (3.26b) where it is possible to see the presence of two fully developed micro-cracks, one originating from the bottom-right corner and the second one originating from the center of leftmost edge of the aggregate. The cracks configuration will be clearer by means of the following figures. Figures (3.27a,c,e) show the evolution of the microcrack pattern at the different values of the load factor λ. At the same values of λ, Figures (3.27b,d,f) show the evolutions of the damage distribution within the aggregate. In this case, all the damaged interface are displayed and it is in- 100 An enhanced grain-boundary framework (a) (b) Figure 3.21: (a) 200-grain morphology with ASTM grain size G = 12 and (b) its boundary mesh. teresting to note how at λ = 0.077, corresponding the load factor at which the softening initiates, the damage is almost uniform throughout the morphology. During the next load steps, the aggregate undergoes softening and the cracks localize. In order to better show the shape and configuration of the cracks within the aggregate, Figure (3.28) shows from two different views the interfaces of the aggregate whose damage is higher than 5% at the three load steps λ = 0.077, λ = 0.079 and λ = 0.086. By looking at the figures, it is possible to recognise the coalescence of failing interfaces into the two fully developed cracks, one close to the bottom face and the second one at half the height of the aggregate. Also, it is clear that the cracks initiate at the external faces and tend to grow towards the interior of the aggregate. 3.5 Computational tests 101 600 Σijkl [MPa] 500 570 Σ1111 Σ2222 Σ3333 550 530 400 0.040 0.050 300 200 100 0 0.00 0.02 0.04 0.06 0.08 0.10 0.12 Load factor λ (a) (b) Γ̄ = Γ11 (c) Γ̄ = Γ22 (d) Γ̄ = Γ33 Figure 3.22: (a) Volume average of the direct stress component Σijkl versus applied load factor λ for the three uniaxial loading configurations. (b-d) Microcracking patterns for the three uniaxial loading configurations denoted by Γ̄ = Γkk where k is the loading direction. 102 An enhanced grain-boundary framework 140 130 125 120 120 Σijkl [MPa] 100 0.04 0.05 80 Σ2211 Σ3311 Σ1122 Σ3322 Σ1133 Σ2233 60 40 20 0 0.00 0.02 0.04 0.06 0.08 0.10 0.12 Load factor λ (a) (b) Γ̄ = Γ11 (c) Γ̄ = Γ22 (d) Γ̄ = Γ33 (e) Figure 3.23: (a) Volume average of the cross stress component Σijkl versus applied load factor λ for the three uniaxial loading configurations. (b-d) Damage distribution for the three uniaxial loading configurations denoted by Γ̄ = Γkk where k is the loading direction. (e) Colormap of the damage. 3.5 Computational tests 103 600 600 Σijkl [MPa] 500 400 300 200 100 0 0.00 Σ1111 Σ1122 Σ11biax Σ11triax Σ22triax Σ33triax 500 Σijkl [MPa] Σ1111 Σ1122 Σ11biax Σ22biax Σ33biax 400 300 200 100 0.02 0.04 0.06 0.08 0.10 0 0.00 0.12 Load factor λ 0.02 0.04 0.06 0.08 0.10 0.12 Load factor λ (a) (b) (c) (d) (e) (f ) (g) Figure 3.24: Micro-cracking results of (a,c,e) biaxial test and (b,d,f ) triaxial test: (a,b) Volume averages of the stress components Σ11 , Σ22 and Σ33 versus applied load factor λ; (c,d) micro-crack pattern; (e,f ) Damage distribution. (g) Colormap of the damage. 104 An enhanced grain-boundary framework (a) (b) Figure 3.25: 1000-grain morphology with ASTM grain size G = 12: (a) seeds and weights distribution inside the cubic box; (b) resulting polycrystalline aggregate. 600 500 Σ33 Σ11 Σ22 Σij [MPa] 400 300 200 100 0 0.00 0.02 0.04 0.06 0.08 0.10 Load factor λ (a) (b) Figure 3.26: (a) Volume stress averages Σ11 , Σ22 and Σ33 as a function of the load factor λ. (b) Micro-crack pattern of the 1000-grain morphology subject to tensile load at the last computer step. 3.5 Computational tests 105 (a) λ = 0.077 (b) λ = 0.077 (c) λ = 0.079 (d) λ = 0.079 (e) λ = 0.086 (f ) λ = 0.086 (g) Figure 3.27: Microcracking snapshots at the loading steps (a,b) λ = 0.077, (c,d) λ = 0.079 and (e,f ) λ = 0.086. (a,c,e) Cracked aggregate. (b,d,f ) Damage distribution. (g) Colormap of the damage. 106 An enhanced grain-boundary framework (a) λ = 0.077 (b) λ = 0.077 (c) λ = 0.079 (d) λ = 0.079 (e) λ = 0.086 (f ) λ = 0.086 (g) Figure 3.28: Two different views of the microcracks pattern at the loading steps (a,b) λ = 0.077, (c,d) λ = 0.079 and (e,f ) λ = 0.086. (g) Colormap of the damage. 3.6 Discussion 3.6 107 Discussion In this Chapter of the present thesis, an effective computational tool for the microstructural analysis of polycrystalline materials, with applications in computational homogenisation and inter-granular micro-cracking simulations, has been presented. The key contribution of the present work relies in the use of the grain-boundary formulation in conjunction with regularized Laguerre morphologies and a specific grain-boundary meshing strategy. In particular: • The employment of the tessellation regularization [167] has allowed to remove the sources of unnecessary mesh refinements in the original morphologies, thus reducing the overall number of degrees of freedom necessary to model the crystal aggregate. The effect of this regularization is particularly appreciated in microcracking simulations: in the original scheme [28], the occurrence of many small grain-boundary elements hindered the computational performance of the technique and could represent an issue for numerical convergence, due to the concentration of collocation nodes on excessively small grain faces; • The employment of a specific grain boundary meshing strategy, using continuous and semi-discontinuous boundary elements, has simultaneously allowed: a) to smooth the representation of the inter-granular displacement and traction fields, with advantages in terms of numerical convergence of the non-linear solution scheme; b) to reduce the number of inter-granular unknowns, i.e. degrees of freedom; c) to avoid the typical complexities arising, within a boundary element framework, when grid nodes are collocated over edges or corners, where a unit normal cannot be uniquely defined [76]. Additionally, for computational homogenization applications, non-prismatic RVEs have been adopted, with the subsequent further reduction of meshing complexities potentially induced by the cutting operations usually performed to obtain periodic prismatic morphologies. The above enhancements have induced a remarkable acceleration in the numerical solution strategy, retaining the accuracy of the original formulation [28], which is particularly welcome if the technique is to be used in multiscale perspective [30]. However, some numerical/computational aspects deserve further study. First of all, although the reduction of the system order, in terms of DoFs, undoubtedly represents a benefit in any numerical technique, it should be noted that it is not the only factor affecting the computational effectiveness. In this 108 An enhanced grain-boundary framework sense, the features of the resolving system, e.g. the sparsity pattern, the symmetry and the definiteness of the coefficient matrices, play a crucial role. The coefficient matrix produced by the proposed formulation is not symmetric. For such reasons, the general purpose parallel direct sparse solver PARDISO has been used in the present study, as described in Chapter (1). However, the development of specific iterative Krylov solvers for sparse systems having the structure of the system described in Section (1.4.1), [11, 10], in conjunction with hierarchical matrices [31, 34], would probably produce computational savings, both in terms of storage memory and solution time. To improve the numerical convergence under general loading conditions, the implementation of arc-length procedures [50, 131] could be of interest. Chapter 4 Modelling inter-granular and trans-granular cracking in polycrystalline materials In this Chapter, a novel grain boundary formulation for inter-granular and trans-granular cracking of three-dimensional polycrystalline materials is presented. The formulation is based on the displacement and stress boundary integral equations introduced in Chapter (1) and still retains the advantage of expressing the considered polycrystalline problem in terms of grain boundary variables only. Trans-granular cracking is assumed to occur along specific cleavage planes, whose direction depends on the crystallographic orientation of the grains of the aggregate. Both inter- and trans-granular cracking are modelled using the cohesive zone approach. However, unlike grain boundary cracking for which the failure interface is well defined, trans-granular cracks are introduced only if a suitably defined effective stress over the potential cleavage plane overcomes the threshold strength for that plane. During the load history, whenever a trans-granular crack needs to be introduced, the polycrystalline morphology is remeshed accordingly and a cohesive law, whose parameters characterise the behaviour of trans-granular failure, is associated to the newly introduced interface. Some preliminary results show that the method is able to capture the competition between inter-granular and trans-granular cracking. 109 Modelling inter-granular and trans-granular cracking in polycrystalline 110 materials 4.1 Introduction The present Chapter presents a model for studying the competition between inter-granular and trans-granular cracking modes, which represent two of the main mechanisms of failure in brittle polycrystalline materials. Intergranular cracking denotes the failure of the interfaces between adjacent grains whereas trans-granular cracking denotes the failure, often along specific crystallographic planes, of the bulk grains. The occurrence of the two cracking modes is influenced by several factors such as crystallographic lattice, temperature and aggressive environment [8, 51]. The crystallographic lattice plays a key role in determining to which deformation mechanism a polycrystalline materials is susceptible. As an example, body-centered cubic (BCC) and hexagonal close packed (HCP) crystals usually show ductile-to-brittle transition [203, 94, 95] with decreasing temperature and inter-granular and trans-granular cracking phenomena are the result of the limited number of slip systems in these crystal lattices at low temperature. On the other hand, although face-centered cubic (FCC) lattices generally favour ductile deformation over a wide range of temperatures as a consequence of the large number of slip systems, aggressive environments are well-known to induce grain boundary embrittlement and therefore favour inter-granular and trans-granular fracture in naturally ductile materials [133, 139, 169]. At room temperature, HPC ceramics such as 6H silicon carbide (SiC) also exhibit inter- and transgranular brittle fracture [71]. Several studies, both experimental and numerical, have been devoted to understanding the complex interaction between inter- and trans-granular cracking and their relationship with the morphological, chemical and physical properties of the micro-structure of polycrystalline materials. Sukumar et al. [207] presented a extended finite element (XFEM) approach to model the interand trans-granular behaviour of 2D brittle polycrystalline microstructures. In their work, the authors assumed a linear elastic isotropic behaviour of the crystals and studied the micro-cracking response of the polycrystalline morphologies and the corresponding crack patterns as a function of the ratio between the fracture toughness of the grain boundaries and the fracture toughness of the grain interiors. Within the XFEM framework, Wang et al. [221] investigated the effect of the average grain diameter, of a secondary phase and of the grain boundary fraction on the the fracture toughness of 2D polycrystalline aggregates, and recently, Prakash et al. [166] studied the effect of the grain boundary strength on the crack propagation in polycrystalline tungsten 4.1 Introduction 111 (W) using XFEM. Verhoosel and Gutiérrez [218] modelled the inter-granular and trans-granular crack propagation in 2D piezoelectric polycrystals. The model was developed in a finite element framework and crack propagation was obtained using interface elements and two different cohesive laws for modelling the grain boundary inter-granular failure and the bulk crystals trans-granular cracking. Musienko and Cailletaud [145] used a rate-dependent finite element framework to model inter- and trans-granular stress corrosion cracking of 2D and 3D Zircaloy polycrystalline morphologies in an iodine environment. However, trans-granular crack propagation was allowed only for 2D morphologies. For inter-granular crack propagation, the authors used grain boundary finite elements with a specific constitutive relations involving a damage parameter whose evolution was governed by a rate-dependent power law flow rule. Trans-granular cracking was allowed for a specific crystallographic plane of the Zircaloy crystal, namely the basal plane, which failed to cleavage when the normal stress reached a threshold value. Kraft and Molinari [107] developed a 2D finite element model to study the effect of grain boundaries distribution on the inter- and trans-granular fracture of polycrystalline aluminum oxide (Al2 O3 ). The authors employed a cohesive zone approach to model tensile and shear separation of grain boundaries as well as cleavage cracks. Unlike the aforementioned studies, transgranular fracture was considered in the model by inserting cohesive interfaces along specific crystallographic planes within the crystals and by remeshing the morphology accordingly. New trans-granular planes were introduced during the analyses as soon as the values of the resolved normal and shear stress over those plane overcame their corresponding critical values, which were estimated from the fracture toughness of the trans-grnular interface. Inter- and trans-granular dynamic cracking in 2D polycrystalline materials were recently investigated by Mousavi et al. [140, 141] and by Lin et al. [123] using the cohesive zone approach within the finite element framework. More recently, models based on different approaches such as peridynamics or nonlocal lattice particle method have been presented. Ghajari et al. [75] proposed a peridynamic model to study the fracture propagation in 2D Al2 O3 polycrystalline aggregates accounting for the random orientation and therefore anisotropy of the microstructure. They reported the crack patterns as a function of the ratio between the fracture toughness of the grains boundaries and the grain interiors showing a transition from inter-granular to transgranular behaviour corresponding to weaker to tougher grain boundaries. Modelling inter-granular and trans-granular cracking in polycrystalline 112 materials Chen et al. [46] studied the fracture behaviour of 2D polycrystalline morphologies using a nonlocal lattice particle framework. In their model, all the crystallites belonging to a grain were rotated to match the crystallographic orientation of the grain and grain boundaries were naturally generated at the location where two grains meet. Crack propagation was obtained by considering a spring-based model among the particles and inter-granular to transgranular cracking mode was realised by changing the strength of the grain boundary springs parameters. While several two-dimensional models accounting for the interplay or competition between inter- and trans-granular polycrystalline cracking mechanisms are present in the literature, few 3D models have been developed, due to increased geometrical and mechanical complexity and much higher computational requirements. However, the combined effect of inter- and transgranular cracking is a naturally three-dimensional phenomenon due to the crucial role of the 3D crystallographic orientation and therefore of the potential cleavage planes within polycrystalline aggregates. Furthermore, as pointed out by some researchers [203, 94, 95], 2D model may not be able to fully capture the role of grain boundary fracture in accommodating transgranular crack propagation through misaligned adjacent grains. Three-dimensional polycrystalline morphologies were studied by Clayton and Knap [48] by means of a phase field approach. The authors studied silicon carbide (SiC) and zinc (Zn) polycrystalline aggregates taking into account the anisotropic linear elastic behaviour of the crystals as well as the fracture behaviour of the trans-granular failure, which occurred along the basal planes of the considered HCP crystals. By varying the ratio between the elastic stiffness and the surface energy of the grains with respect to the grain boundaries, they studied inter-granular and trans-granular crack patterns within the considered morphologies. Recently [49], they also incorporated deformation twinning in their phase field model. Abdollahi and Arias [1, 2] employed the phase field model to study the fracture and toughening mechanisms in ferroelectric polycrystalline microstructures. They studied 2D [1] and 3D [2] morphologies and modelled the inter-granular and trans-granular fracture behaviour by considering a specific ratio of the grain interior and grain boundaries fracture toughnesses. Within the phase-field framework, Shanthraj et al. [192] developed an elasto-viscoplastic phase field model to capture anisotropic cleavage failure in 2D polycrystalline aggregates. Three-dimensional modelling of cleavage in polycrystals has been also proposed by Shterenlikht and Margetts [197] and Di Caprio et al. [58] using a cellular automata approach. 4.2 Grain boundary formulation 113 In this Chapter, inter- and trans-granular crack evolution in three-dimensional polycrystalline morphologies is modelled using a boundary element and a cohesive zone approach. The Chapter is organised as follows: Section (4.2) briefly recalls the grain boundary formulation of Chapter (1) focusing on the displacements and stress boundary integral equations and the cohesive zone modelling of inter- and trans-granular failure; Section (4.3) describes the numerical discretisation of the displacement boundary integral equations as well as the stress boundary integral equations and presents the numerical algorithm accounting for the two considered failure mechanisms and involving the on-the-fly remeshing of the polycrystalline morphology; Section (4.4) shows some preliminary results of the developed formulation. 4.2 Grain boundary formulation In this Section, the grain boundary formulation described in Chapter (1) is briefly recalled. 4.2.1 Boundary integral equations To model inter-granular and trans-granular cracking in 3D polycrystalline materials, the displacement boundary integral equations (1.13) and the stress boundary integral equations (1.12) are simultaneously used during the analysis. They are recalled here for the sake of completeness. The displacement boundary integral equations are used to express the behaviour of the generic g grain g in terms of the grain boundary values of displacements uei (x) and g tractions eti (x) and read Z g e g (x, y)ueg (x)dS(x) = cepi (y)uei (y) + − T pi i Z Sg Sg e g (x, y)et g (x)dS(x) U pi i (4.1) where x and y are the integration and collocation points, respectively, S g is the g e g (x, y) and T e g (x, y) boundary of the grain g, cepi (y)uei (y) are the free-terms, U pi pi are boundary equations kernels and it is recalled that the symbol e· denotes a quantity expressed in the boundary local reference system. On the other hand, the stress boundary integral equations, as given in g Eq.(1.12), allow to compute the stress tensor σmn (y) at any internal point y ∈ V g of the grain g in terms of the grain boundary displacements and tractions as follows g σmn (y) + Z σ,g Sg g Tmni (x, y)ui (x)dS(x) = Z σ,g Sg g Umni (x, y)ti (x)dS(x), (4.2) Modelling inter-granular and trans-granular cracking in polycrystalline 114 materials σ,g σ,g where once again x is the integration point and Umni (x, y) and Tmni (x, y) are the kernels of the integral equations. In this case, there is no need to express the equation in the local boundary reference system since the stress boundary integral equations are used in a post-processing stage, that is after the solution has been obtained. The reader is referred to Section (1.3) or Chapter (1) for a more detailed description of terms in Eqs.(4.1) and (4.2). 4.2.2 Boundary conditions and interface equations To close the polycrystalline problem, a proper set of boundary conditions and interface conditions must be enforced. The boundary conditions are enforced on the external faces of the aggregate whereas the interface conditions express the relation between the inter-granular displacements and tractions as described in Sections (1.3.1) and (1.3.2). In Chapter (3), inter-granular cracking was modelled using a suitably defined traction-separation cohesive law, which accounted for the degradation and failure of the grain boundaries. In this work, although in a different way with respect to inter-granular failure that will be described in Section (4.2.3), trans-granular cracking is also modelled using the cohesive-zone approach. First, the cohesive zone model is recalled. As discussed in Section (3.5.3), damage arises over certain interfaces, which for the purpose of this study may represent inter-granular regions as well as cleavage planes, when a suitably defined effective traction τe overcomes the interface strength Tmax . When such criterion is fulfilled for a point of the generic couple of adjacent grains g and h sharing the interface I gh , an extrinsic cohesive law of the form gh gh gh )δue3 gh − et3 Cs (d∗ )δuei − eti = 0, Cn (d ∗ = 0, (i = 1, 2) (4.3a) (4.3b) gh is introduced to link the boundary traction components eti with the boundary gh displacements jump δuei . It is worth noting that if the interface I gh represent a trans-granular crack, the grains g and h denote those grains originating from the trans-granular failure of a single grain. The cohesive law (4.3) is given in terms of the constitutive constants Cs (d∗ ) and Cn (d∗ ), which are function of the irreversible damage parameter d∗ defined as maximum value of the effective opening displacement d during the loading history Hd , see Eqs.(3.13), (3.14) and (3.15). 4.2 Grain boundary formulation 115 Subsequently, upon assuming the work of separation G I , the interface strength Tmax , and the relative contribution between opening and sliding failure modes represented by the parameters α, β and the ratio G I I /G I , it is possible to completely determine the cohesive law. To account for inter-granular and trans-granular failures, two different cohesive laws are employed in the present study and their parameters are set to represent the different properties of the two types of interface as well as the competition between the two mechanisms. Although inter- and transgranular processes are modelled using the same cohesive approach, it is worth underlining their different nature and the consequence in terms of numerical implementation: inter-granular failures occur along the interfaces defined by the grain boundaries, which are natural sites of crack initiation and are welldefined when the polycrystalline morphology is generated; on the other hand, at a generic point within the bulk crystallographic lattice of a crystal, transgranular failure may potentially occur along different planes, which are not a priori known and may or may not activate depending on the fulfilment of a threshold condition involving the comparison between an actual local stress acting over the plane and the corresponding strength. As an example, Figure (4.1a) shows a grain boundary interface between two adjacent grains, whereas Figure (4.1b) shows an example of a potential trans-granular interface identified by a crystallographic plane described by the unit normal vector mi and passing through the point y within a bulk grain. In terms of numerical implementation, the trans-granular failure is addressed by considering the grain as a bulk homogeneous solid and introducing a cohesive interface along the activated cleavage plane whenever the trans-granular threshold condition is met. 4.2.3 Inter- and trans-granular fracture modes In this Section, the parameters entering the cohesive laws employed to describe the two failure mechanisms are discussed. As regards the notation of this Section, the grain boundaries quantities referring to the interface between the adjacent grains g and h are denoted by the superscript gh since they in fact characterise the behaviour of the interface I gh between the grains g and h and can in general vary from interface to interface. On the other hand, the quantities characterising the behaviour of the cleavage planes of the grain g are denoted by the superscript g only since they refer to the properties of the bulk grain g. Modelling inter-granular and trans-granular cracking in polycrystalline 116 materials (a) (b) Figure 4.1: (a) Grain boundary (in darker green) between two adjacent grains and (b) potential cleavage plane (in darker green) defined by the normal vector mi and passing through the point y. In Section (3.5.3), it was shown that, at the interfaces between adjacent grains, the effective traction of the grain boundaries at the interface I gh , degh noted by τe , is computed in terms of the local grain boundary tractions as s 2 D E2  β gh gh gh gh τe = τs , (4.4) τn + α gh where β gh and α gh are the values of the cohesive law coefficients introduced in Section (3.5.3) and characterising the cohesive behaviour of the grain boundgh ary. τsq denotes the traction along the sliding direction that is computed as gh gh gh (et1 )2 + (et2 )2 ; τn denotes the traction along the normal direction and gh gh g is simply τn = et3 . It is recalled that the tractions eti = eti = etih are obtained as solution of the displacements BIE (4.1) written for each grain of the aggregate and coupled to the interface equations, whose numerical implementation is described in Section (4.3). In this case, it is highlighted that the interfaces between different grains are known when the polycrystalline tessellation is generated and are retained during the loading history even if the grain boundaries do not undergo intergranular cracking. In fact, if the grain boundary between the generic grains gh g and h is in a pristine state, which holds as long as effective traction τe τs = 4.2 Grain boundary formulation 117 gh is smaller the grain boundary strength Tmax , the interface equations simply gh enforce a zero displacements jump, i.e. δuei = 0. g Similarly to the inter-granular fracture mode, an effective traction τe of the trans-granular fracture mode can be defined as follows s  g 2 β g g g 2 τe = τn + τs . (4.5) αg However, unlike the inter-granular case where the interface is already wellg defined, given a point within the considered grain, the sliding traction τs and g g the normal traction τn must be computed as a function of the stress tensor σij and all the potential cleavage planes of the grain g at that point. It is clear that the crystallographic lattice of the grains plays a crucial role in the determination of the orientation of the trans-granular cracks. Using the stress BIE (4.2), g the stress tensor σij at any internal point of the grain g can be computed as a function of the boundary displacements and tractions. Then, given the unit g normal mi representing the potential cleavage plane of the grain g and two g g g mutually orthogonal directions pi and qi on the plane, the normal traction τn g g g g is computed as τn = mi σij m j , whereas the sliding traction τs is computed as q g g g g g g g g g g g τs = (τp )2 + (τq )2 being τp = pi σij m j and τq = qi σij m j . During the loadg ing history, the values of the effective stress τe is computed for each potential g g cleavage plane. If τe overcomes the cleavage plane strength Tmax of the considered plane, a trans-granular cohesive interface is introduced into the grain as a flat surface extending up to the boundaries of the grain. This assumption is justified by experimental observations of trans-granular cracking in several classes of metallics [175, 109, 95, 98] and ceramics materials [96]. Inter- and trans-granular fracture competition The competition between the inter- and trans-granular modes of failure in polycrystalline materials is modelled by considering suitable sets of parameters entering the corresponding cohesive laws. Here, it is assumed that the coefficients α, β and G I I /G I do not differ between the two mechanisms, i.e. gh gh g g α gh = α g = α, β gh = β g = β and G I I /G I = G I I /G I ∀ g = 1, . . . , Ng and ∀ gh = 1, . . . , Ni , being Ng the number of grains and Ni the number of grain boundary interfaces. On the other hand, different ratios between the fracgh g ture energy G I in mode I of the grain boundaries and the fracture energy G I Modelling inter-granular and trans-granular cracking in polycrystalline 118 materials (a) (b) Figure 4.2: Schematic representation of (a) the tangential and (b) normal components of the two cohesive laws used in this work model inter- and trans-granular cracking. The red surfaces represent a reference cohesive law whereas the blu surfaces represent a scaled cohesive law with γG < 1. in mode I of the cleavage planes are considered. More specifically, considering the relation G I = Tmax δucr n /2 (see Eq.(3.17a)), it is easy to see that the g gb ratio γG ≡ G I /G I between the two aforementioned fracture energies can be modified by changing Tmax and/or δucr n . In this thesis, to scale the fracture eng g gh ergy G I of the factor γG , i.e. G I = γG G I , it is assumed that both the interface strength Tmax and the critical displacement δucr n in mode I are scaled by a same √ √ g gh cr,g cr,gh quantity, i.e. Tmax = γG Tmax and δun = γG δun . By the same fashion, it is easy to see that the the critical displacement δucr s in mode II is scaled by √ √ cr,g cr,gh γG , i.e. δus = γG δus . The effect of the parameter γG on the cohesive law is represented in Figures (4.2). Figure (4.2a) represents the tangential component τs as a function of cr ( βδus /δucr s ) and ( δun /δun ) according to Eq.(3.16) whereas Figure (4.2b) repcr resents the normal component τn as a function of ( βδus /δucr s ) and ( δun /δun ) according to Eq.(3.16). In the figures, the red surfaces represent a reference cohesive law, e.g. associated to the behaviour of the grain boundaries, whereas the blue surfaces represent a scaled cohesive law with γG < 1. 4.3 Numerical discretisation and solution 4.3 119 Numerical discretisation and solution The solution of the polycrystalline problems of inter- and trans-granular microcracking is obtained by numerically discretising Eqs.(4.1) and (4.2). The boundary S g of the generic grain g is divided into non-overlapping elements according to the meshing strategy developed in Chapter (3), where combined continuous and semi-discontinuous triangular and quadrangular elements were used to reduce the computational cost of the polycrystalline problems. The mesh size of the surface mesh is chosen such that the average element length le is much smaller than characteristic length Lcz of the cohesive zone, which can be estimated in terms of the material fracture toughness and the interface strength [173, 66, 216]. The discretised version of the displacement boundary integral equations (4.1) is computed using the discretisation technique and the meshing strategy combining triangular and quadrangular elements described in Section (3.4). For the generic grain g, a linear system of equations of the form H g U g = G g T g is obtained. The equations of the entire polycrystalline aggregate are then retrieved by writing such equations for each grain of the aggregate and by coupling them with the interface equations as discussed in Section (1.4). A system of equations of the form M(X, λ) = 0 is obtained, where X collects the unknowns of the system and λ is the load factor. Unlike the displacement BIE, which are evaluated on the boundary of the grains, the stress boundary integral equations (4.2) are evaluated at selected control points within the grain. The discretised version of Eq.(4.2) is then obtained as follows Σ g = Gσ,g T g − Hσ,g U g , (4.6) where Σ g contain the components of the stress tensor evaluated at the internal control points and the matrices Hσ,g and Gσ,g stem from the integration of the σ,g σ,g kernels Tmni (x, y) and Umni (x, y), respectively, over the boundary S g . It is g worth noting that, if nv is the number of control points for the grain g and the stress tensor is represented in Voigt notation, the matrices Hσ,g and Gσ,g g g g have 6nc rows and 3ns columns, being ns the number of collocation points of grain g. As already mentioned, Eq.(4.6) are used in a post-processing stage and therefore the reordering due the boundary conditions enforced on the aggregate is not introduced. In the next Section, the use of the stress equations (4.6) in combination with the solution of the polycrystalline system of equations is represented by a flow chart describing the algorithm for inter- and trans-granular cracking. Modelling inter-granular and trans-granular cracking in polycrystalline 120 materials 4.3.1 Algorithm for inter- and trans-granular cracking Figure (4.4) schematises the flow chart of the algorithm used in the present work to address inter- and trans-granular cracking in polycrystalline materials. At the beginning of the analysis, the load factor λ is initialised to 0, the load step counter n is initialised to 1 and the remesh boolean variable is initialised to .false.. The polycrystalline morphology is then generated and the properties of the constituent grains and grain boundaries are loaded. The algorithm then enters the incremental loop that is governed by the counter n and can be described by the following steps: 1. At the beginning of the load step n, the load factor is incremented by the load factor increment ∆λn chosen based on the convergence speed at the previous load step [28]. 2. If the analysis has just started, i.e. n = 1, or the remesh is .true., the aggregate is discretised, the boundary element matrices are computed, the overall element system is assembled and the remesh variable is set to .false.. 3. At the n-th load step, the system of equation M(Xn , λn ) = 0 is to be solved. The equilibrium solution Xn is obtained by employing the NewtonRaphson algorithm and the solver PARDISO [114, 185, 186] as described in Section (1.4). During the Newton-Raphson search for the solution, the consistency of the grains interfaces is checked according to the procedure described in Ref. [28] g 4. The values of the stress tensor σmn at the control points of each grain of the aggregate is computed by means of Eq.(4.6) and the possible occurrence of trans-granular cracking is then checked by comparing the local g g effective cleavage stress τe with the local threshold Tmax . 5. If the cleavage threshold is overcome, new cohesive interfaces are introduced along the cleavage planes of those grains undergoing transgranular cracking. The cohesive properties of the newly introduced interfaces are those corresponding to trans-granular cracks and are in general different from the cohesive properties of the grain boundaries. At this point, the morphology has been modified and the boolean variable remesh is set to .true.. As an example, Figure (4.3a) shows the boundary mesh of a grain whose threshold condition for trans-granular cracking is fulfilled, Figure (4.3b) shows the cleavage plane (in darker green) 4.3 Numerical discretisation and solution (a) (b) 121 (c) Figure 4.3: (a) Boundary mesh of a grain at the point of undergoing cleavage cracking; (b) cleavage plane (in darker green) that needs to be introduced into the grain; (c) mesh of the two child grains originated from the grain in figure (a). that needs to be introduced into the grain and Figure (4.3c) shows the remesh of the two child grains originated from the cut of the grain in Figure (4.3a). The flow goes back to step 2 in order to find the equilibrium solution of the new aggregate for the same load factor λn . 6. If no trans-granular cracks are introduced, the current load factor λn is compared to the final load factor λ f and either the next load step is considered or the analysis is ended. Modelling inter-granular and trans-granular cracking in polycrystalline 122 materials Start λ0 ← 0, n ← 1, remesh ← .false. Initial morphology: • load polycrystalline morphology; • load grains and grain boundaries properties; Update load factor: λn ← λn−1 + ∆λn yes (n = 1) ∨ (remesh) no • perform grains cut; • remesh ← .true.; • compute the mesh; • compute the boundary element matrices; • enforce BCs and ICs; • assemble the overall system; • remesh ← .false.; Solve system: M(Xn , λn ) = 0 Compute internal stress: Eq.(4.6) yes trans-granular cracks? no n ← n+1 no λn ≥ λ f yes End Figure 4.4: Flow chart of the algorithm for inter- and trans-granular cracking. 4.4 Numerical tests 4.4 123 Numerical tests In this tests, polycrystalline SiC aggregates with hexagonal crystal lattice are considered. For hexagonal 6H SiC polytypes, the preferred cleavage plane is the basal plane [48] identified by (0001) Miller indices. The elastic properties of the crystals and the cohesive properties of the grain boundaries and the cleavage planes are listed in Table (4.1). In this thesis, only preliminary results of the formulation are presented. Figure (4.5a) shows a 10-grain polycrystalline aggregate with ASTM grain size G = 12. In Figure (4.5a), the small reference systems inside each grain represents the orientation of the crystallographic lattice where the normal to the basal plane is indicated by the longer arrow. For simplicity, in the following tests, the threshold condition for activating the trans-granular cracking is checked at the centroid of each grain of the aggregate. Consistently with the notation of Section (3.5.4), the aggregate is loaded along the x3 direction by means of uniaxial boundary conditions prescribed as ui ni = λ/2 over the top and bottom faces and ui ni = 0 over the lateral faces, whereas the remaining loading directions are kept traction-free. Two values gb g of the ratio γG = G I /G I are considered for these analyses, namely γG = 1 and γG = 1/4. Figure (4.5b) shows the macro-stress response Σ33 as a function of the load factor λ corresponding to the two values of γG . As expected, the response corresponding to a lower fracture energy of the cleavage planes, that is γG = 1/4, is characterised by a smaller value of the maximum macro-stress reached during the loading history. The effect of the ratio γG on the micro-cracking pattern and on the damage distribution is reported in Figures (4.6) and (4.7), respectively. Figures (4.6a), (4.6c) and (4.6e) report the micro-cracking pattern at the load steps λ = 0.009, λ = 0.011 and λ = 0.025, respectively, corresponding to γG = 1; in this case, since the two mechanisms have the same fracture energy and the cleavage planes are not favourably oriented with respect to the loading direction, the crack path occur along the grain boundaries of the aggregate. On the other hand, as shown in Figures (4.6b), (4.6d) and (4.6f ), by reducing the fracture energy of the cleavage planes, that is by choosing a value γG = 1/4, the cleavage planes start to fail in correspondence to a lower value of the load factor, for which the stress on the grain boundaries is not high enough to initiate the damage. However, the three-dimensional random orientation of the grains does not allow a perfect propagation of the trans-granular crack within the aggregate and, as a consequence, partial grain boundaries failure is necessary Modelling inter-granular and trans-granular cracking in polycrystalline 124 materials to accommodate the crack propagation and the final failure of the aggregate. Similarly, Figures (4.7a), (4.7c) and (4.7e) show the inter-granular damage distribution at the load steps λ = 0.009, λ = 0.011 and λ = 0.025, respectively, corresponding to γG = 1. Figures (4.7b), (4.7d) and (4.7f ) show the damage distribution corresponding to γG = 1/4 at the same load steps. By looking at Figures (4.7a) and (4.7b), it is clear that the damage over a cleavage plane initiates in correspondence of a much lower value of the load factor, and, due to the local softening of failing cleavage plane, the corresponding stress redistribution and the three-dimensional random orientation of the grains, the crack path for this choice of γG is characterised by inter- and trans-granular failure. Table 4.1: Elastic and cohesive properties of SiC polycrystalline aggregates. domain Bulk crystals property elastic constants [109 N/m2 ] Grain boundaries interface strength [MPa] Cleavage planes cohesive law constants [-] critical displacements jumps [µm] interface strength [MPa] cohesive law constants [-] critical displacements jumps [µm] component c1111 , c2222 c3333 c1122 c1133 , c2233 c2323 , c1313 c1212 gh Tmax α gh β gh cr,gh δun cr,gh δus g Tmax αg βg cr,g δun cr,g δus value 502 565 95 96 169 (c1111 − c1122 )/2 500 1√ 2 7.8089 · 10−2 1.5618 · 10−1 √ gh γG · Tmax α gh β gh √ cr,gh γG · δun √ cr,gh γG · δus 4.5 Discussion and future developments 125 600 γG = 1 γG = 1/4 500 Σ33 [MPa] 400 300 200 100 0 0 0.005 0.010 0.015 0.020 0.025 Load factor, λ (a) (b) Figure 4.5: (a) 10-grain polycrystalline morphology with ASTM grain size G = 12; (b) Volume stress averages Σ33 as a function of the load factor λ for the two g gh g values of the considered ratio γG = G I /G I between the fracture energy G I gh of the cleavage planes and the fracture energy G I of the grain boundaries. 4.5 Discussion and future developments In this Chapter, a numerical scheme for addressing the competition between inter- and trans-granular crack propagation has been developed and tested. Although the numerical tests involved a polycrystalline aggregate with a rather small number of constituent grains and subject to one type of boundary conditions only, the results showed that the developed formulation is able to capture the behaviour of polycrystalline aggregates when the two mechanisms are active. The next step of this formulation is to consider polycrystalline morphologies with a much larger number of grains in order to avoid the boundary effects of the finiteness of the container and to investigate the coupling between the statistical variability of polycrystalline micro-structure and the competition between the two mechanisms. Furthermore, different sets of boundary conditions can also be tested to study the polycrystalline response along different directions and eventually how the existence of a representative volume element can be affected by the simultaneous presence of the two mechanisms. Modelling inter-granular and trans-granular cracking in polycrystalline 126 materials (a) λ = 0.009 (b) λ = 0.009 (c) λ = 0.011 (d) λ = 0.011 (e) λ = 0.025 (f ) λ = 0.025 Figure 4.6: Micro-cracking snapshots at the loading steps (a,b) λ = 0.009, (c,d) λ = 0.011 and (e,f ) λ = 0.025. (a,c,e) γG = 1. (b,d,f ) γG = 1/4. 4.5 Discussion and future developments 127 (a) λ = 0.009 (b) λ = 0.009 (c) λ = 0.011 (d) λ = 0.011 (e) λ = 0.025 (f ) λ = 0.025 (g) Figure 4.7: Micro-cracking snapshots of the damage distribution at the loading steps (a,b) λ = 0.009, (c,d) λ = 0.011 and (e,f ) λ = 0.025. (a,c,e) γG = 1. (b,d,f ) γG = 1/4. (g) Colormap of the damage. Modelling inter-granular and trans-granular cracking in polycrystalline 128 materials Chapter 5 Grain boundary formulation for crystal plasticity In this Chapter, a three-dimensional grain-boundary formulation for smallstrain crystal plasticity in polycrystalline aggregates is presented. The method is developed starting from single grain crystal plasticity equations and implemented in polycrystalline aggregates [33, 32, 82]. It is based on the use of a suitable set of boundary integral equations for modelling the individual grains, which are represented as anisotropic elasto-plastic domains. In the boundary integral framework, crystal plasticity is modelled resorting to an initial strains approach, and specific aspects related to the integration of strongly singular volume integrals in the anisotropic elasto-plastic grain-boundary equations are discussed and suitably addressed. In the polycrystalline case, Laguerre-type micro-morphologies are discretised using robust non-structured boundary and volume meshes. A general grain-boundary incremental/iterative algorithm, embedding rate-dependent flow and hardening rules for crystal plasticity, is developed and discussed. The method has been assessed through several numerical simulations, for both single and polycrystalline aggregates, which confirm its robustness and accuracy and suggest directions for further developments. The formulation retains the key feature of the grain boundary formulation described in Chapter (1), that is the expression of the micromechanical problem in terms of grain-boundary variables only, namely intergranular displacements and tractions, which results in a reduction of the total number of degrees of freedom and may be appealing in a multi-scale framework. 129 130 5.1 Grain boundary formulation for crystal plasticity Introduction Crystal plasticity represents one of the main deformation mechanisms active in grains of a polycrystal and consists of plastic slip over well defined crystallographic planes. The phenomenon is characterised by its inherent anisotropy, induced by the structure of the crystalline lattice itself. Several numerical and computational methods have been proposed in the literature for the analysis of plasticity in single crystals and crystal aggregates. A detailed comparison among three different theoretical frameworks, i.e. conventional continuum plasticity, discrete dislocation plasticity and nonlocal plasticity, is reported by Needleman [150], who strongly underlines the importance of computational studies. The importance of computational approaches addressing multiple scales and involving the explicit representation of the micro-structural details characterising the crystal plasticity phenomenon is highlighted in the work of Dawson [54]. A very complete review of Crystal Plasticity Finite Element Methods (CPFEMs) can be found in [178] where a wide range of continuumbased techniques and contributions, with applications in fields as diverse as texture evolution, creep, nano indentation, forming and others, is discussed. Single crystal plastic slip studies can be traced back to the works of Taylor et al. [211, 210, 212]. Classical contributions in the field are those by Mandel [132], Hill [89], Rice [174], Hill and Rice [90], Asaro and Rice [15], Asaro [13] (also addressing the mechanics of polycrystals), Peirce et al. [159, 160] and Bassani et al. [231, 24]. In Ref. [52], Cuitino and Ortiz reviewed some computational models for single crystal plasticity and proposed a statistical mechanical model based on dislocation mechanics. Both rate-dependent (RD) [174, 160, 124] and rate-independent (RI) [7] models have been proposed and compared [135]. Much research has also been focused on the development of crystal plasticity models for polycrystalline aggregates [178]. Several 3D CPFEMs were initially developed to assess texture development in polycrystals. In several studies, the aggregate was represented with simple morphologies and coarse meshes, with individual grains often modelled by a single finite element. Despite such approximations, the models were quite accurate in predicting texture evolution. In [230], a Taylor-type polycrystal plasticity model was tested in large strain reverse torsion tests, with the different slip hardening laws presented by Asaro and Needleman [14], by Harren et al. [84], by Bassani and Wu [24] and by Kalidindi et al. [99]. Both 2D [105] and fully 3D [183] polycrystalline models, with the explicit representation of individual grains, have been developed, using a rate-dependent 5.1 Introduction 131 CPFEM formulations. Quilici and Cailletaud [168] developed a CPFEM framework that was subsequently used for the analysis of stress/strain fields within 3D polycrystalline aggregates in the small strains regime [18, 19]. Voronoi tessellations have been used to represent the microstructure and a visco-plastic crystallographic constitutive model, with isotropic and kinematic hardening, was employed. Aggregates up to 200 grains were analysed and the FETI (Finite Element Tearing and Interconnecting) method [68] was employed, in conjunction with High Performance Computing, to tackle the high computational requirements of 3D computations. The same strategy was later employed by Diard et al. [59], who analysed micro-plasticity in hexagonal close-packed materials, with as realistic as possible microstructures. Sarma and Radhakrishnan [182] applied CPFEM for studying the hot deformation of grains in polycrystalline aluminum. They report that, due to the time-consuming nature of such simulations, it was possible to consider only a limited number of specially constructed microstructures. Zeghadi et al. [236] performed, in a CPFEM framework, a statistical analysis on several different 3D morphologies generated starting from the same 2D surface. Aggregates with around 40 grains were considered and the plastic strain fields over the reference 2D surface, induced by different internal 3D morphologies of the assessed specimen, were investigated. It was found that large fluctuations in the equivalent plastic slip level are induced by different internal 3D morphologies, under the same external loading conditions, thus advocating the need of fully 3D studies over simplified pseudo 3D (or 2D columnar) studies. Similar studies, focused on the comparison between experimental and computational results, with the aim of identifying possible sources of error and better calibrating microstructural constitutive parameters were performed by Héripré et al. [88], Musienko et al. [146], Zhang et al. [241] and Pinna et al. [165]. Musienko et al. [146] analyzed an experimentally reconstructed copper specimen with approximately 100 grains. CPFEM was used and the results of fully 3D and columnar 2D (pseudo-3D) simulations were compared to assess the bias introduced by the simplified morphologies. It was found that the computational results of the fully 3D mesh were in good agreement with the experimental data, while only some traces of the experimental behaviour were retained in the extended 2D simulations. Zhang et al. [241] compared, in terms of stress-strain curves and lattice reorientation, the experimental results obtained from a tensile test of a Ti-5Al-2.5Sn specimen with those obtained from numerical CPFEM simulations using 2D columnar and 3D microstructures. The stress-strain curve was used to calibrate the parameters of the 132 Grain boundary formulation for crystal plasticity crystal plasticity constitutive model. Using the lattice reorientation maps, the authors showed that fully 3D microstructures better reproduced the experimental observations with respect to the pseudo 3D microstructures. Pinna et al. [165] simulated the deformation of a FCC aluminium alloy AA5052 at high temperatures using a structured mesh where each cubic volume element had its own crystallographic orientation, and a Fe-30wt%Ni alloy using a two dimensional mesh with plane strain assumption. Besides the qualitative agreement between the numerical results and the experimental measurements in terms of stress-strain curves, the authors reported the limitations of simplified CPFEM models to capture the intra-granular strain distribution and suggested the use of fully three-dimensional models. Barbe and Quey [20] presented a CPFEM model for 3D polycrystalline microstructures, including polycrystal-to-polycrystal diffusive transformations. Schneider et al. [188, 187] investigated the mechanical behaviour of αFe-Cu composites under large plastic deformations in simple tension and compression, using 3D FEM simulations (ABAQUS) with an elasto-visco-plastic material model. Crack initiation and evolution in polycrystalline aggregates is addressed in [202], where the cohesive-zone type contact is implemented in a CPFEM framework employing Bassani-Wu hardening laws. In [177], a comparison between the self-consistent, finite element and spectral methods is carried out in the context of homogenisation of polycrystalline aggregates with an elasticviscoplastic behaviour. Zhang et al. [242] studied the anisotropic mechanical response of a rolled AA1050 aluminium plate with respect to the loading direction using five different crystal plasticity models, showing the ability of CPFEM to qualitatively reproduce the experimental findings. Zeng et al. [237] developed a smoothed crystal plasticity finite element framework for modelling two-dimensional single crystals and polycrystals. Kim and Yoon [103] simulated the necking behaviour of AA 6022-T4 sheet using a CPFEM formulation involving four different continuum damage mechanics models, discussing the performance of such damage models when compared to experimental tests. More advanced crystal plasticity phenomenological models, able to capture different deformation mechanisms besides slip, such as twinning in HCP crystals or non-Schmid effects in BCC crystals, are still under investigation.As a few recent examples, Abdolvand et al. [3] implemented in a finite element formulation a crystal plasticity model comprising twinning as well as slip in HCP materials, in order to simulate the deformation of a rolled Zircaloy-2 element. Wang et al. [222] proposed a physically-based crystal plasticity model 5.1 Introduction 133 including also de-twinning for HCP crystals and used it in a self-consistent model to simulate cyclic loading in a magnesium alloy. Lim et al. [122] developed a BCC crystal plasticity finite element model and employed it to simulate the deformation of tantalum oligo-crystals [121]. The authors compared numerical and experimental results finding good agreement in terms of both in-plane and out-of-plane strain fields and lattice rotations. An interesting point raised by the authors was the lower agreement between predicted and measured fields at the grain boundaries, which prompted the authors to recommend more detailed grain boundary models in future studies. The short review given above confirms the maturity of the CPFEM for the investigation of plasticity in crystalline solids and also the current engineering interest toward the development of new or more enriched models. On the other hand, while several boundary element formulations for elasto-plastic isotropic problems are present in the literature, see e.g. Refs. [41, 17, 6, 39, 47, 26, 131, 130], the present Chapter represents the first boundary element application to anisotropic or crystal plasticity in polycrystalline materials. A boundary element approach may in fact result in accurate stress/strain predictions at reduced discretisation effort. In the present Chapter, a novel three-dimensional grain-boundary formulation for small strains crystal plasticity in single crystals and polycrystalline materials is presented for the first time. The boundary integral equations given in Chapter (1) are suitably modified to account for general anisotropic elasto-plasticity and are given in Section (5.2). The presence of plastic flow is taken into account through an initial strains approach, which is commonly adopted in boundary element formulations for addressing elasto-plastic problems [17, 6, 41]. The free terms involved in the formulation are explicitly given, Section (5.2.1), and the strategy for numerical integration of the strongly singular volume integrals is discussed in Section (5.2.3). The adopted phenomenological continuum-based crystal plasticity description is discussed in Section (5.3). The grain-boundary polycrystalline implementation for crystal plasticity, which is based on the formulation given in Chapter (1), is given in Section (5.4) and the incremental/iterative grain-boundary algorithm for crystal plasticity is presented in a rate-dependent framework in Section (5.4.2). The salient feature of the formulation is the expression of the problem in terms of intergranular variables only, namely grain-boundary displacements and tractions, also in presence of an interior plastic flow, which allows a remarkable reduction in the order of the numerical system, especially for polycrystalline analy- 134 Grain boundary formulation for crystal plasticity sis. In Section (5.5), numerical tests are performed both for single crystals and crystal aggregates, and they confirm the potential of the technique. Directions of further investigation are discussed in Section (5.6). 5.2 Anisotropic elasto-plastic boundary element formulation In the present Section, the different ingredients of the boundary integral formulation of the crystal plasticity problem are presented. To maintain a unified notation, the basic equations are presented in rate form. This is a common procedure for time-dependent problems, such as creep or visco-plasticity. Rateindependent crystal plasticity problems, on the other hand, could be formulated in purely incremental terms, due to the lack of time-dependent effects. However, also rate-independent problems can be generally associated to a time-like parameter that plays the role of an ordering parameter, such as the load factor λ. Keeping this in mind, it is possible to retain a unique rate notation for both classes of problems. Considered a generic domain V g ⊂ R3 representing a single grain with specific symmetry undergoing elasto-plastic deformations, the proposed formulation is based on the use of the set of boundary integral equations representing the displacements and stresses of the points of the domain in terms of boundary integrals of the displacements and tractions of points on the surface S g of the domain itself, see Section (1.3) of Chapter (1). When a region V p,g ⊆ V g undergoes plastic slip, such equations are modified by the presence of some volume integral terms. The salient feature of the method is that only the boundary points carry degrees of freedom, irrespective of the presence of internal plastic regions, allowing a considerable reduction in the size of the solved system, which may be appealing in computational terms. In the following Sections, the previous outline is further developed and attention is devoted to the fundamental boundary integral equations, to the expressions of the integral kernels appearing in the equations and their numerical integration, and to the form of the discrete algebraic systems. 5.2.1 Boundary integral equations Let us consider the generic grain V g and its boundary S g = ∂V g . When plastic deformations are considered within the context of the small strains theory, the 5.2 Anisotropic elasto-plastic boundary element formulation 135 g total strain rate ε̇ ij (x) can be expressed as the sum of the elastic strain rate e,g p,g ε̇ ij (x) and plastic strain rate ε̇ ij (x), i.e. " g # g ∂u̇ j 1 ∂u̇i g e,g p,g (x) + (x) = ε̇ ij (x) + ε̇ ij (x), ε̇ ij (x) = 2 ∂x j ∂xi (5.1) where it is recalled that ui denotes the displacements components. The presence of plastic strains can be addressed in boundary element formulations by adopting an initial strain or initial stress approach [17, 6, 41]: in the present work, the initial strain formulation is used, as it appears particularly suitable to the form of the crystal plasticity constitutive equations, see Section (5.3). p,g When some initial plastic strain ε ij is present in V p,g ⊆ V g , the displacement boundary integral equations (1.9) are modified and rewritten, in rate form, as g c pi (y)u̇i (y) + Z g g − Tpi (x, y)u̇i (x)dS(x) = Sg Z g Sg g U pi (x, y)ṫi (x)dS(x) + Z g V p,g p,g Σ pij (x, y)ε̇ ij (x)dV (x) (5.2) where, consistently with Eq.(1.9), y denote the collocation point, x denotes the boundary and volume integration point and ui (x) and ti (x) are the components of boundary displacements and tractions, respectively. The kernels apR pearing in Eq.(5.2) are given in Eq.(1.22) of Chapter (1). − denotes the Cauchy principal value integral and c pi (y)u̇i (y) are free terms. The volume integral in Eq.(5.2) is performed over the interior region V p,g ⊆ V g undergoing plasp,g tic deformation, i.e. where ε̇ ij 6= 0. Similarly to the integral containing the g kernel U pi (x, y), the volume integral, although containing a singular kernel of order r −2 , is a weakly singular integral. In fact, upon considering a reference system centered at y and taking the limit x → y, the order of the volume eleg ment dV (x) is r2 dr whereas the kernel Σ pij (x, y) is of the order r −2 , being r is the distance between the point x and y. By considering an interior point y ∈ V g , the strain field inside the grain g is computed by suitably taking the derivatives of Eq.(5.2) with respect to the coordinates yi of the collocation point y. In rate form, the strain boundary integral equations (1.11) are modified as g ε̇ pq (y) + Z Sg Z ε,g Sg g Tpqi (x, y)u̇i (x)dS(x) = ε,g g U pqi (x, y)ṫi (x)dS(x) + Z − V p,g p,g p,g ε Σ pqij (x, y)ε̇ ij (x)dV (x) + f pqij ε̇ ij (y), (5.3) ε,g 136 Grain boundary formulation for crystal plasticity g where the kernels U pqi (x, y), Σ pqij (x, y) and Tpqi (x, y) are given in Eq.(1.23). In this case, unlike the DBIE (5.2), the volume integral must be evaluated in the Cauchy principal value sense since, as x → y, the order of the volume element ε,g dV (x) is r2 drdS and the order of the kernel Σ pqij (x, y) is r −3 . Consequently, ε,g ε,g g,p ε ε̇ ( y ) remain and the coefficients after the limiting process, the free terms f pqij ij ε f pqij are computed as ε f pqij 1 =− 2 Z S1 [Σ pij (r̂)nq (r̂) + Σqij n p (r̂)]dS(r̂), (5.4) where S1 is the three dimensional unit sphere and r̂ is the unit vector centered at y. The numerical treatment of the volume integrals in Eq.(5.3) is addressed in Section 5.2.3. The boundary integral representation for the stress rate σ̇mn (y) at the generic interior point y ∈ V g is obtained from Eq.(5.3) using the constitutive relatione,g g p,g ships σ̇mn (y) = cmnpq ε̇ pq (y) = cmnpq [ε̇ pq (y) − ε̇ pq (y)]. In rate form, the stress boundary integral representation reads g σ̇mn (y) + Z Sg Z g σ,g Sg Tmni (x, y)u̇i (x)dS(x) = σ,g g Umni (x, y)ṫi (x)dS(x) + Z − p,g p,g σ Σmnij (x, y)ε̇ ij (x)dV (x) + f mnij ε̇ ij (y), (5.5) σ,g V p,g where the kernels Umni (x, y), Tmni (x, y) and Σmnij (x, y) are given in Eq.(1.24) and the coefficients of the free terms are Z  σ f mnij = −cmnpq Σ pij (r̂)nq (r̂)dS(r̂) + δpi δqj . (5.6) σ,g σ,g σ,g S1 5.2.2 Numerical discretisation In the initial strains approach [41, 6], the crystal plasticity problem is closed considering the displacement and stress boundary integral equations, Eq.(5.2) and Eq.(5.5), together with the crystal plasticity constitutive equations given in Section (5.3). In order to write the discrete counterpart of the boundary integral equations, the following steps are followed: • The boundary S g and the volume V g of each grain domain are subdivided into sets of non-overlapping surface and volume elements: 5.2 Anisotropic elasto-plastic boundary element formulation 137 – the surface is discretised using the strategy developed in Chapter (3), where a mesh combining continuous/semi-discontinuous triangular and quadrangular two-dimensional elements is implemented in order to tackle and reduce the high computational costs of the polycrystalline problem – the volume of the grain is divided into linear tetrahedral elements and the plastic strain field is assumed constant and equal to the value at the centroid of each element. Such elements are usually referred to as sub-parametric elements1 ; • The unknown fields, namely displacements and tractions on the surface and plastic strains in the volume, are expressed in terms of nodal values and suitable shape functions; • Eq.(5.2) is written for every boundary discretisation node and it is then numerically integrated; • Eq.(5.5) is written at the centroids of each tetrahedral volume element and it is then numerically integrated. The discrete version of the DBIE written in rate form coincide with Eq.(1.25) plus an additional term accounting for the plastic deformation of the volume as follows p,g H g U̇ g = G g Ṫ g + D g Ė , (5.7) where U̇ g and Ṫ g contain the components of the nodal values of the boundary displacements and tractions, the matrices H g and G g stem from the integrae g (x, y) and T e g (x, y) in the local boundary refertion over S g of the kernels U pi pi p,g ence system (see Eq.(1.13) in Section(1.3)), respectively, Ė contain the components of the values of plastic strains at the tetrahedral elements’ centroids g and the matrix D g is generated from the numerical integration of Σ pij (x, y) over the interior volume of the grain g undergoing plastic flow. To solve the crystal plasticity problem, Eq.(5.7) has to be used with the discretised version of the stress integral equations (5.5) that, written for each internal point, read g Σ̇ = Gσ,g Ṫ g − Hσ,g U̇ g + Dσ,g Ė 1 In p,g , (5.8) sub-parametric elements the order of interpolation of the unknown fields is lower than the order of interpolation of the geometry. 138 Grain boundary formulation for crystal plasticity g where Σ̇ contain the components of the nodal values of stress at the centroids of the tetrahedra, the matrices Hσ,g and Gσ,g stem from the integration of the σ,g σ,g kernels Tmni (x, y) and Umni (x, y), respectively, over the boundary S g and Dσ,g σ,g stems from the numerical integration of Σmnij (x, y) over the interior volume of the grain g undergoing plastic flow. Eqs.(5.7) and (5.8) must be used in conjunction with the suitable boundary conditions and the constitutive crystal plasticity equations for the solution of the grain-boundary elasto-plastic problem, as will be described in Section (5.4). The interested reader is referred to references [17, 6, 41] for further details about the boundary element method. 5.2.3 Numerical integration and singular integrals To obtain the discrete equations introduced above, it is necessary to accurately evaluate the singular integrals appearing in Eqs.(5.2) and (5.5). While the singular integrals appearing in the displacement equations, Eq.(5.2), have been widely considered in the literature, the integration of the singular kerε,g σ,g nels Σ pqij (x, y) and Σmnij (x, y) for the anisotropic case was recently presented in [30]. In this Section, the procedures used for the evaluation of the singular integrals are briefly recalled, and the strategy used for treating the integrals σ,g involving Σmnij (x, y) is described. The same approach applies to the integrals involving Σ pqij (x, y). Considering Eq.(5.2), the weak singularity induced on the boundary by g Uij (x, y) is treated subdividing the singular elements into triangles and representing each sub-triangle as a quadrangle collapsed into the singular point; g the strong singularity induced by Tij (x, y), treated as a Cauchy singular value, is tackled using rigid body considerations [17, 6]; the volume terms appearing in Eq.(5.2) may give rise to weak singularities only when the plastic region reaches the boundary: in this case, the interested volume cells are subdivided into sub-tetrahedra, which afterwards are represented as 8-node cubes collapsed into the singular point. In this way, the Jacobian of the integration cancels the singularity. In the strain and stress integral equations, Eqs.(5.3) and (5.5), since constant volume cells are used in the implementation, the collocation points y always fall in the interior domain, being the centroids of the volume cells. For such a reason, the boundary integrals may become at most nearly singular, and this happens when the plastic region reaches the boundary. Nearly sinε,g 5.3 Crystal plasticity phenomenological modelling 139 gular integrals are simply evaluated through boundary element subdivision. The volume integrals, on the contrary, must be treated in the Cauchy singular ε,g σ,g value sense, being the kernels Σ pqij (x, y) and Σmnij (x, y) strongly singular in the volume. In the present work, the starting point for the evaluation of the volume Cauchy singular values is the work by Gao and Davies [72], who, for isotropic σ,g materials, have shown that the integral of Σmnij (x, y) over the singular volume cell V c can be expressed as Z − Vc σ,g Σmnij (x, y)dV (x) = Z Σmnij (x, y)( x p − y p )n p (x) log(r )dS(x) σ,g Sc (5.9) as long as the condition Z Σmnij (r̂)dS(r̂) = 0, σ,g S1 (5.10) where S1 is the unit sphere centered at y, is satisfied. In Eq.(5.9), Sc = ∂V c is the external boundary of the singular volume cell. Gao and Davies [72] proved Eq.(5.10) for isotropic materials, taking into account the explicit analytical form of the isotropic fundamental solutions. Using the spherical harmonics expansion developed in Chapter (2), theR fact that the integral of the spherical harmonics Y`m (r̂) over the unit sphere S1 Ym` (r̂)dS(r̂) = 0 for m, ` 6= 0 and that P02 (0) = 0 (P`m (0) is the associated Legendre function), it is possible to demonstrate that Eq.(5.10) also holds for general anisotropic materials. In the next Section, the crystal plasticity constitutive model linking Eqs.(5.7) and (5.8) and employed in this thesis is discussed. 5.3 Crystal plasticity phenomenological modelling In crystallography, a slip system family describes a set of crystallographically equivalent slip planes associated with a family of crystallographically equivalent slip directions for which dislocation motion can occur, producing plastic deformation. Different slip systems are associated with different classes of crystal lattice. Generally, slip planes are those with the highest surface density of atoms, i.e. close-packed planes, while slip directions are those corresponding to highest linear density of atoms, i.e. close-packed directions. Once a specific slip plane and a specific slip direction over it are identified, a certain resolved shear stress is needed to trigger the slip, which is an important deformation mechanism in crystals. 140 Grain boundary formulation for crystal plasticity Crystal plasticity can be generally modeled through phenomenological or physically-based approaches [178]. Moreover, the crystallographic slip within single crystals can be idealised as either rate-dependent or rate-independent. In the present work, a phenomenological rate-dependent description is adopted. In the present Section, an introductory functional description of crystal slip is briefly recalled. The slip over a specific slip plane α identified by the unit normal vector α ni , and along a specific direction identified by the unit vector siα , is activated by the Schmid resolved shear stress τ α = siα σij nαj , (5.11) which triggers the corresponding slip or shear rate γ̇α = Ψα (τ α , τcα ) , (5.12) where Ψα expresses a specific flow rule and τcα is a certain critical resolved shear stress, which plays the role of a state variable for the slip system α. τcα generally R depends on the accumulated slips γ β = t |γ̇ β |dt and on the slip rates γ̇ β on all the Ns slip systems and its evolution can be expressed as   τ̇cα = Ξα γ β , γ̇ β (5.13) where Ξα expresses some specific hardening law and β = 1, . . . , Ng , meaning that the evolution of τcα of the generic slip system α is a function of slip rate and accumulated slip of all the slip systems. To avoid possible confusion, the sum of the accumulated slips γα over all the Ns slip systems, which is defined as γ ≡ ∑α γα , will be referred to as the overall cumulative slip. Eqs.(5.11-5.13) are valid ∀α = 1, · · · , Ns . Once the slip rates are known, the plastic strains rate at a point in the crystal can be expressed as p ε̇ ij  1 Ns α  α α α α = ∑ γ̇ ni s j + si n j . 2 α =1 (5.14) The developed formulation can be coupled with different types of flow and hardening rules. The flow and hardening rules used in this Chapter are reported in Section (5.7). 5.4 The grain-boundary incremental-iterative algorithm for crystal plasticity in polycrystalline aggregates 5.4 141 The grain-boundary incremental-iterative algorithm for crystal plasticity in polycrystalline aggregates Following Refs. [213, 41], in the framework of the initial strain formulation the elasto-plastic grain-boundary problem can be expressed in terms of accumulated values of displacements U g , tractions T g and plastic strains ε p,g . Eq.(5.7) can then be rewritten as H g U g = G g T g + D g E p,g BCs −−→ A g X g = C g Y g (λ) + D g E p,g (5.15) where the column reordering induced by the enforcement of the boundary conditions (BCs) is indicated. In Eq.(5.15), the matrix A g contains a selection of columns from H g and Gg corresponding to unknown components of boundary displacements and tractions, collected in the unknowns vector X g ; the matrix C g is a linear combinations of the columns from H g and G g multiplying the known components of boundary displacements and tractions, collected in the vector Y g , and whose value is governed by the load factor λ. Similarly, Eq.(5.8) can be rewritten, in terms of accumulated values, as Σ g = Aσ,g X g − Cσ,g Y g (λ) + Dσ,g E p,g , (5.16) where, similarly to the matrices A g and C g , the matrices Aσ,g and Cσ,g contains a suitable combination of columns from Hσ,g and Gσ,g corresponding to unknown and known, respectively, components of boundary displacements and tractions. However, it is recalled that these equations are generally used in a post-processing stage and the distinction between known and unknown values of boundary fields is adopted for the sake of notation. 5.4.1 Numerical discretisation of polycrystalline aggregates Similarly to the assemblage procedure of the polycrystalline aggregate described in Section (1.4) of Chapter (1), Eq.(5.15) is written for each grain of the aggregate, i.e. for g = 1, . . . , Ng , and coupled to an appropriate set of interface equations. The system of equations of the whole aggregate is then written as   AX − B(λ) − DE p p M(X, λ, E ) = =0 (5.17) IX where the matrix A and the vector B are given in Eq.(1.28). Unlike the system of the equations (1.27), in which non-linear behaviours within the grains are 142 Grain boundary formulation for crystal plasticity not considered, in Eq.(5.17), the presence of plastic slip within the polycrystalline aggregate is represented by the term DE p where    D=  D1 0 · · · 0 D2 · · · .. .. .. . . . 0 0 ··· 0 0 .. . D Ng       and   Ep =   E p,1 E p,2 .. . E p,Ng    .  (5.18) In the system of equations (5.17), the interface equations implement perfect bonding between contiguous grains and are given by the relation IX = 0, where the matrix I contains just zeros and ±1’s enforcing the interface condigh g tions δuei = 0 and eti = etih for pairs of interface points belonging to the generic adjacent grains g and h. In the solution algorithm described in Section (5.4.2), the system of equations (5.17) is used in conjunction with the stress equations (5.16) which are used to evaluate the stress at each interior test point within each grain. It is worth noting that, being Eq.(5.16) used after the solution of Eq.(5.17), in a post-process stage within each iteration, it can be used for each grain separately, as U g and T g are known. However, for the sake of notation, the computation of the stress at the interior points of each grain of the polycrystalline aggregate is indicated as Σ(X, λ, E p ) = Aσ X − Bσ (λ) + Dσ E p , (5.19) where    Σ=     Bσ =   Σ1 Σ2 .. . Σ Ng        , Aσ X =    Cσ,1 Y1 Cσ,2 Y2 .. . Cσ,Ng Y Ng  Aσ,1 X1 Aσ,2 X2 .. . Aσ,Ng X Ng       , Dσ E p =       ,  Dσ,1 E p,1 Dσ,2 E p,2 .. . Dσ,Ng E p,Ng    .  The incremental-iterative algorithm for the solution of the crystal plasticity problem is described in the next Section. 5.4 The grain-boundary incremental-iterative algorithm for crystal plasticity in polycrystalline aggregates 5.4.2 143 Polycrystalline incremental-iterative system solution The incremental-iterative algorithm used to solve the crystal plasticity problem is described in Algorithm (1), which is detailed in the following. In the Algorithm, the subscript n refers to the n-th load step whereas the superscript k refers to the k-th iterative step of the considered load step. Moreover, the superscript g refers to the g-th grain of the aggregate, ye is the position of the centroid of e-th volume cell and α denotes the α-th slip system of the grain. The Algorithm starts at Step (1) at which the load factor is initialised to 0 and the index n is initialised to 1. The Algorithm runs until the load factor λ reaches the given final load factor λ f . Once the solution at the load step n − 1 corresponding to the load factor λn−1 has been found, the load increment λ̇∆tn is introduced, being λ̇ the loading rate and ∆tn the time step, and the new load factor λn is computed. At the beginning of the analysis, the plastic strain p Ė n=0 throughout the whole polycrystalline aggregate as well as the plastic g slip γnα=0 (ye ) for each slip system of the volume cells of each grain are set to p g zero, i.e. Ė n=0 = 0 and γnα=0 (ye ) = 0. On the other hand, the initial value of g α the critical resolved shear stress τc,n =0 ( ye ) is set to an initial value depending on the considered material. At Step (6), the iterative cycle starts and the solution of the system of equations (5.17) and (5.19) coupled to the constitutive relations (5.11), (5.12) and (5.13) is computed. At Step (7), Eq.(5.17) is solved for the current (k + 1)-th iteration as a function of λn and of the value of the plastic strain at the k-th p iteration, which is obtained as the sum of the last converged value E n−1 plus the increment at the k-th step given by the product of the time step ∆tn and p,k the last computed value of the plastic strain rate Ė n . It is worth noting that p in the Algorithm, E n−1 collects the converged plastic strain components up to the load level λn−1 , but not including the last increment λ̇∆tn . The updated values of boundary displacements and tractions, given by k + Xn 1 and by the prescribed values governed by λn , are then used in Step (8) to compute the internal stress components at the volume cells’ centroids collected in Σkn+1 , which in turn are used to obtain the resolved shear stress g τnα,k+1 (ye ) for each slip system α of the centroids of all the volume cells of each grain (Step (9)). g At Step (10), Eq.(5.12) is used to compute the slips rate γ̇nα,k+1 (ye ) and g the accumulated slips γnα,k+1 (ye ) for each slip system of the volume cells’ centroids of each grain. Similarly, at Step (11) the critical shear stress rate α,k +1 g (ye ) is computed using Eq.(5.13) and the previously computed values τ̇c,n 144 Grain boundary formulation for crystal plasticity of the slips rate and the accumulated slips. At Step (12), the rate of the plastic p,k+1 g strain components ε̇ ij,n (ye ) is computed using Eq.(5.14). g At this point, the overall cumulative slip γnk+1 (ye ) is computed for the volume cells of each grain and the convergence condition is checked. The convergence conditions is given in terms of the difference between two cong secutive cumulative slip between γnk (ye ) compared to a tolerance value econv . If the convergence is met then the accumulated slips, the critical shear stresses and the accumulated plastic strains are updated and stored and another load increment can be introduced and computed if needed. If the convergence is not met, the iteration counter k is updated and another iteration is started. 5.4 The grain-boundary incremental-iterative algorithm for crystal plasticity in polycrystalline aggregates 145 Algorithm 1 CPBEM algorithm 1: 2: 3: 4: 5: 6: 7: 8: START λ0 ← 0, n ← 1; while (λn < λ f ) do λn ← λn−1 + λ̇∆tn ; k ← 0; converged ← .false.; while (.not.converged) do Solve: p,k p M(Xkn+1 , λn , E n−1 + Ė n ∆tn ) = 0; Compute the internal stress field: p 9: 10: . Eq.(5.17) p,k Σkn+1 = Σ(Xkn+1 , λn , E n−1 + Ė n ∆tn ); . Eq.(5.19) ∀ g, e, α compute the resolved shear stress: g g g,k +1 g g τnα,k+1 (ye ) = siα (ye )σij,n (ye )nαj (ye ); . Eq.(5.11) ∀ g, e, α compute the slips rate and the accumulated slips: g g g α,k g α γ̇nα,k+1 (ye ) = Ψα [τnα,k+1 (ye ), τc,n . Eq.(5.12) −1 ( ye ) + τ̇c,n ( ye ) ∆tn ]; g g g γnα,k+1 (ye ) = γnα−1 (ye ) + |γ̇nα,k+1 (ye )|∆tn ; 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: ∀ g, e, α compute the critical shear rate: β,k +1 g β,k +1 g α,k +1 g τ̇c,n ( y e ) = Ξ α [ γn (ye ), γ̇n (ye )]; . Eq.(5.13) ∀ g, e compute the plastic strain rate: . Eq.(5.14) g α g g α g p,k +1 g α,k+1 g 1 α α (ye )[ni (ye )s j (ye ) + n j (ye )si (ye )] ε̇ ij,n (ye ) = 2 ∑α γ̇n g g ∀ g, e compute the cumulative slip γnk+1 (ye ) = ∑α γnα,k+1 (ye ); g g if (∀ g, e γnk+1 (ye ) − γnk (ye ) < econv ) then converged ← .true. else k ← k+1 end if end while  α g g α,k +1 g α (ye )|∆tn  γn (ye ) ← γn−1 (ye ) + |γ̇n g g α,k +1 g α α ∀ g, e, α update and store τc,n (ye ) ← τc,n−1 (ye ) + τ̇c,n (ye )∆tn   p p,k +1 p E n ← E n−1 + Ė n ∆tn n ← n + 1; end while EXIT 146 5.5 Grain boundary formulation for crystal plasticity Numerical tests In this Section, the developed and implemented formulation is numerically and computationally assessed. The phenomenological framework by Bassani and Wu [24] is used in the first series of tests performed in the present work, considering FCC Copper (Cu) as benchmark material. The explicit expressions of the flow rule and the hardening law of the Bassani and Wu crystal plasticity framework are given in Section (5.7). The single crystal properties as well as the slip systems numbering used in the present study coincide with those in Refs. [231, 24]. The elastic constants and the crystal plasticity parameters for FCC copper single crystals are summarised in Table (5.1). Table 5.1: Elastic and crystal plasticity properties for FCC Copper from [24]. To interpret the symbols, the reader is referred to Section (5.7.1). property elastic constants [109 N/m2 ] initial critical resolved shear stress [106 N/m2 ] reference shear rate [1/s] rate sensitivity [-] stage I reference stress [106 N/m2 ] initial hardening modulus [106 N/m2 ] hardening during easy glide [106 N/m2 ] interaction peak slip [-] latent hardening factor [-] cross-hardening moduli f αβ [-] component c1111 , c2222 , c3333 c1122 , c1133 , c2233 c1212 , c1313 , c2323 value 170 124 64.5 τ0α ≡ τ0 , α = 1, · · · , Ns 17 γ̇0α , α = 1, · · · , Ns n τs h0 hs γp q no junction Hirth lock Coplanar interaction Glissile junction Sessile junction 0.001 50 1.3 · τ0 90 · τ0 1.5 · τ0 0.001 0 8.0 8.0 8.0 15.0 20.0 5.5 Numerical tests 5.5.1 147 Single crystal tests To assess the accuracy and numerical performance of the formulation, tests on a single crystal are performed first. The analysed domain is a cubical crystal, with the edges aligned with the reference system and subjected to uniaxial stress acting along the x3 direction. Single crystal test: algorithm test In Figure (5.1), the behaviour of the implemented scheme is tested with respect to the value of the rate sensitivity n appearing in Eq.(5.23), for the three different crystallographic loading directions [001], [111] and [632], chosen as in Ref. [24] for comparative purposes. In all tests, the loading rate λ̇ is always set as λ̇ = 10−3 s−1 . The curves plot the stress component σ33 at the centroid of the cube versus the strain component ε 33 at the same point. It is worth noting that nominal components of strains are considered, being the developed formulation valid for small strains. However, strains up to 10% are plotted to investigate when the small strains assumption breaks down: it is interesting to note that, up to this value of strains, the converged curves match reasonably well with those reported in [24], which have been replicated in the figure using a simple rate-independent scheme and represented with dashed lines. It is confirmed that, as n rises, the rate-dependent scheme simulates a rate-independent process, although the convergence is not the same for all directions, being noticeably slower (with respect to n) for the direction [632]. Also, it is interesting to note that for the [001] and [111] loading directions, the rate-dependent scheme predicts a lower bound for the stress, whereas for the [632] loading direction it predicts an upper bound. Single crystal test: mesh convergence In the following series of tests, the single crystal response is tested against different domain volume meshes, in order to assess the robustness of the computational homogenisation scheme that will be used in the polycrystalline tests. Unlike the curves reported in Figs.(5.1), which are obtained considering the values of stress and strain at the centroid of the cubic single crystal domain, the stress-strain curves in the subsequent part of this work are obtained as averaged results of the stress and the strain fields over the crystalline or poly- 148 Grain boundary formulation for crystal plasticity 60 100 50 80 40 RD RD RD RD RD RI 20 10 - n = 10 n = 20 n = 30 n = 40 n = 50 σ33 /τ0 σ33 /τ0 60 30 RD RD RD RD RD RI 40 20 0 n = 10 n = 20 n = 30 n = 40 n = 50 0 0 0.02 0.04 0.06 0.08 0.1 0 0.02 ε33 0.04 0.06 0.08 0.1 ε33 (a) Loading direction [001] (b) Loading direction [111] 60 25 40 30 - n = 10 n = 20 n = 30 n = 40 n = 50 n = 100 n = 200 RD RD RD RD RD RD RD RI 20 15 σ33 /τ0 RD RD RD RD RD RD RD RI 50 σ33 /τ0 - - n = 10 n = 20 n = 30 n = 40 n = 50 n = 100 n = 200 10 20 5 10 0 0 0 0.02 0.04 0.06 0.08 ε33 (c) Loading direction [632] 0.1 0 0.005 0.010 0.015 0.020 ε33 (d) Loading direction [632] Figure 5.1: Effect of the rate sensitivity parameter n for three different loading crystallographic directions. Plot (d) shows a zoom from plot (c). It is apparent as the rate-dependent results converge to the rate-independent ones with increasing values of n. 5.5 Numerical tests 149 crystalline domain. Strain and stress volume averages are given by Γij = 1 V Z V γij (x)dV (x) = Σij = 1 V Z V 1 2V Z S [ui (x)n j (x) + u j (x)ni (x)]dS(x) σij (x)dV (x) = 1 V Z S xi (x)t j (x)dS(x) (5.20) (5.21) where S and V represents the boundary and the volume of the domain, respectively. The terms involving the surface integrals allow to write the volume averages in terms of boundary displacements and tractions, which are the primary variables of the model. The terms involving the volume integrals, on the other hand, are obtained as the weighed sum R of the strains and stresses computed at the centroids of the tetrahedra, i.e. V (·)dV = ∑e (·)e Ve being Ve the volume of the e-th volume element. The comparison between the volume averages computed using the volume and the surface integrals can be used as a tool to assess the accuracy in the integration of the kernels in the displacement and stress boundary integral equations. Figure (5.2) shows four surface and volume meshes of a cubic domain. Following the procedure described in Chapter (3) and used in Refs. [29, 28, 80], the surface and volume meshes of the crystalline domain are built considering an as uniform as possible mesh size, which is computed as the average length of the edges of the considered crystals divided by a mesh density parameter dm . In the considered case, the average edge length is clearly the cube’s edge. Figures (5.2a,e), (5.2b,f), (5.2c,g), (5.2e,h) correspond to dm = 2, 3, 4, 5, respectively. Although they may not represent the best meshing choice for a cubic domain, the combination of triangular and quadrangular elements in the surface meshes and the tetrahedra in the volume meshes is the same used to adapt to the geometrical variability of general Laguerre-based polycrystalline morphologies. Some statistics about the meshing algorithm are summarised in Table (5.2), which reports the number of degrees of freedom and the number of surface and volume elements of the single crystal meshes involved in the present test, as well as those for the polycrystalline meshes considered in the next Section. The cube in Figure (5.2) is loaded in uniaxial stress, with uniform tractions acting over the top and bottom faces, whereas the lateral faces are tractionfree. To avoid the rigid body motion, the technique proposed by Lutz et al. [127] is used. Figure (5.3a) shows the stress-strain curves of a single crystal cubic domain loaded along the [632] direction for the four considered meshes. 150 Grain boundary formulation for crystal plasticity (a) (b) (c) (d) (e) (f ) (g) (h) Figure 5.2: Single crystal surface (a-d) and volume (e-h) meshes: (a,e) dm = 2, (b,f ) dm = 3, (c,g) dm = 4, (d,h) dm = 5. The small circles in the surface meshes represent the collocation points. The curves are plotted in the strain range 0-2% considering a slip rate sensitivity n = 50 and are compared to that obtained for the single crystal centroid. The four meshes replicate the results obtained in Figure (5.1d) as uniform strain and stress fields are expected for this configuration. In Figure (5.3a), the close-up view shows a comparison between the curves obtained using the surface and the volume integrals of Eqs.(5.20) and (5.21). A good match is found among the curves showing a satisfactory accuracy in the integration of the kernels of the boundary integral equations. Finally, Figure (5.3b) shows the same response in a smaller strain range, i.e. 0-0.2%. 5.5 Numerical tests 151 Table 5.2: Statistics about the meshes of the single crystal and polycrystalline domains: dm is the mesh density parameter; Nes is the number of surface elements; DoFs is the number of degrees of freedom for the system in Eq.(5.17); Nev is the number of volume elements. The last column reports the number of volume elements per grain, which is considered as reference to capture the volume field distribution. dm 2 3 4 5 1 2 3 4 5 2.5 2.5 morphology single crystal polycrystalline, 10 grains polycrystalline, 100 grains (I) polycrystalline, 100 grains (II) 8 5.0 7 4.9 Nes 36 72 150 255 430 895 1811 3291 5242 19902 18075 DoFs 162 288 504 729 3594 6285 10131 15669 22143 132369 122166 Nev 46 161 436 836 562 1576 4097 8791 16119 45704 40181 Nev /Ng 46 161 436 836 56 158 410 897 1612 457 402 3.0 4.7 1.50 5 1.55 Macro stress Σ33 /τ0 Macro stress Σ33 /τ0 2.5 4.8 6 1.60 4 dm = 5 dm = 4 dm = 3 dm = 2 Single crystal 3 2 1 2.0 1.5 dm = 5 dm = 4 dm = 3 dm = 2 Single crystal 1.0 0.5 0 0 0 0.5 1.0 1.5 2.0 0 0.05 0.10 Macro strain Γ33 [%] Macro strain Γ33 [%] (a) (b) 0.15 0.20 Figure 5.3: Volume stress average Σ33 plotted versus volume strain average Γ33 for the four considered meshes of the single crystal loaded along the [632] direction. (a) stress-strain response in the strain range 0-2.0%; the close-up shows the values obtained using the surface integral (solid lines) compared to those obtained using the volume integral (dashed lines). (b) stress-strain response in the range strain 0-0.2%. 152 Grain boundary formulation for crystal plasticity (a) (b) (c) (d) (e) (f ) (g) (h) (i) (j) Figure 5.4: Surface (a-e) and volume (f -j) meshes of a 10-grain aggregate: (a,f ) dm = 1, (b,g) dm = 2, (c,h) dm = 3, (d,i) dm = 4, (e,j) dm = 5. The small circles in the surface meshes represent the collocation points. 5.5.2 Polycrystalline tests In the present Section, the proposed model is used to simulate the plastic behaviour of Cu polycrystalline aggregates. To generate the polycrystalline morphologies, the Neper package [167] is used for its capability of eliminating pathologically small geometrical entities typical of domains subdivided by the Voronoi or Laguerre algorithm, which may induce unnecessarily heavy meshes. 10-grain aggregate First, a convergence analysis is performed to obtain a proper mesh size ensuring appropriate grains boundary and volume fields resolution and mesh independency of the results. Figure (5.4) shows five different meshes (dm = 1, 2, ..., 5) of a 10-grain aggregate. The statistics about the number of DoFs and the number of surface and volume elements are summarised in Table (5.2). The aggregate is loaded in uniaxial tension, with uniform tractions acting over the top and bottom faces, while the lateral faces are traction-free. In this case, to avoid rigid body motion, the elimination of rigid body modes technique is applied to one grain of the aggregate. 5.5 Numerical tests 153 8 dm dm dsm dm dm dm 400 300 =1 =2 = 2, dvm = 3 =3 =4 =5 80 200 60 40 100 e(Σ133 , Σ233 ) e(Σ233 , Σ333 ) e(Σ333 , Σ433 ) e(Σ433 , Σ533 ) 7 Macro stress Error [%] Macro stress Σ33 [MPa] 500 6 5 4 3 2 20 1 0 0 0 0 0.5 0.1 1.5 1.0 0.2 2.0 0 0 0.5 1.0 Macro strain Γ33 [%] Macro strain Γ33 [%] (a) (b) 1.5 2.0 Figure 5.5: Volume stress average Σ33 versus volume strain average Γ33 for the considered meshes of the 10-grain aggregate. (a) Stress-strain response in the strain range 0-2.0%; the close-up shows the values obtained in the strain range 0-0.2%. (b) Error between two consecutive mesh refinements. Figure (5.5a) shows the convergence of the macro stress-strain response of the Cu 10-grain aggregate with respect to the considered meshes. As the model allows to build the surface and the volume meshes separately, Figure (5.5a) shows also the macro response obtained combining a surface mesh with a mesh density parameter dm = 2 and a volume mesh with a mesh density parameter dm = 3, which corresponds to the curve labelled with dsm = 2, dvm = 3. Figure (5.5b) reports the macro-stress error during the loading history between two consecutive mesh refinements defined as: i i +1 e(Σ33 , Σ33 ) = 100 · i − Σ i +1 | |Σ33 33 Σ533 (5.22) i corresponds to the macro stress computed for d = i. where Σ33 m Figure (5.6) shows the deformed configurations of the aggregate for the meshes of Figure (5.4) at the last computed step of the load history, i.e. for Γ33 = 2%. A good convergence is obtained in terms of the grain boundary displacements starting from dm = 2. Figure (5.7) and Figure (5.8) report the contour plots of the Von Mises stress and cumulative slip fields, respectively. Also in this case, the convergence in terms of the overall behaviour and stress and slip concentration is satisfactorily reached through mesh refinement. It is however noted that a dm = 3 mesh is required to appreciate the fields distribution, likely due to the use of constant volume elements. Considering Table 154 Grain boundary formulation for crystal plasticity (5.2), an estimate of the number of volume elements per grain to obtain satisfactory fields distributions within the aggregate appears to be around 400 elements per grain, at least for the present load condition. (a) (b) (c) (d) (e) Figure 5.6: Deformed shape for the five considered meshes of the 10-grain polycrystalline copper aggregate subjected to tensile load at the last computed step (Γ33 = 2%). Figs.(a) to (e) correspond to the (a) to (e) surface meshes and (f ) to (j) volume meshes of Figure (5.4), respectively. (a) (f ) (b) (c) (d) (e) (g) (h) (i) (j) Von Mises stress [MPa] 0 100 200 300 400 500 600 700 800 (k) Figure 5.7: Von Mises stress contour plots for the 10-grain polycrystalline copper aggregate subjected to tensile load at the last computed step (Γ33 = 2%). Figs.(a-e) and Figs.(h-j) correspond to two different views of the aggregate. (k) Colormap. 5.5 Numerical tests 155 (a) (b) (c) (d) (e) (f ) (g) (h) (i) (j) Cumulative slip 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 (k) Figure 5.8: Cumulative slip contour plots of the 10-grain polycrystalline copper aggregate subjected to tensile load at the last computed step (Γ33 = 2%). Figs.(a-e) and Figs.(h-j) correspond to two different views of the aggregate. (k) Colormap. 600 600 100-grain aggregate (I) 100-grain aggregate (II) linear elastic response BZ model 500 Macro Stress Σg33 [MPa] Macro Stress Σ33 [MPa] 500 400 300 80 60 200 40 100 20 400 300 80 60 200 40 100 20 0 0 0 0 0 0.5 1.0 Macro Strain Γ33 [%] (a) 0.1 1.5 0.2 2.0 0 0 0 0.5 1.0 1.5 2.0 Macro Strain 2.5 Γg33 0.1 3.0 3.5 0.2 4.0 [%] (b) Figure 5.9: (a) Volume stress average Σ33 versus volume strain average Γ33 for the two 100-grain aggregates; (b) Averaged stress-strain behaviour for each constituent grain of the aggregate (I). 156 Grain boundary formulation for crystal plasticity 100-grain aggregate The same tensile test is performed on two 100-grain Cu aggregates, in order to evaluate the plastic response of more complex and representative Cu microstructures. Figure (5.9a) shows the macro stress-strain behaviour of the two aggregates, which are labelled as aggregate (I) and (II) and reported in Figures (5.10a) and (5.10d), respectively. Figures (5.10b,e) show the corresponding surface meshes, whereas Figure (5.10c,f) show the volume meshes. The meshes are built using a mesh density parameter that ensures an average number of 400 volume elements per grain, see Table (5.2), which represents a good tradeoff between solution accuracy and number of DoFs. The macro stress-strain behaviour reported in Figure (5.9a) is qualitatively similar to that obtained for the 10-grain aggregate. The insert of the figure reports a close-up view of the macro response in the range 0-0.2%, showing the transition from the linear to the plastic slip behaviour. By comparing the response of the two microstructures, it can be noted that an aggregate with 100 grains is satisfactorily representative for polycrystalline Cu undergoing small strains crystal plasticity. The solid line in Figure (5.9a) represents the linear response of the microstructure whose averaged stiffness is calculated using the Hashin-Shtrikman bounds [86, 87], whereas the dashed line reports the response of the aggregate using the Berveiller and Zaoui (BZ) model [36]. It can be noted that the BZ model and the present model agree very well with respect to the elastic to plastic behavior transition. On the other hand, the BZ model provides values of stress higher than the present model, but this appears consistent with Barbe et al. [18], who reported an overestimate with respect to FEM as well. Figure (5.9b) shows the averaged stress-strain behavior of each of the 100 grains of the aggregates, obtained using Eqs.(5.20) and (5.21) where the integration is performed over the boundary of each grain. Figures (5.11a,c,e) show the contour plot of the Von Mises stress over the external boundary of the aggregate (I) at the macro-strain steps Γ33 = 0.3%, 1.0% and 2.0%, respectively, whereas Figures (5.11b,d,f) report the same contour plot at the same macro-strain steps for a section of the aggregate giving an insight of the internal volume fields distribution. Similarly, Figures (5.12a,c,e) show the contour plot of the cumulative slip at the macro-strain steps Γ33 = 0.3%, 1.0% and 2.0%, respectively, and Figures (5.12b,d,f) report the same contour plot at the same macro-strain steps for a section of the aggregate. 5.5 Numerical tests 157 (a) (b) (c) (d) (e) (f ) Figure 5.10: (a,b) 100-grain polycrystalline microstructure (I) and (II), respectively; corresponding (c,d) surface and (e,f ) volume meshes. 158 Grain boundary formulation for crystal plasticity (a) Γ33 = 0.3% (b) Γ33 = 0.3% (c) Γ33 = 1.0% (d) Γ33 = 1.0% (e) Γ33 = 2.0% (f ) Γ33 = 2.0% Von Mises stress [MPa] 0 100 200 300 400 500 600 700 800 900 (g) Figure 5.11: Von Mises stress contour plots for the 100-grain polycrystalline copper aggregate (I) at the macro-strain steps (a,b) Γ33 = 0.3%, (c,d) 1.0% and (e,f ) 2.0%; (g) Colormap. 5.5 Numerical tests 159 (a) Γ33 = 0.3% (b) Γ33 = 0.3% (c) Γ33 = 1.0% (d) Γ33 = 1.0% (e) Γ33 = 2.0% (f ) Γ33 = 2.0% Cumulative slip 0 0.02 0.04 0.06 0.08 0.10 0.12 0.13 (g) Figure 5.12: Cumulative slip contour plots for the 100-grain polycrystalline copper aggregate (I) at the macro-strain steps (a,b) Γ33 = 0.3%, (c,d) 1.0% and (e,f ) 2.0%; (g) Colormap. 160 Grain boundary formulation for crystal plasticity In conclusion, a comparison with the homogenisation results obtained using the crystal plasticity finite element method is presented. The reference is the work by Barbe et al. [18], where the response of polycrystalline aggregates at small strains is studied using FEM. In their work, the authors employ the model proposed by Méric and Cailletaud [134], which is briefly recalled in Section (5.7) for the sake of completeness. In [18], the FEM aggregate consists of 200 grains with random crystallographic orientations, discretized using a structured mesh and subject to isovolumic boundary conditions. The BEM results are instead obtained with the polycrystalline aggregate (I) whose morphology, surface and volumes meshes are reported in Figures (5.10a,c,e), respectively. As in Ref. [18], the BEM polycrystalline aggregate is subjected to iso-volumic boundary conditions and is loaded along the x3 direction, so that the axial stress and strain correspond to the averaged macro-stress Σ33 and macro-strain Γ33 , respectively. The lateral stresses correspond to the averaged macro-stresses Σ11 and Σ22 . The elastic, slip rate and hardening constants are taken from [18], whereas the interaction hardening moduli from the work of Gérard et al. [73], who adopted such coefficients based on the work on dislocation dynamic simulations for FCC crystals of Devincre et al. [57]. All the constants are reported in Table (5.3). It is worth noting that in the elastic regime, the grains are considered isotropic, as in [18], and this is why their elastic behaviour is given in terms of Young’s modulus E and Poisson’s ratio ν. Figure (5.13) shows the comparison between the results obtained using the FEM model in [18] and those obtained from the present formulation. In Figure (5.13), the FEM points are denoted by small circles whereas the BEM points are denoted by small squares. As shown in the figures, for the strain range 0-0.6%, it is possible to assess the capabilities of the present formulation, as the plastic behaviour of the polycrystalline aggregate is well developed. The presented results highlight a satisfactory agreement between the results of the present formulation and those reported in the literature. Eventually, Figures (5.14a,c,e) show the contour plot of the Von Mises stress over the external boundary of the aggregate (I) at the macro-strain steps Γ33 = 0.14%, 0.30% and 0.59%, respectively, using the present grain boundary formulation and the Méric and Cailletaud model [134]. Similarly, Figures (5.14b,d,f) show the contour plot of the cumulative slip at the same macrostrain steps. 5.5 Numerical tests 161 Table 5.3: Material parameters for FEM-BEM comparison. The elastic, slip rate and hardening constants are taken from [18], whereas the interaction hardening moduli from [73]. To interpret the symbols, the reader is referred to Section (5.7.2). property Young’s modulus [109 N/m2 ] Poisson’s ratio [-] slip rate constant [106 N · s1/n ] rate sensitivity [-] initial critical resolved shear stress [106 N/m2 ] hardening constant [106 N/m2 ] hardening constant [-] hardening moduli [-] 250 value 169 0.3 10 25 τ0 111 Q b self hardening Hirth lock Coplanar interaction Glissile junction Collinear interaction Lomer lock 35 7 8.0 0.2 1.0 3.0 90.0 2.5 0 FEM - Σ11 FEM - Σ22 BEM - Σ11 BEM - Σ22 -20 Lateral Stress [MPa] 200 Axial Stress [MPa] component E ν K n 150 100 50 FEM BEM 0 -40 -60 -80 -100 -120 0 0.1 0.2 0.3 0.4 Axial Strain [%] (a) 0.5 0.6 0 0.1 0.2 0.3 0.4 0.5 0.6 Axial Strain [%] (b) Figure 5.13: Comparison between FEM results [18] and the present BEM formulation. (a) Macro stress-strain behaviour of a polycrystalline aggregate subjected to iso-volumic boundary conditions; (b) Lateral macro-stresses versus axial macro-strain. 162 Grain boundary formulation for crystal plasticity (a) Γ33 = 0.14% (b) Γ33 = 0.14% (c) Γ33 = 0.30% (d) Γ33 = 0.30% (e) Γ33 = 0.59% (f ) Γ33 = 0.59% Cumulative slip Von Mises stress [MPa] 0 150 300 (g) 450 600 0 0.01 0.02 0.03 0.04 (h) Figure 5.14: (a,c,e) Von Mises stress contour plots for the polycrystalline aggregate at the macro-strain steps Γ33 = 0.14%, 0.30% and 0.59%, respectively. (b,d,f ) Cumulative slip contour plots for the polycrystalline aggregate at the macro-strain steps Γ33 = 0.14%, 0.30% and 0.59%, respectively. (g,h) Colormaps of (g) Von Mises stress and (h) cumulative slip. 5.6 Discussion and possible developments 5.6 163 Discussion and possible developments The presented formulation addresses crystal plasticity in a boundary element framework, both for single crystals and crystal aggregates. From this point of view, it may be interesting to note that, while the possibility of using boundary elements for crystal plasticity is mentioned in the very exhaustive review [178], no reference is provided to crystal plasticity boundary elements papers. The salient feature of the method is its expression in terms of grain-boundary variables only, namely in terms of inter-granular displacements and tractions. In previous applications, see e.g. Chapters (1), (3) and (4) and [29, 28, 80], this aspect ensured simplification in data preparation, as only meshing of the inter-granular interfaces was required, and a reduction in the number of DoFs for the analysis, particularly appreciated in polycrystalline problems. In crystal plasticity applications, the data preparation simplification with respect to other techniques is lost, due to the need of meshing the grains interior volume; however, the system order reduction is maintained, as the volume mesh does not carry additional degrees of freedom. The volume mesh is in fact only used to compute the plastic contribution on the right-hand side of Eq.(5.19), while the number of degrees of freedom with respect to the purely elastic case remains unchanged. Additionally, it is worth noting that the plastic accumulation just modifies the right-hand side of Eq.(5.19): such circumstance is particularly advantageous in terms of numerical solution, as the factorisation of the coefficient matrix in the left-hand side of Eq.(5.19) is performed just once and used throughout the analysis, thus ensuring numerical effectiveness. Although the proposed scheme allows a considerable reduction in the number of DoFs with respect to other volume discretisation schemes, the solution of system (5.19) still represents a formidable computational task, especially in the polycrystalline case, due to the fact that the numerical blocks associated to each grain in the boundary integral scheme are fully populated. For such reason, at least in the present implementation, the typical computation time is longer than the typical times with CPFEMs or Fast Fourier Transform based formulations, see e.g. Ref. [117]. An interesting direction of further investigation, from this point of view, could be related to the use of fast multipoles [125] or hierarchical matrices [25, 31, 34, 27, 138] in conjunction with iterative solvers to reduce the computational time and further compress the storage memory requirements of the proposed framework. On the other hand, the implementation of effective rate-independent schemes [7, 136, 37], could speed up the iterative convergence of the crystal plastic analysis, avoid- 164 Grain boundary formulation for crystal plasticity ing the numerical stiffness, and the associated computational costs, associated to high values of the rate sensitivity n. In the developed model, a phenomenological description of crystal plasticity has been adopted. However, the model offers flexibility and could be coupled with more sophisticated crystal plasticity laws, included physically based approaches. Another natural extension could be the introduction of different models of grain interfaces, which at the moment are modelled as perfect and remain intact during the loading history. Sliding, separation and contact could be included within the formulation by suitably redefining the interface equations in (5.19). The presented formulation has also some limitations, which provide input for further investigation. First of all, the formulation is confined within the framework of small strains, so that finite lattice rotations are not taken into account. For this reason, applications to texture evolution problems are not currently possible. In fact, the present formulation is based on an elasto-plastic analysis, while crystal plastic finite element formulations for texture evolution are often based on rigid-plastic approaches, where the initial elastic behaviour is neglected [24, 93]. The extension of the developed grain-boundary framework to finite strains and the inclusion of finite rotations is not a trivial task and poses considerable research challenges that are left as future task. 5.7 Flow rules and hardening laws In the present work two different crystal plasticity phenomenological frameworks have been used in the performed numerical tests: the model by Bassani and Wu [24] and the model by Méric and Cailletaud [134]. 5.7.1 Bassani and Wu model Bassani and Wu used as flow rule a power law of the form γ̇α = γ̇0α τα τcα n sgn (τ α ) , ∀α = 1, · · · , Ns , (5.23) where γ̇0α and n are material parameters known as reference shear rate and rate sensitivity of slip respectively, while τcα is the evolving critical stress. Eq.(5.23) describes, in general, a rate-dependent phenomenon in which all the slip systems are always active with a specific slip rate γ̇α , as long as the corresponding 5.7 Flow rules and hardening laws 165 resolved shear stress is non-zero, so that no distinction is made between active and inactive slip systems. It can be demonstrated that when n → ∞ the formulation becomes rate-independent. They also expressed the hardening laws, i.e. the evolution of τcα with respect to the material state and evolution, as Ns τ̇cα = ∑ hαβ γ̇ β , ∀α = 1, · · · , Ns , (5.24) β =1 where the self hardening moduli hαα and the latent hardening moduli hαβ were expressed as    "  β # h − h γ s 0 hαα = hs + (h0 − hs ) sech2 · γα · 1 + ∑ f αβ tanh α τs − τ0 γp β6=α hαβ = q · hαα , β 6= α, (5.25a) (5.25b) where: h0 is the initial hardening modulus; hs is the hardening modulus during easy glide within stage I hardening; τs is the stage I reference stress, where large plastic flow initiates; τ0α R= τcα (0) is the initial critical resolved shear stress on the α-th slip system; γα = t |γ̇α |dt; γ p is the amount of slip after which the interaction between slip systems reaches the peak strength; f αβ is a specific slip interaction strength; q is a constant latent hardening factor. The model by Bassani and Wu has been implemented in several FEM formulations, also for polycrystalline micromechanics [199, 201], often using the implementation developed by Huang [93]. 5.7.2 Méric and Cailletaud model On the other hand, neglecting the kinematic hardening, Méric and Cailletaud represented the slip rate γ̇α of the α-th slip system using the following flow rule  α  |τ | − τcα n α γ̇ = sgn (τ α ) , ∀α = 1, · · · , Ns , (5.26) K where h·i = max(0, ·) and K and n are material parameters. In addition, in their model, the hardening law, which comprises self and latent hardening through the hardening moduli hαβ , has the form Ns τcα = τ0 + Q ∑ hαβ β =1 h i 1 − exp(−b|γ β |) , ∀α = 1, · · · , Ns (5.27) 166 Grain boundary formulation for crystal plasticity where τ0 is the initial critical resolved shear stress; Q is a material parameter that, multiplied by the hardening modulus hαβ , represents the maximal increase of the critical shear stress on the α-th slip system due to the slip in the β-th system; τ0 + Q ∑ β hαβ represents the maximum, or saturated, value that the critical shear stress on the α-th slip system can reach; eventually, b is a material parameter that governs the exponential saturation law. Conclusions In this thesis, a computational framework for micro-structural modelling of polycrystalline materials with damage and failure has been developed and presented. The framework is based on a non-linear multi-domain grain boundary formulation for generally anisotropic materials and has been employed for modelling the deformation, damage and failure mechanisms of polycrystalline aggregates at the scale of the constituent grains. In the thesis, several aspects of the polycrystalline problem within a boundary element formulation have been investigated and addressed. In Chapter (2), a novel unified compact scheme to compute the fundamental solutions of generally anisotropic multi-field materials, as well as their derivatives up to the desired order, has been presented. The scheme is based on the relationship between the Rayleigh expansion and the three-dimensional Fourier representation of a second-order homogenous partial differential operator, which allows to obtain a convergent series representation of the fundamental solutions and their derivatives in terms of spherical harmonics. The presented expression is easy to implement as it does not require any termby-term differentiation to obtain the derivatives of the fundamental solution. Furthermore, the coefficients of the series depend on the material properties only and it has been shown that the technique does not suffer from material degeneracies, thus making it very attractive for efficient boundary element implementations. Two isotropic operators, namely Laplace and isotropic elasticity operators, have been analysed as particular cases and it has been shown that, in such cases, the exact solutions are easily retrieved as the series contain a finite number of terms. Numerical tests have been presented to assess the accuracy, convergence and robustness of the proposed scheme when isotropic elastic, generally anisotropic elastic, transversely isotropic and generally anisotropic piezo-electric and magneto-electro-elastic materials are considered. 167 168 Grain boundary formulation for crystal plasticity In Chapter (3), a computational effective framework for micro-structural analysis of polycrystalline materials, with micro damage and cracks, has been presented. The framework, based on the grain-boundary formulation of Chapter (1), has been developed for computational effectiveness, with an aim towards affordable three-dimensional modelling. The sources of high computational costs in the original strategy have been identified and suitably treated. First, the original Voronoi or Laguerre morphologies have been regularised, to remove the small entities usually inducing excessively refined meshes. Then, special periodic non-prismatic unit cells have been considered, to remove the pathological grains often induced by the operations used to generate prismatic periodic RVEs. Eventually, a specific grain meshing strategy has been adopted, to conjugate mesh effectiveness with formulation simplicity. The combined effects of such enhancements has been demonstrated to lead to outstanding reductions in terms of overall number of degrees of freedom, with no compromise over accuracy for both homogenisation and cracking analyses. In turn, this is reflected in remarkable savings in terms of solution time, especially for micro-damage and micro-cracking simulations. In conclusion, micro-cracking simulations involving few hundred grains, typically requiring several days with the original scheme, are now performed in several hours. In Chapter (4), a numerical formulation for inter- and trans-granular cracking in three-dimensional polycrystalline materials has been presented. The formulation still retains the advantages of expressing the polycrystalline problem involving trans-granular cracking in terms of grain boundary variables thus reducing the computational cost of polycrystalline simulations. Transgranular cracking has been modelled by computing the stress in the interior of the grains, by introducing cohesive interfaces in correspondence of the failing cleavage planes according to a threshold condition and by remeshing the polycrystalline morphology accordingly. The competition between inter- and trans-granular cracking has been investigated by changing the parameters of the cohesive laws used to model the two mechanisms. Some preliminary results of the formulation have been presented showing that, by changing the ratio between the fracture energies of the two mechanisms, the failure behaviour switch from inter-granular to trans-granular cracking. Future improvements of the presented formulation will include analyses of polycrystalline morphologies with a higher number of grains and different loading conditions to investigate the effect of the statistical variability of polycrystalline morphologies under different boundary conditions on the competition between the two considered mechanisms. 5.7 Flow rules and hardening laws 169 In Chapter (5), a boundary element formulation for small strains crystal plasticity in polycrystalline aggregates has been presented. The method, based on the use of grain-boundary integral equations for the anisotropic elasto-plastic problem, is formulated in terms of boundary displacements and tractions, which play the role of primary variables, thus allowing a considerable reduction in the number of DoFs with respect to other volume discretisation techniques. The scheme has been implemented both for single crystals and polycrystalline aggregates and a general rate-dependent scheme has been used in the proposed incremental/iterative grain-boundary crystal plasticity algorithm. Several numerical tests have been performed to assess the accuracy and robustness of the method and the results confirm the potential of the developed tool. Although the still high computational costs associated with the analysis of general plastic polycrystalline problems call for further developments and refinements, the presented framework provides an alternative tool for the analysis of this class of problems. To conclude, it is worth highlighting that, since the developed framework is capable of dealing with non-linear behaviours of bulk anisotropic domains (as in the crystal plasticity study), with non-linear behaviours of the interdomain interfaces (as in the study of inter-granular failure), with on-the-fly remeshing (as in the trans-granular cracking study), it can be easily extended to investigate the micro-mechanisms of damage and failure of other classes of materials whose macroscopic behaviour is strongly influenced by their microstructure, such as fibre-reinforced composites. Furthermore, it was shown that a broader class of physical behaviours can be modelled using the unified representation of the fundamental solutions obtained in Chapter (2) and therefore the same framework can be also employed to model the damage and failure mechanisms of materials showing multi-field coupling. 170 Grain boundary formulation for crystal plasticity Bibliography [1] A. Abdollahi and I. Arias. Numerical simulation of intergranular and transgranular crack propagation in ferroelectric polycrystals. International journal of fracture, 174(1):3–15, 2012. [2] A. Abdollahi and I. Arias. Three-dimensional simulation of crack propagation in ferroelectric polycrystals: Effect of combined toughening mechanisms. Acta materialia, 65:106–117, 2014. [3] H. Abdolvand, M. R. Daymond, and C. Mareau. Incorporation of twinning into a crystal plasticity finite element model: evolution of lattice strains and texture in zircaloy-2. International Journal of Plasticity, 27(11):1721–1738, 2011. [4] M. Abramowitz and I. A. Stegun. Handbook of mathematical functions: with formulas, graphs, and mathematical tables, volume 55. Courier Corporation, 1964. [5] G. S. Adkins. Three-dimensional fourier transforms, integrals of spherical bessel functions, and novel delta function identities. arXiv preprint arXiv:1302.1830, 2013. [6] M. H. Aliabadi. The boundary element method: applications in solids and structures., volume 2. John Wiley & Sons Ltd, England, 2002. [7] L. Anand and M. Kothari. A computational procedure for rateindependent crystal plasticity. Journal of the Mechanics and Physics of Solids, 44(4):525–558, 1996. [8] T. L. Anderson and T. Anderson. Fracture mechanics: fundamentals and applications. CRC press, 2005. 171 172 BIBLIOGRAPHY [9] I. Aranson, V. Kalatsky, and V. Vinokur. Continuum field description of crack propagation. Physical review letters, 85(1):118, 2000. [10] F. Araújo, E. F. d’Azevedo, and L. J. Gray. Constructing efficient substructure-based preconditioners for bem systems of equations. Engineering Analysis with Boundary Elements, 35(3):517–526, 2011. [11] F. C. d. Araújo, E. F. dAzevedo, and L. J. Gray. Boundary-element parallel-computing algorithm for the microstructural analysis of general composites. Computers & Structures, 88(11):773–784, 2010. [12] G. B. Arfken, H. J. Weber, and F. E. Harris. Mathematical methods for physicists: A comprehensive guide. Academic press, 2011. [13] R. J. Asaro. Micromechanics of crystals and polycrystals. Advances in applied mechanics, 23:1–115, 1983. [14] R. J. Asaro and A. Needleman. Overview no. 42 texture development and strain hardening in rate dependent polycrystals. Acta metallurgica, 33(6):923–953, 1985. [15] R. J. Asaro and J. Rice. Strain localization in ductile single crystals. Journal of the Mechanics and Physics of Solids, 25(5):309–338, 1977. [16] S. Aubry and A. Arsenlis. Use of spherical harmonics for dislocation dynamics in anisotropic elastic media. Modelling and Simulation in Materials Science and Engineering, 21(6):065013, 2013. [17] P. K. Banerjee and R. Butterfield. Boundary element methods in engineering science, volume 17. McGraw-Hill London, 1981. [18] F. Barbe, L. Decker, D. Jeulin, and G. Cailletaud. Intergranular and intragranular behavior of polycrystalline aggregates. part 1: Fe model. International journal of plasticity, 17(4):513–536, 2001. [19] F. Barbe, S. Forest, and G. Cailletaud. Intergranular and intragranular behavior of polycrystalline aggregates. part 2: Results. International Journal of Plasticity, 17(4):537–563, 2001. [20] F. Barbe and R. Quey. A numerical modelling of 3d polycrystal-topolycrystal diffusive phase transformations involving crystal plasticity. International Journal of Plasticity, 27(6):823–840, 2011. BIBLIOGRAPHY 173 [21] G. I. Barenblatt. The formation of equilibrium cracks during brittle fracture. general ideas and hypotheses. axially-symmetric cracks. Journal of Applied Mathematics and Mechanics, 23(3):622–636, 1959. [22] G. I. Barenblatt. The mathematical theory of equilibrium cracks in brittle fracture. Advances in applied mechanics, 7:55–129, 1962. [23] D. Barnett. The precise evaluation of derivatives of the anisotropic elastic green’s functions. Physica status solidi (b), 49(2):741–748, 1972. [24] J. L. Bassani and T.-Y. Wu. Latent hardening in single crystals ii. analytical characterization and predictions. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 435(1893):21– 41, 1991. [25] M. Bebendorf. Hierarchical matrices. Springer, 2008. [26] A. Benallal, C. A. Fudoli, and W. S. Venturini. An implicit bem formulation for gradient plasticity and localization phenomena. International Journal for Numerical Methods in Engineering, 53(8):1853–1869, 2002. [27] I. Benedetti and M. Aliabadi. A fast hierarchical dual boundary element method for three-dimensional elastodynamic crack problems. International journal for numerical methods in engineering, 84(9):1038–1067, 2010. [28] I. Benedetti and M. Aliabadi. A three-dimensional cohesive-frictional grain-boundary micromechanical model for intergranular degradation and failure in polycrystalline materials. Computer Methods in Applied Mechanics and Engineering, 265:36–62, 2013. [29] I. Benedetti and M. Aliabadi. A three-dimensional grain boundary formulation for microstructural modeling of polycrystalline materials. Computational Materials Science, 67:249–260, 2013. [30] I. Benedetti and M. Aliabadi. Multiscale modeling of polycrystalline materials: A boundary element approach to material degradation and fracture. Computer Methods in Applied Mechanics and Engineering, 289:429–453, 2015. [31] I. Benedetti, M. Aliabadi, and G. Davi. A fast 3d dual boundary element method based on hierarchical matrices. International journal of solids and structures, 45(7):2355–2376, 2008. 174 BIBLIOGRAPHY [32] I. Benedetti and V. Gulizzi. A novel numerical formulation for crystal plasticity. In Key Engineering Materials, volume 713, pages 317–320. Trans Tech Publications, 2016. [33] I. Benedetti, V. Gulizzi, and V. Mallardo. A grain boundary formulation for crystal plasticity. International Journal of Plasticity, 83:202–224, 2016. [34] I. Benedetti, A. Milazzo, and M. Aliabadi. A fast dual boundary element method for 3d anisotropic crack problems. International journal for numerical methods in engineering, 80(10):1356–1378, 2009. [35] J. G. Berryman. Bounds and self-consistent estimates for elastic constants of random polycrystals with hexagonal, trigonal, and tetragonal symmetries. Journal of the Mechanics and Physics of Solids, 53(10):2141– 2173, 2005. [36] M. Berveiller and A. Zaoui. An extension of the self-consistent scheme to plastically-flowing polycrystals. Journal of the Mechanics and Physics of Solids, 26(5):325–344, 1978. [37] M. B. Bettaieb, O. Débordes, A. Dogui, L. Duchêne, and C. Keller. On the numerical integration of rate independent single crystal behavior at large strain. International Journal of Plasticity, 32:184–217, 2012. [38] T. Böhlke, K. Jöchen, O. Kraft, D. Löhe, and V. Schulze. Elastic properties of polycrystalline microcomponents. Mechanics of Materials, 42(1):11–23, 2010. [39] M. Bonnet and S. Mukherjee. Implicit bem formulations for usual and sensitivity problems in elasto-plasticity using the consistent tangent operator concept. International Journal of Solids and Structures, 33(30):4461– 4480, 1996. [40] M. J. Borden, C. V. Verhoosel, M. A. Scott, T. J. Hughes, and C. M. Landis. A phase-field description of dynamic brittle fracture. Computer Methods in Applied Mechanics and Engineering, 217:77–95, 2012. [41] C. A. Brebbia, J. C. F. Telles, and L. Wrobel. Boundary element techniques: theory and applications in engineering. Springer Science & Business Media, 2012. BIBLIOGRAPHY 175 [42] F. C. Buroni and M. Denda. Radon–stroh formalism for 3d theory of anisotropic elasticity. In Advances in Boundary Element Techniques, pages 295–300. EC, Ltd, UK, 2014. [43] F. C. Buroni and A. Sáez. Three-dimensional green’s function and its derivative for materials with general anisotropic magneto-electroelastic coupling. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 466(2114):515–537, 2010. [44] G. T. Camacho and M. Ortiz. Computational modelling of impact damage in brittle materials. International Journal of solids and structures, 33(20):2899–2938, 1996. [45] N. Chandra, H. Li, C. Shet, and H. Ghonem. Some issues in the application of cohesive zone models for metal–ceramic interfaces. International Journal of Solids and Structures, 39(10):2827–2855, 2002. [46] H. Chen, Y. Jiao, and Y. Liu. Investigating the microstructural effect on elastic and fracture behavior of polycrystals using a nonlocal lattice particle model. Materials Science and Engineering: A, 631:173–180, 2015. [47] A. Cisilino, M. Aliabadi, and J. Otegui. A three-dimensional boundary element formulation for the elastoplastic analysis of cracked bodies. International journal for numerical methods in engineering, 42(2):237–256, 1998. [48] J. Clayton and J. Knap. Phase field modeling of directional fracture in anisotropic polycrystals. Computational Materials Science, 98:158–169, 2015. [49] J. Clayton and J. Knap. Phase field modeling and simulation of coupled fracture and twinning in single crystals and polycrystals. Computer Methods in Applied Mechanics and Engineering, 2016. [50] M. A. Crisfield. A fast incremental/iterative solution procedure that handles snap-through. Computers & Structures, 13(1-3):55–62, 1981. [51] A. Crocker, P. Flewitt, and G. Smith. Computational modelling of fracture in polycrystalline materials. International materials reviews, 50(2):99– 125, 2005. 176 BIBLIOGRAPHY [52] A. M. Cuitino and M. Ortiz. Computational modelling of single crystals. Modelling and Simulation in Materials Science and Engineering, 1(3):225, 1993. [53] S. Das, A. Shterenlikht, I. C. Howard, and E. J. Palmiere. A general method for coupling microstructural response with structural performance. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 462(2071):2085–2096, 2006. [54] P. R. Dawson. Computational crystal plasticity. International Journal of Solids and Structures, 37(1):115–130, 2000. [55] P. Dederichs and G. Leibfried. Elastic green’s function for anisotropic cubic crystals. Physical Review, 188(3):1175, 1969. [56] Q. Deng, C. G. Li, S. L. Wang, H. Tang, and H. Zheng. A new method to the treatment of corners in the bem. Engineering Analysis with Boundary Elements, 37(1):182–186, 2013. [57] B. Devincre, L. Kubin, and T. Hoc. Physical analyses of crystal plasticity by dd simulations. Scripta Materialia, 54(5):741–746, 2006. [58] D. di Caprio, J. Stafiej, G. Luciano, and L. Arurault. 3d cellular automata simulations of intra and intergranular corrosion. Corrosion Science, 112:438–450, 2016. [59] O. Diard, S. Leclercq, G. Rousselier, and G. Cailletaud. Evaluation of finite element based analysis of 3d multicrystalline aggregates plasticity: Application to crystal plasticity model identification and the study of stress and strain fields near grain boundaries. International Journal of Plasticity, 21(4):691–722, 2005. [60] H. Ding, Y. He, L. Liu, and W. Ding. Cellular automata simulation of grain growth in three dimensions based on the lowest-energy principle. Journal of Crystal Growth, 293(2):489–497, 2006. [61] H. Ding, A. Jiang, P. Hou, and W. Chen. Green’s functions for twophase transversely isotropic magneto-electro-elastic media. Engineering Analysis with Boundary Elements, 29(6):551–561, 2005. [62] K. Döbrich, C. Rau, and C. Krill III. Quantitative characterization of the three-dimensional microstructure of polycrystalline al-sn using x-ray BIBLIOGRAPHY 177 microtomography. Metallurgical and Materials Transactions A, 35(7):1953– 1961, 2004. [63] M. L. Dunn. Electroelastic green’s functions for transversely isotropic piezoelectric media and their application to the solution of inclusion and inhomogeneity problems. International Journal of Engineering Science, 32(1):119–131, 1994. [64] M. L. Dunn and H. Wienecke. Green’s functions for transversely isotropic piezoelectric solids. International Journal of Solids and Structures, 33(30):4571–4581, 1996. [65] H. D. Espinosa and P. D. Zavattieri. A grain level model for the study of failure initiation and evolution in polycrystalline brittle materials. part i: Theory and numerical implementation. Mechanics of Materials, 35(3):333–364, 2003. [66] H. D. Espinosa and P. D. Zavattieri. A grain level model for the study of failure initiation and evolution in polycrystalline brittle materials. part ii: numerical examples. Mechanics of Materials, 35(3):365–394, 2003. [67] Z. Fan, Y. Wu, X. Zhao, and Y. Lu. Simulation of polycrystalline structure with voronoi diagram in laguerre geometry based on random closed packing of spheres. Computational materials science, 29(3):301–308, 2004. [68] C. Farhat. Implicit parallel processing in structural mechanics. Compt. Mech. Adv., 2:1–124, 1994. [69] I. Fredholm. Sur les équations de léquilibre dun corps solide élastique. Acta Mathematica, 23(1):1–42, 1900. [70] F. Fritzen, T. Böhlke, and E. Schnack. Periodic three-dimensional mesh generation for crystalline aggregates based on voronoi tessellations. Computational Mechanics, 43(5):701–713, 2009. [71] C. Gandhi and M. Ashby. Overview no. 5: Fracture-mechanism maps for materials which cleave: Fcc, bcc and hcp metals and ceramics. Acta Metallurgica, 27(10):1565–1602, 1979. [72] X.-W. Gao and T. G. Davies. An effective boundary element algorithm for 2d and 3d elastoplastic problems. International Journal of Solids and Structures, 37(36):4987–5008, 2000. 178 BIBLIOGRAPHY [73] C. Gérard, G. Cailletaud, and B. Bacroix. Modeling of latent hardening produced by complex loading paths in fcc alloys. International Journal of Plasticity, 42:194–212, 2013. [74] C. Geuzaine and J.-F. Remacle. Gmsh: A 3-d finite element mesh generator with built-in pre-and post-processing facilities. International Journal for Numerical Methods in Engineering, 79(11):1309–1331, 2009. [75] M. Ghajari, L. Iannucci, and P. Curtis. A peridynamic material model for the analysis of dynamic crack propagation in orthotropic media. Computer Methods in Applied Mechanics and Engineering, 276:431–452, 2014. [76] L. Gray and E. Lutz. On the treatment of corners in the boundary element method. Journal of Computational and Applied Mathematics, 32(3):369–386, 1990. [77] M. Groeber, S. Ghosh, M. D. Uchic, and D. M. Dimiduk. A framework for automated analysis and simulation of 3d polycrystalline microstructures.: Part 1: Statistical characterization. Acta Materialia, 56(6):1257– 1273, 2008. [78] M. Groeber, B. Haley, M. Uchic, D. Dimiduk, and S. Ghosh. 3d reconstruction and characterization of polycrystalline microstructures using a fib–sem system. Materials Characterization, 57(4):259–273, 2006. [79] V. Gulizzi and I. Benedetti. Micro-cracking of brittle polycrystalline materials with initial damage. European Journal of Computational Mechanics, 25(1-2):38–53, 2016. [80] V. Gulizzi, A. Milazzo, and I. Benedetti. An enhanced grain-boundary framework for computational homogenization and micro-cracking simulations of polycrystalline materials. Computational Mechanics, 56(4):631–651, 2015. [81] V. Gulizzi, A. Milazzo, and I. Benedetti. Fundamental solutions for general anisotropic multi-field materials based on spherical harmonics expansions. International Journal of Solids and Structures, 100:169–186, 2016. [82] V. Gulizzi, A. Milazzo, and I. Benedetti. A micro-mechanical model for grain-boundary cavitation in polycrystalline materials. In Key Engineering Materials, volume 665, pages 65–68. Trans Tech Publications, 2016. BIBLIOGRAPHY 179 [83] T.-S. Han and P. R. Dawson. A two-scale deformation model for polycrystalline solids using a strongly-coupled finite element methodology. Computer methods in applied mechanics and engineering, 196(13):2029–2043, 2007. [84] S. Harren, T. C. Lowe, R. Asaro, and A. Needleman. Analysis of largestrain shear in rate-dependent face-centred cubic polycrystals: correlation of micro-and macromechanics. Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 328(1600):443–500, 1989. [85] Z. Hashin. Analysis of Composite Materials - A survey. ASME Journal of Applied Mechanics, 50:481–505, 1983. [86] Z. Hashin and S. Shtrikman. On some variational principles in anisotropic and nonhomogeneous elasticity. Journal of the Mechanics and Physics of Solids, 10(4):335–342, 1962. [87] Z. Hashin and S. Shtrikman. A variational approach to the theory of the elastic behaviour of polycrystals. Journal of the Mechanics and Physics of Solids, 10(4):343–352, 1962. [88] E. Heripre, M. Dexet, J. Crepin, L. Gélebart, A. Roos, M. Bornert, and D. Caldemaison. Coupling between experimental measurements and polycrystal finite element calculations for micromechanical study of metallic materials. International Journal of Plasticity, 23(9):1512–1539, 2007. [89] R. Hill. Generalized constitutive relations for incremental deformation of metal crystals by multislip. Journal of the Mechanics and Physics of Solids, 14(2):95–102, 1966. [90] R. Hill and J. Rice. Constitutive analysis of elastic-plastic crystals at arbitrary strain. Journal of the Mechanics and Physics of Solids, 20(6):401– 413, 1972. [91] A. Hlilou, I. B. Naceur, K. Sai, C. Gérard, S. Forest, and G. Cailletaud. Generalization of the polycrystalline β-model: Finite element assessment and application to softening material behavior. Computational Materials Science, 45(4):1104–1112, 2009. 180 BIBLIOGRAPHY [92] P.-F. Hou, H.-J. Ding, and J.-Y. Chen. Green’s functions for transversely isotropic magnetoelectroelastic media. International Journal of Engineering Science, 43(10):826–858, 2005. [93] Y. Huang. A User-material Subroutine Incroporating Single Crystal Plasticity in the ABAQUS Finite Element Program. Harvard Univ., 1991. [94] G. Hughes, G. Smith, A. Crocker, and P. Flewitt. An examination of the linkage of cleavage cracks at grain boundaries. Materials science and technology, 21(11):1268–1274, 2005. [95] G. M. Hughes, G. E. Smith, P. E. Flewitt, and A. Crocker. The brittle fracture of polycrystalline zinc. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 463(2085):2129–2151, 2007. [96] S. Ii, C. Iwamoto, K. Matsunaga, T. Yamamoto, and Y. Ikuhara. Tem in situ observation of fracture behavior in ceramic materials. Applied surface science, 241(1):68–74, 2005. [97] N. Jia, R. L. Peng, Y. Wang, S. Johansson, and P. Liaw. Micromechanical behavior and texture evolution of duplex stainless steel studied by neutron diffraction and self-consistent modeling. Acta Materialia, 56(4):782– 793, 2008. [98] M. Joo, D.-W. Suh, J. Bae, and H. Bhadeshia. Role of delamination and crystallography on anisotropy of charpy toughness in api-x80 steel. Materials Science and Engineering: A, 546:314–322, 2012. [99] S. R. Kalidindi, C. A. Bronkhorst, and L. Anand. Crystallographic texture evolution in bulk deformation processing of fcc metals. Journal of the Mechanics and Physics of Solids, 40(3):537–569, 1992. [100] M. Kamaya and M. Itakura. Simulation for intergranular stress corrosion cracking based on a three-dimensional polycrystalline model. Engineering Fracture Mechanics, 76(3):386–401, 2009. [101] M. Kamaya, Y. Kawamura, and T. Kitamura. Three-dimensional local stress analysis on grain boundaries in polycrystalline material. International Journal of Solids and Structures, 44(10):3267–3277, 2007. BIBLIOGRAPHY 181 [102] T. Kanit, S. Forest, I. Galliet, V. Mounoury, and D. Jeulin. Determination of the size of the representative volume element for random composites: statistical and numerical approach. International Journal of solids and structures, 40(13):3647–3679, 2003. [103] J.-B. Kim and J. W. Yoon. Necking behavior of aa 6022-t4 based on the crystal plasticity and damage models. International Journal of Plasticity, 73:3–23, 2015. [104] A. King, G. Johnson, D. Engelberg, W. Ludwig, and J. Marrow. Observations of intergranular stress corrosion cracking in a grain-mapped polycrystal. Science, 321(5887):382–385, 2008. [105] M. Kovač and L. Cizelj. Modeling elasto-plastic behavior of polycrystalline grain structure of steels at mesoscopic level. Nuclear engineering and design, 235(17):1939–1950, 2005. [106] K. Kozaczek, B. Petrovic, C. Ruud, S. Kurtz, and A. McIlree. Microstructural modelling of grain-boundary stresses in alloy 600. Journal of materials science, 30(9):2390–2400, 1995. [107] R. Kraft and J. Molinari. A statistical investigation of the effects of grain boundary properties on transgranular fracture. Acta Materialia, 56(17):4739–4749, 2008. [108] C. Krill Iii and L.-Q. Chen. Computer simulation of 3-d grain growth using a phase-field model. Acta materialia, 50(12):3059–3075, 2002. [109] S. Kumar and W. A. Curtin. Crack interaction with microstructure. Materials today, 10(9):34–44, 2007. [110] S. Kumar, S. Kurtz, and V. Agarwala. Micro-stress distribution within polycrystalline aggregate. Acta mechanica, 114(1-4):203–216, 1996. [111] S. Kumar and S. K. Kurtz. Simulation of material microstructure using a 3d voronoi tesselation: Calculation of effective thermal expansion coefficient of polycrystalline materials. Acta metallurgica et materialia, 42(12):3917–3927, 1994. [112] S. Kumar, S. K. Kurtz, J. R. Banavar, and M. Sharma. Properties of a three-dimensional poisson-voronoi tesselation: A monte carlo study. Journal of Statistical Physics, 67(3-4):523–551, 1992. 182 BIBLIOGRAPHY [113] H. Kuramae, Y. Ikeya, H. Sakamoto, H. Morimoto, and E. Nakamachi. Multi-scale parallel finite element analyses of ldh sheet formability tests based on crystallographic homogenization method. International Journal of Mechanical Sciences, 52(2):183–197, 2010. [114] A. Kuzmin, M. Luisier, and O. Schenk. Fast methods for computing selected elements of the greens function in massively parallel nanoelectronic device simulations. In F. Wolf, B. Mohr, and D. Mey, editors, Euro-Par 2013 Parallel Processing, volume 8097 of Lecture Notes in Computer Science, pages 533–544. Springer Berlin Heidelberg, 2013. [115] H. Lamari, A. Ammar, P. Cartraud, G. Legrain, F. Chinesta, and F. Jacquemin. Routes for efficient computational homogenization of nonlinear materials using the proper generalized decompositions. Archives of Computational methods in Engineering, 17(4):373–391, 2010. [116] C. Lautensack. Fitting three-dimensional laguerre tessellations to foam structures. Journal of Applied Statistics, 35(9):985–995, 2008. [117] R. A. Lebensohn, A. K. Kanjarla, and P. Eisenlohr. An elasto-viscoplastic formulation based on fast fourier transforms for the prediction of micromechanical fields in polycrystalline materials. International Journal of Plasticity, 32:59–69, 2012. [118] V.-G. Lee. Explicit expression of derivatives of elastic green’s functions for general anisotropic materials. Mechanics Research Communications, 30(3):241–249, 2003. [119] V.-G. Lee. Derivatives of the three-dimensional green’s function for anisotropic materials. International Journal of Solids and Structures, 46(18):3471–3479, 2009. [120] I. Lifshitz and L. Rozentsveig. On the construction of the green’s tensor for the basic equation of the theory of elasticity of an anisotropic infinite medium. Zh. Eksp. Teor. Fiz., 17(9):783–791, 1947. [121] H. Lim, J. Carroll, C. Battaile, T. Buchheit, B. Boyce, and C. Weinberger. Grain-scale experimental validation of crystal plasticity finite element simulations of tantalum oligocrystals. International Journal of Plasticity, 60:1–18, 2014. BIBLIOGRAPHY 183 [122] H. Lim, C. R. Weinberger, C. C. Battaile, and T. E. Buchheit. Application of generalized non-schmid yield law to low-temperature plasticity in bcc transition metals. Modelling and Simulation in Materials Science and Engineering, 21(4):045015, 2013. [123] L. Lin, X. Wang, and X. Zeng. The role of cohesive zone properties on intergranular to transgranular fracture transition in polycrystalline solids. International Journal of Damage Mechanics, page 1056789515618732, 2015. [124] X. Ling, M. Horstemeyer, and G. Potirniche. On the numerical implementation of 3d rate-dependent single crystal plasticity formulations. International Journal for Numerical Methods in Engineering, 63(4):548–568, 2005. [125] Y. Liu. Fast multipole boundary element method: theory and applications in engineering. Cambridge university press, 2009. [126] W. Ludwig, A. King, P. Reischig, M. Herbig, E. M. Lauridsen, S. Schmidt, H. Proudhon, S. Forest, P. Cloetens, S. R. Du Roscoat, et al. New opportunities for 3d materials science of polycrystalline materials at the micrometre lengthscale by combined use of x-ray diffraction and x-ray imaging. Materials Science and Engineering: A, 524(1):69–76, 2009. [127] E. Lutz, W. Ye, and S. Mukherjee. Elimination of rigid body modes from discretized boundary integral equations. International Journal of Solids and Structures, 35(33):4427–4436, 1998. [128] S. Maiti, K. Rangaswamy, and P. H. Geubelle. Mesoscale analysis of dynamic fragmentation of ceramics under tension. Acta Materialia, 53(3):823–834, 2005. [129] K. Malen. A unified six-dimensional treatment of elastic green’s functions and dislocations. physica status solidi (b), 44(2):661–672, 1971. [130] V. Mallardo. Integral equations and nonlocal damage theory: a numerical implementation using the bdem. International journal of fracture, 157(1-2):13–32, 2009. [131] V. Mallardo and C. Alessandri. Arc-length procedures with bem in physically nonlinear problems. Engineering Analysis with Boundary Elements, 28(6):547 – 559, 2004. 184 BIBLIOGRAPHY [132] J. Mandel. Généralisation de la théorie de plasticité de wt koiter. International Journal of Solids and structures, 1(3):273–295, 1965. [133] C. McMahon. Hydrogen-induced intergranular fracture of steels. Engineering Fracture Mechanics, 68(6):773–788, 2001. [134] L. Méric and G. Cailletaud. Single crystal modeling for structural calculations: Part 2finite element implementation. Journal of Engineering Materials and Technology, 113(1):171–182, 1991. [135] C. Miehe and J. Schröder. A comparative study of stress update algorithms for rate-independent and rate-dependent crystal plasticity. International Journal for Numerical Methods in Engineering, 50(2):273–298, 2001. [136] C. Miehe, J. Schröder, and J. Schotte. Computational homogenization analysis in finite plasticity simulation of texture development in polycrystalline materials. Computer methods in applied mechanics and engineering, 171(3):387–418, 1999. [137] C. Miehe, F. Welschinger, and M. Hofacker. Thermodynamically consistent phase-field models of fracture: Variational principles and multifield fe implementations. International Journal for Numerical Methods in Engineering, 83(10):1273–1311, 2010. [138] A. Milazzo, I. Benedetti, and M. Aliabadi. Hierarchical fast bem for anisotropic time-harmonic 3-d elastodynamics. Computers & Structures, 96:9–24, 2012. [139] G. Mori, D. Scherer, S. Schwentenwein, and P. Warbichler. Intergranular stress corrosion cracking of copper in nitrite solutions. Corrosion science, 47(9):2099–2124, 2005. [140] S. M. T. Mousavi, B. Hosseinkhani, C. Vieillard, M. Chambart, P. J. J. Kok, and J.-F. Molinari. On the influence of transgranular and intergranular failure mechanisms during dynamic loading of silicon nitride. Acta Materialia, 67:239–251, 2014. [141] S. T. Mousavi, N. Richart, C. Wolff, and J.-F. Molinari. Dynamic crack propagation in a heterogeneous ceramic microstructure, insights from a cohesive model. Acta Materialia, 88:136–146, 2015. BIBLIOGRAPHY 185 [142] M. Muñoz-Reja, F. Buroni, A. Sáez, and F. Garcı́a-Sánchez. 3d explicitbem fracture analysis for materials with anisotropic multifield coupling. Applied Mathematical Modelling, 40(4):2897–2912, 2016. [143] T. Mura. Micromechanics of defects in solids. Springer Science & Business Media, 2013. [144] T. Mura and N. Kinoshita. Green’s functions for anisotropic elasticity. physica status solidi (b), 47(2):607–618, 1971. [145] A. Musienko and G. Cailletaud. Simulation of inter-and transgranular crack propagation in polycrystalline aggregates due to stress corrosion cracking. Acta materialia, 57(13):3840–3855, 2009. [146] A. Musienko, A. Tatschl, K. Schmidegg, O. Kolednik, R. Pippan, and G. Cailletaud. Three-dimensional finite element simulation of a polycrystalline copper specimen. Acta materialia, 55(12):4121–4136, 2007. [147] E. Nakamachi, N. Tam, and H. Morimoto. Multi-scale finite element analyses of sheet metals by using sem-ebsd measured crystallographic rve models. International Journal of Plasticity, 23(3):450–489, 2007. [148] G. Nakamura and K. Tanuma. A formula for the fundamental solution of anisotropic elasticity. The Quarterly Journal of Mechanics and Applied Mathematics, 50(2):179–194, 1997. [149] C.-W. Nan, M. Bichurin, S. Dong, D. Viehland, and G. Srinivasan. Multiferroic magnetoelectric composites: historical perspective, status, and future directions. Journal of Applied Physics, 103(3):031101, 2008. [150] A. Needleman. Computational mechanics at the mesoscale. Acta Materialia, 48(1):105–124, 2000. [151] S. Nemat-Nasser and M. Hori. Micromechanics: overall properties of heterogeneous materials, volume 37. Elsevier, 2013. [152] V. P. Nguyen, M. Stroeven, and L. J. Sluys. Multiscale continuous and discontinuous modeling of heterogeneous materials: a review on recent developments. Journal of Multiscale Modelling, 3(04):229–270, 2011. [153] M. Nygårds. Number of grains necessary to homogenize elastic materials with cubic symmetry. Mechanics of Materials, 35(11):1049–1057, 2003. 186 BIBLIOGRAPHY [154] M. Nygårds and P. Gudmundson. Three-dimensional periodic voronoi grain models and micromechanical fe-simulations of a two-phase steel. Computational Materials Science, 24(4):513–519, 2002. [155] M. Ortiz and A. Pandolfi. Finite-deformation irreversible cohesive elements for three-dimensional crack-propagation analysis. International Journal for Numerical Methods in Engineering, 44(9):1267–1282, 1999. [156] E. Pan. Three-dimensional green’s functions in anisotropic magnetoelectro-elastic bimaterials. Zeitschrift für angewandte Mathematik und Physik ZAMP, 53(5):815–838, 2002. [157] E. Pan and W. Chen. Static Green’s Functions in Anisotropic Media. Cambridge University Press, 2015. [158] E. Pan and F. Tonon. Three-dimensional greens functions in anisotropic piezoelectric solids. International Journal of Solids and Structures, 37(6):943–958, 2000. [159] D. Peirce, R. Asaro, and A. Needleman. An analysis of nonuniform and localized deformation in ductile single crystals. Acta metallurgica, 30(6):1087–1119, 1982. [160] D. Peirce, R. J. Asaro, and A. Needleman. Material rate dependence and localized deformation in crystalline solids. Acta metallurgica, 31(12):1951–1976, 1983. [161] M. Peng, Y. Zhang, Y. Liu, M. Song, J. Zhai, and Z. L. Wang. Magneticmechanical-electrical-optical coupling effects in gan-based led/rareearth terfenol-d structures. Advanced Materials, 26(39):6767–6772, 2014. [162] P.-O. Persson and G. Strang. A simple mesh generator in matlab. SIAM review, 46(2):329–345, 2004. [163] A.-V. Phan, L. Gray, and T. Kaplan. On the residue calculus evaluation of the 3-d anisotropic elastic green’s function. Communications in numerical methods in engineering, 20(5):335–341, 2004. [164] A.-V. Phan, L. Gray, and T. Kaplan. Residue approach for evaluating the 3d anisotropic elastic green’s function: multiple roots. Engineering analysis with boundary elements, 29(6):570–576, 2005. BIBLIOGRAPHY 187 [165] C. Pinna, Y. Lan, M. Kiu, P. Efthymiadis, M. Lopez-Pedrosa, and D. Farrugia. Assessment of crystal plasticity finite element simulations of the hot deformation of metals from local strain and orientation measurements. International Journal of Plasticity, 73:24–38, 2015. [166] C. Prakash, H. Lee, M. Alucozai, and V. Tomar. An analysis of the influence of grain boundary strength on microstructure dependent fracture in polycrystalline tungsten. International Journal of Fracture, 199(1):1–20, 2016. [167] R. Quey, P. Dawson, and F. Barbe. Large-scale 3d random polycrystals for the finite element method: Generation, meshing and remeshing. Computer Methods in Applied Mechanics and Engineering, 200(17):1729– 1745, 2011. [168] S. Quilici and G. Cailletaud. Fe simulation of macro-, meso-and micro-scales in polycrystalline plasticity. Computational materials science, 16(1):383–390, 1999. [169] V. Raja and T. Shoji. Stress corrosion cracking: theory and practice. Elsevier, 2011. [170] S. I. Ranganathan and M. Ostoja-Starzewski. Scaling function, anisotropy and the size of rve in elastic random polycrystals. Journal of the Mechanics and Physics of Solids, 56(9):2773–2791, 2008. [171] Z.-Y. Ren and Q.-S. Zheng. A quantitative study of minimum sizes of representative volume elements of cubic polycrystalsnumerical experiments. Journal of the Mechanics and Physics of Solids, 50(4):881–893, 2002. [172] Z.-Y. Ren and Q.-S. Zheng. Effects of grain sizes, shapes, and distribution on minimum sizes of representative volume elements of cubic polycrystals. Mechanics of Materials, 36(12):1217–1229, 2004. [173] J. R. Rice. Mathematical analysis in the mechanics of fracture. Fracture: an advanced treatise, 2:191–311, 1968. [174] J. R. Rice. Inelastic constitutive relations for solids: an internal-variable theory and its application to metal plasticity. Journal of the Mechanics and Physics of Solids, 19(6):433–455, 1971. 188 BIBLIOGRAPHY [175] J. Riedle, P. Gumbsch, and H. F. Fischmeister. Cleavage anisotropy in tungsten single crystals. Physical review letters, 76(19):3594, 1996. [176] H. Ritz and P. Dawson. Sensitivity to grain discretization of the simulated crystal stress distributions in fcc polycrystals. Modelling and Simulation in Materials Science and Engineering, 17(1):015001, 2008. [177] C. Robert and C. Mareau. A comparison between different numerical methods for the modeling of polycrystalline materials with an elastic– viscoplastic behavior. Computational Materials Science, 103:134–144, 2015. [178] F. Roters, P. Eisenlohr, L. Hantcherli, D. D. Tjahjanto, T. R. Bieler, and D. Raabe. Overview of constitutive laws, kinematics, homogenization and multiscale methods in crystal plasticity finite-element modeling: Theory, experiments, applications. Acta Materialia, 58(4):1152–1211, 2010. [179] D. Rowenhorst, A. Lewis, and G. Spanos. Three-dimensional analysis of grain topology and interface curvature in a β-titanium alloy. Acta Materialia, 58(16):5511–5519, 2010. [180] C. H. Rycroft. Voro++: A three-dimensional Voronoi cell library in C++. Chaos, 19:041111, 2009. [181] M. A. Sales and L. Gray. Evaluation of the anisotropic green’s function and its derivatives. Computers & structures, 69(2):247–254, 1998. [182] G. Sarma and B. Radhakrishnan. Modeling microstructural effects on the evolution of cube texture during hot deformation of aluminum. Materials Science and Engineering: A, 385(1):91–104, 2004. [183] G. Sarma, B. Radhakrishnan, and T. Zacharia. Finite element simulations of cold deformation at the mesoscale. Computational Materials Science, 12(2):105–123, 1998. [184] N. Schclar. Anisotropic analysis using boundary elements, volume 20. Computational mechanics, 1994. [185] O. Schenk, M. Bollhöfer, and R. A. Römer. On large-scale diagonalization techniques for the anderson model of localization. SIAM Rev., 50(1):91–112, Feb. 2008. BIBLIOGRAPHY 189 [186] O. Schenk, A. Wchter, and M. Hagemann. Matching-based preprocessing algorithms to the solution of saddle-point problems in large-scale nonconvex interior-point optimization. Computational Optimization and Applications, 36(2-3):321–341, 2007. [187] Y. Schneider, A. Bertram, and T. Böhlke. Three-dimensional simulation of local and global behaviour of αfe-cu composites under large plastic deformation. Technische Mechanik, 33(1):34–51, 2013. [188] Y. Schneider, A. Bertram, T. Böhlke, and C. Hartig. Plastic deformation behaviour of fe–cu composites predicted by 3d finite element simulations. Computational Materials Science, 48(3):456–465, 2010. [189] J. Schöberl. Netgen an advancing front 2d/3d-mesh generator based on abstract rules. Computing and visualization in science, 1(1):41–52, 1997. [190] G. Sfantos and M. Aliabadi. A boundary cohesive grain element formulation for modelling intergranular microfracture in polycrystalline brittle materials. International journal for numerical methods in engineering, 69(8):1590–1626, 2007. [191] G. Sfantos and M. Aliabadi. Multi-scale boundary element modelling of material degradation and fracture. Computer Methods in Applied Mechanics and Engineering, 196(7):1310–1329, 2007. [192] P. Shanthraj, B. Svendsen, L. Sharma, F. Roters, and D. Raabe. Elastoviscoplastic phase field modelling of anisotropic cleavage fracture. Journal of the Mechanics and Physics of Solids, 2016. [193] C. Shet and N. Chandra. Analysis of energy balance when using cohesive zone models to simulate fracture processes. Journal of engineering materials and technology, 124(4):440–450, 2002. [194] J. R. Shewchuk. Triangle: Engineering a 2D Quality Mesh Generator and Delaunay Triangulator. In M. Lin and D. Manocha, editors, Applied Computational Geometry: Towards Geometric Engineering, volume 1148 of Lecture Notes in Computer Science, pages 203–222. Springer-Verlag, Berlin, 1996. (From the First ACM Workshop on Applied Computational Geometry.). 190 BIBLIOGRAPHY [195] Y. Shiah, C. Tan, and V. Lee. Evaluation of explicit-form fundamental solutions for displacements and stresses in 3d anisotropic elastic solids. CMES: Computer Modeling in Engineering & Sciences, 34(3):205–226, 2008. [196] Y. Shiah, C. Tan, and C. Wang. Efficient computation of the green’s function and its derivatives for three-dimensional anisotropic elasticity in bem analysis. Engineering Analysis with Boundary Elements, 36(12):1746– 1755, 2012. [197] A. Shterenlikht and L. Margetts. Three-dimensional cellular automata modelling of cleavage propagation across crystal boundaries in polycrystalline microstructures. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 471(2177):20150039, 2015. [198] H. Si. Tetgen, a delaunay-based quality tetrahedral mesh generator. ACM Transactions on Mathematical Software (TOMS), 41(2):11, 2015. [199] I. Simonovski and L. Cizelj. Automatic parallel generation of finite element meshes for complex spatial structures. Computational Materials Science, 50(5):1606–1618, 2011. [200] I. Simonovski and L. Cizelj. Computational multiscale modeling of intergranular cracking. Journal of Nuclear Materials, 414(2):243–250, 2011. [201] I. Simonovski and L. Cizelj. Towards modeling intergranular stress corrosion cracks on grain size scales. Nuclear Engineering and Design, 246:107–114, 2012. [202] I. Simonovski and L. Cizelj. Cohesive zone modeling of intergranular cracking in polycrystalline aggregates. Nuclear Engineering and Design, 283:139–147, 2015. [203] G. Smith, A. Crocker, R. Moskovic, and P. Flewitt. Models to describe brittle and ductile fracture in ferritic steels. Philosophical Magazine A, 82(17-18):3443–3453, 2002. [204] A. K. Soh, J.-x. Liu, and K. H. Hoon. Three-dimensional green’s functions for transversely isotropic magnetoelectroelastic solids. International Journal of Nonlinear Sciences and Numerical Simulation, 4(2):139–148, 2003. BIBLIOGRAPHY 191 [205] A. Standard. E112: Standard test methods for determining average grain size. West Conshocken, 1996. [206] I. Steinbach. Phase-field models in materials science. Modelling and Simulation in Materials Science and Engineering, 17(7):073001, 2009. [207] N. Sukumar, D. Srolovitz, T. Baker, and J.-H. Prévost. Brittle fracture in polycrystalline microstructures with the extended finite element method. International Journal for Numerical Methods in Engineering, 56(14):2015–2037, 2003. [208] J. L. Synge. The hypercircle in mathematical physics. University Press Cambridge, 1957. [209] C. Tan, Y. Shiah, and C. Wang. Boundary element elastic stress analysis of 3d generally anisotropic solids using fundamental solutions based on fourier series. International Journal of Solids and Structures, 50(16):2701– 2711, 2013. [210] G. Taylor and C. Elam. The plastic extension and fracture of aluminium crystals. Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character, 108(745):28–51, 1925. [211] G. I. Taylor and C. F. Elam. Bakerian lecture. the distortion of an aluminium crystal during a tensile test. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 102(719):643– 667, 1923. [212] G. I. Taylor and H. Quinney. The plastic distortion of metals. Philosophical Transactions of the Royal Society of London. Series A, Containing Papers of a Mathematical or Physical Character, 230:323–362, 1932. [213] J. Telles and C. Brebbia. The boundary element method in plasticity. Applied Mathematical Modelling, 5(4):275–281, 1981. [214] K. Terada, M. Hori, T. Kyoya, and N. Kikuchi. Simulation of the multiscale convergence in computational homogenization approaches. International Journal of Solids and Structures, 37(16):2285–2311, 2000. [215] T. Ting and V.-G. Lee. The three-dimensional elastostatic green’s function for general anisotropic linear elastic solids. The Quarterly Journal of Mechanics and Applied Mathematics, 50(3):407–426, 1997. 192 BIBLIOGRAPHY [216] V. Tomar, J. Zhai, and M. Zhou. Bounds for element size in a variable stiffness cohesive finite element model. International journal for numerical methods in engineering, 61(11):1894–1920, 2004. [217] V. Tvergaard. Effect of fibre debonding in a whisker-reinforced metal. Materials science and engineering: A, 125(2):203–213, 1990. [218] C. Verhoosel and M. Gutiérrez. Modelling inter-and transgranular fracture in piezoelectric polycrystals. Engineering Fracture Mechanics, 76(6):742–760, 2009. [219] G. Voronoı̈. Nouvelles applications des paramètres continus à la théorie des formes quadratiques. deuxième mémoire. recherches sur les parallélloèdres primitifs. Journal für die reine und angewandte Mathematik, 134:198–287, 1908. [220] C. Wang. Elastic fields produced by a point source in solids of general anisotropy. Journal of Engineering Mathematics, 32(1):41–52, 1997. [221] D. Wang, J. Zhao, Y. Zhou, X. Chen, A. Li, and Z. Gong. Extended finite element modeling of crack propagation in ceramic tool materials by considering the microstructural features. Computational Materials Science, 77:236–244, 2013. [222] H. Wang, P. Wu, J. Wang, and C. Tomé. A crystal plasticity model for hexagonal close packed (hcp) crystals including twinning and detwinning mechanisms. International Journal of Plasticity, 49:36–52, 2013. [223] X. Wang and Y.-p. Shen. The general solution of three-dimensional problems in magnetoelectroelastic media. International Journal of Engineering Science, 40(10):1069–1080, 2002. [224] T. Watanabe and S. Tsurekawa. The control of brittleness and development of desirable mechanical properties in polycrystalline systems by grain boundary engineering. Acta Materialia, 47(15):4171–4185, 1999. [225] Y. Wei and L. Anand. Grain-boundary sliding and separation in polycrystalline metals: application to nanocrystalline fcc metals. Journal of the Mechanics and Physics of Solids, 52(11):2587–2616, 2004. [226] R. O. Wells. Differential analysis on complex manifolds, volume 65. Springer Science & Business Media, 2007. BIBLIOGRAPHY 193 [227] R. Wilson and T. Cruse. Efficient implementation of anisotropic three dimensional boundary-integral equation stress analysis. International Journal for Numerical Methods in Engineering, 12(9):1383–1397, 1978. [228] L. C. Wrobel. The boundary element method, applications in thermo-fluids and acoustics, volume 1. John Wiley & Sons, 2002. [229] K.-C. Wu. Generalization of the stroh formalism to 3-dimensional anisotropic elasticity. Journal of elasticity, 51(3):213–225, 1998. [230] P. Wu, K. Neale, and E. Van der Giessen. Simulation of the behaviour of fcc polycrystals during reversed torsion. International Journal of Plasticity, 12(9):1199–1219, 1996. [231] T.-Y. Wu, J. L. Bassani, and C. Laird. Latent hardening in single crystals i. theory and experiments. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 435(1893):1–19, 1991. [232] L. Xie, C. Hwu, and C. Zhang. Advanced methods for calculating green’s function and its derivatives for three-dimensional anisotropic elastic solids. International Journal of Solids and Structures, 80:261–273, 2016. [233] L. Xie, C. Zhang, J. Sladek, and V. Sladek. Unified analytical expressions of the three-dimensional fundamental solutions and their derivatives for linear elastic anisotropic materials. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 472(2186):20150272, 2016. [234] X.-P. Xu and A. Needleman. Void nucleation by inclusion debonding in a crystal matrix. Modelling and Simulation in Materials Science and Engineering, 1(2):111, 1993. [235] J. Yvonnet and Q.-C. He. The reduced model multiscale method (r3m) for the non-linear homogenization of hyperelastic media at finite strains. Journal of Computational Physics, 223(1):341–368, 2007. [236] A. Zeghadi, S. Forest, A.-F. Gourgues, and O. Bouaziz. Ensemble averaging stress–strain fields in polycrystalline aggregates with a constrained surface microstructure–part 2: Crystal plasticity. Philosophical Magazine, 87(8-9):1425–1446, 2007. 194 BIBLIOGRAPHY [237] W. Zeng, J. Larsen, and G. Liu. Smoothing technique based crystal plasticity finite element modeling of crystalline materials. International Journal of Plasticity, 65:250–268, 2015. [238] J. Zhai, V. Tomar, and M. Zhou. Micromechanical simulation of dynamic fracture using the cohesive finite element method. Journal of engineering materials and technology, 126(2):179–191, 2004. [239] J. Zhai and M. Zhou. Finite element analysis of micromechanical failure modes in a heterogeneous ceramic material system. International Journal of fracture, 101(1-2):161–180, 2000. [240] C. Zhang, M. Enomoto, A. Suzuki, and T. Ishimaru. Characterization of three-dimensional grain structure in polycrystalline iron by serial sectioning. Metallurgical and Materials Transactions A, 35(7):1927–1933, 2004. [241] C. Zhang, H. Li, P. Eisenlohr, W. Liu, C. Boehlert, M. Crimp, and T. Bieler. Effect of realistic 3d microstructure in crystal plasticity finite element analysis of polycrystalline ti-5al-2.5 sn. International Journal of Plasticity, 69:21–35, 2015. [242] K. Zhang, B. Holmedal, O. S. Hopperstad, S. Dumoulin, J. Gawad, A. Van Bael, and P. Van Houtte. Multi-level modelling of mechanical anisotropy of commercial pure aluminium plate: crystal plasticity models, advanced yield functions and parameter identification. International Journal of Plasticity, 66:3–30, 2015. [243] Y. Zhao and R. Tryon. Automatic 3-d simulation and micro-stress distribution of polycrystalline metallic materials. Computer Methods in Applied Mechanics and Engineering, 193(36):3919–3934, 2004. [244] Z. Zhao, S. Kuchnicki, R. Radovitzky, and A. Cuitino. Influence of ingrain mesh resolution on the prediction of deformation textures in fcc polycrystals by crystal plasticity fem. Acta materialia, 55(7):2361–2373, 2007. [245] T. Zhou, C. Huang, H. Liu, J. Wang, B. Zou, and H. Zhu. Crack propagation simulation in microstructure of ceramic tool materials. Computational Materials Science, 54:150–156, 2012. [246] T. I. Zohdi and P. Wriggers. An introduction to computational micromechanics. Springer Science & Business Media, 2008.
5cs.CE
INsight: A Neuromorphic Computing System for Evaluation of Large Neural Networks Taehwan Shin Department of Electronic Engineering Incheon National University Incheon, Korea 406-772 arXiv:1508.01008v1 [cs.NE] 5 Aug 2015 Jaeyong Chung Department of Electronic Engineering Incheon National University Incheon, Korea 406-772 [email protected] Yongshin Kang Department of Electronic Engineering Incheon National University Incheon, Korea 406-772 Abstract Deep neural networks have been demonstrated impressive results in various cognitive tasks such as object detection and image classification. In order to execute large networks, Von Neumann computers store the large number of weight parameters in external memories, and processing elements are timed-shared, which leads to power-hungry I/O operations and processing bottlenecks. This paper describes a neuromorphic computing system that is designed from the ground up for the energy-efficient evaluation of large-scale neural networks. The computing system consists of a non-conventional compiler, a neuromorphic architecture, and a space-efficient microarchitecture that leverages existing integrated circuit design methodologies. The compiler factorizes a trained, feedforward network into a sparsely connected network, compresses the weights linearly, and generates a time delay neural network reducing the number of connections. The connections and units in the simplified network are mapped to silicon synapses and neurons. We demonstrate an implementation of the neuromorphic computing system based on a field-programmable gate array that performs the MNIST hand-written digit classification with 97.64% accuracy. 1 Introduction Large-scale neural networks such as deep convolutional neural networks have been shown state-ofthe-art results on various tasks in computer vision, automatic speech recognition, natural language processing, and audio recognition, and on certain tasks, their performance has become comparable to humans [1]. However, these networks contain a huge number of parameters (e.g., 108 [2]), and the evaluation of such models is computationally expensive. This makes it problematic to deploy these models to embedded platforms, where computing power, memory, storage, and energy are limited. It is also problematic to evaluate the large models at the server side. For example, processing images and videos uploaded by millions of users require massive amounts of computation, and running a data center that supports such computation carries enormous costs including cooling expenses and electricity bills. The evaluation of large neural networks can be accelerated using general-purpose graphical processing units (GPGPU), and several custom accelerators have been proposed as well [3, 4]. However, all these processing units are based on Von Neumann architecture, and the large amount of param1 eters are stored in high-density external memories. The traditional architecture requires inefficient data transfer between parameter-storing memories and processing units, leading to high-energy consumption and processing bottleneck [5]. As neural networks are models inspired by brains, it is natural to execute them in the processing units that mimic brains. Neuromorphic architectures emulate biological neural networks, and they locate memory and processing elements in a close proximity. This type of architectures has potential for eliminating the issues in the today’s computers [6]. However, mixed analog-digital neuromorphic systems such as BrainScaleS [7] and Neurogrid [8] are not designed to run real-world applications, but aim to simulate the brain for study on computational neuroscience. They usually adopt biologically plausible neuron models. The neuron models at a low-level of abstractions are considered expressive and versatile as biological neurons do, but it comes at an implementation cost such as complexity, space, and energy. To run specific applications, certain details are not necessary. TrueNorth [9, 10, 11, 12], the neuromorphic architecture from IBM, aims to balance the computational capability and the cost judiciously, and adopts digital spiking neurons based on the leaky integrate-and-fire model. A recently unveiled chip [6] based on TrueNorth contains 4096 customdesigned cores and employs asynchronous circuits for low-power operations. The chip is used for both the brain simulation and cognitive applications [13]. This paper presents a novel neuromorphic computing system that is designed solely for the execution (i.e., inference or testing) of deep neural networks. To the best of our knowledge, this is the first neuromorphic computing system that stores all the weight parameters on-chip by compressing neural networks. Designing a new computer architecture is a complex task and has many trade-offs. Our design philosophy to deal with it is summarized in the next section. 2 Design Considerations The performance of neural networks such as classification accuracy is extremely valuable. As will be shown later, in some way, even 1% degradation of the performance is translated into a huge saving of the implementation cost, and we do not want to sacrifice the performance in other ways. The performance of learning algorithms for spiking neurons such as spike timing dependent plasticity (STDP) [14] is not close to the state of the art yet [15]. While non-spiking neural networks trained using state-of-the-art algorithms can be converted into spiking neural networks, constraints arisen from the hardware architecture and inefficiency in information coding could degrade the performance [9]. We desire to build an “artificial” “brain”. How much should we learn from brains and what should we throw away from the architecture of existing processors? This may be the central question in designing neuromorphic architectures. We take a moderate approach to this problem. As much as we want to learn from the nature, we also desire to take advantage of the results of humans’ effort over several decades. Since we still make the artificial brain into a silicon chip, we need to continue to use techniques optimized for structures of silicon chips. Until today, the man-made information processing device at the lowest power consumption is application-specific integrated circuits (ASICs) and, for general purpose, field programmable gate arrays (FPGAs). Thus, we leverage the ASIC/FPGA design methodology, and balance the ASIC/FPGA architecture and the structure of brains judiciously. Our neuromorphic computing system aims at the evaluation (i.e., the forward-execution) of neural network models and is not intended to train the models. Training a neural network is computationally more expensive than the forward-execution, and there have been research efforts to accelerate the training using FPGAs [16, 17]. Our main objective is low-power signal processing rather than high-performance computing, although it can provide high performance in power-limited environments including data centers. For various applications such as object recognition, a model can be trained using a cluster of CPU or GPU-based machines, and copies of the model can provide desired functionality without modification. We also do not consider on-line learning. STDP facilitates efficient on-line learning, but as above-mentioned, it does not provide the state-of-the-art performance. Our neuromorphic system is digital. Digital systems use a high level of abstraction on signals, which allows us to deal with complexity and makes it easier to ensure the correctness of man-made 2 ag a af bg bf be a a ae Factorization a b b cg cf ce b c g f e Rolling, Memorization e b f g c c c Figure 1: A fully connected feedforward network of a single layer is transformed into a sparsely connected network with two layers by factorization. The number of parameters is reduced from 9 to 6 by factorization, but the number of connections rather increases from 9 to 12. However, when it is converted into a TDNN, the number of connections with parameters becomes 6. The reduction of the connections is critical in neuromorphic architectures, where each connection uses a dedicated computational resource called the synapse. systems. While analog silicon neurons can provide a higher integration density than that of digital neurons, we make it digital for those benefits. The rest of the paper is organized as follows. Section 3 describes the motivation of our work. Section 4, 5, and 6 propose the compiler, the neuromorphic architecture, and the microarchitecture of our computing system, respectively. Section 7 shows experimental results, and Section 8 concludes the paper. 3 Motivation Each unit (node) in feedforward neural networks mainly performs weighted sum operations, and the functionality can be easily implemented in a hardware module using logic multipliers, logic adders, and weight-storing registers. For each unit in the model, we create an instance of the module and these instances are interconnected following the model, yielding a circuit design. However, this type of systems has not built until today for the following reasons. 1) Neural networks for interesting applications are huge. Recent deep neural network architectures contain millions and billions of parameters. Each parameter at least requires a logic multiplier and a register to store the parameter, and we cannot integrate such a high number of multipliers and registers in a chip. For this reason, existing accelerators of neural networks store parameters in high-density external memories and equip with a small number of processing elements. The external memory access draws much power, and the limited memory I/O bandwidth becomes a processing bottleneck. Also, the processing elements are time-shared, which necessitates complex scheduling to maximize the utilization and creates another processing bottleneck. 2) Neural networks are densely connected unlike logic (circuit) networks. Densely interconnected designs cause routing congestion issues in the conventional ASIC/FPGA design methodology. For this reason, existing neuromorphic architectures [18] rely on custom-designed crossbars, where inputs and outputs are fully connected. 3) Silicon chips have limited I/O bandwidth and all the inputs of neural networks are usually not available at the same time. For example, traditional cameras transfer each pixel at a time, but neural network models for processing images take all the pixels of a whole image as input in parallel. Thus, the direct realization of neural network models results in systems with very low utilization. Fortunately, weight parameters in neural networks are heavily redundant [19], i.e., these networks are highly over-parameterized. This is necessary to obtain a high quality model during training by providing much flexibility to learning algorithms, but for the forward-execution, such a high number of parameters are not necessary. Our neuromorphic architecture is mainly motivated by the fact that the high redundancy in weight parameters can be exploited to minimize the implementation cost. However, it is not enough just to compress the weight parameters linearly. We also want the result of the compression to be represented in a neural network again for the execution in neuromorphic architectures. In this sense, we simplify neural networks. Surprisingly, simplifying neural networks using factorization for the first issue handles the remaining two issues as well. A motivational example is depicted in Fig. 1. The feedforward network can be considered a 2D filter. Since the 3 2D kernel is separable, it can be decomposed into a vertical filter and a horizontal filter. Using the decomposition, the single-layer network is factorized into a deeper, sparse network, providing a solution to the second issue. Besides, the weight-shared network can be “rolled” to a network with fewer units and connections. This process often require adding delay units for memorizing a previous state of a unit, resulting in a time delay neural network (TDNN), which is a special case of biologically plausible recurrent networks. This TDNN takes input serially and allows us to timeshare resources, dealing with the last issue. Any 2D filter can be decomposed into a set of separable filters using singular value decomposition. We extend this to the bank of 3D filters for typical deep neural networks. 4 Neural Network Compiler In a convolutional neural network for computer vision tasks, the weights in each convolutional layer are typically represented in a 4th-order tensor. The weights in the first fully-connected layer can also be represented in a 4th-order tensor. Let χ ∈ RC×Kh ×Kw ×F be the weight tensor of a convolutional layer (a fully-connected layer), where C is the number of input channels, Kh and Kw are the height and width of the kernel (the input map), respectively, and F is the number of output feature maps. Applying a tensor decomposition method to the weight tensor, a layer can be factorized into 5 sublayers. We denote the weight tensors of the sub-layers by χc , χv , χh , χg , and χi , respectively, and we represent the weights of each sub-layer in the same format as those of the original layer. The sub-layers are: • Channel filter layer: Each unit in this layer is connected to the input units at the same vertical and horizontal position across channels. χc ∈ RC×1×1×Rc . • Vertical filter layer: Each unit in this layer belongs to a channel and is connected to the inputs at the same vertical position. χv ∈ RRc ×Kh ×1×Rv . • Horizontal filter layer: As in the vertical filter layer, each unit acts on a channel and is connected to the inputs at the same horizontal position. χh ∈ RRv ×1×Kw ×Rv . • Code generation layer: As in the first layer, each unit in this layer acts on the same position across channels. For each position, a code for the original output is generated. χg ∈ RRv ×1×1×Rf . • Inverse transform layer: As in the first layer, each unit in this layer acts on the same position across channels. For each position, the code is converted into the original output. χi ∈ RRf ×1×1×F . If the original layer is convolutional, the sublayers also become convolutional. This factorization makes the network deeper and less dense. We use our own tensor decomposition method, but one can use CP decomposition referring to a recent preprint [20]. In this case, the code generation layer is not needed, and the horizontal filter layer generates the codes directly, and the rank of CP decomposition equals Rc = Rv = Rf . After the decomposition, we perform low-rank approximation, greatly simplifying the network. In the case of CP decomposition, a simplified network can be obtained directly. Even for a very high degree of approximation (e.g., 90% error), the performance of the network is degraded marginally [20]. However, for greater simplification, we fine-tune the factored network after an aggressive approximation, recovering the original performance. Then, we construct a TDNN corresponding to a factored layer directly. Let I ∈ RC×H×W be an input signal where C is the number of input maps, and H and W are the height and width of the maps, respectively. We first represent the input signal I as a set of C sequences sz (t), z = 0, ..., C − 1, such that sz (t) = I(z, y, x), t = yW + x, (1) for y = 0, ..., H − 1, x = 0, ..., W − 1. We require W (N − 1) delay units to obtain N contiguous data points along the vertical axis from an input sequence, and N − 1 delay units in the case of the horizontal axis. In the TDNN, the total number of delay units is W (Kh − 1)Rc + (Kw − 1)Rv . The delay for the first valid output is W (Kh − 1) + Kw − 1. An example of the TDNNs and its approximation are shown in Figure 2. 4 (a) 0% synaptic connection reduction with 0% error (b) 61.11% synaptic connection reduction with 50.55% error Figure 2: We randomly generate a single layer network. This network can be considered a feature detector that takes 2 input maps of size 2 × 3 and produces 3 feature maps. The positive-weight connections are colored with red. The negative-weight connections are colored with blue. The darker the color is, the larger the absolute value of the weight is. The connections with weight of 1 are colored with black. 5 Neuromorphic Architecture We describe our neuromorphic architecture briefly. Since it is neuromorphic, the architecture may be familiar to readers already. The proposed architecture uses the second-generation neuron model [21] and consists of synapses, neurons, and delay elements, a special type of short-term memories. Synapse and neurons are processing elements. Each synapse stores a real-valued weight and performs the synaptic operation that multiplies the incoming input value by the weight. Each neuron produces the sum of the output values of the connected synapses, and it can add a bias and evaluate an activation function such as the sigmoid and rectified linear functions. We call the connections with the weight not equal to one the synaptic connection. Unlike the traditional computers, a processing element is not timed-shared for the operations for different synaptic connections; a synapse is dedicated to the operations for a synaptic connection. Thus, for the execution, each synaptic connection is mapped, not scheduled, to a synapse, and synaptic connections and synapses have a one-to-one correspondence. Each delay unit is also mapped into a delay element. 6 Microarchitecture From neuron at previous sublayer n cycles Neuron i0 Synapse Delay element i1 pp w n 1 pp w n 1 To neuron at next sublayer Pipe Registers Delay element ik-1 n cycles 2n cycles clk input m fractional ø0 phase synapse output neuron_out @sublayer 0 synapse_in @sublayer 1 sublayer 0 valid sublayer 1 valid 2m fractional part 2m fractional part m fractional ø1 ø0 ø1 2m fractional part 2m fractional part 2m fractional part (a) Block diagram (b) Timing diagram Figure 3: A k-input neuron at the horizontal sublayer takes the current input and the last k − 1 inputs using delay elements. The bias and activation circuits are omitted. The k-input adder has the zero latency, and the 2n-bit result is aligned by the pipeline registers, which truncates the least significant m bits. The proposed architecture can be realized in various ways. We can continue to be bio-inspired to implement a microarchitecture, or can use conventional digital signal processing (DSP) circuits. At one extreme, one can employ analog spiking neurons to be biologically plausible. At the other extreme, numbers are represented in n-bit binary, and conventional logic multiplier, adders, and flip-flops can 5 be used. Especially, the decision on the coding of numbers leads to various trade-offs in circuit area, performance (e.g., classification accuracy), energy-efficiency, fault-tolerance, etc. Various neural codes are introduced in [22]. One can use the rate coding, and a number can be represented as the number of ones in a bitstream, which also enables cost-effective stochastic computing [23]. This is an interesting research avenue, but it may require a long bitstream if even 1% performance degradation is considered critical, and the high robustness provided by the rate coding may not be necessary in digital systems. We take a moderate approach, and use the conventional binary coding. However, we employ the fixed-point, bit-serial representation, which provides the following strengths. 1) Unlike the rate coding, the precision increases exponentially in the number of bits, so we can easily avoid the performance degradation due to the quantization error. If the performance degradation is permitted, it saves more implementation cost to perform a higher degree of low-rank approximation to the network. 2) We can use the cost-effective, bit-serial arithmetic [24]. Only a handful of logic gates and sequential elements are needed to implement bit-serial adders and bit-serial multipliers. 3) We can leverage the existing integrated circuit design tools fully because they understand the binary coding well. In our implementation, a number is represented as an n-bit stream where the least significant bit (LSB) comes first. To represent signed real numbers in the n-bit, we use the fixed-point format and let m denote the fractional bit-width. Figure 3(a) depicts a k-input neuron. The k-input neuron comprises k synapses, a k-input bit-serial adder to add up the outputs of the k synapses, a bias circuit and an activation circuit to evaluate an activation function. A synapse is implemented by an n-bit register to store the weight and a bit-serial multiplier, which mainly consists of n full adders and several registers to store intermediate results. The output of the k-input adder can go to the bias circuit followed by the activation circuit, or directly go to the output of the neuron. A delay element is realized by a 1-bit n stage shift register. Figure 3(b) depicts a timing diagram of our implementation. It takes 2n cycles to compute the product of two n-bit numbers. To put the product back to the n-bit format, we truncate the least significant m-bits, and the first valid output becomes available m cycles later. Thus, the synapse comes to have an inherent m cycle delay. To simplify the design, we pad a 2n − m cycle delay at the output of the neuron, and the registers for this delay can be moved forward to improve timing (i.e., they are used as pipeline registers and can be re-timed). Then, the outputs of a sublayer become available 2n cycles after the inputs arrive, and all the synapses in the system start a synaptic operation at the same time at every 2n cycle. Delay elements perform shift only for the first half of the 2n cycle period. 7 Experiments We implement the neural network compiler using pylearn2 [25]. We use our own tensor approximation method, but CP-decomposition can also perform similarly. Neural network models are trained using Nvidia GTX780 GPU and are fed into the compiler. We chose Artix7 XC7A100TCSG324-1 field-programmable gate array (FPGA) as the target platform. Note that this FPGA has relatively small capacity and 40 times larger FPGAs are available in the market. Our experiments can be considered in two ways. First, FPGAs are considered a general-purpose, not-highly-optimized neuromorphic processor, and the experiments are regarded as making software for the processor in part using existing hardware synthesis tools. FPGAs already have plastic connections, and processing elements and memories are mixed in space. The SRAM-based look-up tables (LUTs) serve as memories as well as processing elements. Second, our experiments can also be considered to build a prototype of an application-specific neuromorphic processor. While the neural network complier generates a hardware model in verilog in an application-specific fashion, we can easily extend it into a general-purpose hardware model if programmable interconnects are available. We elaborate the generated hardware models for the target platform using Xilinx Vivado. The shift registers in delay elements are refined into an SRAM-based shift register, not a chain of flip-flops, and even long shift registers are implemented efficiently. To demonstrate our approach, we use a softmax regression for hand-written digit classification. The neural network for the regression does not require the hardware for activation functions and pooling, which allows us to focus on the reduction of the implementation cost by the low-rank approximation. The original neural network has 7840 weight parameters. We train the network using the MNIST data set and achieve 92.34% accuracy. For various degrees of approximation, the neural network compiler generates TDNNs and the corresponding hardware models. Using 6 Table 1: The resulting TDNNs and their implementations for varying degrees of approximation. Approx. error 10% 16% 31% 40% 51% 61% 82% (ConvNet2) Original 0.9234 0.9234 0.9234 0.9234 0.9234 0.9234 0.9234 0.9913 Classification Accuracy Post-approx. Post-tuning 0.9131 0.9226 0.908 0.9217 0.8287 0.9154 0.7684 0.9055 0.5403 0.8943 0.5135 0.8377 0.3586 0.6115 0.1010 0.9764 Post-imp. 0.9155 0.9146 0.9109 0.9008 0.8943 0.8368 0.5989 0.9764 Params 3226 2274 1200 854 564 376 132 1288 TDNN Delay units 8316 7857 6588 5670 4779 3186 1566 8844 Total LUTs NA 53467 31223 23810 16954 11343 4754 45843 Implementation Mem. LUTs NA 4189 4065 2853 3007 1581 779 6809 Power (W) NA 2.548 1.483 1.222 0.869 0.669 0.363 1.120 Table 2: The results of the neural network compiler for a convolutional neural network. Layer 1 Layer 2 Layer 3 Original Params 1600 102400 5760 Approx. error 12% 88% 40% ConvNet1 Params Param. reduction 588 2.72× 2474 41.39× 1786 3.23× Approx. error 50% 94% 83% ConvNet2 Params Param. reduction 168 9.52× 829 123.52× 291 19.79× Vivado, the hardware model is synthesized, and the power consumption and the hardware cost in terms of LUTs are obtained. All the designs operate at 160MHz. Table 1 compares the results. The classification accuracy is evaluated after the approximation, fine-tuning, and implementation. The post-implementation accuracy is the performance of the actual system and reflects the finiteprecision effects. We use 7 bits for the fractional part. For TDNNs, the number of parameters and the number of delay units indicate the size of the models. The number of parameters equals the number of synapses, and LUTs in the FPGA are mainly used to implement synapses. A large number of delay units are realized by a small number of memory LUTs, and a memory LUT occupies a similar space to a LUT in the chip. Thus, the hardware cost is mainly determined by the number of synapses (parameters). The original feedforward network with 7840 parameters cannot be implemented in the small FPGA in a neuromorphic fashion, but the TDNN conversion and the approximation make it possible. The TDNN with 3226 parameters is slightly larger to be fitted to the FPGA, but the smaller TDNNs are easily contained in the target system. In neuromorphic architectures, the reduction of parameters leads to the reduction of synapses, which is directly translated into the reduction of hardware cost and power/energy consumption. In this experiment, the parameter reduction rate with negligible accuracy loss is not that high possibly because it is a single-layer network. For recent deep architectures, more than 100× parameter reduction is possible with marginal loss of accuracy [20]. To show that our approach can be extended to multi-layer neural networks, we use a convolutional neural network (CNN) for the same task. The network has 2 convolutional layers with max-pooling and the rectified linear function as the activation function, and a final softmax layer. The baseline model has 109,760 parameters and achieves 99.13% classification accuracy. From the baseline, the compiler creates two approximated networks with reduced parameters. The first network (ConvNet1) maintains the classification accuracy after re-training, and the second network (ConvNet2) is simplified until the resulting hardware fits to our target platform. The results are summarized in Table 1 and 2. ConvNet2 is simplified too much to be fitted to the small FPGA sacrificing some accuracy, but ConvNet1 will provide the original accuracy on an industrial FPGA. Our neuromorphic implementation of ConvNet2 provides the exactly same accuracy as the model satisfying our design goal that is not to sacrifice the accuracy except the low-rank approximation. For this task, to our best knowledge, the best accuracy achieved on neuromorphic architectures is 91.94% [10]. A TDNN model is refined to a network of silicon neurons and delay elements preserving the topology, and the IC design tool places the neurons and the delay elements in a space and connects them automatically. This provides interesting visualization of neural networks. ConvNet2 on the FPGA is shown in Fig. 4. The network on the FPGA is stimulated by images in the test set of MNIST, which are transferred via UART, and the output of the network is visualized in a screen as shown in Figure 5. The neuromorphic system successfully classifies images in real-time, and the results match with the simulation exactly. 7 (a) (b) (c) Figure 4: Neural network on a chip: (a) The neurons and the delay elements in ConvNet2 are highlighted in blue and red, respectively. (b) The three layers of ConvNet2 are highlighted in yellow, green, and magenta, respectively. (c) The connectivity of ConvNet2 is shown. Figure 5: Our neuromorphic system based on a FPGA is executing a neural network originally with 100K weight parameters for the hand-written digit classification task. Now both software and hardware are bio-inspired. The classification accuracy of the system is 97.64% even though a small FPGA is used, and it processes an input image in 156.8µs. The internal block RAMs are used as the frame buffer, and any external memory is not used in this system, which shows that it is a non-Von Neumann architecture. 8 Discussion In this paper we have presented a neuromorphic computing system that is newly designed from the microarchitecture to the compiler in order to forward-execute neural networks with minimum energy consumption. We have also demonstrated that the parameter reduction via low-rank approximation is much more valuable than considered in the community. This neuromorphic system can scale by simply using a larger FPGA or by fabricating a custom chip. Since more than 40 times larger FPGAs than the target platform are available in the market, with our approach, it now becomes easy to build neuromorphic computing system that can execute neural networks with more than 4 million real8 valued parameters, fully leveraging existing integrated circuit design techniques. Our neuromorphic system has just built and is not fully optimized. Through all the levels of the computing stack, there is huge room for optimization. Our future work may include the circuit-level optimization and neural network transformations to minimize the implementation cost. References [1] Dan Ciresan, Ueli Meier, and Jürgen Schmidhuber. Multi-column deep neural networks for image classification. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 3642–3649, 2012. [2] Pierre Sermanet, David Eigen, Xiang Zhang, Michaël Mathieu, Rob Fergus, and Yann LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. arXiv preprint arXiv:1312.6229, 2013. [3] Clément Farabet, Berin Martini, Polina Akselrod, Selçuk Talay, Yann LeCun, and Eugenio Culurciello. Hardware accelerated convolutional neural networks for synthetic vision systems. In Circuits and Systems (ISCAS), Proceedings of 2010 IEEE International Symposium on, pages 257–260, 2010. [4] Srimat Chakradhar, Murugan Sankaradas, Venkata Jakkula, and Srihari Cadambi. A dynamically configurable coprocessor for convolutional neural networks. In ACM SIGARCH Computer Architecture News, volume 38, pages 247–257, 2010. [5] John Backus. Can programming be liberated from the von neumann style?: a functional style and its algebra of programs. Communications of the ACM, 21(8):613–641, 1978. [6] Paul A Merolla, John V Arthur, Rodrigo Alvarez-Icaza, Andrew S Cassidy, Jun Sawada, Filipp Akopyan, Bryan L Jackson, Nabil Imam, Chen Guo, Yutaka Nakamura, et al. A million spiking-neuron integrated circuit with a scalable communication network and interface. Science, 345(6197):668–673, 2014. [7] Johannes Schemmel, D Bruderle, A Grubl, Matthias Hock, Karlheinz Meier, and Sebastian Millner. A wafer-scale neuromorphic hardware system for large-scale neural modeling. In Circuits and Systems (ISCAS), Proceedings of 2010 IEEE International Symposium on, pages 1947–1950, 2010. [8] Ben Varkey Benjamin, Peiran Gao, Emmett McQuinn, Swadesh Choudhary, Anand R Chandrasekaran, J Bussat, Rodrigo Alvarez-Icaza, John V Arthur, PA Merolla, and Kwabena Boahen. Neurogrid: A mixed-analog-digital multichip system for large-scale neural simulations. Proceedings of the IEEE, 102(5):699–716, 2014. [9] John V Arthur, Paul A Merolla, Filipp Akopyan, Rodrigo Alvarez, Andrew Cassidy, Shyamal Chandra, Steven K Esser, Nabil Imam, William Risk, Daniel Ben Dayan Rubin, et al. Building block of a programmable neuromorphic substrate: A digital neurosynaptic core. In Neural Networks (IJCNN), The 2012 International Joint Conference on, pages 1–8, 2012. [10] Steven K Esser, Alexander Andreopoulos, Rathinakumar Appuswamy, Pallab Datta, Davis Barch, Arnon Amir, John Arthur, Andrew Cassidy, Myron Flickner, Paul Merolla, et al. Cognitive computing systems: Algorithms and applications for networks of neurosynaptic cores. In Neural Networks (IJCNN), The 2013 International Joint Conference on, pages 1–10, 2013. [11] Arnon Amir, Pallab Datta, William P Risk, Andrew S Cassidy, Jeffrey A Kusnitz, Steven K Esser, Alexander Andreopoulos, Theodore M Wong, Myron Flickner, Rodrigo Alvarez-Icaza, et al. Cognitive computing programming paradigm: a corelet language for composing networks of neurosynaptic cores. In Neural Networks (IJCNN), The 2013 International Joint Conference on, pages 1–10, 2013. [12] Andrew S. Cassidy, Paul Merolla, John V. Arthur, Steve K. Esser, Bryan Jackson, Rodrigo Alvarez-Icaza, Pallab Datta, Jun Sawada, Theodore M. Wong, Vitaly Feldman, Arnon Amir, Daniel Ben-Dayan Rubin, Filipp Akopyan, Emmett McQuinn, William P. Risk, and Dharmendra S. Modha. Cognitive computing building block: A versatile and efficient digital neuron model for neurosynaptic cores. In Neural Networks (IJCNN), The 2013 International Joint Conference on, pages 1–10, 2013. 9 [13] Andrew S Cassidy, Rodrigo Alvarez-Icaza, Filipp Akopyan, Jun Sawada, John V Arthur, Paul A Merolla, Pallab Datta, Marc Gonzalez Tallada, Brian Taba, Alexander Andreopoulos, et al. Real-time scalable cortical computing at 46 giga-synaptic ops/watt with ∼100x speed up in time-to-solution and ∼100,000x reduction in energy-to-solution. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, pages 27–38, 2014. [14] Jae-sun Seo, Bernard Brezzo, Yong Liu, Benjamin D Parker, Steven K Esser, Robert K Montoye, Bipin Rajendran, José A Tierno, Leland Chang, Dharmendra S Modha, et al. A 45nm cmos neuromorphic chip with a scalable architecture for learning in networks of spiking neurons. In Custom Integrated Circuits Conference (CICC), 2011 IEEE, pages 1–4, 2011. [15] Joseph M Brader, Walter Senn, and Stefano Fusi. Learning real-world stimuli in a neural network with spike-driven synaptic dynamics. Neural computation, 19(11):2881–2912, 2007. [16] Daniel L Ly and Paul Chow. A high-performance fpga architecture for restricted boltzmann machines. In Proceedings of the ACM/SIGDA international symposium on Field programmable gate arrays, pages 73–82, 2009. [17] Lok-Won Kim, Sameh Asaad, and Ralph Linsker. A fully pipelined fpga architecture of a factored restricted boltzmann machine artificial neural network. ACM Transactions on Reconfigurable Technology and Systems (TRETS), 7(1):5, 2014. [18] G. Snider. Molecular-junction-nanowire-crossbar-based neural network, April 15 2008. US Patent 7,359,888. [19] Misha Denil, Babak Shakibi, Laurent Dinh, Nando de Freitas, et al. Predicting parameters in deep learning. In Advances in Neural Information Processing Systems, pages 2148–2156, 2013. [20] Vadim Lebedev, Yaroslav Ganin, Maksim Rakhuba, Ivan Oseledets, and Victor Lempitsky. Speeding-up convolutional neural networks using fine-tuned cp-decomposition. arXiv preprint arXiv:1412.6553, 2014. [21] Jilles Vreeken. Spiking neural networks, an introduction. Technical Report UU-CS, (2003008):1–5, 2003. [22] Wulfram Gerstner and Werner M Kistler. Spiking neuron models: Single neurons, populations, plasticity. Cambridge university press, 2002. [23] Armin Alaghi and John P Hayes. Survey of stochastic computing. ACM Transactions on Embedded computing systems (TECS), 12(2s):92, 2013. [24] Peter B Denyer and David Renshaw. VLSI signal processing: a bit-serial approach, volume 1. Addison-Wesley Reading, MA, 1985. [25] Ian J. Goodfellow, David Warde-Farley, Pascal Lamblin, Vincent Dumoulin, Mehdi Mirza, Razvan Pascanu, James Bergstra, Frédéric Bastien, and Yoshua Bengio. Pylearn2: a machine learning research library. arXiv preprint arXiv:1308.4214, 2013. 10
9cs.NE
UDC 512.624.3 + 512.552 MSC: 12E12, 16U99, 16P10 BALANCED FACTORISATIONS IN SOME ALGEBRAS Anton A. Klyachko Andrey M. Mazhuga Anastasia N. Ponfilenko Faculty of Mechanics and Mathematics, Moscow State University Moscow 119991, Leninskie gory, MSU [email protected] [email protected] [email protected] arXiv:1607.01957v1 [math.RA] 7 Jul 2016 We prove that, in any field of characteristic not two and not three except F5 , each element decomposes into a product of four factors whose sum vanishes. We also find all k, n, q such that every n×n matrix over the q -element field decomposes into a product of k commuting matrices whose sum vanishes. 0. Introduction Suppose that an element a of a ring is factored into a product: a = a1 a2 . . . ak ; we call this factorisation balanced if P ai = 0. It is easy to show (see [KV16]) that, in any field of characteristic not two, each element admits a balanced decomposition into a product of k factors for each k > 5. (While, for each k < 5, this assertion is no longer valid.) We prove the following theorem answering thereby two question from [KV16] (one of which had been known earlier [Iva13]). Theorem 1. In any field of characteristic not two and not three except the five-element field F5 , each element admits a balanced decomposition into a product of four factors; if the field is infinite, then each element admits infinitely many such decompositions. We are unsure whether this result was known earlier, because - A high-school teacher of the second author, Dmitrii Vitalievich Andreev, in 2003 suggested such a problem on classes (for the field of rationals); the problem was not solved, but the teacher’s hints make the second author suspect (now, when he already knows a solution) that Dmitrii Vitalievich was able to solve this problem; - in 2016 (already knowing a solution), the second author asked such a question (again for the field of rationals) on the forum http://math.stackexchange.com/ and shortly someone posts a solution, different from ours, but probably also valid; now this question is, unfortunately, removed and we cannot give an exact references. The following theorem from [KV16] describes, for each k, all finite fields, in which each element admits a balanced decomposition into a product of k factors. Theorem on balanced factorisations in finite fields [KV16]. Suppose that k > 2 is an integer and F is a finite field. Then any element of F has a balanced factorisation into a product of k factors if and only if either |F | = 2 and k is even, or |F | = 4 and k 6= 3, or |F | is a power of two but neither two nor four (and k is arbitrary), or |F | ∈ {3, 5} and k ∈ / {2, 4}, or |F | = 7 and k ∈ / {2, 3}, or |F | is neither a power of two nor three nor five nor seven and k 6= 2. In other words, the situation in finite fields is the following: F2 F3 F4 F5 F7 F8 , F16 , F32 , F64 , . . . F9 , F11 , F13 , F17 , . . . k=2 yes no yes no no yes no k=3 no yes no yes no yes yes k=4 yes no yes no yes yes yes k = 5, 7, 9, . . . no yes yes yes yes yes yes k = 6, 8, 10, . . . yes yes yes yes yes yes yes Table 1 The following theorem complements this result from [KV16]. Theorem 2. Let k, n > 2 be integers and F be a finite field. Any n × n matrix over F decomposes into a product of k commuting matrices whose sum vanishes if and only if either k = 3 and |F | = 5, or k = 3 and |F | > 8, or k = 4 and |F | = 4, or k = 4 and |F | > 7, or k > 5 and |F | > 3. In other words, the situation in the matrix algebras over finite fields is the following (ignore the superscripts for now): The work of the first two authors was supported by the Russian Foundation for Basic Research, project no. 15-01-05823. 1 F2 F3 F4 , F7 F5 F8 , F9 , F11 F13 F16 , . . . k=2 no1 no1 no1 no1 no1 k=3 no0 no8 no0 yes5 yes5,6 k=4 no2 no0 yes5,7 no0 yes5,7 k = 5, 6, 7, 8, . . . no2 yes3,4 yes3,4,5,7 yes3,4 yes3,4,5,7 Table 2 Note that the size of matrices does not affect the answer, provided this size is at least two. In Section 1, we prove Theorem 1 and also another theorem on finite fields (Theorem 3), which plays the key role in the proof of Theorem 2. All argument in Section 1 is elementary, except that the proof of Theorem 3 is substantially based on results of [KV16] (that in turn are based on the theory of elliptic curves). In Section 2, we prove Theorem 2. Notation, which we use are standard. Note only that the symbol Fq denotes the q-element field and the letter E always denotes the identity matrix. 1. Fields Proof of Theorem 1. Look at this identity x= 2(1 − 4x)2 −(1 + 8x) −(1 + 8x) 18x · · · . 3(1 + 8x) 6 2(1 − 4x) (1 − 4x)(1 + 8x) We can only suggest readers to verify this identity and the fact that the sum of factors is zero. In the exceptional cases, / { 41 , − 81 , 0} (this when denominators vanishes, i.e. for x ∈ { 14 , − 81 }, we can multiply x by y 4 choosing y such that xy 4 ∈ is possible in any field of characteristic not two and not three except F5 ), write a similar decomposition for xy 4 and then divide each factor by y: x= 2(1 − 4xy 4 )2 −(1 + 8xy 4 ) −(1 + 8xy 4 ) 18xy 4 · · · . 3y(1 + 8xy 4 ) 6y 2y(1 − 4xy 4 ) y(1 − 4xy 4 )(1 + 8xy 4 ) Thus we obtain a balanced decomposition of any element into a product of four factors. Moreover, the last identity implies that there are infinitely many such decompositions if the field is infinite, because of the following elementary fact (whose proof is left for readers as an easy exercise): any non-constant rational fraction over an infinite field takes infinitely many values. (Note that, for each x, the second factor in the last identity is a non-constant rational fraction f (y).) This completes the proof. The five-element field is indeed an exception, see Table 1. Similarly, we can obtain infinitely many balanced decompositions into products of any larger number of factors, i.e. in any infinite field characteristic not two each element admits infinitely many balanced decompositions into products of k factors for each k > 5. For example, the following identity is obtained by a slight modification of an identity from [KV16]; this gives infinitely many balanced decompositions of any nonzero element of an infinite field of characteristic not two into products of 2017 factors: 1006   1006    xy 2016 xy 2016 2 2 1 1 2016 x= · 2018 · − 2018 · · · −xy · − . 2 2 xy xy y y A decomposition x = x1 x2 . . . xk is called power if all factors are equal: x1 = . . . = xk [KV16]. Theorem 3. Let k > 2 be an integer and let F be a finite field. Any element of F admits a non-power balanced decomposition into a product of k factors if and only if either k = 3 and |F | = 5, or k = 3 and |F | > 8, or k = 4 and |F | = 4, or k = 4 and |F | > 7, or k > 5 and |F | > 3. In other words, the answer here is the same as in Theorem 2 (Table 2). Proof. Superscripts of the particles yes and no in Table 2 indicate references to the cases below. Case 0: no, because in these cases for some elements there are no balanced decompositions (by Theorem on balanced factorisations in finite fields). Case 1: k = 2 — no. For any element a, consider its balanced decomposition a = xy, x + y = 0. If the characteristic is 2, then the decomposition a = (−x)x is power; if the characteristic is not two, then not any element is square and, therefore, not any element admits a balanced decomposition into a product of two factors. Case 2: |F | = 2 — no. The decomposition of 1 can comprises only 1s and, therefore, it is power. 2 Case 3: k = 5 + 2n, where n > 0 and char F 6= 2 — yes. Let us use the universal formula for balanced decompositions into a product of 5 + 2n factors from [KV16]: ±a = (−a) · a a 2 −2 n · · · · 1 · (−1)n 2 2 a a (for a 6= 0). char F 6= 2, therefore, a2 6= − a2 and, hence, this decomposition is non-power. The zero element has an obvious balanced non-power decomposition: 0 = (−1) · 1 · 0k−2 . Case 4: k = 6 + 2n, where n > 0 and char F 6= 2 — yes. Let us use a formula for balanced decompositions into a product of 6 + 2n factors from [KV16]: Consider c ∈ F such that c2 6= a (such c exists, except for the case where 2 F = F3 and b = 1; but in this case everything is obvious). Put b = c c−a . Then ±a = (−c) · (c − b) · b b 2 −2 n · · · · 1 · (−1)n . 2 2 b b Since char F 6= 2, we have 2b 6= − 2b and, therefore, the decomposition is non-power. Case 5: In these cases, balanced decompositions exist by Theorem on balanced factorisations in finite fields; these decompositions cannot be power, because the number of factors is not divisible by the characteristic. Case 6: |F | > 9, char F 6= 2, and k = 3 — yes. Consider two cases. If char F 6= 3, then the Theorem on balanced factorisations in finite fields provides us with a balanced decomposition for any element; since char F 6= 3, this decomposition cannot be power. To prove the assertion for characteristic three, we need a lemma. Lemma. In the field F3n , where n > 2, there exists a nonzero square u such that u + 1 is also a nonzero square. Proof. If 2 is a square, then u = 1 is the required element. Otherwise, suppose that, for any u ∈ / {0, 1, 2}, the following holds: if u is a square, then u + 1 is not a square. Then, any set of the form {u, u + 1, u + 2} contains at most one square. Therefore, the number of squares is at n most 3n−1 + 1. On the other hand, in the field of characteristic 3, there are precisely 3 2+1 squares. This implies the n inequality 3 2+1 6 3n−1 + 1 that holds only for n = 1. This contradiction completes the proof of the lemma. Let us resume the proof of Theorem 3. We have to show that, in a finite field of characteristic three and cardinality at least nine, each element has a balanced non-power decomposition into a product of three factors. Note that, in such a field, any element is a cube. We want to find a balanced decomposition of an element a = b3 6= 0: a = xyz, x + y + z = 0. Eliminating z, we obtain yx2 + y 2 x + a = 0. (∗) Let us solve this equation with respect to x. By lemma, there exists τ 2 6= 0 such that τ 2 + 1 6= 0 is also a square: τ 2 + 1 = π 2 6= 0. Take y = b+bπ 2 . Note that y 6= b, because the equality y = b would mean that π = 1 and τ = 0. Therefore, the discriminant of the quadratic equation (∗) is a square: bπ + b D = y − 4ay = y(y − b ) = y(y − b) = · 2 4 3 3 3  bπ − b 2 3 = (b2 (1 + τ 2 ) − b2 )(bπ − b)2 = b2 τ 2 (bπ − b)2 and equation (∗) has a solution. The obtained decomposition is not power, because y 3 6= a (since y 6= b). It remains to find a non-power balanced decomposition of zero, but this is an easy task: 0 = (−1) · 1 · 0. Case 7: |F | = 2n and k = 4 + 2m, where m > 0. Since char F = 2, any element is a square: a = b · b. If a 6= 1, then 2 b 6= 1 and a = b2 · 12m+2 is a required decomposition. If a = 1, then a = 1 = c2 · 1c · 12m is a required decomposition, where c is any element different from 0 and 1. Case 8: |F | = 3 and k = 3 — no. The decomposition of 1 cannot can contain 0 and, therefore, must contain 1 and −1, to make decomposition non-power. Then, the third factor must be zero, because the decomposition is balanced. This contradiction completes the proof of Theorem 3. 2. Matrices Proof of Theorem 2. First note that, for k = 2, Theorem 2 is valid: the Jordan cell J with eigenvalue zero and size n × n is not a square in the ring of n × n matrices if n > 2 (we leave the proof of this fact to readers as an exercise) and, therefore, the matrix −J has no balanced decompositions into a product of two factors. In the case k > 3, Theorem 3 implies that it suffices to prove the following statement. 3 Theorem 2′ . Let n > 2 and k > 3 are integers and let F be a field (not necessarily finite). Then the following conditions are equivalent: a) each matrix n × n over F has a balanced decomposition into a product of k commuting factors; b) each element of F has a non-power balanced decomposition into a product of k factors. Proof. The implication b) =⇒ a) follows immediately from the following fact proven in [KV16]: Let F be a field and let k be a positive integer larger than two. If, in all finite extensions of the field F , each element has a non-power balanced decomposition into a product k elements, then the same is true for each element of each finite-dimensional associative algebra with unit over F . The implication a) =⇒ b). First, note that 0 ∈ F has a balanced non-power decomposition into a product of k factors for any k > 3: 0 = 0k−2 · 1 · (−1). To obtain a decomposition of a nonzero element a ∈ F , we need the following simple fact from linear algebra (the proof is left to readers as an exercise): The centraliser of the nilpotent Jordan cell J of size n × n in the algebra of n × n matrices consists of polynomials in J, i.e. C(J) = {a0 E+a1 J +. . .+an−1 J n−1 | ai ∈ F }. Thus, if the Jordan cell aE + J has a balanced decomposition aE + J = X1 . . . Xk into a product of commuting matrices, then all matrices Xi lie in the centraliser of J and, by virtue of the fact mentioned above, we obtain a balanced decomposition of a in F : a = x1 . . . xk , where xi is the (unique) eigenvalue of Xi . It remains to note that this decomposition cannot be power for a 6= 0. Indeed, assuming the contrary, we would obtain a balanced decomposition in the ring of matrices: aE + J = (xE + J1 ) . . . (xE + Jk ), where Ji are nilpotent commuting matrices. P The balancedness of this decomposition means that k is divisible by char F and Ji = 0. But then, multiplying out brackets, we obtain aE + J = (xE + J1 ) . . . (xE + Jk ) = aE + f (J1 , . . . , Jk ), where the polynomial f has no terms degree 1, i.e. the right-hand side of this equality is a matrix of the form aE + J ′ , where (J ′ )n−1 = 0. This contradiction completes the proof of Theorems 2′ and 2. Generally (without the commutativity condition), the question on balanced decompositions of matrices over finite fields remains open. Question. For which q, k, and n, it is true that any n×n matrix over the q-element field has a balanced decomposition into a product of k matrices? We can say only the following. 1. In some cases the decompositions exist by Theorem 2. 2. For k = 2 6 n, the decomposition does not exist, e.g., because factors such balanced decomposition must commute. Moreover, computer experiments show the following facts.     1 1 0 1 3. Over the two-element field, all 2 × 2 matrices, except and (a similar matrix) , admit balanced 1 0 1 1 decompositions  intoa product of three factors, while these two matrices have no such decompositions. 1 0 4. The matrix and two similar matrices over the two-element field have no balanced decompositions into a 1 1 product of four  factors,while all other 2 × 2 matrices over F2 have such decompositions. 1 0 0 5. The matrix  1 1 0  and similar matrices over the two-element field have no balanced decompositions into a 0 0 1 product of three factors, while the remaining 3 × 3 matrices over F2 have such decompositions. 6. All 3 × 3 matrices over F2 have balanced decompositions into products of four factors. 7. All 2 × 2 matrices over F3 , F4 , F5 , and F7 have balanced decompositions into products of three and four factors. This implies that the same is true for any larger number of factors, because we can increase the number of factors by two multiplying decompositions by E and −E. REFERENCES [Iva13] Ivanishchuk A. V. The experience of learning and research activity of students in Lyceum 1511 (MEPhI) (in Russian) // published in the book Sgibnev A. I. Research problems for beginners. Moscow: MCCME, 2013. (Freely available at http://www.mccme.ru/free-books/) [KV16] Klyachko A. A., Vassiliyev A. N. Balanced factorisations // arXiv:1506.01571. 4
0math.AC
arXiv:1706.02897v1 [cs.AI] 7 Jun 2017 Bandit Models of Human Behavior: Reward Processing in Mental Disorders Djallel Bouneffouf, Irina Rish, Guillermo A. Cecchi IBM Thomas J. Watson Research Center Yorktown Heights, NY USA Abstract. Drawing an inspiration from behavioral studies of human decision making, we propose here a general parametric framework for multi-armed bandit problem, which extends the standard Thompson Sampling approach to incorporate reward processing biases associated with several neurological and psychiatric conditions, including Parkinson’s and Alzheimer’s diseases, attention-deficit/hyperactivity disorder (ADHD), addiction, and chronic pain. We demonstrate empirically that the proposed parametric approach can often outperform the baseline Thompson Sampling on a variety of datasets. Moreover, from the behavioral modeling perspective, our parametric framework can be viewed as a first step towards a unifying computational model capturing reward processing abnormalities across multiple mental conditions. 1 Introduction In daily-life decision making, from choosing a meal at a restaurant to deciding on a place to visit during a vacation, and so on, people often face the classical exploration versus exploitation dilemma, requiring them to choose between following a good action chosen previously (exploitation) and obtaining more information about the environment which can possibly lead to better actions in the future, but may also turn out to be a bad choice (exploration). The exploration-exploitation trade-off is typically modeled as the multi-armed bandit (MAB) problem, stated as follows: given N possible actions (“arms”), each associated with a fixed, unknown and independent reward probability distribution [1,2], an agent selects an action at each time point and receives a reward, drawn from the corresponding distribution, independently of the previous actions. In order to better understand and model human decision-making behavior, scientists usually investigate reward processing mechanisms in healthy subjects [3]. However, neurogenerative and psychiatric disorders, often associated with reward processing disruptions, can provide an additional resource for deeper understanding of human decision making mechanisms. Furthermore, from the perspective of evolutionary psychiatry, various mental disorders, including depression, anxiety, ADHD, addiction and even schizophrenia can be considered as “extreme points” in a continuous spectrum of behaviors and traits developed for various purposes during evolution, and somewhat less extreme versions of those traits can be actually beneficial in specific environments (e.g., ADHD-like fast-switching attention can be life-saving in certain environments, etc.). Thus, modeling decision-making biases and traits associated with various disorders may actually enrich the existing computational decision-making models, leading to potentially more flexible and better-performing algorithms. Herein, we focus on reward-processing biases associated with several mental disorders, including Parkinson’s and Alzheimer disease, ADHD, addiction and chronic pain. Our questions are: is it possible to extend standard stochastic bandit algorithms to mimic human behavior in such disorders? Can such generalized approaches outperform standard bandit algorithms on specific tasks? We show that both questions can be answered positively. We build upon the Thompson Sampling, a state-of-art approach to multi-arm bandit problem, and extend it to a parametric version which allows to incorporate various reward-processing biases known to be associated with particular disorders. For example, it was shown that (unmedicated) patients with Parkinson’s disease appear to learn better from negative rather than from positive rewards [4]; another example is addictive behaviors which may be associated with an inability to forget strong stimulus-response associations from the past, i.e. to properly discount past rewards [5], and so on. More specifically, we propose a parameteric model which introduces weights on incoming positive and negative rewards, and on reward histories, extending the standard parameter update rules in Bernoulli Thompson Sampling; tuning the parameter settings allows us to better capture specific rewardprocessing biases. Our empirical results demonstrate that the proposed approach outperforms the baseline Thompson Sampling on a variety of UCI benchmarks Furthermore, we show how parameter-tuning in the proposed model allows to mimic certain aspects of the behavior associated with mental disorders mentioned above, and thus may provide a valuable tool for improving our understanding of such disorders. The rest of this paper is organized as follows. Section 2 reviews related work. Section 3 describes the MAB model and the proposed algorithm. The experimental evaluation for different setting is presented in Section 5. The last section concludes the paper and identifies directions for future works. 2 Related Work 2.1 Reward Processing in Mental Disorders The literature on the reward processing abnormalities in particular neurological and psychiatric disorders is quite extensive; below we summarize some of the recent developments in this fastgrowing field. Parkinson’s disease (PD). It is well-known that the neuromodulator dopamine plays a key role in reinforcement learning processes. PD patients, who have depleted dopamine in the basal ganglia, tend to have impaired performance on tasks that require learning from trial and error. For example, [4] demonstrate that off-medication PD patients are better at learning to avoid choices that lead to negative outcomes than they are at learning from positive outcomes, while dopamine medication typically used to treat PD symptoms reverses this bias. Alzheimer’s disease (AD). This is the most common cause of dementia in the elderly and, besides memory impairment, it is associated with a variable degree of executive function impairment and visuospatial impairment. As discussed in [3], AD patients have decreased pursuit of rewarding behaviors, including loss of appetite; these changes are often secondary to apathy, associated with diminished reward system activity. Furthermore, poor performance on certain tasks is correlated with memory impairments. Frontotemporal dementia, behavioral variant (bvFTD). Frontotemporal dementia (bvFTD) typically involves a progressive change in personality and behavior including disinhibition, apathy, eating changes, repetitive or compulsive behaviors, and loss of empathy [3], and it is hypothesized that those changes are associated with abnormalities in reward processing. For example, changes in eating habits with a preference for sweet, carbohydrate rich foods and overeating in bvFTD patients can be associated with abnormally increased reward representation for food, or impairment in the negative (punishment) signal associated with fullness. Attention-deficit/hyperactivity disorder (ADHD). Authors in [6] suggest that the strength of the association between a stimulus and the corresponding response is more susceptible to degradation in ADHD patients, which suggests problems with storing the stimulus-response associations. Among other functions, storing the associations requires working memory capacity, which is often impaired in ADHD patients. Addiction. In [5], it is demonstrated that patients suffering from addictive behavior are not able to forget the stimulus-response associations, which causes them to constantly seek the stimulus which generated such association. Chronic pain. In [7], it is suggested that chronic pain results in a hypodopaminergic (low dopamine) state that impairs motivated behavior, resulting into a reduced drive in chronic pain patients to pursue the rewards. Decreased reward response may underlie a key system mediating the anhedonia and depression common in chronic pain. A variety of computational models was proposed for studying the disorders of reward processing in specific disorders, including, among others [4,8,9,10,5,11]. However, none of the above studies is proposing a unifying model that can represent a wide range of reward processing disorders; moreover, none of the above studies used the multi-arm bandit model simulating human online decision-making. 2.2 Multi-Armed Bandit (MAB) The multi-armed bandit (MAB) problem models a sequential decision-making process, where at each time point a player selects an action from a given finite set of possible actions, attempting to maximize the cumulative reward over time. MAB is frequently used in reinforcement learning to study the exploration/exploitation tradeoff, and is an active area of research since the 1950s. Optimal solutions have been provided using a stochastic formulation [1,2], or using an adversarial formulation [12,13,14]. Recently, there has been a surge of interest in a Bayesian formulation [15], involving the algorithm known as Thompson sampling [16]. Theoretical analysis in [17] shows that Thompson sampling for Bernoulli bandits asymptotically achieves the optimal performance limit. Empirical analysis of Thompson sampling, including problems more complex than the Bernoulli bandit, demonstrates that its performance is highly competitive with other approaches [15,18]. Psychological study done in [19] shows that, instead of maximizing output by a deliberate mean-variance trade-off, participants approach dynamic decision-making problems by utilizing a probability matching heuristic. Thus, their behavior is better described by the Thompson sampling choice rule than by the Upper Confidence Bound (UCB) approach [2]. However, none of the above studies bandit models of the behavior of patients with mental disorders and impaired reward processing. To the best of our knowledge, this work is the first one to propose a generalized version of Thompson Sampling algorithm which incorporates a range of reward processing biases associated with various mental disorders and shows how different parameter settings of the proposed model lead to behavior mimicking a wide range of impairments in multiple neurological and psychiatric disorders. Most importantly, our bandit algorithm based on generalization of Thompson sampling outperforms the baseline method on multiple datsasets. 3 Background and Definitions The Stochastic Multi-Armed Bandit. Given a slot machine with N arms representing potential actions, the player must chose one of the arms to play at each time step t = 1, 2, 3, ..., T . Choosing an arm i yields a random real-valued reward according to some fixed (unknown) distribution with support in [0, 1]. The reward is observed immediately after playing the arm. The MAB algorithm must decide which arm to play at each time step t, based on the outcomes during the previous t − 1 steps. Let µi denote the (unknown) expected for arm i. The goal is to maximize the expected Preward T total reward during T iterations, i.e., E[ t=1 µi(t) ], where i(t) is the arm played in step t, and the expectation is over the random choices of i(t) made by the algorithm. We could also use the equivalent performance measure known as the expected total regret, i.e. the amount of total reward lost because of playing according to a specific algorithm rather than choosing the optimal arm in each step. The expected total regret is formally defined as: E[R(T )] = E[ T X t=1 (µ∗ − µi(t) )] = X ∆i E[ki (T )]. (1) i where µ∗ := maxi µi , ∆i := µ∗ − µi , and ki (t) denote the number of times arm i has been played up to step t. Thompson Sampling. Thompson sampling (TS) [20], also known as Basyesian posterior sampling, is a classical approach to multi-arm bandit problem, where the reward ri (t) for choosing an arm i at time t is assumed to follow a distribution P r(rt |µ̃) with the parameter µ̃. Given a prior P r(µ̃) on these parameters, their posterior distribution is given by the Bayes rule, P r(µ̃|rt ) ∝ P r(rt |µ̃)P r(µ̃) [17]. A particular case of the Thompson Sampling approach, presented in Algorithm 1, assumes a Bernoulli bandit problem, with rewards being 0 or 1, and the parameters following the Beta prior. TS initially assumes arm i to have prior Beta(1, 1) on µi (the probability of success). At time t, having observed Si (t) successes (reward = 1) and Fi (t) failures (reward = 0), the algorithm updates the distribution on µi as Beta(Si (t), Fi (t)). The algorithm then generates independent samples θi (t) from these posterior distributions of the µi , and selects the arm with the largest sample value. 4 Proposed Approach: Human-Based Thompson Sampling We will now introduce a more general rule for updating the parameters of Beta distribution in steps 10 and 11 of the Algorithm 1; this parameteric rule incorporates weights on the prior and the current number of successes and failures, which will allow to model a wide range of reward processing biases associated with various disorders. More specifically, the proposed Human-Based Algorithm 1: Thompson Sampling 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: Foreach arm i = 1, ..., K set Si (t) = 1, Fi (t) = 1 End for Foreach t = 1, 2, ..., T do Foreach i = 1, 2, ..., K do Sample θi (t) from Beta(Si (t), Fi (t)) End do Play arm it = argmaxiθi (t), obtain reward r(t) if r(t) = 1, then Si (t) = Si (t) + 1 else Fi (t) = Fi (t) + 1 End do Thompson Sampling (HBTS), outlined in Algorithm 2, replaces binary incremental updates in lines 10 and 11 of TS (Algorithm 1) with their corresponding weighted version (lines 10 and 11 in Algorithm 2), using the four weight parameters: τ and φ are the weights of the previously accumulated positive and negative rewards, respectively, while α and β represent the weights on the positive and negative rewards at the current iteration. Algorithm 2: Human-Based Thompson Sampling (HBTS) 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: Foreach arm i = 1, ..., K set Si (t) = 1, Fi (t) = 1 End for Foreach t = 1, 2, ..., T do Foreach i = 1, 2, ..., K do Sample θi (t) from Beta(Si (t), Fi (t)) End do Play arm it = argmaxiθi (t), obtain reward r(t) if ri (t) = 1, then Si (t) = τ Si (t) + αri (t) else Fi (t) = φFi (t) + β(1 − ri (t)) End do 4.1 Reward Processing Models with Different Biases In this section we describe how specific constraints on the model parameters in the proposed algorithm can yield different reward processing biases discussed earlier, and introduce several instances of the HBTS model, with parameter settings reflecting particular biases. The parameter settings are summarized in Table 2, where we use list our models associated with specific disorders. It is important to underscore that the above models should be viewed as only a first step towards a unifying approach to reward processing disruptions, which requires further extensions, as Table 1: Algorithms parameters τ α φ β UCI Datasets AD (addiction) 1 ± 0.1 1 ± 0.1 0.5 ± 0.1 1 ± 0.1 0.2 ± 0.1 1 ± 0.1 0.2 ± 0.1 1 ± 0.1 ADHD AZ (Altzheimer’s) 0.1 ± 0.1 1 ± 0.1 0.1 ± 0.1 1 ± 0.1 CP (chronic pain) 0.5 ± 0.1 0.5 ± 0.1 1 ± 0.1 1 ± 0.1 bvFTD 0.5 ± 0.1 100 ± 10 0.5 ± 0.1 1 ± 0.1 PD (Parkinson’s) 0.5 ± 0.1 1 ± 0.1 0.5 ± 0.1 100 ± 10 M (“moderate”) 0.5 ± 0.1 1 ± 0.1 0.5 ± 0.1 1 ± 0.1 TS 1 1 1 1 well as tuning and validation on human subjects. Our main goal is to demonstrate the promise of our parametric approach at capturing certain decision-making biases, as well as its computational advantages over the standard TS, due to the increased generality and flexibility facilitated by multi-parametric formulation. Note that the standard Thompson sampling (TS) approach correspond to setting the four (hyper)parameters used in our model to 1. Next, we introduce the model which incorporates some mild forgetting of the past rewards or losses, using 0.5 weights, just as an example, and calibrating the other models with respect to this one; we refer to this model as M for “moderate” forgetting, which serves here as a proxy for somewhat “normal” reward processing, without extreme reward-processing biases associated with disorders. We will use the subscript M to denote the parameters of this model. We will now introduced several models inspired by certain reward-processing biases in a range of mental disorders. It is important to note that, despite using disorder names for these models, we are not claiming that they provide accurate models of the corresponding disorders, but rather disorder-inspired versions of our general parametric family of models. Parkinson’s disease (PD). Recall that PD patients are typically better at learning to avoid negative outcomes than at learning to achieve positive outcomes [4]; one way to model this is to over-emphasize negative rewards, by placing a high weight on them, as compared to the reward processing in healthy individuals. Specifically, we will assume the parameter β for PD patients to be much higher than normal βM (e.g., we use β = 100 here), while the rest of the parameters will be in the same range for both healthy and PD individuals. Frontotemporal Dementia (bvFTD). Patients with bvFTD are prone to overeating which may represent increased reward representation. To model this impairment in bvFTD patients, the parameter of the model could be modified as follow: αM << α (e.g., α = 100 as shown in Table 2), where α is the parameter of the bvFTD model has, and the rest of these parameters are equal to the normal one. Alzheimer’s disease (AD). To model apathy in patients with Altzheimer’s, including downplaying rewards and losses, we will assume that the parameters φ and τ are somewhat smaller than normal, φ < φM and τ < τM (e.g, set to 0.1 in Table 2), which models the tendency to forget both positive and negative rewards. ADHD. Recall that ADHD may be involve impairments in storing stimulus-response associations. In our ADHD model, the parameters φ and τ are smaller than normal, φM > φ and τM > τ , which models forgetting of both positive and negative rewards. Note that while this model appears similar to Altzheimer’s model described above, the forgetting factor will be less Table 2: Datasets UCI Datasets Instances Classes Covertype 581 012 7 CNAE-9 1080 9 Internet Advertisements 3279 2 1 025 010 9 Poker Hand pronounced, i.e. the φ and τ parameters are larger than those of the Altzheimer’s model (e.g., 0.2 instead of 0.1, as shown in Table 2). Addiction. As mentioned earlier, addiction is associated with inability to properly forget (positive) stimulus-response associations; we model this by setting the weight on previously accumulated positive reward (“memory” ) higher than normal, τ > τM , e.g. τ = 1, while τM = 0.5. Chronic Pain. We model the reduced responsiveness to rewards in chronic pain by setting α < αM so there is a decrease in the reward representation, and φ > φM so the negative rewards are not forgotten (see table 2). Of course, the above models should be treated only as first approximations of the reward processing biases in mental disorders, since the actual changes in reward processing are much more complicated, and the parameteric setting must be learned from actual patient data, which is a nontrivial direction for future work. Herein, we simply consider those models as specific variations of our general method, inspired by certain aspects of the corresponding diseases, and focus primarily on the computational aspects of our algorithm, demonstrating that the proposed parametric extension of TS can learn better than the baseline TS due to added flexibility. 5 Empirical Evaluation In order to evaluate the proposed framework empirically and compare its performance with the standard Thompson Sampling, we used the following four classification datasets from the UCI Machine Learning Repository1 : Covertype, CNAE-9, Internet Advertisements and Poker Hand. A brief summary of the datasets is listed in Table 2. In order to simulate an infinite data stream, we draw samples randomly without replacement, from each dataset, restarting the process each time we draw the last sample. In each round, the algorithm receives the reward 1 if the instance is classified correctly, and 0 otherwise. We compute the total number of classification errors as a performance metric. Note that we do not use the features (context) here, as we try to simulate the classical multi-arm bandit environment (rather than contextual bandit), and use the class labels only. As the result, we obtain a non-stationary environment, since even if P (reward|context) is fixed, switching from a sample to a sample (i.e., from a context to a context) results into different P (reward) at each time point. In order to test the ability of our models to reflect decision-making biases in various disorders, as well as to evaluate the advantages of our model in comparison with the baseline TS, under different test conditions, we consider the following settings: - Positive reward environment: we modify the reward function so that the agent receives only positive rewards (the lines 11 is not executed). This environment allows us to evaluate how our models deal with positive reward. 1 https://archive.ics.uci.edu/ml/datasets.html Table 3: Average Results Addiction ADHD Alzheimer’s Chronic Pain bvFTD Parkinson M Datasets Positive Environment 51.46 Negative Environment 62.83 Normal Reward Environment 52.81 52.35 52.53 55.06 55.54 53.68 51.48 52.88 55.48 53.11 59.16 56.23 56.03 56.21 49.55 58.01 TS 52.64 55.62 52.74 61.21 50.92 56.95 Table 4: Positive-reward Environment Datasets Internet Advertisements CNAE-9 Covertype Poker Hand Addiction ADHD Alzheimer’s Chronic Pain bvFTD Parkinson M TS 34.06 ± 0.34 40.25 ± 0.85 65.04 ± 0.52 66.5 ± 0.24 31.85 ± 3.51 39.89 ± 2.70 66.5 ± 0.75 71.18 ± 0.12 32.40 ± 1.91 40.08 ± 3.69 66.75 ± 1.52 70.19 ± 1.87 43.61 ± 1.51 40.28 ± 2.27 68.05 ± 1.72 73 ± 1.87 37.69 ± 1.88 40.16 ± 1.99 65.01 ± 1.75 67.73 ± 1.87 38.34 ± 1.77 40.06 ± 1.66 67.08 ± 1.23 77.03 ± 1.87 Addiction ADHD Alzheimer’s Chronic Pain bvFTD Parkinson M TS 41.346 ± 0.21 40.248 ± 0.35 73.26 ± 0.30 96.51 ± 0.35 37.833 ± 1.20 39.97 ± 0.20 71.28 ± 0.32 71.18 ± 0.22 40.76 ± 1.93 39.89 ± 3.49 71.35 ± 1.75 70.19 ± 2.77 41.4 ± 1.17 39.95 ± 1.73 70.5 ± 1.8 73 ± 1.87 33.22 ± 1.7 39.96 ± 1.33 70.05 ± 1.87 67.73 ± 1.51 38.19 ± 1.6 40.02 ± 1.11 69.93 ± 0.83 96.71 ± 1.16 Addiction ADHD Alzheimer’s Chronic pain bvFTD Parkinson M TS 32.28 ± 0.20 40.16 ± 0.38 73.54 ± 0.31 65.29 ± 0.33 36.8 ± 1.28 40.09 ± 0.31 64.27 ± 0.30 73.57 ± 0.33 36.56 ± 1.63 39.99 ± 3.01 63.54 ± 1.30 65.83 ± 2.68 44.69 ± 1.85 40.25 ± 1.71 72.67 ± 1.82 74.44 ± 1.07 33.65 ± 1.81 39.86 ± 1.10 64.61 ± 0.8 65.58 ± 1.62 37.71 ± 0.66 39.78 ± 0.80 64.63 ± 1.87 85.71 ± 1.09 32.96 ± 1.66 39.94 ± 0.73 69.49 ± 1.75 69.14 ± 2.57 55.67 ± 1.68 40.14 ± 2.33 70.62 ± 1.73 70.26 ± 0.81 Table 5: Negative-reward Environment Datasets Internet Advertisements CNAE-9 Covertype Poker Hand 41.08 ± 1.64 40.27 ± 0.23 71.45 ± 1.87 69.14 ± 0.88 42.633 ± 1.23 39.89 ± 1.33 71.34 ± 1.87 70.26 ± 1.19 Table 6: Normal Reward Environment Datasets Internet Advertisements CNAE-9 Covertype Poker Hand 35.53 ± 1.43 39.75 ± 0.28 68.69 ± 1.84 68.49 ± 0.92 28.59 ± 1.76 40.13 ± 1.81 63.69 ± 1.85 65.69 ± 1.01 - Negative reward environment: we modify the reward function so that the agent receives only negative rewards (the lines 10 is not executed). This environment helps to evaluate the negativereward processing by our models. - Normal environment: the agent can see both negative and positive rewards. The average error rate results on the UCI datasets, for each type of the environment, and over 10 runs of each algorithm, are shown in Table 3. We compute the error rate by dividing the total accumulated regret by the number of iterations. The best results for each dataset are shown in bold. Note that our parametric approach always outperforms the standatrd TS method: AD (addiction) model is best in positive reward environment, M (moderate) version is best in negative environment, and bvFTD happens to outperform other models in regular (positive and negative) reward environment. While further modeling and validation on human subjects may be required to validate neuroscientific value of the proposed models, they clearly demonstrate computational advantages over the classical TS approach for the bandit problem. We now present the detailed results for all algorithms and for each of the three environments, in Tables 4, 5, and 6. Lowest errors for each dataset (across each row) are again shown in bold. Note that, in all three environments, and for each of the four datasets, the baseline Thompson Sampling was always inferior to the proposed parametric family of methods, for each specific settings, different versions of our HBTS framework were performing best. Positive Reward Environment. Table 4 summarizes the results for positive reward setting. Note that most versions of the proposed approach frequently outperform the standard Thompson sampling. ADHD model yields best results on two datasets out of four, while AD (addiction) and M (moderate) models are best at one of each remaining datasets, respectively. Note that PD (Parkinson’s) and bvFTD (behavioral-variant fronto-teporal dementia) yield the worst results on most datasets. The behavior of PD model is therefore consistent with the literature on Parkinson’s disease, which suggests, as mentioned earlier, that Parkinson’s patients do not learn as well from positive rewards as they do from negative ones. Ranking the algorithms with respect to their mean error rate, we note that the top three performing algorithms were AD (addiction), ADHD and AZ (Alzheimer’s), in that order. One can hypothesise that these observations are consistent with the fact that those disorders did not demonstrate such clear impairment in learning from positive rewards as, for example, Parkinson’s. Negative Reward Environment. As shown in Table 5, for negative reward environment, we again observe that the proposed algorithms alwyas work better than the state of the art Thompson sampling. Overall, M (moderate) model performs best in this environment, on three out of four datasets. Note that PD (Parkinson’s) and CP (chronic pain) models outperform many other models, performing much better with negative rewards than they did woith the positive ones, which is consistent with the literature discussed before. AD (addiction) is the worst-performing out of HBTS algorithms, which may relate to its bias towards positive-reward driving learning, but impaired ability to learn from negative rewards. Ranking the algorithms with respect to their mean error rate, we note that the two bestperforming algorithms were ADHD and AZ (Alzheimer’s), in that order. Normal Reward Environment. Similarly to the other two environments, the baseline Thompson Sampling is always inferior to the proposed algorithms, as shown in Table 6). Interestingly, model M was never a winner, either, and different disorder models performed best for different data sets. PD and CP show worst performance, suggesting that negative-reward driven learning is impairing. 6 Conclusions This paper proposes a novel parametric family of algorithms for multi-arm bandit problem, extending the classical Thompson Sampling approach to model a wide range of potential reward processing biases. Our approach draws an inspiration from extensive literature on decisionmaking behavior in neurological and psychiatric disorders stemming from disturbances of the reward processing system. The proposed model is shown to consistently outperform the baseline Thompson Sampling method, on all data and experiment settings we explored, demonstrating better adaptation to each domain due to high flexibility of our multi-parameter model which allows to tune the weights on incoming positive and negative rewards, as well as the weights on memories about the prior reward history. Our empirical results support multiple prior observations about reward processing biases in a range of mental disorders, thus indicating the potential of the proposed model and its future extensions to capture reward-processing aspects across various neurological and psychiatric conditions. Our future work directions include extending our model to the more realistic contextual bandit setting, as well as testing the model on human decision making data. References 1. Lai, T.L., Robbins, H.: Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics 6(1) (1985) 4–22 2. Auer, P., Cesa-Bianchi, N., Fischer, P.: Finite-time analysis of the multiarmed bandit problem. Machine Learning 47(2-3) (2002) 235–256 3. Perry, D.C., Kramer, J.H.: Reward processing in neurodegenerative disease. Neurocase 21(1) (2015) 120–133 4. Frank, M.J., Seeberger, L.C., O’reilly, R.C.: By carrot or by stick: cognitive reinforcement learning in parkinsonism. Science 306(5703) (2004) 1940–1943 5. Redish, A.D., Jensen, S., Johnson, A., Kurth-Nelson, Z.: Reconciling reinforcement learning models with behavioral extinction and renewal: implications for addiction, relapse, and problem gambling. Psychological review 114(3) (2007) 784 6. Luman, M., Van Meel, C.S., Oosterlaan, J., Sergeant, J.A., Geurts, H.M.: Does reward frequency or magnitude drive reinforcement-learning in attention-deficit/hyperactivity disorder? Psychiatry research 168(3) (2009) 222–229 7. Taylor, A.M., Becker, S., Schweinhardt, P., Cahill, C.: Mesolimbic dopamine signaling in acute and chronic pain: implications for motivation, analgesia, and addiction. Pain 157(6) (2016) 1194 8. Seeley, W.W., Zhou, J., Kim, E.J.: Frontotemporal dementia: what can the behavioral variant teach us about human brain organization? The Neuroscientist 18(4) (2012) 373–385 9. Hauser, T.U., Fiore, V.G., Moutoussis, M., Dolan, R.J.: Computational psychiatry of adhd: neural gain impairments across marrian levels of analysis. Trends in neurosciences 39(2) (2016) 63–73 10. Dezfouli, A., Piray, P., Keramati, M.M., Ekhtiari, H., Lucas, C., Mokri, A.: A neurocomputational model for cocaine addiction. Neural computation 21(10) (2009) 2869–2893 11. Hess, L.E., Haimovici, A., Muñoz, M.A., Montoya, P.: Beyond pain: modeling decision-making deficits in chronic pain. Frontiers in behavioral neuroscience 8 (2014) 12. Auer, P., Cesa-Bianchi, N.: On-line learning with malicious noise and the closure algorithm. Ann. Math. Artif. Intell. 23(1-2) (1998) 83–99 13. Auer, P., Cesa-Bianchi, N., Freund, Y., Schapire, R.E.: The nonstochastic multiarmed bandit problem. SIAM J. Comput. 32(1) (2002) 48–77 14. Bouneffouf, D., Féraud, R.: Multi-armed bandit problem with known trend. Neurocomputing 205 (2016) 16–21 15. Chapelle, O., Li, L.: An empirical evaluation of thompson sampling. In: Advances in neural information processing systems. (2011) 2249–2257 16. Thompson, W.: On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika 25 (1933) 285–294 17. Agrawal, S., Goyal, N.: Analysis of thompson sampling for the multi-armed bandit problem. In: COLT 2012 - The 25th Annual Conference on Learning Theory, June 25-27, 2012, Edinburgh, Scotland. (2012) 39.1–39.26 18. Bouneffouf, D.: Freshness-aware thompson sampling. In: Neural Information Processing - 21st International Conference, ICONIP 2014, Kuching, Malaysia, November 3-6, 2014. Proceedings, Part III. (2014) 373–380 19. Schulz, E., Konstantinidis, E., Speekenbrink, M.: Learning and decisions in contextual multi-armed bandit tasks. In: In Proceedings of the 37th annual conference of the cognitive science society. (2015) 2204–2212 20. Thompson, W.R.: On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika 25(3/4) (1933) 285–294
2cs.AI
A short note on Simulation and Abstraction Chris Hankin Institute for Security Science and Technology Imperial College London, UK [email protected] This short note is written in celebration of David Schmidt’s sixtieth birthday. He has now been active in the program analysis research community for over thirty years and we have enjoyed many interactions with him. His work on characterising simulations between Kripke structures using Galois connections was particularly influential in our own work on using probabilistic abstract interpretation to study Larsen and Skou’s notion of probabilistic bisimulation. We briefly review this work and discuss some recent applications of these ideas in a variety of different application areas. 1 Introduction Since his earliest contributions on state transition machines for lambda calculus expressions [13], David Schmidt has been at the forefront of research in programming language theory, particularly program analysis. His work on program analysis started through his collaboration with Neil Jones. No doubt partly inspired by Patrick and Radhia Cousot’s work on abstract interpretation [2], he has made a study of various aspects of Galois connections. An early contribution was [7]. A later example, which was influential in our own work, was [15] where he shows how to characterise simulation relations using Galois Connections. The early work of our group was also inspired by the Cousots [1]. Over the last fourteen years, we have been working on the analysis of probabilistic and quantitative programming languages and systems [12]. This has led to a framework called probabilistic abstract interpretation (PAI). Rather than using lattices and Galois Connections, PAI uses Hilbert Spaces and Moore-Penrose Pseudo Inverses. Inspired by [15], we have used PAI to characterise probabilistic bisimulation [8, 10]; we demonstrated the probabilistc analogue of Dave’s earlier results which amounted to characterising Larsen and Skou’s probabilistic bisimulation [5] using Moore-Penrose Pseudo Inverses. A major feature of our approach is that it becomes natural to introduce a notion of approximate bisimulation – this has proved to be very useful in studies of language-based security [9]. The author first met David Schmidt nearly thirty years ago. He visited Imperial College whilst developing the work in [7], his visit coincided with our own work on the ideas in [1]. We found a lot to talk about and it was the start of many further interactions. In addition to his scientific contributions, he has always given time to developing text books; his [14] was used to educate several generations of Imperial students in the principles of programming language design. The author has also worked with Dave on many programme committees; perhaps the high point was when they were co-General Chairs of POPL in 2001. Dave has a had a long and successful career and we wish him many more years. The author would like to add his congratulations to Dave on this important milestone. A. Banerjee, O. Danvy, K.-G. Doh, J. Hatcliff (Eds): David A. Schmidt’s 60th Birthday Festschrift EPTCS 129, 2013, pp. 337–340, doi:10.4204/EPTCS.129.20 Simulation and Abstraction 338 2 Simulation and Galois Connections In [15], Dave addresses, inter alia, the question of characterising simulation relations between Kripke structures using Galois connections. Recall that we define (L, α , γ , M) to be a Galois connection between the complete lattices (L, ⊑) and (M, ⊑) if and only if α : L → M and γ : M → L are monotone functions that satisfy: γ ◦ α ⊒ idL α ◦ γ ⊑ idM For Kripke structures C = hΣC , →C , IC i and A = hΣA , →A , IA i, a binary relation R ⊆ ΣC × ΣA is a simulation of C by A (C ⊳R A), if for every c ∈ ΣC , a ∈ ΣA : if c R a and c →C c′ then ∃a′ ∈ ΣA [a →A a′ and c′ R a′ ] In the framework studied in [15], the concrete Kripke structures are often infinite state structures representing programs and the abstract Kripke structures are some program analysis. In this setting, we should abstract sets of states of the concrete structure to a single state in the abstract structure. Given a Galois connection, (α : P(ΣC ) → ΣA , γ : ΣA → P(ΣC )), we can construct the relation, R(α ,γ ) ⊆ P(ΣC ) × ΣA : S R(α ,γ ) a if and only if α (S) ⊑A a This can be shown to be the suitable basis for a simulation relation. Whilst [15] achieves much more than described here, it was these ideas that inspired our own work on probabilistic bisimulation (originally introduced by Larsen and Skou [5]) for reactive systems (also called fully probabilistic systems): Definition 1 A probabilistic bisimulation is an equivalence relation ∼b on states of a probabilistic transition system satisfying for all actions a ∈ A: p ∼b q and p →a π ⇔ q →a ρ and π ∼b ρ . where π and ρ are distributions of states. . 3 Probabilistic Bisimulation and Moore-Penrose Pseudo Inverses In [10, 8] we introduced an approximate version of bisimulation and confinement where the approximation can be used as a measure ε for the information leakage of the system under analysis. We represented probabilistic transition systems by linear operators, i.e. by their transition matrices M. In the case of probabilistic programs and systems these matrices M are the usual well known stochastic matrices which are the generators of the corresponding Markov chains (for details see [10, 8]). We then showed that two systems M1 and M2 are bisimilar if there exist simplified, or abstracted, versions of M1 and M2 , represented by matrices M#1 and M#2 , such that M#1 = M#2 . In the probabilistic Chris Hankin 339 abstract interpretation setting that we use, a bounded linear operator and its Moore-Penrose Pseudo Inverse are the analogue of the adjoined pair of monotonic functions in a Galois insertion. The abstract systems are obtained by lumping states, i.e. by identifying each concrete state si with a class C j of states which are all behavioural equivalent to each other. Concretely, we compute this via n × m matrices K (where n is the number of concrete states and m the number of abstract classes) with Kij = 1 iff si ∈ C j and 0 otherwise. We refer to such matrices which have exactly one entry 1 in each row while all other entries are 0 as classification matrices, and denote the set of all classification matrices by K . The abstract systems are then given by M#i = K†i Mi Ki with Ki some classification matrix and † constructing the so called Moore-Penrose pseudo-inverse – in the case of classification matrices K† can be constructed as the row-normalised transpose of K. The problem of showing that two systems M1 and M2 are behaviourally equivalent, i.e. are (probabilistically) bisimilar, is now translated into finding two classification matrices Ki ∈ K such that M#1 = K†1 M1 K1 = K†2 M2 K2 = M#2 . In case that two systems are not bisimilar we can still define a quantity ε which describes how (non-)bisimilar the two systems are. This ε is formally defined in terms of the norm of a linear operator representing the partition induced by the ‘minimal’ bisimulation on the set of the states of a given system, i.e. the one minimising the observational difference between the system’s components (see again [10] for further details, in particular regarding labeled probabilistic transition systems): Definition 2 Let M1 and M2 be the matrix representations of two probabilistic transition systems. We say that M1 and M2 are ε -bisimilar, denoted by M1 ∼εb M2 , iff inf K1 ,K2 ∈K kK†1 M1 K1 − K†2 M2 K2 k = ε where k.k denotes an appropriate norm, e.g. the supremum norm k.k∞ . In [10] we show that, when ε = 0 this gives the standard notion of probabilistic bisimulation. 4 Conclusion This short note has sketched some early work by David which forms part of his deep study of the use of Galois connections and relations in program analysis. Our own work on characterising probabilistic bisimulation using probabilistic abstract interpretation has found a number of applications, including: • the detection and removal of timing channels in probabilistic transition systems [11] – we study a concept called probabilistic time bisimilarity and use it to detect timing channels; • the detection of sub-communities in social media [6] – we evaluate a number of algorithms including one using the notion of stability from [3] which effectively lumps nodes together if their mutual interactions are “stronger” than interactions outside the group; and • the abstraction of stochastic and Bayesian games to provide decision support in cyber security [4] – where we hope to apply probabilistic abstract interpretation directly to the underlying probabilistic transition systems in the games, thereby developing a principled way of reducing the state spaces to achieve tractability of game solutions. We look forward to discussing some of this work with David in the future but, in the meantime, reiterate our best wishes on this important anniversary. Simulation and Abstraction 340 5 Acknowledgements Much of the work discussed above was done in collaboration with Alessandra Di Pierro and Herbert Wiklicky. More recently, I have enjoyed working on the application of these ideas to other areas with Erwan Le Martelot and Pasquale Malacaria. References [1] Geoffrey L. Burn, Chris Hankin & Samson Abramsky (1986): Strictness Analysis for Higher-Order Functions. Sci. Comput. Program. 7(3), pp. 249–278, doi:10.1016/0167-6423(86)90010-9. [2] Patrick Cousot & Radhia Cousot (1977): Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In: POPL, ACM, pp. 238–252, doi:10.1145/512950.512973. [3] Jean-Charles Delvenne, Sophia Yaliraki & Mauricio Barahona (2010): Stability of graph communities across time scales. Proc. Nat. Acad. Sci. 107(29), pp. 12755–12760, doi:10.1073/pnas.0903215107. [4] Chris Hankin & Pasquale Malacaria (2013): Payoffs, Intensionality and Abstraction in Games. In: Computation, Logic, Games, and Quantum Foundations - The Many Facets of Samson Abramsky, Lecture Notes in Computer Science 7860, Springer, doi:10.1007/978-3-642-38164-5-6. [5] Kim Guldstrand Larsen & Arne Skou (1989): Bisimulation Through Probabilistic Testing. In: POPL, ACM, pp. 344–352, doi:10.1145/75277.75307. [6] Erwan Le Martelot & Chris Hankin (2013): Fast Multi-Scale Detection of Relevant Communities in LargeScale Networks. Computer Journal, doi:10.1093/comjnl/bxt002. [7] Austin Melton, David A. Schmidt & George E. Strecker (1986): Galois Connections and Computer Science Applications. In: CTCS, Lecture Notes in Computer Science 240, Springer, pp. 299–312, doi:10.1007/3-540-17162-2-130. [8] Alessandra Di Pierro, Chris Hankin & Herbert Wiklicky (2003): Quantitative Relations and Approximate Process Equivalences. In: CONCUR, Lecture Notes in Computer Science 2761, Springer, pp. 498–512, doi:10.1007/978-3-540-45187-7-33. [9] Alessandra Di Pierro, Chris Hankin & Herbert Wiklicky (2004): Approximate Non-interference. Journal of Computer Security 12(1), pp. 37–82. [10] Alessandra Di Pierro, Chris Hankin & Herbert Wiklicky (2005): Measuring the confinement of probabilistic systems. Theor. Comput. Sci. 340(1), pp. 3–56, doi:10.1016/j.tcs.2005.03.002. [11] Alessandra Di Pierro, Chris Hankin & Herbert Wiklicky (2011): Probabilistic timing covert channels: to close or not to close? Int. J. Inf. Sec. 10(2), pp. 83–106, doi:10.1007/s10207-010-0107-0. [12] Alessandra Di Pierro & Herbert Wiklicky (2000): Concurrent constraint programming: towards probabilistic abstract interpretation. In: PPDP, ACM, pp. 127–138, doi:10.1145/351268.351284. [13] David A. Schmidt (1980): State transition machines for lambda calculus expressions. In: SemanticsDirected Compiler Generation, Lecture Notes in Computer Science 94, Springer, pp. 415–440, doi:10.1007/3-540-10250-7-32. [14] David A. Schmidt (1986): Denotational semantics: a methodology for language development. Allyn and Bacon. [15] David A. Schmidt (1999): Binary relations for abstraction and refinement. In: Workshop on Refinement and Abstraction.
6cs.PL
Vulnerability of Deep Learning Richard Kenway∗ arXiv:1803.06111v1 [stat.ML] 16 Mar 2018 School of Physics and Astronomy, University of Edinburgh, James Clerk Maxwell Building, Peter Guthrie Tait Road, Edinburgh EH9 3FD, UK (Dated: March 19, 2018) The Renormalisation Group (RG) provides a framework in which it is possible to assess whether a deep-learning network is sensitive to small changes in the input data and hence prone to error, or susceptible to adversarial attack. Distinct classification outputs are associated with different RG fixed points and sensitivity to small changes in the input data is due to the presence of relevant operators at a fixed point. A numerical scheme, based on Monte Carlo RG ideas, is proposed for identifying the existence of relevant operators and the corresponding directions of greatest sensitivity in the input data. Thus, a trained deep-learning network may be tested for its robustness and, if it is vulnerable to attack, dangerous perturbations of the input data identified. I. A. INTRODUCTION The Threat to Deep Learning Despite many successful applications, deep learning [1– 3] is poorly understood. The absence of an underlying theory means that we cannot be certain under what circumstances a given trained network will operate correctly and this uncertainty calls into question the use of such networks in safety-critical applications. There is also the possibility that slightly perturbed input data can be constructed that would fool the network, but not a human, making the network susceptible to adversarial attack, or simply cause it to misclassify and thereby conceal information in the data [4]. It is important to distinguish between ambiguous data, which any system, machine or human, would find difficult to classify and data that has been imperceptibly altered to cause the deep network to misclassify it. This paper introduces a theoretical framework, based on the Renormalisation Group (RG), which specifies the conditions under which the latter may occur and proposes a calculational method for testing a trained network for this vulnerability. Further, it determines the directions in the space of input data along which small perturbations are amplified by such a vulnerable deep network, causing it to generate a qualitatively incorrect output. The theoretical framework captures the salient features of deep learning: the multi-layer structure, trained one layer at a time. It is demonstrated for the specific case in which each layer is a Restricted Boltzmann Machine (RBM) [3] and the network is trained to classify a data set {x} in terms of outputs {y}, whose exact conditional probability distribution is p(y|x). However, the approach may be extended straightforwardly to other deep networks and to data generation as well as classification. ∗ Email address: [email protected] B. Analogy with the Renormalisation Group The formal analogy between deep learning and the RG has been noted before, although with some controversy about whether the context should be unsupervised, or supervised learning [5–7]. There are more fundamental issues. The first is that the RG applied to critical phenomena describes how features of the microscopic degrees of freedom of a system (analogous to the input data {x}) depend on length scale, successively eliminating shortdistance fluctuations and generating a sequence of effective Hamiltonians, which describe the surviving features on larger and larger length scales. A critical point is associated with scale-invariant fluctuations and convergence of the sequence of effective Hamiltonians to a fixed-point Hamiltonian which describes them. Although many applications of deep learning do involve data which exhibit structure on different length scales, e.g., data drawn from the physical world, and this appears to be captured by deep learning so that it is “cheap” [6], this need not be the case. The second is that the RG transformation effected by each layer of the network may be different, reflecting the emergence of different types of features in the data, whereas in critical phenomena each application of the RG transformation changes the length scale by a fixed amount. We will assume that training of the deep network converges to a conditional probability distribution that is a good approximation to p(y|x), provided there is sufficient number of layers. Thus, the sequence of RG transformations corresponding to applying the RBM in each layer to the output from the hidden nodes in the previous layer, starting with the input data, converges. Presumably, some more generalised form of scaling takes place in deep learning and we will assume that this has the effect of successively scaling to smaller values all but a finite number of eigenvalues of the Fisher Information Matrix (FIM) of the trained deep network, so that its spectrum is sloppy [8]. We will say more about this in Section IV. In Section II we introduce the RG formalism in the 2 context of a deep RBM network used for classification and, in particular, define the sequence of effective Hamiltonians whose fixed points and universality classes define distinct outputs. In Section III we develop the computational scheme, based on Monte Carlo RG [9, 10], for estimating the stability of these fixed points with respect to the depth of the network. Section IV relates the instability of a particular fixed point to direction(s) in the input data space {x}, along which small changes in the data cause major changes in the output probability distribution and, hence, are sources of vulnerability. II. RENORMALISATION GROUP FOR DEEP LEARNING Consider a layered network of N RBMs with input nodes h0 , N −1 layers of hidden nodes hk , k = 1, . . . , N − 1, and output nodes hN . For example, the hidden nodes may be binary vectors of the same dimension as the input data {x} and the outputs {y}, and the joint probability distribution for the k th layer is of the form [3] T tk (hk , hk−1 ) = T T ehk Wk hk−1 +ak hk +bk hk−1 , zk T T T zk = Trhk ,hk−1 ehk Wk hk−1 +ak hk +bk hk−1 , (1) where Wk , ak and bk are weights determined by the layerwise training. We will not require the precise form of tk . The trained deep RBM network generates the probability distribution for the output y given input data x, qN (y|x), iteratively for k = 1, . . . , N through qk (hk |x) = Trhk−1 tk (hk |hk−1 )qk−1 (hk−1 |x), q0 (h0 |x) = δh0 ,x , qN (y|x) ≈ p(y|x), (2) At this point, it is worth noting that the input data x determines the couplings in the space of effective Hamiltonians via the first layer, (1) e−Hx (1) Zx tk (hk , hk−1 ) . Trhk tk (hk , hk−1 ) (3) We define the effective Hamiltonian for the k by (k) qk (h|x) = e−Hx th layer (h) , (k) Zx (k) Zx(k) = Trh e−Hx (h) (4) . Then, the sequence of Hamiltonians is generated by the RBMs in each layer via (k+1) e−Hx (h) (k+1) Zx (k) = Trh′ tk+1 (h|h′ ) e−Hx (h′ ) (k) Zx , (5) such that each Hamiltonian depends only on the previous one in the sequence. This has the same form as an RG transformation with kernel tk+1 [5]. = t1 (h|x), (6) and the couplings in each subsequent layer are functions solely of the couplings in the previous layer. We parametrise the space of effective Hamiltonians in terms of a complete set of operators Oα (h), which, in the case of binary variables, consist of all possible products of the components of h, with couplings gα . Thus, the effective Hamiltonian for layer k is X Hx(k) (h) = gα(k) Oα (h). (7) α Then the effect of the RG transformation in eq. (5) is to define {g (k+1) } solely in terms of {g (k) } and, thereby, to generate a flow in the coupling-constant space of the effective Hamiltonians. The key assumption we make is that the training of the deep RBM network converges, so that, for N large enough, the sequence of effective Hamiltonians converges to a fixed point: X Hx∗ (h) = (8) gα∗ Oα (h), α such that ∗ e−Hx (y) = qN (y|x) ≈ p(y|x). Zx∗ (9) The analogue of the RG universality class of the fixed point Hx∗ is the subset of the input data, Cx , which are associated with the same output distribution, p(y|x). Thus, assuming the training correctly classifies the data, where, according to Bayes Theorem, tk (hk |hk−1 ) = (h) x, x′ ∈ Cx ⇒ Hx∗ = Hx∗′ (10) p(y|x) 6= p(y|x′ ) ⇒ Hx∗ 6= Hx∗′ , (11) and so that there must be more than one fixed point. In any non-trivial classification problem, there is a distinct fixed point of the correctly trained deep network for every distinct output. Next, we consider the flow in coupling-constant space close to a fixed point and, in particular, the stability properties of the fixed point as the number of layers is increased. We assume that the deeper the network the more accurately it is able to learn the classification problem. Close to the fixed point {g ∗ }, the relationship between the couplings in adjacent layers is, to leading order, gα(k+1) ({g (k) }) = gα(k+1) ({g ∗ }) (k+1) X (k) ∂gα + (gβ − gβ∗ ) (k) ∂gβ β . (12) {g∗ } 3 (k+1) Since gα ({g ∗ }) = gα∗ , this becomes X (k) ∗ gα(k+1) − gα∗ = Tαβ (gβ − gβ∗ ), (13) β where (k+1) ∗ Tαβ = ∂gα (14) (k) ∂gβ {g∗ } is the stability matrix of the fixed point. The stability properties of a fixed point determine whether it becomes sensitive to small changes in the input data as the number of layers is increased. Define the eigenvalues and eigenvectors of the stability matrix by X (µ) ∗ (15) Tαβ φβ = Λµ φ(µ) α the hidden nodes and output nodes for a given input, but don’t enable us to construct the sequence of effective Hamiltonians, or the fixed-point Hamiltonian. In the next section, we will explain how Monte Carlo RG methods may be used to estimate the stability matrix ∗ Tαβ , defined in eq. (14), and how its eigenvalues behave in deep networks close to the fixed point. This will be sufficient to determine whether a particular trained deep network has any fixed points with relevant operators. It is worth noting that the existence of multiple fixed points (associated with a non-trivial classification problem) does not imply the existence of relevant operators at any of the fixed points. In the robust situation, where no fixed point has a relevant direction, data close to the boundary between two universality classes are simply ambiguous and do not represent a source of adversarial attack (because a human would be equally likely to misclassify them). β and express the couplings, gα , and the corresponding operators, Oα (h), in the basis of eigenvectors of the stability matrix as X gα = (16) φ(µ) α g̃µ , µ Õµ (h) = X φ(µ) α Oα (h). (17) α Then the effective Hamiltonian in this basis is X Hx(k) = g̃µ(k) Õµ (h) (18) µ and, close to the fixed point, from eqs (13) and (15), X Hx(k+1) − Hx∗ = (g̃µ(k+1) − g̃µ∗ )Õµ (h) III. STABILITY OF DEEP LEARNING Having trained a deep network of RBMs on a classification problem whose exact solution is p(y|x), we have available a sequence of RBMs given, for example, by eq. (1), which enables us to use the conditional probability distributions in eq. (2) to sample the hidden nodes in each layer and the output layer. Using this capability, we apply methods developed for Monte Carlo RG [9, 10] to estimate the stability matrix for each fixed point in the space of effective Hamiltonians. Denote by hOγ i(k) the expectation value of the operator Oγ with respect to the effective Hamiltonian in layer k, eq. (4), i.e., hOγ i(k) = Trh Oγ (h)qk (h|x) µ = X Λµ (g̃µ(k) − g̃µ∗ )Õµ (h). (k) = (19) Trh Oγ (h)e−Hx . (k) Zx µ In the language of the RG, if Λµ > 1, Õµ (h) is relevant and, if Λµ < 1, it is irrelevant. In the context of deep learning, the existence of a relevant operator at a fixed point creates a sensitivity to input data which generate a non-zero coupling to this operator. Such data will lead to a probability distribution for the output which increasingly deviates from the fixed-point distribution as the network is made deeper (more layers are added). This is the source of vulnerability of deep networks to tiny changes in the input data which excite a relevant operator, leading to the sequence of effective Hamiltonians converging to the wrong fixed point, i.e., misclassifying the data. As it stands, this provides an explanation of the potential vulnerability of deep networks, but doesn’t help to diagnose whether a particular network is susceptible. This is because, in practice, we only have access to the RBM weights, e.g., eq. (1), which enable us to sample (h) (20) We start from the chain rule applied to hOγ i(k+1) close to a fixed point (i.e., k ≈ N for N large), ∂hOγ i(k+1) (k) ∂gβ = X ∂gα(k+1) ∂hOγ i(k+1) (k) α = X α ∂gβ (k+1) ∂gα (k+1) (k+1) ∂hOγ i . (k+1) ∂gα Tαβ (21) (k+1) Here Tαβ is the approximation to the stability matrix ∗ Tαβ in eq. (14) obtained from the k th layer, which should ∗ converge to Tαβ for large k. Differentiating eq. (20) and using eq. (7), we obtain for the term on the RHS of eq. (21) ∂hOγ i(k+1) (k+1) ∂gα = hOγ i(k+1) hOα i(k+1) − hOγ Oα i(k+1) . (22) 4 To obtain a similar expression for the term on the LHS of eq. (21), we need to use tk+1 , the RBM for layer k + 1, to (k+1) (k) relate Hx to Hx , as in eq. (5). In Monte Carlo RG, this is where the RG blocking step enters. We obtain ∂hOγ i(k+1) (k) ∂gβ = hOγ i(k+1) hOβ i(k) −Trhh′ Oγ (h)tk+1 (h|h′ )Oβ (h′ )qk (h′ |x) = hOγ i(k+1) hOβ i(k) − hOγ tk+1 Oβ i(k) . (23) Thus, with a suitable choice of operators, given a specific input x, by sampling the hidden nodes in the upper layers of the network (large k) and computing a set of expectation values of these operators, we can construct a set of linear equations for the elements of the stability (k+1) ∗ matrix, Tαβ ≈ Tαβ , X α (k+1) Tαβ h i hOγ i(k+1) hOα i(k+1) − hOγ Oα i(k+1) = hOγ i(k+1) hOβ i(k) − hOγ tk+1 Oβ i(k) . (24) Hence, we may obtain a set of successive approximations (µ) for the eigenvalues Λµ and eigenvectors φα in eq. (15). By varying the subset of operators used in eq. (24), we can test the convergence of the estimates of the largest eigenvalues of the stability matrix associated with a given layer of the network and, by computing the eigenvalues from successive layers, we can investigate whether increasing depth of the network is associated with scaling behaviour of the corresponding operators, as in eq. (19). If this scaling behaviour is due to an eigenvalue of magnitude greater than one, then even a tiny component of the initial data, which creates a non-zero coupling to the corresponding eigenvector, will cause instability of the fixed point if the network is deep. In the next section, we will explain how to identify the specific perturbation of the data which does this. admixture of this component in the data will lead to erroneous classification if the network is too deep. The FIM is defined in terms of the Kullback-Liebler divergence, DKL , which is itself a measure of how distinguishable two probability distributions p1 and p2 are, using data sampled from p1 :   p1 (x) DKL (p1 ||p2 ) = Trx p1 (x) log . (25) p2 (x) This enables us to measure the dependence of qN (y|x) on x by considering two nearby data points, x and x′ , and expanding the Kullback-Liebler divergence as a Taylor series in their difference [8],   qN (y|x) ′ DKL (qN (y|x)||qN (y|x )) = Try qN (y|x) log qN (y|x′ ) X 1 = (x′i − xi )Fij(N ) (x′j − xj ) 2 ij +..., (26) where, using eqs (4), (7) and (20), ∂2 DKL (qN (y|x)||qN (y|x′ )) ∂x′i ∂x′j x′ =x  (N )  (N )  (N ) (N ) (N ) (N ) ∂Hx ∂Hx ∂Hx(N ) ∂Hx = − ∂xi ∂xj ∂xi ∂xj X ∂g (N ) ∂g (N′ ) α α [hOα Oα′ i(N ) − hOα i(N ) hOα′ i(N ) ] = ∂xi ∂xj ′ Fij(N ) = αα (27) is the FIM. Having chosen a subspace of operators, {Oα }, in which to express the effective Hamiltonians in each layer of the network (via eq. (7)), such that sufficiently precise estimates of the largest eigenvalues of the stability matrix (k+1) associated with each layer, Tαβ , are obtained by the method in Section III, we can compute the FIM using the chain rule: (1) IV. (N ) i ∂g Xh ∂gα β = . T (N ) . . . T (2) ∂xi αβ ∂xi GENERATION OF ADVERSARIAL DATA (28) β We consider the exact conditional probability distribution, p(y|x), and hence the trained network, qN (y|x), to be parametrised by the input data, x, via the fixed-point Hamiltonian in eqs (8) and (9). The Fisher Information Matrix (FIM) [8, 11] is a metric which measures how a probability distribution changes along different directions in parameter space. If the fixed-point Hamiltonian has an unstable direction due to a relevant operator, then this will correspond to the direction in parameter space along which the probability distribution changes fastest, i.e., the stiffest direction. Hence, to generate adversarial data we need to compute the eigenvector associated with the largest eigenvalue of the Fisher information matrix for the fixed-point probability distribution. A tiny The last derivative may be computed from eq. (6) and the explicit form of the RBM for the first layer, e.g., T eq. (1), by expressing hT 1 W1 x + a1 h in terms of {Oα } (1) to determine gβ (x). Alternatively, we may solve the system of linear equations in eq. (24) for the first layer: X α (1) i ∂gα h hOγ i(1) hOα i(1) − hOγ Oα i(1) ∂xi = Trh Oγ (h) ∂ t1 (h|x). ∂xi (29) Thus, computing the FIM involves translating the input data into the chosen coupling-constant subspace via the 5 RBM in the first layer, taking the product of the stability matrices associated with each layer in eq. (28), and computing a set of expectation values of operators in this subspace using the full network. The fact that the FIM is built from the product of stability matrices connects the scaling behaviour in eqs (13) and (19) with the sloppiness of the FIM spectrum observed in [8], i.e., all but a fixed number of eigenvalues of the FIM are scaled to very small values, resulting in a fixed number of stiff (relevant) directions and many sloppy (irrelevant) directions. We may then obtain the eigenvector corresponding to the largest eigenvalue of the FIM. For deep networks which have an unstable fixed point, small perturbations of the corresponding input data in the direction of this eigenvector of the FIM are likely to result in the data being misclassified. V. CONCLUSIONS In this paper we have extended the formal analogy between deep learning and the RG. This enabled us to interpret the classification problem in terms of a sequence of effective Hamiltonians associated with the layers of the network, whose couplings are determined by the input data, and the convergence of this sequence to a distinct fixed point for each distinct output of the classification problem. Input data with the same classification should all result in a flow in the coupling-constant space of these effective Hamiltonians which converges to the same fixed [1] G.E. Hinton, S. Osindero and Y-W. Teh, Neural Comput., 18, 1527 (2006). [2] Y. LeCun, Y. Bengio and G. Hinton, Nature, 521, 436 (2015). [3] R. Salakhutdinov, Annu. Rev. Stat. Appl., 2, 361 (2015). [4] X. Yuan, P. He, Q. Zhu, R.R. Bhat and X. Li, Adversarial Examples: Attacks and Defenses for Deep Learning, arXiv:1712.07107. [5] P. Mehta and D.J. Schwab, An exact mapping between the Variational Renormalization Group and Deep Learning, arXiv:1410.3831. point. This exposed the possibility that a fixed point might have an unstable direction, associated with a relevant operator in the language of the RG. Small perturbations of the input data that create a non-zero overlap with such a relevant operator tend to be amplified exponentially by successive layers of the network, so that the flow diverges from the correct fixed point and the data may be misclassified. Fixed points with no relevant operators are not prone to this sort of error and will only misclassify data that is ambiguous even to a human. Convergence of the sequence of effective Hamiltonians to a fixed point for a given subset of the input data is guaranteed by the training (assuming this converges to a good approximation to the exact conditional probability distribution). The existence of a relevant direction at the fixed point is associated with sensitivity to perturbations which take the data outside of this subset. The size of the amplification factor for the perturbation is greater the greater the depth of the network. Hence, the vulnerability to misclassification is directly due to the depth of a network. The key result of this paper is a method for diagnosing whether a given trained network is vulnerable to adversarial attack, or simply misclassification due to noise in the data, based only on computing expectation values of operators in the hidden and output layers. The computations are fairly demanding, but may be justified for a network that is intended for use in safety-critical applications. [6] H.W. Lin, M. Tegmark and D. Rolnick, J. Stat. Phys., 168, 1223 (2017). [7] D.J. Schwab and P. Mehta, Comment on “Why does deep and cheap learning work so well?”, arXiv:1609.03541. [8] B.B. Machta, R. Chachra, M. Transtrum and J.P. Sethna, Science 342, 604 (2013). [9] S-K. Ma, Phys. Rev. Lett., 37, 461 (1976). [10] R.H. Swendsen, Phys. Rev. Lett., 42, 859 (1979). [11] A. Raju, B.B. Machta and J.P. Sethna, Information geometry and the renormalization group, arXiv:1710.05787.
2cs.AI
Data-flow Analysis of Programs with Associative Arrays∗ David Hauzar, Jan Kofroň, and Pavel Baštecký Department of Distributed and Dependable Systems Faculty of Mathematics and Physics, Charles University in Prague Czech Republic {hauzar, kofron}@d3s.mff.cuni.cz, [email protected] Dynamic programming languages, such as PHP, JavaScript, and Python, provide built-in data structures including associative arrays and objects with similar semantics—object properties can be created at run-time and accessed via arbitrary expressions. While a high level of security and safety of applications written in these languages can be of a particular importance (consider a web application storing sensitive data and providing its functionality worldwide), dynamic data structures pose significant challenges for data-flow analysis making traditional static verification methods both unsound and imprecise. In this paper, we propose a sound and precise approach for value and points-to analysis of programs with associative arrays-like data structures, upon which data-flow analyses can be built. We implemented our approach in a web-application domain—in an analyzer of PHP code. 1 Introduction Dynamic languages are often used for the development of security-critical applications, in particular web applications. To assure a reasonable level of reliability, various static analyses such as security analysis and bug finding are applied. In these cases, data-flow analysis is a necessary prerequisite. Unfortunately, dynamic features pose major challenges here. For instance, any interprocedural data-flow analysis needs to track types of variables to determine targets of virtual method calls. This becomes even more important in the case of languages with dynamic type systems, where types of variables can be completely unspecified. Moreover, names of methods to be called or files to be included can be computed at run-time. Next, all these data can be manipulated using built-in dynamic data structures, such as multi-dimensional associative arrays and objects with similar semantics—object properties can be created at run-time and accessed via arbitrary expressions, e.g., variables. This happens relatively often, e.g., in web applications, which manipulate a lot of input. Tracking values of variables and analysing the shape of these data structures is thus essential for data-flow analysis of dynamic languages. In this paper we present our approach to these challenges. Our contribution includes: (1) value and points-to analysis of associative arrays with an arbitrary depth and accessible using statically unknown values and arbitrary expressions, (2) modeling explicit aliases, and (3) a prototype implementation. 2 Motivation and Overview In this section, we show some dynamic features that impact the data-flow analysis and present an overview of our approach. We use PHP as the representative of a dynamic language; However, other languages, especially those connected with the development of web applications, provide built-in associative arrays-like data structures. These languages includes Java-script, Python, Ruby, etc. Moreover, libraries of “ordinary” programming languages emulate some of these features and offer the developer API behaving in a similar way. Hence, our approach is not limited to PHP. For the illustration of our concepts, we use the code in Fig. 1 as a running example. ∗ This work was partially supported by the Grant Agency of the Czech Republic project 14-11384S and by Charles University Foundation grant 431011 and by Charles University institutional funding SVV-2014-260100. J. Pang and Y. Liu (Eds.): 3rd International Workshop on Engineering Safety and Security Systems 2014 (ESSS 2014) EPTCS 150, 2014, pp. 56–70, doi:10.4204/EPTCS.150.6 c D. Hauzar, J. Kofroň, P. Baštecký This work is licensed under the Creative Commons Attribution License. D. Hauzar, J. Kofroň, P. Baštecký 1 2 3 4 5 6 7 8 9 10 57 $any = $ GET[’user input’]; // an arbitrary user input $alias = 1; $alias2 = 1; $alias3 = 1; if ($any) { $arr[$any] = &$alias; $t = $arr[1]; // t can be either undefined or can have value 1 $t[2] = 2; // can update also $alias[2] and e.g. $arr[1][2] $arr[1][2] = 3; $arr[1][3] = 4; $arr[2][3] = 5; } else { $arr[$any][2] = 6; $arr[1][$any] = 7; // can update also some of variables involved by the previous update 11 12 13 } 14 15 16 17 18 19 20 $arr[2][1] = &$alias2; // $arr[2][1] and $alias2 can be aliased also with $alias[1] $arr[2] = &$alias3; $arr2 = $arr; // deep−copies $arr, including aliases $arr2[2] = 8; // updates also $arr[2] and $alias3 $arr2[3] = 9; // can update also $arr[3] and $alias $arr[$any] = arr2; Figure 1: Running example. 2.1 Variables, Arrays, and Objects Variables as well as indices and object properties need not be declared. If a specified index exists in an array, it is overwritten; if not, it is created. At line 7 in Fig. 1, a new array is created in $arr and index 2 is added to this array. Next, at line 8, index 3 is added to this array. Arrays can have an arbitrary depth. Unfortunately, updates of such structures cannot be decomposed. That is, splitting the update at line 7 into two updates at lines 5-6 results in different semantics. The first reason is that the array assignment statement deep-copies the operand. The update at line 6 thus does not update the array stored at $arr[1], but its copy. The second reason is that while updates create indices if they do not exist, read accesses do not; while the update at line 7 creates an index containing an array in $arr[1] in the case it does not exist, the read access at line 5 returns null in this case and the update at line 6 fails. The semantics of the PHP object model is similar to the semantics of associative arrays. Objects’ properties need not to be declared. If a non-existing property is written, it is created. As well as indices, properties can be accessed via arbitrary expressions. Objects can also have an arbitrary depth in the sense of reference chains. In the following, we describe associative arrays, however, the same principles apply to objects as well. We write associative arrays-like data structures to emphasize this fact. 2.2 Dynamic Accesses In dynamic languages, variables, indices of arrays, and properties of objects can be accessed with arbitrary expressions. At line 4 in Fig. 1 the $arr array with an index determined by the variable $any is assigned; if a given index exists in $arr, it is overwritten; if not, it is created. Therefore, the set of variables, array indices and object fields is not evident from the code. An update can involve more than one element and can be statically unknown. The update at line 4 is statically unknown and thus may or may not influence accesses at lines 5, 7, 8, 9, 15, and 20. Similarly, line 11 can access index 2 in any index at the first level. In particular, it can access also index 1 at the first level, which is updated at the following line. That is, reading $arr[1][2] can return either of values 6, 7, and undefined, reading $arr[1][1] can return 7 and undefined, reading $arr[2][2] can return 6 and undefined, and reading $arr[2][1] always returns undefined. Next, after two branches of the if statement are merged at line 13, reading of $arr[1][2] can return values 6, 7, 3, and undefined. 2.3 Explicit Aliasing PHP makes it possible for a variable, index of an array, and property of an object to be an alias of another variable, index, or property. After an update of an element, all its aliases are also updated. Aliasing in PHP is thus similar to references in C++ in many aspects. Unlike C++, in PHP each variable, index, and property can be aliased and later un-aliased from its previous aliases and become an alias of a new element. As an example, the statement at line 16 un-aliases 58 Data-flow Analysis of Programs with Associative Arrays $arr[2] from its previous aliases. Moreover, a variable can be an alias of another variable only at some paths to a given program point, e.g., if it is made an alias in a single branch of an if statement. The statement at line 4 makes variable $alias an alias of a statically unknown index of array $arr. Hence, the statement at line 7 accesses $arr[1][2] and may also access $alias[2]. Similarly, the statement at line 15 makes $alias2 an alias of $arr[2][1] and may also make it an alias of $alias[1]. If an array is assigned, it is deep-copied. However, if an index in the source array has aliases, the set of aliases in the corresponding index in a target array consists of these aliases and the source index. Consequently, the statement at line 18 updates also $arr[2] and its alias $alias3. Similarly, the statement at line 19 may update also $arr[3] and $alias, because the statement at line 3 may make these aliases of each other. 2.4 Overview of the Approach Our approach consists of the following key parts: (1) definition of analysis state, (2) definition of read accesses to associative arrays, (3) definition of write accesses to associative arrays (i.e. the transfer function), and (4) definition of merging associative arrays (i.e. the join operator). The fundamental part of analysis state consists of represenation of associative arrays. Each associative array contains a set of indices including a special index called unknown field. This index stores information that has been written to statically unknown indices of the array. All indices (including unknown fields) can contain a set of values and also can point to another associative array—the next dimension. Next, unknown fields always contain value undefined. Note that (multi-dimensional) unknown fields allow for dealing with statically unknown accesses, however, they pose a challenge both to definition of new indices and definition of merging associative arrays. Both indices that are read by a read access and indices that are updated by a write access to a multidimensional associative array are specified using a list of expressions. Each expression specifies an access to one dimension of the array. At each level, indices corresponding to values of an expression corresponding to the level are followed. If the expression yields a statically unknown value, all indices (including the unknown field) are followed. The read access differs from the write access in the way it handles the case when there is no corresponding index defined. While the read access follows the unknown field, the write access defines the index. Note that in the latter case, all data that could have been assigned to the new index using statically unknown updates are copied to this index. The reason is that these data are stored in unknown fields and unknown fields are not followed by statically known read accesses. Next, unlike a read access, a write access distinguishes indices that certainly must be updated and indices that only may be updated. Former indices are strongly updated—original data are replaced with new data, the latter indices are weakly updated—original data are joined with new data. Example 1: At line 5, value 1 is used to read-access the first dimension of an associative array. Because the array has no index corresponding to this value, the unknown field is followed. It contains value 1 from the update at line 4 and also value undefined. Example 2: At line 12, value 1 is used to write-access the first dimension of an array $arr. The array has no index corresponding to this value and the index $arr[1] is thus created. Because statically unknown assignment at line 11 could involve also the index $arr[1], the data from this assignment are copied to a new index and thus also the index $arr[1][2] (with values 6 and undefined) is defined. The principal challenge of merging multi-dimensional associative arrays with unknown fields is to determine the set of indices of the resulting array. That is, the resulting array may contain indices that are not present in any array being merged. The reason again stems from the fact that unknown fields are not followed by statically known read accesses. Example 3: As an example, see the join point at line 13. The array $arr contains all indices that are defined in either of merged branches plus the index $arr[2][2] (with values 6 and undefined). D. Hauzar, J. Kofroň, P. Baštecký s∈Σ m ∈ Map i ∈ Index a ∈ Aliases amust ∈ Aliasesmust amay ∈ Aliasesmay 59 = Var × Map × Index × Aliases = Var → P(Val) = (Var ×Val) → Var = Aliasesmust × Aliasesmay = Var ×Var = Var ×Var Table 1: Data-flow analysis state-space. undefVar ∈ Var ∗ ∈ Val undefined ∈ Val • ∈ Val is a variable representing an undefined variable. is the statically-unknown value. is the undefined value. is the value representing index-name of unknown field. Table 2: Special variables and values. The reason of creating new index is that while in the second branch the read access to this index in the first level follows the unknown field and then reaches the value assigned at line 11, in the merged array the read access follows the index $arr[2]. 3 Formalization We formalized our data-flow analysis using data-flow equations for the forward data-flow analysis [7]. The formalization includes handling associative arrays of unlimited depth and accesses with arbitrary expressions to such structures. It does not explicitly include handling of objects. While objects are treated analogously to arrays in our implementation, there are subtle differences. Therefore, we excluded handling of objects from our formalization to make it more clear. 3.1 Analysis State Space Tab. 1 presents elements of the state space of our data-flow analysis. Every state contains a variable, which represents the symbol-table. Because top-level variables can be accessed dynamically ($$var is a variable whose name is given by a value of variable $var), we model top-level variables as indices of the symbol-table variable1 . Function Map maps a variable to a set of its possible values. Function Index maps a variable and an index name to a variable containing an array which has the first variable on the index with this name. In the following, we say that variable v is an index of variable p identified by value ind if ((v, ind), p) ∈ indexOf (i.e., v is p[”ind”]). A pair of relations Aliases relates variables that are must and may aliases. Tab. 2 presents special variables and values. The value • identifies the unknown field of a given variable. The unknown field of a variable is used to access statically-unknown indices of the variable. In Tab. 3, there are several helper functions (projections) defined; we use them in the subsequent definitions. 3.2 Data-flow equations For propagating states through the nodes of the control-flow graph (CFG), we use a modification of standard data-flow equations for the forward problem. Each node k of CFG has six states associated: INk , GENk0 , INk0 , GENk , KILLk and OUTk . INk represents the data coming to k; it is created by merging the states going out from all predecessors of k. In the case that the node has more predecessors, we call this state join point and the operation mergeStates merges information from different states. If the node has only one predecessor, the operation mergeStates only copies the information. The state GENk0 defines 1 Consequently, the notions of index and variable refer to the same abstraction and we use them interchangeably. That is, an index of an associative array in an arbitrary depth is a first class name the same way as a variable. 60 Data-flow Analysis of Programs with Associative Arrays variables that are newly defined by the update and data of these variables (note that these data can come only from unknown fields). The state KILLk defines data that is removed from variables by the update while GENk defines data that is added from the right-hand side of the update statement. Finally, the state OUTk represents updated data, i.e., the data going out from this node. The predicate pred(k) returns the set of n output states associated with the predecessors of k. The data-flow equations are: INk = mergeStates({OUTp }), p ∈ pred(k) INk0 = INk ∪ GENk0 OUTk = GENk ∪ (INk0 − KILLk ) For the the initial node i, the output state is as follows: OUTi = (root, {(root, 0), / (unk, {undefined})}, {((unk, •), root)}, (0, / 0)) / That is, the state contains variable root representing a symbol table and a variable unk which is its unknown field—it represents statically-unknown variables. # (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) Expression Let x = (root, map, i, (amay , amust )) be a state. r(x) = root values(x, v ∈ Var) = {vals, (v → vals) ∈ map} values(x,V ∈ P(Var)) = {values(x, v), v ∈ V } valuesunde f (x,V ∈ P(Var)) = values(x,V ) if V 6= 0/ = {undefined} if V = 0/ values(x, undefVar) = {undefined} indexOf(x) =i indices(x,V ∈ P(Val)) = {iv, ∃v∈V ∃n∈Val ((iv, n), v) ∈ i} indices(x,V ∈ P(Var), I ∈ P(Val)) = {iv, ∃v∈V ∃ind∈I ((iv, ind), v) ∈ i} aliasesmust/may (x) = {(v1 , v2 ), (v1 , v2 ) ∈ amust/may ∨ (v2 , v1 ) ∈ amust/may } aliasesmust/may (x, v ∈ Val) = {a, (v, a) ∈ aliasesmust/may (x)} aliasesmust/may (x,V ∈ P(Val)) = {(a, v), a ∈ aliasesmust/may (x, v), v ∈ V } aliases(x, v ∈ Val) = aliasesmay (x, v) ∪ aliasesmust (x, v) Table 3: List of helper functions and projections. 3.3 Access Paths We describe expressions for accessing variables and associative arrays of an arbitrary depth using access paths. An access path consists of a single value or a sequence of access paths: AP ::= a, a ∈ Val ::= []([AP])∗ Each access path from the sequence represents the expression for accessing the level of an associative array given by the position of the access path in the sequence. This makes it possible to perform accesses to any associative array of an arbitrary depth where at each level of the array the set of values used for indexing is specified with an arbitrary read-access. As we will see later, a read access using an access path returns a set of values, which can include the undefined and the ∗ values. D. Hauzar, J. Kofroň, P. Baštecký 61 # Expression (13) Eval(x, AP) = {a} if AP = a, a ∈ Val = {values(x, v), v ∈ Vars(x, AP)} if AP = [][AP]∗ (14) Vars(x, AP) = Vars(x, r(x), AP) (15) Vars(x, v ∈ Var, AP) = {undefVar} if AP = a, a ∈ Val = {undefVar} if AP = [][AP1 ][AP2 ]...[APn ] ∧Varsn (x, v, AP) = 0/ = Vars0 (x, v, AP) if AP = [] = Varsn (x, v, AP) if AP = [][AP1 ][AP2 ]...[APn ] ∧Varsn (x, v, AP) 6= 0/ (a) (b) (c) (d) (16) Vars0 (x, v, AP) = {v} (17) ∀i∈1,...,n : Varsi (x, v, AP) = indices(x,Varsi−1 (x, v, AP)) if ∗ ∈ Eval(x, APi ) = indicesr (x,Varsi−1 (x, v, AP), Eval(x, APi )) if ∗ ∈ / Eval(x, APi ) (18) indicesr (x,V ∈ P(Var), I ∈ P(Val)) = indices(x,V, I)∪ S v∈V,ind∈I {u, ((u, •), v) ∈ indexOf(x)∧ 6 ∃w∈Vars ((w, ind), v) ∈ indexOf(x)} (a) (b) (a) (b) Table 4: Definition of read accesses. An access path describes an access from a given index (variable). In the following, [v]([AP])∗ denotes an access path []([AP])∗ from variable v. Access paths express any PHP expression describing data-access without loss of information. For example, consider the following PHP expressions and the corresponding access paths in the state s: $a[$b]–[r(s)][a][[r(s)][b]], $$a–[r(s)][[r(s)][a]], $a[$b[$c]][2]– [r(s)][a][[r(s)][b][[r(s)][c]]][2]. 3.4 Read Accesses Tab. 4 defines the read access. Eval defines the set of values accessible via an access path from a symboltable variable at a given state (13). Vars defines the set of variables accessible via an access path from the symbol-table variable (14) or from an arbitrary variable (15). If the access does not identify any variable, the set consists of the undefined variable undefVar (15a)–(15-b). Otherwise the set of variables is obtained by a traversal of the indexOf relation. The traversal starts from the specified variable (16). At each level, the access can be performed either with a staticallyunknown value (17-a) or with a set of statically-known values (17-b). In the first case, the set of variables at the next level involves all indices of all variables at the current level. Note that these indices include unknown fields. If the access is performed with a set of statically-known values, the set of variables at the next level includes indices of all variables at the current level that are identified by the values (18-a). Moreover, if the accessed index is not yet defined for a variable at the current level, the unknown field of the variable is added (18-b). Note that it is not necessary to follow aliases. The reason is that a write access copies the data to all possible targets, including all possible aliases. If a set of values at each level of an access path contains exactly one value, the Var function yields a single variable. We use the notation [var][v1 ]..[vn ] in state x to denote the variable Vars(x, var, [][v1 ]...[vn ]). If the state and the variable from which the access is performed is clear from the context, we write only [][v1 ]...[vn ]. Example 4: Assume the read-access at line 5 in Fig 1. The access is performed from the root variable of the state using the access path [][arr][1]. The variable [][arr] is defined at line 4, while the index [][arr][1] of this variable is not defined. Thus, the first level consists of variable [][arr], while the second level consists of its unknown field—[][arr][•]. 62 Data-flow Analysis of Programs with Associative Arrays 3.5 Write Accesses Tab. 6 defines the GEN 0 set, which contains variables that are created by the assignment and alias statements—the variables statically mentioned for the first time in the left-hand side of the statement2 . It also defines the variables that are updated by these statements. Tab. 7 defines KILL and GEN sets, which contains data that are removed and added to these variables. Tab. 5 defines the deep copy of a variable, which is used when a new variable is created and when an existing variable is assigned to another one. Collecting Variables Tab. 6 defines four sets of variables. Must and may (22) are variables that either must or may, respectively, be updated by the assignment statement, must 0 and may0 (23) are variables for the alias statement. If a variable must be updated, a strong update is performed—new information replaces current information. If a variable only may be updated, a weak update is performed—new information is added to the information already present at the variable. Example 5: An example of a weak update is the update at line 4 in Fig. 1—it is not statically known which index of the variable [][arr] is updated. Weak updates are also performed, e.g., at line 19 in Fig. 1. While variable [][arr2][3] is strongly-updated, variables [][arr][3] and [][alias] that may be aliases of [][arr2][3] are only weakly-updated. # Expression (19) deepcopyassign (S ∈ Σ ×Var, T ∈ Σ ×Var) : (xs , vs ) ∈ S∧ (xt , vt ) ∈ T∧ values(xt , vt ) ⊇ values(xs , vs )∧ (a) ∀vsi ∈Var ∀isi ∈Val ((vsi , isi ), vs ) ∈ indexOf(xs ) =⇒ ( (b) vti = createindex(xt , vt , isi )∧ deepcopy((xs , vsi ), (xt , vti ))∧ (6 ∃vunkn ∈Var ((vunkn , •), vs ) ∈ indexOf(x)∧ v0unkn = createindex(xt , vt , •)∧ 0 values(xt , vunkn ) ⊇ {undefined})) (20) deepcopy(S ∈ Σ ×Var, T ∈ Σ ×Var) : deepcopyassign (S, T )∧ (xs , vs ) ∈ S∧ (xt , vt ) ∈ T∧ aliasesmust (xt , vt ) ⊇ {a, a ∈ aliasesmust (xs , vs )}∧ aliasesmay (xt , vt ) ⊇ {a, a ∈ aliasesmay (xs , vs )}∧ (21) createindex(x, parent ∈ Var, ind ∈ Val) = {var, var = newvar(x)∧ indexOf(x) ⊇ {((var, ind), parent)}∧ values(x, var) ⊇ {undefined}∧ aliasesmust (x, var) ⊇ {var}} Table 5: Definition of deep copy of the index. Similarly to read accesses, the variables which are updated by a statement are defined by a traversal of the indexOf relation starting in the root variable of the state. The traversal uses the access path of the left-hand side (LHSAP). However, the traversal differs from that of a read access. The first difference is 2 In PHP, variables are defined also when they are mentioned for the first time in the right-hand side of the alias statement, i.e., the statement $a = &$b defines the variable $b if it is not defined. While we model this behavior in our implementation, we ommit it from the formalization to make the presentation of our approach more clear. D. Hauzar, J. Kofroň, P. Baštecký # (22) (23) (24) (25) (26) (27) (28) 63 Expression Assignemnt / Alias: LHSAP = RHSAP/LHSAP = &RHSAP LHSAP ∼ [][AP1 ][AP2 ]...[APn ] ∀ j=1,2,...,n I j = Eval(APj ) must = mustn ∧ may = mayn must 0 = mustn0 ∧ may0 = may0n indicesw (V ∈ P(Var), I ∈ P(Val)) = indices(IN,V, I)∪ S 0 v∈V,ind∈I {defindex(v, ind), 6 ∃w∈Var ((w, ind), v) 6∈ indexOf(IN ∪ GEN )} defindex(v ∈ Var, ind ∈ Val) = {i, ((u, •), v) ∈ indexOf(IN ∪ GEN 0 )∧ i = createindex(GEN 0 , v, ind)∧ deepcopy((IN ∪ GEN 0 , u), (GEN 0 , i))} must0 = {r(IN)} ∧ may0 = 0/ ∀ j∈1,2,...,n ((|I j | = 1 ∧ I j 6= {∗}) ∧ ( (a) must j = aliasesmust (indicesw (must j−1 , I j ))∧ may j = aliases(INk0 , indicesw (may j−1 , I j )) ∪ aliasesmay (IN, indicesw (must j−1 , I j ))))∨ ((|I j | > 1 ∧ ∗ ∈ / I j) ∧ ( (b) must j = 0∧ / may j = aliases(INk0 , indicesw (may j−1 ∪ must j−1 , I j ))))∨ (∗ ∈ I j ∧ ( (c) must j = 0∧ / may j = aliases(INk0 , indices(INk0 , may j−1 ∪ must j−1 )))) ((In | = 1 ∧ In 6= {∗}) ∧ ( mustn0 = indiceswj (must j−1 ))∧ may0n = indiceswj (may j−1 )))∨ ((|I j | > 1 ∧ ∗ ∈ / I j) ∧ ( 0 mustn = 0∧ / may0n = indiceswj (may j−1 ∪ must j−1 )))∨ (∗ ∈ In ∧ ( mustn0 = 0∧ / may0n = indices(INk0 , mayn−1 ∪ mustn−1 ))) Table 6: Definition of collecting variables for an update. that for a write access also the corresponding aliases are followed. That is, all aliases whose data can be possibly changed are updated by the write access. That is why it is not necessary to follow the aliases during read accesses. The second difference is that if a write access to an index identified by a statically known value is performed and this index does not exist, it is created. Creating new indices when traversing the indexOf relation is handled by the definition of the indicesw set (24). Note that write accesses to unknown fields in preceding program points could update also the newly defined index and its sub-indices. Thus the new index contains a deep copy of the unkwnown field (19). That is, it contains all values and aliases from the unknown field (20)–(21-a) and also a deep copy of all indices of the unknown field (19-b). Example 6: The statement at line 12 in Fig. 1 creates a new variable [][arr][1]. The write access to the unknown field [][arr][•] at line 11 could update also this new variable and the data from this unknown 64 Data-flow Analysis of Programs with Associative Arrays field is thus copied to a new variable. Thus the sub-index [][arr][1][2] of the variable [][arr][1] is defined. The traversal begins with the must0 set initialized with the variable r(INk ), which corresponds to the symbol table and the may0 set initialized with the empty set (26). The statement (27) describes a single step of the traversal at the level j. The set I j of values used to access the j-th level of an associative array can have (27-a) a single statically-known value, (27-b) several statically-known values, or (27-c) it can contain a statically-unknown value. Example 7: As an example of case (27-a), see the statement at line 9 in Fig. 1. The must2 set consists of variable [r(GEN 0 )][arr][2], the may2 set of variable [r(IN)][alias], and the set of values I3 consists of value 3. Thus, the must3 set contains must aliases of the index [r(GEN 0 )][arr][2][3]. The only must-alias of this index is the index itself. The may3 set contains all aliases of index [r(GEN 0 )][alias][3], which is again only the index itself and all may-aliases of index [r(GEN 0 )][arr][2][3], which is the empty set. In (27-b) and (27-c), the must j set is empty—it is not known which index is accessed. The may j set consists of all aliases of the indices of variables in must j−1 and may j−1 . In case of (27-c), the variables do not need to be identified by values of I j and no new variables are created. Example 8: As an example, see the statement at line 12 in Fig. 1. At the second level, must2 set consists of the variable [r(GEN 0 )][arr][1] and the may2 set is empty. The must3 set is empty, while the may3 set consists of variables [r(GEN 0 )][arr][1][2] and [r(GEN 0 )][arr][1][•]. The difference between computing variables that will be updated by the assignment and the alias statement (28) is caused by the fact that the assignment statement updates the variable and all its aliases with new values while the alias statement un-aliases the variable from all its original aliases while keeping their values unaffected. However, the alias statement respects the aliases at previous levels the same way as the assignment statement. In other words, the expressions for obtaining indices to be updated for the assignment and the alias statements treat differently only the last level. Example 9: In the case of the alias statement at line 15 in Fig. 1, both variables [r(GEN 0 )][arr][2][1] and [r(GEN 0 )][alias][1] will be updated, since ([r(GEN 0 )][arr][2] is a may-alias of [r(GEN 0 )][alias]). In the case of the alias statement at line 16, only the variable corresponding to [r(IN)][arr][2] will be updated—the variable r(IN)][arr] has no alias. Performing Update Tab. 7 defines how the collected variables are updated by the assignment and alias statements. Expressions (29)–(31) describe the data that is removed from the variables. Both the alias and assignment statements remove all the values and indices of all updated variables that were present in these variables before the update including the data added in collecting phase (29)–(30). The alias statement also removes aliasing data (31). Expressions (32)–(35) describe the data that is added to the variables. In the case of a strong update (32), both the statements add just the data that results from merging variables obtained by the read accesses of the right-hand-side access path (RHSAP). In the case of a weak update, the original variable is merged too, so the original data is preserved (33). Technically, the update is described as first merging the data to a temporary fresh variable and then copying it from this variable to the variable being updated (34)–(35). The difference between the assignment and the alias statements is that while the former one does not copy the alias data at the first level (34), the latter one does (35). Note that for the other levels, the alias data are copied also in the case of the assignment statement (20-b). Example 10: As an example, see the update at line 20 in Fig 1. The must set is empty, the may set consists of variables [][arr][1], [][arr][2], [][arr][•], [][arr2][1], [][arr2][2], [][arr2][3], and [][arr2][•]. Consider the update of variable [][arr][1]. Because the update is weak, new data results from merging the result of read access of RHSAP, which is [][arr2], with the variable that is updated, which is [][arr][1]. D. Hauzar, J. Kofroň, P. Baštecký # (29) (30) (31) (32) (33) (34) (35) 65 Expression Assignemnt / Alias: LHSAP = RHSAP/LHSAP = &RHSAP ∀v∈must∪may∪must 0 ∪may0 values(KILL, v) = values(INk0 , v) ∀v∈must∪may∪must 0 ∪may0 indexOf(KILL, v)= indexOf(INk0 , v) ∀v∈must 0 aliases(KILL, v) = aliases(INk0 , v) ∀vt ∈must∪must 0 src = {(IN, v), v ∈ Vars(IN, RHSAP)} ∀vt ∈may∪may0 src = {(IN, v), v ∈ Vars(IN, RHSAP)} ∪ {(IN 0 , vt )} ∀vt ∈must∪may deepcopyassign ((GEN 0 , v = fresh(GEN 0 )), (GEN, vt )) ∧ mergeVars((GEN 0 , v), src) ∀vt ∈must 0 ∪may0 deepcopy((GEN 0 , v = fresh(GEN 0 )), (GEN, vt )) ∧ mergeVars((GEN 0 , v), src) Table 7: Definition of updates for assignment and alias statement and new object expression. Consequently, after the update, the variable []arr][1] contains indices [][arr][1][1], [][arr][1][2], and [][arr][1][3]. E.g., index [][arr][1][1] contains the data merged from indices [][arr] [1][1] and [][arr2][1]. Example 11: Now consider the update at line 17. The must set consists of [] [arr2], the may set is empty. The read-access of the RHSAP results in reading [][arr]. Because the update is strong, [][arr] is the only variable that is merged and thus it is only deep-copied. Note that in the case of the assignment statement, the alias data is copied for all the levels except for the first one. Thus, because of the alias statement at line 16, [][arr2][2] is a must-alias of [][alias3] and [][arr][2] and due to the alias statement at line 4, e.g., [][arr2][•] is a may-alias of [][alias] and [][arr2][•]. Consequently, the statement at line 18 strongly updates not only [][arr2][2], but also [][arr][2] and [][alias3]. Similarly, the statement at line 19 strongly updates [][arr2][3] and weakly updates [][arr][•] and [][alias]. Thus, the subsequent read access using access path [][arr][3] would read also value 9. 3.6 Merge Tab. 8 defines the merge operation. Expression (36) defines the operation mergeStates, which is used in the first data-flow equation to define the IN state of a node. It merges the root variables of the OUT states of all predecessors of the node to the root variable in the IN state. Note that if the node has only one predecessor, the merge actually corresponds to a deep copy. Expression (37) defines how variables in given states are merged into the resulting state. Note that this operation is used also when an update is performed (34)–(35). In (37-a), for each variable being merged and a state in which it is defined, the access paths of all sub-indices of the variable are collected. The empty access path [], which corresponds to the variables being merged, is added to these access paths (37-a). Example 12: For merging at the join point at line 13 in Fig. 1 and for the symbol-table variable of the first branch, the following access paths are collected: [][alias], [][alias][2], [][alias][3], [][arr], [][arr][•], [][t], [][t][2], [][arr][1], [][arr][1][2], [][arr][1][3], [][arr][2], [][arr][2][3]. Sub-expression (37-b) further extends the set of access paths. After the extension, it contains an access path for each variable that will be defined in the resulting state. For each access path that contains the value • (corresponding to the unknown field) at a certain level it adds the access paths that are created from this access path by replacing the value • with all the values that are in the input access paths at this level. Note that this adds new access paths to the resulting set only if there were performed corresponding statically-known write accesses from different variables being merged. This is analogous to copying indices of the unknown field when there is a write access with a given value for the first time and a new variable is thus defined. While write-accesses to unknown fields in preceding program points could also create sub-indices of a newly defined variable, in the case of merge there could be write-accesses to unknown fields that could create sub-indices of variables created elsewhere. Both these 66 Data-flow Analysis of Programs with Associative Arrays # Expression (36) mergeStates(OUT ∈ P(Σ)) = {IN, mergeVars((IN, r(IN)), {(o, r(o)), o ∈ OUT })} (37) mergeVars(R ∈ Σ ×Var, M ∈ P(Σ ×Var)) : S APs = (x,vr )∈M (accessPaths(x, vr , [])) ∪ {[]}∧ (a) ResAPs = extend(APs)∧ (b) ∀AP∈ResAPs (mergeAP(R, M, AP)) (c) (38) mergeAP(R = (xR ∈ Σ, vR ∈ Var), M ∈ P(Σ ×Var), AP) : resVar = createVar(R, AP)∧ (a) S mergedVars = (xM ,vM )∈M {(xM ,Var(xM , vM , AP))}∧ (b) S values(o, resVar) = (xm ,vm )∈mergedVars {valuesunde f (xm , vm )}∧ (c) T aliasesmust (xR , resVar) = (xm ,vm )∈mergedVars {aliasesmust (xm , vm )}∧ (d) S aliasesmay (xR , resVar) = (xm ,vm )∈mergedVars {aliasesmust (xm , vm ) ∪ aliasesmay (xm , vm )}− (e) aliasesmust (xR , resVar)∧ S indices(xR , resVar) = (xm ,vm )∈mergedVars {createVar((xR , resVar), [][n]), (f) n ∈ indicesNames(xm , vm )} S (39) accessPaths(x ∈ Σ, vR ∈ Var, AP) = ((i,iname ),vR )∈indexOf(x) ( {AP[iname ]} ∪ accessPaths(x, i, AP[iname ])) S (40) extend(APs) = APs ∪ l∈levels(APs)∧(AP∈APs∧level(AP)>l) {newAP(AP, l, values(APs, l))} (41) newAP([][v1 ]...[vn ], l ∈ Int,V ∈ P(Val)) = {[][u1 ]...[un ], ∀i=1,...,n∧i6=l (ui = vi ) ∧ ul ∈ V } if vl = • = 0/ if vl 6= • (42) level([][v1 ]..[vn ]) =n (43) levels(APs) = {l, l = level(AP) ∧ AP ∈ APs} (44) value([][v1 ]..[vn ], l ∈ Int) = vl (45) values(APs) = {v, v = value(AP) ∧ AP ∈ APs} (46) indicesNames(x, var) = {n, ∃iv∈Var ∃n∈Val ((iv, n), var) ∈ indexOf(x)} Table 8: Definition of merge. operations are thus necessary to preserve the invariant that if there could be a write-access to an index using a statically known value at a given level, all the data that could be possibly written to this index are stored there. Example 13: When the merge at line 13 in Fig. 1 is performed, the set of access paths is extended with [][arr][2][2], which then causes the corresponding variable in the resulting state to be created. The reason is that while in the else branch [][arr][2] is not defined, there is a write access to the unknown field at line 11 that could create a sub-index of this variable. The read access using [][arr][2][2] will follow [][arr][•] in the second level and will finally [][arr][•][2], which contains values 6 and undefined. In the then branch, [][arr][2] is created and it will be thus added to resulting state of the merge. The read access follows this variable at the second level. Thus, to access value 6 with access path [][arr][2][2], there must be a variable [][arr][2][2] which contains this value in the resulting state. This is analogous to copying data from the unknown field to a variable that is statically stated for the first time when the update is performed, e.g, a new variable [][arr][1][2] containing values 6 and undefined is created during the update at line 12. Sub-expression (37-c) merges variables corresponding to an access path in the merged states to the variable which corresponds to this access path in the resulting state. First the variable in the resulting state using the access path and the output variable is created (38-a). Then, the corresponding variables in merged states are obtained (38-b). Finally, the data of these variables are merged to the resulting variable (38-c)–(38-f). Note that while in the case of (38-a), the access path is used to create the variable which D. Hauzar, J. Kofroň, P. Baštecký 67 directly corresponds to the access path, in the case of (38-b) the access path is used to get variables in merged states by the read access (15). That is, in the case of (38-b), the variables can be accessible by unknown fields even at levels where the access path contains a static value. Note that both (38-a) and (38-f) contain the expression createVar, however, resulting variables are created only once—if expression createVar is used the second time with the same arguments, it returns the existing variable. Example 14: As an example, see the merge corresponding to the join point at line 13 in Fig. 1. For the access path [][arr][1][3], variable [][arr][1][3] is be created in the resulting state. The merged variable in the first branch is [][arr][1][3], however, for the second branch, the data corresponding to this access path is located in [][arr][1][•]. For the access path [][arr][2][2], a variable is created in the resulting state, the merged variables are undefVar in the first branch and [][arr][•][2] in the second branch. 3.7 Termination and Soundness Termination: The values in our model are represented either by constants present in the program or values ∗, undefined, and •. Thus the number of values is finite. From this it follows that the number of defined indices in a single dimension of arrays is finite. However, due to the presence of loops and recursion, the infinite number of dimension may be generated. To ensure the termination, the number of dimensions must be limited. This can be done either explicitly [5] or implicitly by using, e.g, allocationsite abstraction for creating new dimensions of arrays. Then, the total number of indices is finite and alias and indexOf relations are finite as well. The transfer functions defined in Tab. 6, Tab. 7, and Tab. 8 are monotonic so the fixpoint computation terminates. Our approach is implemented as a part of a static analyzer with the support of operators such as +. Thus, potentially an infinite number of values can be generated in the program due to presence of loops and recursion. To ensure termination of fixpoint computation in this case, it is necessary to limit the size of value sets of each variable by a constant—larger value sets would be represented either by value ∗ or by a finite abstract domain. Soundness: We use the following soundness argument: If a value can be written to a given variable (index) by a write-access at the node n1 of CFG, it is read from this variable by a read access in node n2 of CFG that follows n1 if and only if there is a path from n1 to n2 in CFG where the variable is not strongly-updated by different value. Moreover, if there is a path from the initial node to a given node such that a variable was not strongly-updated, the set of the variable values returned by a read access always includes the undefined value. Note that a value can be written to a given index also if the write access is statically unknown at any level. Also note that there can be an arbitrary number of join points between n1 and n2 . We do not provide the proof of the argument, however, its validity follows from definitions of read accesses, write accesses, and merge. 4 Implementation and Evaluation We implemented our approach in the context of the Weverca [2] static analyzer. Besides associative arrays, the implementation supports also objects. Weverca makes it possible to perform static taint analysis [11] as well as other analyses that can be used for finding bugs and evaluation the system safety. It constructs CFGs on the fly. If the processed program point is a virtual method call, it uses a read-access to get the method’s receiver object and uses its type to determine the method to be called. It also uses a read-access to get values of variables that specify the name of a method and the include target in case of a dynamic method call or dynamic include. Weverca also implements several options of context-sensitivity for function and method calls. 68 Data-flow Analysis of Programs with Associative Arrays n CFG nodes Variables (mCODE n/CODE n) 1 2 3 4 235 / 117 463 / 231 919 / 459 1831 / 915 Analysis Time (s) (mCODE n/CODE n) 107 211 419 835 0.4 / 0.3 1.3 / 0.7 4.9 / 2.5 22.8 / 10.3 Table 9: The evaluation results. The novelty of our approach is that it is sound and precise even if statically-unknown data from the input are used to access associative arrays-like structures at an arbitrary level. Other approaches, such as [10] are more limited, e.g., they model only associative arrays of the depth 1. Since it is not an issue to implement a precise analysis but a precise scalable analysis, a question we want to answer is whether our approach scales well. In particular, we want to know how the merge function scales with respect to the number of variables being merged in the presence of dynamic write accesses to multiple levels of associative arrays. To evaluate our approach we used the code CODE n that was generated from the code fragment at lines (2)–(19) in Fig. 1 replicated 2n times with all the variables except for the variable $any with the prefix unique for each replica. This code contains non-trivial dynamic accesses to multiple levels of associative arrays; the number of variables in this code grows exponentially with n. However, the number of variables that are being merged at each join point is constant. To evaluate the complexity of the merge operation, we use the code mCODE n (Fig 2) which is defined using CODE n. In mCODE n, all variables defined in the code are involved in the top-level merge operation. $any = $ GET[’user input’]; if ($any) { CODE n } else { CODE n } Figure 2: The code used for the evaluation Tab. 9 shows the results of analysis of mCODE n and CODE n for different values of n. The table shows the number of nodes of generated CFG, the number of variables defined in our representation in the OUT state of the program end point, the running time of the analysis. The comparison of running times of mCODE n and CODE n shows that the merge operation is efficient even if all the variables all involved—mCODE n analyzes two copies of CODE n and additionally merges all the variables. Thus the increase of time consumption is caused mostly by the increase of the number of variables. This is caused mainly by the fact that the amount of data stored in a state grows with the number of variables defined in the state and that in the implementation there is no sharing of data between the states. We believe that by optimizing the implementation, the scalability can be highly improved and the approach can scale up to thousands of variables and tens of thousands nodes of CFG. 5 Related work In this section, we discuss tools and techniques related to the area of our interest. Pixy [4] is an open-source tool for detection of taint-style vulnerabilities in PHP 4. It involves a flowsensitive, interprocedural, and context-sensitive data flow analysis along with literal and alias analysis to achieve precise results. The main limitations of Pixy include limited support for statically-unknown updates to associative arrays, ignoring classes and the eval command, and limited support for aliasing and handling file inclusion, which all represent principle differences from programming languages such as Java and C. Alias analysis introduced in Pixy incorrectly models aliasing between arrays and array indices. Web applications use associative arrays and objects extensively, thus we believe that this is an D. Hauzar, J. Kofroň, P. Baštecký 69 essential limitation. Importantly, Pixy does not perform type inference, which also limits its precision and soundness. Stranger [14] is an automata-based string analysis tool for PHP, which is built upon Pixy. It adds a more precise string manipulation techniques that enable the tool to prove that an application is free from attack patterns specified as regular expressions. Jang [3] presents flow-insensitive points-to analysis for JavaScript. Their work is closely related to our approach, since JavaScript provides dynamic features similar to those in PHP. The same way as our approach, they model variables, arrays, and objects using associative arrays. However, they precisely model only assignments to constant indices and they use special unknown field for all other assignments. Moreover, the same as Sridharan [10], they limit the accesses to associative arrays to depth one. Next, PHP supports creating aliases between variables which JavaScript does not. Therefore, we must maintain alias information to perform updates of points-to information correctly. Phantm [5] is a PHP 5 static analyzer for type mismatch based on data-flow analysis; it aims at detection of type errors. It combines run-time information from the bootstrapping phase of an application and static analysis when instrumentation using this information is used. To obtain precise results, Phantm is flow-sensitive, i.e., it is able to handle situations when a single variable can be of different types. However, they omit updates of associative arrays and objects with statically-unknown values and aliasing, which can lead to both missing errors and reporting false positives. F4F [9] focuses on static taint analysis of web applications that use frameworks. This work uses a semi-automatically generated specification of framework-related behaviors to reduce the amount of statically-unknown information, which arises, e.g., from reflective calls. Andromeda static taint analyzer [12] fights the problem of scalability of taint analysis by computing data-flow propagations on demand. It uses forward data-analysis to propagate tainted data and ignores propagation of other data. If tainted data are propagated to the heap, it uses backward analysis to compute all targets to which the data should be propagated. Andromeda analyzes Java, .NET, and JavaScript applications. The drawback of the approach is that it propagates only taint information. The control-flow of the application can depend on other information which are then not available. Sridharan [10] et. al. present static flow-insensitive points-to analysis for JavaScript. They model objects in JavaScript using associative arrays that can be accessed by arbitrary expressions. However, they limit the accesses to depth one. They show that in this setting, the complexity of flow-insensitive points-to analysis becomes O(N 4 ), where N is the program size, in contrast to the O(N 3 ), which is the case when the accesses are constant. To enhance the precision and scalability of the analysis, they identify correlations between dynamic property read and write accesses. If the updated location and stored value can be accessed by the same first class entity (variable), it is extracted to a function parametrized by this entity; this function is then analyzed context-sensitively with the context be the variable. Thus, the correlation between the update and store is preserved. Schafer [8] et. al. present a dynamic analysis for identifying variables and expressions that always have the same value at a given program point and finding this value. Such values can be used, e.g, to make a constrained dynamic language constructs static and thus enhance the scalability and precision of static analysis. Wei [13] et. al. reduce the number of statically-unknown information in static analysis by collecting such information at run-time. Livshits [6] et. al. propose a method of fully automatic placement of security sanitizers and declassifiers. They place sanitizers statically whenever possible and they try to minimize the amount of run-time tracking. The input of their analysis is a data-flow graph generated by a static analyzer. The quality of sanitization placement—the reduction of the amount of run-time tracking—depends on the quality of 70 Data-flow Analysis of Programs with Associative Arrays this data-flow graph. 6 Conclusion and future work Dynamic languages such as PHP contain features that pose significant challenges for static analysis. In our previous position paper [1] we introduced our approach to static analysis of PHP and described particular parts of the Weverca analyzer [2]. In this paper we focused on the data modeling part. We described dynamic accesses to associative array-like structures, which make it hard to apply value and points-to analysis, and presented our approach to this challenge. We focused on soundness and precision—we do not want to overwhelm the user with too many false alarms, which is often the case of related tools. The evaluation shows that the prototype implementation of our approach scales to hundreds of variables and thousands of nodes in the control-flow graph. We believe that the scalability of the tool can be further enhanced. Therefore, as future work, we plan to enhance the scalability by implementing optimizations, in particular, sharing the data between nodes of the control-flow graph, and then to evaluate the scalability on real-life applications. References [1] David Hauzar & Jan Kofroň (2012): On Security Analysis of PHP Web Applications. In: STPSA 2012, IEEE, pp. 577–582, doi:10.1109/COMPSACW.2012.106. [2] David Hauzar & Jan Kofroň (2014): W EVERCA. http://d3s.mff.cuni.cz/projects/formal_ methods/weverca/. [3] Dongseok Jang & Kwang-Moo Choe (2009): Points-to analysis for JavaScript. SAC ’09, ACM, New York, NY, USA, pp. 1930–1937, doi:10.1145/1529282.1529711. [4] N. Jovanovic, C. Kruegel & E. Kirda (2006): Pixy: a static analysis tool for detecting Web application vulnerabilities. In: S&P’06, IEEE, doi:10.1109/SP.2006.29. [5] Etienne Kneuss, Philippe Suter & Viktor Kuncak (2010): Runtime Instrumentation for Precise Flow-Sensitive Type Analysis. In: RV, pp. 300–314, doi:10.1007/978-3-642-16612-9 23. [6] Benjamin Livshits & Stephen Chong (2013): Towards Fully Automatic Placement of Security Sanitizers and Declassifiers. POPL ’13, ACM, New York, NY, USA, pp. 385–398, doi:10.1145/2429069.2429115. [7] Flemming Nielson, Hanne R. Nielson & Chris Hankin (1999): Principles of Program Analysis. SpringerVerlag New York, Inc., Secaucus, NJ, USA, doi:10.1007/978-3-662-03811-6. [8] Max Schäfer, Manu Sridharan, Julian Dolby & Frank Tip (2013): Dynamic Determinacy Analysis. PLDI ’13, ACM, New York, NY, USA, pp. 165–174, doi:10.1145/2499370.2462168. [9] Manu Sridharan et al. (2011): F4F: Taint Analysis of Framework-based Web Applications. OOPSLA ’11, ACM, New York, NY, USA, pp. 1053–1068, doi:10.1145/2048066.2048145. [10] Manu Sridharan et al. (2012): Correlation Tracking for Points-to Analysis of Javascript. ECOOP’12, Springer-Verlag, Berlin, Heidelberg, pp. 435–458, doi:10.1007/978-3-642-31057-7 20. [11] Omer Tripp et al. (2009): TAJ: Effective Taint Analysis of Web Applications. PLDI ’09, ACM, New York, NY, USA, pp. 87–97, doi:10.1145/1542476.1542486. [12] Omer Tripp et al. (2013): ANDROMEDA: Accurate and Scalable Security Analysis of Web Applications. FASE’13, Springer-Verlag, Berlin, Heidelberg, pp. 210–225, doi:10.1007/978-3-642-37057-1 15. [13] Shiyi Wei & Barbara G. Ryder (2013): Practical Blended Taint Analysis for JavaScript. ISSTA 2013, ACM, New York, NY, USA, pp. 336–346, doi:10.1145/2483760.2483788. [14] Fang Yu, Muath Alkhalaf & Tevfik Bultan (2010): Stranger: An automata-based string analysis tool for PHP. TACAS’10, doi:10.1007/978-3-642-12002-2 13.
6cs.PL
Property Testing in High Dimensional Ising models arXiv:1709.06688v1 [math.ST] 20 Sep 2017 Matey Neykov∗ Han Liu† Abstract This paper explores the information-theoretic limitations of graph property testing in zerofield Ising models. Instead of learning the entire graph structure, sometimes testing a basic graph property such as connectivity, cycle presence or maximum clique size is a more relevant and attainable objective. Since property testing is more fundamental than graph recovery, any necessary conditions for property testing imply corresponding conditions for graph recovery, while custom property tests can be statistically and/or computationally more efficient than graph recovery based algorithms. Understanding the statistical complexity of property testing requires the distinction of ferromagnetic (i.e., positive interactions only) and general Ising models. Using combinatorial constructs such as graph packing and strong monotonicity, we characterize how target properties affect the corresponding minimax upper and lower bounds within the realm of ferromagnets. On the other hand, by studying the detection of an antiferromagnetic (i.e., negative interactions only) Curie-Weiss model buried in Rademacher noise, we show that property testing is strictly more challenging over general Ising models. In terms of methodological development, we propose two types of correlation based tests: computationally efficient screening for ferromagnets, and score type tests for general models, including a fast cycle presence test. Our correlation screening tests match the information-theoretic bounds for property testing in ferromagnets. Keywords: Ising models; Minimax hypothesis testing; Dobrushin’s comparison theorem; Antiferromagnetic Curie-Weiss detection; Two-point function bounds; Correlation tests. 1 Introduction Undirected graphical models are a powerful framework for summarizing and visualizing complicated multivariate distributions, where conditional independencies among the variables are represented via a graph. These models have been applied in a variety of fields such as image processing (Besag, 1993), computational biology (Durbin et al., 1998) and social network analysis (Wasserman and Faust, 1994; Grabowski and Kosiński, 2006). A central topic of interest in graphical models research is estimating the structure (also known as structure learning) of, or inferring questions about, the underlying graph based on a sample of observations. Substantial progress has been made ∗ Department of Statistics & Data Science, Carnegie Mellon University, Pittsburgh PA 15213, USA; e-mail: [email protected] † Department of Operations Research and Financial Engineering, Princeton University, Princeton NJ 08542, USA; e-mail: [email protected] 1 towards understanding structure learning. Popular procedures developed for high dimensional graph estimation include `1 -regularization methods (Yuan and Lin, 2007; Rothman et al., 2008; Liu et al., 2009; Ravikumar et al., 2011; Cai et al., 2011), neighborhood selection (Meinshausen and Bühlmann, 2006; Bresler et al., 2008) and thresholding (Montanari and Pereira, 2009). Instead of focusing on learning the structure of the entire graph, we study the weaker inferential problem of property testing, i.e., testing whether the graph structure obeys certain properties based on a sample of n observations. The questions we are interested in are inspired by Neykov et al. (2016), but unlike Neykov et al. (2016) who work exclusively with Gaussian models, here we focus on the zero-field Ising model. The Ising model is a pairwise binary model introduced by statistical physicists as a model for spin systems with the goal of understanding spontaneous magnetization and phase transitions (Ising, 1925). More recently the model has found applications in diverse areas such as image analysis (Geman and Geman, 1984), bioinformatics and social networks (Ahmed and Xing, 2009). Formally, a zero-field Ising model is a collection of d binary ±1 valued random variables X = (X1 , X2 , . . . Xd ), hereto referred to as spins, which are distributed according to the law   X P(X = x) ∝ exp θ ξuv xu xv , (1.1) 1≤u<v≤d where θ ≥ 0. It is easily seen that the vector X is Markov to the graph G whose edges connect vertices u and v if and only if ξuv 6= 0. Notice that model (1.1) is overparametrized. However, when ξuv are viewed as fixed constants, this specification allows one to study the behavior of X for different values of θ. In the statistical physics literature the parameter θ = T1 where T stands for temperature, and is often referred to as the inverse temperature of the system. To give some intuition behind the importance of the inverse temperature it is worth discussing the phenomenon of phase transitions. A phase transition occurs when the temperature drops below a critical threshold causing the distribution of the spins to change from “balanced” to a distribution in which the majority of spins align similarly. In ferromagnetic Ising models, that is models whose spin-spin interactions ξuv are non-negative, the main culprit responsible for phase transitions is the graph structure. At low temperatures neighboring spins are more “rigid” tending to align well with one another, while at high temperatures they act erratically as the model approaches a collection of independent spins. This is not unlike how water molecules behave at different temperatures causing water to change phase. In systems with both positive and negative interactions ξuv , phase transitions are more challenging to characterize, as the signs of the interactions on the graph also exert influence on the transition. The complicated behavior of the Ising model at different temperatures suggests that the difficulty of property testing is related to the temperature. The main focus of this paper is uncovering necessary and sufficient conditions on the temperature, sample size, dimensionality and graph properties, allowing one to conduct property tests even when the data is sampled from the most challenging models. Understanding such limitations is practically useful, since necessary conditions can provide a benchmark for algorithm comparisons, while mismatches between sufficient and necessary conditions can prompt to searching for better algorithms. To elaborate on the type of problems we study, let Vd = {1, . . . , d} be a vertex set of cardinality d and let G 1 be the set of all graphs over the vertex set Vd . A binary graph property P is a map P : G 7→ {0, 1}. Given a sample of n observations from a zero-field Ising model with an underlying 1 G depends on d but we omit this dependence to simplify the notation. 2 graph G, the goal of property testing is to test the hypotheses H0 : P(G) = 0 versus H1 : P(G) = 1. (1.2) Below we give three specific instances of property tests, which we study in detail in the later sections of the paper. Connectivity. A graph is connected if and only if each pair of its vertices is connected via a path. Define P as P(G) = 0 if G is disconnected and P(G) = 1 otherwise. Testing for connectivity is equivalent to testing whether the variables can be partitioned into two independent sets. Cycle Presence. If a graph is a forest, i.e., a graph containing no cycles, its structure can be estimated efficiently using a graph selection procedure based on a maximum spanning tree construction proposed by Chow and Liu (1968). It is therefore sometimes of interest to test whether the underlying graph is a forest. In this example P satisfies P(G) = 0 if G is a forest and P(G) = 1 otherwise. Clique Size. A relevant question is to test whether the size of a maximum clique (i.e., a maximum complete subgraph) contained in the graph is less than or equal to some integer m − 1 versus the alternative that a maximum clique is of size at least m. In this example set P(G) = 0 if G contains no m-clique, and P(G) = 1 otherwise. By definition, property testing is a statistically simpler task compared to learning the entire graph structure, since if a graph estimate is available, property testing can be done via a deterministic procedure (although possibly a computationally challenging one). An important implication of this observation is that any quantification on how hard testing a particular graph property is, immediately implies a “lower bound” on how hard estimating the entire graph is. Conversely, any algorithm capable of learning the graph structure with high confidence can be applied to test any property while preserving the same confidence. Importantly however, there could exist tests geared towards particular graph properties which can statistically and/or computationally outperform generic graph learning methods. Under the assumption that the maximum degree2 of G is at most s, foundational results on the limitations of structure learning of Ising models were given by Santhanam and Wainwright (2012). Specifically, Santhanam and Wainwright (2012) gave two conditions on the triplet (n, d, s): under the first condition it was argued that no algorithm can learn the graph structure with high confidence; under the second condition a correlation decoding algorithm was shown to estimate the graph with high probability. In view of the relationship between property tests and structure learning described earlier, our work can be seen as a generalization of necessary conditions for structure learning. Our results also help to paint a more complete picture of the statistical complexity of testing in Ising models. Unlike in structure learning, understanding property testing requires the distinction of ferromagnetic and general Ising models, of which the latter exhibit strictly stronger limitations. In terms of methodological development, we formalize correlation based property tests which can be customized to target any graph property. We now outline the three major contributions of this work. 2 The largest number of neighbors of any vertex of G. 3 1.1 Summary of Contributions Our first contribution is to provide necessary conditions for property testing in ferromagnets. We give a generic lower bound on the inverse temperature (Theorem 2.4), demonstrating that property testing is difficult in high temperature regimes. A key role in the proof is played by Dobrushin’s comparison theorem (Föllmer, 1988), which a is powerful tool for comparing discrepancies between Gibbs measures based on their local specifications. We further formalize the class of strongly monotone graph properties, and show that when the temperature drops below a certain property dependent threshold, testing strongly monotone properties becomes challenging (Theorem 2.6). Our second contribution is to study necessary conditions for general Ising models, i.e., models including both ferromagnetic and antiferromagnetic 3 interactions. Specifically we argue that testing strongly monotone properties over general models requires more stringent conditions than performing the same tests over ferromagnets (Theorem 4.1 and Proposition 4.3). In order to prove this result we demonstrate that it is very difficult to detect the presence of an antiferromagnetic Curie-Weiss4 (e.g., see Kochmański et al., 2013) model buried in Rademacher noise, which to the best of our knowledge is the first attempt to analyze this problem. Our third contribution is to design several correlation based tests and understand their limitations. First, we formalize and study a generic correlation screening algorithm for ferromagnets. We show that this algorithm works well at high temperature regimes (Corollary 3.7), and could be successful even beyond this regime for some properties (Section 3.1). To analyze the algorithms at low temperature regimes we develop a novel “no-edge” two-point function (i.e., correlation) bound for graphs of bounded degree, which may be of independent interest. Second, we adapt the correlation decoders of Santhanam and Wainwright (2012) to property testing for general Ising models, and we develop a computationally tractable cycle test (Section 5.1). 1.2 Related Work Pseudo-likelihood parameter estimation and inference of the inverse temperature for Ising models of given structures was studied by Bhattacharya and Mukherjee (2017). Property testing is a fundamentally different problem, and our work is in part inspired by Neykov et al. (2016). We show that the graph packing constructions introduced by Neykov et al. (2016) for Gaussian models, can also be used to give upper bounds on the temperature for property testing in Ising models (Theorem 2.4). Unlike Neykov et al. (2016) however, we do not restrict our study to graphs of bounded degree, and we give a more complete picture of the complicated landscape of property testing in Ising models, by distinguishing ferromagnetic from general models (see Theorems 2.6 and 4.1, and Proposition 4.3). Structure learning is very relevant to property testing. The first minimal sample size requirements for graph selection in Ising models were established by Santhanam and Wainwright (2012). In a follow up work, restricted to the class of ferromagnetic models, Shanmugam et al. (2014) related structural conditions of the graph with information-theoretic bounds. Similarly to these works we exploit graph properties to obtain information-theoretic lower bounds for testing. However, as we discussed previously, property testing is a more fundamental problem than graph estimation, and hence our results imply bounds for structure learning and not vice-versa. One of the first 3 Inspired by statistical physics jargon, throughout the paper we use the terms ferromagnetic and antiferromagnetic to refer to positive and negative interactions respectively. 4 i.e., an antiferromagnetic model with a complete graph. 4 algorithms for structure learning of high dimensional Ising models based on `1 -regularization was given by Ravikumar et al. (2010), but it was later shown by Montanari and Pereira (2009) to work well only at high temperature regimes. Santhanam and Wainwright (2012) suggested correlation decoders, which are computationally inefficient but to the best of our knowledge have the smallest sample size requirements for general models. Anandkumar et al. (2012) gave a polynomial time neighborhood selection method for models whose graphs satisfy special properties. The first polynomial time algorithm which works for general Ising models was given by Bresler (2015) and was motivated by earlier works on structure recovery (Bresler et al., 2008, 2014). Inspired by the simplicity of the correlation algorithms studied by Montanari and Pereira (2009); Santhanam and Wainwright (2012) we use similar ideas to develop property tests, and demonstrate that for some properties our tests work in vastly different regimes compared to graph recovery. Finally, we remark that property testing is not unrelated to the more basic detection problems considered by Addario-Berry et al. (2010); Arias-Castro et al. (2012, 2015b,a). In detection, the null hypothesis is typically a model with an empty graph, while the alternative consists of models with graphs containing a certain type of subgraph. This is a major difference with property testing, where both the null and alternative hypothesis may, and usually do contain models with non-empty graphs. Nevertheless, to show minimax bounds of property testing over the class of general Ising models we do consider a detection problem (see Sections 4 and 6 for details). 1.3 Notation For convenience of the reader we summarize the notation used throughout the paper. For a vector Pd q 1/q T d v = (v1 , . . . , vd ) ∈ R , let kvkq = ( i=1 vi ) , 1 ≤ q < ∞ with the usual extension for q = ∞: kvk∞ = maxi |vi |. Moreover, for a matrix A ∈ Rd×d we denote kAkp = maxkvkp =1 kAvkp for p ≥ 1. For any n ∈ N we use the shorthand [n] = {1, . . . , n}, and we reserve the special notation Vd to denote the vertex set Vd = [d]. We denote N0 = N ∪ {0}. For a set N ⊂ N we define N 2 = {(u, v) | u < v, u, v ∈ N } to be the set of ordered pairs of numbers in N . For a graph G = (V, G) we use V (G) = V , E(G) = E, maxdeg(G) to refer to the vertex set, edge set and maximum degree of G respectively. For two graphs G, G0 we use G0 E G if G0 is a spanning subgraph of G, i.e., V (G0 ) = V (G) and E(G0 ) ⊆ E(G); we use G0 ⊆ G if G0 is a subgraph of G but not necessarily a spanning one, i.e., V (G0 ) ⊆ V (G) and E(G0 ) ⊆ E(G). For a probability measure P, the notation P⊗n means the product measure of n independent and identically distributed (i.i.d.) samples from P. d Any vector θ ∈ R(2) naturally induces an undirected graph G(θ) = (Vd , E(θ)), where the edge set E(θ) = {(u, v) | θuv 6= 0, u < v}. If E is an arbitrary edge set for e := (j, k) ∈ E we use the notation θe = θjk interchangeably to denote the element e of the vector θ. Given two sequences {an }, {bn } we write an = O(bn ) if there exists a constant C < ∞ such that an ≤ Cbn ; an = Ω(bn ) if there exists a positive constant c > 0 such that an ≥ cbn ; an = o(bn ) if an /bn → 0, and an  bn if there exists positive constants c and C such that c < an /bn < C; an & bn if there exists an absolute constant C > 0 so that an ≥ Cbn . Finally we use ∧ and ∨ for min and max of two numbers respectively. 1.4 Organization The remainder of the paper is structured as follows. Minimax bounds for ferromagnetic models are given in Section 2. Section 3 is dedicated to correlation screening algorithms for testing in 5 ferromagnets. Section 4 provides minimax bounds for general models. Section 5 studies correlation based algorithms for general models. The proof of the main result of Section 4 is given in Section 6. Discussion is postponed to the final Section 7. All remaining proofs are relegated to the appendices. 2 Bounds for Ferromagnets This section discusses lower and upper bounds on the temperature for ferromagnetic models. We begin by formally introducing the simple zero-field ferromagnetic Ising models. Denote the set of d all vectors θ ∈ R(2) whose entries are either equal to 0 or θ > 0 by d S(θ) = {θ ∈ R(2) | θe = 0 if e 6∈ E(θ), θe = θ if e ∈ E(θ)}. (2.1) Given a θ ∈ S(θ), the simple zero-field ferromagnetic Ising model with signal θ > 0 is given by Pθ (X = x) =  1 exp θ Zθ  xu xv , X (2.2) (u,v)∈E(θ) where the vector of spins x ∈ {±1}d and X Zθ =  exp θ x∈{±1}d X  xu xv , (u,v)∈E(θ) denotes the normalizing constant, also known as partition function. Model (2.2) is equivalent to (1.1), where the spin-spin interactions ξuv are either equal to 1 or 0 hence the term “simple”. The term “zero-field” refers to the fact that we have set all “main-effects” parameters of the spins xu to zero, and “ferromagnetic” refers to the fact that all spin-spin interactions are non-negative. As discussed in the introduction, the parameter θ is the inverse temperature but will also be referred to as signal strength interchangeably. A key concept allowing us to quantify the difficulty of testing a graph property P under the worst possible scenario is the minimax risk. Formally, given data generated from model (2.2) and a property P, testing (1.2) is equivalent to testing H0 : θ ∈ S0 (θ) versus H1 : θ ∈ S1 (θ) where S1 (θ) := {θ ∈ S(θ) | P(G(θ)) = 1}.5 S0 (θ) := {θ ∈ S(θ) | P(G(θ)) = 0}, The minimax risk of testing P is defined as   ⊗n Rn (S0 (θ), S1 (θ)) := inf sup P⊗n θ (ψ = 1) + sup Pθ (ψ = 0) , ψ θ∈S0 (θ) (2.3) (2.4) θ∈S1 (θ) where the infimum is taken over all measurable binary valued test functions ψ, and recall the notation ⊗n for a product measure of n i.i.d. observations. Criteria (2.4) evaluates the sum of the worst possible type I and type II errors under the best possible test function ψ. One can always generate ψ ∼ Ber( 12 ) independently of the data, which yields a minimax risk equal to 1. In the remainder of this section we derive upper and lower bounds on the temperature beyond which Rn (S0 (θ), S1 (θ)) asymptotically equals 1, which implies that asymptotically the best test 5 The sets S0 (θ) and S1 (θ) depend on P, but we suppress this dependence to ease the notation. 6 of P would be as good as a random guess. Importantly, here and throughout the manuscript we implicitly assume the high dimensional regime d := d(n), so that asymptotically d → ∞ as n → ∞. To formalize our general signal strength bound for combinatorial properties in Ising models, we need several definitions. Similar definitions were previously used by Neykov et al. (2016) to understand the limitations of combinatorial inference in Gaussian graphical models. The first definition allows us to measure a graph based pre-distance between edges. Definition 2.1 (Edge Geodesic Pre-distance). Let G be a graph and {e, e0 } be a pair of edges which need not belong to G. The edge geodesic pre-distance is given by dG (e, e0 ) := min 0 dG (u, v), u∈e,v∈e where dG (u, v) denotes the geodesic distance6 between vertices u and v on G. If such a path does not exist dG (e, e0 ) = ∞. Here we use the term pre-distance since dG (e, e0 ) does not obey the triangle inequality. Having defined a pre-distance we can define edge packing sets and packing numbers. Definition 2.2 (Packing Number). Given a graph G = (V, E) and a collection of edges C with vertices in V , an r-packing of C is any subset of edges S, i.e., S ⊆ C such that each pair of edges e, e0 ∈ S satisfy dG (e, e0 ) ≥ r. We define the r-packing number: N (C, dG , r) = max{|S| | S ⊆ C, S is r-packing}, i.e., N (C, dG , r) is the maximum cardinality of an r-packing set. A large r-packing number implies that the set C has a large collection of edges that are far away from each other. Hence the packing number can be understood as a complexity measure of an edge set. The final definition before we state our first result formalizes constructions of graphs belonging to the null and alternative hypothesis and differing in a single edge. Definition 2.3 (Null-Alternative Divider). For a binary graph property P, let G0 = (Vd , E0 ) be a graph satisfying P(G0 ) = 0. We refer to an edge set C = {e1 , . . . , em }, as a null-alternative divider (or simply divider for short) with a null base G0 if for any e ∈ C the graphs Ge := (Vd , E0 ∪ {e}) satisfy P(Ge ) = 1. Intuitively, a large divider set C implies that testing P is difficult since there exist multiple graphs Ge with which one can confuse the graph G0 . We make this intuition precise in Theorem 2.4 (Signal Strength Necessary Conditions). Given a binary graph property P, let G0 satisfy P(G0 ) = 0, and the set C be a divider set with a null base G0 . Suppose that |C| → ∞ asymptotically. If for some c < 1 and 0 < ε < 1 we have r log N (C, dG0 , ((− log c)−1 + ε) log log |C|) θ ≤ (1 − ε) ∧ atanh(c(maxdeg(G0 ) + 1)−1 ), n then liminf Rn (S0 (θ), S1 (θ)) = 1. n→∞ 6 The geodesic distance between u and v is the number of edges on the shortest path connecting u and v. 7 Theorem 2.4 gives a strategy for obtaining lower bounds on θ using purely combinatorial constructions. Its proof utilizes Dobrushin’s comparison theorem (Föllmer, 1988) to bound the χ2 divergence between Ising measures deferring in a single edge. The second inequality on θ is required to ensure that the system is in a “high temperature regime” which is where Dobrushin’s theorem holds. In all of our examples one can select a graph G0 of constant maximum degree and hence the real obstruction on θ is given by the entropy term. Theorem 2.4 is reminiscent of Theorem 2.1 of Neykov et al. (2016); remarkably, similar constructions can be used to give lower bounds on the signal strength in both the Gaussian and Ising models. Even though the statements of the two results are related, their proofs are vastly different. The proof in the Gaussian case heavily relies on the fact that the partition functions can be evaluated in closed form, which is generally impossible in Ising models. We demonstrate the usefulness of Theorem 2.4 in Section 2.1 where we apply it to several examples. We complement Theorem 2.4 by an upper bound on the inverse temperature θ above which the minimax risk cannot be controlled. The need for such bounds arises due to identifiability issues in Ising models at low temperatures. In such regimes the model develops long range correlations, i.e., even spins which are not neighbors on the graph can become highly correlated. A simple implication of this fact for instance is that it is challenging to tell apart a triangle graph from a vertex with its two disconnected neighbors at low temperatures (see Figure 3). To formalize the statement we first define a class of graph properties. To this end recall the distinction between the spanning subgraph and subgraph inclusions E, ⊆ introduced in Section 1.3. Definition 2.5 (Monotone and Strongly Monotone Properties). A binary graph property P : G 7→ {0, 1}, is called monotone if for any two graphs G0 E G we have P(G0 ) ≤ P(G). A binary property P is called strongly monotone if for any two graphs G0 ⊆ G we have P(G0 ) ≤ P(G). By definition any strongly monotone property is monotone, however the converse is not true. An example of a strongly monotone property is the size of the largest clique in a graph. On the other hand, an example of a monotone property which is not strongly monotone is graph connectivity. We now state our result giving an upper bound on θ when testing strongly monotone properties. Recall definition (2.3) of the sets S0 (θ), S1 (θ). We have Theorem 2.6 (Strongly Monotone Properties Necessary Conditions). Let P be a strongly monotone property, and H0 be a graph satisfying P(H0 ) = 1. Assume there exists an l × r biclique7 B with r ≥ 2 such that B E H0 . Suppose there are two vertices u, v belonging to the right side of B, 3 so that adding (u, v) to H0 gives a graph H1 satisfying P(H1 ) = 1. Let θ satisfy θ ≥ 2l and θ ≥ r−2 when r > 2 or θ ≥ log 2 for r = 2. Then if for some κ > 1 we have θ≥ 2κnr log logbd/(l+r)c l , (2.5) it holds that liminf Rn (S0 (θ), S1 (θ)) = 1. n→∞ Theorem 2.6 shows how to prove upper bounds on θ using graph constructions. One needs to find a graph H0 containing a large biclique B, so that adding edges to H0 transfers it to an alternative graph. The number of “left” vertices l of B appears in (2.5), and therefore the larger B is the harder it is to test P in the worst case. The intuition behind this is as follows. The existence 7 A complete bipartite graph. 8 of the biclique B is a measure of how dense H0 is. The denser H0 is the harder it is to tell it apart from H1 when θ is large. On the other hand the strong monotonicity of P ensures that if a subgraph H1 of G satisfies P(H1 ) = 1 then P(G) = 1. Therefore if G contains H0 as a subgraph it becomes hard to test for P when the value of θ is large. Examples 2.8 and 2.9 of the following section illustrate how to apply Theorem 2.6 in practice. 2.1 Examples In this section we apply Theorems 2.4 and 2.6 to establish necessary conditions on θ for the three examples discussed in the introduction. When we apply Theorem 2.4 we will use ε = 12 and c = e−2 so that (− log c)−1 + ε = 1. Example 2.7 (Connectivity). In this example we derive a lower bound on θ for graph connectivity testing. Define “graph connectivity” P as P(G) = 0 if G is disconnected and P(G) = 1 otherwise. Construct a base graph G0 := (Vd , E0 ) where bd/2c−1 E0 := {(j, j + 1)j=1 , (bd/2c, 1), (j, j + 1)dj=bd/2c+1 , (bd/2c + 1, d)}, and let bd/2c C := {(j, bd/2c + j)j=1 } (see Figure 1). Adding any edge from C to G0 results in a connected graph, so C is a divider with a null base G0 . To construct a packing set of C, we collect all edges (j, bd/2c + j) for j ≤ bd/2c − dlog log |C|e satisfying dlog log |C|e divides j. jThis procedure results in a packing set with radius at least dlog log |C|e and k |C| cardinality of at least dlog log |C|e − 1. Therefore log N (C, dG0 , log log |C|) ≥ log hj k i |C| − 1  log |C|  log d. dlog log |C|e By Theorem 2.4 the asymptotic risk of connectivity testing is 1 if for some absolute constant κ > 0 p θ < κ log d/n ∧ atanh(1/(3e2 )), (2.6) where in the last bound we used maxdeg(G0 ) = 2. e0 e Figure 1: The graph G0 with two edges e, e0 ∈ C : dG0 (e, e0 ) = 2, d = 10. Example 2.8 (Cycle Presence). Consider testing the property P “cycle presence”, i.e. P(G) = 0 if G is a forest and P(G) = 1 otherwise. Define the null base graph G0 = (Vd , E0 ) E0 := {(j, j + 1)d−1 j=1 }, 9 and let the edge set C := {(j, j + 2)dj=1 }, where the addition is taken modulo d (see Figure 2 for a visualization). By construction we have P(G0 ) = 0 and |C| = d. Adding any edge from C to G0 yields a graph with a cycle, and hence the edge set C is a divider with a null base G0 . Moreover, there exists a log log |C|-packing set of C of cardinality at least dlog |C|−2 log |C|e+2 . To see this collect the edges (j, j + 2) for j = k(log log |C| + 2) + 1 for k = 0, 1, . . . and j ≤ d − 2. The last observation implies that log N (C, dG0 , log log |C|)  log |C| − 2  log d. dlog log |C|e + 2 Hence by Theorem 2.4, using maxdeg(G0 ) = 2, we conclude that the asymptotic risk of cycle testing is 1 when for some absolute constant κ > 0 p θ < κ log d/n ∧ atanh(1/(3e2 )). (2.7) e e0 Figure 2: The graph G0 with two (dashed) edges e, e0 ∈ C such that dG0 (e, e0 ) = 2, d = 7. By definition cycle presence is a strongly monotone property. Figure 3 shows an example of a graph H0 satisfying the conditions of Theorem 2.6. Concretely, H0 is a 1×2 biclique which contains no cycle and has the property that adding one edge on its right side gives a graph with a cycle. Applying Theorem 2.6 we obtain an upper bound on θ. If there exists a constant κ > 1 such that θ ≥ 2 ∨ log 4κn , logbd/3c (2.8) the minimax risk of cycle testing is asymptotically 1. Figure 3: The graph H0 in the left panel is a triangle with a missing edge. H0 contains a biclique with no cycles. On the other hand, if we add the dashed edge we obtain a triangle graph H1 , which has a cycle. In terms of the notation of Theorem 2.6 we have l = 1 and r = 2. Example 2.9 (Clique Size). In our final example we consider testing the “maximum clique size” property P, where P is such that P(G) = 0 if G has no m-clique and P(G) = 1 otherwise. 10  eM := M \ {(i1 , i2 )} denote the m-clique with vertices For a subset M = {i1 , . . . , im } ⊂ Vd , let C 2 in M excluding the edge (i1 , i2 ). Define the null base graph G0 = (Vd , E0 ) where bd/mc−1 E0 := [ e{jm+1,...,(j+1)m} ). E(C j=0 Let the edge set bd/mc−1 C := [ j=0 {(jm + 1, jm + 2)}, be the union of missing edges in the incomplete m-cliques in E0 . We refer to Figure 4 for a visualization of this construction. By design have P(G0 ) = 0 and |C| = bd/mc. Adding any edge from C to G0 results in a graph with an m-clique, and hence the edge set C is a divider with a null base G0 . Moreover, note that taking any two edges e, e0 ∈ C we have that dG0 (e, e0 ) = ∞ (see Figure 4) and hence C is an ∞-packing. Consequently we have log N (C, dG0 , log log |C|) = log(|C|) = logbd/mc. Since maxdeg(G0 ) = m − 1 by Theorem 2.4 we have that if p θ ≤ κ logbd/mc/n ∧ atanh(1/(me2 )), (2.9) the minimax risk of testing is asymptotically 1. e0 e Figure 4: A graph G0 in solid edges, consisting of incomplete 4-cliques. The set C consists of all dashed edges. Adding any single one of the dashed edges transfers G0 to a graph in the alternative. Since P is a strongly monotone property, we can apply Theorem 2.6 to upper bound θ. To obtain more precise bounds, let us further restrict the underlying true graph G so that maxdeg(G) ≤ s, where s is a known integer such that m ≤ s+1. The following construction of the graph H0 from the statement of Theorem 2.6 is inspired by Turán’s Theorem (e.g., Bollobás, 2004). We build H0 by s−1 taking b m−2 c(m − 1) vertices, splitting them in m − 1 equally sized groups and connecting any two vertices belonging to different groups; see Figure 5 for a visualization of H0 . It is simple to check that H0 does not contain an m-clique, and adding an edge to H0 , gives a graph containing an m-clique s−1 s−1 m−1 with maximum degree bounded by s. Furthermore, H0 contains a b m−2 cd m−1 2 e × b m−2 cb 2 c biclique; to see this split the m − 1 vertex groups into 2 vertex groups: one with all vertices in the first d m−1 2 e groups, and the other with all remaining vertices. 11 Figure 5: In the left panel we show an example of the graph H0 . The concrete values of s and m used are s = 7 and m = 4. H0 contains no 4-clique, and its maximum degree is smaller than 7. On the other hand adding any edge (such as the dashed edge in the figure on the right) to H0 results in a graph H1 which contains a 4-clique, and whose maximum degree remains bounded by 7. The graph H0 contains a 6 × 3 biclique, whose right side consists of taking the three rightmost vertices. We are now in a position to apply Theorem 2.6. To render bound (2.5) in a reader friendly s−1 s−1 m−1 form, we use that the terms b m−2 cb m−1 2 c, b m−2 cd 2 e and s/2 are equal up to constants for large enough values of s and m. We have that the minimax risk is asymptotically 1 if for any κ > 1 κns log logbd/sc 3 θ& ∨ . s/2 − 2 s/2 (2.10) Notably, the maximum degree s of the graph appears in (2.10) unlike in the previous two examples. The bigger the maximum degree is allowed to be, the smaller the signal θ has to be in order for meaningful clique size tests to exist. 3 Correlation Screening for Ferromagnets In this section we formulate and study the limitations of a greedy correlation screening algorithm on monotone property testing problems. We pay special attention to the examples discussed in Section 2.1. Unlike correlation based decoders, such as the ones studied by Santhanam and Wainwright (2012), this algorithm is designed to directly target the graph property of interest, and also has polynomial runtime for many instances. Moreover, for different properties, the regimes in which the algorithm works differ vastly from graph recovery algorithms. For generality we expand model class (2.2) to include all zero-field ferromagnetic models such that:  X  Pθ (X = x) ∝ exp θuv xu xv , (3.1) (u,v)∈E(θ) where x ∈ {±1}d and for (u, v) ∈ E(θ): θuv > 0. In contrast to (2.2), (3.1) allows for the interactions to have different magnitude. Akin to Section 3 in Neykov et al. (2016), we define a class of graphs “witnessing” the alternative. For a monotone property P, and a graph G satisfying P(G) = 1, define the collection of graphs WP (G) = {G0 E G | P(G0 ) = 1}, where recall that the notation G0 E G means that G0 is a spanning subgraph of G. The set WP (G) is therefore the collection of all spanning subgraphs of G satisfying P. We refer to graphs in WP (G)  Vd as witnesses of P. If Gd = Vd , 2 denotes the complete graph, the set WP (Gd ) is the collection of all possible witnesses of P. It is therefore clear that by the monotonicity of P for two graphs G 12 and G0 such that P(G) = 0 and G0 ∈ WP (Gd ), the set E(G0 ) \ E(G) 6= ∅. Define the parameter sets d S0 := {θ ∈ R(2) | P(G(θ)) = 0},  d S1 (θ) := θ ∈ R(2) P(G(θ)) = 1,  max min G0 ∈WP (Gd ) (u,v)∈E(G0 ) θuv ≥ θ > 0 , where we suppressed the dependence of S0 and S1 (θ) on the property P to simplify the notation. The set S0 imposes no signal strength restrictions, while S1 (θ) requires the existence of at least one witness of P, each edge of which corresponds to an interaction with magnitude at least θ. In Section 2.1 we saw that some property tests, such as cycle testing and clique size testing, necessitate further restrictions on their parameters (see (2.8) and (2.10)). Let R be an appropriately chosen for the property P restriction set on θ. For instance, an appropriate set R for cycle testing could be R = {θ | kθk∞ ≤ Θ} for some Θ ≥ θ > 0. Before we formulate the correlation screening algorithm, it is useful to first define the extremal correlation T := T (θ, R, P) = min min θ∈S1 (θ)∩R (u,v)∈E(θ) Eθ Xu Xv . (3.2) T is the smallest possible correlation between neighboring vertices under any model from the alternative. Provided that we have sufficiently many samples, and the data is generated under an alternative model, all empirical correlations between neighboring vertices should be approximately at least T . To formally define the empirical correlations, let X (1) , X (2) , . . . , X (n) ∼ Pθ be n i.i.d. b so that for any samples from the ferromagneticPIsing model (3.1). Define the empirical measure P, n (i) d −1 b b To this end, b ∈ A). Put E for the expectation under P. Borel set A ⊂ R : P(A) = n i=1 1(X for a given δ > 0 define the universal threshold r 4 log d + log δ −1 τ := τ (n, d, δ) = , (3.3) n and consider the following correlation screening Meta-Algorithm 1 for monotone property testing in ferromagnetic Ising models. Algorithm 1 Correlation Screening Test Input: {X (i) }i∈[n] , θ, R, P Set ψ = 0 b u Xv }u,v∈V Calculate the matrix M := {EX d Solve b = argmax G min 0 G0 ∈WP (Gd ) (u,v)∈E(G ) Muv Set ψ = 1 if mine∈Gb Me > T 8 − τ . return ψ 8 It is assumed that either T or an upper bound of T are available in closed form. 13 (3.4) The only potentially computationally intensive task in Algorithm 1 is optimization (3.4), which aims to find a witness whose smallest empirical correlation is the largest. However, for many properties solving (3.4) can be done in polynomial time via greedy procedures. We remark that step (3.4) treats Muv as a surrogate of θuv . Instead, one could opt to substitute Muv with an estimate of the parameter θuv , which can be obtained via a procedure such as `1 -regularized vertex-wise logistic regressions (Ravikumar et al., 2010), e.g. Here we prefer to focus on correlation screening due to its simplicity, while we recognize that the estimate Muv may not be a good proxy of θuv in models at low temperature regimes, which are known to develop long range correlations. We have the following result regarding the performance of Algorithm 1. Theorem 3.1. Suppose that T − max max min θ∈S0 ∩R G0 ∈WP (Gd ) (u,v)∈E(G0 ) Eθ Xu Xv > 2τ. (3.5) Then Algorithm 1 satisfies sup Pθ (ψ = 1) ≤ δ and θ∈S0 ∩R sup θ∈S1 (θ)∩R Pθ (ψ = 0) ≤ δ. (3.6) Condition (3.5) ensures that the gap between the minimal correlations in models under the null and alternative hypothesis is sufficiently large even in worst case situations. Specifically, the term T selects a parameter θ and an edge in E(G(θ)) corresponding the least possible correlation between neighboring vertices among all alternative models. The second term on the left hand side (LHS) of (3.5), selects a parameter θ under the null and a witness G0 , yielding the largest possible minimal correlation on any of the edges of G0 . Note that any witness G0 ∈ WP (Gd ) contains at least one edge (u, v) ∈ E(G0 ) corresponding to a parameter θuv = 0 when θ ∈ S0 , while there exists at least one G0 ∈ WP (G(θ)) such that θuv ≥ θ for all (u, v) ∈ E(G0 ) if θ ∈ S1 (θ). Hence, if the pairwise correlations are good proxies for the parameters θ the strategy of Algorithm 1 is viable, since T would be sufficiently large while the second term of (3.5) would be sufficiently small. Indeed, we show this formally below. Given a sparsity level s and a real number Θ define the ratio R(s, Θ) := cosh(2sΘ) + 2se−2(s−1)Θ (cosh(2(s − 1)Θ) . 2se−2(s−1)Θ cosh(2Θ) + 1 The following holds Corollary 3.2. Assume that the parameter θ ∈ R, where the restriction set R is d R = {θ ∈ R(2) | maxdeg(G(θ)) ≤ s, kθk∞ ≤ Θ}. i. Then if s ≥ 3 9 and R(s, Θ) − 1 > 2τ, R(s, Θ) + 1 (3.7) s tanh2 (Θ) > 2τ, 1 − (s − 1) tanh(Θ) (3.8) T − ii. and/or if (s − 1) tanh(Θ) < 1, and T − 9 Similar condition to (3.5) holds for the case s = 2. For details see the proof of Corollary 3.2. 14 Algorithm 1 satisfies (3.6). Remark 3.3. Corollary 3.2 ii. ensures that Algorithm 1 satisfies (3.6) in the high temperature regime s tanh(Θ)  1 when the entries of θ are approximately equal. To see this, note that the FKG inequality (see Theorem 6.2.1 Alon and Spencer (2004)) guarantees T ≥ tanh(θ), and therefore if θ  Θ, s tanh(Θ) is sufficiently small, and θ ≥ Ω(τ ), (3.8) implies that Algorithm 1 controls the type I and type II errors. This fact, coupled with the results of Section 2 suggests that correlation screening is optimal up to scalars in the high temperature regime. Below we study three specific instances of Algorithm 1 to obtain better understanding of its limitations. Importantly, we observe that the correlation screening test can be constant optimal beyond the high temperature regime for some properties. 3.1 Examples We now revisit the three examples of Section 2.1. Example 3.4 (Connectivity). Here we implement the correlation screening algorithm for connectivity testing (see Algorithm 2), and we take the opportunity to contrast property testing to graph recovery. We will argue that correlation screening can test graph connectivity even in graphs of unbounded degree. In contrast, correlation based algorithms fail to learn the structure even in unconnected graphs when the signal strength θ ≥ Ω( 1s ), where s denotes the maximum degree of the graph, as argued by Montanari and Pereira (2009). Algorithm 2 Connectivity Test Input: {X (i) }i∈[n] Set ψ = 0 b u Xv }u,v∈V Calculate the matrix M := {EX d Estimate Tb the maximum spanning tree (MST) on M10 // Equivalent to solving (3.4) Set ψ = 1 if mine∈Tb Me > tanh(θ) − τ return ψ It is simple to see that the parameter set definitions reduce to  S0 := {θ | G(θ) is disconnected}, S1 (θ) := θ max min T EG(θ) (u,v)∈E(T ) θuv tree  ≥θ>0 , d and there are no further parameter restrictions, i.e., R ≡ R(2) . We have Corollary 3.5. Assume that tanh(θ) > 2τ . Then Algorithm 2 satisfies (3.6). Corollary 3.5 underscores the difference between property testing and structure learning. Montanari and Pereira (2009) and Santhanam and Wainwright (2012), showed that one cannot recover the graph structure in a ferromagnetic model when the parameter θ exceeds a critical threshold. We also note that the condition tanh(θ) ≥ 2τ matches the lower bound prediction (2.6) up to constant terms. 10 Finding an MST can be done efficiently. 15 Example 3.6 (Cycle Presence). Here we revisit cycle testing. The parameter sets reduce to   S0 := {θ | G(θ) is a forest}, S1 (θ) := θ max min θuv ≥ θ > 0 . C ⊆G(θ) (u,v)∈E(C) cycle Motivated by (2.8) we take the restriction set as R = {θ | kθk∞ ≤ Θ}. The correlation screening algorithm for cycle testing is given in Algorithm 3. We have the following corollary of Theorem 3.1. Algorithm 3 Cycle Test Input: {X (i) }i∈[n] , θ Set ψ = 0 b u Xv }u,v∈V Calculate the matrix M := {EX d b emerges11 // i.e., solve (3.4) Add edges with weights from the matrix M until a cycle C Set ψ = 1 if mine∈Cb Me > tanh(θ) − τ return ψ Corollary 3.7. Assume that tanh(θ) − tanh2 (Θ) > 2τ . Then Algorithm 3 satisfies (3.6). Remark 3.8. For the purpose of this remark, let us restrict to model class (2.2), i.e., assume θ ≡ Θ. In this setting, the condition of Corollary 3.7 reduces to the quadratic inequality t − t2 > 2τ , where we put t := tanh(θ) for brevity. Equivalently, the feasible values of θ should satisfy √ √ 1 − 1 − 8τ 1 + 1 − 8τ ≤t≤ . 2 2 To make the calculation more accessible we will now use the notation f (x) ≈ g(x) in the sense that √ √ f (x) 1+ 1−8τ 1− 1−8τ ≈ 2τ and ≈ 1 − 2τ . It limx↓0 g(x) = 1. When τ = o(1), it is simple to check that 2 2 therefore follows that Algorithm 3 is successful when 2τ ≈ atanh(2τ ) ≤ θ ≤ atanh(1 − 2τ ) ≈ log(1/τ )/2. Up to scalars the above inequalities agree with bounds (2.7) and (2.8) given in Section 2.1. An alternative correlation based cycle test which works for general models is given in Section 5.1. Example 3.9 (Clique Size). Finally we revisit clique size testing. The parameter sets reduce to   S0 (Θ) := {θ | G(θ) has no m-clique}, S1 (θ, Θ) := θ max min θuv ≥ θ > 0 , C m-clique ⊆G(θ) (u,v)∈E(C) and let the restriction set R = {θ | kθk∞ ≤ Θ, maxdeg(G(θ)) ≤ s}, where 2 ≤ m ≤ s + 1. We summarize the correlation screening implementation for clique size testing in Algorithm 4. To this end for a Z ∼ N (0, 1) define √ e2θ E coshm−2 ( θZ + 2θ) √ r(m, θ) := . E coshm−2 ( θZ) 16 Algorithm 4 Clique Size Test Input: {X (i) }i∈[n] , θ Set ψ = 0 b u Xv }u,v∈V Calculate the matrix M := {EX d b emerges12 // i.e., solve (3.4) Add edges with weights from the matrix M until an m-clique C r(m,θ)−1 Set ψ = 1 if mine∈Cb Me > r(m,θ)+1 −τ return ψ The following holds Corollary 3.10. For θ ∈ S1 (θ) ∩ R we have T = r(m,θ)−1 r(m,θ)+1 . Hence if (s, m, d, n, θ, Θ) are such that either of (3.7) or (3.8) hold then Algorithm 4 satisfies (3.6). Remark 3.11. We now comment on the implications of Corollary 3.10 over model class (2.2), i.e., we assume θ ≡ Θ. In Remark 3.3 we already argued that if s tanh(θ) < ν for some sufficiently small ν > 0, Algorithm 4 controls the type I and type II errors as long as θ ≥ Ω(τ ). Since tanh(θ) ≈ θ for small θ, in the high temperature regime θ < ν/s Algorithm 4 matches the lower bound (2.9). Unfortunately, condition (3.7) is not strong enough to ensure that Algorithm 4 works in the regime θ ≥ Ω(1/s) for all values of m. However, (3.7) suffices to show that it works when m = s+1. In Remark C.4 of Appendix C, we formally argue that when m = s + 1, θ = Θ, esθ  s, provided that θ≤ log (2/τ ) , 4(s − 1) (3.9) Algorithm 4 satisfies (3.6). Note that (3.9) matches bound (2.10) up to scalars. Hence the special case of clique size testing when m = s + 1 is yet another example confirming that correlation screening can be useful for property testing even at low temperatures. 4 Bounds for General Models So far we studied model classes admitting only ferromagnetic interactions. The situation drastically changes if one considers the general class of zero-field Ising models, which includes models with antiferromagnetic, i.e., negative interactions. The main result of this section is an impossibility theorem, which shows that testing strongly monotone properties over this general class of models requires boundedness of a certain maximum functional of the property. We also argue more specifically, that unlike in the ferromagnetic case, connectivity testing is not feasible at low temperatures over the general model class unless the degree of the graph is bounded. Both of these results sharply contrast what we have seen in the previous sections of the paper. 11 b takes at most d steps, and can be done efficiently. Finding the cycle C Fast algorithms for m-clique presence exist when either m or s − m are bounded. For example, when a new edge ds (u, v) is added, walk over common neighbors of both u and v, and check for an m-clique. There are at most   2 steps s−1 2 s−1 and at each step we have to check at most m−2 m-cliques, giving a runtime bound of O(ds s + m m−2 ) . 12 17 Concretely, we will work with the simple zero-field models specified by the parameters θ ∈ S(θ) d (recall the definition of S(θ) (2.1)) and ξ ∈ {±1}(2) as   X ξuv xu xv . (4.1) Pθ,ξ (X = x) ∝ exp θ (u,v)∈E(θ) Expression (4.1) has more degrees of freedom compared to (2.2) since the spin-spin interactions in (4.1) are allowed to be negative. Intuitively, interactions corresponding to ξuv = −1 have a “repelling” effect on the corresponding spins u and v, whereas interactions with ξuv = 1 have an “attracting” effect. Given a monotone property P, recall definition (2.3) of the parameter sets S0 (θ), S1 (θ). Below we redefine the minimax risk to reflect the model class expansion. Let   ⊗n ⊗n sup Rn (S0 (θ), S1 (θ)) := inf sup Pθ,ξ (ψ = 1) + sup sup Pθ,ξ (ψ = 0) , (4.2) ψ d θ∈S0 (θ) d θ∈S1 (θ) ( ) ( ) 2 2 ξ∈{±1} ξ∈{±1} where P⊗n θ,ξ denotes the product measure of n i.i.d. observations of (4.1). Armed with this new definition we have d (2) Theorem √ 4.1. Assume θ belongs to the restriction set R = {θ ∈ R | maxdeg(G(θ)) ≤ s}, where s = o( d). Suppose that the strongly monotone property P satisfies P(∅) = 0 and P(Cs ) = 1, where Cs denotes an s-clique graph. Then if for some small ε > 0, s log d/s2 s log d/(2s) √ > 2 + ε and ≥ 1 + ε, n n log 2s (4.3) we have liminf inf Rn (S0 (θ) ∩ R, S1 (θ) ∩ R) = 1. n→∞ θ≥0 Remark 4.2. At first glance it might appear that the statement of the above result is vacuous, d = o(1) is often assumed. This assumption since in the high dimensional literature the scaling s log n q d is related to the fact that the quantity s log corresponds to optimal rates of estimation for the `2 n norm (e.g., Lemma 3 of Ravikumar et al., 2010). We would like to emphasize that the conclusion of Theorem 4.1 has implications regarding testing and detection problems, and therefore while related to, should not be confused with minimax optimal estimation rates. We would further like to contrast our result with similar known bounds such Theorem 1 of Santhanam and Wainwright (2012) and Theorem 1 of Bresler et al. (2008). The key differences between our result and these known bounds are that, first (4.3) is valid for property testing and even more generally for a certain detection problem (see the proof in Section 6 for more details), while previous results are valid only for structure recovery; and therefore second — the worst cases are very different. In fact both previously known bounds remain valid in the smaller class of ferromagnetic models, while as we saw in Section 3, some strongly monotone property tests such as cycle presence do not exhibit such limitations. Note that for any non-constant strongly monotone P one has P(∅) = 0. Further, the requirement that P holds true on Cs is mild, since for any non-zero strongly monotone P one can always find a sufficiently large s for which P is satisfied. The only true √ restriction of Theorem 4.1 on P is thus that one has to be able to find s in the sparse regime s  d. 18 −θ θ Figure 6: Testing connectivity on a model with a connected graph as above is difficult. All solid edges correspond to positive interactions with magnitude θ, while the dashed edge corresponds to a negative interaction with magnitude −θ. The cliques are chosen of maximum size s so that the total degree remains at most than s. When the value of θ is large, the majority of the spins in each clique will tend to have the same sign. Hence the two interactions with the node in the path graph are “likely” to cancel out, which will make it hard to tell this graph from the disconnected graph consisting of the connected cliques and the path graph. We exploit this construction in the proof of Proposition 4.3. Loosely speaking Theorem 4.1 shows that when the quantity s lognd/s (up to a log factor) is large, strongly monotone property testing over the model class (4.1) is very difficult in the sparse √ regime when s  d. What is more, this statement remains valid regardless how large or small the signal strength parameter θ ≥ 0 is allowed to be. This contrasts sharply with our results in the ferromagnetic case, where we have already seen an example which did not require such a condition. Take the cycle testing example in Section 3.6. In this example if s denotes the maximum degree of the graph, we can always take an s-clique Cs (which certainly contains a cycle), and hence s has to satisfy (4.3) in order for tests with reasonable minimax risk (4.2) to exist. In contrast Corollary 3.7 shows that controlling the minimax risk is possible without requirements on the maximum degree of the graph. Theorem 4.1 shows that this is no longer the case over the broader model class (4.1). The proof of Theorem 4.1 is involved, and in fact shows that a more basic problem than property testing is impossible when (4.3) holds. Namely, the proof argues that testing the null hypothesis of a model with an empty graph versus the alternative of a model containing an antiferromagnetic s-clique is very difficult. Clearly, one would be able to tell those two scenarios apart if there exists a test of whether a property P satisfying the requirements of Theorem 4.1 holds. The details of the proof can be found in Section 6. Theorem 4.1 sheds some light on the complexity involved in testing within model class (4.1). However, it also leaves something to be desired, namely it does not quantify the effect θ has, and it does not address specific properties which may potentially exhibit different complexity. Moreover, it only applies to strongly monotone properties and not to all monotone properties, and thus in particular it does not apply to connectivity testing. Below we give an explicit upper bound on the parameter θ for connectivity testing within the model class (4.1). We show a particularly hard case for connectivity testing in Figure 6 and include a brief explanation in its caption. Proposition 4.3. Let P be graph connectivity. Assume θ belongs to the restriction set R = {θ ∈ d 3 R(2) | maxdeg(G(θ)) ≤ s}. Let s, n, d be sufficiently large, and suppose θ ≥ 2bs/4c−2 and there 19 exists a κ > 1 so that θ> κsn 2 log log(ds) s − 16 . (4.4) Then the minimax risk (4.2) satisfies liminf Rn (S0 (θ) ∩ R, S1 (θ) ∩ R) = 1, where S0 (θ), S1 (θ) are n→∞ defined in (2.3). Importantly, condition (4.4) implies that the maximum degree cannot be too large with respect to the other parameters if we hope for a connectivity test with a good control over both type I and type II errors to exist. Recall that no such conditions were needed in Corollary 3.5 when testing connectivity in ferromagnets. 5 Correlation Testing for General Models Section 4 made it apparent that property testing is more challenging in the enlarged model space (4.1). In this section we work with an even larger class of zero-field models compared to (4.1) which are specified as:  X  Pθ (X = x) ∝ exp θuv xu xv , (5.1) (u,v)∈E(θ) where θ ≤ |θuv | ≤ Θ, (u, v) ∈ E(θ) are unknown parameters and x ∈ {±1}d . For a monotone property P define the parameter sets d S0 (θ, Θ) := {θ ∈ R(2) | θ ≤ |θuv | ≤ Θ, P(G(θ)) = 0}, d S1 (θ, Θ) := {θ ∈ R(2) | θ ≤ |θuv | ≤ Θ, P(G(θ)) = 1}. Different from Section 3, here we impose signal strength restrictions even in the null set S0 (θ, Θ) and leave the more general setting for future work. We note that one can no longer rely on the screening algorithms of Section 3 to perform a property test for data generated by (5.1). The success of correlation screening hinges on the fact that in ferromagnets deleting edges reduces correlations, which no longer holds in the model class (5.1). One alternative would be to perform exact structure recovery, and check whether the graph property in question holds on the desired graph. Possibilities of exact graph recovery include methods developed in (Bresler et al., 2008; Ravikumar et al., 2011; Santhanam and Wainwright, 2012; Anandkumar et al., 2012; Bresler, 2015). Below we take a different route, and modify the correlation decoders of Santhanam and Wainwright (2012) by specializing them to property testing. Specifically we consider a score test type of approach, which only involves model fitting assuming the null hypothesis holds. Suppose there exists an algorithm A mapping the data input as e A({X (i) }i∈[n] , θ, Θ, P) 7→ θ, (5.2) so that the output θe ∈ S0 (θ, Θ) and in addition if the true underlying graph G(θ) satisfies P(G(θ)) = 0 then b u Xv − E eXu Xv | ≤ ε(δ), 13 max |EX θ u,v∈Vd 20 (5.3) holds with probability at least 1 − δ. Define the test e := 1(max |EX b u Xv − E eXu Xv | ≥ ρ). ψρ ({X (i) }i∈[n] , θ) θ u,v (5.4) Recall the definition of the threshold τ (3.3) and let T := T (θ, Θ, s) = sinh2 (θ/4) . 2sΘ(3 exp(2sΘ) + 1) (5.5) The following holds Proposition 5.1. Suppose that A is an algorithm satisfying (5.3), and (s, n, d, θ, Θ) are such that T ≥ τ + ε(δ), (5.6) for a small δ > 0. Then the test ψε(δ) given in (5.4) satisfies sup θ∈S0 (θ,Θ) P(ψε(δ) = 1) ≤ δ and sup θ∈S1 (θ,Θ) P(ψε(δ) = 0) ≤ δ. (5.7) A key component for the existence of a successful test (5.4) is the algorithm A satisfying condition (5.3). One example how to construct such an algorithm, is to solve the following optimization problem b u Xv − Eθ Xu Xv |. A({X (i) }i∈[n] , θ, Θ, P) = argmin max |EX θ∈S0 (θ,Θ) u,v∈Vd (5.8) In the following lemma we show that (5.3) indeed holds. Lemma 5.2. If the algorithm A is defined by (5.8), then (5.3) holds with ε(δ) = τ. By combining the statements of Proposition 5.1 and Lemma 5.2, we arrive at an abstract generic property test summarized in Algorithm 5. Algorithm 5 Generic Property Test Input: {X (i) }i∈[n] , θ, Θ, P b u Xv }u,v∈V Calculate the matrix {EX d b u Xv − Eθ Xu Xv | Solve θe = argminθ∈S0 (θ,Θ) maxu,v∈Vd |EX e Output ψτ ({X (i) }i∈[n] , θ) A sufficient condition for Algorithm 5 to satisfy (5.7) is T ≥ 2τ , where T is defined in (5.5). One potential problem with Algorithm 5 is that solving (5.8) in general requires combinatorial optimization, which will likely result in non-polynomial runtime complexity for most properties. However, unlike the structure learning procedure of Santhanam and Wainwright (2012) which also requires combinatorial optimization, Algorithm 5 has the advantage that it does not need to optimize over the entire set of graphs G but only over the smaller set {G | P(G) = 0}. We conclude this section by proposing a custom variant of this algorithm specialized to cycle testing which uses a different algorithm A and can be ran in polynomial time. 13 b is the empirical expectation defined in Section 3, while E e is the expectation with respect to the measure Here E θ Pθe from (5.1). 21 5.1 A Computationally Efficient Cycle Test In this section we propose an efficient algorithm A satisfying (5.3) for cycle testing. Having computationally efficient algorithms for cycle testing is beneficial in practice, since if we have enough evidence that graph is a forest, we can recover its structure efficiently (Chow and Liu, 1968). We summarize the algorithm A called “cycle test map” in Algorithm 6. Algorithm 6 Cycle Test Map Input: {X (i) }i∈[n] , θ, Θ b u Xv }u,v∈V Calculate the matrix M := {EX d e Find a MST T with edge weights |Muv | for 1 ≤ u < v ≤ d do if (u, v) 6∈ E(Te) or |Muv | < tanh(θ) − τ then θeuv ← 0; E(Te) ← E(Te) \ {(u, v)} else θeuv ← sign(Muv )((atanh(|Muv |) ∧ Θ) ∨ θ) end if end for e return (Te, θ) e of Algorithm 6, evaluating the expectations E eXu Xv needed in (5.4) Given the output (Te, θ) θ can be done in polynomial time via the simple formula Y Y EθeXu Xv = EθeXk X` = tanh(θek` ), 14 e T (k,`)∈Pu→v e T (k,`)∈Pu→v Te e Next, we show the where Pu→v denotes the path between vertices u and v in the forest Te = G(θ). validity of the test in (5.4). Proposition 5.3. Suppose that tanh(θ)(1 − tanh(Θ)) > 2τ . Then the output of Algorithm 6 satisfies (5.3) with ε(δ) = τ 2 − tanh(Θ) . 1 − tanh(Θ) (5.9) tanh(Θ) By combining Propositions 5.1 and 5.3 we immediately conclude that if T ≥ τ 3−2 1−tanh(Θ) , and e of Algorithm 6 with the test ψε(δ) the constraints of Proposition 5.3 hold, using the output (Te, θ) of (5.4) with ε(δ) as in (5.9), satisfy (5.7). 6 Proof of Theorem 4.1 This section is dedicated to the proof of the main result of Section 4. To ease the presentation we define the following notation. For a set S ⊂ R, a set V ⊂ N by x ∈ S V we understand x = (xk )k∈V 14 The validity of this formula follows by Proposition A.3 and Lemma A.4 which can be found in the supplement. 22 and xk ∈ S. For a vector x ∈ RW , and a set V where V ⊆ W ⊂ N let X X SxV := xk , and SSxV = xk x` , k∈V (k,`)∈(V2 ) (6.1)  where we remind the reader that V2 = {(k, `) | k < `, k, ` ∈ V }. To relieve the sub-indeces, we further introduce a slight abuse of notation. For a fixed θ > 0 and a multigraph G (i.e., a graph allowed to have more than one edge joining two vertices) we denote with PG the Ising measure X  xu xv , PG (X = x) ∝ exp − θ (u,v)∈E(G) for θ ≥ 0. In this way, when G is a simple graph, this notation is consistent with Pθ,−1 where θ ∈ S(θ), G = G(θ) and −1 is the vector whose entries are all equal to −1. For the convenience of the reader below is a definition of χ2 -divergence which we use in the proof. Definition 6.1 (χ2 -divergence). For two measures P and Q satisfying P  Q the χ2 -divergence is defined by  2 dP Dχ2 (P, Q) = EQ −1 . dQ We proceed with the Proof of Theorem 4.1. The proof is concerned with a more fundamental problem than testing the strongly monotone property P. Namely we consider the problem of detecting an antiferromagnetic s-clique. To elaborate in detail, for a set V with cardinality |V | = s, let Cs (V ) denote the s-clique with vertices in the set V . For a vertex set V ⊂ Vd , put GV := (Vd , E(Cs (V ))). The pdf of the Ising model PGV is given by   PGV (X = x) ∝ exp − θSSxV , where x ∈ Rd and θ ≥ 0. Let P∅ denote a d-dimensional Rademacher vector corresponding to the null hypothesis, i.e., the hypothesis with an empty graph, or equivalently the null hypothesis when θ = 0. Given a sample of n observations from the measure P, the antiferromagnetic clique detection problem aims to test H0 : P = P∅ vs H1 : P = PGV for some V ⊂ Vd , |V | = s. (6.2) It is clear that any test of P, can test (6.2) with the same type I and type II error control. Let π denote the distribution uniformly sampling the vertex set V ⊂ Vd of an s-clique. Define the mixture measure P ⊗n (X1 = x1 , . . . , Xn = xn ) := EV ∼π P⊗n GV (X1 = x1 , . . . , Xn = xn ). Using Le Cam’s Lemma (Yu, 1997), we have Rn (S0 (θ) ∩ R, S1 (θ) ∩ R) ≥ 1 − Therefore it suffices to control the divergence Dχ2 (P 23 ⊗n 1 2 q Dχ2 (P ⊗n , P⊗n ∅ ). , P⊗n ∅ ) (recall Definition 6.1). Figure 7: The multigraph Cs (V ) ⊕ Cs (V 0 ) is the graph whose adjacency matrix is the sum of the adjacency matrices of Cs (V ) and Cs (V 0 ), i.e., ACs (V )⊕Cs (V 0 ) = ACs (V ) + ACs (V 0 ) . Above is a depiction of Cs (V ) ⊕ Cs (V 0 ), where s = 5, d = 10 and |V ∩ V 0 | = 3; Cs (V ) is plotted with solid edges, while Cs (V 0 ) is plotted with dashed edges. ⊗n To write the expression Dχ2 (P , P⊗n ∅ ) in a convenient form, we need to introduce several quantities. To this end take the s-clique graph Cs (V ) and for a θ > 0 define the partition function X  ZCs (V ) (θ) := exp − θSSxV . x∈{±1}V Taking two s-clique graphs Cs (V ) and Cs (V 0 ) define the partition function based on the multigraph Cs (V ) ⊕ Cs (V 0 ) (see Figure 7): X  0  ZCs (V )⊕Cs (V 0 ) (θ) := exp − θ SSxV + SSxV . x∈{±1}V ∪V 0 Define the standardized version of the partition function above by T (θ, V ∩ V 0 ) := Note that when V ∩ V 0 = ∅, T (θ, ∅) = write Dχ2 (P ⊗n ZCs (V )⊕Cs (V 0 ) (θ) 22s−|V ∩V 0 | ZCs (V ) (θ)ZCs (V 0 ) (θ) . 22s , P⊗n ∅ ) = EV,V 0 ∼π . A bit of algebra shows that one can T n (θ, V ∩ V 0 ) − 1, T n (θ, ∅) (6.3) where V, V 0 ∼ π indicates a two sample i.i.d. draw from π. We now state the key result enabling us to prove Theorem 4.1, and defer its proof to after we complete this proof. Theorem 6.2. For any pair of vertex sets V, V 0 of cardinality s, the ratio ZCs (V )⊕Cs (V 0 ) (θ) , ZCs (V ) (θ)ZCs (V 0 ) (θ) is non-decreasing in θ for θ ≥ 0. Although the statement of Theorem 6.2 is elementary, its proof is involved. The main difficulty stems from the fact that we are considering an antiferromagnetic model, which is known to exhibit 24 much more complicated phase transitions compared with the ferromagnetic case and also does not in general obey correlation inequalities. Fix two vertex sets V, V 0 of cardinality s, and let I = V ∩ V 0 for brevity. By virtue of Theorem (θ,I) 6.2, we have that TT (θ,∅) is increasing in θ. Hence to upper bound this ratio it suffices to understand V \I its behavior in the limit θ → ∞. Define U := Sx T (θ, I) = esθ |I| X I=−|I|, 2|[I+|I|]  |I| [I+|I|]/2 2|I| and I := SxI , and rewrite T (θ, I) as s−|I| X U =−(s−|I|), 2|[U +(s−|I|)]  s−|I| 2 [U +s−|I|]/2 − θ (U +I)2 e 2 . 2s−|I| After a bit of algebra, depending on the parity of s we have the following identity  |I| P 2|I| |I|  s−|I| 2 2  , if s is even,  2 s j=0,2|j j/2 (s−j)/2 T (θ, I) T (θ, I) (s/2) sup = lim = P2|I| |I| |I|  s−|I|  s−|I| 2  θ→∞ T (θ, ∅) θ≥0 T (θ, ∅)  2 s 2 j=0,2|j j/2 (s−1−j)/2 + (s+1−j)/2 , if s is odd. 4((s−1)/2) We now distinguish two cases. Case I. First consider the case when s is even. We have          2|I|  2|I|  X X |I| s − |I| 2 |I| s − |I| s − |I| s s − |I| ≤ max = , j j/2 (s − j)/2 j/2 (s − j)/2 (s − j)/2 s/2 s/2 − b|I|/2c j=0,2|j j=0,2|j where in the last equality we used Vandermonde’s identity. We conclude that 2|I| T (θ, I) ≤ sup θ≥0 T (θ, ∅)  s−|I| s/2−b|I|/2c  s s/2 =: F (|I|). (6.4) (|I|) A bit of algebra shows that the ratio FF(|I|+2) ≤ 1 for all values of |I|. Hence the maximum is achieved at |I| ∈ {s, s − 1} (and a direct check shows that it is achieved at |I| = s). Therefore sup θ≥0 √ 2s T (θ, I) ≤ s  ≤ 2s, T (θ, ∅) s/2 where the last inequality follows by Lemma 17.5.1 of Cover and Thomas (2012). Moreover, by expanding the binomials on the right hand side (RHS) of (6.4) and some algebra we have T (θ, I) ≤ sup T θ≥0 (θ, ∅)  1 1+ s − 2b|I|/2c + 1 b|I|/2c . Case II. Now consider the case when s is odd. Using the same ideas as in case I. shows that the following bound holds T (θ, I) sup ≤ θ≥0 T (θ, ∅)  1 1+ s − 2d|I|/2e + 2 25 d|I|/2e ∧ √ 2s. Compiling all inequalities yields sup θ≥0 nd|I|/2e   √ √ nd|I|/2e 1 ∧ ( 2s)n 1+ ∧ ( 2s)n ≤ exp s − 2b|I|/2c + 1 s − 2b|I|/2c + 1   √ 2n|I| + 1(|I| ≥ s/2)( 2s)n . ≤ exp s T n (θ, I) ≤ T n (θ, ∅)  The final step of our proof is to control (6.3). Taking expectation with respect to V, V 0 ∼ π and subtracting 1 from the preceding display yields:   √ 2n|V ∩ V 0 | ⊗n ⊗n − 1 + EV,V 0 ∼π 1(|V ∩ V 0 | ≥ s/2)( 2s)n Dχ2 (P , P0 ) ≤ EV,V 0 ∼π exp s       0 √ 2n|V ∩ V | V = [s] − 1 + EV 0 ∼π 1(|V ∩ V 0 | ≥ s/2) V = [s] ( 2s)n , = EV 0 ∼π exp s (6.5) where in the final inequality we used the symmetry of the problem to condition on the event V = [s]. In order to handle (6.5) we first recognize that given V = [s], the distribution of |V ∩ V 0 | is hypergeometric: the number of red balls out of s balls drawn without replacement from an urn consisting of s red balls and d − s blue balls. Using a standard bound of the tail probability of a hypergeometric distribution (Chvátal, 1979) we have   s s d − s s s s 0 EV 0 ∼π 1(|V ∩ V | ≥ s/2) V = [s] ≤ 2s ≤ 2s . d d d P To deal with the first term of the RHS of (6.5), we use the representation |V ∩V 0 | = v∈V 0 1(v ∈ V ), and the fact that {1(v ∈ V )}v∈V 0 are negatively associated (Joag-Dev and Proschan, 1983, see, e.g., for a proper definition). We have     Y  2n|V ∩ V 0 | EV 0 ∼π exp V = [s] − 1 ≤ P(v ∈ V )e2n/s + 1 − P(v ∈ V ) s 0 v∈V ≤ 1 + e2n/s s s s2 2n/s  ≤ exp e . d d Hence, continuing the bounds in (6.5) we finally have Dχ2 (P ⊗n , P⊗n ∅ ) ≤ exp s2 2n/s  2s s √ n e − 1+ ( 2s) . d d It can be checked that under the sufficient conditions (4.3) the above expression goes to 0 asymptotically. With this our proof is complete. Proof of Theorem 6.2. For brevity we will use the shorthand notation G := Cs (V ) and G0 := Cs (V 0 ). Recall the definitions of SxV and SSxV in (6.1). The statement is equivalent to showing that  V  V 0  V  d ZG⊕G0 (θ) V0 log = EG SSX + EG0 SSX − EG⊕G0 SSX + SSX ≥ 0. dθ ZG (θ)ZG0 (θ) 26 The latter is implied if we show that  V  V EG SSX ≥ EG⊕G0 SSX . (6.6) To this end, for any 0 ≤ t ≤ 1 define the model  0  PG⊕tG0 (X = x) ∝ exp − θ SSxV + tSSxV . Clearly, PG⊕tG0 interpolates between the measures PG and PG⊕G0 , and (6.6) will be implied if we showed that   d EG⊕tG0 SSxV ≤ 0. dt A direct calculation yields  V  V   V  V 0  d V0 EG⊕tG0 SSX . EG⊕tG0 SSX = −θ EG⊕tG0 SSX SSX − EG⊕tG0 SSX dt Thus it suffices to show the following positive correlation inequality, for all 0 ≤ t ≤ 1.  V   V  V 0 V0 EG⊕tG0 SSX SSX ≥ EG⊕tG0 SSX EG⊕tG0 SSX . Notice that for any V and x ∈ {±1}V we have the identity (SxV )2 = 2SSxV + |V |. Hence the above is precisely equivalent to  V 2 V 0 2    V 2 V0 2 EG⊕tG0 SX SX ≥ EG⊕tG0 SX EG⊕tG0 SX . (6.7) If we were in the ferromagnetic case (6.7) would have followed by Griffiths inequality (Griffiths, 1967), which would have completed the proof. However, in antiferromagnetic cases the situation is more challenging, as such positive correlation inequalities are not expected to hold in general. Therefore below we utilize the special structure of our problem. Due to the definition of PG⊕tG0 , the random vectors XV \(V ∩V 0 ) = (Xi )i∈V \(V ∩V 0 ) and XV 0 \(V ∩V 0 ) = V ∩V 0 . Let X f be an independent copy of X. (Xi )i∈V 0 \(V ∩V 0 ) are conditionally independent given SX Put for brevity       f := EG⊕tG0 S V 2 S V ∩V 0 − EG⊕tG0 S V 2 S V ∩V 0 HG (X, X) X X f f X X       f := EG⊕tG0 S V 0 2 S V ∩V 0 − EG⊕tG0 S V 0 2 S V ∩V 0 , HG0 (X, X) X X f f X X and note that (6.7) can be equivalently expressed as f G0 (X, X) f ≥ 0. EG⊕tG0 HG (X, X)H The above will be implied if for any feasible h, e h we showed that the following two numbers  V 2 V ∩V 0   V 2 V ∩V 0  EG⊕tG0 SX SX = h − EG⊕tG0 SX SX =e h , f f  V 0 2 V ∩V 0   V 0 2 V ∩V 0  EG⊕tG0 SX SX = h − EG⊕tG0 SX SX =e h , f f have the same sign. On the other hand, due to sign symmetry in X, the above is implied if the following functions are increasing in h on the set N0 ∩ {−|V ∩ V 0 |, −|V ∩ V 0 | + 2, . . . , |V ∩ V 0 | − 2, |V ∩ V 0 |},  V 2 V ∩V 0   V 0 2 V ∩V 0  SX =h . EG⊕tG0 SX SX = h , EG⊕tG0 SX 27 0 By a simple calculation one can check that for any x ∈ {±1}|V \(V ∪V )| ,   2  θ V \(V ∩V 0 ) V ∩V 0 , +h PG⊕tG0 XV \(V ∩V 0 ) = x|SX = h ∝ exp − Sx 2 and similarly for any x ∈ {±1}|V 0 \(V PG⊕tG0 XV 0 \(V ∩V 0 ) = ∪V 0 )| V ∩V 0 x|SX  = h ∝ exp   2 θt V 0 \(V ∩V 0 ) − Sx +h . 2 Hence, due to this symmetry and the form of the distribution, it is sufficient to show that for any k-clique graph H with |V (H)| = k, E = V (H) , and any h ∈ N0 2 2 2 V (H) V (H) EH,h+2 SX + h + 2 − EH,h SX + h ≥ 0, (6.8) where  PH,h (X = x) ∝ exp  2 θ V (H) . +h − Sx 2 If ZH,h (θ) denotes the partition function of PH,h , one can verify that the sign of the RHS of (6.8) coincides with the sign of the derivative ZH,h (θ) d log , dθ ZH,h+2 (θ) and therefore if suffices to show that for all θ ≥ θ0 ≥ 0 and h ∈ N0 we have ZH,h (2θ0 ) ZH,h (2θ) ≤ , 0 ZH,h+2 (2θ ) ZH,h+2 (2θ) (6.9) where we scaled the parameters θ and θ0 by 2 for convenience. For two vectors X and Y put for P P V (H) V (H) = i∈V (H) Yi , and let V (H) = {v1 , . . . , vk }. brevity SX = SX = i∈V (H) Xi and SY = SY (6.9) is equivalent to     E∅ exp − θ(SY + h + 2)2 − θ0 (SX + h)2 ≤ E∅ exp − θ0 (SY + h + 2)2 − θ(SX + h)2 , where E∅ denotes the expectation with respect to uniformly drawing (Xv1 , . . . , Xvk , Yv1 , . . . , Yvk ) from the set {±1}2k . The random variables inside the expectations are discrete and non-negative and therefore the inequality from the preceding display can be written as    Z ∞  2 0 2 P∅ exp − θ(SY + h + 2) − θ (SX + h) > t dt 0    Z ∞  0 2 2 ≤ P∅ exp − θ (SY + h + 2) − θ(SX + h) > t dt, 0 where P∅ is the uniform measure on {±1}2k . Hence to prove (6.8) it suffices to show that for all θ ≥ θ0 ≥ 0 the following stochastic dominance holds     2 0 2 0 2 2 P∅ θ(SY + h + 2) + θ (SX + h) < t ≤ P∅ θ (SY + h + 2) + θ(SX + h) < t (6.10) where t ≥ 0. We show this in the following 28 Proposition 6.3. Let {Xi }i∈[k] and {Yi }i∈[k] are i.i.d. Rademacher random variables, h ∈ N0 and θ ≥ θ0 ≥ 0. Then (6.10) holds. The proof of Proposition 6.3 is technical and we defer it to Appendix D. With this our proof is complete. 7 Discussion In this manuscript we formalized necessary and sufficient conditions for property testing in Ising models. Specifically, we showed lower and upper information-theoretic bounds on the temperature for ferromagnetic models. Furthermore, we argued that greedy correlation screening works well at high temperature regimes, and can also be useful in low temperature regimes for certain properties. We also demonstrated that testing strongly monotone properties over the class of general Ising models is strictly more difficult than testing in ferromagnets. We discussed generic property tests based on correlation decoding, and developed a computationally efficient cycle test. Important problems that we plan to investigate in future work include — searching for more sophisticated algorithms than correlation screening which will work at low temperature regimes for testing any property in ferromagnets; relating the temperature of the system to the informationtheoretic limits of strongly monotone property testing in models with antiferromagnetic interactions; utilizing computationally efficient structure recovery algorithms, such as those of Bresler (2015), to obtain tractable algorithms for property testing in general models. Acknowledgments The authors would like to express their gratitude to Professors Michael Aizenman, Ramon van Handel and Allan Sly, for thought provoking discussions, their insights and encouragements. Special thanks are due to Ramon, who suggested the interpolating measure PG⊕tG0 towards the proof of Theorem 6.2. References Addario-Berry, L., Broutin, N., Devroye, L. and Lugosi, G. (2010). On combinatorial testing problems. The Annals of Statistics 38 pp. 3063–3092. Ahmed, A. and Xing, E. P. (2009). Recovering time-varying networks of dependencies in social and biological studies. Proceedings of the National Academy of Sciences 106 11878–11883. Alon, N. and Spencer, J. H. (2004). The probabilistic method. John Wiley & Sons Inc. Anandkumar, A., Tan, V. Y., Huang, F. and Willsky, A. S. (2012). High-dimensional structure estimation in ising models: Local separation criterion. The Annals of Statistics 1346– 1375. Arias-Castro, E., Bubeck, S., Lugosi, G. and Verzelen, N. (2015a). Detecting markov random fields hidden in white noise. arXiv preprint arXiv:1504.06984 . Arias-Castro, E., Bubeck, S., Lugosi, G. et al. (2012). Detection of correlations. The Annals of Statistics 40 412–435. Arias-Castro, E., Bubeck, S., Lugosi, G. et al. (2015b). Detecting positive correlations in a multivariate sample. Bernoulli 21 209–241. 29 Besag, J. (1993). Statistical analysis of dirty pictures. Journal of applied statistics 20 63–87. Bhattacharya, B. B. and Mukherjee, S. (2017). Inference in ising models. Bernoulli . Bollobás, B. (2004). Extremal graph theory. Courier Corporation. Boucheron, S., Lugosi, G. and Massart, P. (2013). Concentration inequalities: A nonasymptotic theory of independence. OUP Oxford. Bresler, G. (2015). Efficiently learning ising models on arbitrary graphs. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing. ACM. Bresler, G., Gamarnik, D. and Shah, D. (2014). Structure learning of antiferromagnetic ising models. In Advances in Neural Information Processing Systems. Bresler, G., Mossel, E. and Sly, A. (2008). Reconstruction of markov random fields from samples: Some observations and algorithms. In Approximation, Randomization and Combinatorial Optimization. Algorithms and Techniques. Springer, 343–356. Cai, T. T., Liu, W. and Luo, X. (2011). A constrained `1 minimization approach to sparse precision matrix estimation. Journal of the American Statistical Association 106 594–607. Chow, C. and Liu, C. (1968). Approximating discrete probability distributions with dependence trees. IEEE Trans. Inf. Theory 14 462–467. Chvátal, V. (1979). The tail of the hypergeometric distribution. Discrete Mathematics 25 285– 287. Cover, T. M. and Thomas, J. A. (2012). Elements of information theory. John Wiley & Sons Inc. Durbin, R., Eddy, S. R., Krogh, A. and Mitchison, G. (1998). Biological sequence analysis: probabilistic models of proteins and nucleic acids. Cambridge university press. Fisher, M. E. (1967). Critical temperatures of anisotropic ising lattices. ii. general upper bounds. Physical Review 162 480. Föllmer, H. (1988). Random fields and diffusion processes. École d’Été de Probabilités de SaintFlour XV–XVII, 1985–87 101–203. Geman, S. and Geman, D. (1984). Stochastic relaxation, gibbs distributions, and the bayesian restoration of images. IEEE Transactions on pattern analysis and machine intelligence 721–741. Golub, G. H. and Van Loan, C. F. (2012). Matrix computations, vol. 3. JHU Press. Grabowski, A. and Kosiński, R. (2006). Ising-based model of opinion formation in a complex network of interpersonal interactions. Physica A: Statistical Mechanics and its Applications 361 651–664. Griffiths, R. B. (1967). Correlations in ising ferromagnets. i. Journal of Mathematical Physics 8 478–483. Ising, E. (1925). Beitrag zur theorie des ferromagnetismus. Zeitrschrift für Physik A Hadrons and Nuclei 31 253–258. Joag-Dev, K. and Proschan, F. (1983). Negative association of random variables with applications. The Annals of Statistics 286–295. Kochmański, M., Paszkiewicz, T. and Wolski, S. (2013). Curie–weiss magnet—a simple model of phase transition. European Journal of Physics 34 1555. Liu, H., Lafferty, J. D. and Wasserman, L. A. (2009). The nonparanormal: Semiparametric estimation of high dimensional undirected graphs. Journal of Machine Learning Research 10 2295–2328. Meinshausen, N. and Bühlmann, P. (2006). High dimensional graphs and variable selection with the lasso. The Annals of Statistics 34 1436–1462. 30 Montanari, A. and Pereira, J. A. (2009). Which graphical models are difficult to learn? In Advances in Neural Information Processing Systems. Neykov, M., Lu, J. and Liu, H. (2016). Combinatorial inference for graphical models. arXiv preprint arXiv:1608.03045 . Ravikumar, P., Wainwright, M. J. and Lafferty, J. D. (2010). High-dimensional ising model selection using `1 -regularized logistic regression. The Annals of Statistics 38 1287–1319. Ravikumar, P., Wainwright, M. J., Raskutti, G. and Yu, B. (2011). High-dimensional covariance estimation by minimizing `1 -penalized log-determinant divergence. Electronic Journal of Statistics 5 935–980. Rothman, A. J., Bickel, P. J., Levina, E. and Zhu, J. (2008). Sparse permutation invariant covariance estimation. Electronic Journal of Statistics 2 494–515. Santhanam, N. P. and Wainwright, M. J. (2012). Information-theoretic limits of selecting binary graphical models in high dimensions. Information Theory, IEEE Transactions on 58 4117–4134. Shanmugam, K., Tandon, R., Ravikumar, P. K. and Dimakis, A. G. (2014). On the information theoretic limits of learning ising models. In Advances in Neural Information Processing Systems. Wasserman, S. and Faust, K. (1994). Social network analysis: Methods and applications, vol. 8. Cambridge university press. Yu, B. (1997). Assouad, fano, and le cam. In Festschrift for Lucien Le Cam. Springer, 423–435. Yuan, M. and Lin, Y. (2007). Model selection and estimation in the gaussian graphical model. Biometrika 19–35. 31 A Auxiliary Results In this section we spell out the details of some auxiliary results. For the next result assume we have m distinct graphs Gj for j ∈ [m] which differ from a graph G0 in a single edge, i.e. Gj = (V, Ej ), where |Ej \ E0 | = 1. For each j, denote the only edge in the set Ej \ E0 by ej = (uj , vj ). Define for brevity Pj = Pθj for θj such that G(θj ) = Gj and P0 = Pθ0 for a θ0 with G(θ0 ) = G where the measures Pθ0 , Pθj are defined in (2.2). Denote the corresponding expectations with Ej and E0 . Lemma A.1 (Edge Addition). The following bound holds E0 Pj Pk ≤ 1 + tanh(θ)[Ej Xuk Xvk − E0 Xuk Xvk ].15 P0 P0 Remark A.2. By the FKG inequality we always have Ej Xuk Xvk − E0 Xuk Xvk ≥ 0, and therefore P E0 P0j PPk0 ≥ 1. Furthermore, if we are interested in product measures over n i.i.d. observations, i.e, P⊗n and P⊗n 0 Lemma A.1 immediately to yields the following bound j   ⊗n P⊗n Pj Pk n j Pk EP⊗n ⊗n ⊗n = E0 ≤ (1 + tanh(θ)[Ej Xuk Xvk − E0 Xuk Xvk ])n . 0 P P P P 0 0 0 0 Proof of Lemma A.1. Note that by definition we have: Z θ0 Pk (x) = exp(θxuk xvk ). P0 (x) Z θk Hence Z θk = Z θ0 X x∈{±1}d exp(θxu xvk ) X ) k vk Hence P0 (x) E0 exp(θXku Z θk Pk (x) = Z θ0 X exp(θxuk xvk )P0 (x) = E0 exp(θXuk Xvk ). x∈{±1}d = Pk (x). This shows that: E0 Pj Pk Ej exp(θXuk Xvk ) Pk = Ej = . P0 P0 P0 E0 exp(θXuk Xvk ) Using that for any c ∈ R and x ∈ {±1} we have the identity exp(cx) = cosh(c)(1 + x tanh(c)). (A.1) implies that for Q = P0 , Pj EQ exp(θXuk Xvk ) = sinh(θ)EQ Xuk Xvk + cosh(θ), Consequently E0 Ej exp(θXuk Xvk ) sinh(θ)[Ej Xuk Xvk − E0 Xuk Xvk ] Pj Pk = =1+ P0 P0 E0 exp(θXuk Xvk ) sinh(θ)E0 Xuk Xvk + cosh(θ) Ej Xuk Xvk − E0 Xuk Xvk =1+ ≤ 1 + tanh(θ)[Ej Xuk Xvk − E0 Xuk Xvk ] E0 Xuk Xvk + coth(θ) where for the last inequality we note that by the FKG inequality E0 Xuk Xvk ≥ 0. With this the proof is complete. 15 We omit writing the argument X in the ratio Pj (X) Pk (X) P0 (X) P0 (X) 32 for brevity. For a given graph G = (V, E) and vertex set W let G|W = (W, E|W ), where E|W = {(u, v) ∈ E | u, v ∈ W } is the restriction of G on the vertex set W . The next proposition states that when studying correlations it suffices to consider a potentially smaller graph. Proposition A.3. Let G = (V, E) be any graph, and Pθ be the measure of an Ising model with G graph G(θ) = G as in (5.1). Let u, v ∈ V be two fixed vertices. Denote by Pu→v the set of all G e = G|V simple paths on G connecting u and v, and let VG be the set of all vertices in Pu→v . Let G G e and PθGe be the measure of the Ising model with θ restricted to G. Then Eθ Xu Xv = EθGe Xu Xv . e c = (V, E \ E|V ). Take any two distinct vertices Proof of Proposition A.3. Construct the graph G G e c . To see v1 , v2 ∈ VG . Note that v1 and v2 belong to two distinct connected components in G c e this, assume the contrary. This implies that there exists a path on G connecting v1 and v2 which G . For each vertex ` ∈ V is a contradiction since such a path does not belong to the set Pu→v G c e let C` denote the connected component of G containing `, and let V (C` ) be its vertex set. Let V c = V \ ∪`∈VG (V (C` ) \ {`}) denote the vertex set which is completely disconnected from the graph e In terms of this notation we have the decomposition: G. V = ∪`∈VG (V (C` ) \ {`}) ∪ VG ∪ V c . Let (X` )`∈VG and (Y` )`∈VG be two fixed configurations of spins in the vertex set VG . Take any configuration of spins (x` )`∈V \VG , and consider the following two states SX = ((X` )`∈VG , (X` SY = ((Y` )`∈VG , (Y` where by (xw )w∈V (C` )\{`} )`∈VG , (x` )`∈V c ) (xw )w∈V (C` )\{`} )`∈VG , (x` )`∈V c ), we mean element-wise multiplication. Due to the construction we conclude:  Pθ (SX ) = exp Pθ (SY ) X (w,`)∈E|VG  Pθ ((X` )`∈V ) G e . θw` (Xw X` − Yw Y` ) = G PθGe ((Y` )`∈VG ) (A.2) Note that as we vary the spins (x` )`∈V \VG while holding (X` )`∈VG and (Y` )`∈VG fixed, the values (X` (xw )w∈V (C` )\{`} )`∈VG , (x` )`∈V c ) and (Y` (xw )w∈V (C` )\{`} )`∈VG , (x` )`∈V c ) take all possible values. The last observation and (A.2) complete the proof. Lemma A.4 (Path Graph Correlations). Let G = ([`], {(j, j + 1)}j∈[`−1] ) be a path graph, and Pθ be the measure of an Ising model with the graph G(θ) = G as in (5.1). For any k ≤ j ∈ [`] we have: j−1 Y Eθ Xk+1 Xj = tanh(θu,u+1 ). u=k+1 Proof of Lemma A.4. The proof follows by a standard induction argument, and is omitted. 33 B Bounds with Ferromagnets Since in this section all entries of the vector θ are of magnitude equal to θ there is a one to one correspondence between a vector θ ∈ S(θ) and a graph G ∈ G. Hence it is more convenient to denote the measure Pθ with PG where G = G(θ), and suppress the dependency on the signal strenght θ whenever that does not cause confusion. Proof of Theorem 2.4. Let S ⊆ C denote the r-packing set of C with cardinality m := |S| = N (C, dG0 , r), where we have set for brevity r = ([− log c]−1 + ε) log log |C|. To ease of notation we will use P0 for the measure PG0 and for an edge ej ∈ S we let Pj = PGj where Gj = G0 ∪ {ej }. ⊗n ⊗n 1 P Recall the notation ⊗n for a product measure of n i.i.d. observations. Let P = m j∈[m] Pj denote the mixture density of the graphs from the alternative. By Definition 6.1 we have ⊗n Dχ2 (P , P⊗n 0 ) = EP⊗n 0  P⊗n P⊗n 0 2 P⊗n P⊗n 1 X j i EP⊗n ⊗n −1 = 2 ⊗n − 1. 0 P m P 0 0 i,j∈[m] ⊗n P⊗n P We now handle the terms EP⊗n Pi⊗n Pj⊗n one by one, and we distinguish two cases. 0 0 0 Case I. First assume that i 6= j. We will show that the following bound holds. Lemma B.1 (High Temperature Bound). Let G = (V, E) and G0 = (V, E 0 ) be two graphs such that E\E 0 = {e}, where e = (u, v). Then if AG denotes the adjacency matrix of G, and kAG k1 tanh(θ) ≤ c < 1 for some small c > 0 the following holds EG Xk X` − EG0 Xk X` ≤ 2 ∞ X l+1  tanh(θ) [AlG ]uk + [AlG ]vk + [AlG ]u` + [AlG ]v` , l=0 where the expectations EG , EG0 are taken with respect to distributions as specified by (2.2). Let Λ := maxdeg(G0 ) = kAG0 k1 , where AG0 is the adjacency matrix of G0 . If kAG0 k2 denotes the operator norm of AG0 , recall that kAG0 k2 ≤ Λ by Gershgorin’s circle Theorem (Golub and Van Loan, 2012). By the triangle inequality kAGj k2 ≤ kAG0 k2 + 1 ≤ Λ + 1 for all j. It immediately follows by our assumption that kAGj k1 tanh(θ) ≤ c < 1, and hence the condition of Lemma B.1 is satisfied. Recall that for any two vertices r and t in Vd , [AlGj ]rt equals the number of paths of length l between vertex r and vertex t. Since [AlGj ]rt ≤ kAGj kl2 ≤ (Λ + 1)l , it follows that (Λ + 1)l is an upper bound on the number of paths on the graph Gj between vertices r and t of length l. Take e := (Λ + 1). Let dG (ei , ej ) = lij . Applying the two distinct edges ei = (k, `), ej = (u, v) ∈ S. Put Λ 0 Lemma B.1 we have: Ej Xk X` − E0 Xk X` ≤ 2 ≤ ∞ X l+1  tanh(θ) [AlGj ]uk + [AlGj ]vk + [AlGj ]u` + [AlGj ]v` l=0 X l≥lij e l tanhl+1 (θ) ≤ 8Λ 34 e tanh(θ))lij 8 tanh(θ)(Λ e tanh(θ) 1−Λ Case II. When i = j, Lemma 4 of Shanmugam et al. (2014) gives the following bound Ej Xk X` − E0 Xk X` ≤ tanh(θ). Applying Lemma A.1 ⊗n Dχ2 (P , P⊗n 0 )+1≤ 1 X 1 X (1 + tanh(θ)[Ej Xk X` − E0 Xk X` ])n + 2 (1 + tanh(θ)2 )n 2 m m ei ,ej ∈S i6=j ej ∈S  e tanh(θ))lij n (1 + tanh(θ)2 )n 8 tanh2 (θ)(Λ 1 X 1+ ≤ 2 + e tanh(θ) m m 1−Λ ei ,ej ∈S i6=j  n 1 X 8 (1 + tanh(θ)2 )n l +2 ij e tanh(θ)) ≤ 2 1+ (Λ + e2 m m (1 − c)Λ ei ,ej ∈S i6=j 1 ≤ 2 m  exp n X ei ,ej ∈S i6=j 8 e2 (1 − c)Λ e tanh(θ))lij +2 (Λ  + exp(n tanh(θ)2 ) , m e −1 ) and c < 1, and the last one uses x + 1 ≤ where the next to last inequality uses θ ≤ atanh(cΛ exp(x). Since S is anqr-packing we have that lij + 2 ≥ r + 2 > 2. Under the assumption that tanh(θ) ≤ θ ≤ (1 − ε) ⊗n Dχ2 (P , P⊗n 0 ) log m n , and log d n = o(1) we have   exp(n tanh(θ)2 ) m−1 8 r+2 e + +1≤ (Λ tanh(θ)) exp n e2 m m (1 − c)Λ   m−1 8 e tanh(θ))r+2 + o(1) (Λ ≤ 1 + (e − 1)n e2 m (1 − c)Λ 8 e tanh(θ))r+2 + o(1), ≤ 1 + (e − 1)n (Λ 2 e (1 − c)Λ 8n r+2 ≤ 1 since by convexity ex ≤ e e 2 (Λ tanh(θ)) (1−c)Λ n r+2 = o(1), hence e argue that in fact e 2 (Λ tanh(θ)) (1−c)Λ where the next to last inequality holds when 1 + (e − 1)x when x ≤ 1. In what follows we the inequality is always true in an asymptotic sense. We have n e2 (1 − c)Λ e tanh(θ))r+2 = (Λ 2 (1 − ε)2 e tanh(θ))r ≤ (1 − ε) log(|C|)(Λ e tanh(θ))r log(m)(Λ 1−c 1−c Taking a log results in e tanh(θ)) → −∞, log log |C| + log((1 − ε)2 /(1 − c)) + r log(Λ e tanh(θ)) ≤ r log(c) ≤ where the limit holds since r = ([− log c]−1 + ε) log log(|C|) and hence r log(Λ − log log |C| + ε log c log log |C|, and ε log c < 0 while |C| → ∞ asymptotically. We have established that under the condition of the theorem ⊗n lim sup Dχ2 (P n→∞ 35 , P⊗n 0 ) = 0. Recall that by Le Cam’s lemma we have the bound Rn (S0 (θ), S1 (θ)) ≥ inf h ψ P⊗n 0 (ψ = 1) + P ⊗n q i 1 ⊗n (ψ = 0) ≥ 1 − Dχ2 (P , P⊗n 0 ). 2 (B.1) Hence since the LHS of the inequality above is a lower bound on the risk, the proof is completed. Proof of Lemma B.1. To prove this result we make usage of Dorbushin’s comparison technique (see Theorem (2.8) Föllmer, 1988) which a is powerful tool for comparing discrepancies between Gibbs measures based on their local specifications. We first estimate Dobrishin’s interaction matrix C which measures the influence of a vertex r on vertex m, and is defined elementwise as Crm = sup {DTV (PG,m (·|X−m = x), PG,m (·|X−m = y))}. x=y off r In the above, x and y are d − 1 dimensional vectors, x = y off r means that x and y coincide except the entries xr and yr , PG,m denotes the conditional distribution of Xm given the values of all remaining spins X−m , and we have denoted the total variation between two measures by DTV 16 . For a vertex m let Nm denote the set neighbors of m in the graph G. We have  X  PG,m (X = x|X−m = x) = g θx xj j∈Nm for x ∈ {±1} and g(z) = ez P /(e−z + ez ). It therefore immediately follows that Crm = 0 if r 6∈ Nm . P Suppose r ∈ Nm . Let Sr = j∈Nm \{r} xj = j∈Nm \{r} yj . We have   Crm = sup |g θ(Sr + 1) − g θ(Sr − 1) | = sup Sr ≤ Sr e2θ 2+ − e2θ e−2θ + e−2θ e2θ − e−2θ e−2Sr θ + e2Sr θ + e2θ + e−2θ = tanh(θ). We conclude that Dobrushin’s interaction matrix is C = AG tanh(θ), where AG is the adjacency matrix of the graph G. Notice that the matrix C satisfies Dobrushin’s condition lim kCl k1 = 0, l→∞ since kCk1 = kAG k1 tanh(θ) < 1, and therefore liml→∞ kCl k1 ≤ liml→∞ kCkl1 = 0. Next we will find the discrepancy between the averaged marginal conditional measures PG and PG0 . We define X bm := DTV (PG,m (·|X−m = x), PG0 ,m (·|X−m = x))PG0 (X−m = x). x∈{±1}d−1 16 Recall that for two probability measures P and Q on a probability space (Ω, Σ), we have DTV (P, Q) := supA∈Σ |P(A) − Q(A)|. 36 Since G and G0 differ P only on the edge (u, v) we have that bm = 0 unless m = u or m = v. Let m = u. Put S = j∈Nm xj . We have   |PG,u (X = x|X−u = x) − PG0 ,u (X = x|X−u = x)| = |g θxS − g θx(S − xv ) | eθ − e−θ + e−2θS+θxv + e−θ + eθ tanh(θ) ≤ ≤ tanh(θ). 1/ cosh(θ) + 1 = e2θS−θxv Therefore we conclude that bu ≤ tanh(θ) and hence by symmetry the same inequality also holds for bv . Since we are interested in bounded the correlation of Xk and X` under the two measures we define the comparison function f : {±1}d 7→ R f (X) := Xk X` . and the oscillation of f at site r: δr (f ) := sup{|f (x) − f (y)| : x = y off r}. Note that δr (f ) = 0 if r 6∈ {k, `} and δk (f ) = δ` (f ) = 2. Define the matrix D := ∞ X l tanh(θ)AG , l=0 and let b be the vector with entries bm . According to Dobrushin’s comparison theorem we have EG Xk X` − EG0 Xk X` ≤ 2([b> D]k + [b> D]` ). (B.2) Hence (B.2) is equivalent to EG Xk X` − EG0 Xk X` ≤ 2 ∞ X l+1  tanh(θ) [AlG ]uk + [AlG ]vk + [AlG ]u` + [AlG ]v` , l=0 which is what we wanted to show. Lemma B.2 (Low Temperature Bound). Let G = (V, E) be a graph, and k, ` ∈ V be vertices such that (k, `) 6∈ E. Let r ≥ 2 and l are integers such that there exists an l × r biclique containing k 3 and ` on its right, i.e., r side. Then for values of θ ≥ 2l , θ ≥ r−2 for r > 2 and θ ≥ log 2 when r = 2 we have: 2(r − 1) EG Xk X` ≥ 1 − . exp(θl) + r − 1 Proof of Lemma B.2. By the FKG inequality (Alon and Spencer, 2004) pruning edges reduces the correlations. Hence we may assume without loss of generality that G is an l × r-biclique. We first show the case when r ≥ 3. By a direct calculation we have   Pr−2 Pl r−2 l PG (Xk X` = 1) m=0 j=0 m j exp[θ(r − 2m)(l − 2j)] = Pr−2 Pl .   r−2 l PG (Xk X` = −1) exp[θ(r − 2m − 2)(l − 2j)] m=0 j=0 m 37 j To this end note that    r−2  r−2 X l  X X r−2 r−2 l l cosh(θ(r − 2m))l . exp[θ(r − 2m)(l − 2j)] = 2 m m j m=0 m=0 j=0 Similarly,   r−2 X l  X r−2 l m=0 j=0 m j exp[θ(r − 2m − 2)(l − 2j)] = 2 l  r−2  X r−2 m=0 m cosh(θ(r − 2m − 2))l . Hence we obtain the identity Pr−2 r−2 l PG (Xk X` = 1) m=0 m cosh(θ(r − 2m)) = Pr−2 .  r−2 l PG (Xk X` = −1) m=0 m cosh(θ(r − 2m − 2)) (B.3) To obtain a bound on (B.3) we will search for the argmax of the denominator. We will first argue that if m∗ is the argmax of the denominator them m∗ satisfies 0 ≤ m∗ ≤ r−2 e . Recall that cosh is an even function and hence by symmetry (m ↔ r − 2 − m):     r−2 r−2 = , cosh(θ(r − 2m − 2)) = cosh(θ(r − 2(r − 2 − m) − 2)). m r−2−m Therefore, to find a maximum in the denominator we only need to focus on terms satisfying m ≤ b(r − 2)/2c. To show that 0 ≤ m∗ ≤ r−2 e , we begin by comparing the term at m = 0 with any term at m satisfying (r − 2)/e < m ≤ d(r − 2)/2e, i.e., we will compare cosh(θ(r − 2))l to r−2 l m cosh(θ(r − 2m − 2)) . First we record a well known bound on the binomial coefficients    r−2 (r − 2)e m . ≤ m m We will now argue that cosh(θ(r − 2)) ≥ exp(mθ). cosh(θ(r − 2m − 2)) (B.4) Direct calculation shows that the above is equivalent to exp(θ(2r − 4 − 4m)) ≥ 1 − exp(−3mθ) . exp(mθ) − 1 (B.5) −3x −3x (2ex + e2x + 3) < 0), and hence Note that the function 1−e ex −1 is decreasing (its derivative is −e reaches its maximum at small values of θm. We have: θm > 3 r−2 3 = . r−2 e e −9/e It is simple to check that 1−e < 1. Meanwhile since 2r − 4 − 4m ≥ 0 the left hand side of (B.5) e3/e −1 is at least 1 and consequently (B.4) holds. Therefore when  (r − 2)e m m < exp(θml), 38 i.e., when m > r−2 e (using θl > 2) we have   r−2 cosh(θ(r − 2)) ≥ cosh(θ(r − 2m − 2))l . m l Hence the maximum is reached at m∗ such that 0 ≤ m∗ ≤ r−2 e . We therefore have the bound:  r−2 ∗ l cosh(θ(r − 2m∗ ))l PG (Xk X` = 1) m∗ cosh(θ(r − 2m ))  = . ≥ ∗ l PG (Xk X` = −1) (r − 1) cosh(θ(r − 2m∗ − 2))l (r − 1) r−2 m∗ cosh(θ(r − 2m − 2)) Finally we will argue that cosh(θ(r − 2m∗ )) ≥ exp(θ). cosh(θ(r − 2m∗ − 2)) Similarly to before we need to verify: exp(θ(2r − 4 − 4m∗ )) ≥ 1 − exp(−3θ) , exp(θ) − 1 (B.6) 1−exp(−3x) ∗ We have 1−exp(−3θ) exp(θ)−1 ≤ limx→0 exp(x)−1 = 3, and thus (B.6) is implied when exp(θ(2r −4−4m )) ≥ 3. Using the fact that m∗ ≤ r−2 e we have: exp(θ(2r − 4 − 4m∗ )) ≥ exp(θ(2 − 4/e)(r − 2)) ≥ exp(6 − 12/e) > 3, where we used the fact that θ(r − 2) ≥ 3. Compiling these results yields: PG (Xk X` = 1) exp(θl) ≥ PG (Xk X` = −1) r−1 Hence EG Xk X` = PG (Xk X` = 1) − PG (Xk X` = −1) ≥ 1 − (B.7) 2(r − 1) , exp(θl) + r − 1 as we claimed. This completes the proof when r > 2. In the case when r = 2, a direct calculation shows PG (Xk X` = 1) = cosh(2θ)l . PG (Xk X` = −1) Clearly then when θ ≥ log 2, we have cosh(2θ) ≥ exp(θ), and the proof can proceed in the same way as before. With this the result is complete. log 2κnr logbd/(l+r)c Proof of Theorem 2.6. First we point out a simple implication of (2.5). If θ ≥ , then l certainly h i 2κn(r−1) log logbd/(l+r)c − (r − 1) θ≥ . l We will now argue that even if the above holds the asymptotic minimax risk is still 1. Note that since B E H0 we have |V (H0 )| = |V (B)| = l + r. Consider a graph G0 based on the union of m = bd/(l + r)c disconnected copies of the graph H0 . Let ek = (uk , vk ) is the local copy of the edge e = (u, v) in the k th copy of H0 . Since the property P can be represented as a maximum over subgraphs of G0 , by the assumption of the theorem P(G0 ) = 0, while adding the edge ek 39 for any k ∈ [m] to the k th copy of H0 transfers G0 to a graph Gk satisfying P(Gk ) = 1. For each graph in i ∈ {0, 1, . . . , m} let Pi be the measure corresponding to Ising models with graphs {G0 , G1 , . . . , Gm }, and Ek be the corresponding expectation under Pk . Define the mixture measure ⊗n ⊗n 1 P P =m k∈[m] Pk . Using Lemma A.1 Dχ2 (P ⊗n , P⊗n 0 )+1≤ 1 X (1 + tanh(θ)[Ej Xuk Xvk − E0 Xuk Xvk ])n . m2 j,k∈[m] By Proposition A.3, for i 6= j we have Ej Xuk Xvk − E0 Xuk Xvk = 0, while by Lemma B.2 if i ≡ j Ej Xuk Xvk − E0 Xuk Xvk ≤ 1 − E0 Xuk Xvk ≤ 2(r − 1) . exp(θl) + r − 1 We conclude that Dχ2 (P ⊗n n m−1 1 2(r − 1) + 1 + tanh(θ) m m exp(θl) + r − 1  n m−1 1 2(r − 1) ≤ + 1+ m m exp(θl) + r − 1   2n(r−1) exp exp(θl)+r−1 m−1 + . ≤ m m , P⊗n 0 )+1≤ The proof is completed via an application of Le Cam’s argument (B.1). Remark B.3. Theorem 2.6 demonstrates that some strongly monotone properties have upper bound signal strength limitations. In fact it is evident from the proof that the scaling on θ in (2.5) can be slightly improved. It turns out that under the same conditions, it suffices that if   2 tanh(θ)(r − 1) d = o log , exp(θl) + r − 1 |l + r| holds instead of (2.5) we still have that the minimax risk goes to 1 asymptotically. C Correlation Screening for Ferromagnets Lemma C.1. Given n samples from an Ising model satisfying (5.1). We have that     b u Xv − Eθ Xu Xv | ≥ ε ≤ 2 d e−nε2 /2 . Pθ max |EX u,v∈Vd 2 (C.1) Note that since (3.1) is a special case of (5.1), the same conclusion is also valid for ferromagnets satisfying (3.1). Proof of Lemma C.1. This is a direct consequence of Hoeffding’s inequality (Boucheron et al., 2013) and the union bound. 40 Proof of Theorem 3.1. Recall the definitions of T (3.2) and τ (3.3). Using Lemma C.1 we can guarantee that if θ ∈ S1 (θ) ∩ R min Me ≥ T − τ, b e∈G with probability at least 1 − δ. This immediately shows that sup θ∈S1 (θ)∩R Pθ (ψ = 0) ≤ δ. b ∈ WP (Gd ), we have that if P(G) = 0 Next since G min Me ≤ max b e∈G max min θ∈S0 ∩R G∈WP (Gd ) (u,v)∈E(G) Eθ Xu Xv + τ, on an event of probability at least 1 − δ. When (3.5) holds we have min Me < T − τ, b e∈G and thus Algorithm 1 will return ψ = 0. This completes the proof. Lemma C.2 (Generic No Edge Correlation Upper Bound). Assume we have a ferromagnetic Ising model as specified by (3.1) where all coefficients θuv satisfy 0 < θuv ≤ Θ. Then if the maximum degree of G(θ) is bounded by s ≥ 3, for any two vertices k and ` such that (k, `) 6∈ E(θ) we have Eθ Xk X` ≤ cosh(2sΘ) + 2se−2(s−1)Θ (cosh(2(s − 1)Θ) − cosh(2Θ)) − 1 R(s, Θ) − 1 = . −2(s−1)Θ R(s, Θ) + 1 cosh(2sΘ) + 2se (cosh(2(s − 1)Θ) + cosh(2Θ)) + 1 If s = 2 we have Eθ Xk X` ≤ (C.2) cosh(4Θ) − 1 . cosh(4Θ) + 3 Finally if s = 1, Eθ Xk X` = 0. Proof of Lemma C.2. First, by the FKG inequality (see Theorem 6.2.1 Alon and Spencer (2004)) it follows that since all 0 ≤ θuv ≤ Θ the correlation Eθ Xk X` will only increase if we were to set all θuv = Θ. Hence we may assume that all θuv = Θ for all u, v. Let Nk and N` denote the neighbors of vertices k and ` respectively. Again, due to the FKG inequality adding edges increases correlations so we can assume that |Nk | = |N` | = s. We have   X  X  X X X exp ξΘ xu + xu + Θ xu xv d u∈N u∈N (u,v)∈E(θ),k,`6∈{u,v} Pθ (Xk X` = 1) x∈{±1} ξ∈{±1} k `   X . = X X X  X Pθ (Xk X` = −1) exp ξΘ xu − xu + Θ xu xv x∈{±1}d ξ∈{±1} u∈Nk u∈N` (u,v)∈E(θ),k,`6∈{u,v} (C.3) Let N = Nk ∩ N` and suppose |N | = m for 0 ≤ m ≤ s. Put N k := Nk \ N and similarly let N ` := N` \ N . For a vector x ∈ Rd and a set S ⊆ Vd let xS = (xi )i∈S . For ξ ∈ {±1} define the sets X X  S1 := x ∈ {±1}d xu + xu = 2s , u∈N` u∈Nk  S2 := x ∈ {±1}d X xu + u∈Nk 41 X u∈N` xu ≤ 2(s − 2) , and let S3 := {±1}d \ (S1 ∪ S2 ). We now record several identities for the three sets. For any x ∈ S1 we have X X  X X  X X exp ξΘ xu − xu = 2. exp ξΘ xu + xu = 2 cosh(2sΘ), u∈Nk ξ∈{±1} u∈N` u∈Nk ξ∈{±1} u∈N` The P first identity P holds by the definition of S1 , while the second holds since if x ∈ S1 it follows that x − u u∈Nk u∈N` xu = 0. For any x ∈ S2 : X  X X X  X X xu ≥ 2. xu − exp ξΘ xu ≤ 2 cosh(2(s − 2)Θ), xu + exp ξΘ u∈Nk ξ∈{±1} u∈N` u∈Nk ξ∈{±1} u∈N` The first inequality follows by the definition of S2 , and the second is true since since for any x ∈ R ex + e−x ≥ 2. Finally for any x ∈ S3 : X X  X X  X X exp ξΘ xu − xu ≥ 2 cosh(2Θ). exp ξΘ xu + xu = 2 cosh(2(s−1)Θ), u∈Nk ξ∈{±1} u∈N` u∈Nk ξ∈{±1} P u∈N` P To see why the first identity holds, note that the sum u∈Nk xu + u∈N` xu contains 2s odd terms P P (equal to ±1), and is therefore even. Hence since 2(s − 2) < u∈Nk xu + u∈N` xu < 2s we must P P have x + x = 2(s − 1). To show why the inequality holds suppose the contrary, u u u∈Nk P u∈N` P P P P P i.e., suppose xu − u∈N ` xu u∈N` xu ≤ 1. Since u∈Nk xu − u∈N` xu = u∈Nk xu − u∈N k P P and |N k ∪ N ` | = 2(s − m), the sum u∈N k xu − u∈N ` xu is even. Hence the only possibility P P P is Nk xu = 2(s − 1). The latter is impossible since u∈N ` xu , and therefore 2 P u∈N k xu = x ≡ s (mod 2). Nk u We first show the result when s ≥ 3. Let 1 ∈ Rd denote a vector of 1’s. Observe the following inclusions  x ∈ {±1}d | ∃ξ ∈ {±1}, xNk ∪N` = ξ1Nk ∪N` = S1 ,  S 2 := x ∈ {±1}d | ∃ξ ∈ {±1}, ∃u ∈ N : xNk ∪N` \{u} = ξ1Nk ∪N` \{u} , xu = −ξ ⊆ S2 ,  S 3 := x ∈ {±1}d | ∃ξ ∈ {±1}, ∃u ∈ N k ∪ N ` : xNk ∪N` \{u} = ξ1Nk ∪N` \{u} , xu = −ξ ⊆ S3 . Notice that whens ≥ 3: |S 2 | ≥ m|S1 | and |S 3 | ≥ 2(s − m)|S1 |. For i ∈ [3] define the three sums P P Σi := x∈Si exp Θ (u,v)∈E(θ),k,`6∈{u,v} xu xv . Using (C.3) and the identities we recorded above we conlcude Pθ (Xk X` = 1) cosh(2sΘ)Σ1 + cosh(2(s − 2)Θ)Σ2 + cosh(2(s − 1)Θ)Σ3 ≤ . Pθ (Xk X` = −1) Σ1 + Σ2 + cosh(2Θ)Σ3 (C.4) We now use the following elementary inequality which can be checked via cross multiplication: for positive real numbers a, b, c, d, x, y > 0 such that ac ≥ db and x ≥ y it holds that a + by a + bx ≤ . c + dx c + dy Taking x = ∞, y = 1 in (C.5) implies that cosh(2sΘ)Σ1 + cosh(2(s − 1)Θ)Σ3 cosh(2(s − 1)Θ) ≥ cosh(2sΘ) ∧ ≥ cosh(2(s − 2)Θ), Σ1 + cosh(2Θ)Σ3 cosh(2Θ) 42 (C.5) where the last inequality follows by simple algebra and the fact that cosh(x) is increasing for x ≥ 0. We now record the inequality   P P (u,v)∈E(θ),k,`6∈{u,v} xu xv x∈S 2 exp Θ Σ2  ≥ me−2(s−2)Θ ,  ≥ P P Σ1 x∈S1 exp Θ (u,v)∈E(θ),k,`6∈{u,v} xu xv which follows by the fact that |S 2 | ≥ m|S1 | and that all vertices u ∈ N are connected to at most s − 2 vertices in the set Vd \ {k, `}. Combining the last two inequalities with (C.4) and (C.5) we obtain 3 cosh(2sΘ) + cosh(2(s − 2)Θ)m exp(−2(s − 2)Θ) + cosh(2(s − 1)Θ) Σ Pθ (Xk X` = 1) Σ1 . (C.6) ≤ 3 Pθ (Xk X` = −1) 1 + m exp(−2(s − 2)Θ) + cosh(2Θ) Σ Σ 1 We now consider two cases. Case I. Suppose cosh(2sΘ) + cosh(2(s − 2)Θ)me−2(s−2)Θ cosh(2(s − 1)Θ) ≤ . cosh(2Θ) 1 + me−2(s−2)Θ (C.7) Taking y = 0 in (C.5), and using (C.6) yields cosh(2(s − 1)Θ) Pθ (Xk X` = 1) ≤ . Pθ (Xk X` = −1) cosh(2Θ) (C.8) Case II. Assume that (C.7) holds in the opposite direction. We have   P P (u,v)∈E(θ),k,`6∈{u,v} xu xv x∈S 3 exp Θ Σ3   ≥ 2(s − m)e−2(s−1)Θ , ≥ P P Σ1 x∈S1 exp Θ (u,v)∈E(θ),k,`6∈{u,v} xu xv where we used that |S 3 | ≥ 2(s−m)|S1 | and that for any x ∈ S 3 the vertex u ∈ N k ∪N ` is connected to at most s − 1 vertices in the sed Vd \ {k, `}. (C.5) and (C.6) imply Pθ (Xk X` = 1) cosh(2sΘ) + cosh(2(s − 2)Θ)me−2(s−2)Θ + cosh(2(s − 1)Θ)2(s − m)e−2(s−1)Θ ≤ Pθ (Xk X` = −1) 1 + me−2(s−2)Θ + cosh(2Θ)2(s − m)e−2(s−1)Θ Taking the supremum over 0 ≤ m ≤ s on the RHS shows that the maximum is reached at m ≡ 0. The latter can be verified via comparing consecutive values of m and arguing that the RHS is decreasing in m; we omit this lengthly calculation. Finally a simple comparison between the RHS of the last bound evaluated at m = 0 and the RHS of (C.8) shows that the last bound is larger. Putting everything together we have concluded that for s ≥ 3 Pθ (Xk X` = 1) cosh(2sΘ) + 2se−2(s−1)Θ cosh(2(s − 1)Θ) ≤ . Pθ (Xk X` = −1) 1 + 2se−2(s−1)Θ cosh(2Θ) 43 For the special case s = 2, the major difference is that when m = 2, |S 2 | ≥ |S1 | and not |S 2 | ≥ 2|S1 | as before. Using the same ideas as in the proof of the case s ≥ 3 one can show that when s ≡ 2: Pθ (Xk X` = 1) cosh(4Θ) + 1 ≤ . Pθ (Xk X` = −1) 2 The last two inequalities combined with the fact Eθ Xk X` = 1 − 2Pθ (Xk X` = −1) complete the proof. The following simple lemma gives a sharper correlation bound when no edge is present, in a regime where the maximum parameter Θ is sufficiently small. Lemma C.3 (High Temperature No Edge Correlation Upper Bound). Let the assumptions of Lemma C.2 hold, and let additionally (s − 1) tanh(Θ) < 1. Then we have Eθ Xk X` ≤ s tanh2 (Θ) . 1 − (s − 1) tanh(Θ) Proof of Lemma C.3. As in the proof of Lemma C.2, we may assume that all θuv = Θ. Next, notice that each path P connecting k and ` has length m ≥ 2. Let θP be the restriction of the parameter θ to the path graph P . By Lemma A.4 we know that EθP Xi Xj = tanhm (θ), and furthermore there are at most s(s − 1)m−2 such paths, due to the fact that each vertex has at most s neighbors. The conclusion now follows from a result by Fisher (1967) which bounds the correlation between two nodes with a sum over the correlations of all path graphs between the two vertices, and the formula for summing converging geometric progressions. Proof of Corollary 3.2. Note that if θ ∈ S0 ∩ R for any G ∈ WP (θ) there exists an edge e ∈ E(G) with a zero entry in θ. Fact i. now follows since by Lemma C.2 and the definition of R(s, Θ) and we have for s ≥ 3 R(s, Θ) − 1 max max min Eθ Xu Xv ≤ , θ∈S0 ∩R G∈WP (Gd ) (u,v)∈E(G) R(s, Θ) + 1 and fact ii. follows by noting that when (s − 1) tanh(Θ) < 1 by Lemma C.3 max max min θ∈S0 ∩R G∈WP (Gd ) (u,v)∈E(G) Eθ Xu Xv ≤ s tanh2 (Θ) . 1 − (s − 1) tanh(Θ) Proof of Corollary 3.5. We will now argue that if G is under the alternative, i.e., if G is connected, then for any spanning tree T ⊆ G(θ) we have min Eθ Xu Xv ≥ tanh(θ). (u,v)∈T (C.9) By the FKG inequality (Alon and Spencer, 2004) we have min(u,v)∈T Eθ Xu Xv ≥ min(u,v)∈T EθT Xu Xv , where θT is the restriction of θ on T , i.e., setting all entries of θ outside of T to 0 while retaining the values of all entries belonging to T . Using Proposition A.3, Lemma A.4 and the fact that on a 44 tree T the only path between vertices u and v connected by an edge (u, v) is the edge we conclude that EθT Xu Xv = tanh(θuv ). Hence min Eθ Xu Xv ≥ min EθT Xu Xv = min tanh(θuv ) ≥ tanh(θ), (u,v)∈T (u,v)∈T (u,v)∈T as we claimed. On the other hand, when G(θ) is under the null for any tree T , we have min Eθ Xu Xv = 0. (u,v)∈T Hence an application of Theorem 3.1 completes the proof. Proof of Corollary 3.7. Similarly to the proof of Proposition 3.5 we can convince ourselves with the help of the FKG inequality, Proposition A.3 and Lemma A.4 that under the alternative there exists at least one cycle C ⊆ G(θ) so that min Eθ Xu Xv ≥ min EθC Xu Xv ≥ min tanh(θuv ) ≥ tanh(θ), (u,v)∈C (u,v)∈C (u,v)∈C where θC is the restriction of θ on C. Next, note that under the null hypothesis for any given cycle C we will have at least one edge (u, v) ∈ C such that θuv = 0. Since under the null the graph is a forest by Proposition A.3 and Lemma A.4 we know that Y min Eθ Xu Xv ≤ tanh(θkl ) ≤ tanh2 (Θ), (u,v)∈C G(θ) (k,l)∈Pu→v G where Pu→v is the direct path that connects u to v. Applying Theorem 3.1 completes the proof. Proof of Corollary 3.10. Take any model with a graph G containing an m-clique. By the FKG inequality we know that the correlation for any edge (u, v) ∈ E(θ): Eθ Xu Xv will only decrease if we set all parameters to their lower bound θ, and if we remove edges so that we reduce the graph G to an m-clique. We recognize that under such manipulation we obtain a Curie-Weiss model17 (albeit under non-standard parametrization) for m of the variables, and remaining d − m variables are independent and have Rademacher distributions. Hence we only need to calculate Pθ (Xk X` = ξ) for ξ ∈ {±1} in an m-dimensional Curie-Weiss model. This is a standard calculation which we nevertheless include for completeness. We have Pθ (Xk X` = 1) = eθ−θ(m−2)/2 S(2θ, θ/2), Zm (θ) Pθ (Xk X` = −1) = e−θ−θ(m−2)/2 S(0, θ/2), Zm (θ) (C.10) where Zm (θ) is the partition constant of an m-dimensional Curie-Weiss magnet with inverse temperature θ and no external magnetic field, i.e., X X  Zm (θ) = exp θ xu xv , (C.11) x∈{±1}m 17 i.e., a fully connected m-clique with inverse temperature θ. 45 u<v and the function S(h, µ) = S(−h, µ) given by S(h, µ) := 2   X  X . xu + µ xu exp h X x∈{±1}m−2 u∈[m−2] u∈[m−2] Clearly since P(Xk X` = 1) + P(Xk X` = −1) = 1, one can express Zm (θ) in terms of S(2θ, θ/2) and S(0, θ/2). We set out to find a closed form expression of the more general quantity S(h, µ). Using the identity Z ∞ √ 1 2 x2 e =√ e−y /2+ 2xy dy, 2π −∞ we can rewrite S(h, µ) as 1 S(h, µ) = √ 2π X x∈{±1}m−2 Z ∞ e−y 2 /2+(y √ 2µ+h) P u∈[m−2] xu dy −∞ p = 2m−2 EZ coshm−2 ( 2µZ + h). (C.12) Putting (C.10) and (C.12) together we conclude Eθ Xk X` = Pθ (Xk X` = 1) − Pθ (Xk X` = −1) = r(m, θ) − 1 . r(m, θ) + 1 This implies that under the alternative min Eθ Xu Xv ≥ (u,v)∈C r(m, θ) − 1 , r(m, θ) + 1 for any m-clique C ⊆ G, which is what we wanted to show. Remark C.4. In this remark we will first show a low temperature expansion of the equivalent formulation r(m, θ) − 1 d log Zm (θ)/dθ  = , m r(m, θ) + 1 2 r(m,θ)−1 r(m,θ)+1 . Note where Zm (θ) is defined in (C.11). Now observe that    m m −4(m−2)θ θ −2(m−1)θ ( ) 2 Zm (θ) = 2e 1 + me + e + O(m3 e−6(m−3)θ ) , 2 where the first term corresponds to all spins being 1 or −1, the second term corresponds to the m terms where one spin is −1 and all remaining spins are 1 and vice versa, and so on. Hence      m m −4(m−2)θ −2(m−1)θ log Zm (θ) = log 2 + θ + log 1 + me + e + O(m3 e−6(m−3)θ ) 2 2     m m −4(m−2)θ = log 2 + θ + me−2(m−1)θ + e + O(m3 e−6(m−3)θ ) 2 2 46 Under the assumption m2 e−2mθ = o(1), we have the approximation r(m, θ) − 1 ≈ 1 − 4e−2(m−1)θ − 4(m − 2)e−4(m−2)θ . r(m, θ) + 1 Now recalling bound (C.2), we can equivalently rewrite its RHS as 1− 4se−2(s−2)Θ + 4se−2sΘ + 4 . 1 + e2sΘ + e−2sΘ + s(1 + e−4(s−1)Θ + e−2(s−2)Θ + e−2sΘ ) Under the assumption e2sΘ  s the above expression is asymptotically equivalent to 1 − 4e−2sΘ − 4se−4(s−1)Θ + o(1). Therefore, when m = s + 1, and θ = Θ the asymptotic difference is of magnitude 4e−4(s−1)θ . Hence the LHS of (3.7) is asymptotically 4e−4(s−1)θ and thus if r 4 log d + log δ −1 −4(s−1)θ , 2e ≥ n the test is successful. This is equivalent to θ ≤ scalars. D log n log d+log δ −1 /4 8(s−1) , which matches bound (2.10) up to Bounds for General Models Proof of Proposition 6.3. Define the two ellipses E1 = {(x, y) ∈ R2 : θ(x+h)2 +θ0 (y+h+2)2 < t}, and E2 = {(x, y) ∈ R2 : θ0 (x+h)2 +θ(y+h+2)2 < t}. Clearly both ellipses are centered at the point (−h, −(h + 2)). Let us begin by calculating the intersection points of the contours of the two ellipses in the case when θ 6= θ0 (the case θ = θ0 is trivial, as (6.10) holds with an equality). The contours intersect when θ(x + h)2 + θ0 (y + h + 2)2 = θ0 (x + h)2 + θ(y + h + 2)2 = t. Hence at the intersection, we necessarily have (x − y − 2)(x + y + 2h + 2) = 0. Note that the equations x − y − 2 = 0, and x + y + 2h + 2 = 0 define two lines, which pass through the center (−h, −(h + 2)), and partition the x, y-plane into four regions. Denote those regions as E = {(x, y) ∈ R2 : x − y − 2 ≥ 0, x + y + 2h + 2 ≥ 0}, N = {(x, y) ∈ R2 : x − y − 2 ≤ 0, x + y + 2h + 2 ≥ 0}, W = {(x, y) ∈ R2 : x − y − 2 ≤ 0, x + y + 2h + 2 ≤ 0}, S = {(x, y) ∈ R2 : x − y − 2 ≥ 0, x + y + 2h + 2 ≤ 0}. To facilitate the readability of the proof, we plot two examples of E1 and E2 , along with the two lines and four regions in Figure 8. By the above definitions we know that E1 \ E2 ⊂ N ∪ S, and 47 30 20 30 20 10 N 10 N W E -20 -20 -10 0 E -10 0 W -30 -20 -10 0 S -30 -30 S 10 20 30 -30 -20 -10 0 10 20 30 Figure 8: An example of the two ellipses E1 and E2 with the same values of θ but two different values of θ0 . The points inside the ellipses represent points from the set S. The point of intersection of the two lines is the center (−h, −h−2), where for this specific example we have set h = 8, k = 26. Points “o” form the set E1 ∩ S, and points “x” form the set E2 ∩ S. The four regions E, N , W, S are also depicted. Points of warmer colors are more likely to occur than points with cooler colors. E2 \ E1 ⊂ E ∪ W. Note that the pairs (SX , SY ) can only take integer values, and in such a way so that −k ≤ SX ≤ k, −k ≤ SY ≤ k, and SX ≡ SY ≡ k (mod 2). Define S = {(x, y) ∈ (N0 )2 | − k ≤ x ≤ k, −k ≤ y ≤ k, x ≡ y ≡ k (mod 2)} In terms of this notation (6.10) can be restated as P∅ ((SX , SY ) ∈ E2 ∩ S) ≤ P∅ ((SX , SY ) ∈ E1 ∩ S), or equivalently P∅ ((SX , SY ) ∈ (E2 \ E1 ) ∩ S) ≤ P∅ ((SX , SY ) ∈ (E1 \ E2 ) ∩ S). (D.1) In the following, our proof plan is to show (D.1) by taking pairs of points from the set (E1 \E2 )∩S and matching them in a 1-1 manner with pairs of points from the set (E2 \ E1 ) ∩ S, while ensuring that the former pairs are more likely to occur than the latter. Sometimes one or more of the points in the two pairs will lie outside of the set S (see, e.g., the right panel of Figure 8), but we will make sure that this does not alter the conclusion. Take a point (i, j) ∈ (E1 \E2 )∩S∩N . Define the transformation (bi, b j) = (−j−2h−2, −i−2h−2), b b b b and consider the four points (i, j), (j + 2, i − 2), (j + 2, i − 2), (i, j). Since (i, j) ∈ (E1 \ E2 ) ∩ N it is simple to check that (j +2, i−2) ∈ (E2 \E1 )∩E, (bi, b j) ∈ (E2 \E1 )∩W and (b j +2, bi−2) ∈ (E1 \E2 )∩S. We will now argue that   P∅ (SX , SY ) ∈ {(i, j), (b j + 2, bi − 2)} ≥ P∅ (SX , SY ) ∈ {(j + 2, i − 2), (bi, b j)} . (D.2) 48 Note that for any point (m, `) ∈ S  P∅ ((SX , SY ) = (m, `)) = k k+m 2   −2k . k+` 2 k 2 To this end we consider several cases. i. First assume that all of the above four points belong to S. Therefore, we need to show that             k k k k k k k k − − ≥ k+j k+j+2 k+b j k+b j+2 . k+i k+i−2 k+bi−2 k+bi 2 2 2 2 2 2 2 2 A direct calculation yields that the above is equivalent to b j−i  j−bi  (k + 1) + (k + 1) 2 2 (k + 1) + (k + 1) .  k−i  k+j  k−j  ≥   b b k+i bi  k−bi k+ ! + 1 ! k+j + 1 ! k−j ! 2 ! 2 +1 ! 2 +1 ! 2 ! 2 2 2 2 j−i  We note that b j − bi = j − i, and furthermore the numerator 2 (k + 1) + (k + 1) ≥ 0, since j − i ≥ −2 by the fact that (i, j) ∈ N . Rearaging and cancelling terms shows that the above is equivalent to showing that        k+j k + j + 2h + 2 k+i k + i + 2h + 2 + 2 ... +1 + 1 ... ≥ 2 2 2 2        k − i − 2h − 2 k−i k − j − 2h − 2 k−j + 2 ... +1 + 1 ... . 2 2 2 2 This inequality holds true since (i, j) ∈ N and hence i + j + 2h + 2 ≥ 0. ii. In the case when (b j +2, bi−2) ∈ S but either or both of the points (bi, b j) 6∈ S or (j +2, i−2) 6∈ S then (D.2) continues to hold by i. iii. Assume (b j + 2, bi − 2) 6∈ S but (bi, b j) ∈ S and (j + 2, i − 2) ∈ S. By the fact that (b j + 2, bi − 2) 6∈ S but (bi, b j) ∈ S we have that either b j = k or bi = −k. The former is impossible since otherwise i = −(k + 2h + 2) < −k. Hence the only viable option is to have bi = −k, in which case j = k − (2h + 2). We need to show that    k! j−i 1 2 (k + 1) + (k + 1)  k−i  k+j  k−j  ≥  k−bj  . b k+i k+ j 2 ! 2 +1 ! 2 +1 ! 2 ! 2 ! 2 ! Since (i, j) ∈ E1 \ E2 we cannot have j = i − 2 (which can only happen in the intersection of the two ellipses), and thus j ≥ i. Therefore it suffices to show       k+i k + i + 2h + 2 j−i + 1 (k + 1)! + 1 ... 2 2 2       k − i − 2h − 2 k−i k+j k−j ≥ + 1 ... +1 +1 ! !. 2 2 2 2 We first observe that the following holds       k+i k + i + 2h + 2 k−j + 1 ... ≥ ! 2 2 2 49 This is true since: first j = k−(2h+2) and hence the RHS factorial contains h+1 terms which is the same number of terms contained on the LHS; and second by the fact that (i, j) ∈ N we have i + j + 2h + 2 ≥ 0 and therefore each of the terms in the product on the LHS is greater than or equal to a corresponding term in the product of the RHS. Next, note that j−i k−i−2h−2 + 1 since j = k − (2h + 2). Hence it is enough to show 2 +1= 2      k − i − 2h − 2 k−i k+j (k + 1)! ≥ + 2 ... +1 +1 ! 2 2 2 The latter is equivalent to       k − i − 2h − 2 k−i k+j + 2 . . . (k + 1) ≥ + 2 ... +1 , 2 2 2 which holds true since the number of terms on both sides is the same, and i ≥ −k. iv. Assume (b j + 2, bi − 2) 6∈ S and (bi, b j) ∈ S, but (j + 2, i − 2) 6∈ S. This case follows by iii. v. Assume (b j + 2, bi − 2) 6∈ S and (j + 2, i − 2) ∈ S but (bi, b j) 6∈ S. This case follows by case i. since its calculation implies       k k k k − k+i−2 ≥ 0. k+j k+j+2 k+i 2 2 2 2 We have now shown that (D.2) holds. The proof will be completed if we showed that by iterating over points in the set (E1 \ E2 ) ∩ S ∩ N exhausts all points from the remaining three sets — (E1 \ E2 ) ∩ S ∩ S, (E2 \ E1 ) ∩ S ∩ W and (E2 \ E1 ) ∩ S ∩ E. We show this below. First assume there is a point (i, j) ∈ (E2 \ E1 ) ∩ S ∩ E so that (j + 2, i − 2) 6∈ (E1 \ E2 ) ∩ S ∩ N . Since (i, j) ∈ (E2 \ E1 ) ∩ E we necessarily have (j + 2, i − 2) ∈ (E1 \ E2 ) ∩ N . Therefore by our assumption (j + 2, i − 2) 6∈ S. By the fact that (i, j) ∈ E we know that i ≥ j + 2 and therefore k ≥ j + 2 ≥ j ≥ −k. Moreover i = −k implies that j ≤ −k − 2 contradicting (i, j) ∈ S, and therefore i ≥ −k + 2. This implies that (j + 2, i − 2) ∈ S which is a contradiction. Next, let (i, j) ∈ (E2 \ E1 ) ∩ S ∩ W so that (−j − 2h − 2, −i − 2h − 2) 6∈ (E1 \ E2 ) ∩ S ∩ N . The fact that (i, j) ∈ (E2 \ E1 ) ∩ W ensures (−j − 2h − 2, −i − 2h − 2) ∈ (E1 \ E2 ) ∩ N and thus (−j − 2h − 2, −i − 2h − 2) 6∈ S. Since (i, j) ∈ W we have that i ≤ −j − 2h − 2 and j ≤ −i − 2h − 2 hence since (i, j) ∈ S we also have −i − 2h − 2 ≥ −k and −j − 2h − 2 ≥ −k. Also −i − 2h − 2 ≤ k, as otherwise we would have i ≤ −k − 2h − 2 < −k which would be a contradiction. Similarly −j − 2h − 2 ≤ k. Thus (−j − 2h − 2, −i − 2h − 2) ∈ S which is a contradiction. Finally assume that (i, j) ∈ (E1 \ E2 ) ∩ S ∩ S but (−i − 2h, −j − 2h − 4) 6∈ (E1 \ E2 ) ∩ S ∩ N . Since (i, j) ∈ (E1 \ E2 ) ∩ S it can be checked that (−i − 2h, −j − 2h − 4) ∈ (E1 \ E2 ) ∩ N and thus by assumption (−i − 2h, −j − 2h − 4) 6∈ S. Note that −i − 2h ≤ k and −j − 2h − 4 ≤ k or otherwise i < −k − 2h ≤ k and j ≤ −k − 2h − 4 < −k which contradicts our assumption that (i, j) ∈ S. We also have that −k + 2 ≤ j + 2 ≤ −i − 2h by the assumption that (i, j) ∈ S ∩ S. Moreover −i − 2h − (−j − 2h − 4) = 4 + j − i ≤ 2 and therefore (−j − 2h − 4) ≥ −k + 2 − 2 = −k. Hence (−i − 2h, −j − 2h − 4) ∈ S, which is a contradiction. With this the proof is complete. 50 θ −θ Figure 9: The graph G0 is depicted with solid edges. A particular Gj,k can be constructed if we add the two dashed edges to G0 . Proof of Proposition 4.3. To compare the null and alternative hypothesis we construct the following graphs. Let G0 = (Vd , E0 ), where b ds c−2 E0 := [ j=0 d c−2 [ b s[ {(u, v)}sj+1≤u<v≤s(j+1) {(sj, sj + 1)} j=1 [ {(j, j + 1)}. s(b ds c−1)+1≤j≤d−1 which is a union of b ds c − 2, s-cliques connected via a path, and a disconnected path graph. See Figure 9 for a visualization. Based on G0 , we construct the ferromagnetic Ising measure PG0 which attaches an interaction of magnitude θ > 0 to each edge in G0 so that:   X PG0 (X) ∝ exp θ Xu Xv . (D.3) (u,v)∈E0 Next construct the connected graphs Gj,k = (Vd , Ej,k ) for 1 ≤ j ≤ b ds c − 2 and 3 ≤ k ≤ s − 1, where    [  d d Ej,k := E0 . s(b c − 1) + j, sj + 2 , s(b c − 1) + j, sj + k s s We define the Ising measure associated with PGj,k by   X PGj,k (X) ∝ exp θ Xu Xv + θXs(b d c−1)+j (Xsj+2 − Xsj+k ) , s (D.4) (u,v)∈E0 which clearly belongs to model class (4.1) but not to (3.1). For two alternative graphs Gj1 ,k1 and Gj2 ,k2 we evaluate the ratio: EG0 PGj1 ,k1 PGj2 ,k2 PG0 PG0 = EGj1 ,k1 exp(θXj̄2 (Xsj2 +2 − Xsj2 +k2 )) EG0 exp(θXj̄2 (Xsj2 +2 − Xsj2 +k2 )) where for brevity we set j̄2 := s(b ds c − 1) + j2 . Using identity (A.1) we have: EG0 PGj1 ,k1 PGj2 ,k2 PG0 =1+ PG0 = EGj1 ,k1 (1 + tanh(θ)Xj̄2 Xsj2 +2 )(1 − tanh(θ)Xj̄2 Xsj2 +k2 ) EG0 (1 + tanh(θ)Xj̄2 Xsj2 +2 )(1 − tanh(θ)Xj̄2 Xsj2 +k2 ) tanh(θ)EGj1 ,k1 [Xj̄2 Xsj2 +2 − Xj̄2 Xsj2 +k2 ] + tanh2 (θ)[EG0 Xsj2 +2 Xsj2 +k2 − EGj1 ,k1 Xsj2 +2 Xsj2 +k2 ] 1 − tanh2 (θ)EG0 Xsj2 +2 Xsj2 +k2 51 . where we used EG0 Xj̄2 Xsj2 +k2 = EG0 Xj̄2 Xsj2 +2 = 0. We distinguish two cases. Case I. First assume that j1 6= j2 . Since there are no simple paths connecting sj2 + 2 with sj2 + k2 which pass through the vertex j̄1 = s(b ds c − 1) + j1 , by Proposition A.3 we have that: EG0 Xsj2 +2 Xsj2 +k2 = EGj1 ,k1 Xsj2 +2 Xsj2 +k2 . What is more, due to the symmetry of the construction we also have that: EGj1 ,k1 Xj̄2 Xsj2 +2 = EGj1 ,k1 Xj̄2 Xsj2 +k2 . Hence when j1 6= j2 we have: EG0 PGj1 ,k1 PGj2 ,k2 PG0 PG0 = 1. Case II. Now consider the case j1 = j2 =: j. Below we control the terms EGj,k1 [Xj̄ Xsj+2 − Xj̄ Xsj+k2 ] (here j̄ = s(b ds c − 1) + j) and EG0 Xsj+2 Xsj+k2 − EGj,k1 Xsj+2 Xsj+k2 , starting from the former. The simple identity |a − b| = 1 − ab for any a, b ∈ {±1} yields the estimate EGj,k1 [Xj̄ Xsj+2 − Xj̄ Xsj+k2 ] ≤ 1 − EGj,k1 Xsj+2 Xsj+k2 . We have PGj,k1 (Xsj+2 Xsj+k2 = 1) PGj,k1 (Xsj+2 Xsj+k2 = −1) ≥ min ξ∈{±1} ≥ PGj,k1 (Xsj+2 Xsj+k2 = 1|Xj̄ = ξ) PGj,k1 (Xsj+2 Xsj+k2 = −1|Xj̄ = ξ) PG0 (Xsj+2 Xsj+k2 = 1) exp(2θbs/4c) , ≥ exp(4θ)PG0 (Xsj+2 Xsj+k2 = −1) exp(4θ)(2bs/4c − 1) where the last inequality follows by (B.7), since the vertices sj + 2 and sj + k2 belong to the same sclique in the graph G0 , and hence they are on the same side of a 2bs/4c × 2bs/4c-biclique. Putting the last two inequalities together with the identity EGj,k1 Xsj+2 Xsj+k2 = PGj,k1 (Xsj+2 Xsj+k2 = 1) − PGj,k1 (Xsj+2 Xsj+k2 = −1) gives: EGj,k1 [Xj̄ Xsj+2 − Xj̄ Xsj+k2 ] ≤ 1 − EGj,k1 Xsj+2 Xsj+k2 ≤ 2(2bs/4c − 1) . exp((2bs/4c − 4)θ) + (2bs/4c − 1) Now we focus on the term EG0 Xsj+2 Xsj+k2 − EGj,k1 Xsj+2 Xsj+k2 . Note that EG0 Xsj+2 Xsj+k2 − EGj,k1 Xsj+2 Xsj+k2 ≤ 1 − EGj,k1 Xsj+2 Xsj+k2 , and therefore the previous bound applies. We have established EG0 PGj,k1 PGj,k2 PG0 PG0 tanh(θ) + tanh2 (θ) 2(2bs/4c − 1) 2 exp((2bs/4c − 4)θ) + (2bs/4c − 1) 1 − tanh (θ) 4(2bs/4c − 1) ≤1+ . (1 − tanh2 (θ))(exp((2bs/4c − 4)θ) + (2bs/4c − 1)) ≤1+ 52 Let P ⊗n be the measure such that P ⊗n = 1 (b ds c−2)(s−3) P j,k P⊗n Gj,k . We have: ⊗n P⊗n X Gj1 ,k1 PGj2 ,k2 1 Dχ2 (P = E ⊗n P⊗n [(b ds c − 2)(s − 3)]2 j ,j ,k ,k PG0 P⊗n G0 G0 1 2 1 2  n 4(2bs/4c−1) 1 + (1−tanh2 (θ))(exp((2bs/4c−4)θ)+(2bs/4c−1)) (b ds c − 2)2 − (b ds c − 2) ≤ + (b ds c − 2)2 (b ds c − 2)(s − 3)2   4(2bs/4c−1) exp n (1−tanh2 (θ))(exp((2bs/4c−4)θ)+(2bs/4c−1)) − (s − 3)2 ≤1+ . (b ds c − 2)(s − 3)2 ⊗n , P⊗n G0 ) Hence if the last quantity is 1 + o(1) the risk is 1. The latter is ensured under condition (4.4) from the statement, and hence the proof is complete. E Correlation Testing for General Models Proof of Proposition 5.1. First consider the case when the true graph θ ∈ S0 (θ, Θ). Then by (5.3) we have that b u Xv − E eXu Xv | ≤ ε(δ), max |EX θ u,v with probability at least 1 − δ. Next, suppose that θ ∈ S1 (θ, Θ). Let (u∗ , v ∗ ) = argmax |EθeXu Xv − Eθ Xu Xv | u,v We have b u Xv − E eXu Xv | ≥ |EX b u∗ Xv∗ − E eXu∗ Xv∗ | max |EX θ θ u,v b u∗ Xv∗ − Eθ Xu∗ Xv∗ | ≥ |EθeXu∗ Xv∗ − Eθ Xu∗ Xv∗ | − |EX ≥ |EθeXu∗ Xv∗ − Eθ Xu∗ Xv∗ | − τ ≥ sinh2 (θ/4) − τ, 2sΘ(3 exp(2sΘ) + 1) where the next to last inequality holds with probability at least 1 − δ by Lemma C.1, and the last inequality holds by Lemma 6 of Santhanam and Wainwright (2012) since θe ∈ S0 (θ, Θ) and hence e This completes the proof. G(θ) 6= G(θ). Proof of Lemma 5.2. The proof is a direct consequence of Lemma C.1. Proof of Proposition 5.3. Clearly the output of Algorithm 6 satisfies θe ∈ S0 (θ, Θ) and thus for e we have P(Te) = 0 by design. Hence it remains to argue that (5.3) holds with the Te = G(θ) specified ε(δ). Using Lemma C.1 we have that b u Xv − Eθ Xu Xv | ≤ τ. max |EX u,v 53 (E.1) with probability at least 1 − δ. Below we assume this event holds, so that all statements we make should be understood to hold with probability at least 1 − δ. We begin by arguing that Te = G(θ). First we will show that the set E(Te) \ E(θ) = ∅. Suppose the contrary, and consider the first step, say m, at which an edge e = (u, v) from the set E(Te)\E(θ) was added to Te. Let P (possibly P = ∅) denote the path connecting u with v in the graph G(θ). b u Xv | ≤ τ and since tanh θ − τ ≥ τ this edge is First suppose P = ∅. Then Eθ Xu Xv = 0, so |EX pruned at the end of the procedure which is a contradiction. So P 6= ∅ and thus |P | ≥ 2 (if P was a single edge it follows that e ∈ E(θ) which is a contradiction). By Proposition A.3 and Lemma A.4 we know Y Eθ Xk X` , Eθ Xu Xv = (k,`)∈P th b u Xv | ≤ and therefore |EX (k,`)∈P |Eθ Xk X` | + τ . Since we have added e at the m step of building the MST, and e 6∈ P , then there exists an edge from e0 ∈ P , say e0 = (u0 , v 0 ), which does not belong to Te, since otherwise adding e would make a cycle in Te. Adding edge e over e0 means that the b u0 Xv0 | ≤ |EX b u Xv | holds. Hence inequality |EX Y b u0 Xv0 | ≤ |EX b u Xv | ≤ |Eθ Xu0 Xv0 | − τ ≤ |EX |Eθ Xk X` | + τ ≤ |Eθ Xu0 Xv0 | tanh(Θ) + τ. Q (k,`)∈P However, |Eθ Xu0 Xv0 | ≥ tanh(θ) and since tanh(θ)(1−tanh(Θ)) > 2τ this contradicts the inequality in the preceding display. We conclude that E(Te) ⊆ E(θ). If there exists an edge e ∈ E(θ) \ E(Te), then when building the MST this edge was either pruned at the end of the procedure, or a no-edge was preferred to it. However these two scenarios are also impossible using the same logic as before. Hence Te = G(θ). b u Xv , or By our construction we have that for (u, v) ∈ E(θ) we either have EθeXu Xv = EX b u Xv | > tanh(Θ) or |EX b u Xv | < tanh(θ) in which case |E eXu Xv | = tanh(Θ) or |E eXu Xv | = |EX θ θ tanh(θ) respectively. Putting these two cases together we conclude that max (u,v)∈E(θ) b u Xv − E eXu Xv | ≤ τ. |EX θ b u Xv − E eXu Xv | ≤ τ . Clearly if two vertices u and v are disconnected in G(θ), we also have |EX θ Next take two connected vertices u, v and let P denote the (unique) path between them. Consider Y b u Xv − b u Xv − E eXu Xv | = EX |EX EθeXk X` θ (k,`)∈P b u Xv − Eθ Xu Xv | + | ≤ EX ≤τ +| Y (k,`)∈P Eθ Xk X` − Y (k,`)∈P Y Eθ Xk X` − Y EθeXk X` (k,`)∈P EθeXk X` . (k,`)∈P Suppose that the length of P is l. For brevity put τuv := Eθ Xu Xv − EθeXu Xv . By (E.1), and the b u Xv to E eXu Xv will only result in better estimation of Eθ Xu Xv we fact that our corrections of EX θ know that |τuv | ≤ τ for all (u, v) ∈ E(θ) = E(Te). 54 Note that condition tanh(θ)(1 − tanh(Θ)) > 2τ implies that tanh(Θ) < 1 and 1 > 2τ + tanh(Θ). A simple expansion gives Y Y Y Y EθeXk X` = EθeXk X` Eθ Xk X` − (EθeXk X` + τk` ) − | (k,`)∈P (k,`)∈P (k,`)∈P (k,`)∈P ≤ X Y S∪R=P (k,`)∈S S∩R=∅,|S|<l |EθeXk X` | Y (k,`)∈R |τk` | ≤ (τ + tanh(Θ))l − tanh(Θ)l ≤ ≤ l X τ (τ + tanh(Θ))l−j tanh(Θ)j−1 j=1 τ , 1 − tanh(Θ) where the next to last inequality follows easily by induction in l, and the last inequality is due to the fact that τ + tanh(Θ) ≤ 1 and tanh(Θ) < 1. Hence we have successfully argued that b u Xv − E eXu Xv | ≤ τ 2 − tanh(Θ) , max |EX θ u,v∈Vd 1 − tanh(Θ) which completes the proof. 55
10math.ST
arXiv:1501.01307v2 [math.NT] 17 Aug 2016 Integrality in the Steinberg module and the top-dimensional cohomology of GLn OK Thomas Church, Benson Farb, and Andrew Putman∗ August 18, 2016 Abstract We prove a new structural result for the spherical Tits building attached to GLn K for many number fields K, and more generally for the fraction fields of many Dedekind domains O: the Steinberg module Stn (K) is generated by integral apartments if and only if the ideal class group cl(O) is trivial. We deduce this integrality by proving that the complex of partial bases of On is Cohen–Macaulay. We apply this to prove new vanishing and nonvanishing results for Hνn (GLn OK ; Q), where OK is the ring of integers in a number field and νn is the virtual cohomological dimension of GLn OK . The (non)vanishing depends on the (non)triviality of the class group of OK . We also obtain a vanishing theorem for the cohomology Hνn (GLn OK ; V ) with twisted coefficients V . The same results hold for SLn OK as well. 1 Introduction 1.1 The Tits building and the Steinberg module One of the most fundamental geometric objects attached to the general linear group GLn K over a field K is its associated Tits building, denoted Tn (K). The space Tn (K) is the (n − 2)dimensional simplicial complex whose p-simplices are flags of subspaces 0 ( V0 ( · · · ( Vp ( K n . The group GLn K acts on Tn (K) by simplicial automorphisms. By the Solomon–Tits theorem [So], the space Tn (K) is homotopy equivalent to a wedge of (n − 2)-dimensional spheres, so it has only one interesting homology group. Definition 1.1 (The Steinberg module). The Steinberg module Stn (K) is the GLn Ke n−2 (Tn (K); Z). module given by the top homology group H The Solomon–Tits theorem also gives a generating set for Stn (K). A frame for K n is a set L = {L1 , . . . , Ln } of lines in K n such that K n = L1 ⊕ · · · ⊕ Ln . The apartment AL corresponding to L is the full subcomplex of Tn (K) on the 2n − 2 subspaces span(Li | i ∈ I) for ∅ ( I ( {1, . . . , n}. The apartment AL is homeomorphic to an (n − 2)-sphere, so its fundamental class determines an apartment class e n−2 (Tn (K); Z) = Stn (K) [AL ] ∈ H which is defined up to ±1. The Solomon–Tits theorem states that Stn (K) is generated by the set of apartment classes. ∗ TC was supported by NSF grants DMS-1103807 and DMS-1350138 and the Alfred P. Sloan Foundation; BF was supported by NSF grant DMS-1105643; AP was supported by NSF grant DMS-1255350 and the Alfred P. Sloan Foundation. 1 1.2 Integrality and non-integrality Consider a Dedekind domain O with field of fractions K. While the action of GLn K on Tn (K) is transitive, the action of GLn O is usually not, and indeed this action encodes arithmetic information about O. For example, the number of orbits of the GL2 O-action on T2 (K) is the class number |cl(O)| of O. In this context, we have the following natural notion. Definition 1.2 (Integral apartment). Let O be a Dedekind domain with field of fractions K. A frame L = {L1 , . . . , Ln } of K n is integral, and AL is an integral apartment, if On = (L1 ∩ On ) ⊕ · · · ⊕ (Ln ∩ On ). In the case O = Z, and more generally when O is Euclidean, Ash–Rudolph [AR, Theorem 4.1] proved that Stn (K) is generated by the fundamental classes of integral apartments. Our first theorem extends this result of Ash–Rudolph to a wide class of Dedekind domains of arithmetic type, whose definition we recall. Definition 1.3 (Dedekind domain of arithmetic type). Let K be a global field, i.e. either a number field ([K : Q] < ∞) or a function field in one variable over a finite field ([K : Fq (T )] < ∞). Let S be a finite nonempty set of places of K; if K is a number field, assume that S contains all infinite places. The ring of S-integers OS := {x ∈ K | ordp (x) ≥ 0 for all p 6∈ S} is a Dedekind domain, and we say that OS is a Dedekind domain of arithmetic type. Theorem A (Integrality Theorem). Let O be a Dedekind domain with |cl(O)| = 1 and field of fractions K. Assume either that O is Euclidean, or that O = OS is a Dedekind domain of arithmetic type such that |S| > 1 and S contains a non-imaginary place. Then Stn (K) is spanned by integral apartment classes. Under the conditions of Theorem A, the set of integral apartments in Tn (K) is precisely the GLn O-orbit of a single standard apartment. Thus Theorem A implies that Stn (K), which is obviously cyclic as a GLn K-module, is in fact cyclic as a GLn O-module. Remark 1.4. Ash–Rudolph’s proof [AR] of Theorem A when O is Euclidean is based on a beautiful generalization of the method of continued fractions to higher dimensions. Using the Euclidean function on O as a measure of “complexity”, they give an algorithm to write a nonintegral apartment class as a sum of integral apartment classes. Our proof is quite different, even in the special case that O is Euclidean: non-integral apartments never actually show up in our proof, and we do not even make use of the fact that Stn (K) is generated by apartment classes. By Dirichlet’s theorem, the group of units OS× has rank |S| − 1, so the assumption |S| > 1 is equivalent to OS× = ∞. The assumptions on S rule out only two families of Dedekind domains of arithmetic type, for which Theorem A need not hold (see Remark 4.1 below): • the ring of integers OK in a totally imaginary number field K; • those OS in positive characteristic with finitely many units, such as Fq [T ]. The assumption in Theorem A that |cl(OS )| = 1 obviously excludes many more examples. However, this assumption is necessary in a strong sense, as the following theorem shows. Theorem B (Non-Integrality Theorem). Let O be a Dedekind domain with field of fractions K. If 1 < |cl(O)| < ∞ and n ≥ 2 then Stn (K) is not generated by integral apartment classes. Theorem B applies in particular to all number rings with nontrivial class group. 2 1.3 The top-degree cohomology of GLn OK and SLn OK When OK is the ring of integers in a number field K, the Steinberg module Stn (K) is directly connected to the cohomology of GLn OK and SLn OK , as we now explain. Let r1 (resp. 2r2 ) be the number of real (resp. complex) embeddings of OK . Then OK ⊗ R ∼ = Rr1 ⊕ Cr2 and GLn (OK ⊗ R) ∼ = (GLn R)r1 × (GLn C)r2 . The quotient MK of the associated symmetric space by the discrete group GLn OK is a Riemannian orbifold with H∗ (MK ; Q) ∼ = H ∗ (GLn OK ; Q). The computation of these cohomology groups is a fundamental problem in group theory, topology and number theory. The existence of MK implies that Hi (GLn OK ; Q) = 0 for i > dim MK . But since MK is not compact, it is not even clear what the largest i for which Hi (GLn OK ; Q) 6= 0 is. The first progress on this basic problem came in 1973 by Borel and Serre [BS]. Recall that the virtual cohomological dimension of a virtually torsion-free group Γ is vcd(Γ) := max{k | Hk (Γ; V ⊗ Q) 6= 0 for some Γ-module V }. By constructing and analyzing a compactification of the orbifold MK , Borel–Serre proved that  2 − n. In particular Hk (GL O ; Q) = 0 for vcd(GLn OK ) is equal to νn := r1 n+1 + r · n 2 n K 2 k > νn . The coefficient module V used by Borel–Serre to certify that Hνn (GLn OK ; V ) 6= 0 is infinite-dimensional. This left open the question as to whether or not GLn OK has untwisted rational cohomology in the top dimension νn . In 1976 Lee–Szczarba [LS, Theorem 1.3] answered this question in the special case that OK is Euclidean, proving that Hνn (GLn OK ; Q) = 0 for these OK . Except for some explicit computations in low-dimensional cases (sometimes with the help of computers), there seems to have been no progress on this question since Lee–Szczarba. Our next theorem extends the theorem of Lee–Szczarba from Euclidean number rings to many number rings with class number 1 (we remark that even in the Euclidean case our proof is different from that of Lee–Szczarba). In addition to untwisted coefficients Q, it also gives a result for twisted coefficient systems arising from rational representations of the algebraic group GLn . Let νn′ := vcd(SLn OK ); an explicit formula for νn′ is given in §4 below. For λ = (λ1 , . . . , λn ) ∈ Zn with λ1 ≥ · · ·P ≥ λn , let Vλ be the rational GLn K-representation with highest weight λ, and define kλk = ni=1 (λi − λn ). Theorem C (Vanishing Theorem). Let OK be the ring of integers in an algebraic number field K with |cl(OK )| = 1. Suppose that K has a real embedding or that OK is Euclidean. Then ′ Hνn (SLn OK ; Vλ ) = Hνn (GLn OK ; Vλ ) = 0 ′ for n ≥ 2 + kλk. In particular, Hνn (SLn OK ; Q) = Hνn (GLn OK ; Q) = 0 for n ≥ 2. For twisted coefficients, Theorem C seems to be new even in the case when OK is Euclidean. As we discuss in Remark 4.1 below, the assumption that K has a real embedding is necessary if OK is not Euclidean. In contrast to Theorem C, a different phenomenon occurs when |cl(OK )| = 6 1. Theorem D (Non-Vanishing Theorem). Let OK be the ring of integers in an algebraic number field K. Then for n ≥ 2, ′ dim Hνn (SLn OK ; Q) ≥ dim Hνn (GLn OK ; Q) ≥ (|cl(OK )| − 1)n−1 . Theorem D is classical for n = 2; see Example 5.6. For n ≥ 3 the result and method of proof are new. Unlike Theorem C, there is no version of Theorem D for twisted coefficients. For example, if K is any field of characteristic 0 then Hi (GLn K; K n ) = 0 for all i ≥ 0. 3 Remark 1.5. The cohomology of arithmetic groups such as SLn OK has been fruitfully studied via the theory of automorphic forms, see e.g. [F1, FS]. However, it can be difficult to extract concrete statements from them. For example, it is not clear how to see from [F1] even Borel–Serre’s result that the rational cohomology of SLn OK vanishes above its vcd, let alone the sharper vanishing of Theorem C. Franke [F2] has also given a more practicable description of the Hecke-trivial subspace √ ∗ of H (SLn OK ; Q). For example, for a quadratic imaginary field K = Q( −d), it can be deduced from [F2, Theorem 9] that H i (SLn Ok ; Q) contains no Hecke-trivial cohomology for i > νn′ − n + 1. But as Theorem D shows, this cannot capture all the cohomology; indeed, the Hecke action on the classes we construct in Theorem D will be twisted by nontrivial ideal class characters. 1.4 Relationship between Integrality and Vanishing/Non-Vanishing Theorems C (Vanishing) and D (Non-Vanishing) relate to the Integrality Theorem (Theorem A) as follows. While GLn OK does not satisfy Poincaré duality, Borel–Serre [BS] proved that it does satisfy Bieri–Eckmann duality with rational dualizing module Stn (K). This means that for any Q GLn OK -module V and any i ≥ 0 we have   Hνn −i GLn OK ; V ∼ = Hi GLn OK ; Stn (K) ⊗ V . This implies in particular that Hνn (GLn OK ; Q) ∼ = H0 (GLn OK ; Stn (K) ⊗ Q) ∼ = (Stn (K) ⊗ Q)GLn OK . (1.1) Equation (1.1) converts the problem of computing Hνn (GLn OK ; Q) to the problem of understanding the GLn OK -action on Stn (K). This understanding is precisely what is given by the Integrality Theorem, which is applied directly to prove Theorem C. As for Theorem D, the projection Tn (K) → Tn (K)/ GLn OK induces a map e n−2 (Tn (K)/ GLn OK ; Z) ∼ Stn (K) → H = ZN where N = (|cl(OK )| − 1)n−1 . By Equation (1.1), this map rationally factors through Hνn (GLn OK ; Q). It turns out that Tn (K)/ GLn OK is also a spherical building (see Proposition 5.4 below). The hard part in proving Theorem D is showing that this map is surjective. This is difficult because the apartments of Tn (K) that generate Stn (K) are made up of n! simplices, while the apartments of Tn (K)/ GLn OK have only 2n−1 simplices. Since n! ≫ 2n−1 , most apartments of Tn (K) will be draped over a huge number of apartments in the quotient, and it is difficult to describe the resulting homology class. However, we show that by making careful choices, each apartment of Tn (K)/ GLn OK can be lifted to a certain special apartment of Tn (K) for which all of the remaining n! − 2n−1 simplices exactly cancel each other out, leaving the desired homology class. This requires a delicate combinatorial argument. 1.5 The complex Bn (O) of partial bases The first step in our proof of Theorem A is to consider a certain “integral model” Bn (O) for the Tits building Tn (K). The complex of partial bases Bn (O) is the simplicial complex whose maximal simplices are bases of On . Letting Cn−1 (Bn (O)) be the (n − 1)-chains of Bn (O), we define in §3 an integral apartment class map φ : Cn−1 (Bn (O)) → Stn (K) 4 sending a basis for On to the integral apartment class determined by the corresponding frame of K n . Theorem A is the assertion that φ is surjective. We prove that φ is surjective as long as Bn (O) is as highly connected as possible. Our last main theorem is that this connectivity does indeed hold. A d-dimensional complex is d-spherical if it is (d − 1)-connected, in which case it is homotopy equivalent to a wedge of d-spheres. A simplicial complex X is Cohen–Macaulay (abbreviated CM) of dimension d if: 1. X is d-spherical, and 2. for every k-simplex σ k of X, the link LinkX (σ k ) is (d − k − 1)-spherical. The following theorem is the main technical result of this paper, and is of independent interest. Theorem E (Bn (OS ) is Cohen–Macaulay). Let OS be a Dedekind domain of arithmetic type. Assume that |S| > 1 and that S contains a non-imaginary place. Then Bn (OS ) is CM of dimension n − 1 for all n ≥ 1. Note that, unlike our other results, in Theorem E we make no assumption about the class group cl(OS ). Theorem E applies to any number ring OK possessing a real embedding OK ֒→ R (with the exception of Z), as well as to every OS with OS× = ∞ in which some prime p is invertible. Maazen [Ma] proved earlier that for any Euclidean domain O, the complex of partial bases Bn (O) is CM of dimension n − 1. The proof of Theorem E is given in §2. It is a complicated inductive argument on the rank n. To make the induction work, we need to prove that a more general class of “complexes of I-bases” relative to an ideal I ⊂ O are CM. It is in proving this stronger statement in the base case n = 2 that the specific arithmetic hypotheses on OS are used. Remark 1.6. Resolving a conjecture of Quillen, Van der Kallen [vdK, Theorem 2.6] proved that if a ring R satisfies Bass’s stable range condition SRd , then Bn (R) is (n − d)-connected. Any Dedekind domain O satisfies Bass’s stable range condition SR3 , so by Van der Kallen’s result it was known that Bn (O) is (n − 3)-connected. However, Theorem E includes the stronger assertion that Bn (O) is (n − 2)-connected; therefore to prove Theorem E requires us to go beyond these known results and show that Bn (O) is as highly connected as if O were a field or local ring! Our proof of Theorem E uses a stronger condition that can be thought of as “SR2.5 ” which Reiner proved holds for all Dedekind domains. One might hope that Theorem E could be proved by an argument mimicking [vdK] by simply substituting this “SR2.5 ” condition in place of SR3 . But this cannot be so, because the story is more complicated: in Theorem 2.1 below we show that Theorem E is not true for all Dedekind domains, nor even those of arithmetic type. New ideas are needed. See §2.1 for a high-level discussion of the difficulties that arise in extending Van der Kallen’s results to this situation, and an explanation of where the hypotheses of Theorem E come from. Outline of paper. In §2 we prove that Bn (O) is CM for appropriate O (Theorem E). We apply this result in §3 to the integral apartment class map to prove the Integrality Theorem (Theorem A). This result is applied in §4 to prove the Vanishing Theorem (Theorem C) for the top degree cohomology of SLn OK and GLn OK . The Non-Vanishing Theorem (Theorem D) and the Non-Integrality Theorem (Theorem B) are proved in §5. Acknowledgments. We are grateful to an anonymous referee for their careful reading, which improved this paper greatly, and in particular was invaluable for the overview in §2.1. 5 Bn(OS ) is CM of dimension n − 1 2 In this section we prove Theorem E. We also prove the following contrasting result. Theorem 2.1. Let OS belong to one of the families of Dedekind domains of arithmetic type: √ 1. K = Q( d) and OS = OK for d < 0 squarefree with d 6∈ {−1, −2, −3, −7, −11}. 2. [K : Fq (T )] < ∞ with q odd, S = {degf }, and either |cl(OS )| = 6 1 or deg f ≥ 2. Then the (n − 1)-dimensional complex Bn (OS ) is not Cohen–Macaulay for any n ≥ 2. In particular, Theorem 2.1 implies that B2 (OS ) is not connected, so Van der Kallen’s √ √ 1+ −43 result is sharp. For example, neither B2 (Z[√ −5]) nor B2 (Z[ 2 ]) is connected, even though both are Dedekind domains and Z[ 1+ 2−43 ] is even a PID. Similarly, for K = F3 (T ) √ √ and f = degT 2 +1 we have Of ∼ = F3 [X, X − X 2 ], so B2 (F3 [X, X − X 2 ]) is not connected. Theorem 2.1 is proved in §2.4. Outline. We begin in §2.1 with a high-level overview of the proof of Theorem E; this overview is separate from the actual proof, and can be skipped if desired, but for both experts and nonexperts it should be useful in understanding the structure of the proof. In §2.2 we summarize basic properties of Dedekind domains and Cohen–Macaulay complexes. We prove Theorem E by induction, but to do this we must strengthen the inductive hypothesis to a stronger result (Theorem E′ ) applying to a more general family of simplicial complexes; we introduce these in §2.3. The body of the proof then occupies §2.4, §2.5, §2.6, §2.7, and §2.8. 2.1 A bird’s-eye view of the proof of Theorem E In this subsection we give an overview of our approach to Theorem E, including a comparison with related classical results and an explanation of the differences that arise in our situation. This overview is written at a higher level than the proof itself, which is given in §2.3, §2.4, §2.5, §2.6, §2.7, and §2.8. It may be especially useful for experts who are already familiar with past results on complexes of partial bases, such as the work of Quillen–Wagoner [Wa] or Van der Kallen [vdK]. Nevertheless, the overview should be useful for any reader in understanding the big-picture structure of the argument. We have kept the notation in this section consistent with the remainder of the paper. For simplicity, some of the definitions in this subsection may be missing or imprecise; precise definitions of all terms used are given in the proofs themselves. Notation. All the connectivity bounds we obtain or desire in this overview are of the same form: if a complex is (N + 1)-dimensional, our goal is always that it is N -connected, or in other words that it is spherical. As a result, in this outline there is no need to keep track of the precise connectivity or dimensions that arise; instead, the reader is encouraged to think of “spherical” as meaning “as highly connected as appropriate”, or simply “nice”. To foster this, by an abuse of notation we will similarly say (in this section only) that the link of a simplex, or a map between complexes, is spherical if it has the appropriate connectivity.1 This will allow us to describe the structure of the argument without getting bogged down in numerics. 1 The reader will have no need of the precise numerics, but for completeness: we say a link of a (k−1)-simplex in an (N +1)-dimensional complex is spherical if it is (N −k)-connected, and a map between (N +1)-dimensional complexes is spherical if the map is N -connected. 6 Approach to Theorem E. Our main goal is to prove by induction on n that the complex of partial bases Bn (O) is spherical. We will defer the discussion of the base case until later, since certain details would be misleading at this point. As a stepping-stone, we will make use of the full subcomplex Bn (0) on vectors whose last coordinate is either 0 or 1. The inductive hypothesis implies straightforwardly that Bn (0) is spherical (by comparing with the full subcomplex on vectors whose last coordinate is 0, which is isomorphic to Bn−1 (O)). Therefore it suffices to show that the inclusion of the subcomplex Bn (0) → Bn (O) is spherical. Classical approach. It is sometimes possible to verify the connectivity of such an inclusion “simplex-by-simplex”, in the following way. Say that the 0-link of a partial basis {v1 , . . . , vk } in Bn (O) is its link inside the subcomplex Bn (0), i.e. the intersection of its link with this subcomplex. If one could verify that the 0-link of each partial basis {v1 , . . . , vk } in Bn (O) is spherical, it would follow that the injection itself is spherical. We point out that the full link in Bn (O) of a partial basis {v1 , . . . , vk } is not so hard to understand. The quotient map from On onto On /hv1 , . . . , vk i ∼ = On−k induces a map from the link of {v1 , . . . , vk } to Bn−k (O). This map is not an isomorphism, but it “fibers” the former over the latter in a convenient way (cf. Def. 2.17), from which one can show that the former is spherical if and only if the latter is. In particular, we know by induction that all links in Bn (O) are spherical; however the question remains of whether the 0-links are spherical. In the case of a local ring or semi-local ring, where the result was proved by Quillen [Wa, Proposition 1] and Van der Kallen [vdK, Theorem 2.6] respectively, this approach does indeed work: by relating with Bn−k (O), one can show that the 0-link of every partial basis is spherical, so the desired connectivity follows. However, for Dedekind domains this is simply false. There are two distinct problems that arise. Problem 1: some partial bases are bad. The first problem is that even in the simplest cases, there are some partial bases for which there is no hope that their 0-links will be spherical. Consider for example the vertex v = (2, 5) of B2 (Z): to be spherical its 0-link would need to be (−1)-connected, i.e. nonempty, but it is easy to check that its 0-link is empty (the key property is that 2 ∈ / Z× + 5Z). To get around this, we single out a special class of partial bases whose 0-link has a better chance of having the appropriate connectivity: we say that a partial basis is good if it is contained in some basis where some vector has last coordinate equal to 1 (Def. 2.10). We warn the reader that the “good subcomplex” formed by these good partial bases is definitely not a full subcomplex (Prop. 2.14). Problem 2: strengthening the inductive hypothesis. The other problem, even after passing to this good subcomplex, is that our inductive hypothesis is no longer strong enough. The issue comes from the restriction on the last coordinate. We saw above that the link of {v1 , . . . , vk } fibers over Bn−k (O). We are now interested in the 0-link, which is the subcomplex including only those vectors whose last coordinate is 0 or 1. This subcomplex no longer fibers over Bn−k (O); most simplices in Bn−k (O) are inaccessible by such vectors. Indeed, if J ⊂ O is the ideal generated by the last coordinates of v1 , . . . , vk , the only vectors in Bn−k (O) in the image of the 0-link are those whose last coordinate is congruent to 0 or 1 modulo J. To deal with this, we introduce a new complex Bm (I) defined relative to an ideal I ⊂ O, consisting only of vectors whose last coordinate is ≡ 0 or 1 mod I (with some additional conditions, see Def. 2.4). To continue the induction, we are forced to go back and strengthen 7 our inductive hypothesis to the stronger claim (Thm E′ ) that Bm (I) is spherical for every ideal I ⊂ O. In most cases this resolves the issue: the 0-link in Bn (O) fibers over Bn−k (J), so the strengthened inductive hypothesis gives us the necessary connectivity. However there is a further problem in one case. If J = O (a case that one might have expected to be easier ), although the 0-link does map to Bn−k (O), it is not fibered in the same convenient way. To handle this, we are forced to introduce a weaker notion of “fibered relative to a core” (Def. 2.17); although this condition is quite technical, it seems to be necessary to push the induction through in this case. We point out that this step is one of the main reasons that in Thm E/E′ we have to prove that Bn (O) is Cohen–Macaulay, and not just highly connected (cf. Remark 2.22). Returning to the base case. Let us return to the discussion of the base case, which we set aside earlier. The key base case for us is n = 2, in which case Thm E′ states that the graph B2 (I) should be connected for any ideal I. The connectivity of this graph is directly related to the question of elementary generation for congruence subgroups of SL2 (O) relative to the ideal I (Prop. 2.7). Therefore we can use the work of Vaserstein–Liehl and Bass–Milnor-Serre on relative elementary generation to show that B2 (I) is indeed connected; our conditions on O come directly from the hypotheses of Vaserstein–Liehl and Bass–Milnor-Serre. We can now see why we deferred the base case until the end: if we had discussed it before introducing the complexes B2 (I) and Thm E′ , it would have seemed that the base case of Thm E needs only the connectivity of B2 (O). But the connectivity of B2 (O) only needs elementary generation for SL2 (O) itself, rather than for its congruence subgroups; the former is a much easier condition, and holds for a broader class of Dedekind domains. In particular, one could not see from this perspective where the restrictions on O in Thm E come from. The n = 2 base case also plays another completely separate role in our proof: it turns out to be key in the first part of the inductive step, letting us show that we really can reduce to the “good subcomplex” discussed above. This is also where we use the “SR2.5 ” condition mentioned in Remark 1.6. Structure of the proof. §2.2 summarizes elementary facts about Dedekind domains and Cohen–Macaulay complexes; experts can skip this section. In §2.3 we introduce the complexes Bn (I) and state Theorem E′ , which includes Theorem E as a special case. The remainder of §2 is occupied by the proof of Theorem E′ , by induction on n. In §2.4 we establish the base cases n ≤ 2. In §2.5 we define a subcomplex Bngd (I) ⊂ Bn (I) consisting of “good simplices” and prove that (Bn (I), Bngd (I)) is (n − 2)-connected. In §2.6 we prove that (Bngd (I), Bn (0)) is (n − 2)-connected. In §2.7 we prove that Bn (0) is (n − 2)-connected. In §2.8 we prove the connectivity of links, and assemble these pieces to prove Theorem E′ . 2.2 2.2.1 Dedekind domains and Cohen–Macaulay complexes Dedekind domains Let O be a Dedekind domain with field of fractions K. We recall some basic facts about O; for proofs see e.g. [Mi]. Projective modules. Every submodule of a projective O-module is projective. If M is a finitely generated projective O-module, the rank of M is defined by rk(M ) := dimK (M ⊗O K). The following standard lemma summarizes some properties of projective O-modules. 8 Lemma 2.2. Let O be a Dedekind domain with field of fractions K and let M be a finitely generated projective O-module of rank n ≥ 1. (a) A submodule U ⊂ M is a direct summand of M if and only if M/U is torsion-free. (b) If U and U ′ are summands of M and U ⊂ U ′ , then U is a summand of U ′ . (c) The assignment U 7→ U ⊗O K defines a bijection {Direct summands of M } ←→ {K-subspaces of M ⊗O K} with inverse V 7→ V ∩ M . The class group. The class group cl(O) is the set of isomorphism classes of rank 1 projective O-modules. The tensor product endows cl(O) with the structure of an abelian group, which we write additively; the identity element is given by the free module O. For every rank n projective O-module M there is a unique rank 1 projective O-module I ∈ cl(O) such that M ∼ = On−1 ⊕ I. We write [M ] = I ∈ cl(O) for this element. For two finite rank projective O-modules M and M ′ , we have the identity [M ⊕ M ′ ] = [M ] + [M ′ ]. Two such modules M and M ′ are isomorphic if and only if rk(M ) = rk(M ′ ) and [M ] = [M ′ ]. The complex of partial bases. A partial basis for On is a set {v1 , . . . , vk } of elements of On that can be completed to a basis {v1 , . . . , vk , vk+1 , . . . , vn } for On . As we mentioned in the introduction, the complex of partial bases Bn (O) is the simplicial complex whose (k − 1)simplices are partial bases {v1 , . . . , vk } for On . Steinitz proved in 1911 that when O is a Dedekind domain, a vector v = (a1 , . . . , an ) ∈ On lies in a basis for On if and only if v is unimodular, that is, the coordinates {a1 , . . . , an } generate the unit ideal of O; see [Re]. The vertices of Bn (O) are therefore the unimodular vectors in On . Lemma 2.3. Let O be a Dedekind domain. (a) A subset {v1 , . . . , vk } ⊂ On is a partial basis of On if and only if span(v1 , . . . , vk ) is a rank k direct summand of On . (b) Let M be a free summand of On . A subset {v1 , . . . , vk } ⊂ M is a partial basis of M if and only if {v1 , . . . , vk } is a partial basis of On . Proof. Set U = span(v1 , . . . , vk ). If {v1 , . . . , vk } is a partial basis for On then U is a rank k direct summand of On . We must prove the converse, so assume that U is a rank k direct summand of On . Since U is a rank k projective module generated by k elements, it must be free. Write On = U ⊕ W . Since [W ] = [On ] − [U ] = 0 − 0 = 0, we have W ∼ = On−k . Adjoining a basis for W then yields a basis for On , so {v1 , . . . , vk } is a partial basis and (a) follows. Part (b) follows from the characterization in part (a) together with Lemma 2.2(b). 2.2.2 Cohen–Macaulay complexes A space is (−1)-connected if and only if it is nonempty; every space is ℓ-connected for ℓ ≤ −2. A simplicial complex X is d-dimensional if it contains a d-simplex but no (d + 1)-simplices. It is d-spherical if it is d-dimensional and (d − 1)-connected. Finally, X is Cohen–Macaulay (CM) of dimension d if X is d-spherical and for every k-simplex σ k of X, the link LinkX (σ k ) is (d − k − 1)-spherical. Low dimensions. A simplicial complex X is CM of dimension 0 if X is 0-dimensional. X is CM of dimension 1 if X is 1-dimensional and connected. 9 Links are CM. If X is CM of dimension d, then LinkX (σ k ) is CM of dimension d − k − 1 for all σ k ∈ X (where the definition requires only (d − k − 1)-spherical); see [Q, Proposition 8.6]. A sufficient condition to be CM. If a d-dimensional simplicial complex X has the property that every simplex is contained in a d-simplex, then LinkX (σ k ) is (d − k − 1)-dimensional for all σ k ∈ X. Therefore, to prove that X is CM of dimension d, it suffices to show that X is (d − 1)-connected, and that for every k-simplex σ k ∈ X the link LinkX (σ k ) is (d − k − 2)connected. 2.3 The complex Bn (I) of partial I-bases One of the key insights in our proof of Theorem E is that to induct on n, one must strengthen the inductive hypothesis by working with a more general family of complexes. Definition 2.4 (Partial I-basis). Fix a surjection L : On ։ O. Given an ideal I ⊂ O, a basis {v1 , . . . , vn } for On is called an I-basis if L(vi ) ≡ 0 mod I or L(vi ) ≡ 1 mod I for all 1 ≤ i ≤ n. A partial basis is called a partial I-basis if it can be completed to an I-basis. The complex of partial I-bases, denoted Bn (I), is the complex whose (k − 1)-simplices are partial I-bases {v1 , . . . , vk }. Remark 2.5. The definition of Bn (I) depends on the choice of L. However, if L′ : On ։ O is a different surjection, then both ker L and ker L′ are projective summands with rk(ker L) = rk(ker L′ ) = n − 1 and [ker L] = [ker L′ ] = [On ] − [O] = 0 ∈ cl(O). Therefore there exists an ∼ = → Bn (O) isomorphism Ψ : On → On such that L = L′ ◦Ψ. The resulting isomorphism Bn (O) − induces an isomorphism between the complexes Bn (I) defined with respect to L and L′ . Because of this, we will not concern ourselves with the choice of L except when it is necessary to clarify our proofs. We record some observations regarding I-bases and partial I-bases. (a) When I = O, the condition of Definition 2.4 is vacuous, so Bn (I) = Bn (O). (b) If I ⊂ J then any I-basis is a J-basis by definition. Therefore any partial I-basis is a partial J-basis, so Bn (I) is a subcomplex of Bn (J). In particular, Bn (I) is a subcomplex of Bn (O). (c) We allow the case I = (0), in which case we simplify notation by writing Bn (0) for Bn (I). The subcomplex Bn (0) is contained in Bn (I) for any ideal I since (0) ⊂ I. We will see in the proof of Proposition 2.15 below that Bn (0) is the full subcomplex of Bn (O) on the unimodular vectors v ∈ On which satisfy L(v) = 0 or L(v) = 1. (d) A partial basis {v1 , . . . , vk } may not be a partial I-basis even if L(vi ) is congruent to 0 or 1 modulo I for all 1 ≤ i ≤ k. For example, let O = Z, let I = 5Z, and take L : Z2 ։ Z to be L(b, c) = c. The vector v := (2, 5) ∈ Z2 determines a partial basis {v} since {(2, 5), (1, 3)} is a basis for Z2 . However, although L(v) = 5 ≡ 0 mod I, the partial basis {v} is not a partial I-basis. Indeed, any basis {(2, 5), (b, c)} must have 2c − 5b = ±1, which implies that c ≡ 2 or 3 mod 5Z. Therefore v is not contained in any I-basis for Z2 , so {v} is not a vertex of B2 (I). (e) A consequence of the previous paragraph is that for n ≥ 3 the complex of partial Ibases Bn (I) is not a full subcomplex of Bn (O) in general. With O = Z and I = 5Z 10 as before, take L : Z3 ։ Z to be L(a, b, c) = c. Using the additional room in Z3 , the vector v := (0, 2, 5) can be extended to an I-basis such as {(0, 2, 5), (3, 1, 0), (−1, 0, 1)}. The same is true of the vector w := (1, 2, 5) so both v and w belong to B3 (I). Since {v, w, (0, 1, 3)} is a basis, the vertices v and w determine an edge of B3 (O). But they do not form a partial I-basis, because as before any basis {(0, 2, 5), (1, 2, 5), (a, b, c)} must have 2c − 5b = ±1. Thus this edge of B3 (O) is absent from B3 (I), even though its endpoints do belong to B3 (I). (f) In the previous two remarks, one might be concerned that Z does not satisfy the hy1 ], potheses of Theorem E. But in both remarks we can obtain an example in O = Z[ 19 which does satisfy the hypotheses of Theorem E, by taking the same vectors; the nec1 essary property is simply that 2 ∈ / O× + 5O, which still holds when O = Z[ 19 ]. Our main result concerning the complexes Bn (I) is as follows. Theorem E′ . Let OS be a Dedekind domain of arithmetic type. Assume that |S| > 1 and S contains a non-imaginary place. Then Bn (I) is CM of dimension n − 1 for any ideal I ⊂ OS . Theorem E is the special case I = OS of Theorem E′ . 2.4 Step 1: Base case, n ≤ 2 Our inductive proof of Theorem E′ has two base cases. The first is easy. Proposition 2.6. For any Dedekind domain O and any ideal I ⊂ O, the complex B1 (I) is CM of dimension 0. Proof. A surjection L : O1 ։ O must be an isomorphism, so there exists a unique v ∈ O1 with L(v) = 1. Since {v} is an I-basis of O1 for any I, the complex B1 (I) contains the 0-simplex {v}, and thus is 0-dimensional as desired. The second base case is more involved. It is the key place where the arithmetic hypotheses on OS enter into the proof of Theorem E′ . Proposition 2.7. Let O = OS be a Dedekind domain of arithmetic type. Assume that |S| > 1 and that S does not consist solely of imaginary places. Then for any ideal I ⊂ O, the complex B2 (I) is CM of dimension 1. Remark 2.8. Our proof of Proposition 2.7 could be shortened slightly if we were only interested in Proposition 2.7; we go a bit further here to simplify the proof of Theorem 2.1 afterwards. Proof of Proposition 2.7. The complex B2 (I) is 1-dimensional, so it is enough to show that B2 (I) is connected. Since L is surjective we can fix a basis {e1 , e2 } for O2 such that L(e1 ) = 0 and L(e2 ) = 1. This is an I-basis, so it defines an edge e = {e1 , e2 } of B2 (I). Let Γ1 (O, I) be the group   a b a b ≡ ( ∗ ∗ ) mod I . Γ1 (O, I) := 01 c d c d ∈ SL2 O Letting SL2 O act on O2 via the basis {e1 , e2 }, the subgroup Γ1 (O, I) consists of the autoL morphisms preserving the composition O2 → O ։ O/I. In particular, the Γ1 (O, I)-orbit of e consists of I-bases and thus is contained in B2 (I). Let Z ⊂ B2 (I) be the subgraph determined by this orbit. 11 If I 6= O then the action of Γ1 (O, I) on Z is without inversions. Indeed, in this case vertices with L(v) ≡ 0 mod I cannot be exchanged with those with L(v) ≡ 1 mod I. The edge e is a fundamental domain for the action of Γ1 (O, I) on Z. The Γ1 (O, I)-stabilizers of e1 and e2 are exactly the elementary matrices that lie in Γ1 (O, I), so by a standard argument in geometric group theory (see, e.g., [Se, Lemma I.4.1.2]) the complex Z is connected if and only if the group Γ1 (O, I) is generated by elementary matrices. This argument does not apply verbatim when I = O, but it is easy to verify nevertheless that Z is connected if and only if SL2 O is generated by elementary matrices. Vaserstein (see the Main Theorem of [Va], and Liehl [L] for a correction) proved that if O = OS is a Dedekind domain of arithmetic type with |S| > 1, then for any ideal I ⊂ O the subgroup E of Γ1 (O, I) generated by elementary matrices is normal, and the quotient Γ1 (O, I)/E is isomorphic to the relative K-group SK1 (O, I). We remark that Vaserstein’s result does not apply to I = (0), but in this case Γ1 (O, I) consists solely of elementary matrices. In their resolution of the Congruence Subgroup Problem, Bass–Milnor–Serre [BMS, Theorem 3.6] proved that if O is a Dedekind domain of arithmetic type that is not totally imaginary, then SK1 (O, I) = 0 for all ideals I ⊂ O. Our assumptions guarantee that both of these results apply, so Γ1 (O, I) is generated by elementary matrices and Z is connected. It is thus enough to show that the pair (B2 (I), Z) is 0-connected, i.e. that every vertex v ∈ B2 (I) can be connected by a path to a vertex in Z. By definition, any vertex v ∈ B2 (I) is contained in an I-basis {v, w} for O2 . We first show that if L(v) ≡ 1 mod I then v lies in Z. By possibly replacing w by w − v, we can assume that L(w) ≡ 0 mod I. There exists a unique g ∈ GL2 O such that g · e1 = w and g · e2 = v. Let u = (det g)−1 w. The element γ satisfying γ · e1 = u and γ · e2 = v lies in SL2 O. Since L(u) ≡ 0 mod I and L(v) ≡ 1 mod I, we see that γ ∈ Γ1 (O, I). Therefore v lies in the Γ1 (O, I)-orbit of e2 and v ∈ Z. If instead L(v) 6≡ 1 mod I, then since {v, w} is an I-basis we must have L(w) ≡ 1 mod I, so w lies in Z. We conclude that every vertex of B2 (I) is connected to Z by a path of length at most 1, as desired. Before moving on to Step 2, we take a moment to prove Theorem 2.1. Proof of Theorem 2.1. We first prove the theorem in the case n = 2. We can break the hypotheses of Theorem 2.1 into the following three cases, and Cohn proved in each that GL2 OS is not generated by elementary matrices together with diagonal matrices: for the quadratic imaginary case see [C, Theorem 6.1], for the function field case with |cl(OS )| = 6 1 see [C, Corollary 5.6], and for the function field case with deg f ≥ 2 see [C, Theorem 6.2]. Thus certainly SL2 OS cannot be generated by elementary matrices. We saw in the proof of Proposition 2.7 that the 1-dimensional complex B2 (OS ) is connected if and only if SL2 OS is generated by elementary matrices. Therefore B2 (OS ) is disconnected and not Cohen– Macaulay. Now assume that n ≥ 3. Choose a basis {e1 , . . . , en } for On ; let σ n−3 = {e1 , . . . , en−2 } and W = hen−1 , en i. Let BW (OS ) denote the complex of partial bases of W ; since W ∼ = OS2 there is an isomorphism BW (OS ) ∼ = B2 (OS ). By the previous paragraph, BW (OS ) is disconnected. Consider the subcomplex L := LinkBn (OS ) (σ n−3 ). If Bn (OS ) were CM of dimension n − 1 then L would be (n − 1) − (n − 3) − 1 = 1-spherical and therefore connected. Since {w1 , w2 } is a basis of W if and only if {e1 , . . . , en−2 , w1 , w2 } is a basis of On , there is a natural inclusion i : BW (OS ) ֒→ L. Let π : On ։ W be the projection with kernel he1 , . . . , en−2 i. Since {e1 , . . . , en−2 , v1 , v2 } is a basis of On if and only if {π(v1 ), π(v2 )} is a basis of W , the projection π induces a simplicial map π : L → BW (OS ). By definition i : BW (OS ) ֒→ L is a 12 section of this projection, so π : L → BW (OS ) is surjective. Since BW (OS ) is disconnected, this shows that L = LinkBn (OS ) (σ n−3 ) is disconnected, so the (n − 1)-dimensional complex Bn (OS ) is not Cohen–Macaulay. Remark 2.9. Other examples can be deduced from Geller [G]; for example Bn (Of ) is not Cohen–Macaulay for Of ∼ = F2 [X, Y ]/(X 2 + XY + Y 2 + X), which occurs as Of ⊂ F2 (T ) for 2 f = T + T + 1. In contrast, Vaserstein [Va] proved that when |S| ≥ 2 the group SL2 OS is generated by elementary matrices, so in that case B2 (OS ) is indeed connected. 2.5 Step 2: (Bn (I), Bngd (I)) is (n − 2)-connected We begin by defining certain bases to be “good bases”. Definition 2.10. We say that a basis {v1 , . . . , vn } for On is good if L(vi ) = 1 for at least one 1 ≤ i ≤ n. We say that {v1 , . . . , vk } is a partial good I-basis if it is contained in a good I-basis. We denote by Bngd (I) the complex of partial good I-bases. The following proposition is the main result of this section. Proposition 2.11. Let O be a Dedekind domain and let I ⊂ O an ideal. Assume that B2 (I) is CM of dimension 1. Then for any n ≥ 3 the pair (Bn (I), Bngd (I)) is (n − 2)-connected. 2.5.1 The link of an (n − 2)-simplex We need a few preliminary results before starting the proof of Proposition 2.11. The first ingredient in the proof of Proposition 2.11 is the following lemma. Definition 2.12. Given a simplex σ = {v1 , . . . , vk } of Bn (O), define Vσ to be the direct summand of On with basis {v1 , . . . , vk }, and define Iσ to be the ideal L(Vσ ) ⊂ O. Lemma 2.13. Let n ≥ 3. Consider an (n − 2)-simplex σ n−2 ∈ Bn (I), and let v be a vertex of σ with L(v) 6= 0. If Iσ 6⊂ I, assume additionally that L(v) ≡ 1 mod I. Then there exists a vertex w of LinkBn (I) (σ) such that I{v,w} = O. Proof. Since σ n−2 ∈ Bn (I) is a partial I-basis, there exists some z ∈ On such that σ ∪ {z} is an I-basis. Let b1 = L(v) and b2 = L(z); by hypothesis b1 6= 0. Write σ n−2 = {v, v3 , . . . , vn } and let bi = L(vi ) for 3 ≤ i ≤ n. Since σ ∪ {z} is a basis for On , the set {b1 , . . . , bn } ⊂ O generates the unit ideal. Since n ≥ 3 and b1 6= 0 and {b1 , . . . , bn } generates the unit ideal, we can apply a theorem of Reiner [Re] to conclude that there exists c3 , . . . , cn ∈ O such that the two elements b1 and ξ := b2 + c3 b3 + c4 b4 + · · · + cn bn generate the unit ideal (this theorem of Reiner is a strengthening for Dedekind domains of Bass’s stable range condition SR3 ). Set y = z + c3 v3 + · · · cn vn . The ideal I{v,y} is generated by L(v) = b1 and L(y) = ξ, so by construction I{v,y} = O. Since σ ∪ {z} is a basis for On , so is σ ∪ {y}. If Iσ ⊂ I then L(v3 ) ≡ · · · ≡ L(vn ) ≡ 0 mod I, so L(y) ≡ L(z) mod I. Since z ∈ Bn (I), we know that L(z) is congruent to 0 or 1 modulo I. Therefore when Iσ ⊂ I, the basis σ ∪ {y} is an I-basis. We conclude that w := y ∈ LinkBn (I) (σ) satisfies the conditions of the lemma. When Iσ 6⊂ I, the basis σ∪{y} may not be an I-basis since L(y) = ξ may not be congruent to 0 or 1 modulo I. In this case, by hypothesis L(v) ≡ 1 mod I, so the vector w := y − ξv satisfies L(w) = L(y) − ξ · L(v) ≡ ξ − ξ = 0 mod I. Therefore the basis σ ∪ {w} is an I-basis, so w ∈ LinkBn (I) (σ). Since I{v,w} = (L(v), L(w)) = (L(v), L(y) − ξ · L(v)) = (L(v), L(y)) = (b1 , ξ) = O, the vector w satisfies the conditions of the lemma. 13 2.5.2 Characterizing good partial bases The second ingredient in the proof of Proposition 2.11 is the following characterization of good partial bases. Proposition 2.14. Let σ k = {v1 , . . . , vk+1 } be a k-simplex of Bn (O) with k < n − 1. (1) Assume that L(vi ) ≡ 0 or 1 mod I for i = 1, . . . , k + 1. Then the following are equivalent. (i) {v1 , . . . , vk+1 } is contained in a good basis. (ii) {v1 , . . . , vk+1 } is contained in a good I-basis {v1 , . . . , vn } s.t. L(vi ) = 1 for i ≥ k+2. (iii) There exists a complement W such that On = Vσ ⊕ W and L(W ) = O. (2) If Iσ = (0) or Iσ = O or k < n − 2, then σ is contained in a good basis. Before proving Proposition 2.14, we introduce some terminology. We say that σ is a good simplex if the three conditions of Proposition 2.14(1) are satisfied, and call the subspace W of condition (iii) a good complement for σ. In this case we denote by BW (I) the complex of partial I-bases for W , whose simplices are subsets of W that can be extended to an I-basis for W (with respect to L). Since [W ] = [On ] − [Vσ ] = 0, any good complement is a free O-module, and L|W : W ։ O is surjective by definition. Thus by Remark 2.5, there exists an isomorphism BW (I) ∼ = Bℓ (I), where ℓ = rk(W ). Proof of Proposition 2.14. To prove the first part of the proposition we will show that (i) =⇒ (ii) =⇒ (iii) =⇒ (i). Assume (i), so σ = {v1 , . . . , vk+1 } is contained in a good basis {v1 , . . . , vk+1 , uk+2 , . . . , un }. By definition, some vector v lying in this good basis satisfies L(v) = 1. Define vi = ui + (1 − L(ui ))v for k + 2 ≤ i ≤ n. The set {v1 , . . . , vn } is then a basis satisfying L(vi ) = 1 for k + 2 ≤ i ≤ n. Since k + 1 < n, this is a good basis, and since L(vi ) ≡ 0 or 1 mod I for 1 ≤ i ≤ k + 1 by assumption, it is also an I-basis. Therefore (i) =⇒ (ii). Assume (ii), and define W = hvk+2 , . . . , vn i. We certainly have On = Vσ ⊕ W , and since L(vn ) = 1 we have L(W ) = O. Therefore (ii) =⇒ (iii). Finally, assume (iii), and choose any w ∈ W with L(w) = 1. We then have a splitting W = hwi ⊕ ker L|W . The submodule ker L|W is free since [ker L|W ] = [W ] − [O] = 0, so we can choose a basis {uk+3 , . . . , un } for ker L|W . Then {v1 , . . . , vk+1 , w, uk+3 , . . . , un } is a good basis containing σ. Therefore (iii) =⇒ (i). We now prove the second part of the proposition. By Lemma 2.3(a), Vσ has a complement U ⊂ On such that On = Vσ ⊕ U . In particular O = L(On ) = L(Vσ ) + L(U ) = Iσ + L(U ). If Iσ = (0), this implies that L(U ) = O, so U is a good complement for σ. Otherwise, choose a basis {uk+2 , . . . , un } for U . If Iσ = O, there exists v ∈ Vσ with L(v) = 1. Then W := huk+2 + (1 − L(uk+2 ))v, uk+3 , . . . , un i is a good complement for σ. It remains to handle the case when (0) 6= Iσ 6= O and k < n − 2, so rk(U ) ≥ 2. Since Iσ 6= O we cannot have L(ui ) = 0 for all k + 2 ≤ i ≤ n, so assume without loss of generality that L(un ) 6= 0. Consider the (n − 2)-simplex σ n−2 := {v1 , . . . , vk+1 , uk+3 , . . . , un } ∈ Bn (O). Applying Lemma 2.13 with I = O gives a vertex w in LinkBn (O) (σ) such that I{w,un } = O and {v1 , . . . , vk+1 , w, uk+3 , . . . , un } is a basis for On . It follows that W := hw, uk+3 , . . . , un i is a good complement for σ. 14 2.5.3 Completing the proof of Step 2 The pieces are now in place for the proof of Proposition 2.11. Proof of Proposition 2.11. Given a k-simplex σ k ∈ Bn (I) with k ≤ n − 3, Proposition 2.14(2) implies that σ is contained in Bngd (I). In other words, Bngd (I) contains the (n − 3)-skeleton of Bn (I). Thus (Bn (I), Bngd (I)) is (n − 3)-connected, and every (n − 2)-simplex σ n−2 ∈ Bn (I) has ∂σ n−2 ⊂ Bngd (I). To prove that (Bn (I), Bngd (I)) is (n − 2)-connected, it suffices to show that every (n − 2)-simplex of Bn (I) that does not lie in Bngd (I) is homotopic relative to its boundary into Bngd (I). Let σ n−2 be an (n−2)-simplex of Bn (I) that does not lie in Bngd (I). By Proposition 2.14(2), we must have (0) ( Iσ ( O. Choose a vertex v of σ with L(v) 6= 0; if Iσ 6⊂ I then choose v such that L(v) 6≡ 0 mod I. Using Lemma 2.13, choose a vertex w of Bn (I) such that σ n−2 ∪ {w} ∈ Bn (I) and I{v,w} = O. Write σ n−2 = σ0 ∪ {v}, let V = Vσ0 and let W = hv, wi. The 1-dimensional complex BW (I), whose edges consist of I-bases for W , is contained in LinkBn (I) (σ0 ). As we discussed following Proposition 2.14, identifying W with O2 induces an isomorphism BW (I) ∼ = B2 (I). We have assumed that B2 (I) is connected, so BW (I) is connected. Fix a vertex y of BW (I) such that L(y) = 1, and let P be an embedded path in BW (I) from v to y. Let v = p1 , . . . , pm = y be an enumeration of the vertices of P . For 1 ≤ i < m, the set {pi , pi+1 } is a basis for W , so (L(pi ), L(pi+1 )) = L(W ) = O. Regarding P as a triangulated closed interval that is mapped into LinkBn (I) (σ0 ), we obtain an embedding of the join σ0 ∗ P into Bn (I). Its boundary is ∂(σ0 ∗ P ) = (∂σ0 ∗ P ) ∪ (σ0 ∗ ∂P ) . Since ∂P = {v} ⊔ {y}, the second term σ0 ∗ ∂P consists of σ0 ∗ {v} = σ and σ0 ∗ {y}. Since L(y) = 1, σ0 ∗ {y} is a partial good I-basis by Proposition 2.14(2), so σ0 ∗ {y} ∈ Bngd (I). The first term ∂σ0 ∗ P can be written as G ∂σ0 ∗ P = ∂σ0 ∗ {pi , pi+1 }. i Since I{pi ,pi+1} = O, every (n − 2)-simplex τ occurring in the join ∂σ0 ∗ {pi , pi+1 } has Iτ = O, and thus lies in Bngd (I) by Proposition 2.14(2). We conclude that σ is the unique face of σ0 ∗ P that is not contained in Bngd (I). The subdivided (n − 1)-simplex σ0 ∗ P thus provides the desired homotopy of σ into Bngd (I). 2.6 Step 3: (Bngd (I), Bn (0)) is (n − 2)-connected Since every vertex v ∈ Bn (0) has L(v) = 0 or L(v) = 1, every simplex σ ∈ Bn (0) has Iσ = (0) or Iσ = O. By Proposition 2.14(2), every such simplex is good, so Bn (0) is contained in Bngd (I). The main result of this section is the following proposition. Proposition 2.15. Let O be a Dedekind domain, and fix n ≥ 3. Assume that for all 1 ≤ m < n and all ideals I ⊂ O, the complex Bm (I) is CM of dimension m − 1. Then for any ideal I ⊂ O, the pair (Bngd (I), Bn (0)) is (n − 2)-connected. Before proving Proposition 2.15 we establish three results that will be necessary in the proof. 15 2.6.1 Pushing into a subcomplex The first ingredient is the following lemma on the connectivity of a pair. Lemma 2.16. Let A be a full subcomplex of a simplicial complex X, and fix m ≥ 0. Assume that for every k-simplex σ k ∈ X which is disjoint from A, the intersection LinkX (σ k ) ∩ A is (m − k − 1)-connected. Then the pair (X, A) is m-connected. The proof of Lemma 2.16 will use the language of posets. Recall that a poset P is said to be d-connected if its geometric realization |P | is d-connected. Similarly, the homology H∗ (P ; Z) is defined to be H∗ (|P | ; Z). Of course, a simplicial complex X can be regarded as a poset P(X) whose elements are the simplices of X under inclusion. The canonical homeomorphism X ∼ = |P(X)| shows that P(X) is d-connected if and only if X is, and there is a canonical isomorphism H∗ (X; Z) ∼ = H∗ (P(X); Z). Proof of Lemma 2.16. We can replace X by its (m + 1)-skeleton without affecting the truth of the conclusion, so we can assume that X is finite-dimensional. Let A be the full complex on the set of vertices A(0) ⊂ X (0) , so P(A) = {τ ∈ P(X) | τ ⊂ A(0) }. Define B := X (0) \ A(0) . A simplex σ ∈ P(X) is disjoint from A if σ ∩ A(0) = ∅, i.e. if σ ⊂ B; in this case, LinkX (σ)∩ A is {η ∈ A | σ ∪ η ∈ P(X)}. We will use PL Morse theory as described in [Be]. Consider the PL Morse function f : P(X) → N × −N defined by  f (σ) = |σ ∩ B|, −|σ ∩ A(0) | , with the lexicographic order on N × −N. If σ ( σ ′ , then we must have |σ ∩ B| < |σ ′ ∩ B| or σ ∩ A(0) < σ ′ ∩ A(0) , so f (σ) 6= f (σ ′ ). This verifies that f has no “horizontal edges”. Our assumption that X is finite-dimensional implies that the image of f is finite. Note that f −1 ({0} × −N) = {σ ∈ X | |σ ∩ B| = 0} = P(A). For any σ ∈ P(X), define the downward link to be Link↓ (σ) := {τ ∈ P(X) | f (τ ) < f (σ) and either τ ( σ or τ ) σ}. The fundamental theorem of PL Morse theory states that if Link↓ (σ) is (m−1)-connected for all σ ∈ f −1 (N>0 × −N), then (X, A) is m-connected. We wish to verify this condition, so consider σ ∈ f −1 (N>0 × −N). We can uniquely write σ as the disjoint union of σB := σ ∩ B and σA := σ ∩ A(0) , where |σB | > 0 by assumption. Define subposets of P(X) by T := {τ ∈ P(X) | τ ( σ, |τ ∩ B| < |σ ∩ B|}, R := {ρ ∈ P(X) | ρ ) σ, |ρ ∩ B| = |σ ∩ B|, |ρ ∩ A(0) | > |σ ∩ A(0) |}. The downward link Link↓ (σ) is the sub-poset T ∪ R of P(X); since every τ ∈ T and every ρ ∈ R satisfy τ ( ρ, in fact the downward link is the join T ∗ R. Now, either σA 6= ∅ or σA = ∅. In the first case, the poset T is contractible via the homotopy that takes τ to τ ∪ σA and then to σA . We conclude that in this case Link↓ (σ) = T ∗ R is contractible, and in particular is (m − 1)-connected. So suppose that σA = ∅. In other words, σ is disjoint from A. In this case, T is the poset of proper nonempty subsets of the (k + 1)-element set σ k , so T ∼ = P(∂∆k ) ≃ S k−1 ; in particular, T is (k − 1)-connected. The poset R consists of ρ ∈ P(X) that can be written as ρ = σ ∪ η for some nonempty η ∈ P(A). The assignment σ ∪ η 7→ η gives an isomorphism of R with P(LinkX (σ) ∩ A). Our assumption guarantees that R is (m − k − 1)-connected, so Link↓ (σ) = T ∗ R is (m − 1)-connected, as desired. 16 2.6.2 Topology of nicely fibered complexes The second ingredient we will need concerns the topology of simplicial complexes that are “fibered” over a CM complex in the following sense. Definition 2.17. Let F : X → Y be a simplicial map between simplicial complexes. Let C ⊂ X (0) be a subset of the vertices of X with F (C) = Y (0) . We say that X is fibered over Y by F with core C if the following condition holds: a subset U = {x0 , . . . , xk } ⊂ X (0) forms a k-simplex of X if and only if (1) F (U ) = {F (x0 ), . . . , F (xk )} is a k-simplex of Y , and (2) if F (U ) is a maximal simplex of Y , then U ∩ C 6= ∅. If C = X (0) , we say X is fully fibered over Y by F ; in this case condition (2) is vacuous. The main result concerning fibered complexes is as follows. Lemma 2.18. Assume that X is fibered over Y by F : X → Y with core C ⊂ X (0) . If Y is CM of dimension d then X is CM of dimension d. To prove Lemma 2.18 we will make use of a theorem of Quillen that describes the topology of a poset map in terms of the topology of the fibers. Given a poset A, recall that the height ht(a) of an element a is the largest k for which there exists a chain a0 a1 ··· ak = a. When a k-simplex σ k ∈ X is regarded as an element of the poset P(X), it has height k. Given a map of posets F : A → B and element b ∈ B, the fiber F≤b is the subposet of A defined by F≤b := {a ∈ A | F (a) ≤ b}. A poset map F : A → B is strictly increasing if a < a′ implies F (a) < F (a′ ). Finally, a poset P is said to be CM of dimension d if its geometric realization |P | is CM of dimension d as a simplicial complex. A simplicial complex X is CM of dimension d if and only if P(X) is CM of dimension d (this is not automatic since being CM is not homeomorphism-invariant; nevertheless it follows from [Q, (8.5)]). Theorem 2.19 (Quillen [Q, Theorem 9.1, Corollary 9.7]). Let F : A → B be a strictly increasing map of posets. Assume that B is CM of dimension d and that for all b ∈ B, the fiber e d (A; Z) → H e d (B; Z) F≤b is CM of dimension ht(b). Then A is CM of dimension d and F∗ : H is surjective. We also record the following observation, which follows directly from Definition 2.17. Lemma 2.20. Let X be fibered over Y by F with core C, and consider a simplex σ ∈ X. • If σ ∩ C 6= ∅, then the link LinkX (σ) is fully fibered over LinkY (F (σ)) by F . • If σ ∩ C = ∅, then the link LinkX (σ) is fibered over LinkY (F (σ)) by F with core C ∩ LinkX (σ)(0) . Proof of Lemma 2.18. We prove the lemma by induction on d. The base case d = 0 is trivial, so assume that d > 0 and that the lemma is true for all smaller values of d. We must prove two things about X: that for every σ k ∈ X the link LinkX (σ k ) is CM of dimension d − k − 1, and that X itself is d-spherical. By condition (1), the k-simplex σ k ∈ X projects to a ksimplex F (σ k ) ∈ Y . By Lemma 2.20, the complex LinkX (σ k ) is fibered over LinkY (F (σ k )) by F (with some core). Since Y is CM of dimension d, the complex LinkY (F (σ k )) is CM of dimension d − k − 1. Applying the inductive hypothesis, we conclude that LinkX (σ k ) is CM of dimension d − k − 1, as desired. It remains to prove that X is d-spherical. We begin by proving the lemma in the special case when X is fibered over a single simplex Y = ∆d with vertices {y0 , . . . , yd }. Define Z to be 17 the complex with Z (0) = X (0) and where U ⊂ Z (0) forms a simplex if and only if U contains at most one element from each F −1 (yi ). The complex Z is the join of the 0-dimensional complexes F −1 (yi ). Since F (C) = Y (0) , each F −1 (yi ) is nonempty and thus 0-spherical. The join of an r-spherical and an s-spherical complex is (r + s + 1)-spherical [Q, Example 8.1], so the (d + 1)-fold join Z = F −1 (y0 ) ∗ · · · ∗ F −1 (yd ) is d-spherical. Observe that X ⊂ Z. Since Z is d-spherical, it is enough to prove that the pair (Z, X) is (d − 1)-connected. Since Y is itself a d-simplex, the only maximal simplex of Y is Y itself, and hence condition (2) applies only to d-simplices of X. Therefore X and Z coincide in dimensions up to d − 1 and Z is obtained from X by adding certain d-simplices σ d ∈ Z with σ d 6∈ X. It thus suffices to show for each such σ d that the boundary ∂σ d ⊂ X is null-homotopic in X. By condition (1), such a d-simplex can be written as σ d = {x0 , . . . , xd } with F (xi ) = yi for 0 ≤ i ≤ d, and by condition (2) we must have xi 6∈ C for all 0 ≤ i ≤ d. Since F (C) = Y (0) , for each 0 ≤ i ≤ d we can choose x′i ∈ C with F (x′i ) = yi . Consider the full subcomplex of Z on {x0 , x′0 , . . . , xd , x′d }. By construction, this is the (d + 1)-fold join of the 0-spheres {xi , x′i }, and thus is homeomorphic to a d-sphere. Every simplex of this d-sphere except σ contains some x′i , and thus lies in X. Therefore the full subcomplex of X on {x0 , x′0 , . . . , xd , x′d } is a subdivided d-disk D with ∂D = ∂σ d , as desired. This proves that X is d-spherical if it is fibered over a d-simplex with any core; combined with the first paragraph, X is CM of dimension d in this case. We now prove the lemma for a general CM complex Y of dimension d. By condition (1), the map F induces a height-preserving poset map F : P(X) → P(Y ); we will verify the conditions of Theorem 2.19 for F . Fix a simplex τ k ∈ P(Y ). Let T ≃ ∆k be the subcomplex of Y determined by τ k and let Te be the subcomplex of X consisting of σ ℓ ∈ X with F (σ ℓ ) ⊂ τ k . The fiber F≤τ k is the subposet of P(X) consisting of simplices of Te, so F≤τ k = P(Te). Since F is height-preserving, if k < d then no d-simplex is contained in Te, so condition (2) is vacuous; in this case Te is fully fibered over T ≃ ∆k by F . If τ d is a d-simplex, condition (2) is not vacuous, and in this case Te is fibered over T ≃ ∆d by F with core C ∩ Te(0) . In either case the base T is a single simplex, so the special case of the lemma implies that Te is CM of dimension ht(τ k ) = k, and thus so is F≤τ k = P(Te). Since P(Y ) is CM of dimension d by assumption, this verifies the hypotheses of Theorem 2.19 for the map F : P(X) → P(Y ). Theorem 2.19 implies that P(X) is CM of dimension d, so X is CM of dimension d as well. 2.6.3 A criterion for being fibered The final ingredient we need is the following condition to verify that a complex is fibered over another. Lemma 2.21. Let X and Y be d-dimensional simplicial complexes with the property that every simplex is contained in a d-simplex. Let F : X → Y be a simplicial map and C ⊂ X (0) be a subset such that the following two conditions hold. (i) A subset U = {x0 , . . . , xd } forms a d-simplex of X ⇐⇒ F (U ) is a d-simplex of Y and U ∩ C 6= ∅. (ii) For each d-simplex τ d ∈ Y there exists U ⊂ C with F (U ) = τ d . Then X is fibered over Y by F with core C. Proof. The maximal simplices of Y are precisely the d-simplices, so when |U | = d+1 condition (i) is equivalent to conditions (1) and (2) of Definition 2.17. Since every vertex of Y is 18 contained in a d-simplex, condition (ii) implies that F (C) = Y (0) . It remains to verify conditions (1) and (2) for subsets U ⊂ X (0) with |U | < d + 1. Every simplex τ k ∈ X is contained in a d-simplex σ d ∈ X. By condition (i), its image F (σ d ) is a d-simplex of Y , so F (τ k ) is a k-simplex of Y . Conversely, consider a subset U = {x0 , . . . , xk } with k < d such that F (U ) is a k-simplex of Y . Then F (U ) is contained in a d-simplex η d = F (U ) ∪ {yk+1 , . . . , yd } ∈ Y . Using the assumption that F (C) = Y (0) , choose lifts xi ∈ C with F (xi ) = yi for k + 1 ≤ i ≤ d. By construction, U ′ := {x0 , . . . , xd } has F (U ′ ) = η d and U ′ ∩ C 6= ∅, so by condition (i) U ′ is a d-simplex of X. It follows that U is a k-simplex of X, as desired. 2.6.4 Completing the proof of Step 3 We are now ready to prove Proposition 2.15. Proof of Proposition 2.15. We want to show that (Bngd (I), Bn (0)) is (n − 2)-connected. We will prove this by applying Lemma 2.16 with X = Bngd (I) and A = Bn (0) and m = n − 2. To apply Lemma 2.16 we need to verify the two hypotheses: first, that Bn (0) is a full subcomplex of Bngd (I), and second, that for any k-simplex σ k of Bngd (I) that is disjoint from Bn (0), the intersection Link0 (σ k ) := Bn (0) ∩ LinkBngd (I) (σ k ) is (n − k − 3)-connected. We begin by proving that Bn (0) is the full subcomplex of Bn (O) on the vertex set Bn (0)(0) := {v ∈ Bn (O) | L(v) = 0 or L(v) = 1} . Let σ = {v1 , . . . , vk } ∈ Bn (O) be a partial basis with vi ∈ Bn (0)(0) for 1 ≤ i ≤ k. We have either Iσ = O (if some vi has L(vi ) = 1) or Iσ = (0) (if all vi have L(vi ) = 0). By Proposition 2.14(2), σ is contained in a good basis. By Proposition 2.14(1)(ii) this implies that σ is contained in a good (0)-basis, so σ ∈ Bn (0). This proves that Bn (0) is a full subcomplex of Bn (O), and thus of Bngd (I), verifying the first hypothesis. For the second hypothesis, consider a k-simplex σ k ∈ Bngd (I) that is disjoint from Bn (0)(0) ; we will prove that Link0 (σ k ) is CM of dimension n − k − 2. Using Proposition 2.14(1)(iii), choose a good complement W . By definition, we have On = Vσ ⊕ W and L(W ) = O. Let π : On ։ W be the projection with kernel Vσ . We will prove the following claims, using the terminology of Definition 2.17. 1. If Iσ 6= O, then Link0 (σ) is fully fibered over BW (Iσ ) by π. 2. If Iσ = O, then Link0 (σ) is fibered over BW (O) by π with core C := {v ∈ Link0 (σ) | L(v) = 1} ⊂ Link0 (σ)(0) . The bulk of the argument does not depend on whether Iσ = O or not, so we begin without making any assumption on Iσ . By definition, every simplex of BW (Iσ ) is contained in an (n−k−2)-simplex, corresponding to an Iσ -basis of W . Similarly, if η ∈ Link0 (σ k ) then σ ∪ η ∈ Bngd (I) is a partial good Ibasis. By Proposition 2.14(1)(ii) we can enlarge this to a good I-basis σ ∪ τ with τ ∈ Bn (0). Therefore every simplex η ∈ Link0 (σ k ) is contained in an (n − k − 2)-simplex τ n−k−2 ∈ Link0 (σ k ). This means that in verifying the claim, we can work only with (n − k − 2)simplices, and appeal to Lemma 2.21 for the general case. A subset U = {uk+2 , . . . , un } ⊂ Bn (0)(0) forms an (n − k − 2)-simplex of Link0 (σ k ) if σ ∪ U = {v1 , . . . , vk+1 , uk+2 , . . . , un } is a good I-basis, or equivalently if σ ∪ U is a good basis. 19 Since σ is a basis of Vσ and W is a complement to Vσ , we know that σ ∪ U is a basis for On if and only if π(U ) is a basis for W . Moreover, any u ∈ Bn (0) has L(u) = 0 or L(u) = 1, which implies L(π(u)) ≡ 0 mod Iσ or L(π(u)) ≡ 1 mod Iσ . Therefore σ ∪ U is a basis for On if and only if π(U ) is an Iσ -basis for W . We now prove the two cases of the claim separately. First, assume that Iσ = O. Since σ is disjoint from Bn (0) by assumption, a basis σ ∪ U with U ⊂ Bn (0)(0) is good if and only if U ∩ C 6= 0. This means that U forms an (n − k − 2)-simplex of Link0 (σ) if and only if π(U ) is an (n − k − 2)-simplex of BW (O) and U ∩ C 6= 0, verifying condition (i) of Lemma 2.21. It remains to verify condition (ii) of Lemma 2.21. Given a basis τ = {wk+2 , . . . , wn } of W , choose for each i = k + 2, . . . , n some vi′ ∈ Vσ with L(vi′ ) = 1 − L(wi ), and define ui = wi + vi′ . By construction we have L(ui ) = 1 and π(ui ) = π(wi ) + π(vi′ ) = wi . Setting U = {uk+2 , . . . , un } we see that π(U ) is the basis τ of W , and therefore U ⊂ C. We can therefore apply Lemma 2.21 to conclude that Link0 (σ) is fibered over BW (Iσ ) by π with core C, verifying Claim 1. Second, assume that Iσ 6= O. In this case any basis σ ∪ U with U ⊂ Bn (0)(0) must be good, because if L(ui ) = 0 for all k + 2 ≤ i ≤ n we would have L(On ) = Iσ 6= O. Therefore σ ∪ U is a good basis if and only if π(U ) is an Iσ -basis of W . This verifies condition (i) of Lemma 2.21, so it remains to check condition (ii). Let τ = {wk+2 , . . . , wn } be an Iσ -basis of W . For i = k + 2, . . . , n, if L(wi ) ≡ 0 mod Iσ , choose vi′ ∈ Vσ with L(vi′ ) = −L(wi ); if L(wi ) ≡ 1 mod Iσ , choose vi′ ∈ Vσ with L(vi′ ) = 1 − L(wi ). In either case, define ui = wi + vi′ ; by construction, we have L(ui ) = 0 or L(ui ) = 1 and π(ui ) = π(wi ) + π(vi′ ) = wi . Setting U = {uk+2 , . . . , un } we see that π(U ) is the Iσ -basis τ of W ; therefore U ⊂ Link0 (σ). We again apply Lemma 2.21 to conclude that Link0 (σ) is fully fibered over BW (Iσ ) by π, verifying Claim 2. Now that Claims 1 and 2 established, we finish the proof of the proposition. Since W ∼ = On−k−1 , Remark 2.5 yields an isomorphism BW (Iσ ) ∼ = Bn−k−1 (Iσ ). Our hypothesis guarantees that Bn−k−1 (Iσ ) is CM of dimension n − k − 2, so the same is true of BW (Iσ ). We established in Claims 1 and 2 above that Link0 (σ) is fibered over BW (Iσ ) by π (either with core C or with core Link0 (σ)(0) ). Lemma 2.18 thus implies that Link0 (σ) is CM of dimension n − k − 2; in particular Link0 (σ) is (n − k − 3)-connected. This verifies the hypothesis of Lemma 2.16 for the pair (Bngd (I), Bn (0)) with m = n − 2; we conclude that (Bngd (I), Bn (0)) is (n − 2)-connected, as desired. Remark 2.22. Many of the ingredients of the proof that Link0 (σ k ) is (n − k − 3)-connected were introduced only for this step; this step thereby accounts for much of the complexity of our proof of Theorem E. • Even if we had only been interested in Bn (O), we were forced in the proof of Proposition 2.15 to consider the complex Bn−k−1 (Iσ ). This is the entire reason that we introduced the complexes Bn (I) relative to nontrivial ideals of O. • In the proof of Proposition 2.15 we needed the assumption that Bm (Iσ ) was CM of dimension m−1 for m < n. This is the reason that we are forced to prove in Theorem E′ that Bn (I) is Cohen–Macaulay of dimension n − 1, rather than simply that Bn (I) is (n − 1)-spherical. This weaker statement would not suffice as an inductive hypothesis; Lemma 2.18 is not true if one only assumes that Y is d-spherical. • In the case Iσ = O above, we applied Lemma 2.18 in a case where the core C only contained some of the vertices of the domain. This is the reason that we introduced the notion of “fibered with core C”; we will apply Lemma 2.18 in Step 4 and in the proof of Theorem E as well, but only in the fully fibered case. 20 2.7 Step 4: Bn (0) is (n − 2)-connected The main result of this section is the following proposition. Proposition 2.23. Let O be a Dedekind domain, and assume that Bn−1 (O) is CM of dimension n − 2. Then Bn (0) is (n − 2)-connected. Proof. Define Zn to be the full subcomplex of Bn (0) spanned by those vertices v of Bn (0) with L(v) = 0. The complex Zn consists of partial bases contained in the summand ker L ∼ = On−1 . In fact, by Lemma 2.3(b) these are precisely the partial bases of the summand ker L, so we have an isomorphism Zn ∼ = Bn−1 (O). Therefore our assumption guarantees that Zn is CM of dimension n − 2. Consider a k-simplex σ k = {v0 , v1 , . . . , vk } ∈ Bn (0) disjoint from Zn , i.e. with L(v0 ) = · · · = L(vk ) = 1. Let η k−1 = {v1 − v0 , . . . , vk − v0 } and τ k = {v0 } ∪ η ∈ Bn (0). Since Vσ = Vτ , the links LinkBn (0) (σ k ) and LinkBn (0) (τ k ) coincide. Furthermore, given ν n−k−2 ∈ Zn the set {v0 } ∪ η ∪ ν is a basis for On if and only if η ∪ ν is a basis for ker L. In other words, LinkBn (0) (τ k ) ∩ Zn = LinkZn (η k−1 ). Since Zn is CM of dimension n − 2, we know that LinkZn (η k−1 ) is CM of dimension (n − 2) − (k − 1) − 1 = n − k − 2, and is thus (n − k − 3)-connected. We now apply Lemma 2.16 with X = Bn (0) and A = Zn and m = n − 2; the conclusion is that (Bn (0), Zn ) is (n − 2)-connected. Fix a vector v ∈ On with L(v) = 1. Since {u2 , . . . , un } ⊂ ker L is a basis for ker L if and only if {v, u2 , . . . , un } is a basis for On , every simplex of Zn is contained in LinkBn (0) (v). We conclude that the image of Zn ֒→ Bn (0) can be contracted to v. Together with the fact that (Bn (0), Zn ) is (n − 2)-connected, this implies that Bn (0) is (n − 2)-connected, as desired. 2.8 Assembling the proof: Bn (I) is CM of dimension n − 1 We are finally ready to combine the steps of the previous sections and prove Theorem E′ . Proof of Theorem E′ . We prove by induction on n that Bn (I) is CM of dimension n − 1 for all ideals I ⊂ O. The base cases are n = 1 and n = 2. Proposition 2.6, which holds for any Dedekind domain O, states that B1 (I) is CM of dimension 0. Proposition 2.7 states that under precisely our hypotheses, B2 (I) is CM of dimension 1. Now fix n ≥ 3 and an ideal I ⊂ O, and assume that Bm (J) is CM of dimension m−1 for all m < n and all J ⊂ O. Under these assumptions, Proposition 2.11 states that (Bn (I), Bngd (I)) is (n − 2)-connected; Proposition 2.15 states that (Bngd (I), Bn (0)) is (n − 2)-connected; and Proposition 2.23 states that Bn (0) itself is (n − 2)-connected. Together these imply that the (n − 1)-dimensional complex Bn (I) is (n − 2)-connected, and thus (n − 1)-spherical. It remains to prove that for every k-simplex σ k ∈ Bn (I), the space LinkBn (I) (σ k ) is CM of dimension n − k − 2. If k = n − 1 this is vacuous. If k = n − 2, we must prove that LinkBn (I) (σ k ) is nonempty. But the partial I-basis σ n−2 is by definition contained in an I-basis σ n−2 ∪ {v}, so LinkBn (I) (σ k ) contains the 0-simplex {v}. Now assume that k < n − 2. By Lemma 2.14(1), σ has a good complement W . Let π : On ։ W be the projection with kernel Vσ . We will prove that LinkBn (I) (σ) is fully fibered over BW (I + Iσ ) by π using Lemma 2.21. By definition, every simplex of LinkBn (I) (σ) or BW (I + Iσ ) is contained in an (n − k − 2)simplex. Given a subset U = {uk+2 , . . . , un } with L(ui ) ≡ 0 or 1 mod I for each i = k + 2, . . . , n, the set σ ∪ U is a basis of On if and only if π(U ) is a basis of W . Moreover 21 L(π(u)) ≡ L(u) mod Iσ , so in this case π(U ) is an (I + Iσ )-basis of W . Therefore such a subset U is an (n − k − 2)-simplex of LinkBn (I) (σ) if and only if π(U ) is an (n − k − 2)-simplex of BW (I + Iσ ), verifying condition (i) of Lemma 2.21. It remains to check condition (ii) of Lemma 2.21, so consider an (I + Iσ )-basis τ = {wk+2 , . . . , wn } of W . For each i we have L(wi ) ≡ 0 or 1 mod I + Iσ , so there exists vi ∈ Vσ such that L(wi + vi ) ≡ 0 or 1 mod I. The set U := {wk+2 + vk+2 , . . . , wn + vn } projects under π to τ , so it is an (n − k − 2)-simplex of LinkBn (I) (σ). Lemma 2.21 now implies that LinkBn (I) (σ) is fully fibered over BW (I + Iσ ) by π. Since W ∼ = On−k−1 , the complex BW (I + Iσ ) is isomorphic to Bn−k−1 (I + Iσ ), which we have assumed by induction is CM of dimension n − k − 2. Applying Lemma 2.18 shows that LinkBn (I) (σ k ) is CM of dimension n − k − 2, as desired. We have proved that Bn (I) is (n − 1)-spherical and that LinkBn (I) (σ k ) is CM of dimension n − k − 2 for every σ k ∈ Bn (I), so Bn (I) is CM of dimension n − 1. Since the ideal I was arbitrary, this concludes the inductive step, and thus concludes the proof of Theorem E′ . 3 Integral apartments In this section we use Theorem E to prove Theorem A. Proof of Theorem A. Let C∗ be the reduced chain complex of the simplicial complex Bn (O), so C−1 ∼ = Z. We define the integral apartment class map φ : Cn−1 → Stn (K) as follows. An ordered basis v = (v1 , . . . , vn ) of On determines an (n − 1)-simplex of Bn (O), and thus a generator [v] = [v1 , . . . , vn ] of Cn−1 . Reordering the basis simply changes the orientation of this simplex, so we have [vτ (1) , . . . , vτ (n) ] = (−1)τ [v1 , . . . , vn ] for τ ∈ Sn ; there are no other relations between the elements [v] ∈ Cn−1 . Given v, define lines L1 , . . . , Ln in K n via the formula Li := spanK (vi ). Since {v1 , . . . , vn } is a basis of On , Lemma 2.2(c) implies that Li ∩ On = spanO (vi ) and On = spanO (vi ) ⊕ · · · ⊕ spanO (vi ), so the frame Lv := {L1 , . . . , Ln } is integral. Let Av := ALv be the integral apartment determined by this integral frame, and define φ([v]) = [Av ] ∈ Stn (K). Reordering the basis vectors gives the same frame, and thus the same apartment, but possibly with reversed orientation: [Aτ (v) ] = (−1)τ [Av ]. This shows that the map φ is well-defined. Our goal is to prove that φ is surjective, i.e. that Stn (K) is generated by integral apartment classes. We will do this by factoring the map φ as follows. ∼ = For a simplicial complex X, the isomorphism b : H∗ (X; Z) → H∗ (P(X); Z) determined by the homeomorphism between X and its barycentric subdivision is induced by the chain map X   [{x1 , . . . , xk }] 7→ (−1)τ {xτ (1) } ⊂ {xτ (1) , xτ (2) } ⊂ · · · ⊂ {xτ (1) , . . . , xτ (k) } . τ ∈Sk Let Bn (O)(n−2) be the (n − 2)-skeleton of Bn (O) and let P (n−2) := P(Bn (O)(n−2) ) be the poset of simplices of Bn (O)(n−2) . In the introduction we considered Tn (K) to be a simplicial complex, but let us define Tn (K) to be the poset of proper nonzero K-subspaces of K n ; the simplicial complex of flags from the introduction is then its geometric realization. Define the poset map F : P (n−2) → Tn (K) by F ({v1 , . . . , vr }) = spanK (v1 , . . . , vr ). 22 Since spanK (v1 , . . . , vr ) is an r-dimensional subspace of K n , the restriction to simplices of Bn (O)(n−2) (i.e. to simplices satisfying 0 < r < n) guarantees that this is a proper nonzero subspace, so F is well-defined and also height-preserving. Our claim is that the integral apartment class map φ : Cn−1 → Stn (K) factors as the composition ∂ e n−2 (Bn (O)(n−2) ; Z) φ : Cn−1 − → ker(∂ : Cn−2 → Cn−3 ) = H F b ∗ e e n−2 (P (n−2) ; Z) −→ H Hn−2 (Tn (K); Z) = Stn (K). − → ∼ (3.1) = Indeed, consider an ordered basis P v = (v1 , . . . , vn ) for On . Under the boundary map ∂ : Cn−1 → Cn−2 , we have ∂[v] = ni=1 (−1)i [v(i) ], where v(i) = {v1 , . . . , vbi , . . . , vn }. Under b, this is taken to X   (−1)σ {xσ(1) } ⊂ · · · ⊂ {xσ(1) , . . . , xσ(n−1) } . b(∂[v]) = σ∈Sn  Under F∗ , the term corresponding to σ ∈ Sn is taken to Lσ(1) ⊂ Lσ(1) + Lσ(2) ⊂ · · · ⊂ Lσ(1) + · · · + Lσ(n−1) . These are precisely the (n − 2)-simplices making up the apartment Av (compare with §5.1 and Example 5.1 below), and so F∗ (b(∂[v])) = [Av ], as claimed. To prove that φ is surjective, we prove that the maps ∂ and F∗ occurring in (3.1) are surjective. We first establish that under our assumptions, Bn (O) is CM of dimension n − 1. In the case when |S| > 1 and S contains a non-imaginary place, this is the statement of Theorem E. In the remaining case when O is Euclidean, this was proved by Maazen [Ma] (see [vdKL, Appendix] and [DP, Proof of Theorem B] for published proofs). By definition, e n−2 (Bn (O); Z). We have just estabthe cokernel of ∂ : Cn−1 → ker(∂ : Cn−2 → Cn−3 ) is H lished that Bn (O) is CM of dimension n − 1, and thus certainly (n − 2)-acyclic. Therefore e n−2 (Bn (O); Z) = 0 and ∂ : Cn−1 → ker(∂ : Cn−2 → Cn−3 ) is surjective. H To show that F∗ is surjective, we will apply Theorem 2.19 to the height-preserving poset map F , so we must verify that its hypotheses are satisfied. The Solomon–Tits theorem says that Tn (K) is CM of dimension (n − 2) (see e.g. [Q, Example 8.2]). Given V ∈ Tn (K), let ℓ = dim(V ), so ht(V ) = ℓ − 1. Lemma 2.2(c) implies that V ∩ On is a rank-ℓ direct summand of On . Since |cl(O)| = 1, every f.g. projective O-module is free, so V ∩ On is isomorphic to Oℓ . Lemma 2.3(b) states that {v1 , . . . , vk } ∈ F≤V exactly if {v1 , . . . , vk } is a partial basis of V ∩ On , so we have an isomorphism F≤V ∼ = P(Bℓ (O)). We established in the previous paragraph that P(Bℓ (O)) is CM of dimension ℓ − 1 = ht(V ), so this verifies the remaining hypothesis of Theorem 2.19. Applying Theorem 2.19, we deduce that the map e n−2 (P (n−2) ; Z) → H e n−2 (Tn (K); Z) = Stn (K) F∗ : H is surjective. Since all other maps in (3.1) are isomorphisms, this shows that the integral apartment class map φ : Cn−1 → Stn (K) is surjective. 4 Vanishing Theorem In this section we deduce Theorem C from Theorem A. We first remark that by Dirichlet’s × ∼ r1 +r2 −1 × µK . This is a virtual Poincaré duality group with virtual unit theorem, OK =Z cohomological dimension r1 + r2 − 1, so Bieri–Eckmann [BE, Theorem 3.5] implies that × ), i.e. that vcd(SLn OK ) = vcd(GLn OK ) − vcd(OK    vcd(SLn OK ) = νn′ := r1 n+1 − 1 + r2 n2 − 1 − (n − 1) . 2 23 Proof of Theorem C. In the special case λ = 0, Theorem C states that Hνn (GLn OK ; K) = 0 for all n ≥ 2 (and similarly for SLn OK ). Since H∗ (GLn OK ; K) ∼ = H∗ (GLn OK ; Q) ⊗Q K, the last claim of the theorem follows from the first ones, so those are all we need to prove. Fix λ = (λ1 , . . . , λn ) ∈ Zn with λ1 ≥ · · · ≥ λn . As we explained in §1.3, Borel–Serre duality implies that Stn (K) is the rational dualizing module for both SLn OK and GLn OK , which implies that Hνn (GLn OK ; Vλ ) = (Stn (K) ⊗ Vλ )GLn OK , ′ Hνn (SLn OK ; Vλ ) = (Stn (K) ⊗ Vλ )SLn OK . Since SLn OK ⊂ GLn OK , the coinvariants (Stn (K) ⊗ Vλ )GLn OK are a quotient of (Stn (K) ⊗ Vλ )SLn OK . The upshot is that to prove Theorem C, it is enough to prove that (Stn (K) ⊗ Vλ )SLn OK = 0 when n ≥ 2 + kλk. Define λ′ = (λ′1 , . . . , λ′n−1 , 0) by λ′i = λi − λn ; observe that kλ′ k = kλk. As representations of SLn OK , the representations Vλ and Vλ′ are isomorphic; they only differ as representations of GLn OK . Using Schur–Weyl duality, we can embed the SLn K-representation Vλ′ as a direct summand of (K n )⊗ℓ with ℓ := kλk. It follows that it is enough to prove that (Stn (K) ⊗ (K n )⊗ℓ )SLn OK = 0 when n ≥ 2 + ℓ. Fix an integral frame L = {L1 , . . . , Ln } with integral apartment class [AL ] ∈ Stn (K). We next show that [AL ] ⊗ (K n )⊗ℓ vanishes in the quotient (Stn (K) ⊗ (K n )⊗ℓ )SLn OK if n ≥ 2 + ℓ. n is a rank 1 projective O -module. Since For each 1 ≤ i ≤ n, the intersection Li ∩ OK K n . The |cl(OK )| = 1 this module is free, so we can choose a generator vi for each Li ∩ OK assumption that L is an integral frame means precisely that {v1 , . . . , vn } is an OK -basis for n . In particular {v , . . . , v } is a K-basis for K n , so S = {v ⊗ · · · ⊗ v | 1 ≤ i ≤ n} is a OK j 1 n i1 iℓ basis for (K n )⊗ℓ . Consider an arbitrary basis vector s = vi1 ⊗ · · ·⊗ viℓ ∈ S. Under the assumption n ≥ 2+ ℓ, we can find 1 ≤ j < j ′ ≤ n which are distinct from all of the i1 , . . . , iℓ . There exists a unique g ∈ SLn OK such that   vj ′ if i = j,  g(vi ) = −vj if i = j ′ ,   vi otherwise. We have g(s) = s and g(L) = L by construction. However g exchanges the two lines Lj and Lj ′ , so it reverses the orientation of the apartment AL , i.e. g([AL ]) = −[AL ]. This means that [AL ] ⊗ s and −[AL ] ⊗ s become equal, and thus vanish, in the coinvariant quotient (Stn (K) ⊗ (K n )⊗ℓ )SLn OK . Since s was arbitrary, [AL ] ⊗ (K n )⊗ℓ vanishes in this quotient for every integral apartment AL . Theorem A states that Stn (K) is generated by integral apartment classes, and so we conclude that (Stn (K) ⊗ (K n )⊗ℓ )SLn OK = 0, as desired. Remark 4.1. Some condition on K beyond |cl(OK )| = 1 is necessary in Theorem C. Indeed, for d < 0√squarefree let Od denote the ring of integers in the quadratic imaginary field Kd = Q( d). Those d < 0 for which Od is non-Euclidean but satisfies |cl(Od )| = 1 are exactly d ∈ {−19, −43, −67, −163}. Although H2 (SL2 O−19 ; Q) = 0, we have H2 (SL2 (O−43 ); Q) = Q, H2 (SL2 (O−67 ); Q) = Q2 , H2 (SL2 (O−163 ); Q) = Q6 . For these calculations see Vogtmann [Vo] and Rahm [Ra]. Presumably, similar things occur for SLn Od for n ≥ 3, but we could not find such calculations in the literature. It is likely that these four fields provide the only such counterexamples to the conclusion of Theorem C; indeed, Weinberger [We] proved that the generalized Riemann hypothesis implies that if OK has class number 1 and infinitely many units, then OK is Euclidean. 24 5 Non-Vanishing and Non-Integrality Theorems In this section we prove Theorem B and Theorem D; in fact we prove stronger versions of these results in Theorems B′ and D′ , which apply to projective modules M that need not be free. After summarizing in §5.1 some basic properties of spherical buildings, in §5.2 we prove Proposition 5.5, the key technical theorem of this section. We apply this proposition in §5.3 to prove Theorems B′ and D′ . 5.1 Spherical buildings In this section we briefly review the classical theory of spherical buildings. See [Br] for a general reference. A d-dimensional spherical building Y is a simplicial complex satisfying certain axioms. Associated to Y is a finite Coxeter group W of rank d+1 called the Weyl group and a canonical collection of subcomplexes A ⊂ Y called apartments. Each apartment is isomorphic to the Coxeter complex of W and is thus acted upon by W . In particular, each apartment A is e d (Y ). The class [A] is homeomorphic to a sphere S d and defines a fundamental class [A] ∈ H only defined up to ±1, but for our purposes this ambiguity will never pose a problem, so we do not mention it again. A d-simplex C in an apartment A is called P a chamber of A. The apartment A is the union of the translates wC for w ∈ W , and [A] = w∈W (−1)w [wC]. e d (Y ) Any d-dimensional spherical building Y is CM of dimension d. The top homology H is spanned by the fundamental classes [A] of apartments; indeed, for any fixed chamber C, a e d (Y ) is given by the apartment classes [A] of all apartments A containing C. basis for H The following three examples will be of the most interest to us. A poset P is said to be a d-dimensional spherical building if its realization |P | is. Example 5.1 (Poset of subspaces). Given an n-dimensional vector space W over a field K, let T (W ) be the poset of proper, nonzero K-subspaces of W . Its realization is the spherical Tits building associated to GL(W ), an (n − 2)-dimensional spherical building with Weyl group W = Sn . The chambers of T (W ) are the complete flags 0 ( W1 ( · · · ( Wn−1 ( W. The Coxeter complex of Sn can be identified with the barycentric subdivision of ∂∆n−1 . As discussed in the introduction, apartments of T (W ) are in bijection with frames of W , i.e. sets of lines L = {L1 , . .P . , Ln } such that W = L1 ⊕ · · · ⊕ Ln . The apartment AL corresponding to L satisfies [AL ] = σ∈Sn (−1)σ Vσ , where Vσ is the chamber Lσ(1) ( Lσ(1) + Lσ(2) ( · · · ( Lσ(1) + · · · + Lσ(n−1) . (5.1) Example 5.2 (Poset of summands). Given a finite rank projective O-module M over a Dedekind domain O, let T (M ) denote the poset of proper nonzero O-submodules U ⊂ M which are direct summands of M . Recall from Lemma 2.2(c) that the assignment V 7→ V ∩M gives a bijection between the K-subspaces V ( M ⊗O K and the direct summands of the O-module M . This assignment preserves containment, so it gives a canonical isomorphism T (M ⊗O K) ∼ = T (M ). In particular, if M has rank n, then T (M ) is an (n − 2)-dimensional spherical building. The apartments of T (M ) correspond to frames L = {L1 , . . . , Ln } of M ⊗O K, or equivalently to sets I = {I1 , . . . , In } of rank 1 summands of M such that I1 + · · · + In has rank n. The formula (5.1) might suggest that the chambers of AI are given by e.g. I1 ( I1 + I2 ( · · · , but this is not the case: indeed I1 + I2 need not be a summand of 25 M at all! The corresponding summand is M ∩ ((I1 + I2 ) ⊗O K), the “saturation” of I1 + I2 . For n ∈ N, let [n] = {1, . . . , n}, and given X ⊂ [n] set X UX := M ∩ ( Ix ⊗O K). (5.2) x∈X The chambers of AI are then Vσ : Uσ([1]) ( Uσ([2]) ( · · · ( Uσ([n−1]) for σ ∈ Sn , σ e n−2 (T (M ); Z) is given by [AI ] = P and the apartment class [AI ] ∈ H σ∈Sn (−1) Vσ . A frame I = {I1 , . . .L , In } is M -integral if I1 + · · · + In = M . In this case we have M = I1 ⊕ · · · ⊕ In and UX = x∈X IX , and the chambers of the M -integral apartment AI are indeed given by Iσ(1) ( Iσ(1) ⊕ Iσ(2) ( · · · ( Iσ(1) ⊕ · · · ⊕ Iσ(n−1) . Example 5.3 (Join of discrete posets). Let T be a finite set. Define a poset Xm (T ) = {1, . . . , m} × T by declaring (p, t) < (p′ , t′ ) exactly when p < p′ . The poset Xm (T ) is an (m − 1)-dimensional spherical building with Coxeter group W = (Z/2)m . The chambers of Xm (T ) are chains (1, t1 ) < (2, t2 ) < . . . < (m, tm ) with ti ∈ T for 1 ≤ i ≤ m. We will denote this chamber by (t1 , . . . , tm ). The apartments of Xm (T ) are in bijection with ordered sequences S = (S1 , . . . , Sm ), where Si = {ai , bi } is a 2-element subset of T with ai 6= bi . For e = (ε1 , . . . , εm ) ∈ (Z/2)m , let cek = bk if εk = 0 and cek = ak if εk = 1 (this convention will simplify some of our later formulas). Denote the corresponding chamber by Ce = (ce1 , . . . , cem ). The apartment AS is the union of the 2m chambers Ce , and its fundamental class is P X [AS ] = (−1)e [Ce ] where (−1)e = (−1) i εi . e Xm (T ) is the m-fold join of the discrete set T , so it is homotopy equivalent to a wedge of e m−1 (Xm (T ); Z) ∼ (|T | − 1)m copies of S m−1 . In particular, H = ZN with N = (|T | − 1)m . 5.2 Cycles in T (M) and the class group cl(O) Let M be a rank n projective O-module. In this section we relate the Tits building T (M ) to the much simpler complex Xn−1 (cl(O)) that we introduced in  Example 5.3. Define a map ψ : T (M ) → Xn−1 (cl(O)) via the formula ψ(U ) = rk(U ), [U ] . Given U, U ′ ∈ T (M ) with U ( U ′ , Lemma 2.2(b) says that U is a summand of U ′ , so rk(U ) < rk(U ′ ). Thus ψ is a poset map. Elements g ∈ GL(M ) and U ∈ T (M ) determine an isomorphism g : U ∼ = g(U ), so ψ(g(U )) = ψ(U ). Therefore ψ induces a map ψ : |T (M )| / GL(M ) → |Xn−1 (cl(O))|. Proposition 5.4. Let M be a rank n projective O-module. The map ψ : |T (M )| / GL(M ) → |Xn−1 (cl(O))| defined above is then an isomorphism of cell complexes. Proof. The proposition is equivalent to the following two claims; the first implies that ψ is surjective and the second implies that ψ is injective. 1. Let (j1 , c1 ) ··· (jp , cp ) be a chain in Xn−1 (cl(O)). Then there exists a chain U1 ( · · · ( Up in T (M ) such that ψ(Ui ) = (ji , ci ) for all 1 ≤ i ≤ p. 2. For ℓ = 1, 2 let V1ℓ ( · · · ( Vqℓ be a chain in T (M ). Assume that ψ(Vi1 ) = ψ(Vi2 ) for all 1 ≤ i ≤ q. Then there exists some g ∈ GL(M ) such that g(Vi1 ) = Vi2 for all 1 ≤ i ≤ q. 26 We begin with the first claim. Set (j0 , c0 ) = (0, 0) and (jp+1 , cp+1 ) = (n − jp , [M ]). For bi be a projective O-module of rank ji with [U bi ] = ci − ci−1 . Then 1 ≤ i ≤ p + 1, let U b1 ⊕ · · · ⊕ U bp+1 is a projective O-module of rank n satisfying U b1 ⊕ · · · ⊕ U bp+1 ] = c1 + (c2 − c1 ) + · · · + (cp − cp−1 ) + ([M ] − cp ) = [M ], [U b1 ⊕ · · · ⊕ U bp+1 → M . The desired summands Ui are then so there exists an isomorphism η : U b1 ) ⊕ · · · ⊕ η(U bi ). Ui := η(U ℓ = M. We now turn to the second claim. For both ℓ = 0 and ℓ = 1, set V0ℓ = 0 and Vq+1 ℓ ℓ For 1 ≤ i ≤ q + 1, Lemma 2.2(b) implies that Vi−1 is a summand of Vi , so there exists some ℓ ⊕V b ℓ . We thus have V ℓ = Vb ℓ ⊕ · · · ⊕ Vb ℓ . Observe that Vbiℓ ⊂ Viℓ such that Viℓ = Vi−1 1 i i i 1 2 [Vbi1 ] = [Vi1 ] − [Vi−1 ] = ci − ci−1 = [Vi2 ] − [Vi−1 ] = [Vbi2 ]. and similarly rk(Vbi1 ) = rk(Vbi2 ). Therefore there exists an isomorphism ζi : Vbi1 → Vbi2 . The desired g ∈ GL(M ) is then the composition 1 M = Vb11 ⊕ · · · ⊕ Vbq+1 ζ1 ⊕···⊕ζq+1 −→ 2 Vb12 ⊕ · · · ⊕ Vbq+1 = M. We now turn to the main technical theorem of §5, which asserts that the map e n−2 (T (M ); Z) → H e n−2 (Xn−1 (cl(O)); Z) ψ∗ : H is surjective. We will use the notation for apartments and chambers in these buildings that was introduced in Examples 5.2 and 5.3. The reason that this result is so hard to prove is that for a general apartment AI in T (M ⊗O K), it seems quite difficult to describe the image ψ∗ ([AI ]) of its fundamental class in the homology of Xn−1 (cl(O)). For one thing, we saw in Example 5.2 that the summands UX that make up the chambers of AI are not easily understood; for example, knowing the images ψ(Ik ) of the rank 1 summands does not allow us to determine ψ(UX ). For another, the apartment AI consists of n! chambers, while the apartments in Xn−1 (cl(O)) are made up of only 2n−1 chambers. Since n! ≫ 2n−1 , in general we expect that ψ(AI ) will be draped over many apartments in Xn−1 (cl(O)). However, the following proposition guarantees that we can find certain special apartments AI whose image is just a single apartment AS , with the excess n! − 2n−1 chambers all “folded away” and canceling each other out precisely, leaving only the desired homology class. Proposition 5.5 (Detecting spaces of cycles). Let O be a Dedekind domain, let M be a rank n projective O-module, and let AS be an apartment of Xn−1 (cl(O)). Then there e n−2 (Xn−1 (cl(O)); Z). In particular, exists a frame I of M such that ψ∗ ([AI ]) = [AS ] ∈ H e n−2 (T (M ); Z) → H e n−2 (Xn−1 (cl(O)); Z) is surjective. ψ∗ : H Proof. Write S = (S1 , . . . , Sn−1 ) with Si = {ai , bi } for some ai , bi ∈ cl(O). For e = (ε1 , . . . , εn−1 ) ∈ (Z/2)n−1 , let cek = bk if εk = 0, and cek = ak if εk = 1 (as we noted in Example 5.3, this convention will simplify some of our formulas). The apartment AS is the union of the 2n−1 chambers Ce = (ce1 , . . . , cen−1 ), and its fundamental class is P X [AS ] = (−1)e [Ce ] with (−1)e = (−1) i εi . e (i) Using Proposition 5.4 we may choose summands Bk for 1 ≤ k ≤ n − 1 and Ak for 1 ≤ i ≤ k ≤ n − 1 with the following properties: 0 = B0 ( B1 ( · · · ( Bn−1 ( Bn = M (i) (i) rk(Bk ) = k, [Bk ] = bk . (i) Bi−1 ( Ai ( Ai+1 ( · · · ( An−1 ( M 27 (i) (i) (i) rk(Ak ) = k, [Ak ] = ak , Ak ⊂ Bk+1 (i) (i) (First, choose all the Bk . Then for each i, choose the Ak inductively using Bi−1 ( Ai ( (i) (i) Bi+1 and Ak−1 ( Ak ( Bk+1 .) We now define I1 := B1 and Ik := k−1 \ (i) Ak−1 i=1 for 1 < k ≤ n. Set I = {I1 , . . . , In }. We will prove that I is a frame of M and that ψ∗ ([AI ]) = [AS ]. Claim 1. For each 1 ≤ k ≤ n the intersection Ik is a rank 1 summand of M . Also, I1 + · · · + Ik is a rank k O-submodule of M (not necessarily a summand). In particular, the rank of I1 + · · · In is n, so I is a frame of M . Proof of Claim 1. The bijection V 7→ M ∩ V of Lemma 2.2(c) preserves intersections, so the intersection of summands of M is also a summand of M . In particular, each Ik is a Tk−1 (i) Ak−1 ⊗O K. The intersection of the k − 1 hyperplanes summand of M and Ik ⊗O K = i=1 (1) (k−1) Ak−1 ⊗O K, . . . , Ak−1 ⊗O K inside the k-dimensional vector space Bk ⊗O K cannot vanish, so rk(Ik ) ≥ 1. We will prove equality holds, but not until the end of the proof. (i) Since each Ak−1 is contained in Bk , we have Ik ⊂ Bk . Since Bj ⊂ Bk for j < k, we see that I1 + · · · + Ik ⊂ Bk for all k. We next claim that Ik ∩ Bk−1 = 0 for all k. The proof will be by induction on k. The base case k = 1 is trivial since I1 = B1 , so assume that k > 1. For 1 ≤ i ≤ k − 2, we have (i) (i) (i) [Ak−1 ] = ak−1 6= bk−1 = [Bk−1 ], so Ak−1 6= Bk−1 . It follows that Ak−1 ∩ Bk−1 is a summand (i) of rank at most k −2. But by construction, the rank k −2 summand Ak−2 is contained in both (i) (i) (i) Ak−1 and in Bk−1 , so it must be their intersection: Ak−1 ∩ Bk−1 = Ak−2 for 1 ≤ i ≤ k − 2. (k−1) In a similar way, we have Ak−1 ∩ Bk−1 = Bk−2 . Combining these, we find that Ik ∩ Bk−1 = = k−1 \ k−1 \ (i)  Ak−1 i=1 (i)  Ak−2 ∩ Bk−2 = Ik−1 ∩ Bk−2 . i=1 k−2 \ ∩ Bk−1 = i=1 (i) (Ak−1 ∩ Bk−1 ) By induction, this is zero, as claimed. Finally, we prove Ik has rank 1 and that I1 + · · · + Ik has rank k. The proof of this is by induction on k. The base case k = 1 is trivial, so assume that k > 1, that Ik−1 has rank 1, and that I1 + · · · + Ik−1 has rank k − 1. From the containments I1 + · · · + Ik−1 ⊂ I1 + · · · + Ik ⊂ Bk we see that k−1 ≤ rk(I1 +· · ·+Ik ) ≤ k. Assume for the sake of contradiction that rk(I1 +· · ·+ Ik ) < k or that rk(Ik ) > 1. In either case, the subspaces Ik ⊗O K and (I1 + · · · + Ik−1 ) ⊗O K must intersect nontrivially inside the k-dimensional vector space Bk ⊗O K. Multiplying by an appropriate denominator, it follows that (I1 + · · · + Ik−1 ) ∩ Ik 6= 0. However we proved above that Bk−1 ∩ Ik = 0; since I1 + · · · + Ik−1 ⊂ Bk−1 , this is a contradiction. Therefore rk(I1 + · · · + Ik ) = k and rk(Ik ) = 1, as desired. This concludes the proof of Claim 1. It remains to prove that ψ∗ ([AI ]) = [AS ]. As explained in Example 5.2, the chambers of the apartment AI are given by Vσ := Uσ([1]) Uσ([2]) ··· 28 Uσ([n−1]) for σ ∈ Sn . The image ψ(Vσ ) ⊂ ψ(AL ) ⊂ Xn−1 (cl(O)) is the chamber determined by the sequence  [Uσ([1]) ], [Uσ([2]) ], . . . , [Uσ([n−1]) ] . For most subsets X ⊂ [n], we cannot say anything about the summand UX or its class [UX ], but there are two exceptions. Claim 2 (Trichotomy). 1. U[k] = Bk , so [U[k] ] = bk . (i) 2. If X = [k + 1] \ {i} for some 1 ≤ i ≤ k, then UX = Ak , so [UX ] = ak . 3. For other subsets X ⊂ [n], we know nothing. Proof of Claim 2. Case 1: We saw above that I1 + · · · + Ik ⊂ Bk , and Claim 1 states that rk(I1 +· · ·+Ik ) = k, so (I1 +· · ·+Ik )⊗O K = Bk ⊗O K. Since U[k] = M ∩((I1 +· · ·+Ik )⊗O K) by definition, this means that U[k] = M ∩ (Bk ⊗O K). But Bk is a summand of M , so M ∩ (Bk ⊗O K) = Bk . (i) Case 2: We begin by observing that Ix ⊂ Ak whenever x ≤ k + 1 and i 6= x. For i < x (i) (i) (i) this follows from Ix ⊂ Ax−1 (by the definition of Ix ) and Ax−1 ⊂ Ak . For i > x, we use (i) (i) instead that Ix ⊂ Bx ⊂ Bi−1 ⊂ Ai ⊂ Ak . Let X = [k + 1] \ {i} for some 1 ≤ i ≤ k. It follows from Claim 1 that I1 + · · · + Ibi + · · · + Ik+1 has rank k, and the beginning of this (i) paragraph shows that this submodule is contained in the rank k summand Ak . Just as (i) above, this implies that UX = M ∩ ((I1 + · · · + Ibi + · · · + Ik+1 ) ⊗O K) coincides with Ak . This concludes the proof of Claim 2. We can analyze this trichotomy in terms of σ ∈ Sn , as follows. Given σ ∈ Sn , think of σ as a function σ : [n] → [n], and define sσ : [n] → [n] by sσ (k) = sup{σ(i) | 1 ≤ i ≤ k}. The function sσ is monotone increasing and satisfies k ≤ sσ (k) ≤ n. If sσ (k) = k then it must be that σ([k]) = [k], so [Uσ([k]) ] = [Bk ] = bk . If sσ (k) = k + 1, it must be that (i) σ([k]) = [k + 1] − {i} for some 1 ≤ i ≤ k, so [Uσ([k]) ] = [Ak ] = ak . To sum up, we have   if sσ (k) = k bk [Uσ([k]) ] = ak if sσ (k) = k + 1   unknown otherwise (5.3) Accordingly, we divide the permutations σ ∈ Sn into two subsets: we say that σ ∈ Sn is good if sσ (k) ∈ {k, k + 1} for all k, and say that σ is bad otherwise. Claim 3. The good permutations are the 2n−1 permutations of the form σe := (1 2)ε1 (2 3)ε2 · · · (n − 1 n)εn−1 ∈ Sn for some e = (ε1 , . . . , εn−1 ) ∈ (Z/2)n−1 . For such a good permutation σ = σe , sσ (k) = k ⇐⇒ εk = 0 sσ (k) = k + 1 ⇐⇒ εk = 1 29 for k < n. Proof of Claim 3. The proof is by induction on n. The base case is n = 1, where the claim is trivial. Assume now that n ≥ 2 and that the claim is true for smaller n. Let σ ∈ Sn be a good permutation. Since sσ (k) ≥ σ(k), the condition sσ (k) ≤ k + 1 for all k implies that σ(k) 6= n for any k < n − 1. Therefore we have either σ(n) = n or σ(n − 1) = n. In the first case, the restriction σ|[n−1] is a good permutation in Sn−1 , so the claim holds by induction with εn−1 = 0; since σ(n) = n in this case, we must have sσ (n − 1) = n − 1. In the second case, we have sσ (n − 1) = n. Moreover, the permutation σ ′ := σ(n − 1 n) satisfies σ ′ (n) = n and is good (since σ ′ |[n−2] = σ|[n−2] ), so applying the first case to σ ′ proves Claim 3. We can now divide the chambers of AI between the two chains defined by X X [AI ]good := (−1)σ Vσ and [AI ]bad := (−1)σ Vσ , σ∈Sn good σ∈Sn bad so [AI ] = [AI ]good + [AI ]bad as chains in Cn−2 (T (M )). Claim 4. We have ψ∗ ([AI ]good ) = [AS ]. Proof of Claim 4. Consider e = (ε1 , . . . , εn−1 ) ∈ (Z/2)n−1 . By Claim 3, sσe (k) = k + εk for all 1 ≤ k < n. By (5.3) this implies [Uσe ([k])] = cek for all k (recall that cek is either bk or ak depending on whether εk is 0 or 1). Therefore the image ψ(Vσe ) of the chamber Vσe is precisely the chamber Ce . Since P (−1)σe = (−1) εi = (−1)e , the orientations of Vσe and Ce agree, proving Claim 4. To deal with [AI ]bad , we define an involution σ 7→ σ on the set of bad permutations σ ∈ Sn as follows. Given a bad permutation σ, define xσ = sup{x ∈ {2, . . . , n − 1} | sσ (x − 1) > x}, yσ = inf{y ∈ {xσ + 1, . . . , n} | sσ (y) = y}. There exists some x with sσ (x − 1) > x if and only if σ is bad, so xσ is well-defined. The second condition is always satisfied by y = n, so yσ is well-defined as well. We define σ := σ(xσ yσ ) ∈ Sn . Claim 5. The map σ 7→ σ is an involution on the set of bad permutations. Proof of Claim 5. Let σ ∈ Sn be a bad permutation. We will show that sσ = sσ ; since xσ and yσ only depend on sσ , this implies that xσ = xσ and yσ = yσ and thus that σ = σ. For k < xσ or k ≥ yσ we have σ([k]) = σ([k]), so sσ (k) = sσ (k) automatically. Considering the remaining terms we find that for xσ ≤ k < yσ , we must have sσ (k) = k + 1. (5.4) Indeed, to have sσ (k) > k + 1 would contradict the definition of xσ , and to have sσ (k) = k would contradict the definition of yσ . It follows that σ(k) = k + 1 for xσ < k < yσ . By the pigeonhole principle, σ(yσ ) ≤ xσ + 1. But if σ(yσ ) were xσ + 1 we could not have sσ (xσ ) = xσ + 1 = sσ (xσ − 1), so in fact σ(yσ ) ≤ xσ . For the same reason, we must have σ(xσ ) ≤ xσ . Since σ(xσ ) ≤ xσ and σ(yσ ) ≤ xσ while sup σ([k]) = sσ (k) = k + 1 > xσ for xσ ≤ k < yσ , we see that neither σ(xσ ) nor σ(yσ ) ever realizes this supremum. Therefore exchanging σ(xσ ) and σ(yσ ) will not change sup σ([k]) for any k. This shows that sσ = sσ , proving Claim 5. 30 Claim 6. We have ψ∗ ([AI ]bad ) = 0. Proof of Claim 6. Let σ ∈ Sn be a bad permutation. By definition, we have (−1)σ = (−1) · (−1)σ , so it is enough to prove that that the chambers ψ(Vσ ) and ψ(Vσ ) coincide. In other words, we must show that [Uσ([k]) ] = [Uσ([k]) ] for all 1 ≤ k ≤ n − 1. For all k < xσ or k ≥ yσ , we have (xσ yσ ) [k]) = [k], so σ([k]) = σ([k]) and the claim is automatic. For the remaining xσ ≤ k < yσ , we showed in (5.4) that sσ (k) = sσ (k) = k + 1. By (5.3), for such k we have [Uσ([k]) ] = ak = [Uσ([k]) ]. This concludes the proof of Claim 6. By definition [AI ] = [AI ]good + [AI ]bad , and Claims 4 and 6 state that ψ∗ ([AI ]good ) = [AS ] and ψ∗ ([AI ]bad ) = 0, so ψ∗ ([AI ]) = [AS ], as desired. This concludes the proof of Proposition 5.5. 5.3 Proof of the Non-Vanishing and Non-Integrality Theorems In this section we prove Theorems D and B. In fact, we prove the stronger Theorems D′ and B′ , which apply to the automorphism groups of arbitrary (not necessarily free) finite rank projective modules. If M is a rank n projective OK -module, its automorphism group GL(M ) is also a lattice in GLn (OK ⊗ R), commensurable with but not in general isomorphic to GLn OK . As before, νn = vcd(GLn OK ) and νn′ = vcd(SLn OK ). Theorem D′ . Let K be a number field with ring of integers OK and let M be a rank n projective OK -module. Then for all n ≥ 2, ′ dim Hνn (SL(M ); Q) ≥ dim Hνn (GL(M ); Q) ≥ (|cl(OK )| − 1)n−1 . n. Theorem D is the special case of Theorem D′ with M ∼ = OK e n−2 (T (M ); Z). The automorphism group GL(M ) acts naturally Proof. Define St(M ) := H on T (M ), and thus on St(M ). Since SL(M ) is commensurable with SLn OK , it follows from [BE, Theorems 3.2, 3.3] that GL(M ) and SL(M ) are virtual duality groups with rational dualizing module St(M ). Moreover, vcd(GL(M )) = vcd(GLn OK ) = νn and vcd(SL(M )) = vcd(SLn OK ) = νn′ . Therefore just as in Equation (1.1), we have Hνn (GL(M ); Q) ∼ = (St(M ) ⊗ Q)GL(M ) , ′ Hνn (SL(M ); Q) ∼ = (St(M ) ⊗ Q)SL(M ) . In particular, the former is a quotient of the latter, so this already proves the first inequality of the theorem. Consider the map ψ : T (M ) → Xn−1 (cl(O)) from the previous section, which is invariant under the action of GL(M ) on T (M ). Recall from Example 5.3 that the realization of Xn−1 (cl(O)) is homotopy equivalent to a (|cl(O)| − 1)n−2 -fold wedge of (n − 2)-spheres, so e n−2 (Xn−1 (cl(O)); Z) ∼ H = ZN with N = (|cl(OK )| − 1)n−2 . Proposition 5.5 states that the map e n−2 (T (M ); Z) → H e n−2 (Xn−1 (cl(O)); Z) ∼ ψ∗ : St(M ) = H = ZN is surjective. Since ψ is GL(M )-invariant, this map factors through the coinvariants, yielding a surjection St(M )GL(M ) ։ ZN . Tensoring with Q yields a surjection St(M )GL(M ) ⊗ Q ∼ = (St(M ) ⊗ Q)GL(M ) ։ QN , so the dimension of (St(M ) ⊗ Q)GL(M ) is at least (|cl(OK )| − 1)n−2 , as claimed. 31 Example 5.6. The cohomology classes we construct in Theorem D√were known classically when n = 2. To illustrate this, consider a quadratic imaginary field Q( −d) as in Remark 4.1. The Bianchi group SL2 Od is a lattice in SL2 C, and thus acts by isometries on H3 . The associated locally symmetric space Xd = SL2 Od \H3 is a noncompact arithmetic 3-dimensional hyperbolic orbifold of cohomological dimension 2. The cusps of Xd are in bijection with the SL2 Od -conjugacy classes of parabolic subgroups in SL2 Od , and thus with the SL2 Od -orbits √ 1 of P (Q( −d)), and thus with the ideal class group cl(Od ). An embedded path in Xd connecting one cusp to another defines an element of the locally finite homology group Hlf1 (Xd ; Q), which is dual to H2 (X; Q) ∼ = H2 (SL2 Od ; Q). Since there are |cl(Od )| cusps, intersecting with such paths gives a (|cl(Od )| − 1)-dimensional projection of H2 (X; Q) ∼ = H2 (SL2 Od ; Q). A similar procedure works for SL2 OK for any number field K. However the case n ≥ 3 is more complicated: the cusps overlap in complicated ways, so this simple argument does not work. We now give a strengthening of Theorem B; Theorem B is the special case when M ∼ = On . Theorem B′ . Let O be a Dedekind domain with 1 < |cl(O)| < ∞, and let M be a rank n projective O-module for some n ≥ 2. If |cl(O)| = 2, assume that M is not the unique non-free O-module of rank 2. Then St(M ) is not generated by M -integral apartment classes. Proof. Let StInt (M ) be the subspace of St(M ) spanned by M -integral apartment classes. e n−2 (Xn (cl(O)); Z) is surjective. Thus to prove By Proposition 5.5, the map ψ∗ : St(M ) → H Int that St (M ) 6= St(M ) it is enough to prove that ψ∗ (StInt (M )) is a proper subspace of e n−2 (Xn (cl(O)); Z). H Consider an M -integral frame I = {I1 , . . . , In } with [Ik ] = ck and M = I1 ⊕ · · · ⊕ In ; the latter property implies that c1 + · · · + cn = [M ] ∈ cl(O). We claim first that ψ∗ ([AI ]) only depends on {c1 , . . . , cn }, and not on the particular integral frame I. To see this, recall from Example 5.2 that the chambers of an integral apartment AI are of the form Vσ = Iσ(1) ( Iσ(1) ⊕ Iσ(2) ( · · · ( Iσ(1) ⊕ · · · ⊕ Iσ(n−1) L P for σ ∈ Sn . Given X ⊂ [n], we have [ k∈X Ik ] = k∈X ck , so the chamber Vσ is taken by π to the chamber  Cσ = cσ(1) , cσ(1) + cσ(2) , . . . , cσ(1) + · · · + cσ(n−1) . (5.5) The claim follows. Next, assume for the moment that ci = cj for some i 6= j. Define the involution σ 7→ σ b on Sn by σ b = (i j)σ. From (5.5) we see that Cσb will coincide with Cσ for all σ ∈ Sn . Since (−1)σb = (−1) · (−1)σ , the chamber Vσb occurs with opposite orientation from Vσ in [AI ]. We conclude that ψ∗ ([AI ]) = 0 unless the classes c1 , . . . , cn ∈ cl(O) are distinct, in which case (up to sign) ψ∗ ([AI ]) only depends on the unordered set {c1 , . . . , cn } ⊂ cl(O). This already shows that when n > |cl(O)|, the image ψ∗ (StInt (M )) vanishes. We complete the proof by an elementary counting argument. By Example 5.3, the e n−2 (Xn (cl(O)); Z) is (|cl(O)| − 1)n−1 . The precise number of n-element subsets rank of H {c1 , . . . , cn } ⊂ cl(O) satisfying c1 + · · · + cn = [M ] is hard to calculate and depends on the group structure of cl(O). One case is easy, however: when cl(O) = Z/2Z, the relation c1 + · · · + cn = [M ] can never be satisfied by distinct elements ci ∈ cl(O) for any n ≥ 2, excepting the single case n = 2 and [M ] 6= 0. Therefore, whenever |cl(O)| = 2 (excepting the excluded case when n = 2 and [M ] 6= 0) we have ψ∗ (StInt (M )) = 0. Since e n−2 (Xn (cl(O)); Z) = Z when |cl(O)| = 2, this concludes the proof in that case. H For all other nontrivial class groups, the relation c1 + · · · + cn = [M ] implies that cn is determined by {c1 , . . . , cn−1 }. This lets us bound the rank of ψ∗ (StInt (M )) by |cl(O)| n−1 . 32 Elementary estimates show that n−1 (|cl(O)| − 1) >  |cl(O)| n−1  for all n ≥ 2 whenever |cl(O)| > 2. Therefore ψ∗ (StInt (M )) must be a proper subspace of e n−2 (Xn (cl(O)); Z), as desired. H In the excluded case when cl(O) ∼ = Z/2Z, let I ⊂ O be a non-principal ideal, so that M ∼ = O ⊕ I. It can be verified as in Proposition 2.7 that St(M ) is spanned by M -integral apartment classes if and only if the group SL(M ) is generated by diagonal matrices together    1 I 1 0  and  . It would be interesting to know with elementary matrices of the form  0 1 I −1 1 when this condition holds for SL(M ); we are not aware of any results on this subject. References [AR] A. Ash and L. Rudolph, The modular symbol and continued fractions in higher dimensions, Invent. Math. 55 (1979), no. 3, 241–250. doi:10.1007/bf01406842. [BMS] H. Bass, J. Milnor, and J.-P. Serre, Solution of the congruence subgroup problem for SLn (n ≥ 3) and Sp2n (n ≥ 2), Inst. Hautes Études Sci. Publ. Math. No. 33 (1967), 59–137. doi:10.1007/bf02684586. [Be] M. Bestvina, PL Morse theory, Math. Commun. 13 (2008), no. 2, 149–162. Available at hrcak.srce.hr/file/48930 [BE] R. Bieri and B. Eckmann, Groups with homological duality generalizing Poincaré duality, Invent. Math. 20 (1973), 103–124. doi:10.1007/bf01404060. [Bo] A. Borel, Stable real cohomology of arithmetic groups, Ann. Sci. École Norm. Sup. (4) 7 (1974), 235–272. Available at www.numdam.org/item?id=ASENS_1974_4_7_2_235_0 [BS] A. Borel and J.-P. Serre, Corners and arithmetic groups, Comment. Math. Helv. 48 (1973), 436–491. doi:10.1007/bf02566134. [Br] K. S. Brown, Buildings, Springer, New York, 1989. Freely available at http://www.math.cornell.edu/~ kbrown/buildings/ [C] P. M. Cohn, On the structure of the GL2 of a ring, Inst. Hautes Études Sci. Publ. Math. No. 30 (1966), 5–53. doi:10.1007/bf02684355. [DP] M. Day and A. Putman, The complex of partial bases for Fn and finite generation of the Torelli subgroup of Aut(Fn ), Geom. Dedicata 164 (2013), 139–153. doi:10.1007/s10711-012-9765-6. arXiv:1012.1914. [F1] J. Franke, Harmonic analysis in weighted L2 -spaces, Ann. Sci. École Norm. Sup. (4) 31 (1998), no. 2, 181–279. doi:10.1016/s0012-9593(98)80015-3. [F2] J. Franke, A topological model for some summand of the Eisenstein cohomology of congruence subgroups, in Eisenstein series and applications, 27–85, Progr. Math., 258, Birkhäuser Boston, Boston, MA, 2008. doi:10.1007/978-0-8176-4639-4 2. [FS] J. Franke and J. Schwermer, A decomposition of spaces of automorphic forms, and the Eisenstein cohomology of arithmetic groups, Math. Ann. 311 (1998), no. 4, 765–790. doi:10.1007/s002080050208. [G] S. Geller, On the GEn of a ring, Illinois J. Math. 21 (1977), no. 1, 109–112. projecteuclid.org/euclid.ijm/1256049506 [LS] R. Lee and R. H. Szczarba, On the homology and cohomology of congruence subgroups, Invent. Math. 33 (1976), no. 1, 15–53. doi:10.1007/bf01425503. [L] B. Liehl, On the group SL2 over orders of arithmetic type, J. Reine Angew. Math. 323 (1981), 153–171. doi:10.1515/crll.1981.323.153. 33 [vdK] W. van der Kallen, Homology stability for linear groups, Invent. Math. 60 (1980), no. 3, 269–295. doi:10.1007/bf01390018. [vdKL] W. van der Kallen and E. Looijenga, Spherical complexes attached to symplectic lattices, Geom. Dedicata 152 (2011), 197–211. doi:10.1007/s10711-010-9553-0. arXiv:1001.0883 [Ma] H. Maazen, Homology Stability for the General Linear Group, thesis, University of Utrecht (1979). Available at www.persistent-identifier.nl/?identifier=URN:NBN:NL:UI:10-1874-237657 [Mi] J. Milnor, Introduction to algebraic K-theory, Annals of Mathematics Studies 72, Princeton University Press, Princeton, N.J.; University of Tokyo Press, Tokyo, 1971. doi:10.1515/9781400881796. [Q] D. Quillen, Homotopy properties of the poset of nontrivial p-subgroups of a group, Adv. in Math. 28 (1978), no. 2, 101–128. doi:10.1016/0001-8708(78)90058-0. [Ra] A. D. Rahm, The homological torsion of PSL2 of the imaginary quadratic integers, Trans. Amer. Math. Soc. 365 (2013), no. 3, 1603–1635. doi:10.1090/s0002-9947-2012-05690-x. arXiv:1108.4608. [Re] I. Reiner, Unimodular complements, Amer. Math. Monthly 63 (1956), 246–247. doi:10.2307/2310351. [Se] J.-P. Serre, Trees, translated from the French by John Stillwell, Springer, Berlin, 1980. doi:10.1007/978-3-642-61856-7. [So] L. Solomon, The Steinberg character of a finite group with BN -pair, in Theory of Finite Groups (Symposium, Harvard Univ., Cambridge, Mass., 1968), 213–221, Benjamin, New York. [Va] L. N. Vaseršteı̆n, On the group SL2 over Dedekind rings of arithmetic type, Math. USSR Sbornik 18 (1972) 2, 321–332. doi:10.1070/SM1972v018n02ABEH001775. [Vo] K. Vogtmann, Rational homology of Bianchi groups, Math. Ann. 272 (1985), no. 3, 399–419. doi:10.1007/bf01455567. [Wa] J. B. Wagoner, Stability for homology of the general linear group of a local ring, Topology 15 (1976), no. 4, 417–423. doi:10.1016/0040-9383(76)90035-5. [We] P. J. Weinberger, On Euclidean rings of algebraic integers, in Analytic number theory (Proc. Sympos. Pure Math., Vol. XXIV, St. Louis Univ., St. Louis, Mo., 1972), 321–332, Amer. Math. Soc., Providence, RI. doi:10.1090/pspum/024/0337902. Thomas Church Department of Mathematics Stanford University 450 Serra Mall Stanford, CA 94305 [email protected] Benson Farb Department of Mathematics University of Chicago 5734 University Ave. Chicago, IL 60637 [email protected] 34 Andrew Putman Department of Mathematics University of Notre Dame 279 Hurley Bldg Notre Dame, IN 46556 [email protected]
4math.GR
Revisiting Exception Handling Practices with Exception Flow Analysis Guilherme B. de Pádua Weiyi Shang Department of Computer Science and Software Engineering Department of Computer Science and Software Engineering Concordia University - Montreal, QC, Canada Concordia University - Montreal, QC, Canada Email: g [email protected] Email: [email protected] Prior studies on exception handling aim to understand the practices of exception handling in its different components: exception sources and handling code. Yet, the observed findings were scattered and diverse. Recent empirical studies on exception handling practices have advocated the suboptimal use of exception handling features in open source software [9], [10], [11], [12]. Moreover, in our previous research, we observe the prevalence of exception handling anti-patterns. These research findings imply the lack of a thorough understanding of the practice of exception handling [13]. Abstract—Modern programming languages, such as Java and C#, typically provide features that handle exceptions. These features separate error-handling code from regular source code and aim to assist in the practice of software comprehension and maintenance. Having acknowledged the advantages of exception handling features, their misuse can still cause reliability degradation or even catastrophic software failures. Prior studies on exception handling aim to understand the practices of exception handling in its different components, such as the origin of the exceptions and the handling code of the exceptions. Yet, the observed findings were scattered and diverse. In this paper, to complement prior research findings on exception handling, we study its features by enriching the knowledge of handling code with a flow analysis of exceptions. Our case study is conducted with over 10K exception handling blocks, and over 77K related exception flows from 16 open-source Java and C# (.NET) libraries and applications. Our case study results show that each try block has up to 12 possible potentially recoverable yet propagated exceptions. More importantly, 22% of the distinct possible exceptions can be traced back to multiple methods (average of 1.39 and max of 34). Such results highlight the additional challenge of composing quality exception handling code. To make it worse, we confirm that there is a lack of documentation of the possible exceptions and their sources. However, such critical information can be identified by exception flow analysis on welldocumented API calls (e.g., JRE and .NET documentation). Finally, we observe different strategies in exception handling code between Java and C#. Our findings highlight the opportunities of leveraging automated software analysis to assist in exception handling practices and signify the need of more further in-depth studies on exception handling practice. Index Terms—source code analysis; exception flow analysis; exception handling; software engineering Therefore, in this paper, we re-visit exception handling practices by conducting an in-depth study on 16 open-source Java and C# libraries and applications. To understand and analyze the state-of-the-practice of exception handling in these projects, we perform source code analysis to track the flow of exceptions from the source of exceptions, through method invocations, to the attempting blocks of exceptions (try block) and the exception handling block (catch block). With such flow analysis, we extract information about exception handling practice in over 10K exception handling blocks, and over 77K related exception flows from the studied subject systems. Our case study focuses on four aspects of the exception handling practices: 1) the quantity of exceptions, 2) the diversity of exceptions, 3) the sources of exceptions and 4) the exception handling strategies and actions. Table I summarizes our findings and their corresponding implications. Such results confirm the challenge of composing quality exception handling code. For example, we find a considerable amount of potentially recoverable yet propagated exceptions. However, more importantly, we highlight the opportunities of leveraging our automated source code analysis to complement the information that is valuable for developers when handling exceptions. More in-depth analyses are needed to ensure and improve the quality and usefulness of exception handling in practice. I. I NTRODUCTION Modern programming languages, such as Java and C#, typically provide exception handling features, such as throw statements and try-catch-finally blocks. These features separate error-handling code from regular source code and are leveraged widely in practice to support software comprehension and maintenance [1], [2]. Having acknowledged the advantages of exception handling features, their misuse can still cause catastrophic software failures, such as application crashes [3], or reliability degradation, such as information leakage [4], [5]. A large portion of systems has suffered from system crashes that were due to exceptions [6]. Additionally, the importance of exception handling source code has been illustrated in prior research and surveys [7], [8]. The rest of the paper is organized as follows: Section II discusses the related prior research of this work. Section III presents the methodology of the exception flow analysis through an illustrative example and our case study setup. Section IV to VII presents the results of our case study. Section VIII discusses the threats to the validity of our findings. Finally, Section IX concludes the paper and discusses potential future research directions based on our research results. 1 TABLE I O UR FINDINGS AND IMPLICATIONS ON EXCEPTION HANDLING PRACTICES . Quantity of Exceptions (Section IV) Implications (1) There often exist multiple possible exceptions in each try block, and, out of those, many are propagated. Current state-of-the-practice may not provide information to developers about all possible exceptions. Automated techniques may help developers be aware of all possible exceptions to make exception handling decisions. (2) There exists a considerable amount of potentially recoverable exceptions that are propagated, even though they are recommended to be handled by Java and C#. Exception flow analysis can provide automated tooling support to alert developers about not handling potentially recoverable exceptions. Diversity of Exceptions (Section V) Implications (3) With a significant amount of exceptions existing in each project, many possible exception types appear in only one try block. Developers may not need to be aware of all exception types in a project by receiving automated suggestions of the exceptions that he/she needs to understand. Sources of Exceptions (Section VI) Implications (4) Over 22% of the exceptions are traced from different methods. Automated tools are needed to help developers understand the source of the exception if it is traced back to different methods. (5) The libraries used by the systems can provide documentation to most of the possible exceptions. Developers should leverage automated analyses to understand possible exceptions. Exception Handling Strategies and Actions (Section VII) Implications (6) Only a small portion of the exceptions are handled with the Specific strategy. Developers should be guided to prioritize on handling exceptions with the Specific strategy, since developers cannot optimize the handling of the exception without knowing its exact type information. (7) Java and C# have differences in leveraging various actions when handling exceptions. More in-depth analysis and user studies are needed to further understand the rationale of differences of Java and C# exception handling practices. (8) Actions that are taken when handling exceptions with specific or subsumption manners are not statistically significantly different. Research and tooling support are needed to guide how to handle exceptions, especially with the specific strategy. (9) With statistical significance, all top 10 Java and 2 out of top 10 C# exceptions have at least one action that is taken differently from the rest of the exceptions. Developers may consider leveraging automated suggestion of exception handling actions. II. R ELATED W ORK A. Empirical studies on exception handling practices Prior research studied exception handling based on source code and issue trackers. Cabral and Marques [14] studied exception handling practices from 32 projects in both Java and .Net without considering the flow of exceptions. Prior work by Jo et al. [15] focuses on uncaught exceptions of Java Checked exceptions. They proposed an inter-procedural analysis based on set-based framework without using declared exceptions. Coelho et al. [16] assessed exception handling strategy with exception flows from Aspect-oriented systems and objectoriented systems. They evaluated the number of uncaught exceptions, exceptions caught by subsumption, and exceptions caught with specialized handlers. Sena et al. [17] investigated sampled exception flows from 656 Java libraries for flow characteristics, handler actions, and handler strategies. We extend their work by looking into a higher number of flows per system (e.g. in Apache ANT we identified 930 catch blocks, compared to 2), by considering applications besides libraries and including C# .NET systems. Some studies reveal that developers consider exception handling hard to learn and to use and tend to avoid it or misuse it [9], [10], [11]. Bonifacio et al. [12] also surveyed C++ developers encountering revelations of educational issues. It also has been noted that there is a lack of documentation of exceptions. Kechagia and Spinellis [18] found that 69% of the methods had undocumented exceptions and 19% of crashes could have been caused by insufficient documentation. Sena et al. [17]’s findings confirm that API runtime exceptions are poorly documented. Cabral and Marques [19] identify that infrastructure (20%) and libraries (15%) have better exception handling documentation when compared to applications (2%). Significant research aimed to indicate exception handling problems and their impacts. Sinha et al. [20] leveraged exception flow analyses to study the existence of 11 anti-patterns in four Java systems. Other research [2], [8], [7] classified exception-handling related bugs by mining software issue tracking. In our previous research, we observe the prevalence of exception handling anti-patterns [13]. Cacho et al. [21], [22] studied the evolution of the behavior of exception handling in Java and C# source code changes. Their results highlight the impact of the programming language design differences in the maintenance and robustness of exception handling mechanisms. Our study revisits and combines different aspects of the studies mentioned above. Moreover, we present new findings (see Table I) that are not yet highlighted in prior research. 2 They do analysis in call stack levels per caught exception, but not at the try block level. It cannot be told what is the level in a common scenario. Although Coelho et al. [9] considered the exception flows in Aspect oriented systems, they introduced measurements that we extended in our work. Similar measurements were applied at the try handling block perspective, and in different programming B. Improving exception practices languages. Robillard and Murphy [23]Murphy created a toola tool to analyze exRobillard and [10] created to analyse exception flows in Java programs at at point of the system. Ourinwork ception flows in Java programs, including a graphical user is similar in terms of approach since we also use AST and call terface. Similarly,graph Garcia and Cacho proposed differentthe navigation. We also [24] share the ability ofaidentifying approach for .NET related languages. Garcia Cacho’s tool flows at any point of the program. Weand complement their work by including other different analysis and including different supports visualization of metrics over the application history. projects and programming languages in our datasets. They To support thestudied software development lifecycle, Sinha et subsumption but did not relate to the actions. al. [20] provided automated for [11] development, mainteA tool calledsupport eFlowMining uses a different approach .NET related languages, and exception focus on thehandling. evolution of nance and testingforrequirements related to exception handling code. They applied their tool in smaller To improve how developers would deal with exception systems, with a maximum of 45 try blocks, using different handling complexity, Kechagia et al. [25] discuss and propose measurements. Java control inappropriate coding patterns improvements in the designflows, of including exception handling mechawere evaluated in [12]. They also provide schematic views of nisms. Zhang andpossible Krintzexception [26] propose an as-if-serial exception types at any point in the program, however handling mechanism for parallel programming. they don’t present any relation with documentation or data at the try block level. The burden ofanalysis writing exception handling code has been pointed out by Cabral and Marques [27]. They showed that a system with an automated set of recovery actions is capable of achieving better error resilience than a traditional system. Barbosa et al. developed strategies with heuristics for recommending exception handling code as a semi-automated approach. Zhu et al. [28] proposed an approach that suggests logging decisions for exception handling. By conducting an in-depth study on 16 open source projects, our findings illustrate the opportunities of leveraging various analysis to combine information from different sources to understand and assist in exception handling flows and practices. Our results are valuable to complement and assist in improving existing exception handling techniques. A requires execute a method other means,to has the knowledge otherissues: means, has thea knowledge two 1) having invalid pa two issues:instead 1) having a invalid pa Therefore, of executing a Therefore, instead executing possibly throw two of types of excea possibly throw twowhich types of exce and IOException, corresp and with IOException, deal the two which possiblecorres exce deal needs with the two possible exce oper to either handle the oper needsactions to either handle alternative when suchthe exc alternative actions exc the exception such when that asuch differe source of exception 2: method declaration the exception suchexample, that a differe exception. In our devel public void by A() IOException is propagated A, throws that is IOException, represented by the InvalidPathException exception. In our example, deve exception a { is propagated by A,arrow that is IOException, represented by the InvalidPathException bottom double line in Figure ??. exception a 2) Raising method call and propagating ex try bottom double line arrowcomplements: in Figure ??. raising, documenting velopers 2) Handling practice 2) Raising andknowledge propagating have the thatex { exception Handling raising, documenting and2)propagating practice:complements: We mentioned that the developer sponding velopers have thepossible knowledge that B();practice to two exceptio flow(s) and propagating Wetwo mentioned that the However, developer be } already know that practice: B can throw exception types. sponding to tworaised possible exceptio either newly or propaga catch (InvalidPathException already know that B can two exception types. source ofnewly such exception types are throw not always so clearex) at the However, develop- Bbecalls either raisedCorand propaga (e.g., method the m { such moment. exception types are Bnot always so clear at thefunctions develop- can ment Moreover, could be executing other B exception calls methodblocks C and to then use (e.g., the throws e.printStackTrace(); mentare moment. Moreover, B could be executing other functions our that the issues. can example, use the throws blocks to IO n developers raise }propagating documentation that issues. consult the source code of B block In}are ourpropagating example, if the a developer our example, developers raise I in the method C. Such new In our??) example, if aidentify developer the source code of B propagated } (listing he would the consult propagation of IOException block in thetomethod Such new all the C. methods tha (listing ??) heblocks. wouldHe identify IOException in the throws wouldthe alsopropagation discover theofcalls to C and propagated to all the methods thI 3) Documenting exceptions: Listing 1. An exception handling example. in the throws blocks. He would alsoconsulted. discover the to C and can3)consult IOException getPath. These methods are then C iscalls represented Documenting exceptions: the source code of B getPath. These methodsthat areBthen is represented InvalidPathException in listing ??.exceptions can consult the source code of B in the throw stateme The two can consulted. throw are Cexception flows IOException in listing IOException in the throw always available for a statem metho that arrive??. at A. Figure ?? represents such flows. One exception not public void B() throws IOException not always available for aBmetho source of exception 4: getPath called in method is de flow A, that is InvalidPathException, represented {is handled public void at B() throws IOException getPath called in method B is d external Developers would need to consul by the top single line arrow in Figure ??. One exception flowdocumentation { C(); Developersofwould need totoconsu fileSystem.getPath(invalidPath); JavaDoc) the method disc C(); getPath can throw } fileSystem.getPath(invalidPath); JavaDoc)InvalidPathException. of the method to disc possible InvalidPathException } possible InvalidPathException. There could be cases when an Listing 2. An exception handling example. B propagates two exceptions from two different couldin be cases when anT Listing 2. Anmethods. exception handling example. B IOException propagates two exceptions from notThere available documentation. two different methods. not available in (like documentation. ming languages Java), a poss /** ming languages (like Java), a pos the method declaration. For exam /*** source of exception 3: the possible method declaration. Forisexam the exception that prop * @throws IOException documentation in comment the possible exception that is prop method declaration. However, som Method called when disk failed. IOException * @throws method declaration. However, so Method called when disk failed. undeclared (like InvalidPathExce * */ undeclared (like InvalidPathExce B. Exception flow analysis public static void C() throws IOException */ { B.InException flow analysis public static void C() throws IOException the previous subsection, w a function called A. This function requires to execute the function B. However, the developer, by other means, already know that B can potentially face two issues and, in that case, instead of executing as expected, B would possibly throw two exception types. To deal with the possible exception types the developer needs to either determine the alternative actions that A will execute or propagate the exception so that a different method IOException would take care it. The listing Fig. 1.ofFlows related to A.?? depicts the above scenario. Fig. 1. Flows related to A. { } } throw new IOException(); In the previous subsection, w throw new IOException(); source of exception 1: a exception handling scenario w a exception handling w section, we present our scenario methodolo throw statement Listing 3. An exception handling example. C raises and propagates one exception. Listing 3. An exception handling example. C raises and propagates one Fig. 1. An illustrative example. exception. III. M ETHODOLOGY III. M ETHODOLOGY section, we exceptions present ourand methodol all possible their fl all possible exceptions Our automated tool is and builttheir by lfl Our.NET automated toolPlatform is built by and Compiler (“R 2) Raising and propagating exceptions: As mentioned, the respectively. andsource .NET Compiler Platform (“R C# code, As In this section, we present the methodology of our study. In C# source code, respectively. As tool consistent of three steps. S developer knows that B can have two issues, corresponding In this section, present theofmethodology of our study. In order to ease the we explanation our methodology, we first tool consistent of of three steps.ex all sources possible touse two possible exceptions. These two be order ease the explanation of our methodology, weexceptions first identifycan antoillustrative example with which we then introduce identify all sources of blocks possible the exception handling (cae use exception an newly illustrative example which we from thentheintroduce our flow analysis. Finally, we present subject the either raised or with propagated another method that exception handling are handled. Finally, weblocks recover(ca th our exception flow analysis. Finally, we present the subject of our study. are handled. Finally, we is recover t structing call graph that relevan Bprojects calls (e.g., method C and method getPath). Developers projects of our study. 1structing call graph that is releva A. An illustrative example of exception handling practices can use a throw statement tohandling raise practices an exception. In our 1 A. InAnthis illustrative example of exception subsection, we explain an illustrative example that 1 III. M ETHODOLOGY In this section, we present the methodology of our study. Aiding the explanation of our methodology, we first consider an illustrative example. Second, we introduce our exception flow analysis. Finally, we discuss the subject projects used.1 code, binaries and Tablea example, developers newly raise The IOException with1Our thesource throw In thisraises subsection, we explain an illustrative example also that available handles, and propagates exceptions. example online code, at https://guipadua.github Our source binaries and Table statement in and thepropagates methodexceptions. C. Moreover, if the happens, handles, raises The example alsoissue available online at https://guipadua.githu such exception will propagate to all the methods that call C. 3) Documenting exceptions: From our example, a developer could consult the source code of B and C to identify the rise of IOException in the throw statement. However, the source code is not always available for a method. For example, the method getPath called in method B is declared by an external API. Developers would need to consult the documentation (such as JavaDoc) of the method to discover the propagation of the possible InvalidPathException. There could be cases when an exception is thrown but still not available in the documentation. Therefore, in some programming languages (like Java), a possible exception can be part of the method declaration. For example, method A, B, and C declares that a possible exception can propagate in the throws block of the method declaration. However, some exceptions can remain undeclared (like InvalidPathException). A. An illustrative example of exception handling practices In this subsection, we explain an illustrative example that handles, raises and propagates exceptions (see Figure 1). The example also illustrates the means of documenting exceptions. 1) Handling possible exceptions: In this example, a developer would like to implement a method named A. The method A requires to execute method B. The developer, by other means, has the knowledge that B can face two issues: 1) having an invalid path as input and 2) I/O faults. Therefore, instead of executing as expected, method B would possibly throw two types of exceptions: InvalidPathException and IOException, which correspond to the two issues, respectively. To deal with the two possible exceptions in method B, the developer needs to either handle the exception, i.e., determine the alternative actions when such exception happens, or propagate the exception such that a different method would manage the issue. In our example, the developer decides to handle InvalidPathException only and to propagate IOException. B. Exception flow analysis In the previous subsection, we presented an example of an exception handling scenario with its related flows. In this section, we present our methodology that automatically 1 Source code, binaries, statistical tests and Tableau visualizations with raw data are available online at https://guipadua.github.io/scam2017. 3 extracts possible exceptions and their flows in Java and C# projects. We build an automated tool using Eclipse JDT Core and .NET Compiler Platform (“Roslyn”) to parse the Java and C# source code, respectively. As an overview, our analysis consists of three main steps. First, we identify the exception handling blocks (catch blocks). Second, we recover the flow of exceptions by constructing the call graph that is relevant to the identified catch blocks. Finally, by traversing the flow of exceptions, we identify the sources of possible exceptions. As a building block, we obtain the abstract syntax tree (AST) from the source code. In this step, we include not only the source code but also the binary files of dependencies from the Java Virtual Machine (JVM) for Java or the .NET Global Assembly Cache (GAC) for C#. The dependencies of third party libraries used by the projects are also included. These dependencies enrich the analysis by providing binding information, which draws connections between the different parts of a program (i.e. any method call and its origin, either if part of an internal declaration or external dependency). Also, we enrich the AST by parsing the documentation of the dependencies mentioned above as another source of information. 1) Identifying the handling of exceptions: We collect all the exception handling scenarios through all the catch blocks available in the AST. At the catch block, we use the AST elements to identify the methods that are executed to handle each exception as handling actions. We also obtain the related try blocks, which provide a list of called methods. These methods are necessary since they might raise or propagate the exceptions that the catch block potentially handles. In our example, we identify the catch block in method A. The method printStackTrace is the handling action of the exception InvalidPathException. From this catch block, we obtain the try block in which we find the call to method B. Method B can potentially propagate InvalidPathException and IOException. 2) Constructing call graph: Exceptions are propagated in method calls. Therefore, we leverage call graphs to recover the flow of exceptions. To handle polymorphism without risking over-estimation, we only consider the possible exceptions of the method that is declared in the parent class, since they are more generic and often called within the derived methods. Based on the previous step, for each identified method we traverse its call graph in a depth-first manner to find its possible exceptions. In our example, we traverse the call graph of method B and find two possible exceptions: IOException from method C and InvalidPathException from method getPath. Hence, based on the examples’ catch block, we know that the InvalidPathException is handled in method A while IOException is propagated without handling. 3) Identifying sources of exceptions: During the call graph traverse and based on the AST, we identify four sources of exceptions. They are: 1) The newly raised exception by the throw statement, 2) the declared exception in the throws of the method declaration (only for Java), 3) the documentation as comments in the source code (like JavaDoc comments), and 4) the external documentation. In our illustrative example, we can identify the newly raised IOException in a throw statement TABLE II A N OVERVIEW OF THE SELECTED SUBJECT PROJECTS . Project C# Java Release Version Type # Try # Catch # Method (K) KLOC Glimpse 1.8.6 App. 56 57 1 31 Google API v1.15.0 Lib. 22 30 16 628 OpenRA release-20160508 App. 138 143 7 125 ShareX v11.1.0 App. 334 341 7 177 SharpDevelop 5.0.0 App. 940 1060 41 923 SignalR 2.2.1 Lib. 94 105 2 38 Umbraco-CMS release-7.5.0 App. 595 615 15 362 Apache ANT rel/1.9.7 App. Eclipse JDT Core I20160803-2000 Lib. Elasticsearch v2.4.0 Guava 934 1139 11 158 1,424 1655 25 383 App. 385 408 12 108 v19.0 Lib. 263 317 10 79 Hadoop Common rel/release-2.6.4 Lib. 975 1144 14 147 Hadoop HDFS 44 rel/release-2.6.4 App. 525 586 4 Hadoop MapReduce rel/release-2.6.4 App. 293 367 6 57 Hadoop YARN rel/release-2.6.4 Lib. 1,192 1529 29 257 Spring Framework v4.3.2.RELEASE Lib. 1,940 2301 30 349 Total 10,110 11,797 230 3,866 in method C (source 1), the declaration of the IOException in methods A, B, and C (source 2), and the JavaDoc documentation of method C for IOException (source 3). In addition, since we include the information from external libraries, our tool can also identify that the method getPath called in method B is a source of a possible InvalidPathException (source 4). Some exceptions can be identified from multiple sources. For example, IOException is identified by three separate sources. We do not consider the multiple sources as different exceptions if the exceptions are associated with the same method call (e.g. method B). We label the separate sources of an exception as detailed information for each method call. C. Subject projects Table II depicts the studied subject projects. Our study considers Java and C# due to their popularity and prior research (see Section II). Moreover, we include C# because of its different approach compared to Java exception handling. To facilitate replication of our work, we chose open source projects that are available on GitHub. We leverage GitHub filters on the number of contributors (i.e. projects with multiple contributors) and the number of stargazers (i.e. projects with more than ten stargazers), as they can achieve a good precision for selecting engineered software projects [29]. To narrow down the number of projects we also sorted the projects in descending order of the number of stargazers. Moreover, to potentially investigate the differences in exception handling practices and increase generalizability, we picked projects based on the filtering mentioned above. After reading the official description of the projects, we selected multiple applications and multiple libraries (i.e. project type), as well as multiple projects for different business domains (i.e. project purpose). From each project, we selected the most recent stable version of the source code at the moment of data collection for analysis. 4 IV. Q UANTITY OF E XCEPTIONS In this section, we study the quantity of all possible exceptions that are in each try block. B. Potentially recoverable yet propagated exceptions In the previous subsection, we find that a significant amount of the possible exceptions are propagated. However, not all exceptions are easy to recover or, more importantly, should even be recovered. For example, exceptions such as ThreadDeath in Java, and OutOfMemoryException in C# cannot feasibly be recovered. In fact, both Java and C# define the recoverability level of exceptions in their documentation [31], [32]. In particular, they suggest that developers should handle potentially recoverable exceptions while developers may not handle potentially unrecoverable ones. Hence, we first group all the propagated exceptions into either potentially recoverable or potentially unrecoverable, according to the specific guidance on Java or C# documentation. Then we count the number of propagated exceptions with potential recoverability. We find that almost 8% (117) of C# and more than 19% (1,359) of Java try blocks have at least one potentially recoverable yet propagated exception. For example, a method named rename in Hadoop HDFS for file renaming features has a possible and potentially recoverable exception called FileAlreadyExistsException. This exception indicates the situation where a file is renamed to another existing file. However, this potentially recoverable exception is not handled by any catch block in that method. ⇤ A. All and propagated possible exceptions Ideally, developers should be aware of all possible exceptions to decide between handling or propagating them. To do that, developers need to navigate the call graph of a system that could extend to multiple ramifications. Hence, the more exceptions there are, the more challenging (i.e. exponential growth) it is for developers to comprehend and decide about exception handling. Besides that, missing possible exceptions can be a reason for the lack of a handler that should exist, which is considered one of the top causes of exception handlings bugs [8]. For those reasons, we study the quantity of total and propagated possible exceptions in each exception handling block. As described in our methodology (see Section III), we collect all the methods called in each try block. For those methods, we can recover the possible exceptions. Afterward, we can measure the quantity of possible exception by counting the unique types of exceptions in each try block. We find that there typically exist multiple possible exceptions in each try block (see Figure 2). The median number of distinct possible exception per try block is four and two, for C# and Java respectively. More than 48% (C#) and 38% (Java) of try blocks can throw in between two and five exceptions. Moreover, more than 36% (C#) and 24% (Java) of the try blocks have six or more possible exceptions. For example, an important method named processCompiledUnits(int,boolean) in Eclipse JDT Core in the Compiler class has a try block with 33 distinct possible exceptions. Developers should properly handle exceptions in such an important method, to ensure reliability. Among all possible exceptions, there often exist possible exceptions that are not handled by any of the catch blocks that are associated with a try block [30]. These unhandled exceptions may increase the challenge of exception handling practice since they will be propagated and will need to be handled elsewhere. If the propagated exceptions remain uncaught across the whole system, there could be a risk of system failures [20], [7], [8]. Therefore, we identify the possible exceptions that are not handled by the catch block. Figure 2 presents the possible propagated exceptions for each try statement. We find that there may exist a large number (up to 34) of possible exceptions that are unhandled in each try block. For example, a method execute(List,int) from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask in Apache ANT has 25 possible exceptions while the corresponding catch block only handles IOException. ⇤ ⇥ ⇥ Finding 2: There exists a considerable amount of potentially recoverable exceptions that are propagated, even though they are recommended to be handled by Java and C#. Implications: Exception flow analysis can provide automated tooling support to alert developers about not handling potentially recoverable exceptions. V. D IVERSITY OF E XCEPTIONS There can be a diverse set of exceptions being used across try blocks. Prior research discusses that the use of a high number of distinct exception types might represent a greater concern with exception handling [12]. Therefore, in this section, we study the diversity of exceptions in our subject projects. We count the total number of distinct exception types in each project, and the amount of try blocks in which each type of exception appears. Table III shows the percentage of the exception types of each project that appear in different quantities of try blocks. Despite the large number (up to 97 in C# and 249 in Java) of distinct exception types, there exist a considerable amount of exception types that only appear in few try blocks. In fact, over half of the exception types in C#, and almost 1/3 of the exception types in Java only appear in one try block. Such results imply that although the high number of distinct exception types may be a burden to developers, the burden may not be as high since a considerable amount of the exception types would only affect a small portion of the code. Finding 1: There often exist multiple possible exceptions in each try block, and, out of those, many are propagated. Implications: Current state-of-the-practice may not provide information to developers about all possible exceptions. Automated techniques may help developers be aware of all possible exceptions to make exception handling decisions. 5 Language / Project # Propagated # Prop. and Potenti.. C# Java 20 15 10 5 0 20 Median: 0 Median: 0 15 10 5 0 20 Median: 1 Median: 0 # Total 15 10 5 Median: 4 Median: 2 0 Glimpse Google API OpenRA ShareX SharpDe.. SignalR Umbraco Apache ANT E. JDT Elasticse.. Guava Core H. H. HDFS H. MapR H. YARN Common educe Spring Fig. 2. Number of possible exceptions per try block for each project broken down by Propagated and Potentially Recoverable, Propagated, and Total. A. Multiple sources of the same exception TABLE III T OTAL AMOUNT OF DISTINCT EXCEPTION TYPES AND THE PERCENTAGES The multiple sources of exceptions may increase the complexity of exception handling. Consequently, a developer would need to comprehend and investigate more methods in the source code to effectively handle exceptions. For example, developers may encounter a FileNotFoundException due to missing an input file or configuration file. However, developers may need different actions to handle such an exception since missing an input file may be caused by users’ mistake while missing a configuration file is a critical issue of the software. Multiple sources of the same exception may also impact testers since they would need to properly test the exception behavior as well as the multiple possible paths of control flow. We group each possible exception by the distinct methods that act as a source of exceptions. We only consider distinct methods since the same method may not need different ways to handle the exception while the exception propagated from various methods may need to be handled differently. In Table IV, we present the percentage of possible exceptions that are traced back from zero, one, two and more than two distinct methods. The first group is from zero methods, which means that these possible exceptions were traced back to explicit throw invocations, not method invocations. Although most of the possible exceptions (above 76%) are traced back to a single method, we observe that more than 22% of the exceptions are traced back to multiple invoked methods. The try blocks with the highest number of methods can have from two to 17 among C# projects; while, for Java, it is between five and 34. For example, the Umbraco C# class called TypeFinder performs lazy accesses to all assemblies inside a single try block and therefore System.ArgumentNullException can be traced back from 14 different invoked methods. We also noticed that exceptions that are super classes of other exceptions (e.g., IOException) have a higher than average chances of being from multiple sources. OF DISTINCT EXCEPTION TYPES THAT APPEAR IN DIFFERENT QUANTITY OF TRY BLOCKS . C# Java ⇤ ⇥ Try blocks Project 1 2 3 Glimpse 27.78% 38.89% 11.11% Google API 28.00% 40.00% 12.00% OpenRA 35.71% 4.76% 7.14% ShareX 13.04% 8.70% SharpDevelop 19.59% SignalR 4 5 >5 Total 22.22% 18 4.00% 16.00% 25 16.67% 2.38% 33.33% 42 6.52% 2.17% 6.52% 63.04% 46 8.25% 6.19% 4.12% 2.06% 59.79% 97 56.67% 16.67% 3.33% 6.67% 16.67% 30 Umbraco 27.69% 9.23% 4.62% 1.54% 56.92% 65 Total 55.88% 25.00% 13.97% 9.56% 5.15% 47.79% 214 Apache ANT 15.73% 6.74% 6.74% 3.37% 3.37% 64.04% 89 E. JDT Core 5.56% 2.78% 2.78% 4.17% 1.39% 83.33% 72 Elasticsearch 27.78% 12.50% 16.67% 9.72% 4.17% 29.17% 72 Guava 24.00% 12.00% 16.00% 2.00% 10.00% 36.00% 50 H. Common 14.53% 15.12% 9.88% 11.63% 8.14% 40.70% 172 H. HDFS 27.50% 13.75% 16.25% 7.50% 1.25% 33.75% 80 H. MapReduce 21.74% 8.70% 4.35% 8.70% 2.17% 54.35% 46 H. YARN 17.53% 4.12% 11.34% 6.19% 3.09% 57.73% 97 Spring 22.09% 12.05% 7.63% 10.04% 4.82% 43.37% 249 Total 32.93% 17.76% 15.97% 14.77% 8.38% 42.32% 662 37.83% 19.31% 15.54% 13.66% 7.69% 43.49% 876 Grand Total Finding 3: With a large amount of exceptions exist in each project, many possible exception types appear in only one try block. Implications: Developers may not need to be aware of all exception types in a project by receiving automated suggestions of the exceptions that he/she needs to understand. VI. S OURCES OF E XCEPTIONS The same exception may be traced back from different sources. In this section, we study the sources of exceptions per try block. 6 TABLE IV P ERCENTAGE OF DISTINCT EXCEPTIONS THAT ARE TRACED BACK TO ONE , TWO OR OVER TWO METHODS . 0 ⇤ Distinct methods 1 2 >2 Total C# 1.05% 76.11% 14.05% 8.80% 7,638 Java 0.61% 77.18% 13.00% 9.20% 28,854 Finding 4: Over 22% of the exceptions are traced from different methods. Implications: Automated tools are needed to help developers understand the source of the exception if it is traced back to ⇥ different methods. (a) Java Unchecked Exceptions. B. Sources of exception documentation Prior studies revealed that lacking immediate documentation is one of the challenges of exception handling [14], [17], [18]. Prior studies observed a small number of documented exceptions. As shown in our illustrative example (see Section III-A), possible exceptions can be recovered from up to four different sources. They are: 1) the newly raised exception by the throw statement in the source code, 2) the declared exception in the throws of the method declaration (only for Java), 3) the documentation as comments in the source code (like JavaDoc comments) and 4) the external documentation. By recovering the sources of each possible exception using exception flow analysis, we may be able to provide the documentation of possible exceptions. For Java, we only recover documentation for unchecked exceptions since checked exceptions must be specified in method declarations. We find that, from all the possible exceptions that we identify, 93% for Java and 71% for C# can be retrieved from the external documentation of dependencies. Figure 3 depicts the sets of possible exceptions per try block that were retrieved by our exception flow analysis. Our findings show that the challenge of having a low amount of documented exceptions can be well addressed by applying exception flow analysis with the information from external documents of libraries. We find that such rich documents are typically from the exceptions that are provided by the system libraries. Therefore, the high availability of such documentation can be expected to assist developers not only for our subject systems but also for the majority of Java and C# projects. ⇤ ⇥ (b) C# Exceptions Fig. 3. Quantity of identified possible exceptions per source of information. A. Exception handling strategies Exception handling strategy describes the manner in which an exception is handled. In particular, the relationship between the possible exception in a try block and the handler exception in the corresponding catch blocks. There exist in total two handling strategies: • Specific, is the strategy when the type of a possible exception is exactly the same as the handler exception. • Subsumption, is the strategy when the handler exception is a superclass of a possible exception. Since there can be multiple possible exceptions, it can be overwhelming for a developer to handle each possible exception with a Specific strategy. On the other hand, the Subsumption strategy may introduce uncertainty to the caught exception. To study the handling strategies, we compare each possible exception with the handler exception in the corresponding catch block. Figure 4 depicts the quantity of distinct possible exception per try block that is handled according to each strategy. The majority of the exceptions are handled with a subsumption strategy, while only a small portion of the exceptions are handled specifically. The results show that developers Finding 5: The libraries used by the systems can provide documentation to most of the possible exceptions. Implications: Developers should leverage automated flow analysis to understand possible exceptions. VII. E XCEPTION H ANDLING S TRATEGIES AND ACTIONS In this section, we study the strategy and actions in exception handling practices considering the exception flows of each handler. 7 using each type of action in each C# and Java project. Hence, we examined if there exists statistically significant difference (i.e. p-value < 0.05) between Java and C#. A p-value < 0.05 means that the difference is likely not by chance. We choose Wilcoxon Rank Sum test since it does not have an assumption on the distribution of the data. We find statistically significant difference between Java and C# for exception handing with actions “Throw Wrap”, “Throw New”, “Nested Try”, “Continue” and “Todo”. Among these actions, “Throw Wrap”, “Throw New”and “Todo” may indicate that the exceptions are not effectively handled but rather propagated or ignored. All these three actions show up more in Java than C#. We consider the reason may be that Java compiler forces developers to explicitly manage checked exceptions while developers may not have the knowledge of how to handle them properly. To simply make the program compile, developers potentially take these actions. Further studies should investigate why such actions are chosen more in Java than C#. ⇤ Lang.. Project C# Glimpse Google API OpenRA ShareX SharpDevel.. SignalR Umbraco Total Java Median: 2 Median: 0 Apache ANT E. JDT Core Elasticsearch Guava H. Common H. HDFS H. MapRedu.. H. YARN Spring Total Median: 0 0 5 10 Subsumption Median: 1 15 0 5 10 Specific 15 Fig. 4. Quantity of possible exceptions per try block per project by handling strategy. tend to over-catch exceptions. The extreme case of subsumption strategy is the “Catch Generic” exception handling anti-pattern [13], where developers simply use an exception type which can catch any exceptions in the software, e.g., Exception in Java. Such practice is heavily discussed in prior research [20], [17] and is considered to be harmful since developers cannot optimize the handling of the exception based on the exact type of the exception, but rather only know that there may exist some exceptions during run-time. ⇤ ⇥ ⇥ Finding 7: Java and C# have differences in leveraging various actions when handling exceptions. Implications: More in-depth analysis and user studies are needed to further understand the rationale of differences of Java and C# exception handling practices. We also compare the actions that are taken when the exceptions are handled with either specific or subsumption strategy. We perform Wilcoxon Rank Sum test similar as when comparing Java and C#. This time, for each particular programming language and type of action, the test compared the percentage of specific handling in each project with subsumption handling in each project. Nonetheless, we observe only one action, i.e., Log, that is handled differently (statistically significant) with specific or subsumption strategy. ⇤ Finding 6: Only a small portion of the exceptions are handled with the Specific strategy. Implications: Developers should be guided to prioritize on handling exception with the Specific strategy, since developers cannot optimize the handling of an exception without knowing its exact type information. ⇥ B. Exception handling actions Finding 8: Only one action, Log in Java, is taken differently when exceptions are handled with specific or subsumption strategy. Implications: Research and tooling support are needed to guide how to handle exceptions, especially with the specific strategy. We would like to know if any particular actions are taken when handling some special possible exception. With such knowledge, we may be able to suggest actions automatically to developers handling exceptions. We gather a list of the ten most handled types of possible exceptions in Java and C#, respectively (see Table VI). We also obtain the percentage of possible exceptions that are handled using each action for each exception type. Similarly, we use Wilcoxon Rank Sum test to compare. For each particular programming language, action, and exception type, the test compared the percentage of the given type in each project with the combined value of all other types of exceptions in each project. We find with statistical significance that, for Java, all top exceptions have at least one action that is taken differently from the rest of the exceptions, and, for C#, two top exceptions has such difference. During the exception flow analysis (see Section III), we collect a set of method calls in each catch block to know how each exception is handled. Prior studies [3], [17], [14], [16], [28] propose a list of actions based on the combination of method calls in the catch block as Exception handling actions. Table V presents the list of actions that are defined in prior research and are used in this paper. To further understand how exceptions are handled, we study the exception handling actions in our subject projects. Figure 5 presents the percentages of possible exceptions of each project that are handled using a particular type of action. We observe that Java and C# have differences in executing various actions when handling exceptions. To determine the differences, we perform Wilcoxon Rank Sum test [33] to compare the percentage of possible exceptions that are handled 8 Language Method TABLE VI L IST OF TOP 10 COMMON EXCEPTION TYPES IN THE STUDIED PROJECTS . Java C# Throw Wrap 50.78% Java C# C# Log Java C# Throw New 26.64% Java C# Throw Current 19.56% Java C# Return 11.85% Java C# Nested Try 10.24% Java C# Empty 4.67% Java C# Continue 4.23% Java java.lang.IllegalArgumentException† System.NotSupportedException† java.lang.NullPointerException† System.ArgumentOutOfRangeException java.lang.IndexOutOfBoundsException† System.InvalidOperationException java.lang.SecurityException† System.FormatException java.lang.IllegalStateException† System.IO.IOException java.lang.ExceptionInInitializerError† System.IO.PathTooLongException† java.lang.ArrayStoreException† System.Security.SecurityException java.lang.IllegalAccessException† System.ObjectDisposedException java.lang.ClassNotFoundException† 0.26% C# generalize to other projects, languages or commercial systems. Replicating our study on other subjects may address this threat and further understand the state-of-the-practice of exception handling. Internal validity. We aim to include all possible sources of information in our automated exception flow analysis. However, our analysis may still miss possible exceptions, if there is a lack of documentation or the source code is not compilable. Also, the documentation of the exception may be incorrect or outdated. In our analysis, we trust the content of documentation. Therefore, we cannot claim that our analysis fully recovers all possible exceptions nor that the recovered information is impeccable. Further studies may perform deeper analysis on the quality of exception handling documentation to address this threat. Construct validity. Our study may not cover all possible handling actions. We selected actions based on the previous research in the subject [3], [17], [14], [16], [28]. Some actions are not included in our study if they are either 1) require heuristic to detect or 2) are not well explained in details in related work. Our possible exception identification approach is based on a call graph approximation from static code analysis. We may still miss possible exceptions due to under-estimation for polymorphism or unresolved method overload. Although such approximation may impact our findings, our choice of under-estimation would not significantly alter the existence of observed challenges of exception handling, i.e., the challenge may appear even worse without the under-estimation. Nevertheless, to complement our study, dynamic analysis on the exception flow may be carried out to understand the system exceptions during run-time. 0.13% Java C# Default 0.09% Java C# 0.00% 0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 40.00% 45.00% 50.00% 55.00% 60.00% 65.00% 70.00% Value Fig. 5. Percentage of possible exceptions that are handled using each type of action. ⇥ java.io.IOException† System.ArgumentException Java Todo ⇤ System.ArgumentNullException †The exception has at least one actions that taken statistically significantly differently from the rest exceptions. C# Abort Java 48.08% Finding 9: All top 10 Java and 2 out of top 10 C# exceptions have at least one action that is taken statistically significantly differently from the rest exceptions. Implications: Developers may consider leveraging automated suggestions of exception handling actions. TABLE V L IST OF THE DETECTED ACTIONS . Action Short Description Abort The handler contains an abort statement [3]. Continue The handler contains a continue statement [14]. Default The handler contains the IDE suggested method (Java only). Empty The handler is empty [3], [17], [14], [16]. Log The handler displays or logs some information [17], [14], [16]. Method The handler contains a method invocation different than the other actions listed in this table. [14], [17]. Nested Try The handler contains a new try statement [28]. Return The handler contains a return statement [17], [14]. Throw Current The handler contains a throw statement without a new exception instantiation [17], [14], [16]. Throw New The handler contains a throw statement with a new exception instantiation [17], [14], [16]. Throw Wrap The handler contains a throw statement using the original exception or its associated information [16]. Todo The handler contains TODO or FIXME comments [3]. IX. C ONCLUSION Exception handling is an important feature in modern programming languages. However, prior studies unveil the suboptimal usage of exception handling features in practice. In this paper, we revisit practice of exception handling in 16 open source software in Java and C#. Although we confirm that there exist suboptimal manners of exception handling, VIII. T HREATS TO VALIDITY In this section, we discuss the threats to validity of our findings. External validity. Our study is based on a set of open source Java and C# projects from GitHub. Our findings may not 9 more importantly, we highlight the opportunities of performing source code analysis to recover exception flows to help practitioners tackle various complex issues of handling exceptions. In particular, the contributions of our paper are: 1) We design an automated tool that recovers exception flows from both Java and C#. 2) We present empirical evidence to illustrate the challenges and complexity of exception handling in open source systems. 3) Our exception flow analysis, as an automated tool, can already provide valuable information to assist developers better understand and make exception handling decisions. This paper highlights the opportunities and urgency of providing automated tooling to help developers make exception handling decisions during the development of quality and reliable software systems. [16] R. Coelho, A. Rashid, A. Garcia, F. Ferrari, N. Cacho, U. Kulesza, A. von Staa, and C. Lucena, “Assessing the Impact of Aspects on Exception Flows: An Exploratory Study,” in ECOOP 2008 – ObjectOriented Programming: 22nd European Conference Paphos, Cyprus, July 7-11, 2008 Proceedings, 2008, vol. 5142 LNCS, pp. 207–234. [17] D. Sena, R. Coelho, U. Kulesza, and R. Bonifácio, “Understanding the exception handling strategies of Java libraries,” in Proceedings of the 13th International Workshop on Mining Software Repositories - MSR ’16, 2016, pp. 212–222. [18] M. Kechagia and D. Spinellis, “Undocumented and unchecked: exceptions that spell trouble,” in Proceedings of the 11th Working Conference on Mining Software Repositories - MSR 2014. New York, New York, USA: ACM Press, 2014, pp. 312–315. [19] B. Cabral, P. Sacramento, and P. Marques, “Hidden truth behind .NET’s exception handling today,” Software, IET, vol. 2, no. 1, pp. 233–250, 2007. [20] S. Sinha, A. Orso, and M. Harrold, “Automated support for development, maintenance, and testing in the presence of implicit flow control,” in Proceedings. 26th International Conference on Software Engineering, no. September, 2004, pp. 336–345. [21] N. Cacho, T. César, T. Filipe, E. Soares, A. Cassio, R. Souza, I. Garcia, E. A. Barbosa, and A. Garcia, “Trading robustness for maintainability: an empirical study of evolving c# programs,” Proceedings of the 36th International Conference on Software Engineering - ICSE 2014, no. iii, pp. 584–595, 2014. [22] N. Cacho, E. A. Barbosa, J. Araujo, F. Pranto, A. Garcia, T. Cesar, E. Soares, A. Cassio, T. Filipe, and I. Garcia, “How Does Exception Handling Behavior Evolve? An Exploratory Study in Java and C# Applications,” in 2014 IEEE International Conference on Software Maintenance and Evolution, no. 1. IEEE, sep 2014, pp. 31–40. [23] M. P. Robillard and G. C. Murphy, “Analyzing Exception Flow in Java Programs,” in Proceedings of the 7th European Software Engineering Conference Held Jointly with the 7th ACM SIGSOFT International Symp. on Foundations of Software Engineering, 1999, pp. 322–337. [24] I. Garcia and N. Cacho, “eFlowMining: An Exception-Flow Analysis Tool for .NET Applications,” in 2011 Fifth Latin-American Symposium on Dependable Computing Workshops, no. i. IEEE, apr 2011, pp. 1–8. [25] M. Kechagia, T. Sharma, and D. Spinellis, “Towards a context dependent java exceptions hierarchy,” in Proceedings of the 39th International Conference on Software Engineering Companion, ser. ICSE-C ’17. Piscataway, NJ, USA: IEEE Press, 2017, pp. 347–349. [26] L. Zhang and C. Krintz, “As-if-serial exception handling semantics for Java futures,” Sci. of Computer Programming, vol. 74, pp. 314–332, 2009. [27] B. Cabral and P. Marques, “A transactional model for automatic exception handling,” Computer Languages, Systems and Structures, vol. 37, no. 1, pp. 43–61, 2011. [28] J. Zhu, P. He, Q. Fu, H. Zhang, M. R. Lyu, and D. Zhang, “Learning to Log: Helping Developers Make Informed Logging Decisions,” in 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, vol. 1. IEEE, may 2015, pp. 415–425. [29] N. Munaiah, S. Kroh, C. Cabrey, and M. Nagappan, “Curating GitHub for engineered software projects,” Empirical Software Engineering, pp. 1–35, 2017. [30] M. P. Robillard and G. C. Murphy, “Static analysis to support the evolution of exception structure in object-oriented systems,” ACM Transactions on Software Engineering and Methodology, vol. 12, no. 2, pp. 191–221, 2003. [31] “Chapter 11. Exceptions - Java SE Specification.” [Online]. Available: http://docs.oracle.com/javase/specs/jls/se8/html/jls-11.html, accessed 2017-03-29 [32] “Handling and Throwing Exceptions - .NET Framework Documentation.” [Online]. Available: https://msdn.microsoft.com/enus/library/5b2yeyab(v=vs.110).aspx [33] F. Wilcoxon and R. A. Wilcox, Some rapid approximate statistical procedures. Lederle Laboratories, 1964. R EFERENCES [1] P. M. Melliar-Smith and B. Randell, “Software Reliability: The Role of Programmed Exception Handling,” Reliable Computer Systems, pp. 143–153, 1985. [2] C.-T. Chen, Y. C. Cheng, C.-Y. Hsieh, and I.-L. Wu, “Exception handling refactorings: Directed by goals and driven by bug fixing,” Journal of Systems and Software, vol. 82, no. 2, pp. 333–345, feb 2009. [3] D. Yuan, Y. Luo, and X. Zhuang, “Simple Testing Can Prevent Most Critical Failures,” 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14), 2014. [4] T. Cargill, C++ Gems, S. B. Lippman, Ed. New York, NY, USA: SIGS Publications, Inc., 1996. [5] B. Zhang and J. Clause, “Lightweight automated detection of unsafe information leakage via exceptions,” Proceedings of the 2014 International Symposium on Software Testing and Analysis - ISSTA 2014, pp. 327–338, 2014. [6] F. Cristian, “Exception Handling and Software Fault Tolerance,” Computers, IEEE Transactions on, vol. C-31, no. 6, pp. 531–540, 1982. [7] E. A. Barbosa, A. Garcia, and S. D. J. Barbosa, “Categorizing Faults in Exception Handling: A Study of Open Source Projects,” in 2014 Brazilian Symposium on Software Engineering, no. September. IEEE, sep 2014, pp. 11–20. [8] F. Ebert, F. Castor, and A. Serebrenik, “An exploratory study on exception handling bugs in Java programs,” Journal of Systems and Software, vol. 106, pp. 82–101, aug 2015. [9] S. Nakshatri, M. Hegde, and S. Thandra, “Analysis of exception handling patterns in Java projects,” in Proceedings of the 13th International Workshop on Mining Software Repositories - MSR ’16. New York, New York, USA: ACM Press, 2016, pp. 500–503. [10] M. B. Kery, C. Le Goues, and B. A. Myers, “Examining programmer practices for locally handling exceptions,” in Proceedings of the 13th International Workshop on Mining Software Repositories - MSR ’16. New York, New York, USA: ACM Press, 2016, pp. 484–487. [11] M. Asaduzzaman, M. Ahasanuzzaman, C. K. Roy, and K. A. Schneider, “How developers use exception handling in Java?” in Proceedings of the 13th International Workshop on Mining Software Repositories - MSR ’16. New York, New York, USA: ACM Press, 2016, pp. 516–519. [12] R. Bonifacio, F. Carvalho, G. N. Ramos, U. Kulesza, and R. Coelho, “The use of C++ exception handling constructs: A comprehensive study,” in 2015 IEEE 15th International Working Conference on Source Code Analysis and Manipulation (SCAM). IEEE, sep 2015, pp. 21–30. [13] G. B. de Pádua and W. Shang, “Studying the Prevalence of Exception Handling,” 25th IEEE International Conference on Program Comprehension (ICPC ’17), pp. 1–4, 2017. [14] B. Cabral and P. Marques, “Exception Handling: A Field Study in Java and .NET,” in ECOOP 2007 Object-Oriented Programming, vol. 4609, Berlin, Heidelberg, 2007, pp. 151–175. [15] J. W. Jo, B. M. Chang, K. Yi, and K. M. Choe, “An uncaught exception analysis for Java,” Journal of Systems and Software, vol. 72, no. 1, pp. 59–69, 2004. 10
6cs.PL
A Combinatorial Toolbox for Protein Sequence Design and Landscape Analysis in the Grand Canonical Model arXiv:cs/0101015v1 [cs.CE] 17 Jan 2001 James Aspnes∗ Julia Hartling† Ming-Yang Kao‡ Junhyong Kim§ Gauri Shah¶ December 26, 2017 Abstract In modern biology, one of the most important research problems is to understand how protein sequences fold into their native 3D structures. To investigate this problem at a high level, one wishes to analyze the protein landscapes, i.e., the structures of the space of all protein sequences and their native 3D structures. Perhaps the most basic computational problem at this level is to take a target 3D structure as input and design a fittest protein sequence with respect to one or more fitness functions of the target 3D structure. We develop a toolbox of combinatorial techniques for protein landscape analysis in the Grand Canonical model of Sun, Brem, Chan, and Dill. The toolbox is based on linear programming, network flow, and a linear-size representation of all minimum cuts of a network. It not only substantially expands the network flow technique for protein sequence design in Kleinberg’s seminal work but also is applicable to a considerably broader collection of computational problems than those considered by Kleinberg. We have used this toolbox to obtain a number of efficient algorithms and hardness results. We have further used the algorithms to analyze 3D structures drawn from the Protein Data Bank and have discovered some novel relationships between such native 3D structures and the Grand Canonical model. ∗ Department of Computer Science, Yale University, New Haven, CT 06520-8285, USA. Email: [email protected]. Supported in part by NSF Grant CCR-9820888. † Department of Ecology and Evolutionary Biology, Yale University, New Haven, CT 06520-8285, USA. Email: [email protected]. ‡ Department of Electrical Engineering and Computer Science, Tufts University, Medford, MA 02155, USA. Email: [email protected]. Supported in part by NSF Grant CCR-9531028. § Department of Ecology and Evolutionary Biology, Department of Molecular, Cellular, and Developmental Biology, and Department of Statistics, Yale University, New Haven, CT 06520-8285, USA. Email: [email protected]. Supported in part by Merck Genome Research Institute Grant and NSF Grant DEB-9806570. ¶ Department of Computer Science, Yale University, New Haven, CT 06520-8285, USA. Email: [email protected]. 1 1 Introduction In modern biology, one of the most important research problems is to understand how protein sequences fold into their native 3D structures [23]. This problem can be investigated at two complementary levels. At a low level, one wishes to determine how an individual protein sequence folds. A fundamental computational problem at this level is to take a protein sequence as input and find its native 3D structure. This problem is sometimes referred to as the protein structure prediction problem and has been shown to be NP-hard (see, e.g., [1, 5, 6]). At a high level, one wishes to analyze the protein landscapes, i.e., the structures of the space of all protein sequences and their native 3D structures. Perhaps the most basic computational problem at this level is to take a target 3D structure as input and ask for a fittest protein sequence with respect to one or more fitness functions of the target 3D structure. This problem has been called the protein sequence design problem and has been investigated in a number of studies [3, 7, 9, 16, 27, 30, 33, 35]. The focus of this paper is on protein landscape analysis, for which several quantitative models have been proposed in the literature [7, 30, 33]. As some recent studies on this topic have done [3, 18, 24], this paper employs the Grand Canonical (GC) model of Sun, Brem, Chan, and Dill [33], whose definition is given in Section 2. Generally speaking, the model is specified by (1) a 3D geometric representation of a target protein 3D structure with n amino acid residues, (2) a binary folding code in which the amino acids are classified as hydrophobic (H) or polar (P) [8, 19], and (3) a fitness function Φ defined in terms of the target 3D structure that favors protein sequences with a dense hydrophobic core and with few solvent-exposed hydrophobic residues. In this paper, we develop a toolbox of combinatorial techniques for protein landscape analysis based on linear programming, network flow, and a linear-size representation of all minimum cuts of a network [26]. This toolbox not only substantially expands the network flow technique for protein sequence design in Kleinberg’s seminal paper [18] but also is applicable to a considerably broader collection of computational problems than those considered by Kleinberg. We have used this toolbox to obtain a number of efficient algorithms and hardness results. We have further used the algorithms to analyze 3D structures drawn from Protein Data Bank at http://www.rcsb.org/pdb and have discovered some novel relationships between such native 3D structures and the Grand Canonical model (Figure 1). Specifically, we report new results on the following problems, where ∆ is the number of terms in the fitness function or functions as further defined in Section 3.1. Many of the results depend on computing a maximum network flow in a graph of size O(∆); in most cases, this network flow only needs to be computed once for each fitness function Φ. P1 Given a 3D structure, find all its fittest protein sequences. Note that there can be exponentially many fittest protein sequences. We show that these protein sequences together have a representation of size O(∆) that can be computed in O(∆) time after a certain maximum network flow is computed (Theorem 5), and that individual fittest protein sequences can be generated from this representation in O(n) time per sequence (Theorem 9). P2 Given f 3D structures, find the set of all protein sequences that are the fittest simultaneously for all these 3D structures. This problem takes O(∆) time after f maximum network flow computations (Theorem 8). P3 Given a protein sequence x̂ and its native 3D structure, find the set of all fittest protein sequences that are also the most (or least) similar to x̂ in terms of unweighted (or weighted) Hamming distances. This problem takes O(∆) time after a certain maximum network flow is computed (Theorem 7). 2 P4 Count the number of protein sequences in the solution to each of Problems P1, P2, and P3. These counting problems are computationally hard (Theorem 17). P5 Given a 3D structure and a bound e, enumerate the protein sequences whose fitness function values are within an additive factor e of that of the fittest protein sequences. This problem takes polynomial time to generate each desired protein sequence (Theorem 12). P6 Given a 3D structure, determine the largest possible unweighted (or weighted) Hamming distance between any two fittest protein sequences. This problem takes O(∆) time after a certain maximum network flow is computed (Theorem 10). P7 Given a protein sequence x̂ and its native 3D structure, find the average unweighted (or weighted) Hamming distance between x̂ and the fittest protein sequences for the 3D structure. This problem is computationally hard (Theorem 17). P8 Given a protein sequence x̂, its native 3D structure, and two unweighted Hamming distances d1 and d2 , find a fittest protein sequence whose distance from x̂ is also between d1 and d2 . This problem is computationally hard (Theorem 18(1)). P9 Given a protein sequence x̂, its native 3D structure, and an unweighted Hamming distance d, find the fittest among the protein sequences which are at distance d from x̂. This problem is computationally hard (Theorem 18(2)). We have a polynomial-time approximation algorithm for this problem (Theorem 13). P10 Given a protein sequence x̂ and its native 3D structure, find all the ratios between the scaling factors α and β in Equation 1 in Section 2 for the GC model such that the smallest possible unweighted (or weighted) Hamming distance between x̂ and any fittest protein sequence is minimized over all possible α and β. (This is a problem of tuning the GC model.) We have a polynomial-time algorithm for this problem (Theorem 16). P11 Given a 3D structure, determine whether the fittest protein sequences are connected, i.e., whether they can mutate into each other through allowable mutations, such as point mutations, while the intermediate protein sequences all remain the fittest [2, 8, 17, 20, 22, 29, 31]. This problem takes O(∆) time after a certain maximum network flow is computed (Theorem 11). P12 Given a 3D structure, in the case that the set of all fittest protein sequences is not connected, determine whether two given fittest protein sequences are connected. This problem takes O(∆) time after a certain maximum network flow is computed (Theorem 11). P13 Given a 3D structure, find the smallest set of allowable mutations with respect to which the fittest protein sequences (or two given fittest protein sequences) are connected. This problem takes O(∆) time after a certain maximum network flow is computed (Theorem 11). Previously, Sun et. al. [33] developed a heuristic algorithm to search the space of protein sequences for a fittest protein sequence without a guarantee of optimality or near-optimality. Hart [16] subsequently raised the computational tractability of constructing a single fittest protein sequence as an open question. Kleinberg [18] gave the first polynomial-time algorithm for this problem, which is based on network flow. In contrast, Problem P1 asks for all fittest protein sequences and yet can be solved with the same time complexity. Kleinberg also formulated more general versions of Problems P11 and P12 by extending the fitness function to a submodular function and gave polynomial-time algorithms. Our formulations of these two problems and Problem P13 are directly 3 based on the fitness function of the GC model; furthermore, as is true with several other problems above, once a solution to Problem P1 is obtained, we can solve these three problems in O(∆) time. Among the above thirteen problems, those not yet mentioned in this comparison were not considered by Kleinberg. The remainder of this paper is organized as follows. Section 2 defines the GC model and states the basic computational assumptions. Section 3 describes our three basic tools based on linear programming, network flow, and an O(∆)-size representation of minimum cuts. Section 4 extends these tools to optimize multiple objectives, analyze the structures of the space of all fittest protein sequences, and generate near-fittest protein sequences. Section 5 gives some hardness results related to counting fittest protein sequences and finding fittest protein sequences under additional restrictions. Finally, Section 6 discusses our analysis of empirical 3D structures from the Protein Data Bank. 2 The Grand Canonical Model and Computational Assumptions The Original Model Throughout this paper, all protein sequences are of n residues, unless explicitly stated otherwise. The GC model is specified by a fitness function Φ over all possible protein sequences x with respect to a given 3D structure of n residues [18, 33]. In the model, to design a protein sequence x is to specify which residues are hydrophobic (H) and which ones are polar (P ). Thus, we model x as a binary sequence x1 , . . . , xn or equivalently as a binary vector (x1 , . . . , xn ), where the i-th residue in x is H (respectively, P ) if and only if xi = 1 (respectively, 0). Then, Φ(x) is defined as follows, where the smaller Φ(x) is, the fitter x is, as the definition is motivated by the requirements that H residues in x (1) should have low solvent-accessible surface area and (2) should be close to one another in space to form a compact hydrophobic core. Φ(x) = α X g(di,j ) + β i,j∈H(x),i<j−2 = α X g(di,j )xi xj + β X X si (1) i∈H(x) si xi , where (2) i i<j−2 • H(x) = {i | xi = 1}, • the scaling parameters α < 0 and β > 0 have default values −2 and require tuning for specific applications (see Section 4.4), 1 3 respectively and may • si ≥ 0 is the area of the solvent-accessible contact surface for the residue (in Å) [10, 11], • di,j > 0 is the distance between the residues i and j (in Å), and • g is a sigmoidal function, defined by g= ( 1 1+exp(di,j −6.5) 0 when di,j ≤ 6.5 when di,j > 6.5. Extending the Model with Computational Assumptions Let opt(Φ) be the set of all protein sequences x that minimize Φ. This paper is generally concerned with the structure of opt(Φ). Our computational problems assume that Φ is given as input; in other words, the computations of α, β, si , g(di,j ) are not included in the problems. Also, for the sake of computational generality and notational simplicity, we assume that α may be any nonpositive number, β any nonnegative number, 4 si any arbitrary number, and g(di,j ) any arbitrary nonnegative number; and that the terms g(di,j ) may range over 1 ≤ i < j ≤ n, unless explicitly stated otherwise. Thus, in the full generality of these assumptions, Φ need not correspond to an actual protein 3D structure. Note that the relaxation that si is any number is technically useful for finding Φ-minimizing protein sequences x that satisfy additional constraints. We write ai,j = −α·g(di,j ) ≥ 0 and bi = β·si and further assume that the coefficients ai,j and bi are rational with some common denominator, that these coefficients are expressed with a polynomial number of bits, and that arithmetic operations on these coefficients take constant time. With these assumptions, we define the following sets of specific assumptions about Φ to be used at different places of this paper. P P F1 Let Φ(x) = − 1≤i<j≤n ai,j xi xj + 1≤i≤n bi xi , where ai,j ≥ 0, bi is arbitrary, and m of the coefficients ai,j are nonzero. Let ∆ = n + m. P F2 For each β ≥ 0, let Φβ (x) = − 1≤i<j≤n ai,j xi xj + β of the coefficients ai,j are nonzero. Let ∆ = n + m. P 1≤i≤n si xi , F3 For each ℓ from 1 to f , let the ℓ-th fitness function Φℓ (x) = − where aℓi,j ≥ 0 and bℓi is arbitrary. Let ∆ = f n2 . P where ai,j ≥ 0, si ≥ 0, and m ℓ 1≤i<j≤n ai,j xi xj + P ℓ 1≤i≤n bi xi , Sometimes we measure the dissimilarity between a fittest protein sequence x and a target protein sequence x̂ in terms of Hamming distance. This distance is essentially the count of the positions i where xi 6= x̂i and can be measured in two ways. The unweighted Hamming distance is |x − x̂|, where P P |y| denotes the norm of vector y, i.e., ni=1 |yi |. The weighted Hamming distance is ni=1 wi ·|xi − x̂i |. Throughout this paper, the weights w1 , . . . , wn are all arbitrary unless explicitly stated otherwise. 3 Three Basic Tools This section describes our basic tools for computing fittest and near-fittest protein sequences. For instance, Lemma 1 gives a representation of the problem of minimizing Φ as a linear program. Lemma 2 further gives a representation of this problem as a minimum-cut problem, which generalizes a similar representation of Kleinberg [18]. Theorem 5 gives a compact representation of the space opt(Φ) using a Picard-Queyranne graph [26]. 3.1 Linear Programming From Equation 2, minimizing Φ(x) is an optimization problem in quadratic programming. Fortunately, because all the coefficients ai,j are nonnegative, it can be converted to a linear program, as shown in Lemma 1. Lemma 1 (characterizing Φ via linear program) Let Φ be as defined in Assumption F1. Consider the following linear program whose variables consist of the variables xi , together with new variables yi,j for all i, j with ai,j 6= 0: P minimize Φ′ (x, y) = − ai,j yi,j + subject to 0 ≤ xi ≤ 1  ∀i 0 ≤ yi,j ≤ 1   yi,j ≤ xi ∀i, j : ai,j 6= 0   yi,j ≤ xj 5 P bi x i (3) There is a one-to-one correspondence that preserves x between the protein sequences that minimize Φ(x) and the basic optimal solutions to Linear Program (3). Proof: First, we show that for each 0-1 assignment to x there is a unique value of y that minimizes Φ′ (x, y). Choose some yi,j , and suppose that either xi or xj is 0. Then yi,j is also 0 by the constraint yi,j ≤ xi or yi,j ≤ xj . Alternatively, suppose xi and xj are both 1; then if yi,j is 0, Φ′ can be decreased by ai,j by setting yi,j to 1 without violating any constraints. Thus, in any optimal integral solution to Linear Program (3), yi,j = min(xi , xj ) = xi xj . P P Note that substituting xi xj for yi,j in Φ′ gives precisely − i,j ai,j xi xj + i bi xi = Φ(x); thus minimizing Φ′ (x, y) is equivalent to minimizing Φ(x). We now must show that all solutions to Linear Program (3) are integral. Every element of the constraint matrix is either zero or ±1. Each row has either a single nonzero element (e.g, for the 0-1 bounds) or consists of zeroes and exactly one +1 and one −1. Thus the matrix is totally unimodular, e.g., using [25, Theorem 13.3]. Since the right-hand side is integral, any vertex of the polytope defined by Linear Program (3) is integral [25, Theorem 13.2]. Thus, all basic feasible solutions to Linear Program (3) are 0-1 vectors. So if (x, y) is a basic optimal solution to Linear Program (3), then x ∈ opt(Φ). Conversely, if x ∈ opt(Φ), then the vector (x, y) in which yi,j = xi xj whenever ai,j is nonzero is an optimal solution to Linear Program (3), which is a basic optimal solution since an appropriate subset of the constraints 0 ≤ xi ≤ 1 and 0 ≤ yi,j ≤ 1 form a basis. Note that any xi with a negative coefficient bi is set to 1 in any optimal solution, as in this case all terms containing xi have negative coefficients and are minimized when xi = 1. So an alternative to allowing negative coefficients is to prune out any xi with a negative coefficient. This process must be repeated recursively, since setting xi to 1 reduces terms of the form −ai,j xi xj to −ai,j xj , and may yield more degree-1 terms with negative coefficients. To simplify our discussion, we let the linear program (or, in Section 3.2, the minimum-cut algorithm) handle this pruning. 3.2 Network Flow Recall that an s-t cut is a partition of the nodes of a digraph into two sets Vs and Vt , with s ∈ Vs and t ∈ Vt . Also, a minimum s-t cut is an s-t cut with the smallest possible total capacity of all edges from nodes in Vs to nodes in Vt . In Kleinberg’s original construction [18], Φ(x) was minimized by solving an s-t minimum cut problem in an appropriate digraph G. Lemma 2 describes a more general construction that includes additional edges (s, vi ) to handle negative values for bi . Lemma 2 (characterizing Φ via network flow) Let Φ be as defined in Assumption F1. Let GΦ be a graph with a source node s, a sink node t, a node vi for each i, and a node ui,j for each i, j with ai,j 6= 0, for a total of n + m + 2 = ∆ + 2 nodes. Let the edge set of GΦ consist of • (s, ui,j ) for each ui,j , with capacity ai,j , • (vi , t) for each vi with bi > 0, with capacity bi , • (s, vi ) for each vi with bi < 0, with capacity −bi , and • (ui,j , vi ) and (ui,j , vj ), for each ui,j , with infinite capacity, 6 for a total of Θ(∆) edges. There is a one-to-one correspondence between the minimum s-t cuts in GΦ and the protein sequences in opt(Φ), such that vi is in the s-component of a cut if and only if xi = 1 in the corresponding protein sequence. Proof: We will show that the minimum s-t cuts in GΦ correspond to Φ-minimizing protein sequences via Linear Program (3) of Lemma 1. Given a minimum s-t cut in G, let xi be 1 if vi is in the s component, and 0 otherwise. Similarly, let yi,j be 1 if ui,j is in the s component, and 0 otherwise. Since no infinite-capacity edge (ui,j , vi ) or (ui,j , vj ) can appear in the cut, if ui,j is in the s-component then vi and vj are as well. In terms of the x and y variables, we have yi,j ≤ xi and yi,j ≤ xj whenever ai,j is nonzero, precisely the same constraints as in Linear Program (3). Conversely, any 0-1 assignment (x, y) for which these constraints hold defines an s-t cut that does not include any infinite-capacity edge. Turning to the objective function, the total capacity of all edges in the cut is X ai,j (1 − yi,j ) + ai,j 6=0 = X i,j ai,j − X X bi >0 bi − bi <0 bi xi + X X −bi (1 − xi ) bi <0 ai,j yi,j + X bi xi = K + Φ′ (x, y), i i,j where K is a constant and Φ′ (x, y) is the objective function of Linear Program (3). Thus, the capacity of the cut is minimized when Φ′ (x, y) is. The rest follows from Lemma 1. Lemma 3 Let Φ be as defined in Assumption F1. Given Φ as the input, we can find an x ∈ opt(Φ) in O(∆2 log ∆) time. Proof: Given a digraph G = (V, E) as input, the Goldberg-Tarjan maximum-flow algorithm takes O(|V ||E| log(|V |2 /|E|)) time [14]. We first apply Lemma 2 to Φ to obtain GΦ . We next use this maximum-flow algorithm to find a minimum s-t cut in GΦ and then an optimal x from this cut. All these steps take O(∆2 log ∆) total time. 3.3 A Compact Representation of Minimum Cuts A given Φ may have more than one fittest protein sequence. Theorem 5 shows that opt(Φ) can be summarized compactly using the Picard-Queyranne representation of the set of all minimum s-t cuts in a digraph G [26], which is computed by the following steps: 1. computing any maximum flow φ in G; 2. computing strongly connected components in the residual graph Gφ whose edge set consists of all edges in G that are not saturated by φ, plus edges (v, u) for any edge (u, v) that has nonzero flow in φ; 3. contracting Gφ by contracting into single supernodes the set of all nodes reachable from s, the set of all nodes that can reach t, and each strongly connected component in the remaining graph. The resulting graph Gs,t is a dag in which s and t are mapped to distinct supernodes by the contraction. Furthermore, there is a one-to-one correspondence between the minimum s-t cuts in G and the ideals in Gs,t , where an ideal is any node set I with the property that any predecessor of a node in I is also in I. 7 Lemma 4 (see [26]) Given a digraph G with designated nodes s and t, there is a graph Gs,t together with a mapping κ from V (G) to V (Gs,t ) with the following properties: 1. |V (Gs,t )| ≤ |V (G)|. 2. The node κ(s) has out-degree 0 while κ(t) has in-degree 0. 3. Given G as the input, Gs,t and κ can be computed using one maximum-flow computation and O(|E(G)|) additional work. 4. A partition (Vs , Vt ) of V (G) is an s-t minimum cut in G if and only if Vt = κ−1 (I) for some ideal I of Gs,t that contains κ(t) but not κ(s). Combining Lemmas 2 and 4 gives the desired compact representation of the space of all fittest protein sequences, as stated in the next theorem. Theorem 5 (characterizing Φ via a dag) Let Φ be as defined in Assumption F1. There exists a ′ ′ Φ dag GΦ s,t with designated nodes s and t and a mapping ρ from {1, . . . , n} to V (Gs,t ) with the following properties: 1. GΦ s,t has at most n + 2 nodes. 2 2. Given Φ as the input, GΦ s,t and ρ can be computed in O(∆ log ∆) time. 3. There is a one-to-one correspondence between the protein sequences x ∈ opt(Φ) and the ideals of b Φ = GΦ − {s′ , t′ }, in which xi = 0 if and only if ρ(i) = t′ or ρ(i) is in the ideal corresponding G s,t s,t to x. Proof: The graph GΦ s,t is obtained by applying Lemmas 2 and 4. Let κ be the contraction map from Lemma 4. Let s′ = κ(s) and t′ = κ(t). The mapping ρ(i) is defined as κ(vi ). Φ To show that GΦ s,t has at most n + 2 nodes, consider any node ui,j in G . Let φ be the maximum Φ flow used to define Gs,t . If φ(s, ui,j ) = 0, then ui,j is reachable from s in the residual graph GΦ φ , and ui,j is contracted onto the κ(s) supernode; if φ(s, ui,j ) > 0, then at least one of φ(ui,j , vi ) or φ(ui,j , vj ) is nonzero and ui,j is in the same strongly connected component in GΦ φ as at least one of vi and vj . In either case ui,j is contracted onto a supernode that contains s or some vi ; since the same thing happens to all ui,j , there are at most n + 2 supernodes in GΦ s,t : one for each vi , plus one for each of s and t. b Φ is justified by the observation that requiring t′ to be in an ideal and s′ to be Using ideals of G s,t out of it has no effect on the presence or absence of other nodes, as t′ has no predecessors and s′ has ′ ′ no successors in GΦ s,t ; thus there is a one-to-one correspondence preserving all nodes except s and t Φ ′ ′ Φ b . between the ideals of Gs,t containing t but not s and the ideals of G s,t Remark. At some additional cost in time, Assumption F1 can be replaced in Theorem 5 by the weaker assumption that Φ is submodular (i.e., that Φ(X ∪ Y ) + Φ(X ∩ Y ) ≤ Φ(X) + Φ(Y ) for all X, Y , where each protein sequence x in Φ’s domain is regarded as the set X = {i | xi = 1} for the purposes of taking unions and intersections). The reason is that a representation similar to the Picard-Queyranne graph exists for the set of minima of any such submodular function. These minima form a family closed under union and intersection, and any such family corresponds to the ideals of an appropriate digraph [15, Proposition 10.3.3]. Such a representation can be computed efficiently, as shown by Gabow [12]. 8 Intuitively, what Theorem 5 says is the following. For any Φ, the residues in fittest protein sequences are grouped into clusters, where the cluster ρ−1 (s) is always H, the cluster ρ−1 (t) is always P , and for each of the remaining clusters, all residues in the cluster are either all H or all P . In b Φ , such that if a cluster corresponding to the addition, there is a dependence given by the edges of G s,t source of an edge is all H then the cluster at the other end is also all H. There is no additional restriction on the structure of the space of all fittest protein sequences beyond those that follow from correspondence with the ideals of some digraph. As shown in Theorem 6, b Φ , with any number of residues mapped to each supernode. any graph may appear as G s,t Theorem 6 (characterizing a dag via Φ) Let Ĝ be an arbitrary digraph with n nodes, labeled 1 to n, and m edges. Let Ĝ0 be the component graph of Ĝ obtained by contracting each strongly connected component of Ĝ to a single supernode through a contraction map κ. Then, there exists some Φ as defined in Assumption F1 such that for the GΦ s,t and ρ defined in Theorem 5, an isomorphism exists Φ b between Gs,t and Ĝ0 mapping each ρ(i) to κ(i). Proof: Represent each node i in Ĝ by the variable xi . For each i, j, let ei,j = 1 if there is a directed edge (i, j) in Ĝ, and 0 otherwise. To define Φ, let ai,j = ei,j + ej,i for each i < j; and, for P each i, let bi equal i’s out-degree δ+ (i) = j ei,j . Apply Lemma 2 to the resulting function Φ to get a graph GΦ . Define a flow φ in GΦ as follows: φ(s, ui,j ) φ(ui,j , vi ) φ(ui,j , vj ) φ(vi , t) = = = = ei,j + ej,i ei,j ej,i δ+ (i) ∀ui,j ∀ui,j ∀ui,j ∀vi Note that this flow is a maximum flow because it saturates all edges leaving s as well as all edges entering t. (It happens that this is the unique maximum flow, but we do not need this fact, as the Picard-Queyranne construction works for any maximum flow.) Φ Our next goal is to show that the residual graph GΦ φ of this flow contracts to Ĝ0 . Gφ has the following classes of edges: (ui,j , s) (ui,j , vi ) (ui,j , vj ) (vi , ui,j ) (vj , ui,j ) (vi , t) ∀ui,j when (i, j) ∈ Ĝ when (j, i) ∈ Ĝ ∀vi Φ Since s has no successors and t has no predecessors in GΦ φ , the supernodes in Gs,t containing s and t consist of only s and t, respectively. Each node ui,j is in the same strongly-connected component as at least one of vi or vj , so no other supernodes exist in GΦ s,t that do not contain at least one of the nodes vi . Note that every node-simple path from vi to vj in GΦ φ is of the form vi , ui,q1 , vq1 , uq1 ,q2 , . . . , uqk−1 ,j , vj (with the subscripts of each uqi ,qi+1 possibly reversed), which corresponds to a node-simple path i = q1 , q2 , . . . , qk = j in Ĝ. The converse also holds. Therefore, i and j are in the same strongly connected component in Ĝ if only if vi and vj are in the same strongly connected component in GΦ s,t . Φ Now recall that for each i, ρ(i) is defined in Lemma 2 as the supernode in Gs,t containing vi . So an Φ edge from ρ(i) to ρ(j) in GΦ s,t corresponds to a node-simple path from vi to vj Gs,t . By the above Φ path-to-path correspondence, every directed edge from ρ(i) to ρ(j) in Gs,t corresponds to an edge 9 b Φ is isomorphic to Ĝ0 , with the correspondence from κ(i) to κ(j), and vice versa. In summary, G s,t ρ(i) ↔ κ(i) for all i. 4 Further Tools for Protein Landscape Analysis 4.1 Optimizing Multiple Objectives We can extend the results of Section 3 beyond optimizing a single fitness function. With more than one fittest protein sequence to choose from, we may wish to find a fittest protein sequence x that is the closet to some target protein sequence x̂ in unweighted or weighted Hamming distance. Theorem 7 shows that this optimization problem is as easy as finding an arbitrary fittest protein sequence. We may also wish to consider what protein sequences are simultaneously the fittest for more than one fitness function. Theorem 8 shows how to compute a representation of this set similar to that provided by Theorem 5. Theorem 7 (optimizing Hamming distances and H-residue counts over opt(Φ)) Let Φ be as defined in Assumption F1. 1. Given a target protein sequence x̂, some weights wi , and Φ as the input, we can find in P O(∆2 log ∆) time an x ∈ opt(Φ) with the minimum weighted Hamming distance i wi |xi − x̂i | over opt(Φ). 2. Given Φ as the input, we can find in O(∆2 log ∆) time an x ∈ opt(Φ) with the largest (or smallest) possible number of H residues over opt(Φ). Proof: The statements are proved as follows. Statement 1. Let ǫ be a positive constant at most 4W1nc , where W ≥ max |wi | and c is the common denominator of all coefficients ai,j and bi . Below we show how to find a desired fittest protein sequence P by minimizing Φǫ (x) = Φ(x) + i ǫwi |xi − x̂i |. First of all, since x and x̂ are 0-1 sequences, |xi − x̂i | = (xi − x̂i )2 = xi − 2x̂i xi + x̂i . Then, since x̂ is given, Φǫ (x) can be minimized using Lemma 3 in O(∆2 log ∆) time. Now suppose that y and z are two protein sequences with y ∈ opt(Φ) and z 6∈ opt(Φ). Then, P 1 1 . Therefore, Φǫ (z) − Φǫ (y) ≥ 1c − 2W n ≥ 2c . Φ(z) − Φ(y) ≥ 1c . Also, | i wi |xi − x̂i || ≤ W n ≤ 4c Thus every x that minimizes Φǫ (x) must also minimize Φ(x). The Hamming distance term in Φǫ guarantees that from all x that do minimize Φ(x), minimizing Φǫ (x) selects one that also minimizes this distance. Statement 2. To find an x ∈ opt(Φ) with the largest (respectively, smallest) possible number of H residues, apply Statement 1 with all wi = 1 and all x̂i = 1 (respectively, x̂i = 0). Suppose we are given fitness functions Φ1 , . . . , Φf corresponding to multiple 3D structures, and we wish to find protein sequences that are simultaneously optimal for each 3D structure. A simple approach is to observe that the function Φ∗ = Φ1 + · · · + Φf satisfies Assumption F1, and that any protein sequence that simultaneously optimizes each Φℓ optimizes Φ∗ . However, we must check any minimum solution for Φ∗ to see that it is in fact a minimum solution for each Φℓ , as it may be that the sets of minimum solutions of the Φℓ have empty intersection. Performing both the optimization of Φ∗ and of the f individual fitness functions requires f + 1 network flow computations. It turns out that we can reduce this cost to f network flows at the cost of some additional work ∗ Φℓ to compute a composite Picard-Queyranne graph GΦ s,t directly from the individual graphs Gs,t . This 10 approach, described in Theorem 8, is especially useful if we have already computed the individual graphs for some other purpose. Theorem 8 (minimizing multiple fitness functions) Let Φ1 , . . . , Φf be as defined in Assumpℓ ℓ ℓ tion F3. For each ℓ, let GΦ s,t and ρ be the dag and map computed from Φ in Theorem 5. Given ℓ ℓ all GΦ s,t and ρ as the input, there is an O(∆)-time algorithm that either (a) determines that there ∗ is no protein sequence x that simultaneously minimizes Φ1 through Φf , or (b) constructs a dag GΦ s,t ∗ with designated nodes s′ and t′ and a mapping ρ∗ from {1, . . . , n} to V (GΦ s,t ), such that there is a one-to-one correspondence between the protein sequences x that simultaneously minimize all Φℓ (x) b Φ∗ = GΦ∗ − {s′ , t′ }, in which xi = 0 if and only if ρ∗ (i) = t′ or ρ∗ (i) is in the ideal and the ideals of G s,t s,t corresponding to x. Proof: By Theorem 5, the conditions below are necessary and sufficient for x to minimize Φℓ : • xi = 1 if ρℓ (i) = s′ . • xi = 0 if ρℓ (i) = t′ . • xi = xj if ρℓ (i) = ρℓ (j). b Φℓ . • xi ≤ xj if (ρℓ (i), ρℓ (j)) is an edge in G s,t We will build a graph G whose nodes are s, t, and 1, . . . , n, and put in an edge (u, v) between any nodes for which the constraint u ≤ v is required to minimize some Φℓ . In particular, we have the following classes of edges, for each ℓ, where each class represents one of the above conditions: • (s, v) and (v, s) whenever ρℓ (v) = s′ . • (t, v) and (v, t) whenever ρℓ (v) = t′ . • (u, v) and (v, u) whenever ρℓ (u) = ρℓ (v). ℓ b Φ )). • (u, v) whenever (ρℓ (u), ρℓ (v) ∈ E(G s,t An assignment of 1 to s, 0 to t, and xi to each node i satisfies u ≤ v whenever (u, v) ∈ E(G) if and only if all of the constraints required for x to simultaneously minimize all Φℓ are satisfied. Note that such an assignment might not exist. ∗ To convert G into the desired graph GΦ s,t , and to check whether there exist any assignments meeting the constraints, contract each strongly connected component of G. If s and t are in the same ∗ strongly connected component, no simultaneous fittest solutions exist. Otherwise, let s′ in GΦ s,t be the supernode that contains s from G; let t′ be the supernode that contains t. Also, for each u in 1, . . . , n, let ρ∗ (u) be the supernode into which u is contracted. Then x simultaneously minimizes all Φℓ if and only if xi = 1 when ρ∗ (i) = s′ , xi = 0 when ρ∗ (i) = t′ , and xi ≤ xj when (ρ∗ (i), ρ∗ (j)) is an ∗ Φ∗ edge in GΦ s,t —precisely the condition that the zeroes in x correspond to nodes in some ideal of Gs,t that contains t′ but not s′ . To show the running time, observe that constructing the graph G takes O(∆) time, which dominates the contraction step. 11 4.2 The Space of All Fittest Protein Sequences This section discusses some applications of the representation of the space opt(Φ) given by Theorem 5. Theorem 9 gives an algorithm to enumerate this space. Theorem 10 gives an algorithm to compute the diameter of the space in nonnegatively weighted Hamming distance. Theorem 11 gives an algorithm to determine connectivity properties of the space with respect to various classes of mutations. Theorem 9 (enumerating all protein sequences) Let Φ be as defined in Assumption F1. Given the GΦ s,t and ρ defined in Theorem 5 as the input, the protein sequences in opt(Φ) can be enumerated in O(n) time per protein sequence. b Φ |) = O(n) b Φ in time O(|V (G Proof: An algorithm of Steiner [32] enumerates the ideals of G s,t s,t per ideal. For each ideal, invert the mapping ρ (in O(n) time) to recover the corresponding protein sequence x. Theorem 10 (computing the diameter) Let Φ be as defined in Assumption F1. Given the GΦ s,t and ρ defined in Theorem 5 as the input, it takes O(n) time to compute the diameter of opt(Φ) in weighted Hamming distance where the weights wi are all nonnegative. Proof: Any two fittest protein sequences x and y can differ only at indices i where ρ(i) ∈ / {s, t}. b Φ )). Then, d is an upper bound on the diameter. Let d be the total weight of indices i ∈ ρ−1 (V (G s,t b Φ ) are both ideals of G b Φ , and these ideals correspond to two It is also a lower bound, as ∅ and V (G s,t s,t protein sequences at distance d from each other. b Φ to determine whether opt(Φ) is connected for various models of mutations. For We can use G s,t instance, we can determine whether the space is connected for one-point mutations, in which at most one residue changes with each mutation and all intermediate protein sequences must remain the fittest. More generally, we can determine the minimum k so that the space is connected where each mutation modifies at most k residues. We adopt a general model proposed by Kleinberg [18]. In the model, there is a system Λ of subsets of {1, . . . , n} that is closed downward, i.e., if A ⊆ B ∈ Λ, then A ∈ Λ. Two protein sequences x and y are Λ-adjacent if they are in opt(Φ) and differ exactly at the positions indexed by elements of some member of Λ. A Λ-chain is a sequence of protein sequences in opt(Φ) where each adjacent pair is Λ-adjacent. Two protein sequences x and y are Λ-connected if there exists a Λ-chain between x and y. A set of protein sequences is Λ-connected if every pair of elements of the set are Λ-connected. We would like to tell for any given Λ and Φ whether particular protein sequences are Λ-connected and whether the entire opt(Φ) is Λ-connected. Kleinberg [18] gives polynomial-time algorithms for these problems that take Λ as input (via oracle calls) and depend only on the fact that Φ is submodular. We describe a much simpler algorithm b Φ from Theorem 5. This algorithm not only determines whether two protein sequences that uses G s,t (alternatively, all protein sequences in opt(Φ)) are connected for any given Λ, but also determines the unique minimum Λ for which the desired connectivity holds. Almost all of the work is done in b Φ ; once we have this representation, we can read off the connectivity of opt(Φ) the computation of G s,t directly. Theorem 11 (connectivity via mutations) Let Φ be as defined in Assumption F1. The following problems can both be solved in O(n) time. 12 ′ 1. Given the GΦ s,t and ρ defined in Theorem 5 and two protein sequences x and x in opt(Φ) as the input, compute the maximal elements of the smallest downward-closed set system Λ such that x and x′ are Λ-connected. 2. Given the GΦ s,t and ρ defined in Theorem 5 as the input, compute the maximal elements of the smallest downward-closed set system Λ such that opt(Φ) is Λ-connected. Proof: The statements are proved as follows. b Φ such that the sets of zeros in x, x′ are ρ−1 (I), ρ−1 (I ′ ), Statement 1. Let I, I ′ be the ideals in G s,t respectively. Let the maximal elements of Λ be the sets ρ−1 (v) over all v ∈ I ⊖ I ′ , where ⊖ is the symmetric difference operator. Thus, Λ consists of these sets and all of their subsets. We will show that Λ is the smallest downward-closed set system such that there is a Λ-chain between x and x′ in opt(Φ). First, consider some set system Λ′ where for some v ∈ I ⊖ I ′ , A = ρ−1 (v) is not in Λ′ . Recall that x must be constant at the positions indexed by elements of A, where the constant depends on b Φ corresponding to x. Partition opt(Φ) into sets Ω0 and Ω1 , whether or not v is in the ideal in G s,t j where Ω consists of all z with zi = j for all i ∈ A. Since x and x′ differ on ρ−1 (v), one of them is in Ω0 and the other is in Ω1 . However, since A ∈ / Λ′ , no protein sequence in Ω0 is Λ′ -adjacent to one in 1 ′ ′ Ω . So there is no Λ -chain between x and x . Conversely, to exhibit a Λ-chain from x to x′ , it suffices to show by iterations a Λ-chain from x to the protein sequence y whose zeroes are given by ρ−1 (I ∩ I ′ ); the case of x′ is symmetric. Let I0 = I. If at any iteration Ii = I ∩ I ′ , we are done. Otherwise, let v be a maximal element in Ii − (I ∩ I ′ ). Then, Ii+1 = Ii − {v} is also an ideal. Since v ∈ I ⊖ I ′ , ρ−1 (v) ∈ Λ and the protein sequences corresponding to Ii and Ii+1 are Λ-adjacent. After at most n such iterations, we reach y. Statement 2. Let x and x′ be the protein sequences in opt(Φ) with the largest and the smallest b Φ and its possible numbers of H residues, respectively. In other words, x and x′ correspond to G s,t −1 Φ b empty ideal, respectively. If Λ includes ρ (v) for all v ∈ V (Gs,t ), then by Statement 1, there are Λ-chains between any y ∈ opt(Φ) and x′ and thus between any two protein sequences in opt(Φ). If it does not, then there is no Λ-chain between x and x′ . In summary, the maximal elements of Λ are b Φ ). the sets ρ−1 (v) over all v ∈ V (G s,t 4.3 Generating Near-Fittest Protein Sequences Finding good protein sequences other than the fittest is trickier, as Lemma 1 breaks down if we are not looking at the fittest protein sequences. This section gives two algorithms that avoid this problem. Theorem 12 describes an algorithm to generate all protein sequences x in order of increasing Φ(x). Theorem 13 describes an algorithm to generate the fittest protein sequences at different unweighted Hamming distances, which is useful for examining the trade-off between fitness and distance. The algorithm for generating all protein sequences x in increasing order by Φ(x) is based on Lemma 3 and a general technique for enumerating suboptimal solutions to combinatorial optimization problems due to Lawler [21]. It is similar to an algorithm of Vazirani and Yannakakis [34] for enumerating suboptimal cuts. We cannot use the Vazirani-Yannakakis algorithm directly because suboptimal cuts in GΦ might include cuts corresponding to assignments in which yi,j is not equal to xi xj for some i, j. Theorem 12 (enumerating all protein sequences) Let Φ be as defined in Assumption F1. With Φ as the input, we can enumerate all protein sequences x in order of increasing Φ(x) in time O(n∆2 log ∆) per protein sequence. 13 Proof: For any length-k 0-1 sequence y = y1 , y2 , . . . , yk , let Ay be the set of all length-n 0-1 sequences x with xi = yi for each yi with 1 ≤ i ≤ k. Let ε be the empty sequence. Then, Aε is the set of all length-n sequences. Observe that we can find an element z ∈ Ay that minimizes Φ(z) over Ay in time O(∆2 log ∆) by setting zi = yi in Φ(z) for each yi and applying Lemma 3. Furthermore, the set Ay − {z} is the disjoint union of the sets Ari for k + 1 ≤ i ≤ n, where ri = z1 , z2 , . . . , zi−1 , (1 − zi ). To enumerate x in order of increasing Φ(x), we maintain a data structure that represents all protein sequences less those already returned as a disjoint union of sets of the form Ay , together with an Φ-minimizing element z for each, organized as a priority queue with key Φ(z). Initially, the queue contains only (Aε , z), where z ∈ opt(Φ) is computed using Lemma 3 in time O(∆2 log ∆). At each step, the smallest pair (Ay , z) is removed from the priority queue and is replaced by up to n pairs (Ari , pi ), where pi is an Φ-minimizing element of Ari ; z is then returned. Each such step requires no more than n applications of Lemma 3, and the cost of the at most n + 1 priority queue operations is at most O(n log(2n )) = O(n2 ), giving a total cost of O(n∆2 log ∆) per value returned. Let x̂ be a target protein sequence. For d ∈ {0, . . . , n}, let F (d) be the smallest Φ(x) over all protein sequences x at unweighted Hamming distance d from x̂. A basic task of landscape analysis is to plot the graph of F . As Theorem 18(2) in Section 5 shows, this task is computationally difficult in general. Therefore, one way to plot the graph of F would be to use Theorem 12 to enumerate all protein sequences x in order of increasing Φ(x) until for each d, at least one protein sequence at distance d from x̂ has been enumerated. This solution may require processing exponentially many protein sequences before F is fully plotted. As an alternative, Theorem 13 gives a tool for plotting F approximately in polynomial time. Theorem 13 (approximately plotting the energy-distance landscape) Let Φ be as defined in Assumption F1. For each ǫ, let Φǫ (x) = Φ(x) + ǫ·|x − x̂|. Let Φ(ǫ) be the minimum Φǫ (x) over all x. 1. Φ is a continuous piecewise linear concave function defined on R with at most n + 1 segments and thus at most n + 1 corners. 2. Let (ǫ1 , Φ(ǫ1 )), . . . , (ǫk , Φ(ǫk )) be the corners of Φ, where ǫ1 < · · · < ǫk . Let di be the slope of the segment immediately to the right of ǫi . Let d0 be the slope of the segment immediately to the left of ǫ1 . Then, n = d0 > d1 > · · · > dk = 0. 3. Let d ∈ {0, 1, . . . , n}. (a) F (d0 ) = Φ(ǫ1 ) − ǫ1 ·d0 . F (dk ) = Φ(ǫk ) − ǫk ·dk . For 0 < i < k, F (di ) = Φ(ǫi ) − ǫi ·di = Φ(ǫi+1 ) − ǫi+1 ·di . (b) For di > d > di+1 with 0 ≤ i < k, F (d) ≥ λF (di ) + (1 − λ)F (di+1 ), where λ = d−di+1 di −di+1 . 4. Given Φ and x̂ as the input, we can compute (ǫ1 , Φ(ǫ1 )), . . . , (ǫk , Φ(ǫk )) and d0 , . . . , dk in O(n∆2 log ∆) time. Proof: The statements are proved as follows. Statement 1. The concavity follows from the minimality of Φ(ǫ) and the fact that for any fixed x, Φǫ (x) is linear in ǫ with slope |x − x̂|. Then, the continuous piecewise linearity and the counts of segments and corners follow from the fact that |x − x̂| ∈ {0, 1, . . . , n}. P P Statement 2. By the concavity of Φ, d0 > d1 > · · · > dk . Let W = 1 + 1≤i<j≤n ai,j + ni=1 |si |. For all ǫ ≤ −W , Φǫ (x) is minimized if and only if x is at distance n from x̂. Similarly, for all ǫ ≥ W , Φǫ (x) is minimized if and only if x is at distance 0 from x̂. Therefore, d0 = n and dk = 0. 14 Statement 3. Case 3a is straightforward. To prove Case 3b, let x be a protein sequence that has the smallest Φ(x) over all protein sequences at distance d from x̂. Then, F (d) = Φ(x), and Φǫi+1 (x) = F (d) + ǫi+1 ·d. On the other hand, by the minimality of Φ, Φǫi+1 (x) ≥ Φ(ǫi+1 ). Furthermore, by Case 3a, Φ(ǫi+1 ) = F (di+1 ) + ǫi+1 ·di+1 = F (di ) + ǫi+1 ·di . Thus, F (di+1 ) ≤ F (d) + ǫi+1 ·d − ǫi+1 ·di+1 ; F (di ) ≤ F (d) + ǫi+1 ·d − ǫi+1 ·di . Case 3b follows from algebra and these two inequalities. Statement 4. For given ǫ and x, let line(ǫ, x) be the line through the point (ǫ, Φǫ (x)) and with slope |x − x̂|. Let Lǫ (respectively, Rǫ ) be the protein sequence x such that |x − x̂| is the largest (respectively, smallest) possible over opt(Φǫ ). Note that Lǫ , Rǫ , line(ǫ, Lǫ ), and line(ǫ, Rǫ ) can be computed in O(∆2 log ∆) total time using Theorem 7. Furthermore, line(ǫ, Lǫ ) and line(ǫ, Rǫ ) contain the segments of Φ immediately to the left and the right of ǫ, respectively. Consequently, ǫ is a corner of Φ if and only if line(ǫ, Lǫ ) 6= line(ǫ, Rǫ ). To compute the corners and slopes of Φ, we first describe a recursive corner-slope finding subroutine as follows. The subroutine takes as input an interval [ǫ′ , ǫ′′ ] where ǫ′ < ǫ′′ together with line(ǫ′ , Rǫ′ ) and line(ǫ′′ , Lǫ′′ ). It outputs all the corners (ǫ, Φ(ǫ)) of Φ together with slopes |Lǫ − x̂| and |Rǫ − x̂| where ǫ′ < ǫ < ǫ′′ . There are two cases. Case 1: line(ǫ′ , Rǫ′ ) = line(ǫ′′ , Lǫ′′ ). Then, there is no corner over the interval (ǫ′ , ǫ′′ ), and thus the subroutine call ends without reporting any new corner or slope. Case 2: line(ǫ′ , Rǫ′ ) 6= line(ǫ′′ , Lǫ′′ ). Then, compute ǫ′′′ at which line(ǫ′ , Rǫ′ ) and line(ǫ′′ , Lǫ′′ ) intersect; by the concavity of Φ stated in Statement 1, ǫ′ < ǫ′′′ < ǫ′′ . Also, compute line(ǫ′′′ , Lǫ′′′ ) and line(ǫ′′′ , Rǫ′′′ ). There are two subcases: Case 2a: line(ǫ′′′ , Lǫ′′′ ) 6= line(ǫ′′′ , Rǫ′′′ ). Then the subroutine returns (ǫ′′′ , Φ(ǫ′′′ )) as a new corner together with slopes |Lǫ′′′ − x̂| and |Rǫ′′′ − x̂| and recurses on the intervals [ǫ′ , ǫ′′′ ] and [ǫ′′′ , ǫ′′ ]. Case 2b: line(ǫ′′′ , Lǫ′′′ ) = line(ǫ′′′ , Rǫ′′′ ). The subroutine returns no new corner or slope but recurses on the intervals [ǫ′ , ǫ′′′ ] and [ǫ′′′ , ǫ′′ ]. In this case, the subroutine has found the line containing a new segment of Φ, i.e., the segment through the point (ǫ′′′ , Φ(ǫ′′′ )). This completes the description of the subroutine. The running time of this subroutine is dominated by that for computing Lǫ′′′ and Rǫ′′′ and thus is O(∆2 log ∆). With this subroutine, we can find the corners and slopes of Φ as follows. Recall W from the proof of Statement 2. Note that if ǫ ≤ −W or ǫ ≥ W , then Φ has no corner at ǫ. So we compute line(−2W, R−2W ) and line(2W, L2W ) and apply the subroutine to the interval [−2W, 2W ] to find all the corners and slopes of Φ. This algorithm makes O(n) recursive calls to the subroutine since by Statement 1, there are only O(n) corners and segments, and each recursive call finds at least one new corner or segment. The running time of the algorithm is dominated by the total running time of these calls and thus is O(n∆2 log ∆) as stated in the statement. 4.4 Tuning the Parameters of the GC Model This section shows how to systematically tune the parameters α and β so that a fittest protein sequence for a given 3D structure matches the 3D structure’s native protein sequence as closely as possible in terms of unweighted or weighted Hamming distance. For this purpose, we assume si ≥ 0. Furthermore, since the fitness function does not have an absolute scale, we may fix α at −1 and vary β. In summary, this section adopts Assumption F2. Let ΠΦ be the set of indices i with si 6= 0. The next lemma shows that for any fittest protein sequence x of Φβ , the set H(x) ∩ ΠΦ of H residues with nonzero surface area si is monotone in β. 15 Then, as shown in Theorem 16, to tune β, we only need to consider at most n + 1 possible values of β. Lemma 14 Let Φ be as defined in Assumption F2. Let y and z be any fittest protein sequences for Φβ1 and Φβ0 , respectively. If β1 < β0 , then H(y) ∩ ΠΦ ⊇ H(z) ∩ ΠΦ . Proof: Let H1 = H(y) and H0 = H(z). Let H10 = H1 − H0 , i.e., the set of indices i for which xi changes from 1 to 0 when β changes from β1 to β0 . Similarly, let H01 = H0 − H1 . Further, let P P B10 = i∈H10 si and B01 = i∈H01 si . P P Let A = i,j∈H0 ai,j − i,j∈H1 ai,j . Then, Φβ (z) − Φβ (y) = −A + β(B01 − B10 ). Let A01 = P i,j∈H0 ∧ {i,j}∩H01 6=∅ ai,j . Let A10 = −(A − A01 ), which is the sum of the terms ai,j that Φβ loses when xi changes from 1 to 0. Similarly, A01 is the sum of the terms ai,j that Φβ gains when xi changes from 1 to 0. To show H(y) ∩ ΠΦ ⊇ H(z) ∩ ΠΦ , we need to prove H01 ∩ ΠΦ = ∅ or equivalently B01 = 0. To do so by contradiction, suppose B01 > 0. There are two cases: Case 1: −A01 + β0 B01 > 0. Notice that the protein sequence z ′ with H(z ′ ) = H0 − H01 has a smaller fitness value for β0 than z does, contradicting the minimality of z. Case 2: −A01 + β0 B01 ≤ 0. Then, −A01 + β1 B01 < 0. Therefor, the protein sequence y ′ with H(y ′ ) = H1 ∪ H01 has a smaller fitness value for β1 than y does, contradicting the minimality of y. Let Φ(β) be the minimum Φβ (x) over all x. The next lemma characterizes the structure of Φ(β). This structure is then used to tune β in Theorem 16. Lemma 15 Let Φ be as defined in Assumption F2. 1. Φ is a continuous piecewise linear concave function defined on [0, ∞) with at most n+1 segments and thus at most n + 1 corners. 2. For all β1 < β3 < β4 < β2 where (β1 , Φ(β1 )) and (β2 , Φ(β2 )) are adjacent corners of Φ, we have opt(Φβ3 ) = opt(Φβ4 ), opt(Φβ3 ) ⊆ opt(Φβ1 ), and opt(Φβ3 ) ⊆ opt(Φβ2 ). Similarly, for all β1 < β3 < β4 where (β1 , Φ(β1 )) is the rightmost corner, we have opt(Φβ3 ) = opt(Φβ4 ) and opt(Φβ3 ) ⊆ opt(Φβ1 ). 3. Given Φ as the input, it takes O(n∆2 log ∆) time to find the set of all β such that (β, Φ(β)) is a corner of Φ. Proof: The statements are proved as follows. Statement 1. The concavity follows from the minimality of Φ(β) and the fact that for any fixed P x, Φβ (x) is linear in β with slope i∈H(x)∩ΠΦ si . Then, the continuous piecewise linearity and the counts of segments and corners follow from Lemma 14. Statement 2. The proofs for the case that (β1 , Φ(β1 )) is the rightmost corner and the complementary case are similar. So we only detail the proof for the former. Note that (β3 , Φ(β3 )) is not a corner. So for every fixed x ∈ opt(Φβ3 ), the line Φβ (x) goes through the corner (β1 , Φ(β1 )) and the point (β4 , Φ(β4 )). Thus, x ∈ opt(Φβ1 ) and x ∈ opt(Φβ4 ). By symmetry, for every y ∈ opt(Φβ4 ), we have y ∈ opt(Φβ3 ). In summary, opt(Φβ3 ) = opt(Φβ4 ) and opt(Φβ3 ) ⊆ opt(Φβ1 ). Statement 3. For any given β and x, let line(β, x) be the line through the point (β, Φβ (x)) P and with slope i∈H(x)∩ΠΦ si . For each β, let Lβ (respectively, Rβ ) be the protein sequence x such that H(x) has the largest (respectively, smallest) possible cardinality over opt(Φβ ). Note that Lβ , Rβ , line(β, Lβ ), and line(β, Rβ ) can be computed in O(∆2 log ∆) total time using Theorem 7. 16 Furthermore, line(β, Lβ ) and line(β, Rβ ) contain the segments of Φ immediately to the left and the right of β, respectively. Consequently, for β > 0, β is a corner of Φ if and only if line(β, Lβ ) 6= line(β, Rβ ). Also, (0, Φ(0)) is the leftmost corner, and the segment of Φ to the right of 0 is contained by line(0, R0 ). To compute the corners of Φ, we first describe a recursive corner-finding subroutine as follows. The subroutine takes as input an interval [β1 , β2 ] where β1 < β2 together with line(β1 , Rβ1 ) and line(β2 , Lβ2 ). It outputs all the corners (β, Φ(β)) of Φ with β1 < β < β2 . There are two cases. Case 1: line(β1 , Rβ1 ) = line(β2 , Lβ2 ). Then, there is no corner over the interval (β1 , β2 ), and thus the subroutine call ends without reporting any new corner. Case 2: line(β1 , Rβ1 ) 6= line(β2 , Lβ2 ). Then, compute β3 at which line(β1 , Rβ1 ) and line(β2 , Lβ2 ) intersect; by the concavity of Φ stated in Lemma 15(1), β1 < β3 < β2 . Also, compute line(β3 , Lβ3 ) and line(β3 , Rβ3 ). There are two subcases: Case 2a: line(β3 , Lβ3 ) 6= line(β3 , Rβ3 ). Then the subroutine returns (β3 , Φ(β3 )) as a new corner and recurses on the intervals [β1 , β3 ] and [β3 , β2 ]. Case 2b: line(β3 , Lβ3 ) = line(β3 , Rβ3 ). The subroutine returns no new corner but recurses on the intervals [β1 , β3 ] and [β3 , β2 ]. In this case, the subroutine has found the line containing a new segment of Φ, i.e., the segment through the point (β3 , Φ(β3 )). This completes the description of the subroutine. The running time of this subroutine is dominated by that for computing Lβ3 and Rβ3 and thus is O(∆2 log ∆). With this subroutine, we can find the corners of Φ as follows. If every si = 0, then (0, Φ(0)) is P the only corner. Otherwise, let β∞ be 1 + 1≤i<j≤n ai,j divided by the smallest nonzero si . Note that for every β ≥ β∞ , Φ has no corner at β, Then, we compute line(0, L0 ) and line(0, Rβ∞ ). We report the leftmost corner (0, Φ(0)) and apply the subroutine to the interval [0, β∞ ] to find all the other corners of Φ. This algorithm makes O(n) recursive calls to the subroutine since by Lemma 15, there are only O(n) corners and segments, and each recursive call finds at least one new corner or segment. The running time of the algorithm is dominated by the total running time of these calls and thus is O(n∆2 log ∆) as stated in the lemma. Theorem 16 (tuning α and β) Let Φ be as defined in Assumption F2. Given a target protein sequence x̂ and Φ as the input, we can find in O(n∆2 log ∆) time the set of all β where the closest unweighted (or weighted) Hamming distance between x̂ and any protein sequence in opt(Φβ ) is the minimum over all possible β. Proof: The proofs for the cases of unweighted and weighted Hamming distances are similar. So we only detail the proof for the unweighted case. Our algorithm for finding all distance-minimizing choices of β has three stages. Stage 1. Use Lemma 15(3) to find all the corners of Φ. Stage 2. For each corner (β, Φ(β)), use Theorem 7 to compute the closest Hamming distance dβ between x̂ and any protein sequence in opt(Φβ ). Let dmin be the smallest dβ over all corners. Then, by Lemma 15(2), report all β with dβ = dmin as desired choices of distance-minimizing β. Stage 3. Consider each segment of Φ. Let β1 and β2 be the vertical coordinates of the left and right endpoints of the segment. Find a suitable β3 in the open interval (β1 , β2 ) as follows. If β2 is finite, then set β3 = (β1 + β2 )/2; otherwise, set β3 = β1 + 1. Then use Theorem 7 to compute the closest unweighted or weighted Hamming distance dβ3 between x̂ and any protein sequence in opt(Φβ3 ). If dβ3 = dmin , then by Lemma 15(2), report that every β in the interval (β1 , β2 ) is a desired distance-minimizing β. 17 This completes the description of the algorithm. By Lemma 15(3), Stage 1 takes O(n∆2 log ∆) time. By Theorem 7 and Lemma 15 (1), Stages 2 and 3 also take O(n∆2 log ∆) time. Thus, the total running time is as stated in the theorem. 5 Computational Hardness Results Theorem 17 (hardness of counting and averaging) Let Φ be as defined in Assumption F1. The following problems are all #P-complete: 1. Given Φ as the input, compute the cardinality of opt(Φ). 2. Given Φ1 , . . . , Φf as the input, where f is any fixed positive integer and Φ1 , . . . , Φf are as defined in Assumption F3, compute the number of protein sequences x that simultaneously minimize Φℓ (x) for all ℓ = 1, . . . , f . 3. Given Φ as the input, compute the average norm |x|, i.e., the average number of H residues in x, over all x ∈ opt(Φ). 4. Given Φ and a target protein sequence x̂ as the input, compute the average unweighted Hamming distance |x − x̂| over all x ∈ opt(Φ). 5. Given Φ, a target protein sequence x̂, and an integer d as the input, compute the number of protein sequences in opt(Φ) at unweighted Hamming distance d from x̂. Proof: Note that each of the problems is in #P, because we can recognize an element of opt(Φ) in polynomial time using Lemma 3. So to prove #P-completeness we must only show that each problem is #P-hard. Statement 1. Reduce from the problem of counting the number of ideals in a dag, which is #Pb Φ is isomorphic to Ĝ. hard [28]. Given a dag Ĝ, apply Theorem 6 to get a function Φ for which G s,t bΦ ∼ By Theorem 5, counting opt(Φ) is then equivalent to counting the number of ideals of G s,t = Ĝ. Statement 2. The problem in Statement 1 is a special case of the problem in this statement. Statement 3. Using the same construction as in Statement 1, we can reduce from the problem of computing the average cardinality of an ideal in Ĝ. To see that this latter problem is #P-hard, suppose that we can compute the average cardinalities of ideals in an n-node Ĝ and in an augmented graph Ĝ′ obtained from Ĝ by adding a single new node s and edges from every v ∈ V (Ĝ) to s. Let c be the average for Ĝ and c′ the average for Ĝ′ . Let N be the number of ideals in Ĝ. Then c = K/N for some K, while c′ = (K + n + 1)/(N + 1), since the only new ideal in Ĝ′ consists of s and all other nodes, and thus has size n + 1. Solving for N gives N = (n + 1 − c′ )/(c′ − c), which can be computed from c, c′ , and n. Statement 4. This problem has the problem in Statement 3 as a special case with all x̂i = 0. Statement 5. To reduce the problem of counting protein sequences in opt(Φ) to counting protein b Φ given by Theorem 5, and add sequences at a given unweighted Hamming distance, take the dag G s,t to each node vi a node qi with edges (vi , qi ) and (qi , vi ). Apply Theorem 6 to this new graph Ĝ′ to obtain a function Φ′ for which opt(Φ′ ) is in one-to-one correspondence with the set of ideals of the strongly-connected component graph Ĝ′0 of Ĝ′ . Each strongly connected component of Ĝ′ consists b Φ . Now we choose x̂ with x̂v = 0 and x̂q = 1. of vi and qi for some i, so Ĝ′0 is isomorphic to G s,t i i Then, the contribution to |x − x̂| of each pair xvi , xqi is 1 regardless of their common value. Thus, the 18 number of Φ-minimizing protein sequences equals the number of Φ′ -minimizing protein sequences at bΦ . distance d from x̂, where d is the number of nodes in G s,t Theorem 18 (hardness of plotting the energy-distance landscape) Let Φ be as defined in Assumption F1. 1. Given Φ and two integers d1 , d2 as the input, it is NP-complete to determine whether there is an Φ-minimizing x with d1 ≤ |x| ≤ d2 . 2. Let x̂ be a target protein sequence. For d ∈ {0, . . . , n}, let F (d) be the smallest Φ(x) over all protein sequences x at unweighted Hamming distance d from x̂. Given Φ and d as the input, it is NP-hard to compute F (d). Proof: Statement 2 follows from the fact that the problem in Statement 1 can be reduced to the problem in this statement in polynomial time. Statement 1 is proved as follows. Since we can recognize Φ-minimizing protein sequences using Lemma 3, the problem is clearly in NP. To show that it is NP-hard, we reduce from PARTIALLY ORDERED KNAPSACK, problem MP12 from Garey and Johnson [13, pp. 247–248]. The input to PARTIALLY ORDERED KNAPSACK consists of a partially-ordered set U , each element u of which is assigned a size s(u) ∈ Z+ and a value v(u) ∈ Z+ , together with a upper bound B1 on total size and a lower bound B2 on total value. The problem is to determine whether there P P exists an ideal I in U such that u∈I s(u) ≤ B1 and u∈I v(u) ≥ B2 . Garey and Johnson note that the problem, even with s(u) = v(u) for all u ∈ U , is NP-complete in the strong sense (meaning that there is some polynomial bound on the size of all numbers in the input with which it remains NP-complete). Given an instance of PARTIALLY ORDERED KNAPSACK with s(u) = v(u) for all u and all numbers bounded by some polynomial p, build a graph Ĝ where each u ∈ U is represented by a clique C(u) of s(u) nodes, and there is an edge from C(u) to C(u′ ) if and only if u ≺ u′ . Note that because s(u) ≤ p, Ĝ has polynomial size. Apply Theorem 6 to generate a function Φ (in b Φ is isomorphic to the component graph Ĝ0 obtained by contracting polynomial time) such that G s,t all strongly connected components of Ĝ. Since the strongly connected components of Ĝ are precisely bΦ ∼ bΦ the cliques C(u), G U , interpreted as a dag. In particular any ideal of G s,t = Ĝ0 is isomorphic to s,t P corresponds to an ideal I of U . Let N = u∈U s(u). The norm of the corresponding vector |x| is P P P N − u∈I |C(u)| = N − u∈I s(u) = N − u∈I v(u). Set d1 = N − B1 , d2 = N − B2 , and we have the problem stated in the theorem. 6 Applications to Empirical Protein 3D Structures To demonstrate our algorithms, we chose 34 proteins with known 3D structures from the Protein Data Bank (PDB) at http://www.rcsb.org/pdb. These 3D structures included 8 from Kleinberg’s study [18] but excluded the protein fragments and multimeric proteins used in that study. The chosen 3D structures were then represented by centroids for each side chain calculated from the coordinates of each atom in the side chain; in the case of 3D structures solved by NMR, hydrogen atoms were included into centroid calculations. For glycine, the centroid was taken to be the position of Cα . For each side chain, the area of solvent accessible surface was computed via the Web interface of the ASC program with default parameters [10]. In accordance to the GC model, each of the chosen native 19 Name 1a7m 1a8y 1ab3 1ab7 1agi 1air 1b71 1ble 1bpi 1bw3 1clh 1ehs 1gym 1nar 1prn 1thv 1xnb 2aak 2bnh 2cba 2erl 2stv 6yas 8cho 9rat 1aaj 1aba 1bba 1brq 1cis 1hel 1ifb 3cln 3rn3 Solvent/Length 51.23 81.37 399.05 451.48 384.30 173.96 374.23 498.45 1453.75 732.31 607.48 2178.29 392.97 447.48 498.38 741.41 871.63 1130.39 412.43 773.98 5064.83 1153.80 904.99 2054.72 2126.95 51.89 125.39 584.25 272.54 780.88 539.14 583.57 835.80 1018.66 Length 180 338 88 89 125 352 191 161 58 125 166 48 296 289 289 207 185 150 456 258 40 184 256 125 124 105 87 36 174 66 129 131 143 124 α/β -295.8 -155.7 -326.7 -79.5 -93 -0.3 -23.7 -269.4 -31.5 -33.9 -9.3 -32.1 -4.5 -6.3 -2.7 -10.5 -135.6 -149.1 -253.8 -2.4 -47.7 -3.6 -12.6 -423.6 -89.4 -155.1 -245.4 -69.6 -27.3 -454.8 -18.6 -40.5 -309.9 -88.8 % Similarity 74.44 73.37 78.41 80.90 77.60 69.89 69.11 72.67 68.97 70.40 69.28 72.92 73.99 75.78 56.40 71.01 65.95 78.67 78.51 73.64 80.00 64.67 67.19 72.80 75.00 70.48 (72) 78.16 (70) 66.67 (58) 72.99 (71) 69.70 (64) 76.74 (78) 79.39 (70) 72.03 (70) 72.58 (69) Description cytokine Ca binding protein ribosomal protein ribonuclease inhibitor endonuclease pectate lyase electron transport phosphotransferase proteinase inhibitor lectin cyclophilin enterotoxin phospholipase plant seed protein porin sweet tasting protein glycosidase ubiquitin conjugation ribonuclease inhibitor lyase pheromone viral coat protein lyase isomerase ribonuclease A electron transport electron transport pancreatic hormone retinol transport lysozyme fatty acid bind protein Ca binding protein ribonuclease electron transport Table 1: This table gives some statistics of our computed fittest H/P protein sequences for the 34 empirical protein 3D structures chosen from PDB. Column 1 contains the PDB name of the native protein sequence, where the proteins from Kleinberg [18] are in bold. Column 2 shows the length P normalized solvent accessibility, i.e., i∈H(x) si /n, of the computed fittest protein sequence. Column 4 lists the protein sequence length n, i.e., the count of amino acids. Column 4 provides the computed optimal ratio of the α and β parameters (see text). Column 5 displays the percentage of similarity of the computed fittest protein sequence to the native protein sequence. Column 6 describes the function of the native protein. 20 %Similarity 80 2bnh 70 G N 60 0 100 200 PFAM Figure 1: This plot displays the relationship between the percent similarity of computed fittest protein sequences to native protein sequences versus the PFAM family size of native protein sequences. Globular native proteins are shown as open circles while nonglobular ones are shown as crosses. protein sequences was converted into a binary H/P sequence following Sun et. al. [33], where A, C, F, I, L, M, V, W, Y are H, and the other amino acids are P . We used Equation 1 in the GC model to calculate fitness values of protein sequences to determine minimal energy values and consequently to compute the “fittest” protein sequences. These fitness values consist of two terms in Equation 1. The first term accounts for the idea that hydrophobic residues tend to cluster together due to stacking forces from the solvent. The second term accounts for the idea that hydrophobic residues tend to avoid solvent accessible surfaces of the molecule. The arbitrary parameters α and β represent scaling factors for the relative importance of these two tendencies. We expected the appropriate ratio of these two values to depend on the type of a protein (globular, nonglobular, and membrane) and the length of the protein. Therefore, we optimized the scale of the two parameters to find a ratio that maximizes the similarity of a fittest protein sequence to the native protein sequence, similarly in spirit to Kleinberg’s scaling algorithm [18]. Results of this optimization are shown in Table 1. As anticipated, our algorithms computed fittest protein sequences that are closer to native protein sequences than found by Kleinberg [18], whose results are shown in parenthesis in Table 1. (Note that protein 1aaj is an exception to this improvement on proximity—perhaps due to the fact that the input data are not exactly the same.) However, proximity to native protein sequences is not a good proxy for biological relevance of the algorithms. Determination of protein 3D structure involves an energy landscape given by a statistical thermodynamic energy function E(X , D) where X is the set of amino acid sequences and D is the set of possible folded 3D structures. On the one hand, for a fixed protein sequence x, the 3D structure D 21 is determined by a temperature-dependent folding process that minimizes E(x, D) over D. Ab initio solutions to this problem for protein sequences of practical length currently do not exist. On the other hand, for a fixed 3D structure D, no known thermodynamic reasons connect the folding process with a protein sequence x that minimizes E(x, D) over X . However, we can invoke evolutionary processes as possibly selecting for those protein sequences that produce the most stable 3D structures, i.e., those with the lowest E(x, D), at a given temperature. In other words, given a suite of protein sequences that fold into a particular 3D structure to perform a biological function, there might be selection for the most thermodynamically stable protein sequences. From the view point of evolutionary selection, the difference between computed fittest protein sequences and native protein sequences may be attributed to three factors. First, the GC toy thermodynamic model is inappropriate. Second, the biological function of a protein actually requires structural lability. Last, a native protein is part of a diverse family and other members of the family lie closer to the computed fittest protein sequence. This last factor can be augmented by the argument that if a computed fittest protein sequence exists in nature but is very different from the native protein sequence, it is likely that many other protein sequences (thus a diverse family of protein sequences) exist in nature and fold into the same or similar 3D structures. All of these factors are likely to play in the data shown in Table 1. However, we conjectured a significant relationship between a computed fittest protein sequence’s similarity to a native protein sequence and the diversity of the native protein in nature. Such a relationship would be highly intriguing biologically. We examined this conjecture by assessing the diversity of native proteins using the database PFAM at http://pfam.wustl.edu, which is a database of protein families determined through Hidden Markov Models [4]. The database contained information on the putative family size of 25 of our 34 chosen native proteins. Figure 1 shows the plot of the percent similarity of computed fittest protein sequences to native protein sequences versus the PFAM family size of native proteins. In the figure, globular proteins are shown as circles and nonglobular ones as crosses. There is a negative linear trend as suggested by our conjecture. Linear regression is nearly significant at 0.05 level with p = 0.088. The figure shows three outliers, 2bnh, 2stv, and 8cho. Of these, 2bnh is an exceedingly strange 3D structure with a protein sequence of alpha helixes forming a horseshoe shaped sheet, resulting in a 3D structure that is very deviant from globular proteins which are the genesis of the original thermodynamic model. Leaving out this outlier results in a significant linear regression with p = 0.015. There is still considerable uncertainty about the appropriateness of the GC toy model. The average percentage of the hydrophobic residues is 42% in the native protein sequences compared to 35% in the computed fittest protein sequences. More importantly, the standard deviation of the percentage of hydrophobic residues is 0.054 in the native protein sequences compared to 0.143 for the computed fittest protein sequences. Thus, the percentage of hydrophobic residues is relatively constant in the native protein sequences, reflecting perhaps a functional need or unknown structural factors. In contrast, the percentage of hydrophobic residues in a computed fittest protein sequence tends to vary depending on the 3D structure. This suggests that it might be important to introduce a hydrophobic residue percentage constraint into optimization algorithms in the future as suggested in the sliding algorithm of Kleinberg [18]. Nevertheless, our preliminary results show that even such a simplified toy model might be useful for exploratory investigations of protein evolution especially when coupled to computationally efficient algorithms to allow systematic investigation of the roughly 13,000 empirical protein 3D structures. We are currently planning a large-scale analysis of further empirical protein 3D structures; the results will be reported in a subsequent paper. 22 Acknowledgments We wish to thank Jon Kleinberg for generously providing LATEX entries for many of the references; thank Lisa Fleischer and Hal Gabow for their help in tracking down references used to generalize Theorem 5 for submodular functions; and thank Mark Gerstein for helpful discussions. References [1] J. Atkins and W. E. Hart. On the intractability of protein folding with a finite alphabet of amino acids. Algorithmica, 25(2-3):279–294, 1999. [2] A. Babajide, I. Hofacker, M. Sippl, and P. Stadler. Neutral networks in protein space: A computational study based on knowledge-based potentials of mean force. Folding and Design, 2:261–269, 1997. [3] J. Banavar, M. Cieplak, A. Maritan, G. Nadig, F. Seno, and S. Vishveshwara. Structure-based design of model proteins. Proteins: Structure, Function, and Genetics, 31:10–20, 1998. [4] A. Bateman, E. Birney, R. Durbin, S. R. Eddy, K. L. Howe, and E. L. L. Sonnhammer. PFAM– A database of protein domain family alignments and HMMs. Nucleic Acids Research, 28:263–266, 2000. [5] B. Berger and T. Leighton. Protein folding in the hydrophobic-hydrophilic (HP) model is NPcomplete. Journal of Computational Biology, 5(1):27–40, 1998. [6] P. Crescenzi, D. Goldman, C. Papadimitriou, A. Piccolboni, and M. Yannakakis. On the complexity of protein folding. Journal of Computational Biology, pages 423–466, 1998. [7] J. M. Deutsch and T. Kurosky. New algorithm for protein design. Physical Review Letters, 76:323–326, 1996. [8] K. A. Dill, S. Bromberg, K. Yue, K. Fiebig, D. Yee, P. Thomas, and H. S. Chan. Principles of protein folding — A perspective from simple exact models. Protein Science, 4:561–602, 1995. [9] K. E. Drexler. Molecular engineering: An approach to the development of general capabilities for molecular manipulation. Proceedings of the National Academy of Sciences of the U.S.A., 78:5275–5278, 1981. [10] F. Eisenhaber and P. Argos. Improved strategy in analytic surface calculation for molecular systems: Handling of singularities and computational efficiency. Journal of Computational Chemistry, 14(N11):1272–1280, 1993. [11] F. Eisenhaber, P. Lijnzaad, P. Argos, C. Sander, and M. Scharf. The double cube lattice method: Efficient approaches to numerical integration of surface area and volume and to dot surface contouring of molecular assemblies. Journal of Computational Chemistry, 16(N3):273–284, 1995. [12] H. N. Gabow. Applications of a poset representation to edge connectivity and graph rigidity. In Proceedings of the 32nd Annual IEEE Symposium on Foundations of Computer Science, pages 812–821, 1991. [13] M. Garey and D. Johnson. Computers and Intractability: A Guide to the Theory of NPCompleteness. Freeman, New York, NY, 1979. 23 [14] A. V. Goldberg and R. E. Tarjan. A new approach to the maximum-flow problem. Journal of the ACM, 35(4):921–940, Oct. 1988. [15] M. Grötschel, L. Lovász, and A. Schrijver. Geometric Algorithms and Combinatorial Optimization, volume 2 of Algorithms and Combinatorics. Springer-Verlag, New York, NY, 1988. [16] W. E. Hart. On the computational complexity of sequence design problems. In Proceedings of the 1st Annual International Conference on Computational Molecular Biology, pages 128–136, 1997. [17] M. Kimura. The Neutral Theory of Molecular Evolution. Cambridge University Press, Cambridge, United Kingdom, 1983. [18] J. M. Kleinberg. Efficient algorithms for protein sequence design and the analysis of certain evolutionary fitness landscapes. In Proceedings of the 3rd Annual International Conference on Computational Molecular Biology, pages 226–237, 1999. [19] K. F. Lau and K. A. Dill. A lattice statistical mechanics model of the conformational and sequence spaces of proteins. Macromolecules, 22:3986–3997, 1989. [20] K. F. Lau and K. A. Dill. Theory for protein mutability and biogenesis. Proceedings of the National Academy of Sciences of the U.S.A., 87:638–642, 1990. [21] E. L. Lawler. A procedure for computing the k best solutions to discrete optimization problems and its application to the shortest path problem. Management Science, 18:401–405, 1972. [22] D. Lipman and W. Wilbur. Modeling neutral and selective evolution of protein folding. Proceedings of Royal Society of London Series B, 245:7–11, 1991. [23] K. M. Merz and S. M. L. Grand, editors. The Protein Folding Problem and Tertiary Structure Prediction. Birkhauser, Boston, MA, 1994. [24] C. Micheletti, F. Seno, A. Maritan, and J. Banavar. Design of proteins with hydrophobic and polar amino acids. Proteins: Structure, Function, and Genetics, 32:80–87, 1998. [25] C. H. Papadimitriou and K. Steiglitz. Combinatorial Optimization: Algorithms and Complexity. Prentice-Hall, Upper Saddle River, NJ, 1982. [26] J.-C. Picard and M. Queyranne. On the structure of all minimum cuts in a network and applications. Mathematical Programming Study, (13):8–16, 1980. [27] J. Ponder and F. M. Richards. Tertiary templates for proteins. Journal of Molecular Biology, 193:63–89, 1987. [28] J. S. Provan and M. O. Ball. The complexity of counting cuts and of computing the probability that a graph is connected. SIAM Journal on Computing, 12(4):777–788, Nov. 1983. [29] C. Reidys, P. Stadler, and P. Schuster. Generic properties of combinatory maps: Neutral networks of RNA secondary structures. Bulletin of Mathematical Biology, 59:339–397, 1997. [30] E. I. Shakhnovich and A. M. Gutin. A new approach to the design of stable proteins. Protein Engineering, 6:793–800, 1993. 24 [31] J. M. Smith. Natural selection and the concept of a protein space. Nature, 225:563–564, 1970. [32] G. Steiner. An algorithm to generate the ideals of a partial order. Operations Research Letters, 5:317–320, 1986. [33] S. J. Sun, R. Brem, H. S. Chan, and K. A. Dill. Designing amino acid sequences to fold with good hydrophobic cores. Protein Engineering, 8(12):1205–1213, Dec. 1995. [34] V. V. Vazirani and M. Yannakakis. Suboptimal cuts: Their enumeration, weight and number (extended abstract). In W. Kuich, editor, Lecture Notes in Computer Science 623: Proceedings of the 19th International Colloquium on Automata, Languages, and Programming, pages 366–377. Springer-Verlag, New York, NY, 1992. [35] K. Yue and K. A. Dill. Inverse protein folding problem: Designing polymer sequences. Proceedings of the National Academy of Sciences of the U.S.A., 89:4163–4167, 1992. 25
5cs.CE
1 Control of active power for synchronization and transient stability of power grids arXiv:1802.06647v1 [math.OC] 19 Feb 2018 Randall Martyr, Benjamin Schäfer, Christian Beck, Vito Latora Abstract—As the energy transition transforms power grids across the globe it poses several challenges regarding grid design and control. In particular, high levels of intermittent renewable generation complicate the job of continuously balancing power supply and demand, which is necessary for the grid’s stability. Although there exist several proposals to control the grid, most of them have not demonstrated to be cost efficient in terms of optimal control theory. Here, we mathematically formulate the control problem for stable operation of power grids, determining the minimal amount of control in the active power needed to achieve the constraints, and minimizing a suitable cost function at the same time. We investigate the performance of the optimal control method with respect to the uncontrolled scenario and we compare it to a simple linear control case, for two types of external disturbances. Considering case studies with two and five nodes respectively, we find that the linear control can improve the synchronization and transient stability of the power grid. However, if the synchronized angular velocity after a disturbance is allowed to differ from its initial steady state value, the linear control performs inefficiently in comparison to the optimal one. Index terms— Optimal control, Power system control, Power system dynamics, Power system stability I. I NTRODUCTION The electrical power grid is undergoing drastic changes due to the energy transition [1]–[3] and sophisticated control approaches are necessary to ensure a reliable and stable operation [4]. The generation side of the grid is changing as additional renewable generators are installed to mitigate climate change, introducing fluctuations in a time scale of days [5] to sub-seconds [6]. In addition, the demand side is changing due to the ongoing electrification of heating and transport [7] and the introduction of demand control [8]. Regardless of these changing conditions, the grid needs to stay within strict operational boundaries to guarantee a stable electricity supply and to prevent damage to sensitive electronic devices [4]. A fundamental aspect of power system stability is the ability of interconnected synchronous machines of a power system to remain synchronized [4]. Transient stability is the ability to The first, second and fourth authors received financial support from the UK Engineering and Physical Sciences Research Council (EPSRC) via grant EP/N013492/1. The second author received support from the German Federal Ministry of Education and Research (BMBF Grant No 03SF0472F). Randall Martyr, Christian Beck and Vito Latora are with the School of Mathematical Sciences, Queen Mary University of London, Mile End Road, London E1 4NS, United Kingdom (e-mail: [email protected]; [email protected]; [email protected]). Benjamin Schäfer is with the Chair for Network Dynamics, Center for Advancing Electronics Dresden (cfaed), the Institute for Theoretical Physics, Technical University of Dresden, Dresden and Network Dynamics, Max Planck Institute for Dynamics and Self-Organization (MPIDS), 37077 Göttingen, Germany (e-mail: [email protected]). maintain synchronism in the face of severe transient disturbances [4], and is of great importance in preventing cascading failures [9]. Control mechanisms that balance active power and regulate frequency in the grid are key to maintaining these stability conditions. Primary controls respond within a few seconds of an event to stabilize the frequency within its permissible operating limits, after which secondary and tertiary controls restore the frequency to its nominal value [10]. Schäfer et al [11], [12] recently proposed a decentralized linear local frequency controller that regulates demand and supply on a power grid through economic incentives in order to improve the grid’s transient stability. However, it remains unclear how well and at what cost this linear control ensures that the system’s operational constraints are satisfied. In fact, some decentralized controllers for frequency response are known to be inefficient [13]. In this paper, we formulate an optimal control problem [14], [15] to keep the power grid within operational boundaries when facing known changes in demand and generation. Note that there are several predictable sources of perturbations for which a designated control reaction may be designed. For example, a recent study analysed power grid frequency fluctuations in grids of different synchronous regions and found a significant impact of trading on the frequency quality with large fluctuations every fifteen minutes [16]. Furthermore, there are predictable changes even in volatile renewable generation. For instance, in a system with large amounts of installed solar capacity, the rising or setting sun will cause similar power ramps as a recent solar eclipse caused in today’s system [17]. The control problem we formulate is well-suited to keep the grid within operational boundaries for such deterministic perturbations. In the following section we present a third order “fluxdecay” model which we use to describe the power grid dynamics in terms of a state vector x of phase angles, frequencies and voltage amplitudes. Let U be a suitable set of control variables u. For a given u ∈ U, we quantify its cost through a cost function J(u), and evaluate its performance with respect to various operational constraints Cη (u) and their tolerances εη . The optimal control problem for power grid synchronization is expressed mathematically as follows. Problem: minimize J(u) subject to: i) ẋ(t) = f (t, x(t), u(t)), ii) u ∈ U; x(0) = x0 ; iii) Cη (u) ≤ εη for η = 1, . . . , N + 2, (1) 2 where function f governs the intrinsic dynamics of the state of the grid, and N ≥ 2 is the number of nodes in its representation as a network. Problem (1) is solved numerically using a control parametrization method [18], [19]. We illustrate the efficiency of the optimal control compared to the decentralized local frequency control for the elementary two-node system and a five-node network motif. In particular, we compute any violations of the operational constraints and quantify the costs of control actions. Finally, we close with a conclusion and outlook. II. A N OPTIMAL CONTROL PROBLEM FOR POWER SYSTEM SYNCHRONIZATION TABLE I L IST OF NOTATION USED IN THE PAPER . V ECTORS AND MATRICES ARE DENOTED IN BOLDFACE . Notation N Ω T U B x σ(ω) hωi θi θij ωi ui Vi Pi Viref γi αi , βi J, Cη , εη Description the set of nodes {1, . . . , N } where N ≥ 2 is the number of nodes in the network grid reference control time horizon set of control variables N × N -dimensional coupling matrix 3N -dimensional state vector variance of network angular velocities mean value of network angular velocities rotor angle at node i relative to the grid reference angular difference between nodes i and j, θij = θi − θj angular velocity at node i controlled power added to node i normalized machine voltage at node i normalized mechanical power at node i normalized voltage reference at node i damping parameter at node i machine parameters at node i cost functional, constraint functional, constraint tolerance Units – Hz s – s−2 – (rad · s−1 )2 rad · s−1 rad set of differential equations for the rotor angle θi , angular velocity ωi , and voltage Vi at each node, (i) θ̇i (t) = ωi (t) (ii) ω̇i (t) = −γi ωi (t) + Pi (t) + ui (t) − N X j=1  Bij Vi (t)Vj (t) sin θij (t)  1 (iii) V̇i (t) = Viref − Vi (t) αi N  βi X Bij Vj (t) cos θij (t) , + αi j=1 (2) for i = 1, 2, . . . , N. Table I describes the notation used in this model. In particular, θij (t) = θi (t) − θj (t), and the entries Bij of matrix B describe the coupling topology of the network. Positive values of Pi (t) indicate net generation at node i, whilst negative values of Pi (t) indicate net consumption. If Pi (t) is always positive (respectively, negative) then node i is called a generator (respectively, consumer or motor) node. We refer to positive changes in the value of the control variable ui (t) as incremental actions [21] since they correspond to an increase in generation or an equivalent decrease in demand. Similarly, we refer to negative changes in the value of ui (t) as decremental actions [21] since they correspond to a decrease in generation or an equivalent increase in demand. B. Decentralized control for improved power grid stability rad rad · s−1 s−2 1 s−2 1 s−1 s, s2 1 A. Dynamics for transient stability analysis Before focusing on optimal control, we need to discuss how to describe the intrinsic dynamics of the power grid. According to [4, p. 27], deviations in rotor angles may also lead to a progressive drop in the nodal voltages. This in turn affects the angular velocities and rotor angle values. A realistic model of the power grid should therefore take into account the effect of the rotor angles’ deviations on the voltage amplitudes. This allows us to analyse slower phenomena such as large deviations in voltage or frequency, as typically done in midterm stability studies [4, p. 34]. Therefore, in this paper we use the model in [20] which describes the power grid as a network of N ≥ 2 synchronous generators and motors governed by a Decentralized controllers for large-scale and complex networks such as the power grid are popular choices since they rely only on local measurements and typically have low computation and communication complexity [13]. Three decentralized controllers that appear in the literature on power grid synchronization and stability are mentioned below. They all assume that at initial time t = 0 the power grid, as described by the dynamics (2), is synchronized and at a steady state with ω(0) = 0 in particular. Linear local frequency controller: The basic modelling assumption for the linear local frequency (LLF) controller in [11], [12] is that a generator or consumer node acts in response to its nodal price of electricity, which is a linear function of the angular velocity at that node. Upon linearising the response in power output at node i with respect to the nodal price, the authors of [11], [12] derive a control ui that is directly proportional to the angular velocity ωi ,  (3) ui (t) := −νi (ωi (t) − ωi (0)) = −νi ωi (t) , where νi > 0 measures the willingness at node i to change the active power level. This type of control effectively results in the increase of the damping parameter from γi to γi +νi in (2). Under the assumption of constant voltages, β ≡ 0, the authors show that by achieving an equilibrium between demand and supply through market price signals, their model can ensure synchronization and stability of the power grid over time. MARTYR et al.: CONTROL OF ACTIVE POWER FOR SYNCHRONIZATION AND TRANSIENT STABILITY OF POWER GRIDS Integral local frequency controller: In [22], [23] the following integral frequency control is proposed, Z t ui (t) := −Ki ωi (τ )dτ, 0 where Ki > 0. Since ωi = θ̇i by (2) above, the integral frequency control can be described equivalently by, ui (t) = −Ki (θi (t) − θi (0)), showing that it is directly proportional to the rotor angle’s deviation from the steady state value θi (0). In the case β ≡ 0, this control can improve transient stability and be economically efficient in a particularly defined sense (see [22], [23]). A similar statement for the general dynamics (2) with time-varying voltages is not known [24]. Bandgap local frequency controller: In [25], the following bandgap control is proposed,  max ωi −ωlow min(1, ωhigh ωi > ωlow ,  −ωlow ), u i −ωi −ωlow max ui (t) = −ui min(1, ωhigh −ωlow ), ωi < −ωlow ,   0, otherwise, where 0 ≤ ωlow < ωhigh and umax > 0 are parameters. i In this case, control is applied at node i ∈ N only if the angular velocity deviation is sufficiently high, |ωi | > ωlow , and ramps up until a maximum value |umax | which is reached i when |ωi | ≥ ωhigh . Under the assumption of constant voltages, β ≡ 0, the authors show that the bandgap control can improve grid stability. C. Operational constraints of the power grid Let x = (x1 , . . . , x3N ) denote the 3N -dimensional controlled state variable obtained from (2) with components given by xi = θi , xN +i = ωi , x2N +i = Vi for i ∈ N . (4) The dynamics of x in (2) can be written compactly as ẋ(t) = f (t, x(t), u(t)), (5) where expressions for the components of f = (f1 , . . . , f3N ) are obtained from (2) using the assignment given in (4). Each component of the control variable u = (u1 , . . . , un ) corresponds to the amount of additional active power injected or withdrawn at an individual node in the network. We assume that controls are bounded: for each i ∈ N we have ui (t) ∈ Ui where: Ui = [umin , umax ], i i −∞ < umin i < umax i < ∞. (6) Let U denote the set of all such control functions. Synchronization: Synchronization of the power grid occurs when all of the rotor angles have the same velocity [4, p. 19]. Consequently, for every i ∈ N , we should have PN ω . ωi = hωi = N1 j=1 j Letting ω = (ω1 , . . . , ωN ) denote the vector of angular velocities, the variance of ω, defined by ! N 1 X 2 (7) (ωi − hωi) , σ(ω) = N i=1 3 measures the total dispersion of ω from its mean hωi, and synchronization is achieved when σ(ω) = 0. (8) Let 0 < T < ∞ denote the length of the control horizon [0, T ] in seconds. Define the synchronization constraint loss function by ψ1 (x) = −σ(ω), (9) and the total synchronization loss on [0, T ] by Z T 2 C1 (u) = (min(0, ψ1 (x(t)))) dt 0 2 + λ1 min 0, ψ1 (x(T ) Z T = σ(ω(t))2 dt + λ1 σ(ω(T ))2 , 0 where λ1 ≥ 0 is a weight parameter which emphasizes the relative importance of the constraint at the final time T . Note that we weight the variance as given by eq. (7) quadratically in this integral, which means small variances do not contribute much whereas large variances are strongly penalized. Other weighting schemes are also possible. Mean angular velocity operational limits: The angular velocity ωi quantifies the deviation of the frequency at node i from the grid reference Ω. In the United Kingdom and many other countries, the nominal frequency is 50 Hz, which gives a reference value of Ω = 2π · 50 Hz. For reasons related to the quality of electricity supply, the frequency must respect certain operational limits. Therefore, values of the mean angular velocity hωi should be constrained, ωmin ≤ hωi ≤ ωmax . (10) In the United Kingdom, the statutory limits are ±0.5Hz of the nominal value, but the operational limits are set to the stricter range of ±0.2Hz from the nominal value [26]. In our setting, the operational limits on the mean angular velocity become ωmin = 2π · −0.2 Hz and ωmax = 2π · 0.2 Hz. Define the mean angular velocity constraint loss function by, ψ2 (x) = (ωmax − hωi)(hωi − ωmin ), (11) and the total loss on [0, T ] for violating this constraint by, Z T (min(0, ψ2 (x(t))))2 dt C2 (u) = 0 2 + λ2 min 0, ψ2 (x(T )) , where λ2 ≥ 0 is a weight parameter. Note that only when ψ2 (x) is negative in eq. (11) we get a contribution. Voltage operational limits: Since the voltages in our model are also time dependent, it is important to also take into account appropriate operational constraints on these variables. Regulations in the United Kingdom require that the steady state voltages should be kept within ±6% of the nominal voltage for systems between 1 and 132 kV, or ±10% of the nominal voltage for systems above 132 kV [27]. In our model we can take this into account with the following constraint, Vimin ≤ Vi ≤ Vimax , i = 1, . . . , N, (12) 4 where Vimin < Vimax . We define a loss function for the voltage constraint at each node i ∈ N by ψ2+i (x) = (Vimax − Vi )(Vi − Vimin ), (13) and the total loss on [0, T ] for violating this constraint by Z T 2 C2+i (u) = (min(0, ψ2+i (x(t)))) dt 0 2 + λ2+i min 0, ψ2+i (x(T )) , where λ2+i ≥ 0 are weight parameters. D. Formulation of the optimal control problem For η = 1, . . . , N + 2 the total loss Cη is non-negative, and is equal to zero if, equivalently, the η-th constraint is satisfied on [0, T ]. We relax this by introducing tolerance parameters εη ≥ 0, η ∈ {1, . . . , N + 2}, and say that a control u ∈ U is feasible if it satisfies Cη (u) ≤ εη for η = 1, . . . , N + 2. (14) At an initial time t = 0, the power grid is synchronized and at a steady state, ẋ = 0, in which various operational constraints are satisfied. If an external disturbance ξ to the mechanical power causes the grid to become unsynchronized, we would like the control u to return it close to a synchronized state within T seconds with a “minimal cost” that ensures the constraint conditions (14) are satisfied. Letting I N denote the N × N identity matrix, we define the following total cost for a control u ∈ U, Z T J(u) = u(t)tr I N u(t)dt, (15) 0 where tr denotes the transpose operator. The rate function in (15), utr I N u, is the square of the Euclidean norm of the vector u, N X (ui )2 . utr I N u = i=1 Therefore, higher cost is assigned to controls u ∈ U which exert large amounts of effort over time. Moreover, adjustments in demand and generation of the same magnitude are penalized equally due to the symmetry utr I N u = (−u)tr I N (−u). Note also that quadratic costs are standard in the frequency control literature [23], [24]. Using the total cost (15) and the previously defined constraint losses we formulate the optimal control problem (1). Existence of a minimising control: We study the case in which the mechanical power P (t) is of the form, Each constraint function Cη (u) in the optimal control problem (1) represents one of the pure state constraints (8), (10) and (12) in canonical form [18, p. 70]: Z T Cη (u) = (min(0, ψη (x(t))))2 dt (16) 0 2 + λη min 0, ψη (x(T )) . This formulation is convenient as a penalty function approach for solving the optimal control problem numerically [18], [28]. There is a corresponding maximum principle which provides necessary conditions for a solution to the optimal control problem [14], but does not prove that there exists such a solution. For completeness we provide the following result. Theorem 1. Suppose the canonical form constraints in the optimal control problem (1) are such that, Cη (u) ≤ εη ∀η =⇒ (t, x(t)) ∈ Q ∀t ∈ [0, T ], where Q is a compact set. Then there exists a state-control pair (x∗ , u∗ ) solving Problem 1. In physical terms, Theorem 1 tells us that there is a feasible control strategy that minimizes the cost. Condition (17) is a technical assumption needed to apply a general existence theorem from optimal control theory (see [15, p. 483] for a discussion on this). It is also a reasonable one since we aim to control the power grid within a bounded range of operational values. When ε = 0 all operational constraints are satisfied at all times exactly, and (17) is easily verified from the pure state constraints (8), (10) and (12). Proof. First note that the dynamics for x given explicitly by (2) are finitely generated in the following sense [15, p. 478]: f (t, x(t), u(t)) = g 0 (t, x(t)) + N X g k (t, x(t))uk (t), (18) k=1 where g k , k = 0, 1, . . . , N , is a 3N -dimensional vectorvalued function. In particular, for k = 1, . . . , N we have g k ≡ eN +k where eN +k is the 3N -dimensional vector with 1 at the (N + k)-th coordinate and zeros elsewhere. The optimal control problem also has the following additional properties: • Each function g k (k = 0, 1, . . . , N ) in (18) is measurable in time t, continuous in the state x and satisfies, (t, x) ∈ Q =⇒ kgk (t, x)k ≤ K(1 + kxk), P (t) = P̄ + ξ(t), where P̄ = (P̄1 , . . . , P̄N ) is an N -dimensional vector of steady state values at the initial time 0, and ξ is a bounded piecewise continuous N -dimensional deterministic function that models the external disturbance at the nodes. Let uξ = uξ1 , . . . , uξN denote the exact control, uξi (t) = −ξi (t) for all i ∈ N . Since the system is assumed to be at a steady state at time t = 0, the control uξ trivially ensures the inequalities (14) are satisfied. (17) • • • (19) where K > 0 is a constant and k·k is the Euclidean norm. For k = 1, . . . , N condition (19) is clearly satisfied since g k ≡ eN +k . For k = 0 the growth condition (19) follows from the dynamics (2), boundedness of the mechanical power P , and compactness of Q Q. The set of control values U = N i=1 Ui described by (6) is compact and convex. The mapping u 7→ utr I N u is continuous, non-negative and convex. The exact control, uξ , and its corresponding solution to (5), xξ , satisfy conditions i) to iii) of (1). Furthermore, the corresponding cost J uξ is finite since the disturbance ξ is bounded by assumption. MARTYR et al.: CONTROL OF ACTIVE POWER FOR SYNCHRONIZATION AND TRANSIENT STABILITY OF POWER GRIDS If there exists a compact set E such that the following stronger version of (17) holds: ( (t, x(t)) ∈ Q ∀t ∈ [0, T ], Cη (u) ≤ εη ∀η ⇐⇒ (x(0), x(T )) ∈ E, then the proof is completed by applying Theorem 23.11 in [15]. Otherwise, we proceed by noticing that Cη (u) may be written as, Z T Cη (u) = Lη (t, x(t), u(t))dt, (20) 0 where, in analogy to (18), Lη (t, x, u) is finitely generated, measurable in t and continuous in x. If λη = 0 then (20) clearly holds. If λη > 0 we use the fact that Ψη (x) = 2 λη min 0, ψη (x) is continuously differentiable then obtain (20) by elementary calculus and using Ψη (x(0)) = 0. Let x̃ be the (4N + 2)-dimensional vector with components x̃j = xj for j = 1, . . . , 3N , and for η = 1, . . . , N + 2, x̃3N +η has dynamics: x̃˙ 3N +η (t) = Lη (t, x(t), u(t)), Description of approximation method: The control parametrization method [18], [19] is a numerical procedure based on the maximum principle [14], [15], [28] which gives an approximate solution to the optimal control problem. Let np denote a sequence of time points 0 = t0 ≤ . . . ≤ {tk }k=0 tnp = T used to partition the control horizon [0, T ] into np > 0 subintervals, where np is an integer. Let Unp ⊂ U denote the subset of controls u ∈ U of the form ui (t) = np X uki 1[tk−1 ,tk ) (t), i = 1, . . . , N. (21) k=1 Each component ui , i ∈ N , of a control u ∈ Unp is n parametrized by an np -dimensional vector (u1i , . . . , ui p ) ∈ Qnp k=1 Ui . The optimal control problem is then approximated by a constrained nonlinear optimization problem over the bounded (N × np )-dimensional parameter space defining the control vector u ∈ Unp . Standard optimization packages can be used to solve this problem, and we used the Sequential Least Squares Programming (SLSQP) routine in Python. For the numerical simulations we use equidistant partitioning points tk = k · nTp , 0 ≤ k ≤ np , with np = 2500. x̃3N +η (0) = 0. III. S IMULATIONS OF Notice that x̃3N +η (T ) = Cη (u) and the dynamics for x̃ are also finitely generated, f̃ (t, x̃(t), u(t)) = g̃ 0 (t, x(t)) + 5 N X g̃ k (t, x(t))uk (t), k=1 where g̃ k , k = 0, 1, . . . , N , is a (4N + 2)-dimensional vectorvalued function. We can now verify that there exist compact sets Q̃ and Ẽ such that, ( (t, x̃(t)) ∈ Q̃ ∀t ∈ [0, T ], Cη (u) ≤ εη ∀η ⇐⇒ (x̃(0), x̃(T )) ∈ Ẽ, and the proof is completed by applying Theorem 23.11 in [15]. CONTROLLED NETWORKS For the numerical simulations, we concentrate on the following two case studies. We model a two-node system and the five-node network motif, shown in Figure 1a, consisting of two generators at nodes 2 and 5 connected to three motors at the remaining nodes. In Appendix A we list parameter values for the control problem in Table III, and parameter values for the two-node and five-node systems in Tables IV and V respectively. We consider two types of disturbances which only affect node 1: a persistent one and a temporary one on the interval [0, 10]. For the two-node system, node 1 is perturbed by a disturbance of ξ1 = −0.7 s−2 . For the five-node system a disturbance of ξ1 = −2.0 s−2 is used as shown in Figure 1b. The simulated disturbances reflect a sudden increase in demand, or equivalent loss in generation, that can disappear after a few seconds (temporary case) or persist for much longer (persistent case). 0.00 1 −0.25 3 ξ1 [s −2] −0.50 5 −0.75 temporary persistent −1.00 −1.25 −1.50 −1.75 2 4 (a) Five-node network motif −2.00 −5 0 5 10 15 Time [s] 20 25 30 (b) External power disturbances ξ1 applied at node 1 Fig. 1. The first figure (a) illustrates the five-node motif network with 2 generators (green squares) and 3 consumers (red circles). Parameters are given in the Appendix. The second figure (b) illustrates the types of external power disturbances ξ1 applied at node 1. We consider a short temporary change (dashed) of power and a persistent change (solid line). No disturbances are applied to the other nodes. 6 Additional active power applied to node 1 u1 [s −2] u1 [s −2] Additional active power applied to node 1 0.5 0.5 0.0 0.0 Additional active power applied to node 2 u2 [s −2] u2 [s −2] Additional active power applied to node 2 0.00 0.0 uncontrolled linear optimized −0.2 −0.25 0 10 20 30 Time [s] 40 50 −0.4 60 0 10 20 (a) Temporary disturbance 30 Time [s] 40 50 60 (b) Persistent disturbance Fig. 2. The controlled power applied at nodes 1 and 2 in the two-node system. Power profiles for the optimized and linear frequency controls are qualitatively similar at node 1 but can be very different at node 2. For the optimized control, behaviour of the power profile at node 2 is almost opposite to that at node 1. angular velocities is ω ∈ [−0.4π, 0.4π] s−1 , we see that the range of implied values for the linear frequency control for ν = 15 s−1 is already u ∈ [−19, 19] s−2 , which is very large in comparison to the other active power parameters so that consumers could be required to generate power instead of consuming it. Besides the exact and optimized controls, we consider a linear frequency control which is defined by  ∀i ∈ N : ui (t) = −ν ωi (t) , ν ≥ 0. (22) Note that in a synchronized system the same level of control is applied to all nodes. Starting from ν = 0, which is the uncontrolled case, we simulate the controlled system and check whether the inequalities (14) are satisfied, incrementing the value of ν by 1 until this becomes true. Table II below shows the values of ν we obtained. A. Two-node system We show in Figures 2, 3 and 4 respectively, trajectories for the controlled active power, average voltage, and the angular velocity mean and standard deviation in the two-node system. Uncontrolled system: The individual voltages and angular velocities both have periodic orbits that lie outside of the operational constraints. For the voltages this is still reflected when averaged across the nodes, as Figures 3a and 3b show. Figures 4a and 4b show that the system loses its synchronism and, even when the disturbance disappears, the unsynchronized behaviour persists for the entire control horizon. For the angular velocities, however, the oscillations largely cancel out when averaged across the nodes so this behaviour is not reflected in the top panels of Figures 4a and 4b. Linear local frequency control: Trajectories for the linear control applied to the temporary disturbance correspond TABLE II VALUES OF THE CONTROL PARAMETER ν IN s−1 WHICH SATISFIED THE INEQUALITIES (14) WHEN USING THE LINEAR FREQUENCY CONTROL . Temporary Disturbance Persistent Disturbance 2 Nodes 15 280 5 Nodes 30 27 As discussed in Section II-A, the linear frequency control effectively increases the damping parameter γ in the intrinsic grid dynamics (2). Comparing the values of ν in Table II with those for γ in Tables IV and V, we see that those for ν are relatively large. Moreover, since the range of feasible 0.98 0.96 0.96 0.94 0.94 0.92 0.92 0.90 un⟩ontrolled line⟨r optimized ⟨ V⟩ ⟨ V⟩ 0.98 0 10 20 30 Time [s] 40 (a) Temporary disturbance 50 60 0.90 0 10 20 30 Time [s] 40 50 60 (b) Persistent disturbance Fig. 3. Average voltage in the two-node system. Without a controlled response, the voltages exceed the lower operational limit demarcated by the dotted red line. Contrarily, the control stabilizes the voltage. MARTYR et al.: CONTROL OF ACTIVE POWER FOR SYNCHRONIZATION AND TRANSIENT STABILITY OF POWER GRIDS Mean⟨angular⟨ elocity⟨in⟨rad/s 0 −1 √ σ⟩ω) 4 2 0.01 0 10 20 30 Time⟨[s] 40 50 Dispersion⟨of⟨ang lar⟨velocity⟨in⟨rad/s 0.02 4 √ σ⟩ω) Dispersion⟨of⟨angular⟨ elocity⟨in⟨rad/s 0.02 0.00 Mean⟨ang lar⟨velocity⟨in⟨rad/s 1 0 −1 ⟨ω ⟩ ⟨ω ⟩ 1 7 0.01 0 60 0.00 ncontrolled linear optimized 2 0 10 (a) Temporary disturbance 20 30 Time⟨[s] 40 0 60 50 (b) Persistent disturbance p Fig. 4. Angular velocity mean and deviation in the two-node system. Values of σ(ω) for the uncontrolled case are on the secondary y-axis. Red dotted lines show operational limits. Without a controlled response, the system loses synchronism and the mean angular velocity hωi violates the operational limits. This is particularly clear for the persistent disturbance. to the coefficient value ν = 15 s−1 , whereas those for the persistent one correspond to ν = 280 s−1 . Figure 2 shows that the control initially adds power to node 1, which is nearly equal in magnitude to the disturbance, and eventually the level of additional power at this node decreases whilst the amount added to the node 2 increases. For both disturbances, Figure 4 shows that the angular velocity hωi remains close to its initial value. For the temporary disturbance, the system is already close to being synchronized shortly after the disturbance ends, whereas for the persistent one synchronization improves only slowly over time. Optimized control: The optimized control initially adds about half the amount of power to node 1 as the linear one whilst noticeably reducing the amount of power at node 2. This results in a slower decrease in hωi as it approaches the lower operational limit ωmin (cf. Figure 4). In the temporary case, the system is returned close to its initial steady state values after the disturbance has ended. In the persistent case, once hωi reaches the lower operational limit ωmin it is kept there while the disturbance persists. Figure 3 shows that the optimized control takes a similar approach to ensuring the voltage stays within its limits. Notice that in Figure 2 the optimized and LLF controls are qualitatively similar and of the same sign at node 1, but there is a sustained negative level of control at node 2 during the time that there is a positive level for the LLF control. B. Five-node system We show in Figures 5, 6 and 7 respectively, trajectories for the controlled active power, average voltage, and the angular velocity mean and standard deviation in the five-node system. Uncontrolled system: Synchronization generally improves over time and the system eventually becomes resynchronized with acceptable voltages (Figures 6a and 6b) and angular velocities (Figure 7a) except when the disturbance persists (Figure 7b). Linear local frequency control: The synchronization results are similar to the two-node case, with angular velocities kept close to their initial values. The results show that larger networks with higher levels of inertia can provide a more distributed response, thereby requiring lower values of the coefficient ν. Indeed, for persistent disturbance we used ν = 27 s−1 , whereas for the two-node system we used Additional active power applied to node 1 Additional active power applied to node 1 2 −2 1 [s ] [s −2] 2 1 u u [s −2] 1 ≠1 uj 0 −1 1 0 −1 j j 0 Total additional active power applied to the other nodes ∑ ≠1 uj [s −2] Total additional active power applied to the other nodes ∑ uncontrolled linear optimized 1 0 0 10 20 30 40 Time [s] 50 (a) Temporary disturbance 60 0 10 20 30 40 Time [s] 50 60 (b) Persistent disturbance P Fig. 5. The controlled power applied to the perturbed node 1, u1 , and the net total control applied to the remaining nodes, 5i=2 ui , in the five-node system. Qualitatively, the linear frequency control and optimized one can be quite similar. 8 0.987 0.986 0.986 0.985 0.985 0.984 0.984 0.983 0.983 un⟩ontrolled line⟨r optimized ⟨V ⟩ ⟨V ⟩ 0.987 0.982 0.982 0.981 0.981 0.980 0.980 0.979 0.979 0 10 20 30 Time [s] 40 50 60 0 10 (a) Temporary disturbance 20 30 Time [s] 40 50 60 (b) Persistent disturbance Fig. 6. Average voltage in the five-node system. Even without a controlled response the voltages stay well within the operational range [0.94, 1.06] ν = 280 s−1 . Consequently, the combined response at the unperturbed nodes leads to lower control costs. Optimized control: The trajectories are quite similar to those for the two-node system. In particular, as the optimized control changes the net active power, the mean angular velocity hωi follows its natural direction of descent or ascent within the operational limits until a particular level. The angular velocity is then kept at this level whilst the disturbance persists. Furthermore, the combined action at the unperturbed nodes is generally of the opposite type to that taken at the perturbed node. That is, when there is an increase (respectively, decrease) in P u1 there is typically a decrease (respectively, increase) 5 in i=2 ui at the same time. Somewhat surprising is the extent to which the LLF and optimized controls agree, at least qualitatively. Differences between the two mainly concern the initial response to the disturbance: • the LLF control causes a combined increase in active power at the unperturbed nodes; • the optimized control causes a combined decrease in active power at the unperturbed nodes. Another interesting observation is that the controlled power and limiting angular velocities can all be different for the LLF, uncontrolled and optimized cases, yet the limiting voltages across these cases appear to be equal in Figure 6. C. Comparison of control costs In Figure 8 we show the cost J(u) for the linear, optimized and exact controls associated with the trajectories displayed above. While the optimized control satisfies the constraints with smallest cost, we note that its costs are much lower than the linear frequency control’s, partly because it is not forced to keep the system at its initial steady state value. If solutions that are sufficiently close to the initial steady state values are more desirable, this can be taken into account in a variety of ways, including: • • J(u) = 10 20 30 Time⟨[s] 40 (a) Temporary disturbance 50 (23) where ∆x(t) = x(t) − x0 and, ⟨ω ⟩ ⟨ω ⟩ 0 −2 0.0 60 0.050 0.2 0.025 0.000 ncontrolled linear optimized Dispersion⟨of⟨ang lar⟨velocity⟨in⟨rad/s √ σ⟩ω) √ σ⟩ω) 0 qQ (u(t)) + qR (∆x(t))dt Mean⟨ang lar⟨velocity⟨in⟨rad/s 0.2 0.025 T + qS (∆x(T )), Dispersion⟨of⟨angular⟨ elocity⟨in⟨rad/s 0.050 Z 0 Mean⟨angular⟨ elocity⟨in⟨rad/s 1 0 −1 0.000 Adjusting the constraint costs Cη , η = 1, . . . , N + 2, so that deviations from the initial state x0 are penalized explicitly, perhaps increasingly as the remaining time for control, T − t, decreases. Penalising deviations from the initial state x0 by generalising (15) to 0 10 20 30 Time⟨[s] 40 50 0.0 60 (b) Persistent disturbance p Fig. 7. Angular velocity mean and deviation in the five-node system. Values of σ(ω) for the uncontrolled case are on the secondary y-axis. Red dotted lines show operational limits. MARTYR et al.: CONTROL OF ACTIVE POWER FOR SYNCHRONIZATION AND TRANSIENT STABILITY OF POWER GRIDS 30 25 250 exact linear optimized 200 ( ) 150 15 100 10 50 5 0 exact linear optimized J u J u ( ) 20 9 temporary persistent (a) Two-node system 0 temporary persistent (b) Five-node system Fig. 8. Comparison of control costs for the two-node (a) and the five-node (b) system using both temporary and persistent perturbations. The optimized control has the lowest costs to keep the system within operational boundaries, but the difference becomes smaller in the larger network. – for an M -dimensional square matrix A and an M dimensional vector y, qA (y) is the quadratic form qA (y) = y tr Ay; – Q, R and S are appropriately chosen diagonal 3N × 3N matrices with Q positive definite and R, S positive semidefinite. IV. C ONCLUSION AND OUTLOOK The linear local frequency control acts as a primary response service to keep the grid frequency close to its nominal value. In order to guarantee stable operation, its control coefficient ν generally needs to be large. Using the analogy in [11], [12], this means generators and consumers must have a high willingness to adjust their output in response to changes in the reference angular velocity. In terms of power output, this leads to response profiles that almost exactly counteract the disturbance, at least in the initial response phase. Our results suggest that more efficient controllers distribute the controlled response amongst all nodes in the power grid. Moreover, this response need not be homogeneous throughout the network, but could simultaneously involve incremental actions (net increase in power) at some nodes and decremental ones (net decrease in power) at others. Trajectories associated with the optimized control show that as it changes the net active power, the mean angular velocity follows its natural direction of descent, or ascent as appropriate, within the operational limits until a point is reached, possibly at the boundary, at which the power grid is synchronized and active power is balanced within the network. For planned events, or events that will occur with very high probability at an anticipated future time, an optimal centralized control such as this one can be used as an initial response, and can be coupled with a simple distributed or decentralized control, such as the linear local frequency control, to smooth out additional unknown perturbations. Designing decentralized and distributed controllers that are economically efficient is subject of ongoing work (see [13], [23], [29], for instance). Decentralized stochastic control (see [30], [31]), which generalizes our methodology by incorporating uncertainties and different information structures amongst multiple controllers, is likely to become an important theoretical tool for understanding how these controllers work. Its relevance to the stability and control of power systems has been illustrated recently in [32]. While the numerical results presented here to illustrate how the method works were obtained for two simple case studies, namely a 2-node and a 5-node network, our method can be applied to more realistic and larger networks, for which the problem discussed in our paper is of utmost relevance: controlling the system not by arbitrary means but in the most cost efficient way, such that the operational constraints of the power grid keep on being satisfied. A PPENDIX TABLE III PARAMETER VALUES FOR THE SIMULATIONS . V ECTORS AND MATRICES ARE DENOTED IN BOLDFACE . Parameter Value Units T λ ε 60 106 10−6 −4 4 0.94 1.06 1 −0.4π 0.4π s 1 1 U min U max V min V max V ref ωmin ωmax s−2 s−2 1 1 1 rad · s−1 rad · s−1 10 TABLE IV PARAMETER VALUES FOR THE TWO - NODE SYSTEM BASED ON [33, PP. 2–3]. V ECTORS AND MATRICES ARE DENOTED IN BOLDFACE . Parameter γ α β B P̄ θ̄ ω̄· V̄· Value 0.2 2 0.1 ! −0.8 1 1 −0.8 (−0.7, 0.7) (0, 0.7953) 0 0.9901 [13] Units s−1 s s2 [14] [15] s−2 [16] s−2 rad rad · s−1 1 [17] [18] TABLE V PARAMETER VALUES FOR THE FIVE - NODE SYSTEM . V ECTORS AND MATRICES ARE DENOTED IN BOLDFACE . Parameter Value Units γ α β 0.2 2 0.02   −5 1.63 1.63 0 1.63   1.63 −5 1.63 1.63 0    1.63 1.63 −5 1.63 0      1.63 1.63 −5 1.63  0 1.63 0 0 1.63 −5 (−1.0, 1.5, −1.0, −1.0, 1.5) (−0.1689, 0.1087, −0.2872, −0.1689, 0.3353) 0 (0.9916, 0.9928, 0.9946, 0.9916, 0.9605) s−1 s s2 B P̄ θ̄ ω̄ V̄ [19] [20] [21] s−2 [22] s−2 rad rad · s−1 1 [23] [24] R EFERENCES [25] [1] G. Boyle, Renewable Energy: Power for a Sustainable Future, 2nd ed. Oxford, UK: Oxford University Press, 2004. [2] F. Ueckerdt, R. Brecha, and G. Luderer, “Analyzing major challenges of wind and solar variability in power systems,” Renew. Energ., vol. 81, pp. 1–10, Sept. 2015. DOI: 10.1016/j.renene.2015.03.002. [3] J. A. Turner, “A realizable renewable energy future,” Science, vol. 285, no. 5428, pp. 687–689, Jul. 1999. DOI: 10.1126/science.285.5428.687. [4] P. Kundur, Power System Stability and Control, N. J. Balu and M. G. Lauby, eds. New York, NY, USA: McGraw-Hill, 1994. [5] D. Heide, L. Von Bremen, M. Greiner, C. Hoffmann, M. Speckmann, and S. Bofinger, “Seasonal optimal mix of wind and solar power in a future, highly renewable Europe,” Renew. Energ., vol. 35, no. 11, pp. 2483–2489, Nov. 2010. DOI: 10.1016/j.renene.2010.03.012. [6] P. Milan, M. Wächter, and J. Peinke, “Turbulent character of wind energy,” Phys. Rev. Lett., vol. 110, no. 13, Mar. 2013, art. no. 138701. DOI: 10.1103/PhysRevLett.110.138701. [7] K. Dennis, K. Colburn, and J. Lazar, “Environmentally beneficial electrification: The dawn of emissions efficiency,” The Electricity Journal, vol. 29, no. 6, pp. 52–58, Jul. 2016. DOI: 10.1016/j.tej.2016.07.007. [8] P. Palensky and D. Dietrich, “Demand Side Management: demand response, intelligent energy systems, and smart Loads,” IEEE T. Ind. Inform., vol. 7, no. 3, pp. 381–388, Aug. 2011. 10.1109/TII.2011.2158841. [9] B. Schäfer, D. Witthaut, M. Timme and V. Latora, “Dynamically induced cascading failures in supply networks,” arXiv preprint, Jul. 2017. arXiv:1707.08018. [10] D. Kirschen and G. Strbac, Fundamentals of Power System Economics. Chicester, UK: John Wiley & Sons, 2004. [11] B. Schäfer, M. Matthiae, M. Timme and D. Witthaut, “Decentral smart grid control,” New J. Phys., vol. 17, art. no. 015002, Jan. 2015. [12] B. Schäfer, C. Grabow, S. Auer, J. Kurths, D. Witthaut and M. Timme, “Taming instabilities in power grid networks by decentralized control,” [26] [27] [28] [29] [30] [31] [32] [33] Eur. Phys. J-Spec. Top., vol. 225, no. 3, pp. 569–582, May 2016. DOI: 10.1140/epjst/e2015-50136-y. D. K. Molzahn, F. Dörfler, H. Sandberg, S. H. Low, S. Chakrabarti, R. Baldick and J. Lavaei, “A survey of distributed optimization and control algorithms for electric power systems,” IEEE T. Smart Grid, vol. 8, no. 6, pp. 2941–2962, Nov. 2017. DOI:10.1109/TSG.2017.2720471. M. R. Hestenes, Calculus of Variations and Optimal Control Theory. New York, NY, USA: John Wiley & Sons, 1966. F. Clarke, Functional Analysis, Calculus of Variations and Optimal Control (Graduate Texts in Mathematics Vol. 264). London, UK: Springer, 2013. B. Schäfer, C. Beck, K. Aihara, D. Witthaut and M. Timme, “NonGaussian power grid frequency fluctuations characterized by Lévy-stable laws and superstatistics,” Nature Energy, to be published, 2018. DOI: 10.1038/s41560-017-0058-z. R.G. Harrison and E. Hanna, “The solar eclipse: a natural meteorological experiment,” Phil. Trans. R. Soc. A., vol. 374, no. 2077, Aug. 2016. DOI: 10.1098/rsta.2015.0225. K. L. Teo and C.J. Goh, A Unified Computational Approach to Optimal Control Problems. Essex, UK: Longman Scientific & Technical, 1991. V. Rehbockt, K. L. Teo, L. S. Jennings and H. W. J. Lee, “A survey of the control parametrization and control parametrization enhancing methods for constrained optimal control problems,” in Progress in Optimization (Applied Optimization Vol. 30). Boston, MA, USA: Springer US, 1999, pp. 247–275. DOI:10.1007/978-1-4613-3285-5 13. K. Schmietendorf, J. Peinke, R. Friedrich and O. Kamps, “Self-organized synchronization and voltage stability in networks of synchronous machines,” Eur. Phys. J-Spec. Top., vol. 223, no. 12, pp. 2577–2592, Oct. 2014. DOI: 10.1140/epjst/e2014-02209-8. D. Z. Szabó and R. Martyr, “Real option valuation of a decremental regulation service provided by electricity storage,” Phil. Trans. R. Soc. A., vol. 375, no. 2100, Aug. 2017. DOI: 10.1098/rsta.2016.0300. C. Zhao, E. Mallada, and F. Dörfler, “Distributed frequency control for stability and economic dispatch in power networks,” in Proc. Am. Control Conf., Chicago, IL, USA, 2015, pp. 2359–2364. DOI: 10.1109/ACC.2015.7171085. E. Weitenberg, Y. Jiang, C. Zhao, E. Mallada, C. De Persis and F. Dörfler, “Robust decentralized secondary frequency control in power systems: merits and trade-offs,” arXiv preprint, Nov. 2017. arXiv:1711.07332. S. Trip, M. Bürger and C. De Persis, “An internal model approach to (optimal) frequency regulation in power grids with timevarying voltages,” Automatica, vol. 64, pp. 240–253, Feb. 2016. DOI: 10.1016/j.automatica.2015.11.021. S. Auer, C. Roos, J. Heitzig, F. Hellmann and J. Kurths, “The contribution of different electric vehicle control strategies to dynamical grid stability,” arXiv preprint, Aug. 2017. arXiv:1708.03531. Electricity Transmission System Operations. National Grid UK, 2017. [Online]. Available: http://www2.nationalgrid.com/uk/industry-information/electricity-transmission-system-o Accessed on: July, 2017. The Electricity Supply Regulations 1988. The National Archives, 2017. http://www.legislation.gov.uk/uksi/1988/1057/made/data.xht?wrap=true. Accessed on: July, 2017. R. F. Hartl, S. P. Sethi and R. G. Vickson, “A survey of the maximum principles for optimal control problems with state constraints,” SIAM Rev., vol. 37, no. 2, pp. 181–218, Jun. 1995. DOi: 10.1137/1037043. T. Stegink, C. De Persis and A. van der Schaft, “A unifying energybased approach to stability of power grids with market dynamics,” IEEE T. Automat. Contr., vol. 62, no. 6, pp. 2612–2622, Jun. 2017. DOI: 10.1109/TAC.2016.2613901. A. Mahajan and M. Mannan, “Decentralized stochastic control,” Ann. Oper. Res., vol. 241, no. 1–2, pp. 109–126, Jun. 2016. DOI: 10.1007/s10479-014-1652-0. C. D. Charalambous and N. U. Ahmed, “Centralized versus decentralized optimization of distributed stochastic differential decision systems with different information structures-part I: a general theory,” T. Automat. Contr., vol. 62, no. 3, pp. 1194–1209, Mar. 2017. DOI: 10.1109/TAC.2016.2575818. R. Singh, P. R. Kumar and L. Xie, “Decentralized control via dynamic stochastic prices: the independent system operator problem,” arXiv preprint, Jun. 2016. arXiv:1605.08926v2. K. Schmietendorf, J. Peinke and O. Kamps, “On the stability and quality of power grids subjected to intermittent feed-in,” arXiv preprint, Nov. 2016. arXiv:1611.08235.
3cs.SY
1 Stochastic Stability Analysis of Discrete Time System Using Lyapunov Measure arXiv:1503.04438v2 [math.DS] 8 Mar 2016 Umesh Vaidya, Senior Member, IEEE, Abstract—In this paper, we study the stability problem of a stochastic, nonlinear, discrete-time system. We introduce a linear transfer operator-based Lyapunov measure as a new tool for stability verification of stochastic systems. Weaker set-theoretic notion of almost everywhere stochastic stability is introduced and verified, using Lyapunov measure-based stochastic stability theorems. Furthermore, connection between Lyapunov functions, a popular tool for stochastic stability verification, and Lyapunov measures is established. Using the duality property between the linear transfer Perron-Frobenius and Koopman operators, we show the Lyapunov measure and Lyapunov function used for the verification of stochastic stability are dual to each other. Set-oriented numerical methods are proposed for the finite dimensional approximation of the Perron-Frobenius operator; hence, Lyapunov measure is proposed. Stability results in finite dimensional approximation space are also presented. Finite dimensional approximation is shown to introduce further weaker notion of stability referred to as coarse stochastic stability. The results in this paper extend our earlier work on the use of Lyapunov measures for almost everywhere stability verification of deterministic dynamical systems (“Lyapunov Measure for Almost Everywhere Stability”, IEEE Trans. on Automatic Control, Vol. 53, No. 1, Feb. 2008). Index Terms—Stochastic stability, almost everywhere, computational methods. I. I NTRODUCTION Stability analysis and control of stochastic systems are a problem of theoretical and applied interests. For stochastic systems, there are various notions of stabilities. Among the most popular notions of stabilities are almost sure and moment stability [1], [2]. Almost sure notion of stability implies stability of sample-path trajectories of stochastic systems and is a weaker notion of stability compared to the moment stability definition. Moment stability definition deals with the steady state probability density function of a stochastic system, in particular, the integrability of it with respect to various powers of state. There is extensive literature on stochastic stability and stabilization in control and dynamical system literature. Some of the classic results on stability analysis and control of stochastic dynamical system are found in [1]–[3]. Mao [4] presents a systematic summary of results on various stochastic stability definitions and Lyapunov function-based verification techniques for a stochastic system. The topic of stochastic stability of switched system and the Markov jump system has also attracted lots of attention with applications in network controlled dynamical systems [5]–[11]. The results in Financial support from the National Science Foundation grant ECCS1150405 and CNS-1329915 is gratefully acknowledged. U. Vaidya is with the Department of Electrical and Computer Engineering, Iowa State University, Ames, IA, 50011 USA e-mail: [email protected]. these papers address not only the stochastic stability problem, but also robust control synthesis and fundamental limitations issues that arise in stabilization and estimation of dynamical systems in the presence of stochasticity in a feedback loop. More generally, stochastic stability and stabilization problems for a nonlinear system with a multiplicative noise process are addressed in [12]–[14]. As in a deterministic system, most of the existing methods for stochastic stability verification are based directly or indirectly on the Lyapunov function. The Lyapunov function is used for both almost sure and moment stability verification. The Lyapunov function and Lyapunov function-based methods are also applied for stochastic stabilization [15]–[20]. While there is extensive literature on the numerical procedure for the construction of a Lyapunov function for stability verification and stabilization of a deterministic dynamical system [21]– [30], the literature on numerical methods for stochastic stability verification is very scant [31], [32]. The contributions of this paper are two-fold. We provide a novel operator theoretical framework for stability verification of a stochastic dynamical system. We also show the proposed operator theoretic framework is amicable to computations thereby providing systematic numerical procedures for stochastic stability verification. The operator theoretic framework that we introduce in this paper is used to verify a weaker set-theoretic notion of almost everywhere stability of a stochastic system. The notion of almost everywhere stability was introduced for the first time in the work of Rantzer for continuous time deterministic dynamical systems [33]. This notion of stability was later extended to continuous time stochastic systems in [34]. The notion of a.e. stability essentially implies the set of points in the state space starting from which system trajectories are not attracted to the attractor set is a measure zero set. The almost everywhere notion of stability was also used for the design of stabilizing feedback controller and for solving verification problems for a nonlinear system [22]. The input-output version of almost everywhere stability was developed in [35]. In [36], linear transfer operator-based framework was introduced to verify this weaker set-theoretic notion of a.e. stability for discrete-time dynamical system. Transfer Perron-Frobenius operator-based Lyapunov measure was introduced as a new tool to verify a.e stability of a nonlinear system. Duality between the Lyapunov function and Lyapunov measure was established using the duality in the transfer Perron-Frobenius and Koopman operators. Application of the Lyapunov measure for the design of stabilizing and optimal feedback controller was proposed in [37], [38]. Operator theoretical framework involving spectral analysis of Koopman operator was proposed 2 in [39] for stability analysis of deterministic nonlinear systems. The results in this paper can be viewed as a natural extension of the results from [36] towards a.e. stability verification of discrete time stochastic dynamical system. Associated with the stochastic dynamical system are two linear transfer operators, the Perron-Frobenius (P-F) and Koopman operators. These operators are used to study the evolution of ensembles of points in the form of measures or density supported on state space. These operators are dual to each other and are used in the dynamical system literature for the analysis of deterministic and stochastic dynamical systems [40]–[47]. One of the main contributions of this paper is the introduction of a linear transfer P-F operator based Lyapunov measure for a.e. stochastic stability verification of stochastic dynamical system. We introduce a.e. almost sure notion of stability and provide Lyapunov measurebased stability theorems to verify this stability. The Lyapunov function for stochastic stability verification is shown intimately connected with Koopman operator formalism. In particular, analytical formulas for the computation of Lyapunov measure and the Lyapunov function are obtained in terms of resolvent of the Perron-Frobenius and Koopman operator respectively. By exploiting the duality relationship between Koopman and Perron-Frobenius operators, we show the Lyapunov function and Lyapunov measure are dual to each other in a stochastic setting as well. The results presented in this paper are extended version of results appeared in [48], [49]. While results exist for the application of operator theoretical methods for the stability verification of a stochastic system in more general Markov chain settings [50], the main motivation of this work is to provide computational methods for the construction of stability certificate in the form of a Lyapunov measure. Towards this goal, set-oriented methods are used for the finite dimensional approximation of the linear transfer P-F operator and for computation of the Lyapunov measure [51], [52]. The finite dimension approximation introduces a further weaker notion of a.e. stability by allowing stable dynamics in the complement of the attractor set, but their domain of attraction is smaller than the size of discretization cells used in the finite dimensional approximation. This notion of stability is referred to as coarse stochastic stability. The finite dimensional approximation of the P-F operator arises as a Markov matrix and provides for various alternate formulas for the computation of the Lyapunov measure. Organization of this paper is as follows. In section II, we discuss the preliminaries of the transfer operators and introduce various set-theoretic stochastic stability definitions. The main results of this paper on Lyapunov measure-based, stochastic stability theorems are proven in section III. The formula for obtaining the Lyapunov function for a stochastic system in terms of the resolvent of the Koopman operator is presented in section IV. The connection between the Lyapunov measure and the Lyapunov function is discussed in section V. The set-oriented numerical method for the finite dimensional approximation of P-F operator and stability results using the finite dimensional approximation are discussed in VI and VII respectively. Simulation examples and discussed in Section VIII followed by conclusions in section IX. II. P RELIMINARIES The set-up and preliminaries for this section are adopted from [40]. Consider the discrete-time stochastic dynamical system, xn+1 = T (xn , ξn ), (1) where xn ∈ X ⊂ Rd is a compact set. We denote B(X) as the σ-algebra of Borel subsets of X. The random vectors, ξ0 , ξ1 , . . ., are assumed independent identically distributed (i.i.d) and takes values in W with the following probability distribution, Prob(ξn ∈ B) = v(B), ∀n, B ⊂ W, and is the same for all n and v is the probability measure. The system mapping T (x, ξ) is assumed continuous in x and for every fixed x ∈ X, it is measurable in ξ. The initial condition, x0 , and the sequence of random vectors, ξ0 , ξ1 , . . ., are assumed independent. Let W × W = W 2 . Then, the two times composition of the stochastic dynamical system, denoted by T 2 : X × W 2 → X, is given by xn+2 = T (T (xn , ξn ), ξn+1 ) =: T 2 (xn , ξnn+1 ), where ξnn+1 ∈ W 2 . Since the sequence of random vectors {ξn } is assumed i.i.d, the probability measure on W 2 will simply be the product measure, v × v := v 2 . Similarly, the n-times composition of a stochastic system (1), T n : X × W n → X, is denoted by xn+1 = T n (x0 , ξ0n ), where ξ0n ∈ W n with probability measure v n . The basic object of study in our proposed approach to stochastic stability is a linear transfer, the Perron-Frobenius operator, defined as follows: Definition 1 (Perron-Frobenius (P-F) operator): Let M(X) be the space of finite measures on X. The PerronFrobenius operator, P : M(X) → M(X), corresponding to the stochastic dynamical system (1) is given by R R [PT µ](A) = X W χA (T (x, y))dv(y)dµ(x) h i = Eξ µ(Tξ−1 (A)) , (2) for µ ∈ M(X), and A ∈ B(X), where χA (x) is an indicator function of set A. The expectations on ξ are taken with respect to the probability measure, v, and Tξ−1 (A) is the inverse image of set A under the mapping T (x, ξ) for a fixed value of ξ, i.e., Tξ−1 (A) = {x : T (x, ξ) ∈ A}. Furthermore, if we denote the P-F operator corresponding to the dynamical system, Tξ : X → X, for a fixed value of ξ as Z [PTξ µ](A) = χA (T (x, ξ))dµ(x) = µ(Tξ−1 (A)), X then, the P-F operator (2) can be written as [PT µ](A) = Eξ [PTξ µ](A). The Koopman operator is dual to the P-F operator and defined as follows: Definition 2 (Koopman operator): Let h ∈ C 0 (X) be the space of continuous function. The Koopman operator, UT : 3 C 0 (X) → C 0 (X), corresponding to the stochastic system (1) is defined as follows: Z [UT h](x) = h(T (x, y))dv(y) = Eξ [h(T (x, ξ))], (3) W where the expectations are taken with respect to probability measure, v. Let h be a measurable function and µ ∈ M(X), define the R inner product as hh, µi = X hdµ(x). With respect to this inner product, the Koopman and P-F operators are dual to each other. Using the inner product definition, we can write (2) as follows: hχA , PT µi = hUT χA , µi . ϑ denoted as µ ≺ ϑ, if µ(B) = 0 for all B ∈ B(X) with ϑ(B) = 0. Definition 8 (Equivalent measure): The two measures, µ and ϑ, are equivalent (µ ≈ ϑ) provided µ(B) = 0, if and only if ϑ(B) = 0 for B ∈ B(X). A. Decomposition of the P-F operator Let E = {0}. Hence, E c = X \ E. We write T : E ∪ E c × W → X. For any set B ∈ B(E c ), we can write R R [PT µ](B) = X W χB (T (x, y))dv(y)dµ(x) R R = E c W χB (T (x, y))dv(y)dµ(x). (4) Due to the linearity of the scalarPproduct, this implies n hgn , PT µi = hUT gn , µi, where gn = i=1 αi χAi is the sum of a simple function. Since, every measurable function, h, can be approximated by a sequence {gn } of simple functions, we obtain in the limit, hh, PT µi = hUT h, µi . Assumption 3: We assume x = 0 is an equilibrium point of system (1), i.e., T (0, ξn ) = 0, ∀n, for any given sequence of random vectors {ξn } taking values in set W . Assumption 4 (Local Stability): We assume the trivial solution, x = 0, is locally stochastic, asymptotically stable. In particular, we assume there exists a neighborhood O of x = 0, such that for all x0 ∈ O, This is because T (x, ξ) ∈ B implies x ∈ / E. Since set E is invariant, we define the restriction of the P-F operator on the complement set E c . Thus, we can define the restriction of the P-F operator on the measure space M(E c ) as follows: Z Z χB (T (x, y))dv(y)dµ(x), [P1 µ](B) = Prob{T n (x0 , ξ0n ) ∈ O} = 1, ∀n ≥ 0, where µ ∈ M(E) and B ⊂ B(E). The above considerations suggest a representation of the PF operator, P, in terms of P0 and P1 . Indeed, this is the case, if one considers a splitting of the measured space, and Prob{ lim T n (x0 , ξ0n ) = 0} = 1. n→∞ Ec c W for any set B ∈ B(E ) and µ ∈ M(E c ). Next, the restriction T : E × W → E can also be used to define a P-F operator denoted by Z [P0 µ](B) = χB (T (x, y))dv(y)dµ(x), B Assumption 3 is used in the decomposition of the P-F operator M(X) = M0 ⊕ M1 , (5) in section (II-A) and Assumption 4 is used in the proof of Theorem (10). In the following, we will use the notation U () where M0 := M(E), M1 := M(E c ), and ⊕ stands for to denote the  neighborhood of the origin for any positive direct sum. Then it follows the splitting defined by Eq. (5), the P-F value of  > 0. We have 0 ∈ U () ⊂ O. We introduce the following definitions for stability of operator has a lower-triangular matrix representation given by   stochastic dynamical systems (1). P0 0 P= . (6) Definition 5 (Almost everywhere (a.e.) almost sure stability): × P1 The equilibrium point, x = 0, is said to be almost everywhere, almost sure stable with respect to finite measure, m ∈ M(X), III. LYAPUNOV MEASURE AND STOCHASTIC STABILITY if for every δ() > 0, we have We begin the main results section with the following Lemma. m{x ∈ X : P rob{ lim T n (x, ξ0n ) 6= 0} ≥ δ} = 0. n→∞ Lemma 9: Let Definition 6 (a.e. stochastic stable with geometric decay): ξ0n = {ξ0 , . . . , ξn } ∈ W × . . . × W =: W n For any given  > 0, let U () be the  neighborhood of the {z } | n equilibrium point, x = 0. The equilibrium point, x = 0, is said to be almost everywhere, almost sure stable with and F (x, ξ n ) := T n (x, ξ n ) : X × W n → X be the notation 0 0 geometric decay with respect to finite measure, m ∈ M(X), for the n times composition of the map T : X × W → X. if there exists 0 < α() < 1, 0 < β < 1, and K() < ∞, Then, the Perron-Frobenius operator, PF : M(X) → M(X), such that corresponding to system mapping F is given by m{x ∈ X : P rob{T n (x, ξ0n ) ∈ B} ≥ αn } ≤ Kβ n , for all sets B ∈ B(X \ U ()), such that m(B) > 0. We introduce the following definition of absolutely continuous and equivalent measures. Definition 7 (Absolutely continuous measure): A measure µ is absolutely continuous with respect to another measure, PF = PT PT . . . PT =: PnT . | {z } n Proof: Let ϑ(A) = [PT µ](A), it then follows from Definition 1 for the P-F operator that h i [PT µ](A) = ϑ(A) = Eξ0 µ(Tξ−1 (A)) , (7) 0 4 where expectation is taken with respect to probability measure v and Tξ−1 (A) is the inverse image of set A under the mapping 0 T (x, ξ0 ) for fixed values of ξ0 , i.e., Tξ−1 (A) = {x ∈ X : T (x, ξ0 ) ∈ A}. 0 Hence, [P2T µ](B) = [PT PT µ](B) = [PT ϑ](A) = Eξ1 [ϑ(Tξ−1 (B))]. 1 Tξ−1 (B) 1 Following (7) and defining = A, we obtain h h ii −1 [P2T µ](B) = Eξ1 Eξ0 µ(Tξ−1 (T (B))) . ξ 0 1 Since ξ0 and ξ1 are independent with the same probability distribution v, we obtain h i −1 [P2T µ](B) = Eξ01 µ(Tξ−1 (T (B))) ξ 0 1 R R = W 2 X χB (T (T (x, y0 ), y1 ))dv(y0 )dv(y1 )dµ(x) = [PT 2 (x,ξ01 ) µ](B). (8) local neighborhood of x = 0. However, limn→∞ [Pn1 m](B) = 0 for any set B ∈ B(X \ U ()) and, in particular, for B = S̃. Hence, we have m(S̃) = m(S) = 0. Theorem 11: The x = 0 solution for system (1) is a.e. stochastic stable with geometric decay with respect to finite measure, m ∈ M(X), if and only if there exists a positive constant, K(), and 0 < β < 1, such that [Pn1 m](B) ≤ Kβ n , ∀n ≥ 0 for every set B ∈ B(X \ U ()), such that m(B) > 0. Proof: We first prove the sufficient part. Z Z [Pn1 m](B) = χB (T n (x, ξ0n ))dv0n (ξ0n )dm(x) ≤ Kβ n . X R R [Pn1 m](B) = X W n χB (T n (x, ξ0n ))dv0n (ξ0n )dm(x) R = X P rob{T n (x, ξ0n ) ∈ B}dm(x). (11) Choose 0 < α < 1, such that We now state the first main results of the paper on the stochastic stability expressed in terms of asymptotic behavior of Pn1 . Theorem 10: The equilibrium point, x = 0, for system (1) is almost everywhere, almost sure stable with respect to finite measure, m ∈ M(X), if lim [Pn1 m](B) = 0, n→∞ for every set B ∈ B(X \ U ()), such that m(B) > 0. U () is the  neighborhood of the equilibrium point, x = 0, for any given  > 0. Proof: For any given δ() > 0, consider the following sets, β α < 1. Let Sn = {x ∈ X : P rob{T n (x, ξ0n ) ∈ B} ≤ αn } The main results of this lemma then follow from induction. Using the lower triangular structure of the P-F operator in Eq. (6), one can write the PnT as follows:  n  P0 0 PnT = . (9) × Pn1 Wn and S̄n = {x ∈ X : P rob{T n (x, ξ0n ) ∈ B} ≥ αn }. Then, [Pn1 m](B) Z = ZSn + P rob{T n (x, ξ0n ) ∈ B}dm(x) P rob{T n (x, ξ0n ) ∈ B}dm(x). S̄n Since integrals over both sets are positive, we have Z [Pn1 m](B) ≥ P rob{T n (x, ξ0n ) ∈ B}dm(x) ≥ αn m(S̄n ). S̄n Hence, we have, m(S̄n ) ≤ K βn , αn which is equivalent to m{x ∈ X : P rob{T n (x, ξ0n ) ∈ B} ≥ αn } ≤ K β̄ n . For the necessary part, we assume the system is a.e. stochastic Sn = {x ∈ X : P rob(T k (x, ξ0k ) ∈ X\U ()) ≥ δ, for some k > n} stable with geometric decay (Definition 6). Construct the and sets, Sn and S̄n , from the sufficiency part of the proof. S = ∩∞ n=1 Sn . The parameter, α, for this construction now comes from the So, set S consists of points with probability larger than δ to stability definition (Definition 6). We have Z end up in set X \ U (). Now, since  is arbitrary small and n [P m](B) = P rob{T n (x, ξ0n ) ∈ B}dm(x) 1 from the local stability property of equilibrium point, we have ZSn 0 ∈ U () ⊂ O. The proof of this theorem follows, if we show + P rob{T n (x, ξ0n ) ∈ B}dm(x). m(S) = 0. Let S̃ = S∩(X\O). Then, from the property of the S̄n local neighborhood, m(S) = m(S̃). From the construction of set S, it follows x ∈ S, if and only if P rob(T (x, ξ) ∈ S) = 1. Hence, Hence, [Pn1 m](B) ≤ αn m(Sn ) + m(S̄n ) ≤ αn m(Sn ) + Kβ n . Z [PT m](S) = P rob(χS (T (x, ξ)))dm(x) = m(S). (10) Now, since X is assumed compact, we have m(Sn ) < M for X some M < ∞. Hence, we have Now, S̃ ⊂ S with m(S̃) = m(S). Since T is continuous in x [Pn1 m](B) ≤ K̄ β̄ n , and measurable in ξ, we have [P1 m](S̃) = [P1 m](S). Using (10), we obtain [P1 m](S̃) = m(S̃). S̃ ⊂ X lies outside some where K̄ = max(M, K) and β̄ = max(β, α) < 1. 5 Following is the definition of Lyapunov measure introduced for stability verification of a stochastic system. Definition 12 (Lyapunov measure): A Lyapunov measure, µ̄ ∈ M(X \ U ()), is defined as any positive measure finite outside the  neighborhood of equilibrium point and satisfies [P1 µ̄](B) < γ µ̄(B) (12) for 0 < γ ≤ 1 and for all sets B ∈ B(X \ U ()). Theorem 13: Consider the stochastic dynamical system (1) with x = 0 as a locally stable, equilibrium point. Assume there exists a Lyapunov measure, µ̄, satisfying Eq. (12) with γ < 1. Then, 1) x = 0 is almost everywhere almost sure stable with respect to finite measure, m, which is absolutely continuous with respect to the Lyapunov measure µ̄. 2) x = 0 is almost everywhere stochastic stable with geometric decay with respect to measure any finite measure, m ≺ κµ̄, for some constant, κ > 0. Proof: 1) Using the definition of Lyapunov measure with γ < 1, we obtain [PnT µ̄](B) ≤ γ n µ̄(B) =⇒ lim [PnT µ̄](B) = 0. n→∞ Now, since m ≺ µ̄, we have limn→∞ [PnT m](B) = 0. The proof then follows by applying the results from Theorem 10. 2) We have [PnT m](B) ≤ κ[PnT µ̄](B) ≤ κγ n µ̄(B) ≤ K()γ n , where K() = κµ̄(X \ U ()), which, by definition of the Lyapunov measure, is finite. The proof then follows by applying the results from Theorem 11. The following theorem provides for the construction of the Lyapunov measure as an infinite series involving the PF operator. Theorem 14: Let the equilibrium point, x = 0, be almost everywhere, stochastic stable with geometric decay with respect to measure, m. Then, there exists a Lyapunov measure (Definition 12) µ̄ with γ < 1. Furthermore, the Lyapunov measure is equivalent to measure m (i.e., µ̄ ≈ m) and the Lyapunov measure dominates measure m (i.e., µ̄(B) ≥ m(B)). Proof: Following the results of Theorem 11, we know there exists a positive constant, K, and β < 1, such that [Pn1 m](B) ≤ Kβ n . Let β = β1 β2 , such that β1 < 1 and β2 < 1. Hence, we have αn [Pn1 m](B) ≤ Kβ1n with α = follows: 1 β2 > 1. Now, construct the Lyapunov measure as  µ̄(B) = m + α[P1 m] + α2 + . . . (B) P∞ = k=0 αk [Pk1 m](B). IV. KOOPMAN OPERATOR AND LYAPUNOV FUNCTION In this section, we describe the connection between the Koopman operator and Lyapunov function for a stochastic dynamical system. Definition 15 (pth Moment Stability): The equilibrium solution x = 0 is said pth moment exponentially stable with p ∈ Z+ , if there exist a positive constants, K < ∞, and β < 1, such that Eξ0n [k xn+1 kp ] ≤ Kβ n k x0 kp , ∀n ≥ 0 for all initial conditions x0 ∈ X. The results of the following theorem are not new [1], [4]. However, the proposed construction of the Lyapunov function in terms of the Koopman operator is new. Furthermore, the connection between the Koopman operator and Lyapunov function also brings out clearly the dual nature of the Lyapunov function and the Lyapunov measure for stochastic stability verification. Theorem 16: The equilibrium solution, x = 0, is pth moment exponentially stable, if and only if there exists a nonnegative function V : X → R+ satisfying a k x kp ≤ V (x) ≤ b k x kp , (13) [UT V ](x) ≤ cV (x), where a, b, c are positive constants with c < 1. Furthermore, V can be expressed in terms of resolvent of the Koopman operator as follows: V (x) = (I − UT )−1 f (x), where f (x) =k x kp . Proof: We first prove the sufficient part. We have Eξ0n [k xn+1 kp ] ≤ a1 Eξ0n [V (xn+1 )] = a1 Eξn−1 [[UT V ](xn )] 0 ≤ ac Eξn−1 [V (xn )] ≤ 0 cn a V (x0 ) ≤ ab cn k x0 kp . (14) Let, K = ab and c = β. Thus, we obtain the desired condition for the pth moment exponential stability. For the necessary part, let PN PN VN (x0 ) = k=0 Eξ0k [f (xk+1 )] = k=0 Eξk−1 [[UT f ](xk )] 0 PN k = k=0 [UT f ](x0 ). (15) The uniform bound on VN (x) follows from pth moment exponential stability. Hence, V (x) = limN →∞ VN (x) is well defined. Furthermore, V (x) = lim The above infinite series is well-defined and converges because αn [Pn1 m](B) ≤ Kβ1n . Multiplying both sides of (13) with I − αP1 , we obtain α[P1 µ̄](B) ≤ µ̄(B) =⇒ [P1 µ̄](B) ≤ β2 µ̄(B). Allowing γ = β2 , we satisfy the requirements for the Lyapunov measure. The equivalence of measure, m, the Lyapunov measure, µ̄, and the dominance of the Lyapunov measure follows from the construction of the Lyapunov measure as a infinite series formula Eq. (13). N →∞ N X [UkT f ](x0 ) = (I − UT )−1 f. (16) k=0 The bounds on the function, V , and the inequality, [UT V ](x) ≤ cV (x), follow from the construction of the function, V. The P-F operator and Koopman operator are shown dual to each other. In Eqs. (13) and (16), the Lyapunov measure and 6 the Lyapunov function are expressed in terms of an infinite series involving the P-F and Koopman operators, respectively. Using the duality relationship between the P-F and Koopman operators, it then follows the Lyapunov function and the Lyapunov measure used for verifying stochastic stability are dual to each other. In the following section, we establish a precise connection between the two stochastic, stability verification tools. Hence, (following Theorem 14), there exists a Lyapunov measure satisfying dµ̄(x) − αd[P1 µ](x) = g(x)dm(x). Furthermore, the density function corresponding to ρ(x) satisfies a1 k x k−p ≤ ρ(x) ≤ a2 k x k−p . V. R ELATION BETWEEN LYAPUNOV MEASURE AND FUNCTION In this section, we relate Lyapunov measure and Lyapunov function. We impose additional assumptions, the system mapping (1), i.e., T : X × W → X. We assume the system mapping T is C 1 invertible diffeomorphism with respect to state variable, x, for any fixed value of noise parameter, ξ. For the diffeomorphism, we define Jξ−1 (x) = dTξ−1 dx (x) , where | · | stands for the determinant. Lemma 17: Let PT be the P-F operator for the system mapping T : X × W → X. Then, Then, the x = 0 solution is pth exponentially stable with Lyapunov function V obtained as V (x) = ρ(x)−1 . 2) Let x = 0 be the pth moment exponentially stable with the Lyapunov function V (x) satisfying V (x) < βEξ [Jξ (x)V (Tξ−1 (x))] for some β < 1. Then, the measure, Z 1 dm(x), (18) µ̄(B) = γ B V (x) is a Lyapunov measure satisfying Eξ [µ̄(Tξ−1 (B))] < κµ̄(B) for some κ < 1 and for all B ∈ M(X \U ()) with m(B) > 0. γ ≥ 1 is a suitable constant chosen, such that V1γ is integrable. Proof: 1) dµ̄(x) − αd[P1 µ](x) = g(x)dm(x) d[PT m](x) = Eξ [Jξ−1 (x)]dm(x). If ρ(x) is the density of an absolutely continuous measure, µ, with respect to the Lebesgue measure, m, i.e., dµ(x) = ρ(x)dm(x), then d[PT µ](x) = Eξ [Jξ−1 (x)ρ(Tξ−1 (x))]dm(x). Proof: Z Z [PT m](B) = χB (Ty (x))dm(x)dv(y) W Z Z χB (x)dm(Ty−1 (x))dv(y). = W Z Z X Jy−1 (x)dm(x)dv(y) = χB (x) X X W Z X dµ̄(x) = ρ(x)dm(x). Z Z [PT µ̄](B) = χB (Ty (x))dv(y)ρ(x)dm(x) X Z Z = X = V −1 (x)dm(x) − αEξ [Jξ−1 (x)V −1 (Tξ−1 (x))]dm(x).(19) Hence, we have V −1 (x) − αEξ [Jξ−1 (x)V −1 (Tξ−1 (x))] = g(x) ≥ 0. Now, since Jξ (x) < 1 or Jξ−1 (x) > 1 for all values of ξ ∈ W , we have # " 1 1 . (20) ≥ αEξ V (x) V (Tξ−1 (x)) Now, using Holder’s inequality, we have " # " # V (Tξ−1 (x)) 1 1 = Eξ ≤ Eξ Eξ [V (Tξ−1 (x))]. V (Tξ−1 (x)) V (Tξ−1 (x)) χB (x)E[Jξ−1 (x)]dm(x). d[PT m] = Eξ [Jξ−1 (x)]dm(x). W χB (x)dv(y)ρ(Ty−1 (x))Jy−1 (x)dm(x). W d[PT µ̄] = E[ρ(Tξ−1 (x))Jξ−1 (x)]dm(x). We have the following theorem connecting the Lyapunov measure and the Lyapunov function for a stochastic system. Theorem 18: Let Jξ (x) < ∆ < 1 for all ξ ∈ W and x ∈ X. 1) Let the equilibrium point, x = 0, be almost everywhere, stochastic stable with geometric decay with respect to the Lebesgue measure, m. Assume the Lyapunov measure is absolutely continuous with respect to the Lebesgue measure, m, with density function ρ(x), i.e., dµ̄(x) = ρ(x)dm(x). (17) " Eξ 1 V (Tξ−1 (x)) # ≥ 1 . Eξ [V (Tξ−1 (x))] (21) Combining (20) and (21), we obtain V (x) ≤ ᾱEξ [V (Tξ−1 (x))], ᾱ = 1 < 1. α (22) Since V (x) = ρ−1 (x) is assumed radially unbounded (Eq. (17)), then using the results from Theorem (16) and inequality (22), we achieve the desired results, the x = 0 solution is the pth moment exponentially stable. 2) We have V (x)γ < β γ Eξ [Jξ (x)V (Tξ−1 (x))]γ . Using the Holder inequality, we obtain V (x)γ < β̄Eξ [Jξγ (x)V γ (Tξ−1 (x))], where β̄ = β γ < 1. 1 β̄ > . γ γ V (x) Eξ [Jξ (x)V γ (Tξ−1 (x))] 7 Now, since Jξ < ∆ < 1 is uniformly bounded, there exists P , is now obtained as a γ > 1, sufficiently large, such that νj = [Pµ](Dj ) # " Q L Z 1 β̄ 1 X X dm(x) > . ≥ E ξ γ = p` δTw` (x) (Dj )µi V (x)γ Eξ [Jξ (x)V γ (Tξ−1 (x))] Jξ (x)V γ (Tξ−1 (x)) m(D i) D Integrating over set B ∈ B(X \ U ()), we obtain = Z β̄ V −γ Z (x)dm(x) ≥ B B `=1 Q X `=1 Jξ−1 (x)V −γ (Tξ−1 (x))dm(x). Using the results from Lemma (17) and (18), we obtain the desired results by letting κ = β̄, i.e., [P1 µ̄](B) ≤ κµ̄(B). p` i=1 L X i=1 where Pijw` = i µi Pijw` = L X i=1 µi Q X p` Pijw` , `=1 m(Tw−1 (Dj ) ∩ Di ) ` , m(Di ) (23) m the Lebesgue measure. The resulting matrix is non-negative and because Tw` : Di → X for ` = 1, . . . , Q, L X Pijw` = 1, ` = 1, . . . , Q, j=1 VI. D ISCRETIZATION OF THE P-F OPERATOR In this section, we will discuss the set-oriented numerical methods proposed for the finite dimensional approximation of the P-F operator. For the finite dimensional approximation of the P-F operator, we will make the following assumption on the stochastic process. Assumption 19: We assume the random vector ξn takes finitely many vector values w1 , . . . , wQ with the following probabilities Prob{ξn = w` } = p` ∀n, ` = 1, . . . , Q. For the finite dimension approximation of the P-F operator, we consider the finite partition of the state space, X, as follows: X = {D1 , . . . , DL }, i.e., P is a Markov or a row-stochastic matrix. Computationally, several short-term trajectories are used to compute the individual entries Pijw` . The mapping Tw` is used to transport M “initial conditions” chosen to be uniformly distributed within a set Di . The entry Pijw` is then approximated by the fraction of initial conditions in box, Dj , after one iterate of the mapping. In the remainder of the paper, the notation of this section is used, whereby P represents the finite-dimensional Markov matrix corresponding to the infinite dimensional P-F operator P. The finite dimensional approximation of the P-F operator can be used to study the approximated dynamics of the stochastic dynamical system. In particular, the eigenvector with eigenvalue one of the matrix P , i.e., L X µi = 1, µP = µ, µi ≥ 0, i=1 where ∪j Dj = X. The infinite dimensional measure, µ, is approximated by ascribing a real number µj to each cell of the partition, X . In this way, the infinite dimensional measure, µ, is approximated by a finite dimensional vector, µ ∈ RL . The finite dimensional approximation of the P-F operator will arise as a Markov matrix of size L × L on the finite dimensional vector space. Using Assumption 19, the stochastic dynamical system, T (x, ξ) : X × W → X, is parameterized by finitely many values that the random variable takes. In particular, for each fixed value of a random variable, i.e., ξn = wk , we have T (x, wk ) for k = 1, . . . , Q. For notational convenience, we will also write the mapping for each fixed value of random variable as T (x, wk ) =: Twk (x). Hence, we have Twk : X → X for k = 1, . . . , Q. With the finite parameterizations in the noise space, the finite dimensional approximation of the P-F operator follows exactly along the lines of a deterministic setting. In particular, corresponding to a vector, µ = (µ1 , · · · , µL ) ∈ RL , define a measure on X as dµ(x) = L X i=1 µi κi (x) dm(x) , m(Di ) where m is the Lebesgue measure and κj denotes the indicator function with support on Dj . The approximation, denoted by captures the steady state dynamics of the system. VII. S TABILITY IN FINITE DIMENSION The finite dimensional approximation of the P-F operator presented in the previous section can be decomposed into the lower triangular form similar to the decomposition of the infinite dimensional P-F operator in Eq. (6). With no loss of generality, we assume the equilibrium point at the origin is contained inside the cell, D1 , and the partition is sufficiently fine so D1 ⊂ O, where O is the local neighborhood of the stable equilibrium point. We decompose X into two complimentary partition as follows, X0 = {D1 }, X1 = {D2 , ..., DL }, ∪L k=2 Dk . (24) with domains X0 = D1 and X1 = Since the local stable equilibrium point at the origin is contained in the cell, D1 , there exists a left eigenvector with eigenvalue one to the Markov matrix, P , of the form µ0 = (1, 0 . . . , 0), i.e., µ0 = µ0 P . The existence of the eigenvector can be used to decompose the Markov matrix, P , in the following upper triangular structure. Let M ∼ = RL , M0 ∼ = R, and M1 ∼ = RL−1 denote the finite dimensional measure space associated with the partition X , X0 , and X1 , respectively and as defined in 8 (24). Then, for the splitting M = M0 ⊕ M1 , the P matrix has the following lower triangular representation.   P0 0 P = , × P1 where P0 = 1 and maps P0 : M0 → M0 and P1 : M1 → M1 is the sub-Markov matrix with row sum less than or equal to one. We refer the readers to [36] for details on the decomposition in finite dimension. Our goal is to study stability with respect to initial condition starting from partition X1 using the sub-Markov matrix, P1 . In a discrete finite dimensional setting, stability is expressed in terms of the transient property of the stochastic matrix P1 . Definition 20 (Transient states): A sub-Markov matrix P1 has only transient states, if P1n → 0, element-wise, as n → ∞. Transience of P1 is shown to imply a weaker notion of stability referred to as coarse stochastic stability and defined as follows. where m is the Lebesgue measure. We need to show P1 < 1. Denote, Sk = {x ∈ DL : Twk (x) ∈ DL }, k = 1, . . . , Q. Clearly, Sk ⊂ DL and the existence of Lyapunov measure µ̄ satisfying Eq. (25) implies k µ̄(Sk ) = [Pw 1 µ̄](DL ) < µ̄(DL ), k = 1, . . . , Q. Now, Q X pk µ̄(Sk ) = k=1 Q X [P1 µ̄](B) < µ̄(B) (25) for all B ⊂ B(X1 ), and additionally, µ̄ ≡ m, the Lebesgue measure. Then, the finite-dimensional approximation, P1 , is transient. 2) Suppose P1 is transient, then the equilibrium point, x = 0, is coarse stable with respect to the initial conditions in X1 . Proof: Before stating the proof, we claim for any two sets, S1 and S, such that S1 ⊂ S, if µ ≈ m, then µ(S1 ) = µ(S) ⇐⇒ m(S1 ) = m(S). (26) S1c := S \S1 as the complement set. We have, µ(S1 ) = Denote µ(S) implies µ(S1c ) = 0 which, in turn, implies m(S1c ) = 0 and, thus, m(S1 ) = m(S). 1. We first present a proof for the simplest case where the partition, X1 , consists of precisely one cell, i.e., X1 = {DL }. In this case, P1 ∈ [0, 1] is a scalar given by P1 = Q X k=1 pk m(Tw−1 (DL ) ∩ DL ) k , m(DL ) (27) k pk [Pw 1 µ̄](DL )] < µ̄(DL ). k=1 Using (26), m(Sk ) 6= m(DL ) and since Sk ⊂ DL , we have m(Sk ) < m(DL ) for k = 1, . . . , Q. Hence, P1 = Definition 21 (Stochastic Coarse Stability): Consider the finite partition, X1 , of the complement set, X1 = X \ X0 . The equilibrium point, x = 0, is said to be stochastic coarse stable with respect to the initial condition in X1 , if for an attractor set, B ⊂ U ⊂ X1 there exists no subpartition S = {Ds1 , . . . , Dsl } in X1 with domain S = ∪lk=1 Dsk such that B ⊂ S ⊂ U and for all x ∈ S P rob{T (x, ξ) ∈ S} = 1 . For typical partitions, coarse stability means stability modulo attractor sets, B, with domain of attraction, U , smaller than the size of cells within the partition. In the infinitedimensional limit, where the cell size (measure) goes to zero, one obtains stability modulo attractor sets with measure 0 domain of attraction. Theorem 22: Let the equilibrium point, x = 0 ∈ X0 ⊂ X, with local domain of attraction contained inside X0 , P1 is the sub-Markov operator on M(E c ). P1 be its finite dimensional approximation obtained with respect to the partition X1 of the complement set X1 = X \X0 . For this, we have the following 1) Suppose a Lyapunov measure, µ̄, exists such that (28) Q X pk k=1 m(Sk ) <1 m(DL ) is transient. We prove the result for the general case, where X1 is a finite partition, by contradiction. Suppose P1 is not transient. Then, using the general result from the theory of finite Markov chains [53], there exists at least one non-negative invariant probability vector, ν, such that ν · P1 = ν. (29) Let, S = {x ∈ Di : νi > 0}, S` = {x ∈ S : Tw` (x) ∈ S}, for ` = 1, . . . , Q. It is claimed m(S` ) = m(S), ` = 1, . . . , Q. (30) We first assume the claim to be true and show the desired contradiction. Clearly, S` ⊂ S and if the claim were true, (26) shows µ̄(S` ) = µ̄(S), ` = 1, . . . , Q. (31) Next, because S ⊂ X1 , PQ P1 µ̄(S) = `=1 p` µ̄(Tw−1 (S) ∩ X1 ) ` PQ PQ −1 ≥ `=1 p` µ̄(Tw` (S) ∩ S) = `=1 p` µ̄(S` ). This, together with Eq. (31), gives P1 µ̄(S) ≥ µ̄(S) for a set S with positive Lebesgue measure. This contradicts Eq. (25) and proves the theorem. It remains to show the claim. Let {ik }lk=1 be the indices with νik > 0. Equation . (29) gives l X k=1 νik Q X p` [P1w` ]ik jr = νjr for r = 1, . . . , l. `=1 Taking a summation, l X k=1 νik Pl r=1 , on either side gives Q l X X r=1 `=1 p` [P1w` ]ik jr = 1. 9 Since individual entries are non-negative and ν is a probability vector, this implies Q l X X p` [P1w` ]ik jr = 1 k = 1, . . . , l. Using formula (23) for the individual matrix entries, this gives p` m(Tw−1 (Djr ) ∩ Dik ) = m(Dik ), ` r=1 `=1 Q X p` `=1 l X m(Tw−1 (Djr ) ∩ Dik ) = m(Dik ). ` r=1 Since Djr are disjoint for any fixed w` , ∪r {x : Tw` (x) ∈ Djr } = {x : Tw` (x) ∈ ∪r Djr }, i.e., ∪Tw−1 (Djr ) = Tw−1 (∪Djr ). Furthermore, since Tw` is ` ` (Djr1 ) ∩ Dik ) ∩ (Tw−1 one-to-one, we have (Tw−1 (Djr2 ) ∩ ` ` Dik ) = ∅ as {x ∈ Dik : Tw` (x) ∈ Djr1 }∩{x ∈ Dik : Tw` (x) ∈ Djr2 } = ∅ PQ −1 ` for r1 6= r2 . Hence, `=1 p` m(Tw` (∪r=1 Djr ) ∩ Dik ) = m(Dik ). Therefore, Q X Q X p` `=1 r=1 `=1 Q l X X whenever Dj ∈ / S. Since, Tw` : S → S, µ̄ = m · (I − P1 )−1 = m + m · P12 + m · P12 + . . . , for row vector m > 0 (element wise). For example m could be taken as row vector of all ones corresponding to the finite dimensional approximation of Lebesgue measure. 2) Compute the Lyapunov measure as a solution of the linear program µ̄(αI − P1 ) > 0, α < 1. `=1 VIII. E XAMPLES AND S IMULATION However, by construction, S = ∪lr=1 Djr and, thus, p` m(Tw−1 (S) ` Example 23: We consider an inverted pendulum example with a stochastic damping parameter, ξ. ∩ Dik ) = m(Dik ). `=1 Taking a summation on both sides Q X p` m(S` ) = m(S) = `=1 Pl Q X k=1 , we obtain p` m(S). (32) `=1 Since S` ⊂ S, we have m(S` ) ≤ m(S). From (32), we obtain Q X p` (m(S` ) − m(S)) = 0. `=1 Since p` > 0 and m(S` ) ≤ m(S), we conclude m(S` ) = m(S). 2. Suppose P1 is transient. To show the equilibrium point is coarse stable, we proceed by contradiction. Using definition 21, if the equilibrium point is not coarse stable, then there exists an attractor set B ⊂ U ⊂ X1 with a sub-partition S = {Ds1 , ..., Dsl }, S = ∪lk=1 Dsk such that B ⊂ S ⊂ U and P rob{T (x, ξ) ∈ S} = 1 for all x ∈ S. P rob{T (x, ξ) ∈ S} = 1 = Q X pk χS (Tw` (x)) `=1 for x ∈ S. This implies S is left invariant by each Tw` for ` = 1, . . . , Q. Hence, Pswk`j = m(Tw−1 (Dj ) ∩ Dsk ) ` = 0, m(Dsk ) i = 1, ..., l, j=1 i.e., P1 is a Markov matrix with respect to the finite partition, S. From the general theory of the Markov matrix [53], there exists an invariant probability vector, ν, such that ν · P1n = ν for all n > 0 and P1 is not transient. There are various different equivalent ways of computing the finite dimensional approximation of Lyapunov measure using the finite dimensional approximation of the P-F operator. In particular, if P1 is transient, then the Lyapunov measure µ̄ can be computed using the following formulas. 1) Compute the Lyapunov measure using an infinite series formula, p` m(Tw−1 (∪`r=1 Djr ) ∩ Dik ) = m(Dik ). ` Q X l X [P1w` ]si sj = 1 x˙1 = x2 . x˙2 = − sin x1 − (ξ + 0.7)x2 . (33) For the purpose of simulation, the continuous system is discretized with the time step of discretization, ∆t = 0.1. The phase space, X, for simulation is taken to be equal to X = [−π, π] × [−π, π]. For the purpose of compacting the state space, we identify −π and π along the x and y axis. The damping parameter,, ξ is assumed stochastic with zero mean and uniform distribution; hence, of the form [−α, α]. In the following, we present simulation results by changing the variance, i.e., α, of the random variable, ξ, while keeping the mean zero and verifying the stochastic stability of the origin. In Figs. 1 and 2, we show the plot for the Lyapunov measure with random variable, ξ, supported on interval [−0.5, 0.5] and [−0.75, 0.75], respectively. The existence of Lyapunov measure implies the origin is almost everywhere almost sure stable. When support of the random parameter, ξ, is increased to [−1, 1], the system fails to have Lyapunov measure and is confirmed from the invariant measure plot shown in Fig. 3. From Fig. 3, we notice the invariant measure has support around the origin. This is in contrast to the invariant measure plots when ξ is supported on [−0.5, 0.5] and [−0.75, 0.75] and shown in Figs. 1 and 2. The invariant measure in these cases is supported at the origin and is denoted by a blue dot at the origin in Figs. 1 and 2. 10 Fig. 1. Lyapunov measure plot with support of ξ ∈ [−0.5, 0.5]. Fig. 2. Lyapunov measure plot with support of ξ ∈ [−0.75, 0.75]. distributed between [−α, α]. The deterministic √ system has four equilibrium points (0, 0), (2, 0) and (3, ± 3) of which the origin is stable equilibrium and the remaining are unstable. For the stochastic system, two of the equilibrium points - one at the origin and equilibrium point at (2, 0) are preserved. For the purpose of simulation, the system is discretized in time with the time step for discretization chosen to be equal to ∆t = 0.1. The state space X is taken to be X = [−4, 4] × [−4, 4]. For the purpose of compactness, −4 and 4 are identified along the x−axis. For better visualization, we plot the logarithm of the Lyapunov measure plot for varying variance of the random variable, ξ, by changing α, while retaining its zero mean. In Figs. 4 and 5, we show the log plot for the Lyapunov measure with ξ supported between [−0.25, 0.25] and [−0.5, 0.5], respectively. The existence of a Lyapunov measure in these plots implies the origin is almost everywhere almost sure stable for these statistics of random variable. When the support of the random variable is changed to [−0.1, 0.1], the origin is no longer almost everywhere almost sure stable. In Fig. 6, we show the plot for the invariant measure supported in the neighborhood of the origin. This is in contrast to the invariant measure plot for the cases when ξ ∈ [0.25, 0.25] and ξ ∈ [0.5, 0.5]. For both cases, the invariant measure is supported only at the single cell containing the origin. Fig. 4. Log plot of Lyapunov measure with noise support ξ ∈ [−0.25, 0.25]. Fig. 3. Invariant measure plot with support of ξ ∈ [−1, 1]. Example 24: The second example is the stochastic counterpart of the deterministic almost everywhere stable system example from [33]. ẋ = −2x + x2 − y 2 , ẏ = −6y(1 + ξ) + 2xy, (34) where ξ is a random variable with zero mean and uniformly IX. C ONCLUSIONS Weaker set-theoretic notion of almost everywhere stability for stochastic dynamical system is introduced. Linear P-F operator-based Lyapunov measure as a new tool for stochastic stability verification is introduced. Duality between the Lyapunov function and the Lyapunov measure is established in a stochastic setting. Set-oriented numerical methods are proposed for the finite dimensional approximation of the Lyapunov measure. The finite dimensional approximation introduce further weaker notion of stability refereed to as coarse stochastic stability. The framework developed in this paper can be easily extended to the case where the noise, ξn , forms a Markov processes. This can be done by employing the PF operator defined for systems with Markov noise processes [47]. 11 Fig. 5. Log plot of Lyapunov measure with noise support ξ ∈ [−0.5, 0.5]. Fig. 6. Invariant measure plot for ξ ∈ [−1, 1]. X. ACKNOWLEDGMENTS The author would like to acknowledge Venketash Chinde from Iowa State University for help with simulations. R EFERENCES [1] R. Z. Has’minskiĭ, Stochastic Stability of differential equations. Germantown ,MD: Sijthoff & Noordhoff, 1980. [2] L. Arnold, Random Dynamical Systems. Berlin, Heidenberg: Springer Verlag, 1998. [3] H. J. Kushner, Stocahstic Stability and Control. New York: Academic Press, 1967. [4] X. Mao, Exponential Stability of Stochastic Differential Equations. Monographs and Textbooks in Pure and Applied Mathematics Series, Marcel Dekker, Inc., 1994. [5] O. Imer, S. Yuksel, and T. Basar, “Optimal control of LTI systems over communication networks,” Automatica, vol. 42, no. 9, pp. 1429–1440, 2006. [6] L. Schenato and B. Sinopoli and M. Franceschitti and K. Poolla and S. Sastry, “Foundations of control and estimation over Lossy networks,” Proceedings of IEEE, vol. 95, no. 1, pp. 163–187, 2007. [7] N.Elia, “Remote stabilization over fading channels,” Systems and Control Letters, vol. 54, pp. 237–249, 2005. [8] A. Diwadkar and U. Vaidya, “Limitation on nonlinear observation over erasure channel,” IEEE Transactions on Automatic Control, vol. 58, no. 2, pp. 454–459, 2013. [9] A. Diwadkar and U. Vaidya, “Stabilization of linear time varying systems over uncertain channels,” International Journal of Robust and Nonlinear Control, vol. 24, no. 7, pp. 1205–1220, 2014. [10] A. Diwadkar, S. Dasgupta, and U. Vaidya, “Control of systems in Lure form over erasure channels,” Accepted for publication in International Journal of Robust and Nonlinear Control, 2014. [Online]. Available: http://dx.doi.org/10.1002/rnc.3231 [11] S. Pushpak, A. Diwadkar, and U. Vaidya, “Stochastic stability analysis and controller systhesis for continuous time linear systems,” in Proceedings of IEEE Control and Decision Conference, Osaka, Japan, 2015. [12] H. Deng, M. Kristić, and R. J. Williams, “Stabilization of stochastic nonlinear systems driven by noise of unknown covariance,” IEEE Transactions of Automatic Control, vol. 46, pp. 1237–1253, 2001. [13] H. Deng and M. Kristić, “Output-feedback stabilization of stochastic nonlinear systems driven by noise of unknown covariance,” Systems and Control Letters, vol. 39, pp. 173–182, 2000. [14] U. Vaidya and N. Elia, “Limitation on nonlinear stabilization over packet-drop channels: Scalar case,” Systems and Control Letters, vol. 61, no. 9, pp. 959–966, 2012. [15] P. Florchinger, “Lyapunov like techniques for stochastic stability,” SIAM J. Control Optim., vol. 33, pp. 1151–1169, 1995. [16] ——, “A universal formula for the stabilization of control stochastic differential equation,” Stochastic Annal. Appl., vol. 11, pp. 155–162, 1993. [17] ——, “Feedback stabilization of affine in the control stochastic differential systems by the control lyapunov function method,” SIAM J. Control Optim., vol. 35, p. 500511, 1997. [18] H. Deng and M. Kristić, “Stocahstic nonlinear stabilization- part i: backstepping design,” Systems and control letters, vol. 32, pp. 143–150, 1997. [19] ——, “Stocahstic nonlinear stabilization- part II: Inverse optimality,” Systems and control letters, vol. 32, pp. 151–159, 1997. [20] ——, “Output-feedback stochastic nonlinear stabilization,” IEEE Trans. Automat. Contr, vol. 44, p. 328333, 1999. [21] D. Henrion and A. Garulli, Eds., Positive polynomials in control, ser. Lecture Notes in Control and Information Sciences. Berlin: SpringerVerlag, 2005, vol. 312. [22] S. Prajna, P. A. Parrilo, and A. Rantzer, “Nonlinear control synthesis by convex optimization,” IEEE Transactions on Automatic Control, vol. 49, no. 2, pp. 1–5, 2004. [23] P. A. Parrilo, “Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization,” Ph.D. dissertation, California Institute of Technology, Pasadena, CA, 2000. [24] O. Junge and H. Osinga, “A set oriented approach to global optimal control,” ESAIM: Control, Optimisation and Calculus of Variations, vol. 10, no. 2, pp. 259–270, 2004. [25] L. Grune and O. Junge, “A set oriented approach to optimal feedback stabilization,” Systems Control Lett., vol. 54, no. 2, pp. 169–180, 2005. [26] L. G. Crespo and J. Q. Sun, “Solution of fixed final state optimal control problem via simple cell mapping,” Nonlinear dynamics, vol. 23, pp. 391–403, 2000. [27] D. Hernández-Hernández, O. Hernández-Lerma, and M. Taksar, “The linear programming approach to deterministic optimal control problem,” Applicationes Mathematicae, vol. 24, no. 1, pp. 17–33, 1996. [28] S. P. Meyn, “Algorithms for optimization and stabilization of controlled Markov chains,” Sādhanā, vol. 24, no. 4-5, pp. 339–367, 1999. [29] J. Lasserre, C. Prieur, and D. Henrion, “Nonlinear optimal control: Numerical approximation via moment and LMI-relaxations,” in Proceeding of IEEE Conference on Decision and Control, Seville, Spain, 2005. [30] W. McEneaney, Max-plus methods for nonlinear control and estimation. Boston: Birkhauser, 2006. [31] L. Grune, “Error estimation and adaptive discretization for the discrete stochastic Hamilton-Jacobi-Bellman equation,” Numerische Mathematik, vol. 99, pp. 85–112, 2004. [32] L. G. Crespo and J. Q. Sun, “Stochastic optimal control via bellman principle,” Automatica, vol. 39, pp. 2109–2114, 2003. [33] A. Rantzer, “A dual to Lyapunov’s stability theorem,” Systems & Control Letters, vol. 42, pp. 161–168, 2001. [34] R. Van Handel, “Almost global stochastic stability,” SIAM Journal on Control and Optimization, vol. 45, pp. 1297–1313, 2006. [35] D. Angeli, “An almost global notion of input-to-state stability,” IEEE Transactions on Automatic Control, vol. 49, pp. 866–874, 2004. [36] U. Vaidya and P. G. Mehta, “Lyapunov measure for almost everywhere stability,” IEEE Transactions on Automatic Control, vol. 53, no. 1, pp. 307–323, 2008. [37] U. Vaidya, P. Mehta, and U. Shanbhag, “Nonlinear stabilization via control lyapunov meausre,” IEEE Transactions on Automatic Control, vol. 55, no. 6, pp. 1314–1328, 2010. 12 [38] A. Raghunathan and U. Vaidya, “Optimal stabilization using Lyapunov measures,” IEEE Transactions on Automatic Control, vol. 59, no. 5, pp. 1316–1321, 2014. [39] A. Mauroy and I. Mezic, “A spectral operator-theoretic framework for global stability,” in Proc. of IEEE Conference of Decision and Control, Florence, Italy, 2013. [40] A. Lasota and M. C. Mackey, Chaos, Fractals, and Noise: Stochastic Aspects of Dynamics. New York: Springer-Verlag, 1994. [41] M. Dellnitz, O. Junge, W. S. Koon, F. Lekien, M. Lo, J. E. Marsden, K. Padberg, R. Preis, S. D. Ross, and B. Thiere, “Transport in dynamical astronomy and multibody problems,” International Journal of Bifurcation and Chaos, vol. 15, pp. 699–727, 2005. [42] G. Froyland and M. Dellnitz, “Detecting and locating near-optimal almost-invariant sets and cycles,” SIAM Journal on Scientific Computing, vol. 24, no. 6, pp. 1839–1863, 2003. [43] M. Budisic, R. Mohr, and I. Mezic, “Applied koopmanism,” Chaos, vol. 22, pp. 047 510–32, 2012. [44] I. Mezić and A. Banaszuk, “Comparison of systems with complex behavior,” Physica D, vol. 197, pp. 101–133, 2004. [45] I. Mezić and S. Wiggins, “A method for visualization of invariant sets of dynamical systems based on ergodic partition,” Chaos, vol. 9, no. 1, pp. 213–218, 1999. [46] G. Froyland, K. Padberg, M. England, and A. M. Treguier, “Detection of coherent oceanic structures using transfer operators,” Physical Review Letters, vol. 98, pp. 2 245 031–4, 2007. [47] G. Froyland, “Extracting dynamical behaviour via Markov models,” in Nonlinear Dynamics and Statistics: Proceedings, Newton Institute, Cambridge, 1998, A. Mees, Ed. Birkhauser, 2001, pp. 283–324. [48] U. Vaidya, “Stochastic stability analysis of discrete-time system using lyapunov measure,” in Proceedings of American Control Conference, Chicago, IL, 2015, pp. 4646–4651. [49] U. Vaidya and V. Chinde, “Computation of lyapunov measure for stochastic stability verification,” in Accepted for publication in IEEE Control and Decision Conference, Osaka, Japan, 2015. [50] S. P. Meyn and R. L. Tweedie, Markov Chains and Stochastic Stability. London: Springer-Verlag, 1993. [51] M. Dellnitz and O. Junge, “On the approximation of complicated dynamical behavior,” SIAM Journal on Numerical Analysis, vol. 36, pp. 491–515, 1999. [52] ——, Set oriented numerical methods for dynamical systems. World Scientific, 2000, pp. 221–264. [53] J. Norris, Markov Chains, ser. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge: Cambridge University Press, 1997.
3cs.SY
Journal of Machine Learning Research 17 (2016) 1-32 Submitted 10/15; Revised 4/16; Published 4/16 Stereo Matching by Training a Convolutional Neural Network to Compare Image Patches Jure Žbontar∗ [email protected] arXiv:1510.05970v2 [cs.CV] 18 May 2016 Faculty of Computer and Information Science University of Ljubljana Večna pot 113, SI-1001 Ljubljana, Slovenia Yann LeCun† [email protected] Courant Institute of Mathematical Sciences New York University 715 Broadway, New York, NY 10003, USA Editor: Zhuowen Tu Abstract We present a method for extracting depth information from a rectified image pair. Our approach focuses on the first stage of many stereo algorithms: the matching cost computation. We approach the problem by learning a similarity measure on small image patches using a convolutional neural network. Training is carried out in a supervised manner by constructing a binary classification data set with examples of similar and dissimilar pairs of patches. We examine two network architectures for this task: one tuned for speed, the other for accuracy. The output of the convolutional neural network is used to initialize the stereo matching cost. A series of post-processing steps follow: cross-based cost aggregation, semiglobal matching, a left-right consistency check, subpixel enhancement, a median filter, and a bilateral filter. We evaluate our method on the KITTI 2012, KITTI 2015, and Middlebury stereo data sets and show that it outperforms other approaches on all three data sets. Keywords: stereo, matching cost, similarity learning, supervised learning, convolutional neural networks 1. Introduction Consider the following problem: given two images taken by cameras at different horizontal positions, we wish to compute the disparity d for each pixel in the left image. Disparity refers to the difference in horizontal location of an object in the left and right image—an object at position (x, y) in the left image appears at position (x − d, y) in the right image. If we know the disparity of an object we can compute its depth z using the following relation: z= fB , d ∗. Jure Žbontar is also with the Courant Institute of Mathematical Sciences, New York University, 715 Broadway, New York, NY 10003, USA. †. Yann LeCun is also with Facebook AI Research, 770 Broadway, New York, NY 10003, USA. c 2016 Jure Žbontar and Yann LeCun. Žbontar and LeCun Left input image Output disparity map 90 m Right input image 20 m 1.7 m Figure 1: The input is a pair of images from the left and right camera. The two input images differ mostly in horizontal locations of objects (other differences are caused by reflections, occlusions, and perspective distortions). Note that objects closer to the camera have larger disparities than objects farther away. The output is a dense disparity map shown on the right, with warmer colors representing larger values of disparity (and smaller values of depth). where f is the focal length of the camera and B is the distance between the camera centers. Figure 1 depicts the input to and the output from our method. The described problem of stereo matching is important in many fields such as autonomous driving, robotics, intermediate view generation, and 3D scene reconstruction. According to the taxonomy of Scharstein and Szeliski (2002), a typical stereo algorithm consists of four steps: matching cost computation, cost aggregation, optimization, and disparity refinement. Following Hirschmüller and Scharstein (2009) we refer to the first two steps as computing the matching cost and the last two steps as the stereo method. The focus of this work is on computing a good matching cost. We propose training a convolutional neural network (LeCun et al., 1998) on pairs of small image patches where the true disparity is known (for example, obtained by LIDAR or structured light). The output of the network is used to initialize the matching cost. We proceed with a number of post-processing steps that are not novel, but are necessary to achieve good results. Matching costs are combined between neighboring pixels with similar image intensities using cross-based cost aggregation. Smoothness constraints are enforced by semiglobal matching and a left-right consistency check is used to detect and eliminate errors in occluded regions. We perform subpixel enhancement and apply a median filter and a bilateral filter to obtain the final disparity map. The contributions of this paper are • a description of two architectures based on convolutional neural networks for computing the stereo matching cost; • a method, accompanied by its source code, with the lowest error rate on the KITTI 2012, KITTI 2015, and Middlebury stereo data sets; and • experiments analyzing the importance of data set size, the error rate compared with other methods, and the trade-off between accuracy and runtime for different settings of the hyperparameters. 2 Stereo by Training a Network to Compare Patches This paper extends our previous work (Žbontar and LeCun, 2015) by including a description of a new architecture, results on two new data sets, lower error rates, and more thorough experiments. 2. Related Work Before the introduction of large stereo data sets like KITTI and Middlebury, relatively few stereo algorithms used ground truth information to learn parameters of their models; in this section, we review the ones that did. For a general overview of stereo algorithms see Scharstein and Szeliski (2002). Kong and Tao (2004) used the sum of squared distances to compute an initial matching cost. They then trained a model to predict the probability distribution over three classes: the initial disparity is correct, the initial disparity is incorrect due to fattening of a foreground object, and the initial disparity is incorrect due to other reasons. The predicted probabilities were used to adjust the initial matching cost. Kong and Tao (2006) later extend their work by combining predictions obtained by computing normalized cross-correlation over different window sizes and centers. Peris et al. (2012) initialized the matching cost with AD-Census (Mei et al., 2011), and used multiclass linear discriminant analysis to learn a mapping from the computed matching cost to the final disparity. Ground-truth data was also used to learn parameters of probabilistic graphical models. Zhang and Seitz (2007) used an alternative optimization algorithm to estimate optimal values of Markov random field hyperparameters. Scharstein and Pal (2007) constructed a new data set of 30 stereo pairs and used it to learn parameters of a conditional random field. Li and Huttenlocher (2008) presented a conditional random field model with a nonparametric cost function and used a structured support vector machine to learn the model parameters. Recent work (Haeusler et al., 2013; Spyropoulos et al., 2014) focused on estimating the confidence of the computed matching cost. Haeusler et al. (2013) used a random forest classifier to combine several confidence measures. Similarly, Spyropoulos et al. (2014) trained a random forest classifier to predict the confidence of the matching cost and used the predictions as soft constraints in a Markov random field to decrease the error of the stereo method. A related problem to computing the matching cost is learning local image descriptors (Brown et al., 2011; Trzcinski et al., 2012; Simonyan et al., 2014; Revaud et al., 2015; Paulin et al., 2015; Han et al., 2015; Zagoruyko and Komodakis, 2015). The two problems share a common subtask: to measure the similarity between image patches. Brown et al. (2011) introduced a general framework for learning image descriptors and used Powell’s method to select good hyperparameters. Several methods have been suggested for solving the problem of learning local image descriptors, such as boosting (Trzcinski et al., 2012), convex optimization (Simonyan et al., 2014), hierarchical moving-quadrant similarity (Revaud et al., 2015), convolutional kernel networks (Paulin et al., 2015), and convolutional neural networks (Zagoruyko and Komodakis, 2015; Han et al., 2015). Works of Zagoruyko and Komodakis (2015) and Han et al. (2015), in particular, are very similar to our own, differing mostly in the architecture of the network; concretely, the inclusion of pooling and subsampling to account for larger patch sizes and larger variation in viewpoint. 3 Žbontar and LeCun 3. Matching Cost A typical stereo algorithm begins by computing a matching cost at each position p for all disparities d under consideration. A simple method for computing the matching cost is the sum of absolute differences: X CSAD (p, d) = |I L (q) − I R (q − d)|, (1) q∈Np where I L (p) and I R (p) are image intensities at position p in the left and right image and Np is the set of locations within a fixed rectangular window centered at p. We use bold lowercase letters p and q to denote image locations. A bold lowercase d denotes the disparity d cast to a vector, that is, d = (d, 0). We use typewriter font for the names of hyperparameters. For example, we would use patch size to denote the size of the neighbourhood area Np . Equation (1) can be interpreted as measuring the cost associated with matching a patch from the left image, centered at position p, with a patch from the right image, centered at position p − d. We want the cost to be low when the two patches are centered around the image of the same 3D point, and high when they are not. Since examples of good and bad matches can be constructed from publicly available data sets (for example, the KITTI and Middlebury stereo data sets), we can attempt to solve the matching problem by a supervised learning approach. Inspired by the successful application of convolutional neural networks to vision problems, we used them to assess how well two small image patches match. 3.1 Constructing the Data Set We use ground truth disparity maps from either the KITTI or Middlebury stereo data sets to construct a binary classification data set. At each image position where the true disparity is known we extract one negative and one positive training example. This ensures that the data set contains an equal number of positive and negative examples. A positive example is a pair of patches, one from the left and one from the right image, whose center pixels are the images of the same 3D point, while a negative example is a pair of patches where this is not the case. The following section describes the data set construction step in detail. L (p), P R (q) > denote a pair of patches, where P L (p) is an n × n patch Let < Pn×n n×n n×n R (q) is an n × n patch from the from the left image centered at position p = (x, y), Pn×n right image centered at position q, and d denotes the correct disparity at position p. A negative example is obtained by setting the center of the right patch to q = (x − d + oneg , y), where oneg is chosen from either the interval [dataset neg low, dataset neg high] or, its origin reflected counterpart, [−dataset neg high, −dataset neg low]. The random offset oneg ensures that the resulting image patches are not centered around the same 3D point. A positive example is derived by setting q = (x − d + opos , y), 4 Stereo by Training a Network to Compare Patches Similarity score Dot product Normalize Normalize Convolution Convolution Convolution, ReLU Convolution, ReLU Convolution, ReLU Convolution, ReLU Left input patch Right input patch Figure 2: The fast architecture is a siamese network. The two sub-networks consist of a number of convolutional layers followed by rectified linear units (abbreviated “ReLU”). The similarity score is obtained by extracting a vector from each of the two input patches and computing the cosine similarity between them. In this diagram, as well as in our implementation, the cosine similarity computation is split in two steps: normalization and dot product. This reduces the running time because the normalization needs to be performed only once per position (see Section 3.3). where opos is chosen randomly from the interval [−dataset pos, dataset pos]. The reason for including opos , instead of setting it to zero, has to do with the stereo method used later on. In particular, we found that cross-based cost aggregation performs better when the network assigns low matching costs to good matches as well as near matches. In our experiments, the hyperparameter dataset pos was never larger than one pixel. 3.2 Network Architectures We describe two network architectures for learning a similarity measure on image patches. The first architecture is faster than the second, but produces disparity maps that are slightly less accurate. In both cases, the input to the network is a pair of small image patches and the output is a measure of similarity between them. Both architectures contain a trainable feature extractor that represents each image patch with a feature vector. The similarity between patches is measured on the feature vectors instead of the raw image intensity values. The fast architecture uses a fixed similarity measure to compare the two feature vectors, while the accurate architecture attempts to learn a good similarity measure on feature vectors. 3.2.1 Fast Architecture The first architecture is a siamese network, that is, two shared-weight sub-networks joined at the head (Bromley et al., 1993). The sub-networks are composed of a number of convolutional layers with rectified linear units following all but the last layer. Both sub-networks output a vector capturing the properties of the input patch. The resulting two vectors are 5 Žbontar and LeCun Similarity score Fully-connected, Sigmoid Fully-connected, ReLU Fully-connected, ReLU Fully-connected, ReLU Concatenate Convolution, ReLU Convolution, ReLU Convolution, ReLU Convolution, ReLU Convolution, ReLU Convolution, ReLU Left input patch Righ input patch Figure 3: The accurate architecture begins with two convolutional feature extractors. The extracted feature vectors are concatenated and compared by a number of fullyconnected layers. The inputs are two image patches and the output is a single real number between 0 and 1, which we interpret as a measure of similarity between the input images. compared using the cosine similarity measure to produce the final output of the network. Figure 2 provides an overview of the architecture. The network is trained by minimizing a hinge loss. The loss is computed by considering pairs of examples centered around the same image position where one example belongs to the positive and one to the negative class. Let s+ be the output of the network for the positive example, s− be the output of the network for the negative example, and let m, the margin, be a positive real number. The hinge loss for that pair of examples is defined as max(0, m + s− − s+ ). The loss is zero when the similarity of the positive example is greater than the similarity of the negative example by at least the margin m. We set the margin to 0.2 in our experiments. The hyperparameters of this architecture are the number of convolutional layers in each sub-network (num conv layers), the size of the convolution kernels (conv kernel size), the number of feature maps in each layer (num conv feature maps), and the size of the input patch (input patch size). 3.2.2 Accurate Architecture The second architecture is derived from the first by replacing the cosine similarity measure with a number of fully-connected layers (see Figure 3). This architectural change increased the running time, but decreased the error rate. The two sub-networks comprise a number of convolutional layers, with a rectified linear unit following each layer. The resulting two vectors are concatenated and forward-propagated through a number of fully-connected 6 Stereo by Training a Network to Compare Patches layers followed by rectified linear units. The last fully-connected layer produces a single number which, after being transformed with the sigmoid nonlinearity, is interpreted as the similarity score between the input patches. We use the binary cross-entropy loss for training. Let s denote the output of the network for one training example and t denote the class of that training example; t = 1 if the example belongs to the positive class and t = 0 if the example belongs to the negative class. The binary cross-entropy loss for that example is defined as t log(s) + (1 − t) log(1 − s). The decision to use two different loss functions, one for each architecture, was based on empirical evidence. While we would have preferred to use the same loss function for both architectures, experiments showed that the binary cross-entropy loss performed better than the hinge loss on the accurate architecture. On the other hand, since the last step of the fast architecture is the cosine similarity computation, a cross-entropy loss was not directly applicable. The hyperparameters of the accurate architecture are the number of convolutional layers in each sub-network (num conv layers), the number of feature maps in each layer (num conv feature maps), the size of the convolution kernels (conv kernel size), the size of the input patch (input patch size), the number of units in each fully-connected layer (num fc units), and the number of fully-connected layers (num fc layers). 3.3 Computing the Matching Cost The output of the network is used to initialize the matching cost: CCNN (p, d) = −s(< P L (p), P R (p − d) >), where s(< P L (p), P R (p − d) >) is the output of the network when run on input patches P L (p) and P R (p − d). The minus sign converts the similarity score to a matching cost. To compute the entire matching cost tensor CCNN (p, d) we would, naively, have to perform the forward pass for each image location and each disparity under consideration. The following three implementation details kept the running time manageable: • The outputs of the two sub-networks need to be computed only once per location, and do not need to be recomputed for every disparity under consideration. • The output of the two sub-networks can be computed for all pixels in a single forward pass by propagating full-resolution images, instead of small image patches. Performing a single forward pass on the entire w × h image is faster than performing w · h forward passes on small patches because many intermediate results can be reused. • The output of the fully-connected layers in the accurate architecture can also be computed in a single forward pass. This is done by replacing each fully-connected layer with a convolutional layer with 1 × 1 kernels. We still need to perform the forward pass for each disparity under consideration; the maximum disparity d is 228 for the KITTI data set and 400 for the Middlebury data set. As a result, the fullyconnected part of the network needs to be run d times, and is a bottleneck of the accurate architecture. 7 Žbontar and LeCun To compute the matching cost of a pair of images, we run the sub-networks once on each image and run the fully-connected layers d times, where d is the maximum disparity under consideration. This insight was important in designing the architecture of the network. We could have chosen an architecture where the two images are concatenated before being presented to the network, but that would imply a large cost at runtime because the whole network would need to be run d times. This insight also led to the development of the fast architecture, where the only layer that is run d times is the dot product of the feature vectors. 4. Stereo Method The raw outputs of the convolutional neural network are not enough to produce accurate disparity maps, with errors particularly apparent in low-texture regions and occluded areas. The quality of the disparity maps can be improved by applying a series of post-processing steps referred to as the stereo method. The stereo method we used was influenced by Mei et al. (2011) and comprises cross-based cost aggregation, semiglobal matching, a left-right consistency check, subpixel enhancement, a median, and a bilateral filter. 4.1 Cross-based Cost Aggregation Information from neighboring pixels can be combined by averaging the matching cost over a fixed window. This approach fails near depth discontinuities, where the assumption of constant depth within a window is violated. We might prefer a method that adaptively selects the neighborhood for each pixel, so that support is collected only from pixels of the same physical object. In cross-based cost aggregation (Zhang et al., 2009) we build a local neighborhood around each location comprising pixels with similar image intensity values with the hope that these pixels belong to the same object. The method begins by constructing an upright cross at each position; this cross is used to define the local support region. The left arm pl at position p extends left as long as the following two conditions hold: • |I(p) − I(pl )| < cbca intensity; the image intensities at positions p and pl should be similar, their difference should be less than cbca intensity. • kp − pl k < cbca distance; the horizontal distance (or vertical distance in case of top and bottom arms) between positions p and pl is less than cbca distance pixels. The right, bottom, and top arms are constructed analogously. Once the four arms are known, we can compute the support region U (p) as the union of horizontal arms of all positions q laying on p’s vertical arm (see Figure 4). Zhang et al. (2009) suggest that aggregation should consider the support regions of both images in a stereo pair. Let U L and U R denote the support regions in the left and right image. We define the combined support region Ud as Ud (p) = {q|q ∈ U L (p), q − d ∈ U R (p − d)}. 8 Stereo by Training a Network to Compare Patches top arm q left arm pl horizontal arms of q p right arm bottom arm Figure 4: The support region for position p is the union of horizontal arms of all positions q on p’s vertical arm. The matching cost is averaged over the combined support region: 0 CCBCA (p, d) = CCNN (p, d), X 1 i−1 i (q, d), CCBCA (p, d) = CCBCA |Ud (p)| q∈Ud (p) where i is the iteration number. We repeat the averaging a number of times. Since the support regions are overlapping, the results can change at each iteration. We skip crossbased cost aggregation in the fast architecture because it is not crucial for achieving a low error rate and because it is relatively expensive to compute. 4.2 Semiglobal Matching We refine the matching cost by enforcing smoothness constraints on the disparity image. Following Hirschmüller (2008), we define an energy function E(D) that depends on the disparity image D: E(D) = X X 4 CCBCA (p, D(p)) + P1 · 1{|D(p) − D(q)| = 1} p q∈Np + X  P2 · 1{|D(p) − D(q)| > 1} , q∈Np where 1{·} denotes the indicator function. The first term penalizes disparities with high matching costs. The second term adds a penalty P1 when the disparity of neighboring pixels differ by one. The third term adds a larger penalty P2 when the neighboring disparities differ by more than one. Rather than minimizing E(D) in all directions simultaneously, we could perform the minimization in a single direction with dynamic programming. This solution would introduce unwanted streaking effects, since there would be no incentive to make the disparity image smooth in the directions we are not optimizing over. In semiglobal matching we 9 Žbontar and LeCun minimize the energy in a single direction, repeat for several directions, and average to obtain the final result. Although Hirschmüller (2008) suggested choosing sixteen direction, we only optimized along the two horizontal and the two vertical directions; adding the diagonal directions did not improve the accuracy of our system. To minimize E(D) in direction r, we define a matching cost Cr (p, d) with the following recurrence relation: Cr (p, d) = 4 CCBCA (p, d)  − min Cr (p − r, k) + min Cr (p − r, d), Cr (p − r, d − 1) + P1 , k  Cr (p − r, d + 1) + P1 , min Cr (p − r, k) + P2 . k The second term is subtracted to prevent values of Cr (p, d) from growing too large and does not affect the optimal disparity map. The penalty parameters P1 and P2 are set according to the image gradient so that jumps in disparity coincide with edges in the image. Let D1 = |I L (p) − I L (p − r)| and D2 = |I R (p−d)−I R (p−d−r)| be the difference in image intensity between two neighboring positions in the direction we are optimizing over. We set P1 and P2 according to the following rules: P1 = sgm P1, P2 = sgm P2 if D1 < sgm D, D2 < sgm D; P1 = sgm P1/sgm Q2, P2 = sgm P2/sgm Q2 if D1 ≥ sgm D, D2 ≥ sgm D; P1 = sgm P1/sgm Q1, P2 = sgm P2/sgm Q1 otherwise. The hyperparameters sgm P1 and sgm P2 set a base penalty for discontinuities in the disparity map. The base penalty is reduced by a factor of sgm Q1 if one of D1 or D2 indicate a strong image gradient or by a larger factor of sgm Q2 if both D1 and D2 indicate a strong image gradient. The value of P1 is further reduced by a factor of sgm V when considering the two vertical directions; in the ground truth, small changes in disparity are much more frequent in the vertical directions than in the horizontal directions and should be penalised less. The final cost CSGM (p, d) is computed by taking the average across all four directions: CSGM (p, d) = 1X Cr (p, d). 4 r After semiglobal matching we repeat cross-based cost aggregation, as described in the previous section. Hyperparameters cbca num iterations 1 and cbca num iterations 2 determine the number of cross-based cost aggregation iterations before and after semiglobal matching. 4.3 Computing the Disparity Image The disparity image D(p) is computed by the winner-takes-all strategy, that is, by finding the disparity d that minimizes C(p, d), D(p) = argmin C(p, d). d 10 Stereo by Training a Network to Compare Patches 4.3.1 Interpolation The interpolation steps attempt to resolve conflicts between the disparity map predicted for the left image and the disparity map predicted for the right image. Let DL denote the disparity map obtained by treating the left image as the reference image—this was the case so far, that is, DL (p) = D(p)—and let DR denote the disparity map obtained by treating the right image as the reference image. DL and DR sometimes disagree on what the correct disparity at a particular position should be. We detect these conflicts by performing a left-right consistency check. We label each position p by applying the following rules in turn: correct if |d − DR (p − d)| ≤ 1 for d = DL (p), mismatch if |d − DR (p − d)| ≤ 1 for any other d, occlusion otherwise. For positions marked as occlusion, we want the new disparity value to come from the background. We interpolate by moving left until we find a position labeled correct and use its value. For positions marked as mismatch, we find the nearest correct pixels in 16 different directions and use the median of their disparities for interpolation. We refer to the interpolated disparity map as DINT . 4.3.2 Subpixel Enhancement Subpixel enhancement provides an easy way to increase the resolution of a stereo algorithm. We fit a quadratic curve through the neighboring costs to obtain a new disparity image: DSE (p) = d − C+ − C− , 2(C+ − 2C + C− ) where d = DINT (p), C− = CSGM (p, d − 1), C = CSGM (p, d), and C+ = CSGM (p, d + 1). 4.3.3 Refinement The final steps of the stereo method consist of a 5 × 5 median filter and the following bilateral filter: X 1 DBF (p) = DSE (q) · g(kp − qk) · 1{|I L (p) − I L (q)| < blur threshold}, W (p) q∈Np where g(x) is the probability density function of a zero mean normal distribution with standard deviation blur sigma and W (p) is the normalizing constant, X W (p) = g(kp − qk) · 1{|I L (p) − I L (q)| < blur threshold}. q∈Np The role of the bilateral filter is to smooth the disparity map without blurring the edges. DBF is the final output of our stereo method. 5. Experiments We used three stereo data sets in our experiments: KITTI 2012, KITTI 2015, and Middlebury. The test set error rates reported in Tables 1, 2, and 4 were obtained by submitting 11 Žbontar and LeCun Rank 1 2 3 4 5 6 7 8 9 10 Method MC-CNN-acrt Displets MC-CNN PRSM MC-CNN-fst SPS-StFl VC-SF Deep Embed JSOSM OSF CoR Setting Accurate architecture Güney and Geiger (2015) Žbontar and LeCun (2015) Vogel et al. (2015) Fast architecture Yamaguchi et al. (2014) Vogel et al. (2014) Chen et al. (2015) Unpublished work Menze and Geiger (2015) Chakrabarti et al. (2015) F, MV F, MS F, MV F Error 2.43 2.47 2.61 2.78 2.82 2.83 3.05 3.10 3.15 3.28 3.30 Runtime 67 265 100 300 0.8 35 300 3 105 3000 6 Table 1: The highest ranking methods on the KITTI 2012 data set as of October 2015. The “Setting” column provides insight into how the disparity map is computed: “F” indicates the use of optical flow, “MV” indicates more than two temporally adjacent images, and “MS” indicates the use of epipolar geometry for computing the optical flow. The “Error” column reports the percentage of misclassified pixels and the “Runtime” column measures the time, in seconds, required to process one pair of images. the generated disparity maps to the online evaluation servers. All other error rates were computed by splitting the data set in two, using one part for training and the other for validation. 5.1 KITTI Stereo Data Set The KITTI stereo data set (Geiger et al., 2013; Menze and Geiger, 2015) is a collection of rectified image pairs taken from two video cameras mounted on the roof of a car, roughly 54 centimeters apart. The images were recorded while driving in and around the city of Karlsruhe, in sunny and cloudy weather, at daytime. The images were taken at a resolution of 1240 × 376. A rotating laser scanner mounted behind the left camera recorded ground truth depth, labeling around 30 % of the image pixels. The ground truth disparities for the test set are withheld and an online leaderboard is provided where researchers can evaluate their method on the test set. Submissions are allowed once every three days. Error is measured as the percentage of pixels where the true disparity and the predicted disparity differ by more than three pixels. Translated into distance, this means that, for example, the error tolerance is 3 centimeters for objects 2 meters from the camera and 80 centimeters for objects 10 meters from the camera. 12 Stereo by Training a Network to Compare Patches Rank Method 1 2 3 4 5 6 7 8 9 10 MC-CNN-acrt MC-CNN-fst SPS-St OSF PR-Sceneflow SGM+C+NL SGM+LDOF SGM+SF ELAS OCV-SGBM SDM Setting Error Runtime Accurate architecture Fast architecture Yamaguchi et al. (2014) Menze and Geiger (2015) Vogel et al. (2013) Hirschmüller (2008); Sun et al. (2014) Hirschmüller (2008); Brox and Malik (2011) Hirschmüller (2008); Hornacek et al. (2014) Geiger et al. (2011) Hirschmüller (2008) Kostková and Sára (2003) F F F F F 3.89 4.62 5.31 5.79 6.24 6.84 6.84 6.84 9.72 10.86 11.96 67 0.8 2 3000 150 270 86 2700 0.3 1.1 60 Table 2: The leading submission on the KITTI 2015 leaderboard as of October 2015. The “Setting”, “Error”, and “Runtime” columns have the same meaning as in Table 1. Two KITTI stereo data sets exist: KITTI 20121 and, the newer, KITTI 20152 . For the task of computing stereo they are nearly identical, with the newer data set improving some aspects of the optical flow task. The 2012 data set contains 194 training and 195 testing images, while the 2015 data set contains 200 training and 200 testing images. There is a subtle but important difference introduced in the newer data set: vehicles in motion are densely labeled and car glass is included in the evaluation. This emphasizes the method’s performance on reflective surfaces. The best performing methods on the KITTI 2012 data set are listed in Table 1. Our accurate architecture ranks first with an error rate of 2.43 %. Third place on the leaderboard is held by our previous work (Žbontar and LeCun, 2015) with an error rate of 2.61 %. The two changes that reduced the error from 2.61 % to 2.43 % were augmenting the data set (see Section 5.4) and doubling the number of convolution layers while reducing the kernel size from 5 × 5 to 3 × 3. The method in second place (Güney and Geiger, 2015) uses the matching cost computed by our previous work (Žbontar and LeCun, 2015). The test error rate of the fast architecture is 2.82 %, which would be enough for fifth place had the method been allowed to appear in the public leaderboard. The running time for processing a single image pair is 67 seconds for the accurate architecture and 0.8 seconds for the fast architecture. Figure 5 contains a pair of examples from the KITTI 2012 data set, together with the predictions of our method. Table 2 presents the frontrunners on the KITTI 2015 data sets. The error rates of our methods are 3.89 % for the accurate architecture and 4.46 % for the fast architecture, occupying first and second place on the leaderboard. Since one submission per paper is 1. The KITTI 2012 scoreboard: benchmark=stereo 2. The KITTI 2015 scoreboard: benchmark=stereo http://www.cvlibs.net/datasets/kitti/eval_stereo_flow.php? http://www.cvlibs.net/datasets/kitti/eval_scene_flow.php? 13 Žbontar and LeCun Left input image Right input image Ground truth Census Error: 4.63 % Fast architecture Error: 1.01 % Accurate architecture Error: 0.91 % Left input image Right input image Ground truth Census Error: 14.12 % Fast architecture Error: 1.54 % Accurate architecture Error: 1.45 % Figure 5: Examples of predicted disparity maps on the KITTI 2012 data set. Note how some regions of the image (the white wall in the top example, and the asphalt in the bottom example) cause problems for the census transform. The fast and the accurate architecture perform better, with the accurate architecture making fewer mistakes on average. 14 Stereo by Training a Network to Compare Patches Year Number of Image Pairs Resolution Maximum Disparity 2001 2003 2005 2006 2014 8 2 6 21 23 380 × 430 1800 × 1500 1400 × 1100 1400 × 1100 3000 × 2000 30 220 230 230 800 Table 3: A summary of the five Middlebury stereo data sets. The column “Number of Image Pairs” counts only the image pairs for which ground truth is available. The 2005 and 2014 data sets additionally contain a number of image pairs with ground truth disparities withheld; these image pairs constitute the test set. allowed, only the result of the accurate architecture appears on the public leaderboard. See Figure 6 for the disparity maps produced by our method on the KITTI 2015 data set. 5.2 Middlebury Stereo Data Set The image pairs of the Middlebury stereo data set are indoor scenes taken under controlled lighting conditions. Structured light was used to measure the true disparities with higher density and precision than in the KITTI data set. The data sets were published in five separate works in the years 2001, 2003, 2005, 2006, and 2014 (Scharstein and Szeliski, 2002, 2003; Scharstein and Pal, 2007; Hirschmüller and Scharstein, 2007; Scharstein et al., 2014). In this paper, we refer to the Middlebury data set as the concatenation of all five data sets; a summary of each is presented in Table 3. Each scene in the 2005, 2006, and 2014 data sets was taken under a number of lighting conditions and shutter exposures, with a typical image pair taken under four lighting conditions and seven exposure settings for a total of 28 images of the same scene. An online leaderboard3 , similar to the one provided by KITTI, displays a ranked list of all submitted methods. Participants have only one opportunity to submit their results on the test set to the public leaderboard. This rule is stricter than the one on the KITTI data set, where submissions are allowed every three days. The test set contains 15 images borrowed from the 2005 and 2014 data sets. The data set is provided in full, half, and quarter resolution. The error is computed at full resolution; if the method outputs half or quarter resolution disparity maps, they are upsampled before the error is computed. We chose to run our method on half resolution images because of the limited size of the graphic card’s memory available. Rectifying a pair of images using standard calibration procedures, like the ones present in the OpenCV library, results in vertical disparity errors of up to nine pixels on the Middlebury data set (Scharstein et al., 2014). Each stereo pair in the 2014 data set is rectified twice: once using a standard, imperfect approach, and once using precise 2D correspondences for perfect rectification (Scharstein et al., 2014). We train the network on imperfectly rectified 3. The Middlebury scoreboard: http://vision.middlebury.edu/stereo/eval3/ 15 Žbontar and LeCun Left input image Right input image Ground truth Census Error: 4.58 % Fast architecture Error: 2.79 % Accurate architecture Error: 2.36 % Left input image Right input image Ground truth Census Error: 5.25 % Fast architecture Error: 3.91 % Accurate architecture Error: 3.73 % Figure 6: Examples of predictions on the KITTI 2015 data set. Observe that vehicles in motion are labeled densely in the KITTI 2015 data set. 16 Stereo by Training a Network to Compare Patches Rank 1 2 3 4 5 6 7 8 9 10 Method MC-CNN-acrt MeshStereo LCU TMAP IDR SGM LPS LPS SGM SNCC Accurate architecture Zhang et al. (2015) Unpublished work Psota et al. (2015) Kowalczuk et al. (2013) Hirschmüller (2008) Sinha et al. (2014) Sinha et al. (2014) Hirschmüller (2008) Einecke and Eggert (2010) Resolution Error Runtime Half Half Quarter Half Half Half Half Full Quarter Half 8.29 13.4 17.0 17.1 18.4 18.7 19.4 20.3 21.2 22.2 150 65.3 6567 2435 0.49 9.90 9.52 25.8 1.48 1.38 Table 4: The top ten methods on the Middlebury stereo data set as of October 2015. The “Error” column is the weighted average error after upsampling to full resolution and “Runtime” is the time, in seconds, required to process one pair of images. image pairs, since only two of the fifteen test images (Australia and Crusade) are rectified perfectly. The error is measured as the percentage of pixels where the true disparity and the predicted disparity differ by more than two pixels; this corresponds to an error tolerance of one pixel at half resolution. The error on the evaluation server is, by default, computed only on non-occluded pixels. The final error reported online is the weighted average over the fifteen test images, with weights set by the authors of the data set. Table 4 contains a snapshot of the third, and newest, version of the Middlebury leaderboard. Our method ranks first with an error rate of 8.29 % and a substantial lead over the second placed MeshStereo method, whose error rate is 13.4 %. See Figure 7 for disparity maps produced by our method on one image pair from the Middlebury data set. 5.3 Details of Learning We construct a binary classification data set from all available image pairs in the training set. The data set contains 25 million examples on the KITTI 2012, 17 million examples on the KITTI 2015, and 38 million examples on the Middlebury data set. At training time, the input to the network was a batch of 128 pairs of image patches. At test time, the input was the entire left and right image. We could have used entire images during training as well, as it would allow us to implement the speed optimizations described in Section 3.3. There were several reasons why we preferred to train on image patches: it was easier to control the batch size, the examples could be shuffled so that one batch contained patches from several different images, and it was easier to maintain the same number of positive and negative examples within a batch. We minimized the loss using mini-batch gradient descent with the momentum term set to 0.9. We trained for 14 epochs with the learning rate initially set to 0.003 for the accurate architecture and 0.002 for the fast architecture. The learning rate was decreased 17 Žbontar and LeCun Left input image Right input image Census Error: 34.65 % Fast architecture Error: 16.19 % Accurate architecture Error: 7.25 % Ground truth Figure 7: An example of a particularly difficult image pair from the Middlebury data set; the white wall in the background is practically textureless. The accurate architecture is able to classify most of it correctly. The fast architecture doesn’t do as well but still performs better than census. 18 Stereo by Training a Network to Compare Patches KITTI 2012 Hyperparameter input patch size num conv layers num conv feature maps conv kernel size num fc layers num fc units dataset neg low dataset neg high dataset pos cbca intensity cbca distance cbca num iterations 1 cbca num iterations 2 sgm P1 sgm P2 sgm Q1 sgm Q2 sgm V sgm D blur sigma blur threshold KITTI 2015 Middlebury fst acrt fst acrt fst acrt 9×9 4 64 3 9×9 4 112 3 4 384 4 10 1 0.13 5 2 0 1.32 32 3 6 2 0.08 6 6 9×9 4 64 3 9×9 4 112 3 4 384 4 10 1 0.03 5 2 4 2.3 55.8 3 6 1.75 0.08 6 5 11 × 11 5 64 3 11 × 11 5 112 3 3 384 1.5 18 0.5 0.02 14 2 16 1.3 18.1 4.5 9 2.75 0.13 1.7 2 4 10 1 4 223 3 7.5 1.5 0.02 7.74 5 4 10 1 2.3 42.3 3 6 1.25 0.08 4.64 5 1.5 6 0.5 2.3 55.9 4 8 1.5 0.08 6 2 Table 5: The hyperparameter values we used for the fast and accurate architectures (abbreviated “fst” and “acrt”). Note that hyperparameters concerning image intensity values (cbca intensity and sgm D) apply to the preprocessed images and not to raw images with intensity values in the range from 0 to 255. by a factor of 10 on the 11th epoch. The number of epochs, the initial learning rate, and the learning rate decrease schedule where treated as hyperparameters and were optimized with cross-validation. Each image was preprocessed by subtracting the mean and dividing by the standard deviation of its pixel intensity values. The left and right image of a stereo pair were preprocessed separately. Our initial experiments suggested that using color information does not improve the quality of the disparity maps; therefore, we converted all color images to grayscale. The post-processing steps of the stereo method were implemented in CUDA (Nickolls et al., 2008), the network training was done with the Torch environment (Collobert et al., 2011) using the convolution routines from the cuDNN library (Chetlur et al., 2014). The OpenCV library (Bradski, 2000) was used for the affine transformation in the data augmentation step. 19 Žbontar and LeCun The hyperparameters where optimized with manual search and simple scripts that helped automate the process. The hyperparameters we selected are shown in Table 5. 5.4 Data Set Augmentation Augmenting the data set by repeatedly transforming the training examples is a commonly employed technique to reduce the network’s generalization error. The transformations are applied at training time and do not affect the runtime performance. We randomly rotate, scale and shear the training patches; we also change their brightness and contrast. Since the transformations are applied to patches after they have been extracted from the images, the data augmentation step does not alter the ground truth disparity map or ruin the rectification. The parameters of the transformation are chosen randomly for each pair of patches, and after one epoch of training, when the same example is being presented to the network for the second time, new random parameters are selected. We choose slightly different transformation parameters for the left and right image; for example, we would rotate the left patch by 10 degrees and the right by 14. Different data sets benefited from different types of transformations and, in some cases, using the wrong transformations increased the error. On the Middlebury data set we took advantage of the fact that the images were taken under different lighting conditions and different shutter exposures by training on all available images. The same data set augmentation parameters were used for the KITTI 2012 and KITTI 2015 data sets. The Middlebury test data sets contains two images worth mentioning: Classroom, where the right image is underexposed and, therefore, darker than the left; and Djembe, where the left and right images were taken under different light conditions. To handle these two cases we train, 20 % of the time, on images where either the shutter exposure or the arrangements of lights are different for the left and right image. We combat imperfect rectification on the Middlebury data set by including a small vertical disparity between the left and right image patches. Before describing the steps of data augmentation, let us introduce some notation: in the following, a word in typewriter is used to denote the name of a hyperparameter defining a set, while the same word in italic is used to denote a number drawn randomly from that set. For example, rotate is a hyperparameter defining the set of possible rotations and rotate is a number drawn randomly from that set. The steps of data augmentation are presented in the following list: • Rotate the left patch by rotate degrees and the right patch by rotate + rotate diff degrees. • Scale the left patch by scale and the right patch by scale · scale diff. • Scale the left patch in the horizontal direction by horizontal scale and the right patch by horizontal scale · horizontal scale diff. • Shear the left patch in the horizontal direction by horizontal shear and the right patch by horizontal shear + horizontal shear diff. 20 Stereo by Training a Network to Compare Patches KITTI 2012 Middlebury Hyperparameter Range Error Range Error rotate scale horizontal scale horizontal shear brightness contrast vertical disparity rotate diff horizontal scale diff horizontal shear diff brightness diff contrast diff [−7, 7] 2.65 [0.9, 1] [0, 0.1] [0, 0.7] [1, 1.3] 2.62 2.61 2.61 2.63 [0, 0.3] 2.63 [−28, 28] [0.8, 1] [0.8, 1] [0, 0.1] [0, 1.3] [1, 1.1] [0, 1] [−3, 3] [0.9, 1] [0, 0.3] [0, 0.7] [1, 1.1] 7.99 8.17 8.08 7.91 8.16 7.95 8.05 8.00 7.97 8.05 7.92 8.01 No data set augmentation Full data set augmentation 2.73 2.61 8.75 7.91 Table 6: The hyperparameters governing data augmentation and how they affect the validation error. The “Error” column reports the validation error when a particular data augmentation step is not used. The last two rows report validation errors with and without data augmentation. For example, the validation error on the KITTI 2012 is 2.73 % if no data augmentation is used, 2.65 % if all steps except rotation are used, and 2.61 % if all data augmentation steps are used. • Translate the right patch in the vertical direction by vertical disparity. • Adjust the brightness and contrast by setting the left and right image patches to: P L ← P L · contrast + brightness and P R ← P R · (contrast · contrast diff) + (brightness + brightness diff), with addition and multiplication carried out element-wise where appropriate. Table 6 contains the hyperparameters used and measures how each data augmentation step affected the validation error. Data augmentation reduced the validation error from 2.73 % to 2.61 % on the KITTI 2012 data set and from 8.75 % to 7.91 % on the Middlebury data set. 5.5 Runtime We measure the runtime of our implementation on a computer with a NVIDIA Titan X graphics processor unit. Table 7 contains the runtime measurements across a range of hyperparameter settings for three data sets: KITTI, Middlebury half resolution, and a 21 Žbontar and LeCun new, fictitious data set, called Tiny, which we use to demonstrate the performance of our method on the kind of images typically used for autonomous driving or robotics. The sizes of images we measured the runtime on were: 1242 × 350 with 228 disparity levels for the KITTI data set, 1500 × 1000 with 200 disparity levels for the Middlebury data set, and 320 × 240 with 32 disparity levels for the Tiny data set. Table 7 reveals that the fast architecture is up to 90 times faster than the accurate architecture. Furthermore, the running times of the fast architecture are 0.78 seconds on KITTI, 2.03 seconds on Middlebury, and 0.06 seconds on the Tiny data set. We can also see that the fully-connected layers are responsible for most of the runtime in the accurate architecture, as the hyperparameters controlling the number of convolutional layer and the number of feature maps have only a small effect on the runtime. Training times depended on the size of the data set and the architecture, but never exceeded two days. 5.6 Matching Cost We argue that the low error rate of our method is due to the convolutional neural network and not a superior stereo method. We verify this claim by replacing the convolutional neural network with three standard approaches for computing the matching cost: • The sum of absolute differences computes the matching cost according to Equation (1), that is, the matching cost between two image patches is computed by summing the absolute differences in image intensities between corresponding locations. We used 9 × 9 patches. • The census transform (Zabih and Woodfill, 1994) represents each image position as a bit vector. The size of this vector is a hyperparameter whose value, after examining several, we set to 81. The vector is computed by cropping a 9×9 image patch centered around the position of interest and comparing the intensity values of each pixel in the patch to the intensity value of the pixel in the center. When the center pixel is brighter the corresponding bit is set. The matching cost is computed as the hamming distance between two census transformed vectors. • Normalized cross-correlation is a window-based method defined with the following equation: P L R q∈Np I (q)I (q − d) CN CC (p, d) = qP . P L 2 R 2 q∈Np I (q) q∈Np I (q − d) The normalized cross-correlation matching cost computes the cosine similarity between the left and right image patch, when the left and right image patches are viewed as vectors instead of matrices. This is the same function that is computed in the last two layers of the fast architecture (normalization and dot product). The neighbourhood Np was set to a square 11 × 11 window around p. The “sad”, “cens”, and “ncc” columns of Table 8 contain the results of the sum of absolute differences, the census transform, and normalized cross-correlation on the KITTI 2012, KITTI 2015, and Middlebury data sets. The validation errors in the last rows of Table 8 22 Stereo by Training a Network to Compare Patches KITTI Hyperparameter num conv layers num conv feature maps Middlebury Tiny fst acrt fst acrt fst acrt 1 2 3 4 5 6 0.23 0.26 0.30 0.34 0.38 0.42 66.1 66.2 66.3 66.4 66.5 66.7 0.70 0.82 0.97 1.11 1.24 1.37 74.9 75.2 75.4 75.6 75.7 76.0 0.01 0.01 0.02 0.03 0.03 0.04 1.7 1.8 1.8 1.8 1.9 1.9 16 32 48 64 80 96 112 128 0.09 0.15 0.25 0.34 0.44 0.53 0.61 0.71 59.4 60.4 61.5 62.7 64.0 65.3 66.4 67.7 0.27 0.51 0.94 1.24 1.63 1.93 2.28 2.61 64.8 66.2 68.2 70.0 72.0 73.9 75.7 77.8 0.01 0.01 0.02 0.03 0.04 0.04 0.05 0.06 1.6 1.6 1.7 1.7 1.8 1.8 1.8 1.9 num fc layers 1 2 3 4 5 16.3 32.9 49.6 66.4 82.9 25.3 50.7 75.7 101.2 126.4 0.5 0.9 1.4 1.8 2.3 num fc units 128 256 384 512 17.4 38.5 66.4 101.0 21.4 44.9 75.7 113.3 0.6 1.1 1.8 2.7 No stereo method Full stereo method 0.34 0.78 66.4 67.1 1.24 2.03 75.7 84.8 0.03 0.06 1.8 1.9 Table 7: The time, in seconds, required to compute the matching cost, that is, the time spent in the convolutional neural network without any post-processing steps. The time does include computing the matching cost twice: once when the left image is taken to be the reference image and once when the right image is taken to be the reference image. We measure the runtime as a function of four hyperparameters controlling the network architecture; for example, the first six rows contain the runtime as the number of convolutional layers in the network increases from one to six. The last row of the table contains the running time for the entire method, including the post-processing steps. As before, we abbreviate the fast and accurate architectures as “fst” and “acrt”. 23 Žbontar and LeCun should be used to compare the five methods. On all three data sets the accurate architecture performs best, followed by the fast architecture, which in turn is followed by the census transform. These are the three best performing methods on all three data sets. Their error rates are 2.61 %, 3.02 %, and 4.90 % on KITTI 2012; 3.25 %, 3.99 %, and 5.03 % on KITTI 2015; and 7.91 %, 9.87 %, and 16.72 % on Middlebury. The sum of absolute differences and the normalized cross-correlation matching costs produce disparity maps with larger errors. For a visual comparison of our method and the census transform see Figures 5, 6, and 7. 5.7 Stereo Method The stereo method includes a number of post-processing steps: cross-based cost aggregation, semiglobal matching, interpolation, subpixel enhancement, a median, and a bilateral filter. We ran a set of experiments in which we excluded each of the aforementioned steps and recorded the validation error (see Table 8). The last two rows of Table 8 allude to the importance of the post-processing steps of the stereo method. We see that, if all post-processing steps are removed, the validation error of the accurate architecture increases from 2.61 % to 13.49 % on KITTI 2012, from 3.25 % to 13.38 % on KITTI 2015, and from 7.91 % to 28.33 % on Middlebury. Out of all post-processing steps of the stereo method, semiglobal matching affects the validation error the strongest. If we remove it, the validation error increases from 2.61 % to 4.26 % on KITTI 2012, from 3.25 % to 4.51 % on KITTI 2015, and from 7.91 % to 11.99 % on Middlebury. We did not use the left-right consistency check to eliminate errors in occluded regions on the Middlebury data set. The error rate increased from 7.91 % to 8.22 % using the left-right consistency check on the accurate architecture, which is why we decided to remove it. 5.8 Data Set Size We used a supervised learning approach to measure the similarity between image patches. It is, therefore, natural to ask how does the size of the data set affect the quality of the disparity maps. To answer this question, we retrain our networks on smaller training sets obtained by selecting a random set of examples (see Table 9). We observe that the validation error decreases as we increase the number of training examples. These experiments suggest a simple strategy for improving the results of our stereo method: collect a larger data set. 5.9 Transfer Learning Up to this point the training and validation sets were created from the same stereo data set, either KITTI 2012, KITTI 2015, or Middlebury. To evaluate the performance of our method in the transfer learning setting, we run experiments where the validation error is computed on a different data set than the one used for training. For example, we would use the Middlebury data set to train the matching cost neural network and evaluate its performance on the KITTI 2012 data set. These experiments give us some idea of the expected performance in a real-world application, where it isn’t possible to train a specialized 24 Stereo by Training a Network to Compare Patches KITTI 2012 fst acrt sad cens ncc Cross-based cost aggregation Semiglobal matching Interpolation Subpixel Enhancement Median filter Bilateral filter 3.02 8.78 3.48 3.03 3.03 3.26 2.73 4.26 2.96 2.65 2.63 2.79 8.22 19.58 9.21 8.16 8.16 8.75 5.21 8.84 5.96 4.95 4.92 5.70 8.93 10.72 11.16 8.93 9.00 9.76 No stereo method Full stereo method 15.70 3.02 13.49 2.61 32.30 8.16 53.55 4.90 22.21 8.93 KITTI 2015 fst acrt sad cens ncc Cross-based cost aggregation Semiglobal matching Interpolation Subpixel Enhancement Median filter Bilateral filter 3.99 8.40 4.47 4.02 4.05 4.20 3.39 4.51 3.33 3.28 3.25 3.43 9.94 19.80 10.39 9.44 9.44 9.95 5.20 7.25 5.83 5.03 5.05 5.84 8.89 9.36 10.98 8.91 8.96 9.77 No stereo method Full stereo method 15.66 3.99 13.38 3.25 30.67 9.44 50.35 5.03 18.95 8.89 Middlebury fst acrt sad cens ncc Cross-based cost aggregation Semiglobal matching Interpolation Subpixel Enhancement Median filter Bilateral filter 9.87 25.50 9.87 10.29 10.16 10.39 10.63 11.99 7.91 8.44 7.91 7.96 43.09 51.25 41.86 42.71 41.90 41.97 29.28 19.51 16.72 17.18 16.73 16.96 33.89 35.36 33.89 34.12 34.17 34.43 No stereo method Full stereo method 30.84 9.87 28.33 7.91 59.57 41.86 64.53 16.72 39.23 33.89 Table 8: The numbers measure validation error when a particular post-processing step is excluded from the stereo method. The last two rows of the tables should be interpreted differently: they contain the validation error of the raw convolutional neural network and the validation error after the complete stereo method. For example, if we exclude semiglobal matching, the fast architecture achieves an error rate of 8.78 % on the KITTI 2012 data set and an error rate of 3.02 % after applying the full stereo method. We abbreviate the method names as “fst” for the fast architecture, “acrt” for the accurate architecture, “sad” for the sum of absolute differences, “cens” for the census transform, and “ncc” for the normalized crosscorrelation matching cost. 25 Žbontar and LeCun KITTI 2012 KITTI 2015 Middlebury Data Set Size (%) fst acrt fst acrt fst acrt 20 40 60 80 100 3.17 3.11 3.09 3.05 3.02 2.84 2.75 2.67 2.65 2.61 4.13 4.10 4.05 4.02 3.99 3.53 3.40 3.34 3.29 3.25 11.14 10.35 10.14 10.09 9.87 9.73 8.71 8.36 8.21 7.91 Table 9: The validation error as a function of training set size. Test Set KITTI 2012 Training Set KITTI 2012 KITTI 2015 Middlebury KITTI 2015 Middlebury fst acrt fst acrt fst acrt 3.02 3.60 3.16 2.61 4.28 3.07 4.12 3.99 4.48 3.99 3.25 4.49 12.78 13.70 9.87 11.09 14.19 7.91 Table 10: The validation error when the training and test sets differ. For example, the validation error is 3.16 % when the Middlebury data set is used for training the fast architecture and the trained network is tested on the KITTI 2012 data set. network because no ground truth is available. The results of these experiments are shown in Table 10. Some results in Table 10 were unexpected. For example, the validation error on KITTI 2012 is lower when using the Middlebury training set compared to the KITTI 2015 training set, even though the KITTI 2012 data set is obviously more similar to KITTI 2015 than Middlebury. Furthermore, the validation error on KITTI 2012 is lower when using the fast architecture instead of the accurate architecture when training on KITTI 2015. The matching cost neural network trained on the Middlebury data set transfers well to the KITTI data sets. Its validation error is similar to the validation errors obtained by networks trained on the KITTI data sets. 5.10 Hyperparameters Searching for a good set of hyperparameters is a daunting task—with the search space growing exponentially with the number of hyperparameters and no gradient to guide us. To better understand the effect of each hyperparameter on the validation error, we conduct a series of experiments where we vary the value of one hyperparameter while keeping the others fixed to their default values. The results are shown in Table 11 and can be summarized by observing that increasing the size of the network improves the generalization 26 Stereo by Training a Network to Compare Patches KITTI 2012 Hyperparameter num conv layers num conv feature maps KITTI 2015 Middlebury fst acrt fst acrt fst acrt 1 2 3 4 5 6 5.96 3.52 3.10 3.02 3.03 3.05 3.97 2.98 2.72 2.61 2.64 2.70 5.61 4.19 4.04 3.99 3.99 4.01 4.06 3.45 3.27 3.25 3.30 3.38 20.74 12.11 10.81 10.26 9.87 9.71 12.37 9.20 8.56 8.21 7.91 8.11 16 32 48 64 80 96 112 128 3.33 3.15 3.07 3.02 3.02 2.99 2.98 2.97 2.84 2.68 2.66 2.64 2.64 2.68 2.61 2.63 4.32 4.12 4.06 3.99 3.99 3.97 3.96 3.95 3.51 3.35 3.32 3.30 3.29 3.27 3.25 3.23 11.79 10.48 10.20 9.87 9.81 9.62 9.59 9.45 10.06 8.67 8.47 8.12 7.95 8.03 7.91 7.92 num fc layers 1 2 3 4 5 2.83 2.70 2.62 2.61 2.62 3.50 3.31 3.30 3.25 3.29 8.52 8.33 8.06 8.00 7.91 num fc units 128 256 384 512 2.72 2.65 2.61 2.60 3.36 3.28 3.25 3.23 8.44 8.03 7.91 7.90 dataset neg low 1.0 1.5 2.0 4.0 6.0 3.00 3.00 2.99 3.02 3.06 2.76 2.71 2.63 2.61 2.63 3.97 3.97 3.98 3.99 4.05 3.35 3.33 3.31 3.25 3.28 9.84 9.87 9.98 10.20 10.13 8.00 7.91 8.08 8.66 8.86 dataset neg high 6 10 14 18 22 3.00 3.02 3.04 3.07 3.07 2.72 2.61 2.61 2.60 2.61 3.98 3.99 4.02 4.06 4.05 3.30 3.25 3.25 3.23 3.24 9.87 9.97 10.00 9.98 10.16 8.59 8.23 8.05 8.11 7.91 dataset pos 0.0 0.5 1.0 1.5 2.0 3.04 3.02 3.02 3.04 3.04 2.67 2.65 2.61 2.62 2.66 4.00 3.99 3.99 4.04 4.04 3.26 3.28 3.25 3.27 3.29 9.92 9.87 9.86 10.00 10.16 7.97 7.91 8.04 8.34 8.51 Table 11: Validation errors computed across a range of hyperparameter settings. 27 Žbontar and LeCun performance, but only up to a point, when presumably, because of the size of the data set, the generalization performance starts do decrease. Note that the num conv layers hyperparameter implicitly controls the size of the image patches. For example, a network with one convolutional layer with 3 × 3 kernels compares image patches of size 3 × 3, while a network with five convolutional layers compares patches of size 11 × 11. 6. Conclusion We presented two convolutional neural network architectures for learning a similarity measure on image patches and applied them to the problem of stereo matching. The source code of our implementation is available at https://github.com/jzbontar/ mc-cnn. The online repository contains procedures for computing the disparity map, training the network, as well as the post-processing steps of the stereo method. The accurate architecture produces disparity maps with lower error rates than any previously published method on the KITTI 2012, KITTI 2015, and Middlebury data sets. The fast architecture computes the disparity maps up to 90 times faster than the accurate architecture with only a small increase in error. These results suggest that convolutional neural networks are well suited for computing the stereo matching cost even for applications that require real-time performance. The fact that a relatively simple convolutional neural network outperformed all previous methods on the well-studied problem of stereo is a rather important demonstration of the power of modern machine learning approaches. References G. Bradski. The OpenCV library. Dr. Dobb’s Journal of Software Tools, 2000. Jane Bromley, James W Bentz, Léon Bottou, Isabelle Guyon, Yann LeCun, Cliff Moore, Eduard Säckinger, and Roopak Shah. Signature verification using a siamese time delay neural network. International Journal of Pattern Recognition and Artificial Intelligence, 7(04):669–688, 1993. Matthew Brown, Gang Hua, and Simon Winder. Discriminative learning of local image descriptors. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(1): 43–57, 2011. Thomas Brox and Jitendra Malik. Large displacement optical flow: descriptor matching in variational motion estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(3):500–513, 2011. Ayan Chakrabarti, Ying Xiong, Steven J. Gortler, and Todd Zickler. Low-level vision by consensus in a spatial hierarchy of regions. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. Zhuoyuan Chen, Xun Sun, Yinan Yu, Liang Wang, and Chang Huang. A deep visual correspondence embedding model for stereo matching costs. IEEE International Conference on Computer Vision (ICCV), 2015. 28 Stereo by Training a Network to Compare Patches Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cuDNN: Efficient primitives for deep learning. CoRR, abs/1410.0759, 2014. URL http://arxiv.org/abs/1410.0759. Ronan Collobert, Koray Kavukcuoglu, and Clément Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, 2011. Nils Einecke and Julian Eggert. A two-stage correlation method for stereoscopic depth estimation. In Digital Image Computing: International Conference on Techniques and Applications (DICTA), pages 227–234, 2010. Andreas Geiger, Martin Roser, and Raquel Urtasun. Efficient large-scale stereo matching. In Proceedings of the 10th Asian Conference on Computer Vision - Volume Part I, ACCV’10, pages 25–38. Springer-Verlag, Berlin, Heidelberg, 2011. Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: the KITTI dataset. International Journal of Robotics Research (IJRR), 2013. Fatma Güney and Andreas Geiger. Displets: Resolving stereo ambiguities using object knowledge. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. Ralf Haeusler, Rahul Nair, and Daniel Kondermann. Ensemble learning for confidence measures in stereo vision. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2013. Xufeng Han, Thomas Leung, Yangqing Jia, Rahul Sukthankar, and Alexander C Berg. MatchNet: Unifying feature and metric learning for patch-based matching. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. Heiko Hirschmüller. Stereo processing by semiglobal matching and mutual information. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(2):328–341, 2008. Heiko Hirschmüller and Daniel Scharstein. Evaluation of cost functions for stereo matching. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2007. Heiko Hirschmüller and Daniel Scharstein. Evaluation of stereo matching costs on images with radiometric differences. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(9):1582–1599, 2009. Michael Hornacek, Andrew Fitzgibbon, and Carsten Rother. SphereFlow: 6 DoF scene flow from RGB-D pairs. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. Dan Kong and Hai Tao. A method for learning matching errors for stereo computation. British Machine Vision Conference (BMVC), 2004. Dan Kong and Hai Tao. Stereo matching via learning multiple experts behaviors. British Machine Vision Conference (BMVC), 2006. 29 Žbontar and LeCun Jana Kostková and Radim Sára. Stratified dense matching for stereopsis in complex scenes. British Machine Vision Conference (BMVC), 2003. Jedrzej Kowalczuk, Eric T Psota, and Lance C Perez. Real-time stereo matching on CUDA using an iterative refinement method for adaptive support-weight correspondences. IEEE Transactions on Circuits and Systems for Video Technology, 23(1):94–104, 2013. Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. Yunpeng Li and Daniel P Huttenlocher. Learning for stereo vision using the structured support vector machine. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2008. Xing Mei, Xun Sun, Mingcai Zhou, Haitao Wang, Xiaopeng Zhang, et al. On building an accurate stereo matching system on graphics hardware. IEEE International Conference on Computer Vision Workshops (ICCV Workshops), pages 467–474, 2011. Moritz Menze and Andreas Geiger. Object scene flow for autonomous vehicles. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. John Nickolls, Ian Buck, Michael Garland, and Kevin Skadron. Scalable parallel programming with CUDA. Queue, 6(2):40–53, 2008. Mattis Paulin, Matthijs Douze, Zaid Harchaoui, Julien Mairal, Florent Perronin, and Cordelia Schmid. Local convolutional features with unsupervised training for image retrieval. In IEEE International Conference on Computer Vision (ICCV), pages 91–99, 2015. Martin Peris, Atsuto Maki, Sara Martull, Yasuhiro Ohkawa, and Kazuhiro Fukui. Towards a simulation driven stereo vision system. In 21st International Conference on Pattern Recognition (ICPR), pages 1038–1042, 2012. Eric T Psota, Jedrzej Kowalczuk, Mateusz Mittek, and Lance C Perez. Map disparity estimation using hidden markov trees. IEEE International Conference on Computer Vision (ICCV), 2015. Jerome Revaud, Philippe Weinzaepfel, Zaid Harchaoui, and Cordelia Schmid. Deepmatching: Hierarchical deformable dense matching. ArXiv e-prints, 1(7):8, 2015. Daniel Scharstein and Chris Pal. Learning conditional random fields for stereo. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2007. Daniel Scharstein and Richard Szeliski. A taxonomy and evaluation of dense two-frame stereo correspondence algorithms. International Journal of Computer Vision, 47(1-3): 7–42, 2002. Daniel Scharstein and Richard Szeliski. High-accuracy stereo depth maps using structured light. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2003. 30 Stereo by Training a Network to Compare Patches Daniel Scharstein, Heiko Hirschmüller, York Kitajima, Greg Krathwohl, Nera Nešić, Xi Wang, and Porter Westling. High-resolution stereo datasets with subpixel-accurate ground truth. German Conference on Pattern Recognition (GCPR), September 2014. Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Learning local feature descriptors using convex optimisation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(8):1573–1585, 2014. Sudipta N Sinha, Daniel Scharstein, and Richard Szeliski. Efficient high-resolution stereo matching using local plane sweeps. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. Aristotle Spyropoulos, Nikos Komodakis, and Philippos Mordohai. Learning to detect ground control points for improving the accuracy of stereo matching. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. Deqing Sun, Stefan Roth, and Michael J Black. A quantitative analysis of current practices in optical flow estimation and the principles behind them. International Journal of Computer Vision, 106(2):115–137, 2014. Tomasz Trzcinski, Mario Christoudias, Vincent Lepetit, and Pascal Fua. Learning image descriptors with the boosting-trick. In Advances in neural information processing systems, pages 269–277, 2012. Christoph Vogel, Konrad Schindler, and Stefan Roth. Piecewise rigid scene flow. IEEE International Conference on Computer Vision (ICCV), 2013. Christoph Vogel, Stefan Roth, and Konrad Schindler. View-consistent 3D scene flow estimation over multiple frames. European Conference on Computer Vision (ECCV), September 2014. Christoph Vogel, Konrad Schindler, and Stefan Roth. 3D scene flow estimation with a piecewise rigid scene model. International Journal of Computer Vision, pages 1–28, 2015. Koichiro Yamaguchi, David McAllester, and Raquel Urtasun. Efficient joint segmentation, occlusion labeling, stereo and flow estimation. European Conference on Computer Vision (ECCV), September 2014. Ramin Zabih and John Woodfill. Non-parametric local transforms for computing visual correspondence. European Conference on Computer Vision (ECCV), 1994. Sergey Zagoruyko and Nikos Komodakis. Learning to compare image patches via convolutional neural networks. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. Jure Žbontar and Yann LeCun. Computing the stereo matching cost with a convolutional neural network. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. 31 Žbontar and LeCun Chi Zhang, Zhiwei Li, Yanhua Cheng, Rui Cai, Hongyang Chao, and Yong Rui. Meshstereo: A global stereo model with mesh alignment regularization for view interpolation. IEEE International Conference on Computer Vision (ICCV), 2015. Ke Zhang, Jiangbo Lu, and Gauthier Lafruit. Cross-based local stereo matching using orthogonal integral images. IEEE Transactions on Circuits and Systems for Video Technology, 19(7):1073–1079, 2009. Li Zhang and Steven M Seitz. Estimating optimal parameters for MRF stereo from a single image pair. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(2): 331–342, 2007. 32
9cs.NE
arXiv:1706.09776v1 [math.NA] 29 Jun 2017 Numerical assessment of two-level domain decomposition preconditioners for incompressible Stokes and elasticity equations Gabriel R. Barrenechea1 , Michal Bosy 1 ∗1 , and Victorita Dolean1 Department of Mathematics and Statistics, University of Strathclyde, 26 Richmond Street, G1 1XH Glasgow, United Kingdom June 30, 2017 Abstract Solving the linear elasticity and Stokes equations by an optimal domain decomposition method derived algebraically involves the use of non standard interface conditions. The onelevel domain decomposition preconditioners are based on the solution of local problems. This has the undesired consequence that the results are not scalable, it means that the number of iterations needed to reach convergence increases with the number of subdomains. This is the reason why in this work we introduce, and test numerically, two-level preconditioners. Such preconditioners use a coarse space in their construction. We consider the nearly incompressible elasticity problems and Stokes equations, and discretise them by using two finite element methods, namely, the hybrid discontinuous Galerkin and Taylor-Hood discretisations. Key words. Stokes problem, nearly incompressible elasticity, Taylor-Hood, hybrid discontinuous Galerkin methods, domain decomposition, coarse space, optimized restricted additive Schwarz methods 1 Introduction In [BBD+ 16] the one-level domain decomposition methods for Stokes equations were introduced in conjunction with the non standard interface conditions. Although it can be observed there the lack of scalability with respect to the number of subdomains. It means that by splitting the problem in a larger number of subdomains leads to the increase of size of the plateau region in the convergence of an iterative method (see Figure 1) when using the one-level domain decomposition methods. This is caused by the lack of global information, as subdomains can only communicate with their neighbours. Hence, when the number of subdomains increases in one direction, the length of the plateau also increases. Even in cases when the local problems are of the same size, the iteration count grows with the increase of the number of subdomain. This can be also observed in all experiments in this manuscript in case of one-level methods. The remedy for this is the use of a second level in the preconditioner or a coarse space correction that adds the necessary global information. Two-level algorithms have been analysed for several classes of problems in [TW05]. The key point of these kind of methods is to choose the appropriate coarse space. The classical coarse space introduced by Nicolaides in [Nic87] is defined by vectors that support is in each subdomain. Hence the coarse space has the size equal to a number of ∗ Corresponding author: E-mail: [email protected] 1 0 -1 -1 -2 -2 log(error) log(error) 0 -3 -4 -3 -4 -5 -5 -6 -6 -7 -7 0 200 400 600 800 1000 1200 0 50 100 150 200 250 Iterations Iterations (a) Taylor-Hood (b) hdG 300 350 400 450 Figure 1: Increase of the size of the plateau region for increasing number of subdomains. subdomains. A coarse space construction, named spectral coarse space, was motivated by the complexity of the problems that classical coarse space performance was not satisfying. This construction allows to enrich a bigger size of the coarse space, but can be also reduced to the classical one. This idea was introduced for the first time in [BHMV99] in the case of multigrid methods. It relies on solving local generalised eigenvalue problems allowing to choose suitable vectors for the coarse space. For overlapping domain decomposition preconditioners, a similar idea was introduced in the case of Darcy equations in [GE10a, GE10b]. The authors of [NXD10] consider also the heterogeneous Darcy equation and presented a different generalised eigenvalue problem based on local Dirichlet-to-Neumann maps. The method has been analysed in [DNSS12] and proved to be very robust in the case of small overlaps. The same idea was extended numerically to the heterogeneous Helmholtz problem in [CDKN14]. The authors of [LNS15] apply the coarse space associated with low-frequency eigenfunctions of the subdomain Dirichlet-to-Neumann maps for the generalisation of the optimised Schwarz methods, named 2-Lagrange multiplier methods. The first attempt to extend this spectral approach to general symmetric positive definite problems was made in [EGLW12] as an extension of [GE10a, GE10b]. Since some of the assumptions of the previous framework are hard to fulfil, authors of [SDH+ 14] proposed slightly different approach for symmetric positive definite problems. Their idea of constructing partition of unity operator associated with degrees of freedom allows to work with various finite element spaces. An overview of different kinds of two-level methods can be found in [DJN15, Chapters 5 and 7]. Despite the fact that all these approaches provide satisfying results, there is no universal treatment to build efficient coarse spaces in the case of non definite problems such as Stokes equations. The spectral coarse spaces that we use in this work are inspired by those proposed in [HJN15]. The authors introduced and tested numerically symmetrised two-level preconditioners for overlapping algorithms which use Robin interface conditions between the subdomains (see (5.27) for details). They have applied these preconditioners to solve saddle point problems such as nearly incompressible elasticity and Stokes discretised by Taylor-Hood finite elements. In our case, we use non standard interface conditions. Therefore the use of spectral coarse spaces could lead to an important gain. In this work, we test this improvement in case of nearly incompressible elasticity and Stokes equations that are discussed in Section 2. As the discretisations we use the Taylor-Hood [GR86, Chapter II, Section 4.2] and hybrid discontinuous Galerkin method [CGL09, CG09] presented in Section 3. In Section 4 we introduce the two-level domain decomposition preconditioners. Sections 5 and 6 present the two and three dimensional numerical experiments, respectively. Finally, a summary is outlined in Section 7. 2 2 The differential equations Let Ω be an open polygon in R2 or an open Lipschitz polyhedron in R3 , with Lipschitz boundary Γ := ∂Ω. We use d = 2, 3 to denote the dimension of the space. We use bold for tensor or vector variables. In addition we denote normal and tangential components as follows un := u · n, and ut := u − un n, where n is the outward unit normal vector to the boundary Γ . For D ⊂ Ω, we use the standard L2 (D) space and C 0 (D̄) denotes the set of all continuous functions on the closure of a set D. Let us define following Sobolev spaces  H m (D) := v ∈ L2 (D) : ∀ |α| ≤ m ∂ α v ∈ L2 (D) for m ∈ N,  1 H 2 (∂D) := ṽ ∈ L2 (∂D) : ∃v ∈ H 1 (D) ṽ = tr(v) ,  H (div, D) := v ∈ [L2 (D)]d : ∇ · v ∈ L2 (D) , where, for α = (α1 , ..., αd ) ∈ Nd and |α| = 1 Pd i=1 αi we denote ∂ α = ∂ |α| α , α ∂x1 1 ...∂xd d and tr : H 1 (Ω) → H 2 (∂Ω) is the trace operator. In addition, we use the following notation of the space including boundary and average conditions   Z L20 (D) := v ∈ L2 (D) : v dx = 0 , D n o 1 1 HΓ̃ (D) := v ∈ H (D) : v = 0 on Γ̃ , where Γ̃ ⊂ ∂D. If Γ̃ = ∂D, then HΓ̃1 (D) is denoted H01 (D). Now we present the two differential problems considered in this work. 2.1 Stokes equation Let us start with d-dimensional, d = 2, 3, Stokes problem  −ν∆u + ∇p = f (2.1) ∇·u = 0 in Ω , in Ω where u : Ω̄ → Rd is the velocity field, p : Ω̄ → R the pressure, ν > 0 the viscosity which is considered to be constant and f ∈ [L2 (Ω)]d is a given function. We define the stress tensor 1 σ := ν∇u − pI and the flux as σn := σ n. For uD ∈ [H 2 (Γ)]d and g ∈ L2 (Γ) we consider three types of boundary conditions: • Dirichlet (non-slip) (2.2) u = uD on Γ; • tangential-velocity and normal-flux (TVNF)  ut = (2.3) σnn = 0 g on Γ ; on Γ • normal-velocity and tangential-flux (NVTF)  un = 0 (2.4) σnt = g on Γ . on Γ The third type of boundary condition has already been considered for the Stokes problem in [AdDBM+ 14]. 3 2.2 Nearly incompressible elasticity equation From a mathematical point of view, the nearly incompressible elasticity problem is very similar to the Stokes equations. The difference is that instead of considering the gradient ∇v, the symmetric  gradient ε(v) := 21 ∇v + ∇T v is used. We want to solve the following d-dimensional, d = 2, 3, problem  −2µ∇ · ε(u) + ∇p = f in Ω (2.5) − ∇ · u = λ1 p in Ω where u : Ω̄ → Rd is the displacement field, p : Ω → R the pressure, f ∈ [L2 (Ω)]d is a given function, λ and µ are the Lamé coefficients defined by λ= Eν , (1 + ν)(1 − 2ν) µ= E , 2(1 + ν) where E is the Young modulus and ν the Poisson ratio. We define the stress tensor as σ sym := 2µε(u) − pI and its normal component as σ sym := σ sym n. For g ∈ L2 (Γ) we consider three types n of boundary conditions: • mixed such that Γ = ΓD ∪ ΓN and ΓD ∩ ΓN = ∅  u = 0 (2.6) sym σn = 0 on ΓD ; on ΓN • tangential-displacement and normal-normal-stress (TDNNS)  ut = 0 on Γ (2.7) ; sym σnn = g on Γ • normal-displacement and tangential-normal-stress (NDTNS)  un = 0 on Γ (2.8) . sym σnt = g on Γ The second type of boundary condition has already been considered for linear elasticity equation in [PS11]. 3 The numerical methods Let {Th }h>0 be a regular family of triangulations of Ω̄ made of simplices. For each triangulation Th , Eh denotes the set of its facets (edges for d = 2, faces for d = 3). In addition, for each element K ∈ Th , hK := diam(K), and we denote h := maxK∈Th hK . We define the following broken Sobolev spaces on the set of all edges in Eh (for d = 2)  L2 (Eh ) := v : v|E ∈ L2 (E) ∀ E ∈ Eh . Moreover, for D ⊂ Ω, Pk (D) denotes the space of polynomials of total degree smaller than, or equal to, k on the set D. We now present the two discretisations to be used in the numerical experiments. 3.1 Taylor-Hood discretisation We first consider the Taylor-Hood discretisation using the following approximation spaces  T Hhk := vh ∈ [H 1 (Ω)]d : vh |K ∈ [Pk (K)]d ∀ K ∈ Th ,  Rhk−1 := qh ∈ C 0 (Ω̄) : qh |K ∈ Pk−1 (K) ∀ K ∈ Th 4 where k ≥ 2 (see [GR86, Chapter II, Section 4.2]). If (2.1) is supplied with the homogeneous boundary conditions (2.2), then the discrete problem reads:   Find (uh , ph ) ∈ T Hhk ∩ [H01 (Ω)]d × Rhk−1 ∩ L20 (Ω)   s.t. for all (vh , qh ) ∈ T Hhk ∩ [H01 (Ω)]d × Rhk−1 ∩ L20 (Ω)  Z  ν∇uh : ∇vh dx  (3.9) − Ω   − Z ph ∇ · vh dx ZΩ Z = f vh dx Ω ∇ · uh qh dx = 0. Ω  In case of TVNF boundary conditions (2.3), we define Vt := v ∈ [H 1 (Ω)]d : vt = 0 on Γ , and the discrete problem reads:  Find (uh , ph ) ∈ T Hhk ∩ Vt × Rhk−1  s.t. for all (vh , qh ) ∈ T Hhk ∩ Vt × Rhk−1 (3.10)  Z  ν∇uh : ∇vh dx  − Ω   − Z ZΩ ph ∇ · vh dx = Z f vh dx + Ω ∇ · uh qh dx = Z Γ g (vh )t ds 0. Ω If NVTF  boundary conditions (2.4) are used, then we define the following space Vn := v ∈ [H 1 (Ω)]d : vn = 0 on Γ , and the discrete problem reads:   Find (uh , ph ) ∈ T Hhk ∩ Vn × Rhk−1 ∩ L20 (Ω)   s.t. for all (vh , qh ) ∈ T Hhk ∩ Vn × Rhk−1 ∩ L20 (Ω) (3.11)  Z  ν∇uh : ∇vh dx  − Ω   − Z ZΩ ph ∇ · vh dx = Z f vh dx + Γ Ω ∇ · uh qh dx = Z g (vh )n ds 0. Ω In similar way, if the problem (2.5) is supplied with the boundary conditions (2.6), then the discrete problem reads  Find (uh , ph ) ∈ T Hhk ∩ [HΓ1D (Ω)]d × Rhk−1  s.t. for all (vh , qh ) ∈ T Hhk ∩ [HΓ1D (Ω)]d × Rhk−1 (3.12)  Z  2µε (uh ) : ε (vh ) dx  Z Ω   ∇ · uh qh dx − Ω − − Z ph ∇ · vh dx ΩZ 1 ph qh dx λ = Z f vh dx Ω = 0. Ω The rest of the discrete problems associated with (2.5) that is supplied with TDNNS boundary conditions (2.7) or NDTNS boundary conditions (2.8) are similar to (3.10) or (3.11), respectively. 5 3.2 Hybrid discontinuous Galerkin discretisation We restrict the discussion of this to two dimensional case d = 2. This method has been presented and analysed in [BBD+ 16]. The velocity is approximated using the Brezzi-Douglas-Marini spaces (see [BBF13, Section 2.3.1]) of degree k given by o n BDMhk := vh ∈ H (div, Ω) : vh |K ∈ [Pk (K)]2 ∀ K ∈ Th , n o 2 k := v ∈ H (div, Ω) : v | ∈ [P (K)] ∀ K ∈ T ∧ (v ) = 0 on Γ̃ , BDMh, h h K k h h n Γ̃ k k where Γ̃ ⊂ ∂Ω. If Γ̃ = ∂Ω, then BDMh, is denoted BDMh,0 . Γ̃ The pressure is approximated in the space  Qhk−1 := qh ∈ L2 (Ω) : qh |K ∈ Pk−1 (K) ∀ K ∈ Th . Finally, a Lagrange multiplier, aimed at approximating the tangential component of the velocity is introduced. The space swhere this multipliers is sought are given by  Mhk−1 := ṽh ∈ L2 (Eh ) : ṽh |E ∈ Pk−1 (E) ∀ E ∈ Eh , n o k−1 k−1 Mh, := ṽ ∈ M : ṽ = 0 on Γ̃ , h h h Γ̃ k−1 k−1 where Γ̃ ⊂ ∂Ω. If Γ̃ = ∂Ω, then Mh, is denoted Mh,0 . Furthermore, we introduce for all E ∈ Eh Γ̃ k−1 the L2 (E)-projection ΦE : L2 (E) → Pk−1 (E) defined by Z Z k−1 (w̃)ṽh ds = w̃ṽh ds ∀ ṽh ∈ Pk−1 (E) , (3.13) ΦE E E k−1 for all E ∈ Eh . and we denote Φk−1 : L2 (Eh ) → Mhk−1 defined as Φk−1 |E := ΦE If (2.1) is supplied with the homogeneous boundary conditions (2.2), then the discrete problem reads:  k−1 k Find (uh , ũh , ph ) ∈ BDMh,0 × Mh,0 × Qhk−1 ∩ L20 (Ω)  k−1 k s.t. for all (vh , ṽh , qh ) ∈ BDMh,0 × Mh,0 × Qhk−1 ∩ L20 (Ω) , (3.14) where   a ((uh , ũh ) , (vh , ṽh )) + = f vh dx Ω b ((uh , ũh ) , qh ) =  a ((wh , w̃h ) , (vh , ṽh )) := X Z K∈Th − (3.15) b ((vh , ṽh ) , ph ) Z Z Z∂K ν∇wh : ∇vh dx K  ν (∂n wh )t (vh )t − ṽh ds  ν (wh )t − w̃h (∂n vh )t ds ∂K  Z   τ +ν Φk−1 (wh )t − w̃h Φk−1 (vh )t − ṽh ds , hK ∂K − and τ > 0 is a stabilisation parameter, and (3.16) , 0 b ((vh , ṽh ) , qh ) := − X Z K∈Th qh ∇ · vh dx. K If TVNF boundary conditions (2.3) are used, then the discrete problem reads: 6 k−1 Find (uh , ũh , ph ) ∈ BDMhk × Mh,0 × Qhk−1 k−1 s.t. for all (vh , ṽh , qh ) ∈ BDMhk × Mh,0 × Qhk−1 , (3.17)   a ((uh , ũh ) , (vh , ṽh )) + b ((vh , ṽh ) , ph ) Z = f vh dx + Ω b ((uh , ũh ) , qh )  Z Γ = 0 g (vh )n ds . In case of NVTF boundary conditions (2.4), the discrete problem reads:  k Find (uh , ũh , ph ) ∈ BDMh,0 × Mhk−1 × Qhk−1 ∩ L20 (Ω)  k s.t. for all (vh , ṽh , qh ) ∈ BDMh,0 × Mhk−1 × Qhk−1 ∩ L20 (Ω) , (3.18)   a ((uh , ũh ) , (vh , ṽh )) + b ((vh , ṽh ) , ph ) = Z f vh dx + Ω b ((uh , ũh ) , qh ) =  Z Γ 0 gṽh ds . In similar way, if the problem (2.5) is supplied with the mixed boundary conditions (2.6), then the discrete problem reads: k−1 k × Qhk−1 × Mh,Γ Find (uh , ũh , ph ) ∈ BDMh,Γ D D k−1 k s.t. for all (vh , ṽh , qh ) ∈ BDMh,ΓD × Mh,ΓD × Qhk−1 (3.19) where   as ((uh , ũh ) , (vh , ṽh )) +  Z f vh dx Ω b ((uh , ũh ) , qh ) + as ((wh , w̃h ) , (vh , ṽh )) := X Z K∈Th − (3.20) b ((vh , ṽh ) , ph ) = Z Z∂K c(ph , qh ) = 0, 2µε(wh ) : ε(vh ) dx K  2µ (εn (wh ))t (vh )t − ṽh ds  2µ (wh )t − w̃h (εn (vh ))t ds ∂K  Z   τ +2µ Φk−1 (wh )t − w̃h Φk−1 (vh )t − ṽh ds , hK ∂K − b is defined by (3.16), and c(rh , qh ) := − 1 λ Z rh qh ds. Ω The rest of the discrete problems associated with (2.5) that is supplied with TDNNS boundary conditions (2.7) or NDTNS boundary conditions (2.8) are similar to (3.17) or (3.18), respectively. 4 The domain decomposition preconditioners Let us assume that we have to solve the following linear system AU = F where A is the matrix arising from discretisation of the Stokes or linear elasticity equation on the domain Ω, U is the vector of unknowns, and F is the right hand side. To accelerate the performance of an iterative Krylov method [DJN15, Chapter 3] applied to this system we will consider domain decomposition preconditioners which are naturally parallel. They are based on an overlapping decomposition of the computational domain. 7 (a) L-shaped domain (b) T-shaped domain Figure 2: Partition of the domain for 8 subdomains by METIS. Let {Th,i }N i=1 be a partition of the triangulation Th (see examples in Figure 2). For an integer l N l value l ≥ 0, we define an overlapping decomposition {Th,i }i=1 such that Th,i is a set of all triangles l−1 l−1 l−1 from Th,i and all triangles from Th \ Th,i that have non-empty intersection with Th,i , and 0 Th,i = Th,i . With this definition the width of the overlap will be of 2l. Furthermore, if Wh stands l l for the finite element space associated to Th , Wh,i is the local finite element spaces on Th,i , which is a triangulation of Ωi . Let N be the set of indices of degrees of freedom of Wh and Nil the set of indices of degrees l l of freedom of Wh,i for l ≥ 0. Moreover, we define the restriction operator Ri : Wh → Wh,i as a l rectangular matrix |Ni | × |N | such that if V is the vector of degrees of freedom of vh ∈ Wh , then l l Ri V is the vector of degrees of freedom of Wh,i in Ωi . The extension operator from Wh,i to Wh T and its associated matrix are both given by Ri . In addition we introduce a partition of unity Di as a diagonal matrix |Nil | × |Nil | such that (4.21) Id = N X RTi Di Ri , i=1 where Id ∈ R|N |×|N | is the identity matrix. We first recall the Modified Restricted Additive Schwarz (MRAS) preconditioner introduced in [BBD+ 16] for the Stokes equation. This preconditioner is given by (4.22) M−1 MRAS = N X RTi Di B−1 i Ri , i=1 where Bi is the matrix associated to a discretisation of Stokes equation (2.1) in Ωi where we impose either TVNF (2.3) or NVTF (2.4) boundary conditions in Ωi . In case of a discretisation of elasticity equation (2.5) in Ωi , we impose either TDNNS (2.7) or NDTNS (2.8) boundary conditions in Ωi . We new introduce a symmetrised variant of (4.22) called Symmetrised Modified Restricted Additive Schwarz (SMRAS), given by (4.23) M−1 SMRAS = N X RTi Di B−1 i Di Ri . i=1 8 4.1 Two-level methods A two-level version of the SMRAS and MRAS preconditioners will be based on a spectral coarse space obtained by solving the following local generalised eigenvalue problems Find (V jk , λjk ) ∈ R|Nj | \ {0} × R s.t. (4.24) Ãj V jk = λjk Bj V jk , where Ãj are local matrices associated to a discretisation of local Neumann boundary value prob|N | lem in Ωj . Let θ > 0 be a user-defined threshold. as the vector space  We define ZGenEO ⊂ R T spanned by the family of vectors Rj Dj V jk λ <θ , 1 ≤ j ≤ N , corresponding to eigenvalues jk smaller than θ. The value of θ is chosen such that for a given problem and preconditioner, the behaviour of the method should be robust in the sense that, its convergence should not depend, or depends very weakly, on the number of subdomains. We are now ready to introduce the two-level method with coarse space ZGenEO . Let P0 be the A-orthogonal projection onto the coarse space ZGenEO . The two-level SMRAS preconditioner is defined as (4.25) −1 T M−1 + (Id − P0 )M−1 SMRAS,2 = P0 A SMRAS (Id − P0 ). Furthermore, if R0 is a matrix whose rows are a basis of the coarse space ZGenEO , then  −1 P0 A−1 = RT0 R0 ART0 R0 . In similar way, we can introduce the two-level MRAS preconditioner (4.26) 5 −1 T M−1 + (Id − P0 )M−1 MRAS,2 = P0 A MRAS (Id − P0 ). Numerical results for two dimensional problems In this section we assess the performance of the preconditioners defined in Section 4.1. We will compare the newly introduced ones with that of ORAS and SORAS introduced in [HJN15]. These kind of preconditioners are associated with the Robin interface conditions and require an optimised parameter as it can be seen in (5.27) below. The big advantage of SMRAS and MRAS preconditioners from the previous section is that they are parameter-free. We consider the partial differential equation model for nearly incompressible elasticity and Stokes flow as problems of similar mixed formulation. Each of these problems is discretised by using the Taylor-Hood methods from Section 3.1 and the hdG discretisation from Section 3.2. Our experiments will be based on the classical weak scaling test. This test is built as follows. A domain Ω̄ is split into a triangulation Th . For each of element K ∈ Th , hK = diam(K), and we denote the mesh size by h := maxK∈Th hK . Then, this triangulation is split into overlapping subdomains of size H, in such a way H h remains constant. In the absence of a second level in the preconditioner, if the number of subdomains grows, then the convergence gets slower. A coarse space provides a global information and leads to a more robust behaviour. The simplest way to build a coarse space is to consider the zero energy modes. More precisely they are the eigenvectors associated with the zero eigenvalues of (4.24) on a floating subdomains. Hence, by a floating subdomain we mean a subdomain without Dirichlet boundary condition on any part of the boundary. Then the matrix on the left hand side of (4.24) is singular and there are zero eigenvalues. These zero energy modes are the rigid body motions (three in two dimensions, six in three dimensions) for the elasticity problem, and the constants (two in two dimensions, three in three dimensions) for the Stokes equations. Unfortunately for some cases, this choice is not sufficient, so we have collected the smallest M eigenvalues for each subdomain and build a coarse 9 space by including the eigenvectors associated to them. The different values of M are presented in the table in brackets. All experiments have been made by using FreeFem++ [Hec12], which is a free software specialised in variational discretisations of partial differential equations. We use GMRES [SS86] as an iterative solver. Generalized eigenvalue problems to generate the coarse space are solved using ARPACK [LSY98]. The overlapping decomposition into subdomains can be uniform (Unif) or generated by METIS (MTS) [KK98]. In each of the examples in this section we consider decomposition with two layers of mesh size h in the overlap. Tables show the number of iterations kU −U k needed to achieve a relative l2 norm of the error smaller than 10−6 , kU −U n0 k l22 < 10−6 , where l U is the solution of global problem given by direct solver and U m denotes m-th iteration of the iterative solver. In addition, DOF stands for number of degrees of freedom and N for the number of subdomains in all tables. 5.1 Taylor-Hood discretisation In this section we consider the Taylor-Hood discretisation from Section 3.1 with different values of k ≥ 2 for nearly incompressible elasticity and Stokes equations. 5.1.1 Nearly incompressible elasticity Since we consider the preconditioners with various interface conditions we need to comment the way of imposing them. ORAS and SORAS preconditioners follow [HJN15] and use Robin interface conditions. This means, the weak formulation of the linear elasticity problem contains the following term Z Z µ(2µ + λ) sym uh vh ds (5.27) σ n (vh )n ds + 2α λ + 3µ ∂Ωi \Γ ∂Ωi \Γ where again, following [HJN15] we choose α = 10. Fortunately, the MRAS and SMRAS preconditioners are parameter-free. For all numerical experiments associated in this section we use zero as an initial guess for the GMRES iterative solver. Moreover, the overlapping decomposition into subdomains is generated by METIS. ΓD ΓN (a) Domain and boundary (b) Discrete solution Figure 3: L-shaped domain problem. Test case 1 (The L-shaped domain problem). We consider the L-shaped domain Ω = (−1, 1)2 \ {(0, 1) × (−1, 0)} clamped on the left side and partly from a top and bottom as it is depicted in 10 Figure 3a. This example is similar to the one in [CS15]. The associated boundary value problem is  −2µ∇ · ε(u) + ∇p = (0, −1)T in Ω    − ∇·u = λ1 p in Ω . (5.28) u(x, y) = (0, 0)T on ΓD    sym T σ n (x, y) = (0, 0) on ΓN The physical parameters are E = 105 and ν = 0.4999 (nearly incompressible). In Figure 3b we plot the mesh of the bent domain. We choose k = 3 for the Taylor-Hood discretisation. In Figure 4 we plot the eigenvalues of one floating subdomain. The clustering of small eigenvalues of the generalised eigenvalue problem defined in (4.24) suggests the number of eigenvectors to be added to the coarse space. The three zero eigenvalues correspond to the zero energy modes. Table 1: Comparison of preconditioners for Taylor-Hood discretisation (T Hh3 , Rh2 ) - the L-shaped domain problem. DOF 124 109 478 027 933 087 1 899 125 3 750 823 N 4 16 32 64 128 ORAS 26 57 84 130 209 SORAS 60 131 180 293 412 DOF 124 109 478 027 933 087 1 899 125 3 750 823 N 4 16 32 64 128 ORAS 18 37 49 65 83 SORAS 40 52 57 64 64 DOF 124 109 478 027 933 087 1 899 125 3 750 823 N 4 16 32 64 128 ORAS 15 31 40 49 69 SORAS 32 41 48 51 54 DOF 124 109 478 027 933 087 1 899 125 3 750 823 N 4 16 32 64 128 ORAS 14 26 31 39 58 SORAS 33 41 43 47 49 One-level NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 26 60 30 69 143 65 109 221 104 181 362 161 302 568 251 Two-level (3 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 19 36 24 40 57 46 56 67 53 70 75 61 74 77 75 Two-level (5 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 17 35 24 31 47 42 38 52 53 45 53 64 49 54 70 Two-level (7 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 16 30 24 25 38 42 25 42 49 30 39 59 30 43 61 TDNNS-SMRAS 59 140 211 312 510 TDNNS-SMRAS 41 56 66 74 72 TDNNS-SMRAS 37 47 51 56 53 TDNNS-SMRAS 35 44 46 50 50 The results of Table 1 show a clear improvement in the scalability of the two-level preconditioners over the one-level ones. In fact, using five eigenvectors per subdomain, the number of iterations is virtually unaffected by the number of subdomains. All two-level preconditioners show a comparable performance. For this case, increasing the dimension of the coarse space beyond 5 × N eigenvectors does not seem to improve the results dramatically. Test case 2 (The heterogeneous beam problem). We consider a heterogeneous beam with ten layers of steel and rubber. Five layers are made from steel with the physical parameters E = 210 · 109 and ν = 0.3, and other five are made from rubber with the physical parameters E = 108 and ν = 0.4999 as it is depicted in Figure 5a. A similar example was considered in [HJN15]. The computational domain is the rectangle Ω = (0, 5) × (0, 1). The beam is clamped on its left side, 11 0.3 0.25 0.2 0.2 0.15 0.1 Eigenvalue 0.2 Eigenvalue Eigenvalue 0.25 0.15 0.1 0.15 0.1 0.05 0.05 0.05 0 0 1 2 3 4 5 6 7 8 9 10 0 1 2 Number of eigenvalue 3 4 5 6 7 8 9 10 1 2 Number of eigenvalue (a) Robin interface conditions 3 4 5 6 7 8 9 10 Number of eigenvalue (b) NDTNS interface conditions (c) TDNNS interface conditions Figure 4: Eigenvalues on one of the floating subdomains in case of uniform decomposition and Taylor-Hood discretisation (T Hh3 , Rh2 ) - the L-shaped domain problem. (a) Steel and rubber layers (b) Discrete solution Figure 5: Heterogeneous beam. hence we consider the following problem  −2µ∇ · ε(u) + ∇p    − ∇·u (5.29) u(x, y)    σ sym n (x, y) = (0, −1)T = λ1 p = (0, 0)T = (0, 0)T in Ω in Ω . on ∂Ω ∩ {x = 0} on ∂Ω \ {x = 0} In Figure 5b we plot the mesh of the bent beam. Because of the heterogeneity of the problem, we do not notice a clear clustering of the eigenvalues (see Figure 6). In such case it is well known that coarse space including only three zero energy modes is not sufficient [DNSS12]. That is why we consider a coarse space built using 5 or 7 eigenvectors per subdomain. 10 -3 0.014 7 0.03 0.012 6 0.025 0.01 4 3 Eigenvalue Eigenvalue Eigenvalue 5 0.02 0.015 0.008 0.006 2 0.01 0.004 1 0.005 0.002 0 0 1 2 3 4 5 6 7 8 9 10 Number of eigenvalue (a) Robin interface conditions 0 1 2 3 4 5 6 7 8 9 10 Number of eigenvalue (b) NDTNS interface conditions 1 2 3 4 5 6 7 8 9 10 Number of eigenvalue (c) TDNNS interface conditions Figure 6: Eigenvalues on one of the floating subdomains in case of METIS decomposition and Taylor-Hood discretisation (T Hh3 , Rh2 ) - the heterogeneous beam. As in the previous example, the introduction of a coarse space provides a significant improvement in the number of iterations needed for convergence. Due to the high heterogeneity of this problem, more eigenvectors per subdomain are needed to obtain scalable results. We notice an important improvement of the convergence when using two-level methods (see Table 2). Although we get a stable number of iterations only when considering a coarse space which is sufficiently big. 12 Table 2: Comparison of preconditioners for Taylor-Hood discretisation (T Hh3 , Rh2 ) - the heterogeneous beam. DOF 44 963 87 587 177 923 347 651 707 843 1 385 219 N 8 16 32 64 128 256 ORAS 168 226 373 615 973 >1000 SORAS 301 490 711 >1000 >1000 >1000 DOF 44 963 87 587 177 923 347 651 707 843 1 385 219 N 8 16 32 64 128 256 ORAS 109 136 193 260 412 379 SORAS 160 204 291 304 356 414 DOF 44 963 87 587 177 923 347 651 707 843 1 385 219 N 8 16 32 64 128 256 ORAS 76 106 157 178 140 119 SORAS 118 146 202 191 114 86 5.1.2 One-level NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 160 267 177 245 462 229 447 684 440 728 >1000 746 >1000 >1000 >1000 >1000 >1000 >1000 Two-level (5 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 136 147 148 192 200 181 296 275 326 363 282 491 420 369 601 448 400 711 Two-level (7 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 124 115 133 166 138 159 203 185 302 225 170 326 153 112 266 118 77 259 TDNNS-SMRAS 264 424 672 >1000 >1000 >1000 TDNNS-SMRAS 136 184 276 299 346 317 TDNNS-SMRAS 103 123 214 182 122 94 Stokes equation We now turn to the Stokes discrete problem given in Sections 3.1. Once again in case of ORAS and SORAS we choose α = 10 as in [HJN15] for the Robin interface conditions (5.27). In the first case we consider a random initial guess for the GMRES iterative solver. Later with the second example we use zero as an initial guess. (a) Velocity field (b) Pressure Figure 7: Numerical solution of the driven cavity problem - the driven cavity problem. Test case 3 (The driven cavity problem). The test case is the driven cavity. We consider the 13 following problem on the unit square Ω = (0, 1)2  = f   −∆u + ∇p  − ∇·u = 0 (5.30) u(x, y) = (1, 0)T    u(x, y) = (0, 0)T in Ω in Ω . on ∂Ω ∩ {y = 1} on ∂Ω \ {y = 1} In Figure 7 we plot the vector field and pressure, after solving numerically the problem. We start with the two energy modes only (see Figure 8). This already provides some improvement. Then, we add more eigenvectors to see if they bring improvement. 0.4 0.4 0.5 0.35 0.35 0.3 0.3 0.2 Eigenvalue 0.3 Eigenvalue Eigenvalue 0.4 0.25 0.2 0.15 0.25 0.2 0.15 0.1 0.1 0.05 0.05 0.1 0 0 1 2 3 4 5 6 7 8 9 10 0 1 Number of eigenvalue 2 3 4 5 6 7 8 9 10 1 Number of eigenvalue (a) Robin interface conditions (b) NVTF interface conditions 2 3 4 5 6 7 8 9 10 Number of eigenvalue (c) TVNF interface conditions Figure 8: Eigenvalues on one of the floating subdomains in case of uniform decomposition and Taylor-Hood discretisation (T Hh2 , Rh1 ) - the driven cavity problem. Table 3: Comparison of preconditioners for Taylor-Hood discretisation (T Hh2 , Rh1 ) - the driven cavity problem. DOF N 91 003 362 003 813 003 1 444 003 2 728 003 5 768 003 4 16 36 64 121 256 DOF N 91 003 362 003 813 003 1 444 003 2 728 003 5 768 003 4 16 36 64 121 256 DOF N 91 003 362 003 813 003 1 444 003 2 728 003 5 768 003 4 16 36 64 121 256 ORAS Unif MTS 12 17 28 35 39 75 53 91 80 278 >1000 >1000 SORAS Unif MTS 24 34 56 67 92 103 120 144 180 212 271 317 ORAS Unif MTS 10 14 20 25 27 33 31 42 39 103 300 849 SORAS Unif MTS 18 22 32 37 36 44 38 53 39 51 46 54 ORAS Unif MTS 9 12 16 20 23 27 26 36 35 41 66 60 SORAS Unif MTS 13 16 21 24 25 26 27 29 29 32 32 33 One-level NVTF-MRAS NVTF-SMRAS Unif MTS Unif MTS 22 22 34 40 52 53 90 106 85 91 165 185 120 135 254 283 182 280 412 580 303 452 917 955 Two-level (2 eigenvectors) NVTF-MRAS NVTF-SMRAS Unif MTS Unif MTS 19 17 26 30 33 34 50 62 47 49 62 86 104 66 85 114 74 81 85 133 109 108 146 132 Two-level (5 eigenvectors) NVTF-MRAS NVTF-SMRAS Unif MTS Unif MTS 16 15 18 20 27 22 28 37 33 30 39 40 40 34 35 45 43 38 34 48 56 41 60 49 TVNF-MRAS Unif MTS 22 25 54 53 91 88 132 132 199 213 322 319 TVNF-SMRAS Unif MTS 30 40 70 84 118 136 169 206 251 439 397 695 TVNF-MRAS Unif MTS 27 20 60 40 79 53 85 52 92 86 91 78 TVNF-SMRAS Unif MTS 21 26 42 51 59 63 62 79 62 93 63 90 TVNF-MRAS Unif MTS 25 20 56 37 65 41 77 45 84 72 88 61 TVNF-SMRAS Unif MTS 16 18 26 35 28 37 28 42 29 47 29 44 The conclusions remain the same as for the L-shaped domain problem for the nearly incompressible elasticity equation discretised by Taylor-Hood method (T Hh3 , Rh2 ) since Tables 3 and 1 show similar results. 14 Test case 4 (The T-shaped domain problem). Finally, we consider a T-shaped domain Ω = (0, 1.5) × (0, 1) ∪ (0.5, 1) × (−1, 1), and we impose mixed boundary conditions given by  (4y(1 − y), 0)T if x = 0 or x = 1.5 (5.31) u(x, y) = (0, 0)T otherwise. The numerical solution of this problem is depicted in Figure 9. The overlapping decomposition (a) Velocity field u (b) Pressure p Figure 9: Numerical solution - the T-shaped problem. into subdomains is generated by METIS. Once again a clustering of small eigenvalues of generalised eigenvalue problem defined in (4.24) is a motivation of the size of the coarse space (see Figure 10). 0.45 0.25 0.3 0.25 0.2 0.15 Eigenvalue 0.25 Eigenvalue Eigenvalue 0.3 0.3 0.4 0.35 0.2 0.15 0.2 0.15 0.1 0.1 0.05 0.05 0.1 0.05 0 0 1 2 3 4 5 6 7 8 9 10 Number of eigenvalue (a) Robin interface conditions 0 1 2 3 4 5 6 7 8 9 10 Number of eigenvalue (b) NVTF interface conditions 1 2 3 4 5 6 7 8 9 10 Number of eigenvalue (c) TVNF interface conditions Figure 10: Eigenvalues on one of the floating subdomains in case of METIS decomposition and Taylor-Hood discretisation (T Hh3 , Rh2 ) - the T-shaped problem. The same as in all examples for Taylor-Hood discretisation we notice an important improvement of the convergence when using two-level methods. Although from Table 4 we can see that the coarse spaces containing five eigenvectors seem to be sufficient. 15 Table 4: Comparison of preconditioners for Taylor-Hood discretisation (T Hh3 , Rh2 ) - the T-shaped problem. DOF 33 269 138 316 269 567 553 103 1 134 314 2 201 908 N 4 16 32 64 128 256 ORAS 13 36 59 92 146 232 SORAS 20 51 85 132 208 328 DOF 33 269 138 316 269 567 553 103 1 134 314 2 201 908 N 4 16 32 64 128 256 ORAS 10 21 29 35 42 47 SORAS 14 27 35 45 52 56 DOF 33 269 138 316 269 567 553 103 1 134 314 2 201 908 N 4 16 32 64 128 256 ORAS 8 15 14 16 17 16 SORAS 13 16 19 20 22 21 5.2 One-level NVTF-MRAS NVTF-SMRAS TVNF-MRAS 12 19 13 33 52 31 52 85 49 83 136 78 132 223 117 209 357 189 Two-level (2 eigenvectors) NVTF-MRAS NVTF-SMRAS TVNF-MRAS 9 15 12 19 24 22 30 38 25 34 43 33 47 58 34 69 76 38 Two-level (5 eigenvectors) NVTF-MRAS NVTF-SMRAS TVNF-MRAS 8 13 12 14 16 20 20 22 24 18 19 29 23 24 30 34 37 35 TVNF-SMRAS 19 45 75 115 188 293 TVNF-SMRAS 15 24 30 35 41 45 TVNF-SMRAS 14 18 19 20 22 24 hdG discretisation In this section we discretise nearly incompressible elasticity equation and the Stokes flow by using the lowest order hdG discretisation introduced in Section 3.2. 5.2.1 Nearly incompressible elasticity In case of ORAS and SORAS we consider the Robin interface conditions as in [HJN15] with α = 10. For all numerical experiments in this section we use zero as an initial guess for the GMRES iterative solver. Moreover, the overlapping decomposition into subdomains is generated by METIS. Test case 5 (The L-shaped domain problem). We consider the L-shaped domain discrete problem (5.28). Table 5 shows an important improvement of the convergence that is brought by the twolevel methods. We cannot conclude that SMRAS preconditioners are much better than SORAS. Although we can note that coarse space improvement is visible for MRAS preconditioners and not for ORAS. For symmetric preconditioners (SMRAS and SORAS) five eigenvectors seem to lead already to satisfying results. While for the non-symmetric ones a bigger coarse space is required. On the other hand, we state the fact that the new preconditioners are parameter-free, which makes them easier to use as no parameter is required. 16 Table 5: Comparison of preconditioners for hdG discretisation - the L-shaped domain problem. DOF 238 692 466 094 948 921 1 874 514 3 856 425 N 8 16 32 64 128 ORAS 61 123 267 622 >1000 SORAS 158 232 331 477 752 DOF 238 692 466 094 948 921 1 874 514 3 856 425 N 8 16 32 64 128 ORAS 48 89 250 535 >1000 SORAS 98 99 130 135 152 DOF 238 692 466 094 948 921 1 874 514 3 856 425 N 8 16 32 64 128 ORAS 43 77 197 429 >1000 SORAS 81 82 100 103 118 DOF 238 692 466 094 948 921 1 874 514 3 856 425 N 8 16 32 64 128 ORAS 35 61 153 423 934 SORAS 67 79 90 95 110 One-level NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 64 174 77 101 259 109 160 415 179 243 685 254 479 >1000 523 Two-level (3 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 52 98 61 71 123 75 110 158 118 135 155 129 172 176 181 Two-level (5 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 44 74 61 51 92 63 79 119 96 102 122 110 122 129 141 Two-level (7 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 38 71 44 47 80 51 58 95 74 71 93 72 79 104 108 TDNNS-SMRAS 177 306 473 657 >1000 TDNNS-SMRAS 116 148 173 159 192 TDNNS-SMRAS 94 103 121 138 167 TDNNS-SMRAS 82 95 115 111 133 Test case 6 (The heterogeneous beam problem). We consider the heterogeneous beam with ten layers of steel and rubber that is defined as a problem (5.29). Table 6: Comparison of preconditioners for hdG discretisation - the heterogeneous beam. DOF 46 777 88 720 179 721 353 440 704 329 1 410 880 N 8 16 32 64 128 256 ORAS 196 317 537 899 >1000 >1000 SORAS 440 602 >1000 >1000 >1000 >1000 DOF 46 777 88 720 179 721 353 440 704 329 1 410 880 N 8 16 32 64 128 256 ORAS 168 244 385 514 835 >1000 SORAS 255 313 525 444 557 567 DOF 46 777 88 720 179 721 353 440 704 329 1 410 880 N 8 16 32 64 128 256 ORAS 148 205 318 403 490 >1000 SORAS 197 201 337 262 168 116 One-level NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 189 402 186 330 582 326 574 >1000 587 847 >1000 846 >1000 >1000 >1000 >1000 >1000 >1000 Two-level (5 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 162 230 161 273 299 262 442 458 469 551 526 590 782 684 765 >1000 694 844 Two-level (7 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 149 192 158 286 187 283 385 301 433 397 247 460 447 182 558 387 138 473 TDNNS-SMRAS 463 666 >1000 >1000 >1000 >1000 TDNNS-SMRAS 275 346 587 558 832 821 TDNNS-SMRAS 231 273 419 389 443 298 We notice an improvement only when using a coarse space which is sufficiently big (see Table 6). 17 Furthermore, we get a stable number of iterations only for the symmetric preconditioners (SMRAS and SORAS), and the coarse space improvement in case of ORAS preconditioner is much less visible than in case of MRAS preconditioners. This may be due to the fact we have not chosen an optimized parameter in the Robin interface conditions (5.27). 5.2.2 Stokes equation We now turn to the Stokes discrete problem given in 3.2. Once again in case of ORAS and SORAS we choose α = 10 as in [HJN15] for the Robin interface conditions (5.27). In the first case we consider a random initial guess for the GMRES iterative solver. Later with the second example we use zero as an initial guess. Test case 7 (The driven cavity problem). We consider the driven cavity defined as a problem (5.30). Table 7: Comparison of preconditioners for hdG discretisation - the driven cavity problem. DOF N 93 656 373 520 839 592 1 491 872 2 819 432 5 963 072 4 16 36 64 121 256 DOF N 93 656 373 520 839 592 1 491 872 2 819 432 5 963 072 4 16 36 64 121 256 DOF N 93 656 373 520 839 592 1 491 872 2 819 432 5 963 072 4 16 36 64 121 256 ORAS Unif MTS 17 18 76 122 152 327 261 587 364 >1000 592 >1000 SORAS Unif MTS 37 38 75 84 120 133 162 176 229 256 367 398 ORAS Unif MTS 12 14 81 80 236 228 395 463 840 >1000 >1000 >1000 SORAS Unif MTS 30 28 47 57 61 60 67 71 73 86 80 87 ORAS Unif MTS 10 12 27 35 135 84 278 212 607 584 >1000 >1000 SORAS Unif MTS 25 24 38 37 45 41 49 45 56 49 62 55 One-level NVTF-MRAS NVTF-SMRAS Unif MTS Unif MTS 24 22 44 44 52 54 107 111 91 96 194 200 130 143 294 303 199 213 504 649 326 477 >1000 >1000 Two-level (2 eigenvectors) NVTF-MRAS NVTF-SMRAS Unif MTS Unif MTS 18 18 33 32 36 40 61 73 57 65 97 104 79 85 139 129 113 127 188 178 171 179 283 287 Two-level (5 eigenvectors) NVTF-MRAS NVTF-SMRAS Unif MTS Unif MTS 14 16 23 22 27 29 38 41 35 37 51 50 44 42 58 55 46 56 58 62 52 64 57 69 TVNF-MRAS Unif MTS 32 25 68 67 112 115 159 158 238 251 392 404 TVNF-SMRAS Unif MTS 48 50 122 126 206 210 292 286 628 643 995 740 TVNF-MRAS Unif MTS 40 23 100 49 132 66 142 70 157 86 167 108 TVNF-SMRAS Unif MTS 38 37 85 82 112 107 128 122 127 139 132 148 TVNF-MRAS Unif MTS 52 22 117 39 145 49 157 59 162 81 166 75 TVNF-SMRAS Unif MTS 29 26 53 53 64 61 64 64 65 75 65 75 The conclusions remain the same as in the case of nearly incompressible elasticity equation for the L-shaped domain. Although Table 7 shows that coarse spaces containing five eigenvectors seem to decrease the number of iteration even in the case of MRAS preconditioners that are not fully scalable. Test case 8 (The T-shaped domain problem). Finally, we consider a T-shaped domain Ω = (0, 1.5)×(0, 1)∪(0.5, 1)×(−1, 1), and we impose mixed boundary conditions (5.31). The numerical solution of this problem is depicted in Figure 9. In this case scalable results can be only observed for the preconditioners associated with the non standard interface conditions (MRAS and SMRAS), and when using a coarse space which is sufficiently big (see Table 8). In the case of ORAS or SORAS, one possibility is to choose a different parameter α, but the proof of this, and even the question of whether this would have a positive impact, are open problems. 18 Table 8: Comparison of preconditioners for hdG discretisation - the T-shaped problem. DOF 38 803 154 606 311 369 616 772 1 246 136 2 451 365 N 4 16 32 64 128 256 ORAS 22 111 265 568 >1000 >1000 SORAS 45 98 144 238 494 712 DOF 38 803 154 606 311 369 616 772 1 246 136 2 451 365 N 4 16 32 64 128 256 ORAS 16 113 254 510 >1000 >1000 SORAS 35 69 99 153 221 286 DOF 38 803 154 606 311 369 616 772 1 246 136 2 451 365 N 4 16 32 64 128 256 ORAS 14 155 159 426 955 >1000 SORAS 30 54 55 88 113 182 6 One-level NVTF-MRAS NVTF-SMRAS TVNF-MRAS 36 49 22 83 172 83 133 262 130 212 410 195 333 665 313 464 >1000 477 Two-level (2 eigenvectors) NVTF-MRAS NVTF-SMRAS TVNF-MRAS 31 37 21 73 75 38 103 176 93 171 273 121 242 252 155 343 515 189 Two-level (5 eigenvectors) NVTF-MRAS NVTF-SMRAS TVNF-MRAS 27 27 28 54 45 25 72 59 29 106 83 37 115 99 43 138 101 54 TVNF-SMRAS 51 182 266 412 602 889 TVNF-SMRAS 38 75 162 140 138 231 TVNF-SMRAS 30 44 52 76 72 73 Numerical results for three dimensional problems In this section we again assess the performance of the preconditioners as in Section 5, but this time in case of three dimensional problems. We consider the partial differential equation model for nearly incompressible elasticity and Stokes flow as three dimensional problems of similar mixed formulation. Each of these problems is discretised by using the Taylor-Hood methods from Section 3.1. In addition, we use the same tools as in Section 5. For both test cases we use zero as an initial guess. 6.1 Taylor-Hood discretisation In this section we consider the Taylor-Hood discretisation from Section 3.1 with k = 2 for nearly incompressible elasticity and Stokes equations. 6.1.1 Nearly incompressible elasticity In three dimensional space, ORAS and SORAS preconditioners also require an optimized parameter. We follow [HJN15] and use Robin interface conditions (5.27) with α = 10. Test case 9 (The homogeneous beam problem). We consider a homogeneous beam with the physical parameters E = 108 and ν = 0.4999. The computational domain is the rectangle Ω = (0, 5) × (0, 1) × (0, 1). The beam is clamped on one side, hence we consider the following problem  −2µ∇ · ε(u) + ∇p = (0, 0, −1)T in Ω    in Ω − ∇·u = λ1 p . (6.32) u(x, y) = (0, 0, 0)T on ∂Ω ∩ {x = 0}    T σ sym on ∂Ω \ {x = 0} n (x, y) = (0, 0, 0) The results of Table 9 show a clear improvement in the scalability of the two-level preconditioners over the one-level ones. In fact, using only zero energy modes, the number of iterations 19 Table 9: Comparison of preconditioners for Taylor-Hood discretisation (T Hh2 , Rh1 ) - the homogeneous beam. DOF 32 446 73 548 139 794 299 433 549 396 N 8 16 32 64 128 ORAS 21 31 43 55 78 SORAS 45 70 99 143 192 DOF 32 446 73 548 139 794 299 433 549 396 N 8 16 32 64 128 ORAS 10 11 13 15 17 SORAS 17 22 26 27 28 DOF 32 446 73 548 139 794 299 433 549 396 N 8 16 32 64 128 ORAS 9 10 11 14 16 SORAS 16 19 21 24 27 One-level NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 29 36 27 38 64 26 74 94 66 161 140 149 314 192 229 Two-level (6 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 13 18 12 16 25 16 25 28 17 19 27 24 20 25 21 Two-level (8 eigenvectors) NDTNS-MRAS NDTNS-SMRAS TDNNS-MRAS 12 17 12 15 24 14 17 23 17 17 24 21 18 23 20 TDNNS-SMRAS 37 67 91 139 199 TDNNS-SMRAS 17 22 26 28 26 TDNNS-SMRAS 16 20 21 23 22 is virtually unaffected by the number of subdomains. All two-level preconditioners show a comparable performance. For this case, increasing the dimension of the coarse space beyond 6 × N eigenvectors does not seem to improve the results dramatically. 6.1.2 Stokes equation We now turn to the Stokes discrete problem given in 3.1. Once again in case of ORAS and SORAS we choose α = 10 as in [HJN15] for the Robin interface conditions (5.27). Test case 10 (The driven cavity problem). The test case is the three-dimensional version of the driven cavity problem. We consider the following problem on the unit cube Ω = (0, 1)3  = f in Ω   −∆u + ∇p  − ∇·u = 0 in Ω (6.33) . T u(x, y) = (1, 0, 0) on ∂Ω ∩ {y = 1}    u(x, y) = (0, 0, 0)T on ∂Ω \ {y = 1} The conclusions remain the same as for the homogeneous beam example for the nearly incompressible elasticity equation discretised by Taylor-Hood method (T Hh3 , Rh2 ) since Tables 10 and 9 show similar results. 20 Table 10: Comparison of preconditioners for Taylor-Hood discretisation (T Hh2 , Rh1 ) - the driven cavity problem. DOF 38 229 76 542 158 818 325 293 643 137 N 8 16 32 64 128 ORAS 12 18 23 28 37 SORAS 24 34 45 60 79 DOF 38 229 76 542 158 818 325 293 643 137 N 8 16 32 64 128 ORAS 10 11 13 15 18 SORAS 17 20 24 27 31 DOF 38 229 76 542 158 818 325 293 643 137 N 8 16 32 64 128 ORAS 9 10 11 13 15 SORAS 16 17 19 19 21 7 One-level NVTF-MRAS NVTF-SMRAS TVNF-MRAS 12 22 11 18 31 15 20 45 19 36 64 25 64 91 33 Two-level (3 eigenvectors) NVTF-MRAS NVTF-SMRAS TVNF-MRAS 10 18 11 11 19 14 13 24 16 15 27 19 17 32 22 Two-level (7 eigenvectors) NVTF-MRAS NVTF-SMRAS TVNF-MRAS 9 16 12 10 18 15 11 20 17 13 21 20 16 22 22 TVNF-SMRAS 23 31 45 60 88 TVNF-SMRAS 18 19 23 26 31 TVNF-SMRAS 17 17 20 20 22 Conclusion We tested numerically two-level preconditioners with spectral coarse spaces for nearly incompressible elasticity and Stokes equations. We considered two finite element methods, namely, Taylor-Hood (Section 3.1) and the hdG (Section 3.2) discretisations. In the case of the homogeneous nearly incompressible elasticity the two-level methods coupled with SORAS preconditioner defined in [HJN15] and SMRAS preconditioner defined by (4.23) allowed us to achieve good scalability results for both discretisations. Furthermore, for these symmetric preconditioners coarse spaces containing only zero energy modes seem to be enough for two and three dimensional problems. For the heterogeneous problem we also achieved scalability for two-level SORAS and SMRAS preconditioners, but, as expected, only in the case when the size of the coarse space is sufficiently big. The improvement of the convergence in the case of the Stokes flow is visible only when the coarse space contains more eigenvectors than only constants. For the Taylor-Hood discretisation, taking sufficient big coarse space we were able to achieve good scalability for all preconditioners. It is remarkable that these good results occur even when using the hdG discretisation, despite the fact the optimized parameter to be used in SORAS and ORAS is not available. We can conclude that the two-level preconditioners associated with non standard interface conditions are at least as good as the two-level ones in conjunction with Robin interface conditions using optimised parameters. It shows an important advantage of newly introduced preconditioners as they are parameter-free. Numerical tests have shown that the coarse spaces bring an important improvement in the convergence, but the size of the coarse space depends on the problem. Building as small as possible coarse spaces is important from computational point of view. Thus, it is necessary to investigate what could be an optimal criterion for choosing the eigenvectors for a coarse space. As we mentioned before, the theoretical foundation of the two-level preconditioners has not been extended to saddle point problems. Hence, future research will be devoted to this topic. 21 Acknowledgements This research was supported supported by the Centre for Numerical Analysis and Intelligent Software (NAIS). We thank Frédéric Nataf and Pierre-Henri Tournier for many helpful discussions and insightful comments, and Ryadh Haferssas and Frédéric Hecht for their assistance with the FreeFem++ codes. References [AdDBM+ 14] B. Ayuso de Dios, F. Brezzi, L. D. Marini, J. Xu, and L. Zikatanov. A simple preconditioner for a discontinuous Galerkin method for the Stokes problem. Journal of Scientific Computing, 58(3):517–547, 2014. [BBD+ 16] G. R Barrenechea, M. Bosy, V. Dolean, F. Nataf, and P.-H. Tournier. Hybrid discontinuous Galerkin discretisation and preconditioning of the Stokes problem with non standard boundary conditions. preprint, https://arxiv.org/abs/1610.09207, October 2016. [BBF13] D. Boffi, F. Brezzi, and M. Fortin. Mixed finite element methods and applications, volume 44 of Springer Series in Computational Mathematics. Springer, Heidelberg, 2013. [BHMV99] M. Brezina, C. I Heberton, J. Mandel, and P. Vanek. An iterative method with convergence rate chosen a priori, ucd/ccm report 140. Technical report, Center for Computational Mathematics, University of Colorado at Denver, 1999. [CDKN14] L. Conen, V. Dolean, R. Krause, and F. Nataf. A coarse space for heterogeneous Helmholtz problems based on the Dirichlet-to-Neumann operator. J. Comput. Appl. Math., 271:83–99, 2014. [CG09] B. Cockburn and J. Gopalakrishnan. The derivation of hybridizable discontinuous Galerkin methods for Stokes flow. SIAM J. Numer. Anal., 47(2):1092–1125, 2009. [CGL09] B. Cockburn, J. Gopalakrishnan, and R. Lazarov. Unified hybridization of discontinuous Galerkin, mixed, and continuous Galerkin methods for second order elliptic problems. SIAM J. Numer. Anal., 47(2):1319–1365, 2009. [CS15] C. Carstensen and M. Schedensack. Medius analysis and comparison results for firstorder finite element methods in linear elasticity. IMA J. Numer. Anal., 35(4):1591– 1621, 2015. [DJN15] V. Dolean, P. Jolivet, and F. Nataf. An introduction to domain decomposition methods. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2015. Algorithms, theory, and parallel implementation. [DNSS12] V. Dolean, F. Nataf, R. Scheichl, and N. Spillane. Analysis of a two-level Schwarz method with coarse spaces based on local Dirichlet-to-Neumann maps. Comput. Methods Appl. Math., 12(4):391–414, 2012. [EGLW12] Y. Efendiev, J. Galvis, R. Lazarov, and J. Willems. Robust domain decomposition preconditioners for abstract symmetric positive definite bilinear forms. ESAIM Math. Model. Numer. Anal., 46(5):1175–1199, 2012. [GE10a] J. Galvis and Y. Efendiev. Domain decomposition preconditioners for multiscale flows in high-contrast media. Multiscale Model. Simul., 8(4):1461–1483, 2010. [GE10b] J. Galvis and Y. Efendiev. Domain decomposition preconditioners for multiscale flows in high contrast media: reduced dimension coarse spaces. Multiscale Model. Simul., 8(5):1621–1644, 2010. [GR86] V. Girault and P. A. Raviart. Finite element methods for Navier-Stokes equations, volume 5 of Springer Series in Computational Mathematics. Springer-Verlag, Berlin, 1986. Theory and algorithms. [Hec12] F. Hecht. New development in FreeFem++. J. Numer. Math., 20(3-4):251–265, 2012. [HJN15] R. Haferssas, P. Jolivet, and F. Nataf. An additive Schwarz method type theory for Lions’ algorithm and Optimized Schwarz Methods. preprint, https://hal.archives-ouvertes.fr/hal-01278347, December 2015. [KK98] G. Karypis and V. Kumar. A software package for partitioning unstructured graphs, partitioning meshes, and computing fill-reducing orderings of sparse matrices. Technical report, University of Minnesota, Department of Computer Science and Engineering, Army HPC Research Center, Minneapolis, MN, 1998. [LNS15] Sébastien Loisel, Hieu Nguyen, and Robert Scheichl. Optimized Schwarz and 2Lagrange multiplier methods for multiscale elliptic PDEs. SIAM J. Sci. Comput., 37(6):A2896–A2923, 2015. [LSY98] R. B. Lehoucq, D. C. Sorensen, and C. Yang. ARPACK users’ guide, volume 6 of Software, Environments, and Tools. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 1998. Solution of large-scale eigenvalue problems with implicitly restarted Arnoldi methods. [Nic87] R. A. Nicolaides. Deflation of conjugate gradients with applications to boundary value problems. SIAM J. Numer. Anal., 24(2):355–365, 1987. [NXD10] F. Nataf, H. Xiang, and V. Dolean. A two level domain decomposition preconditioner based on local Dirichlet-to-Neumann maps. C. R. Math. Acad. Sci. Paris, 348(21-22):1163–1167, 2010. [PS11] A. Pechstein and J. Schöberl. Tangential-displacement and normal-normal-stress continuous mixed finite elements for elasticity. Math. Models Methods Appl. Sci., 21(8):1761–1782, 2011. [SDH+ 14] N. Spillane, V. Dolean, P. Hauret, F. Nataf, C. Pechstein, and R. Scheichl. Abstract robust coarse spaces for systems of PDEs via generalized eigenproblems in the overlaps. Numer. Math., 126(4):741–770, 2014. [SS86] Y. Saad and M. H. Schultz. GMRES: a Generalized Minimal Residual algorithm for solving nonsymmetric linear systems. SIAM J. Sci. Statist. Comput., 7(3):856–869, 1986. [TW05] A. Toselli and O. Widlund. Domain Decomposition Methods - Algorithms and Theory, volume 34 of Springer Series in Computational Mathematics. Springer, 2005. 23
5cs.CE
Pseudorandom number generator based on the Bernoulli map on cubic algebraic integers Asaki Saito1, ∗ and Akihiro Yamaguchi2 arXiv:1706.08472v1 [math.NT] 20 Jun 2017 1 Future University Hakodate, 116-2 Kamedanakano-cho, Hakodate, Hokkaido 041-8655, Japan 2 Fukuoka Institute of Technology, 3-30-1 Wajiro-higashi, Higashi-ku, Fukuoka 811-0295, Japan (Dated: June 27, 2017) Abstract We develop a method for generating pseudorandom binary sequences using the Bernoulli map on cubic algebraic integers. The distinguishing characteristic of our generator is that it generates chaotic true orbits of the Bernoulli map by exact computation. In particular, we clarify a way to properly prepare a set of initial points (i.e., seeds), which is needed when generating multiple pseudorandom sequences. With this seed selection method, we can distribute the initial points almost uniformly in the unit interval and can also guarantee that the orbits starting from them do not merge. We also report results of a large variety of tests indicating that the generated pseudorandom sequences have good statistical properties as well as an advantage over what is probably the most popular generator, the Mersenne Twister MT19937. PACS numbers: 05.45.-a ∗ Electronic address: [email protected] 1 I. INTRODUCTION A random sequence is a sequence of numbers that are a typical sample of independently identically distributed random variables, and it cannot be generated by a deterministic algorithm (cf., e.g., Refs. [1, 2]). A pseudorandom sequence, i.e., a computer-generated sequence that appears similar to a random one, is therefore not random at all, but has a wide range of applications, such as Monte Carlo methods, probabilistic algorithms, and cryptography [3]. In order to generate such pseudorandom sequences, various pseudorandom number generators have been proposed, including linear congruential generators [4], linear feedback shift registers [5], and the Mersenne Twister [6]. Of all the generators, MT19937 [6], a version of the Mersenne Twister, is probably the most popular one at this time. MT19937 can produce, at very high speed, a pseudorandom sequence having an “astronomically” long period of length 219937 − 1 and having a high-dimensional (623-dimensional) equidistribution property, which makes the generator very useful, especially for Monte Carlo simulations. Even if a generator has these remarkable properties, however, there is no guarantee that independence, which is the greatest characteristic of random sequences, is preferable (cf. Sec. IV B). In this paper, we deal with the issue of how we generate pseudorandom sequences having the best possible statistical properties even if such generation increases the computational cost to some extent. Among random sequences, the most fundamental ones are (uniform) random binary sequences. One of the mathematically simplest and soundest ways to generate (pseudo-) random binary sequences is to use the Bernoulli map. Also known as the doubling map, the dyadic map, or the 2x modulo 1 map, the Bernoulli map is a map on the half-open unit interval [0, 1) given by MB (x) =   2x if x ∈ [0, 1/2)  2x − 1 if x ∈ [1/2, 1) . Note that the repeated tossing of a fair coin is modeled by the one-sided Bernoulli shift on {0, 1}N with 0 and 1 having equal weight 1/2, and this Bernoulli shift is measure-theoretically isomorphic to MB (cf., e.g., Ref. [7]). Thus, MB can produce binary sequences equivalent to those obtained by tossing a fair coin. However, it is well known that one cannot simulate MB with conventional simulation methods such as those using double-precision binary floatingpoint numbers or arbitrary-precision rational numbers (see, e.g., Refs. [8, 9]). This is because, 2 for MB , finite binary decimals on [0, 1) are eventually fixed points (i.e., points that reach the fixed point at x = 0 after finitely many iterations) and because rational numbers on [0, 1) are eventually periodic points (i.e., points that reach a periodic point after finitely many iterations). For this reason, a computational method that realizes pseudorandom number generation using MB has not been proposed [10] (except for our previous study [11]), although pseudorandom number generators based on chaotic dynamics have been very widely studied for many decades [12–14]. On the other hand, orbit computations using algebraic numbers other than rational ones have been performed in the fields of number theory and arithmetic dynamics (e.g., Refs. [15– 19]). Also, by using our methods to achieve exact simulations of piecewise linear and linear fractional maps [20, 21], one can generate errorless true orbits displaying the same statistical properties as typical orbits of MB (as well as those of the tent map and the baker’s transformation; cf. [10]). In particular, by using true orbits on quadratic algebraic integers, we succeeded in realizing a pseudorandom number generator using MB [11]. To our knowledge, the generator of Ref. [11] is the only one that has a direct connection to the repeated tossing of a fair coin, but we can expect that we can establish such generators having good statistical properties also by using algebraic integers of degree three or more. In order to realize such generators, however, we particularly need to resolve the issue described below. When proposing a pseudorandom number generator, it is desirable to simultaneously disclose how one can properly perform seed selection, especially in the case where one needs multiple seeds to generate more than one pseudorandom sequence. In particular, such a method for selecting initial points (i.e., seeds) is indispensable for a generator based on true orbits: In true orbit computations, the longer a true orbit, the higher the computational cost of generating it. Therefore, the computational cost can be markedly lowered by generating a number of relatively short true orbits. We could establish such a seed selection method in the case of quadratic algebraic integers, but algebraic numbers of different degrees are quite distinct from each other, and it is unclear even whether such a seed selection method exists in the case of algebraic integers of degree three or more. In this paper, we realize a pseudorandom number generator using chaotic true orbits of the Bernoulli map on cubic algebraic integers. We also devise, for the cubic case, a seed selection method for generating multiple pseudorandom binary sequences. Moreover, we demonstrate the ability of our generator by performing two kinds of computer experiments: 3 extensive statistical testing and a comparison with MT19937. II. PROPOSED PSEUDORANDOM NUMBER GENERATOR In this study, we use cubic algebraic integers to simulate the Bernoulli map MB . A cubic algebraic integer is a complex number that is a root of a monic irreducible cubic polynomial x3 + bx2 + cx + d with b, c, d ∈ Z (see, e.g., Ref. [22] for a detailed explanation of algebraic integers). MB maps any cubic algebraic integer in the open unit interval (0, 1) to a cubic algebraic integer in (0, 1). Let us introduce two sets, S̄ and S, and a map π from S̄ to S. Let S̄ be the set of all (b, c, d) ∈ Z3 satisfying the following three conditions: (i) b2 − 3c ≤ 0 (ii) d < 0 (iii) 1 + b + c + d > 0 Figure 1 shows part of S̄. If we consider a function f : R → R, given by f (x) = x3 + bx2 + cx + d with (b, c, d) ∈ S̄, we see from (i) that f is strictly monotonically increasing. Thus, f has a unique real root, denoted by α. We also see from (ii) and (iii) that f (0) < 0 and f (1) > 0, which implies α ∈ (0, 1). Since α ∈ / Z, we see that α is a cubic algebraic integer. Also, let S be the set of all cubic algebraic integers in (0, 1) that are roots of x3 + bx2 + cx + d with (b, c, d) ∈ S̄. We can define a map π from S̄ to S by assigning each (b, c, d) ∈ S̄ the unique real root α ∈ S of x3 + bx2 + cx + d. It is easy to see that π : S̄ → S is a bijection. In the following, we represent α ∈ S with (b, c, d) = π −1 (α) ∈ S̄. MB maps α ∈ S to α′ = 2α mod 1. As already mentioned, α′ is a cubic algebraic integer in (0, 1). Moreover, we can see α′ ∈ S as follows. Let (b, c, d) be the representation of α, and let x3 + b′ x2 + c′ x + d′ be the minimal polynomial of α′ . Then, the coefficients b′ , c′ , d′ are given as follows: If α ∈ (0, 1/2),  ′     b 2 0 0 b          ′  c  =  0 4 0  c .      d 0 0 8 d′ 4 (1a) 10 5c 0 5 -15 -10 d -5 0 b 0 -5 FIG. 1: Part of S̄. The dots represent elements of S̄. If α ∈ (1/2, 1),   3 b 2 0 0 b              ′  c  =  4 4 0  c +  3 .        1 d 2 4 8 d′  ′     (1b) Equation (1a) (resp. Eq. (1b)) is obtained by substituting α = α′ /2 (resp. α = (α′ + 1)/2) into x3 + bx2 + cx + d = 0. It is easy to confirm that (b′ , c′ , d′ ) satisfies the conditions (i), (ii), and (iii), which implies α′ ∈ S. Equation (1) gives the explicit form of π −1 ◦ MB ◦ π, i.e., the transformation on S̄ corre- sponding to MB . We denote this transformation by M̄B . Note that M̄B gives the representation (b′ , c′ , d′) of α′ from the representation (b, c, d) of α. This transformation is exactly computable by using only integer arithmetic. Incidentally, we see easily that (b, c, d) with b2 − 3c < 0 is mapped to (b′ , c′ , d′ ) with b′2 − 3c′ < 0, and that (b, c, d) with b2 − 3c = 0 is mapped to (b′ , c′ , d′ ) with b′2 − 3c′ = 0. One has to exactly determine whether a given α ∈ S is in (0, 1/2) or (1/2, 1) in order to generate true orbits of MB on S, thereby obtaining pseudorandom binary sequences. Let α be represented by (b, c, d) ∈ S̄, and let f (x) = x3 + bx2 + cx + d. This determination can be made easily by evaluating the sign of f (1/2). In fact, if f (1/2) > 0, then α ∈ (0, 1/2); otherwise, i.e., if f (1/2) < 0, then α ∈ (1/2, 1). To evaluate the sign of f (1/2), it is sufficient to evaluate that of 1 + 2b + 4c + 8d. Therefore, one can exactly determine whether α ∈ (0, 1/2) or not by using only integer arithmetic. Consequently, one can generate a true orbit 5 {(bn , cn , dn )}n=0,1,2,··· of M̄B starting from an initial point (b0 , c0 , d0 ) ∈ S̄, where (bn , cn , dn ) = M̄Bn (b0 , c0 , d0 ). In order to obtain a pseudorandom binary sequence {ǫn }n=0,1,2,···, all one has to do is let ǫn = 0 if 1 + 2bn + 4cn + 8dn > 0 and ǫn = 1 if 1 + 2bn + 4cn + 8dn < 0, in the course of generating a true orbit. III. SEED SELECTION METHOD In this section, we consider how to select initial points (i.e., seeds). Because α represented by (b, c, d) ∈ S̄ is irrational, its binary expansion is guaranteed to be nonperiodic. Thus, one can choose any (b, c, d) ∈ S̄ as an initial point in the sense that at least one obtains a nonperiodic binary sequence. It is worth noting that the binary sequence obtained from (b, c, d) ∈ S̄ is not only guaranteed to be nonperiodic. In fact, it is widely believed that every irrational algebraic number is a normal number (Borel’s conjecture [23]). Recall that α ∈ R is said to be normal if, for any integer b ≥ 2, every word of length l ≥ 1 on the alphabet {0, 1, . . . , b − 1} occurs in the base-b expansion of α with asymptotic frequency b−l . Also, it is proved that the base-b expansion of any irrational algebraic number cannot have a regularity so simple that it can be generated by a finite automaton [24]. Moreover, our previous studies strongly suggest that the base-b expansion of any irrational algebraic number has the same statistical properties as those of almost all real numbers [11, 20, 21]. For the generation of more than one pseudorandom sequence, it is necessary to prepare an initial point set I¯ ⊂ S̄. One can consider a variety of conditions that I¯ should satisfy; here, we impose the following two conditions (Conditions 1 and 2) on it. Condition 1. The elements of I ⊂ S corresponding to I¯ are uniformly distributed in the unit interval. This condition is for unbiased sampling of initial points and is a natural one also from the viewpoint of applications, such as the Monte Carlo method. However, it is a nontrivial question as to how we can construct I¯ satisfying Condition 1, because α depends on (b, c, d) in a very complicated way. In fact, α takes the following complex form: 6 If b2 − 3c < 0, p √ √ 3 −2b3 + 9bc − 27d + 3 3 −b2 c2 + 4c3 + 4b3 d − 18bcd + 27d2 √ α = 332 √ 3 2 (−b2 + 3c) b p − 3 − . √ √ 3 −2b3 + 9bc − 27d + 3 3 −b2 c2 + 4c3 + 4b3 d − 18bcd + 27d2 3 If b2 − 3c = 0, α = √ 3 −2b3 + 9bc − 27d b − . 3 3 Condition 2. The orbits starting from the elements of I¯ do not merge. Even if one selects two different points as the elements of S̄, the latter parts of the resulting binary sequences may coincide with each other. In fact, this happens if the two points are on the same orbit or, more generally, if the orbits starting from them merge. When generating multiple pseudorandom sequences, it is desirable that the binary sequences derived from I¯ are as different from each other as possible, and it is obviously desirable that I¯ satisfies ¯ we need to make it clear how we can Condition 2. However, in order to realize such an I, select the elements of I¯ while avoiding such orbital overlaps. In what follows, we show that we can construct an I¯ satisfying Conditions 1 and 2. Concerning Condition 1, the following fact holds. Fact 1. Let c be a sufficiently large positive integer, and let  I¯b,c = (b, c, d) ∈ S̄ | d ∈ {−1, −2, · · · , −(b + c)} . (3) Then, the elements of Ib,c ⊂ S corresponding to I¯b,c are distributed almost uniformly (equidistantly) in the unit interval. Proof. Since |b| ≤ √ 3c, |b| ≪ c holds for sufficiently large c. Let (b, c, d) ∈ I¯b,c , αd = π(b, c, d), and fd (x) = x3 + bx2 + cx + d. We see that f−1 (0) = −1, limc→∞ f−1 (2/c) = 1, limc→∞ f−(b+c) (1 − 2/c) = −1, and f−(b+c) (1) = 1. Thus, we have limc→∞ α−1 = 0 and limc→∞ α−(b+c) = 1. We also see easily that αd < αd−1 and fd (αd−1 ) = 1 hold for d ∈ {−1, −2, · · · , −(b + c) + 1}. Let ∆d = αd−1 − αd (d ∈ {−1, −2, · · · , −(b + c) + 1}). By the mean value theorem, there exists β ∈ (αd , αd−1 ) such that fd′ (β) = ∆−1 d . It is easy to see 7 that −2|b| + c < fd′ (x) < 3 + 2|b| + c holds for x ∈ (0, 1). Thus, for sufficiently large c, we have (3 + 2|b| + c)−1 < ∆d < (−2|b| + c)−1 , which implies  −1 −1  2|b| + 3 2|b| ∆d 1+ < −1 < 1 − . c c c We note that −x + 2 ≤ x−1 holds for x ≥ 1 and that x−1 ≤ −2x + 3 holds for 1/2 ≤ x ≤ 1. Thus, for sufficiently large c, we have 1− 2|b| + 3 ∆d 4|b| < −1 < 1 + , c c c which implies lim max c→∞ d∈{−1,··· ,−(b+c)+1} ∆d − 1 = 0. c−1 Therefore, if we take a sufficiently large c, the elements of Ib,c are distributed across the unit interval almost equidistantly, with distances approximately equal to c−1 . An important characteristic of M̄B on S̄ (or equivalently, MB on S) when considering I¯ satisfying Condition 2 is its injectivity. The inverse image of (b′ , c′ , d′ ) ∈ S̄ under M̄B is uniquely determined if it exists: If b′ (or c′ or d′ ) is even, (b′ , c′ , d′ ) is derived from Eq. (1a). If odd, it is derived from Eq. (1b). Let us call an element of S̄ a source point if it does not have an inverse image in S̄. It is clear that two different source points do not exist on the same orbit. Also, the injectivity prevents the merging of orbits starting from different source points. Concerning the source points, the following fact holds. Fact 2. There is no inverse image for (b, c, d) ∈ S̄ if and only if one of the following conditions holds: (i) b, c, d are neither all even nor all odd. (ii) b, c, d are all even, but c 6≡ 0 (mod 4) or d 6≡ 0 (mod 8). (iii) b, c, d are all odd, but −2b + c 6≡ 1 (mod 4) or b − c + d 6≡ 1 (mod 8). Proof. If (b, c, d) ∈ S̄ has an inverse image, then by Eq. (1) b, c, d are either all even or all odd. We can easily verify that a necessary and sufficient condition for (b, c, d) ∈ S̄ with b, c, d all even to have an inverse image is that both c ≡ 0 (mod 4) and d ≡ 0 (mod 8) hold. Similarly, we can verify that a necessary and sufficient condition for (b, c, d) ∈ S̄ with b, c, d all odd to have an inverse image is that both −2b + c ≡ 1 (mod 4) and b − c + d ≡ 1 (mod 8) 8 hold. Therefore, (b, c, d) ∈ S̄ has no inverse image if and only if one of the conditions (i)–(iii) holds. The orbits starting from the elements of I¯ do not merge if one lets I¯ consist of only source points. Consequently, on the basis of Facts 1 and 2, we can construct I¯ satisfying Conditions 1 and 2: The simplest way is to choose b to be an even integer and c to be a large positive odd integer, or b to be an odd integer and c to be a large positive even integer, and to let I¯ be the I¯b,c given by Eq. (3). Note, however, that consisting of only source points is not a necessary condition for I¯ to be free from orbital mergers. For example, I¯b,c with b = 0 and c = 8 contains a point that is not a source point, but mergers do not occur with I¯0,8 (cf. next paragraph). Condition 2 is equivalent to the condition that latter parts of the binary sequences derived from I¯ do not coincide, which in turn is equivalent to the condition that, even if each of the binary sequences is transformed by any multi-bit shift operation that is expressible as a map x 7→ 2n x mod 1 (n ∈ Z≥0 ), none of the resulting sequences are identical. With computer assistance, one can reveal that many, but not all, of I¯b,c have a much more desirable property than Condition 2. Namely, for many of I¯b,c , Q(α) 6= Q(β) holds for all α, β ∈ Ib,c with α 6= β (i.e., each element of Ib,c belongs to a different cubic field). In particular, we experimentally confirmed that all of Ib,c with b = 0 and c in 1 ≤ c ≤ 5 × 104 have this desirable property, which leads us to the following conjecture: Conjecture 1. Let c ∈ Z>0 . Then, Q(α) 6= Q(β) holds for all α, β ∈ I0,c with α 6= β. If Ib,c has such a property, the binary sequences derived from I¯b,c are significantly different from each other in the following sense: Even if each of the binary sequences is transformed by any operation expressible as a rational map with rational coefficients (except those mapping elements of Ib,c to rational numbers), the resulting sequences include no identical sequences. Such operations include not only multi-bit shifts, but a wide variety of operations, e.g., all-bit inversion, which is expressible as the map x 7→ 1 − x. 9 IV. A. EXPERIMENTAL RESULTS Statistical testing We evaluated our generator using three statistical test suites: DIEHARD [25], NIST statistical test suite [26], and TestU01 [27]. We summarize their results in Table I. We performed DIEHARD and NIST tests on the binary sequences of length 106 derived from I¯0,1001 . For TestU01, we prepared test data as follows: We generated the binary sequences of length 1000032 using I¯0,12000001 . We then removed the first 32 bits of each sequence and concatenated the resulting sequences in descending order of d value. We removed the first 32-bit blocks in order to avoid introducing correlations among them, because each of these blocks stores information regarding the position of the initial point. Here we briefly explain the three statistical test suites and report their results. DIEHARD [25] contains 234 statistical tests classified into 18 categories. The results for 6 of the 18 categories are further tested by checking the uniformity of the resulting P values. (That is, DIEHARD consists of 234 first-level tests and 6 second-level ones.) Using DIEHARD version “DOS, Jan 7, 1997”, we performed all 240 tests with a significance level of 0.01. As a result, 238 of the 240 tests were passed. NIST statistical test suite [26] contains 188 first-level tests. In NIST testing, each of 188 first-level tests is performed 103 times, and the results of each first-level test are further tested in two ways: (i) The proportion of passing sequences is tested using a significance level of 0.001540 (cf. Ref. [11]). (ii) The uniformity of P -values is tested using a significance level of 0.0001. For this procedure, we used version 2.1.2 of the NIST statistical test suite. As a result, 187 of the 188 second-level tests based on the proportion of passing sequences were passed. As for the second-level tests based on the uniformity of P -values, all 188 tests were passed. TestU01 [27] offers several predefined sets of tests, including SmallCrush, Crush, and BigCrush, which consist of 15, 144, and 160 tests, respectively. In TestU01, the result of each test is interpreted as clear failure if the P -value for the test is less than 10−10 or greater than 1 − 10−10 . The result is interpreted as suspicious if the P -value is in [10−10 , 10−4 ) or (1 − 10−4 , 1 − 10−10 ]. In all other cases, the test is considered as passed. Using version 1.2.3 of TestU01, we applied SmallCrush, Crush, and BigCrush to the test data described above. 10 TABLE I: Results of statistical testing. Statistical testing Number of: Tests Passed tests Suspicious tests Failed tests DIEHARD First-level tests 234 232 — 2 6 6 — 0 Second-level tests (proportion) 188 187 — 1 Second-level tests (uniformity) 188 188 — 0 SmallCrush 15 15 0 0 Crush 144 144 0 0 BigCrush 160 160 0 0 Second-level tests NIST STS TestU01 As a result, all tests of SmallCrush, Crush, and BigCrush were passed. Consequently, all tests were passed for NIST’s second-level testing based on the uniformity of P -values and TestU01’s SmallCrush, Crush, and BigCrush, while a few tests were failed for DIEHARD and NIST’s second-level testing based on the proportion of passing sequences. Note that the numbers of failed tests (i.e., two for DIEHARD and one for NIST’s second-level testing based on the proportion of passing sequences) are within relevant ranges because they are close to the expected numbers of failed tests (i.e., 2.40 for DIEHARD and 0.29 for NIST’s second-level testing based on the proportion of passing sequences). From these results, we can confirm that our generator has good statistical properties. B. Comparison with the Mersenne Twister MT19937 Here we attempt a comparison between our generator and MT19937. As described in Sec. I, MT19937 is a highly practical generator that produces, at very high speed, a pseudorandom sequence having a period of length 219937 − 1 and a 623-dimensional equidistribution property. In spite of these marked characteristics, this generator has been reported to fail linear complexity tests and birthday spacings tests with specific lags [27–29]. This is due to the fact that the generator is based on a linear recurrence over the two-element field F2 = {0, 1}. MT19937 generates a sequence of 32-bit unsigned integers. In the following, we will 11 identify a 32-bit unsigned integer with an element of F32 2 . Also, we will not distinguish between row and column vectors except in that a vector postmultiplying a matrix will be regarded as a column vector. MT19937 is one of the multiple-recursive matrix methods [30, 31], and any sequence {yn }n=0,1,2,··· in F32 2 generated by MT19937 obeys the following recurrence relation (cf. Ref. [29]): yn = yn−227 + Ayn−623 + Byn−624 , n ≥ 624, (4) where y0 , y1 , · · · y623 are initial vectors, and A and B are 32 × 32 matrices with elements in F2 . The explicit forms of A and B are given in Appendix A. From Eq. (4), we can grasp the regularity of the sequence generated by MT19937. For example, the most significant 8 bits of yn and those of yn−227 coincide if an integer n with n ≥ 624 satisfies the following two conditions: (a) The inner product of the ith row vector of A and yn−623 equals zero for every i with 1 ≤ i ≤ 8. (b) The inner product of the second row vector of B and yn−624 equals zero. Note that condition (b) is equivalent to the condition that Byn−624 = 0 (cf. the form of P8 8−i B in Appendix A). Let yn = (yn,1, yn,2, · · · , yn,32 ) ∈ F32 for n ≥ 0. 2 and Yn = i=1 yn,i 2 We generated a sequence {yn }n=0,1,2,··· ,312499 of 32-bit unsigned integers using MT19937 [32], and plotted, in Fig. 2, the points (Yn−227 , Yn ) for n satisfying conditions (a) and (b). All the points are on the diagonal line Yn = Yn−227 , but, obviously, this cannot happen with a random sequence. On the other hand, our generator produced a binary sequence of length 107 , using (0, 1, −1) ∈ S̄ as an initial point. Then, by partitioning it into nonoverlapping binary subsequences of length 32, we transformed it into a sequence {yn }n=0,1,2,··· ,312499 of 32-bit unsigned integers. Also for this {yn }n=0,1,2,··· ,312499 , we plotted, in Fig. 2, the points (Yn−227 , Yn ) for n satisfying conditions (a) and (b), which was similar to what we did for {yn }n=0,1,2,··· ,312499 obtained by MT19937. We can see from Fig. 2 that the points obtained from our pseudorandom sequence are almost uniformly distributed on the square. Although the computational cost of our generator is significantly higher than that of MT19937, our pseudorandom sequence displays the same behavior as true (uniform) random sequences. 12 250 200 Yn 150 100 50 0 0 50 100 150 Yn-227 200 250 FIG. 2: Plot of the points (Yn−227 , Yn ) for n satisfying conditions (a) and (b). Dots represent points obtained from a pseudorandom sequence produced by our generator. Crosses represent those by MT19937. V. CONCLUSION In this paper, we have introduced a pseudorandom number generator using chaotic true orbits of the Bernoulli map on cubic algebraic integers. Although this generator has a high computational cost, it exactly simulates the Bernoulli map that can generate ideal random binary sequences. We also have clarified a seed selection method that can select initial points (i.e., seeds) without bias and can avoid overlaps in latter parts of the pseudorandom sequences derived from them. Moreover, we have obtained experimental results supporting the conjecture that the initial point sets I0,c with c ∈ Z>0 have a more desirable property such that each element of I0,c belongs to a different cubic field. In order to demonstrate the capabilities of our generator, we have performed two kinds of computer experiments: Firstly, we have tested our generator using three statistical test suites—DIEHARD, NIST statistical test suite, and TestU01—and have shown that it has good statistical properties. Secondly, we have examined the independence property of pseudorandom numbers and have clarified an advantage that our generator has over what is probably the most popular generator, the Mersenne Twister MT19937. 13 Acknowledgments We thank Shigeki Akiyama, Shunji Ito, Teturo Kamae, Jun-ichi Tamura, Shin-ichi Yasutomi, and Masamichi Yoshida for their suggestions. This research was supported by JSPS KAKENHI Grant Number 15K00342. 14 Appendix A: Explicit forms of matrices A and B in Eq. (4) In this Appendix, we provide the explicit forms of matrices A and B in the recurrence relation (4) for the Mersenne Twister MT19937. Matrix A:  0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0   0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                      Matrix B:                                                                   15                                                                   [1] M. Li and P. Vitányi, An Introduction to Kolmogorov Complexity and Its Applications, 2nd ed. (Springer, New York, 1997). [2] H. Sugita, Monte Carlo Method, Random Number, and Pseudorandom Number (Mathematical Society of Japan, Tokyo, 2011). [3] D.E. Knuth, The Art of Computer Programming, 3rd ed. (Addison-Wesley, Reading, MA, 1998), Vol. 2, Chap. 3. [4] D. H. Lehmer, in Proc. 2nd Symp. on Large-Scale Digital Calculating Machinery (Harvard University Press, 1951), p. 141. [5] S.W. Golomb, Shift Register Sequences (Aegean Park Press, Laguna Hills, CA, 1982). [6] M. Matsumoto and T. Nishimura, ACM Trans. on Modeling and Computer Simulation 8, 3 (1998). [7] P. Billingsley, Ergodic Theory and Information (Wiley, New York, 1965). [8] E. Atlee Jackson, Perspectives of Nonlinear Dynamics (Cambridge University Press, Cambridge, 1991), Vol. 1, Chap. 4. [9] A. Saito, Prog. Theor. Phys. Supplement 161, 328 (2006). [10] For a similar reason, there has also been no proposed pseudorandom number generator using the tent map on [0, 1] given by MT (x) = 1 − |2x − 1| or the baker’s transformation on [0, 1)2 given by  y   2x, if x ∈ [0, 1/2) Mb (x, y) =  2 y + 1  ,   2x − 1, if x ∈ [1/2, 1) 2 although these maps, together with MB , provide (literally) textbook examples of chaotic maps. [11] A. Saito and A. Yamaguchi, Chaos 26, 063122 (2016). [12] S.M. Ulam and J. von Neumann, Bull. Amer. Math. Soc. 53, 1120 (1947). [13] T.Y. Li and J.A. Yorke, Nonlinear Anal. 2, 473 (1978). [14] S. Oishi and H. Inoue, Trans. IECE Japan E65, 534 (1982). [15] S. Lang and H. Trotter, J. Reine Angew. Math. 255, 112 (1972); Addendum, J. Reine Angew. Math. 267, 219 (1974). [16] F. Vivaldi, Nonlinearity 5, 941 (1992). 16 [17] J.H. Lowenstein, G. Poggiaspalla, and F. Vivaldi, Dynamical Systems 20, 413 (2005). [18] S. Akiyama, Actes des rencontres du CIRM 1, 3 (2009). [19] M. Furukado, S. Ito, A. Saito, J. Tamura, and S. Yasutomi, Experimental Math. 23, 390 (2014). [20] A. Saito and S. Ito, Physica D 268, 100 (2014). [21] A. Saito, S. Yasutomi, J. Tamura, and S. Ito, Chaos 25, 063103 (2015). [22] E. Hecke, Lectures on the Theory of Algebraic Numbers (Springer, New York, 1981), Chap. 5. [23] É. Borel, C. R. Acad. Sci. Paris 230, 591 (1950). [24] B. Adamczewski and Y. Bugeaud, Annals of Mathematics 165, 547 (2007). [25] G. Marsaglia, DIEHARD: A battery of tests of randomness, 1996. [26] A. Rukhin, J. Soto, J. Nechvatal, M. Smid, E. Barker, S. Leigh, M. Levenson, M. Vangel, D. Banks, A. Heckert, J. Dray, and S. Vo, A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications, NIST Special Publication 800-22 Revision 1a (2010). [27] P. L’Ecuyer and R. Simard, ACM Trans. Math. Softw. 33, 22 (2007). [28] F. Panneton, P. L’Ecuyer, and M. Matsumoto, ACM Trans. Math. Softw. 32, 1 (2006). [29] S. Harase, Math. Comput. Simul. 100, 103 (2014). [30] H. Niederreiter, Linear Algebra Appl. 192, 301 (1993). [31] H. Niederreiter, Finite Fields Appl. 1, 3 (1995). [32] For initialization, we carried out the same procedure as the one adopted in the program available at http://www.math.sci.hiroshima-u.ac.jp/∼m-mat/MT/MT2002/CODES/mt19937ar.c. 17
7cs.IT
The parameterised complexity of list problems on graphs of bounded treewidth Kitty Meeks∗ and Alexander Scott† Mathematical Institute, University of Oxford, UK arXiv:1110.4077v3 [cs.CC] 4 Aug 2016 Abstract We consider the parameterised complexity of several list problems on graphs, with parameter treewidth or pathwidth. In particular, we show that List Edge Chromatic Number and List Total Chromatic Number are fixed parameter tractable, parameterised by treewidth, whereas List Hamilton Path is W[1]-hard, even parameterised by pathwidth. These results resolve two open questions of Fellows, Fomin, Lokshtanov, Rosamond, Saurabh, Szeider and Thomassen (2011). 1 Introduction Many graph problems that are know to be NP-hard in general are fixed parameter tractable when parameterised by the treewidth k of the graph, that is they can be solved in time f (k) · nO(1) for some function f . Often there even exists a linear-time algorithm to solve the problem on graphs of fixed treewidth [2, 6, 10, 28]. This is the case for a number of graph colouring problems. Although it is NP-hard to determine whether an arbitrary graph is 3-colourable, the chromatic number of a graph of treewidth at most k (where k is a fixed constant) can be computed in linear time (Arnborg and Proskurowski [2]). Similarly, while it is NP-hard to determine the edge-chromatic number of cubic graphs (Holyer [19]) and more generally d-regular graphs for any d ≥ 3 (Leven and Galil [24]), this problem can again be solved in linear time on graphs of bounded treewidth (Zhou, Nakano and Nishizeki [32]). The pattern is the same for the total colouring problem: this is NP-hard even for regular bipartite graphs (McDiarmid and Sánchez-Arroyo [27]) but there exists a linear-time algorithm to solve the problem on graphs of bounded treewidth (Isobe, Zhou and Nishizeki [20]). However, list versions of such problems cannot always be solved so efficiently on graphs of bounded treewidth. The well-known list variant of vertex colouring is clearly NP-hard in general (as it generalises the standard colouring problem), but can also be solved in polynomial time on graphs of fixed treewidth k, and even in linear time on such graphs if the number of colours is bounded (Jansen and Scheffler [21]). However, in contrast with the linearity result for Chromatic Number, it has been shown that when the number of colours is unbounded List Colouring is W[1]-hard and so not (up to certain complexity theoretic assumptions) fixed parameter tractable (Fellows, Fomin, Lokshtanov, Rosamond, Saurabh, Szeider and Thomassen [14]). The list variants of edge-colouring and total colouring are harder still on graphs of bounded treewidth: both problems are NP-hard on series-parallel graphs (Zhou, Matsuo and Nishizeki [31]), which have treewidth at most two, and ∗ Present address: School of Mathematics [email protected]; Corresponding author. † Email: [email protected] and 1 Statistics, University of Glasgow; Email: list edge-colouring is also NP-hard on outerplanar graphs (Marx [26]), another class of graphs with treewidth at most two. Perhaps surprisingly, however, it can be easier to determine the minimum length of lists required to guarantee the existence of a proper list colouring for a graph G than to determine whether G admits a proper colouring with a particular set of lists. Alongside the negative result about the complexity of List Colouring, in [14] the authors also use Courcelle’s theorem [10] to prove the following result. Theorem 1.1 ([14]). The List Chromatic Number problem, parameterised by the treewidth bound t, is fixed-parameter tractable, and solvable in linear time for any fixed t. In Section 2 we show that the same pattern extends to the list chromatic number problems for edge-colouring and total colouring: although these problems are both NP-hard on graphs of treewidth two, it is possible to determine the list edge chromatic number and list total chromatic number of graphs of bounded treewidth in linear time, answering an open question from [14]. The situation is similar for the problem of determining whether a given graph contains a Hamilton path. Hamilton Path is known to be computationally difficult in general, remaining NP-hard when restricted to planar, cubic, 3-connected graphs (Garey, Johnson and Tarjan [17]) or bipartite graphs (Krishnamoorthy [23]), but can be solved in linear time on graphs of bounded treewidth (Arnborg and Proskurowski [2]). In Section 3 we consider a list variant of the problem, and show that it is unlikely to be fixed parameter tractable, even parameterised by pathwidth, answering another open question from [14]. In the remainder of this section we define formally the problems whose complexity we consider, and give some background on the treewidth bound and the theory of parameterised complexity. 1.1 Problems considered A proper edge-colouring of a graph G is an assignment of colours to the edges of G so that no two incident edges receive the same colour. If a set L = {Le : e ∈ E(G)} of lists of permitted colours is given, a proper list edge-colouring of (G, L) is a proper edge-colouring of G in which each edge e receives a colour from its list Le . The list edge chromatic number of G, ch0 (G), is the smallest integer c such that, for any assignment of colour lists to the edges of G in which each list has length at least c, there exists a proper list edge-colouring of G. We define the following problem. List Edge Chromatic Number Input: A graph G = (V, E). Question: What is ch0 (G)? A proper total colouring of a graph G = (V, E) is an assignment of colours to the vertices and edges of G such that no two adjacent vertices or incident edges have the same colour, and no edge has the same colour as either of its endpoints. If a set L = {Lx : x ∈ V ∪ E} of lists of permitted colours is given, a proper list total colouring of (G, L) is a proper total colouring of G in which every vertex and edge receives a colour from its list. The list total chromatic number of G, chT (G), is the smallest integer c such that, for any assignment of colour lists to the vertices and edges of G in which each list has length at least c, there exists a proper list total colouring of G. We define the following problem. List Total Chromatic Number Input: A graph G = (V, E). Question: What is chT (G)? 2 We also consider a list version of Hamilton Path, introduced in [14], where each vertex has a list of permissible positions on the path. List Hamilton Path Input: A graph G = (V, E), and a set of lists L = {Lv ⊆ {1, . . . , |V |} : v ∈ V } of permitted positions. Question: Does there exist a path P = P [1] . . . P [|G|] in G such that, for 1 ≤ i ≤ |G|, we have i ∈ LP [i] ? This introduction of lists to the Hamilton path problem is perhaps most naturally interpreted as the addition of timing constraints; we illustrate this with the Itinerant Lecturer Problem, which we define as follows. A professor has recently proved an exciting new result, and plans to spend n days travelling the country, giving a lecture about his work at a different university each day. We represent each institution he plans to visit with a vertex; each pair of institutions which can potentially be visited on consecutive days (the distance not being too great) is connected by an edge. Each institution also places different restrictions on which days he can visit (perhaps they require that he comes on the correct day of the week to speak at their regular seminar, or it might be that his host is away for part of the month) which give rise to the list of permitted positions for each vertex. The Itinerant Lecturer is then seeking to find a solution to the List Hamilton Path problem for this input. 1.2 Treewidth and Pathwidth We consider the complexity of these problems restricted to graphs of bounded treewidth or pathwidth. Given a graph G, we say that (T, D) is a tree decomposition of G if T is a tree and D = {D(t) : t ∈ T } is a collection of non-empty subsets of V (G) (or bags), indexed by the nodes of T , satisfying: S 1. V (G) = t∈T D(t), 2. for every e = uv ∈ E(G), there exists t ∈ T such that u, v ∈ D(t), 3. for every v ∈ V , if T (v) is defined to be the subgraph of T induced by nodes t with v ∈ D(t), then T (v) is connected. The width of the tree decomposition (T, D) is defined to be maxt∈T |D(t)|−1, and the treewidth of G is the minimum width over all tree decompositions of G. A path decomposition is a tree decomposition (P, D) in which the indexing tree is a path, and the pathwidth of G is the minimum width over all path decompositions of G. Given a tree decomposition (T, D) of G, we assume that an arbitrary node r ∈ V (T ) is chosen to be the root of T , and define the height, h(t) of any t ∈ T to be the distance from r to t. For any v ∈ V (G), we then define tv to be the unique node t of minimum height such that v ∈ D(t) (i.e. tv is the node of minimal height in the subtree T (v)). We will make use of the following well-known bound on the number of nodes required in the tree indexing the tree decomposition of a graph G (see [15, Lemma 11.9] for a proof); we shall assume throughout that tree decompositions of this form are given. Lemma 1.2. Let G be a graph of order n and treewidth k. Then there exists a width k tree decomposition (T, D) for G with |T | ≤ n. Moreover, given any tree decomposition (T 0 , D0 ) for G, a tree decomposition (T, D) such that |T | ≤ n can be computed in linear time. Graphs having treewidth at most k can alternatively be characterised as partial k-trees, as in [2, 32]. It follows immediately from this equivalent definition that if a graph G of order n is a partial k-tree (i.e. it has treewidth at most k) then G has at most kn edges. 3 1.3 Parameterised complexity When considering the class of problems which are solvable in polynomial time on graphs of treewidth at most k, we aim, as mentioned above, to distinguish those which can be solved in time f (k) · nO(1) . Problems in this subclass are said to be fixed parameter tractable, parameterised by treewidth (and belong to the parameterised complexity class FPT). A standard method of showing that a parameterised problem does not belong to FPT (and so the best known algorithm has running time nf (k) for some unbounded function f ) is to prove that it is hard for some level of the W-hierarchy; in Section 3 we show that List Hamilton Path is hard for W[1], the first level of this hierarchy. In order to show that a problem is W[1]-hard, we give a parameterised reduction from a problem that is known to be W[1]-hard. Given a W[1]-hard decision problem Π with parameter k, this involves constructing an instance (I 0 , k 0 ) of Π0 such that (I 0 , k 0 ) is a yes-instance for Π0 if and only if (I, k) is a yes-instance for Π; for a parameterised reduction we require that k 0 is bounded by some function of k, in addition to the fact that (I 0 , k 0 ) can be computed from (I, k) in time polynomial in |I| and that |I 0 | is bounded by a polynomial function of |I|. One useful W[1]-hard problem, which we use for a reduction in Section 3, is Multicolour Clique (shown to be W[1]-hard by Fellows, Hermelin, Rosamond and Vialette in [13]): given a graph G, properly coloured with k colours, the problem is to determine whether there exists a clique in G containing one vertex of each colour. In fact, by considering the relationship between the parameters k and k 0 in the parameterised reduction, it is sometimes possible to prove conditional lower bounds on the running time of any algorithm for a specific parameterised problem. Assuming the exponential time hypothesis, a lower bound on the running time for any algorithm to solve the Clique problem is known. Theorem 1.3 ([9, 25]). Assuming the exponential time hypothesis, there is no f (k)no(k) algorithm for Clique. Since the reduction from Clique to Multicolour Clique in [13] does not change the value of the parameter, the same is true for Multicolour Clique; our parameterised reduction to List Hamilton Path in Section 3 only increases the parameter value by a constant factor, so we are able to deduce that the same conditional lower bound also holds for List Hamilton Path. For further background on the theory of parameterised complexity, we refer the reader to [12]. 2 List Chromatic Number Problems The main result of this section is the following theorem. Theorem 2.1. List Edge Chromatic Number and List Total Chromatic Number are fixed parameter tractable, parameterised by the treewidth bound k, and are solvable in linear time for any fixed k. The key technical tool we use to prove this result is Theorem 2.8, which determines the list edge chromatic number and list total chromatic number for graphs with fixed treewidth and large maximal degree. 2.1 Background We begin by recalling some existing results about the edge chromatic number and list edge chromatic number of a graph. It is easy to see that, for any graph G, we have ∆(G) ≤ χ0 (G) ≤ ch0 (G) ≤ 2∆(G) − 1, 4 where χ0 (G) denotes the edge chromatic number of G and ∆(G) is the maximum degree of G. The lower bound comes from the fact that every edge incident with a single vertex must receive a different colour; for the upper bound, note that every edge is incident with at most 2(∆(G) − 1) others, so lists of length 2∆(G) − 1 guarantee that we can colour greedily. For the edge chromatic number, we have the much stronger result of Vizing: Theorem 2.2 ([29]). χ0 (G) is equal to either ∆(G) or ∆(G) + 1. In order to give a linear time algorithm to solve Edge Chromatic Number on graphs of bounded treewidth, Zhou, Nakano and Nishizeki [32] prove that, for graphs of fixed treewidth k and maximum degree ∆ ≥ 2k, the edge chromatic number must in fact be equal to ∆. There is no direct analogue of Vizing’s theorem for the list edge chromatic number. The List (Edge) Colouring Conjecture (discussed in [1, 5, 18]) asserts that χ0 (G) = ch0 (G) for any graph G, and would immediately imply Vizing’s conjecture (1976) that ch0 (G) ≤ ∆(G) + 1. However, neither of these conjectures has been proved except for certain special classes of graphs, and the best general bound on the list edge chromatic number is due to Kahn. Theorem 2.3 ([22]). For any  > 0, if ∆(G) is sufficiently large, ch0 (G) ≤ (1 + )∆(G). In Theorem 2.8, we show that for a graph G of bounded treewidth and large maximum degree, ch0 (G) = χ0 (G) = ∆(G), proving a special case of the List (Edge) Colouring Conjecture. Using this result, the List Edge Chromatic Number problem on graphs of bounded treewidth can be reduced to the case in which the maximum degree of the graph is bounded. We prove an analogous result for the list total chromatic number. Once again, there exist trivial bounds for the (list) total chromatic number of an arbitrary graph: ∆(G) + 1 ≤ χT (G) ≤ chT (G) ≤ 2∆(G) + 1, where χT (G) denotes the total chromatic number of the graph. It is a long-standing but unproved conjecture (the Total Colouring Conjecture [3, 30]) that χT (G) ≤ ∆(G) + 2. Theorem 2.8 further demonstrates that, for a graph G of bounded treewidth and large maximum degree, chT (G) = χT (G) = ∆(G) + 1, and so once again it suffices to solve the problem for graphs with bounded maximum degree. Of course, there is a correspondence between these colouring problems and the vertex-colouring problems discussed above. For any graph G = (V, E), the line graph L(G) of G has vertex set E, and e, f ∈ E are adjacent in L(G) if and only if e and f are incident in G. Then solving (for example) List Edge Chromatic Number for the graph G is equivalent to solving List Chromatic Number for L(G). Similarly, we define the total graph T (G) of G to have vertex set V ∪ E, and edge set E ∪ {ef : e, f ∈ E and e, f incident in G} ∪ {ve : v is an endpoint of e}, and solving List Total Chromatic Number for G is then equivalent to solving List Chromatic Number for T (G). However, as the treewidth of L(G) or T (G) can in general be arbitrarily large even when G itself has small treewidth, results about the parameterised complexity of vertex colouring problems do not immediately transfer to the edge and total colouring cases. If the maximum degree of G is bounded, however, the following result (proved in [11]) tells us that the treewidth of L(G) is bounded by a constant multiple of that of G. 5 Lemma 2.4. Let G be a graph of treewidth at most k, and maximum degree at most ∆. Then L(G) has treewidth at most (k + 1)∆. A similar result holds for the treewidth of T (G). Lemma 2.5. Let G be a graph of treewidth at most k, and maximum degree at most ∆. Then T (G) has treewidth at most (k + 1)(∆ + 1). Proof. If (T, D) is a width k tree decomposition for G, it is easy to verify that (T, D0 ), where D0 (t) = D(t) ∪ {uv ∈ E : {u, v} ∩ D(t) 6= ∅}, is a tree decomposition of T (G) of width at most (k + 1)(∆ + 1). We will need two further results for our proofs. First, a theorem of Galvin concerning the list edge chromatic number of bipartite graphs: Theorem 2.6 ([16]). Let G be a bipartite graph. Then ch0 (G) = χ0 (G) = ∆(G). Finally, we make use of an algorithm of Bodlaender: Theorem 2.7 ([4]). For all k ∈ N, there exists a linear-time algorithm that tests whether a given graph G = (V, E) has treewidth at most k and, if so, outputs a tree-decomposition of G with treewidth at most k. 2.2 Results and Proofs In this section we prove our technical results about the list edge chromatic number and list total chromatic number of graphs with bounded treewidth and large maximum degree, and then give linear-time algorithms to solve List Edge Chromatic Number and List Total Chromatic Number on graphs of bounded treewidth. Our algorithms rely on the following theorem, which is a special case of both the List (Edge) Colouring Conjecture and the Total Colouring Conjecture. Theorem 2.8. Let G be a graph with treewidth at most k and ∆(G) ≥ (k + 2)2k+2 . Then ch0 (G) = ∆(G) and chT (G) = ∆(G) + 1. This result can be derived from earlier work by Borodin, Kostochka and Woodall [7, Theorem 7] (with a quadratic rather than exponential dependence on k). For the sake of completeness, however, we will give a direct, self-contained proof of this result. Moreover, since the dissemination of an initial version of this paper, the techniques introduced in our proof have been refined by Bruhn, Lang and Stein [8] to demonstrate that only a linear dependence on k is in fact required. We prove the result by means of two lemmas, concerning the list edge chromatic number and list total chromatic number respectively; Theorem 2.8 follows immediately from these auxiliary results. We start by considering the list edge chromatic number. Lemma 2.9. Let G be a graph with treewidth at most k. Then ch0 (G) ≤ max{∆(G), (k + 2)2k+2 }. Proof. We proceed by contradiction. Suppose that the result does not hold, and let G be a counterexample with as few edges as possible, so there exists a set L = (Le )e∈E(G) of colour-lists, all of length ∆0 = max{∆(G), (k + 2)2k+2 }, such that there is no proper list edge-colouring of (G, L). We may assume without loss of generality that G contains no isolated vertices and so, by edge-minimality of G, we must have ch0 (G0 ) ≤ max{∆(G0 ), (k + 2)2k+2 } ≤ ∆0 for any proper subgraph G0 of G. 6 We may assume that every edge e ∈ E(G) is incident with at least ∆0 others: if e is incident with fewer than ∆0 other edges then we can extend any proper list edge-colouring of (G − e, L \ {Le }) to a proper list edge-colouring of (G, L). We will show that, under this assumption, there must exist a nonempty set of vertices U such that any proper list edge-colouring of (G \ U, (Le )e∈E(G\U ) ) can be extended to a proper list edge-colouring of (G, L), contradicting the choice of G as an edge-minimal counterexample (as the fact there are no isolated vertices in G means e(G \ U ) < e(G)). Let us define L ⊆ V (G) to be the set of vertices of degree at least ∆0 /2 (the set of vertices of “large” degree), and note that every edge is incident with at least one vertex from L (as otherwise it can be incident with only ∆0 − 1 other edges). Thus S = V (G) \ L (the set of vertices of “small” degree) is an independent set. Fix a width k tree decomposition (T, D) of G, and choose v ∈ L such that h(tv ) = maxx∈L h(tx ). We then set T 0 to be the subtree of T rooted at tv , that is the subgraph of T induced by nodes u S such that the path from u to the root contains tv . Set X ⊆ V (G) to be t∈T 0 D(t), and X 0 = X \ D(tv ). We then make the following observations (where, for any U ⊆ V (G), Γ(U ) denotes the set of neighbours of vertices in U ). 1. L ∩ X ⊆ D(tv ): if any vertex z ∈ L appears in a bag indexed by T 0 but does not appear in D(tv ), we must have h(tz ) > h(tv ), contradicting the choice of v. This implies immediately that X 0 ⊆ S. 2. Γ(X 0 ) ⊆ D(tv ): no vertex from X 0 can appear in a bag of the decomposition not indexed by T 0 , so clearly we have Γ(X 0 ) ⊆ X; but also, as X 0 ⊂ S, we have Γ(X 0 ) ⊆ L and so we see Γ(X 0 ) ⊆ L ∩ X ⊆ D(tv ). 3. |X 0 | ≥ ∆0 /2 − k: since v appears only in bags indexed by T 0 , we have Γ(v) ⊆ X \ {v}, implying |X| − 1 ≥ d(v) ≥ ∆0 /2, and we know |X| − |X 0 | = |D(tv )| ≤ k + 1, so we have |X 0 | ≥ |X| − k − 1 ≥ ∆0 /2 − k. As the neighbourhood of any vertex x ∈ X 0 is contained in D(tv ), there are at most 2k+1 possibilities for the neighbourhood of such a vertex. Therefore there must exist some subset U ⊆ X such that every vertex in U has the same neighbourhood, and |U | ≥ ∆0 /2 − k (k + 2)2k+1 − k |X 0 | ≥ ≥ ≥ k + 1 ≥ |Γ(U )|. 2k+1 2k+1 2k+1 Now let φ be a proper edge-colouring of (G \ U, (Le )e∈E(G\U ) ). If we can extend φ to a proper edge-colouring of G in which every edge incident with U also receives a colour from its list, then we have a proper list edge-colouring of (G, L), giving the required contradiction. Set W = Γ(U ), say W = {w1 , . . . , wr } (where r ≤ |U |), and let H be the complete bipartite subgraph of G induced by U ∪ W . Suppose, for 1 ≤ i ≤ r, that Fi is the set of colours already used by φ on edges incident with wi , and for each u ∈ U define the list L0uwi to be Luwi \ Fi . If we can properly colour the edges of H in such a way that each edge e ∈ E(H) is given a colour from L0e , then we can extend φ as required. Observe that, for each i, |Fi | ≤ ∆(G) − |U |, and so we have |L0uwi | ≥ ∆0 − ∆(G) + |U | ≥ |U |. But as H is bipartite, with maximum degree |U |, we have (by Theorem 2.6) ch0 (H) = ∆(H) = |U | . Therefore, as each list L0e contains at least |U | colours, there exists a proper edge colouring of H in which every edge e receives a colour from its list L0e , completing the proof. We use a very similar argument to prove an analogous result for the list total chromatic number. Lemma 2.10. Let G be a graph with treewidth at most k. Then chT (G) ≤ max{∆(G), (k+2)2k+2 }+1. 7 Proof. Again, we proceed by contradiction. Let ∆0 = max{∆(G), (k + 2)2k+2 }. Suppose that the result does not hold, and let G be a counterexample with as few edges as possible, so there exists a set L = (Lx )x∈V (G)∪E(G) of colour-lists, all of length ∆0 + 1, such that there is no proper list total colouring of (G, L). We may assume without loss of generality that G contains no isolated vertices and so, by edge-minimality of G, we must have chT (G0 ) ≤ max{∆(G0 ), (k + 2)2k+2 } + 1 ≤ ∆0 + 1 for any proper subgraph G0 of G. We may assume that every edge e ∈ E(G) is incident with at least ∆0 − 1 others: if e is incident with fewer than ∆0 − 1 other edges then at most ∆0 colours can appear on vertices or edges incident with e, and so any proper list total colouring of (G − e, L \ {Le }) can be extended to a proper list total colouring of (G, L). Thus, if we define L0 ⊆ V (G) to be the set of vertices of degree at least (∆0 − 1)/2, every edge is incident with at least one vertex from L0 , and S 0 = V (G) \ L0 is an independent set. Exactly as in the proof of Lemma 2.9, we can find a subset U ⊆ S 0 such that all vertices of U have the same neighbourhood of size at most k + 1, and (∆0 − 1)/2 − k 2k+1 ((k + 2)2k+2 − 1)/2 − k ≥ 2k+1 >k+1 ≥ |Γ(U )|. |U | ≥ As G \ U is a proper subgraph of G, there exists a proper list total colouring φ of (G \ U, L0 ) where L0 = (Lx )x∈E(G\U )∪V (G\U ) . If we can extend φ to a proper total colouring of G in which every vertex from U and every edge incident with U also receives a colour from its list, then we have a proper list total colouring of (G, L), giving the desired contradiction. As in the proof of Lemma 2.9, set W = Γ(U ), say W = {w1 , . . . , wr } (where r ≤ |U |), and let H be the complete bipartite subgraph of G induced by U ∪ W . Suppose, for 1 ≤ i ≤ r, that Fi is the set of colours already used by φ on wi and the edges incident with wi , and for each u ∈ U define L0uwi to be Luwi \ Fi . Observe that, for each i, |Fi | ≤ 1 + ∆(G) − |U |, and so we have |Luwi | ≥ ∆0 + 1 − 1 − ∆(G) + |U | ≥ |U |. As H is bipartite, with maximum degree |U |, we have (by Theorem 2.6) ch0 (H) = ∆(H) = |U |. Therefore, as each list L0e contains at least |U | colours that are not already used by φ on edges or vertices incident with e, we can extend φ to a proper list colouring φ0 including the edges incident with U . If we can then colour the vertices of U in such a way that no u ∈ U receives a colour used by φ0 on an adjacent vertex or incident edge, we can indeed extend φ to a proper list total colouring of G. Note that every u ∈ U has degree at most k + 1, and so is adjacent to or incident with at most 2(k + 1) vertices and edges of G. Thus, as |Lu | ≥ ∆0 + 1 > 2(k + 1), there is at least one colour in Lu that is not used by φ0 on a vertex adjacent to u or on an edge incident with u, and we can extend φ0 to the vertices of U greedily. This gives a proper list total colouring of (G, L), completing the proof. Together, Lemmas 2.9 and 2.10 prove Theorem 2.8. We can now prove our main complexity result, based on Theorem 2.8. Proof of Theorem 2.1. Let G be a graph on n vertices, with treewidth at most k, and set f (k) = (k + 2)2k+2 . We can check in time O(f (k)n) whether ∆(G) ≥ f (k), and if this is the case then, by 8 Theorem 2.8, we know the exact value of ch0 (G) and chT (G). Thus it suffices to solve both problems in the case that ∆(G) < f (k). This is exactly the same as solving List Chromatic Number on L(G) or T (G), when ∆(G) < f (k). But in this case, by Lemmas 2.4 and 2.5, L(G) and T (G) have bounded treewidth. Note that both graphs can be computed from G in time O(e(L(G)) + e(T (G))) = O((k + 1)(f (k) + 1)(|T (G)| + |L(G)|) = O(k 2 f (k)|G|), and so we can then use Bodlaender’s algorithm (Theorem 2.7) to find a tree decomposition of L(G) or T (G), of width at most (k + 1)(f (k) + 1), in time O(|G|) for any fixed k. Given this decomposition we can, by Theorem 1.1, compute the list chromatic number of L(G) or T (G), and hence the list edge chromatic number or list total chromatic number of G, in linear time. Our proof also implies a polynomial-time algorithm to compute a proper list edge-colouring of any graph G of fixed treewidth and large maximum degree, provided every L ∈ L has length at least ∆(G). The same method can also be used to compute a list total colouring of such a graph, provided every list has length at least ∆(G) + 1. Here we describe an O(n2 ) algorithm to achieve this; with the use of suitable data structures this can probably be improved to a linear-time algorithm, but for simplicity of presentation we do not seek to optimise the running time here. Theorem 2.11. Let G be a graph of order n and treewidth k, with maximum degree at least (k + 2)2k+3 , and let L = (Le )e∈E(G) be a set of colour-lists such that |Le | ≥ ∆(G) for all e ∈ E(G). Then, for fixed k, we can compute a proper list edge-colouring of (G, L) in time O(n2 ). Proof. The idea of the algorithm is to delete edges or sets of vertices repeatedly, as in the proof of Lemma 2.9, until the degree of the remaining graph is less than (k + 2)2k+2 < ∆(G)/2, so the edges of this graph can be list-coloured greedily. Edges and vertices are then reinserted and coloured to extend this colouring to the edges of G. Unlike in the proof of Lemma 2.9, where we identified a set of at least k + 1 vertices to delete, in this algorithm we always delete a set of exactly k + 1 vertices. Without loss of generality, we may also assume that every list Le has length exactly ∆(G) < n, discarding additional colours if necessary. We begin with some preprocessing. For each vertex, we construct a list of its neighbours, and we also construct an n-element array storing the degree of each vertex. For each vertex of degree at most k + 1, its list of neighbours is sorted into order; the list of vertices of degree at most k + 1 is then also sorted, in order of neighbourhoods (so that vertices with the same neighbourhood occur consecutively). All this can be done in time O(n2 ). Note that each time we delete an edge, we can update this information in time O(n): we update the neighbour lists of the edge’s endpoints and decrement their degrees, and if one or both of the endpoints now has degree at most k + 1 its neighbours are sorted and it is inserted into the correct position in the list of small-degree vertices. From the point of view of updating information, deleting a set of k + 1 vertices can be regarded as a series of edge-deletions, each performed in time O(n). As there are O(n) edges in total, this means we can perform all updates after deletions in time O(n2 ). Given the array of degrees of all vertices, it is straightforward to identify in time O(n) an edge incident with fewer than ∆(G) others, if such an edge exists. If there is no such edge, we know from the proof of Lemma 2.9 that (provided the maximum degree of the graph is still at least (k + 2)2k+2 ) there exists a set of k +1 vertices with a common neighbourhood of size at most k +1. As the vertices of degree at most k + 1 are sorted by their neighbourhoods, it is also possible to identify such a set of vertices in linear time. Thus at each step we are able to identify the edge or set of vertices to delete in time O(n), and so all deletions (and subsequent updating) can be performed in time O(n2 ). It therefore remains to show that we can also perform the reinsertions in time O(n2 ). When we reinsert an edge, we can simply colour it with the first available colour from its colour-list, taking 9 time O(n). When reinserting a set of k +1 vertices, we need to colour up to (k +1)2 edges which form a complete bipartite subgraph. Recall from the proof of Lemma 2.9 that every such edge still has at least k + 1 available colours from its list (i.e. colours that have not already been used on incident edges), and that there exists a proper list edge-colouring of the bipartite graph if every edge has a list of exactly k + 1 permitted colours. For each of the edges, we can compute in time O(kn) a list of k + 1 colours from its colour-list which have not yet been used on incident edges. We can then check in constant time all possible colourings of the (k + 1)2 edges in which each receives one of the k + 1 colours from its list, to find a proper colouring of this bipartite graph, which is guaranteed to extend the list edge-colouring as required. Thus we can perform all reinsertions in time O(n2 ), completing the proof of the theorem. 3 List Hamilton Path Recall from Section 1.1 the List Hamilton Path (or Itinerant Lecturer) problem: List Hamilton Path Input: A graph G = (V, E), and a set of lists L = {Lv ⊆ {1, . . . , |V |} : v ∈ V } of permitted positions. Question: Does there exist a path P = P [1] . . . P [|G|] in G such that, for 1 ≤ i ≤ |G|, we have i ∈ LP [i] ? Given a graph G and a set of lists L = {Lv ⊆ {1, . . . , |G|} : v ∈ V (G)} of permitted positions, we say a path P = P [1] . . . P [|G|] in G is a valid Hamilton path if i ∈ LP [i] for every i. In this section, we prove the following result. Theorem 3.1. List Hamilton Path, parameterised by pathwidth, is W[1]-hard. Moreover, under the exponential time hypothesis, there is no algorithm to solve List Hamilton Path in time f (k)no(k) on graphs of pathwidth k. We prove our theorem by means of a reduction from Multicolour Clique. The reduction involves an edge representation strategy: we select an edge by visiting the vertices of the associated gadget in a specific order, and the permitted positions for other vertices in the graph ensure that the edges selected in this way must in fact be the edges of a multicolour clique. Suppose G is the k-coloured, n-vertex graph in an instance of Multicolour Clique: we may assume without loss of generality that all k vertex classes have the same size, and also that the number of edges between each pair of vertex classes is the same (as adding isolated edges and vertices does not change the existence or otherwise of a multicolour clique). Let the vertex classes be V1 , . . . , Vk , where Vi contains vertices Vi [1], . . . , Vi [p], and assume that there are q edges between each pair of vertex classes. For technical reasons, it will be useful to assume (without loss of generality) that k, n ≥ 4. We now describe the construction of a graph H of pathwidth at most 5k, and a set of lists L = (Lv )v∈V (H) such that there is a valid Hamilton path in (H, L) if and only if G contains a multicolour clique. Our construction consists of k+1 paths, with some additional edges linking them: paths P1 , . . . , Pk correspond to the vertex classes V1 , . . . , Vk , andan additional path Q is used to connect P1 , . . . , Pk . Each path Pi has 2n2 vertices (so |Pi | ≥ 4q k2 = 4e(G)), and we denote the j th vertex of Pi by Pi [j − 1]. The path Q = Q1 . . . Qk is the concatenation of k subpaths Q1 , . . . , Qk , each containing n2 (n − 2) vertices and, for 1 ≤ i ≤ k, every vertex of Qi , except for the first vertex of Q1 and the last vertex of Qk , is adjacent to both Pi [0] and Pi [2n2 − 1]. In addition, we have a number of edge-gadgets, consisting of edges between pairs of the paths P1 , . . . , Pk . Suppose E(G) = {e0 , . . . , em−1 }. Then, for each edge er between Vi and Vj with i < j, 10 we have an edge-gadget G(er ), involving the rth group of four vertices in Pi and the corresponding group of vertices from Pj . G(er ) has edges Pi [4r]Pj [4r + 1], Pj [4r]Pi [4r + 1], Pi [4r + 1]Pj [4r + 3] and Pi [4r + 2]Pj [4r + 2], as illustrated in Figure 1. Pi [4r] Pi [4r+1] Pi [4r+2] Pi [4r+3] Pj [4r] Pj [4r+1] Pj [4r+2] Pj [4r+3] Figure 1: The edge-gadget G(er ), where er has endpoints in Vi and Vj with i < j This completes the construction of the graph H. We now define the list of permitted positions for each vertex. For 1 ≤ i ≤ k, we set LPi [0] = {(i − 1)n3 + 3αn2 : 1 ≤ α ≤ p}, and LPi [2n2 −1] = {(i − 1)n3 + 3αn2 + (2n2 − 1) + k + 1 − 2i : 1 ≤ α ≤ p}. We further define the list L(i, t) = {(i − 1)n3 + 3αn2 + t + β : 1 ≤ α ≤ p, −(k − 1) ≤ β ≤ k − 1}. For every internal vertex Pi [t], the list LPi [t] will contain L(i, t). In most cases we in fact set LPi [t] = L(i, t), the only exceptions being three vertices in each edge-gadget G(e): if e = Vi [r]Vj [s] and the vertices in G(e) are Pi [`], . . . , Pi [` + 3], Pj [`], . . . , Pj [` + 3], then the list for Pi [` + 1] will additionally contain positions {(j − 1)n3 + 3sn2 + (` + 1) + β : −(k − 1) ≤ β ≤ k − 1}, while the lists for Pj [` + 1] and Pj [` + 2] also contain {(i − 1)n3 + 3rn2 + (` + 1) + β : −(k − 1) ≤ β ≤ k − 1} and {(i − 1)n3 + 3rn2 + (` + 2) + β : −(k − 1) ≤ β ≤ k − 1} respectively. The first vertex on Q has singleton list {1} and the last vertex on Q has singleton list {kn3 }; we place no restriction on the positions that the remaining vertices from Q can take in a valid Hamilton path. Intuitively, the idea is that any valid Hamilton path must (with the exception of a few vertices belonging to the edge-gadgets) traverse P1 , . . . , Pk in that order, using sections of Q before and after each Pi to connect the paths. In this construction, our choice of position for Pi [0] corresponds to a choice of vertex from Vi : if Pi [0] takes position (i − 1)n3 + 3rn2 , we say that the Hamilton path selects Vi [r]. Notice that, for any edge-gadget Ge (where e = Vi [r]Vj [s]), there are precisely two possibilities for which edges within Ge are used by a Hamilton Path, as illustrated in Figure 2. If we use the edge Pi [4r]Pj [4r + 1] (and so also use the edges Pj [4r + 2]Pi [4r + 2], Pj [4r]Pi [4r + 1] and Pi [4r + 1]Pj [4r + 3]) we say that the Hamilton path selects the edge e. We begin by explaining how, given a multicolour clique in G, we can construct a valid Hamilton path in H. 11 Pi [4r] Pi [4r+1] Pi [4r+2] Pi [4r+3] Pj [4r] Pj [4r+1] Pj [4r+2] Pj [4r+3] Pi [4r] Pi [4r+1] Pi [4r+2] Pi [4r+3] Pj [4r] Pj [4r+1] Pj [4r+2] Pj [4r+3] Figure 2: Two possibilities for the edges used by a Hamilton path in the gadget Ge : in the first case, we say that the path selects e. Lemma 3.2. If G is a yes-instance for Multicolour Clique, then (H, L) is a yes-instance for List Hamilton Path. Proof. Suppose we have a multicolour clique that contains Vi [ri ] for 1 ≤ i ≤ k. We claim we can then find a Hamilton path in H in which every vertex has a position from its permitted list. In such a path, we give Pi [0] position (i − 1)n3 + 3ri n2 . Each path Pi is traversed from end to end in order, except for the selection of precisely k2 edges: for each 1 ≤ i < j ≤ k we will select the edge Vi [ri ]Vj [rj ] (which is possible since V1 [r1 ], . . . , Vk [rk ] induces a clique. Note that the lists for each vertex in the gadget corresponding to the edge Vi [ri ]Vj [rj ] will always allow us to select this edge: if the vertices in the gadget are Pi [`], . . . , Pi [` + 3], Pj [`], . . . , Pj [` + 3], then Pi [` + 1] is allowed to take any position in {(j − 1)n3 + 3rj n2 + (` + 1) + β : −(k − 1) ≤ β ≤ k − 1}, whereas Pj [` + 1] can take any position in {(i − 1)n3 + 3ri n2 + (` + 1) + β : −(k − 1) ≤ β ≤ k − 1} and Pj [` + 2] any position in {(i − 1)n3 + 3ri n2 + (` + 2) + β : −(k − 1) ≤ β ≤ k − 1}. The number of vertices lying on the path between Pi [0] and Pi [2n2 − 1] will then be equal to 2 2n − 2 + (k − i) − (i − 1) = 2n2 − 1 + k − 2i (since, in comparison with simply traversing Pi , this segment of the path gains one vertex for each selected edge Vi [ri ]Vj [rj ] where j > i, and loses one vertex for each selected edge Vi [ri ]Vj [rj ] where j < i). This means that Pi [2n2 − 1] will have position (i − 1)n3 + 3ri n2 + (2n2 − 1) + k + 1 − 2i, which belongs to its list, and it is straightforward to verify that every other vertex on each path Pi will receive a position from its list. Finally, we connect up these path segments using segments of Q, so that each vertex Pi [0] has the desired position in the final path. If Pi [0] occurs on the path immediately after some vertex Qi [αi ] then Pi [2n2 − 1] is followed by Qi [α + 1], so every vertex of Q is included on the path; the first vertex of Q is the first vertex on the path, and the last vertex of Q the last, as required by the lists for these two vertices. This path then includes every vertex in H, and gives each vertex a position from its permitted list, so (H, L) is indeed a yes-instance for List Hamilton Path. We now proceed to demonstrate that the converse is also true: if H contains a valid Hamilton Path then G must contain a multicolour clique. In order to demonstrate this fact in Lemma 3.9, we first prove a number of propositions about the structure of valid Hamilton paths in H. Throughout, 12 we shall assume that P is a valid Hamilton path in H. Proposition 3.3. For any vertex Pi [`] in H, there is a unique pair of values (fP (Pi [`]), gP (Pi [`])) with fP (Pi [`]) ∈ {1, . . . , k} and gP (Pi [`]) ∈ {1, . . . , p} such that Pi [`] takes position (fP (Pi [`]) − 1) · n3 + 3 · gP (Pi [`])·n2 +t+β for some t ∈ {0, . . . , 2n2 −1} and β ∈ {−(k−1), . . . , (k−1)}. Moreover, if vertices Pi [`] and Pj [`0 ] occur consecutively on P , then fP (Pi [`]) = fP (Pj [`0 ]) and gP (Pi [`]) = gP (Pj [`0 ]). Proof. It is straightforward to show that, if a1 6= a2 or b1 6= b2 , then, for any choice of t1 , t2 ∈ {0, . . . , 2n2 − 1} and β1 , β2 ∈ {−(k − 1), . . . , (k − 1)}, we have (a1 · n3 + 3 · b1 · n2 + t1 + β1 ) − (a2 · n3 + 3 · b2 · n2 + t2 + β2 ) > 1, which immediately implies the result. Proposition 3.4. For each i ∈ {1, . . . , k}, the set of vertices fP−1 (i) occurs consecutively on P , and there is a unique φ(i) ∈ {1, . . . , p} such that gP (Pi [`]) = φ(i) for every Pi [`] ∈ fP−1 (i). Proof. Let us call a vertex belonging to the path Pi for some 1 ≤ i ≤ k a p-vertex, and a vertex belonging to the path Q in H a q-vertex. The Hamilton path P can then be decomposed into segments, where each segment is a maximal set of consecutive vertices of the same kind (either pvertices or q-vertices). Note that the first and last segments of P must consist of q-vertices, since we know that the first vertex on Q must be the first vertex of P , and the last vertex of Q must be the last vertex of P . Now consider an arbitrary segment of p-vertices, and note that each of its endpoints must be adjacent in P to a q-vertex. Notice that the set of p-vertices that have at least one q-vertex as a neighbour is precisely {Pi [0], Pi [2n2 − 1] : 1 ≤ i ≤ k}, so the endpoints of every segment of p-vertices must lie in this set. Since two distinct segments of p-vertices must have disjoint pairs of endpoints in this set, and |{Pi [0], Pi [2n2 − 1] : 1 ≤ i ≤ k}| = 2k, it follows that there can be at most k distinct segments of p-vertices. Moreover, by Proposition 3.3, all p-vertices belonging to the same segment must map to the same value under both f and g. Notice that, by definition of the lists for Pi [0] and Pi [2n2 −1], we have f (Pi [0]) = f (Pi [2n2 −1]) = i. Thus, for each 1 ≤ i ≤ k, there must be precisely one segment, Si , of p-vertices such that fP (v) = i for every vertex v belonging to the segment. It follows that the vertices of fP−1 (i) are exactly those of Si , so all vertices of fP−1 (i) occur consecutively on P . Moreover, it therefore follows from Proposition 3.3 that there exists some φ(i) ∈ {1, . . . , p} such that gP (v) = φ(i) for every vertex v ∈ fP−1 (i). Proposition 3.5. For each i ∈ {1, . . . , k}, we have |fP−1 (i)| = 2n2 + k + 1 − 2i. Proof. Recall that fP (Pi [0]) = fP (Pi [2n2 − 1]) = i, so by Proposition 3.4 we have gP (Pi [0]) = gP (Pi [2n2 −1]) = φ(i). It then follows from the lists of permitted positions for Pi [0] and Pi [2n2 −1] that their positions on the path differ by precisely 2n2 +k−2i. Thus we must have |fP−1 (i)| ≥ 2n2 +k−2i+1. It then follows that k X i=1 |fP−1 (i)| ≥ k X i=1 1 2n2 + k − 2i + 1 = 2kn2 + k 2 + k − 2 · k(k + 1) = 2kn2 , 2 with equality if and only if |fP−1 (i)| = 2n2 + k − 2i + 1 for each i. Since the sets {fP−1 (1), . . . , fP−1 (k)} P partition the p-vertices, of which there are in total 2kn2 , it therefore follows that ki=1 |fP−1 (i)| = 2kn2 and hence that |fP−1 (i)| = 2n2 + k − 2i + 1 for each i, as required. Proposition 3.6. If P selects the edge e, we must have e = Vi [φ(i)]Vj [φ(j)] for some 1 ≤ i < j ≤ k. 13 Proof. Suppose that P selects the edge e, and that the vertices in the gadget Ge are Pi [`], . . . , Pi [` + 3], Pj [`], . . . , Pj [` + 3]. Since Pi [`] and Pj [` + 1] occur consecutively on P , it follows from Proposition 3.3 that fP (Pi [`]) = fP (Pj [` + 1]) and gP (Pi [`]) = gP (Pi [` + 1]). The list for Pi [`] is precisely {(i − 1)n3 + 3αn2 + t + β : 1 ≤ α ≤ p, −(k − 1) ≤ β ≤ (k − 1)}, so we can see immediately that fP (Pi [`]) = i and hence (by Proposition 3.4) gP (Pi [`]) = φ(i). The fact that fP (Pj [` + 1]) = i means that the only possible positions in the list for Pj [` + 1] are {(i − 1)n3 + 3rn2 + (` + 1) + β : −(k − 1) ≤ β ≤ (k − 1)}, where e = Vi [r]Vj [s] for some s ∈ {1, . . . , p}. We know, however, that gP (Pj [` + 1]) = φ(i), so it follows that Vi [φ(i)] is one endpoint of e. Applying symmetric reasoning to the Pj [`] and Pi [`+1] (which also occur consecutively on P ) tells us that Vj [φ(j)] is the other endpoint of e. We therefore have e = Vi [φ(i)]Vj [φ(j)], as required. Proposition 3.7. The set of edges selected by P is {Vi [φ(i)Vj [φ(j)] : 1 ≤ i < j ≤ k}. Proof. First observe that the only vertices which can possibly belong to fP−1 (i) are vertices which either belong to Pi , or else to an edge gadget Ge such that P selects e and one endpoint of e is in Vi . Suppose that P selects the gadget Ge where e = Vi [r]Vj [s]. If j > i, fP−1 (i) will contain precisely two vertices of Pj in Ge , but one vertex of Pi in Ge will not belong to fP−1 (i). If j < i, on the other hand, then fP−1 (i) will contain exactly one vertex of Pj in Ge , but two vertices of Pi in Ge will not belong to fP−1 (i). We now prove, by induction on i, that the set of edges P selects with one endpoint in V1 ∪ · · · ∪ Vi is precisely {V` [φ(`)]Vj [φ(j)] : 1 ≤ ` ≤ i}. We know from Proposition 3.5 that |fP−1 (1)| = 2n2 + k − 1 so, as |Pi | = 2n2 , we must have additional vertices belonging to fP−1 (1) from selected edges with an endpoint in V1 . For each such edge that P selects, the number of vertices in fP−1 (i) will be increased by exactly one, so we must select exactly k − 1 such edges. By Proposition 3.6, we know that the only edges we can select which have one endpoint in V1 are V1 [φ(1)]V2 [φ(2)], V1 [φ(1)]V3 [φ(3)], . . . , V1 [φ(1)]Vk [φ(k)], so in fact all of these edges must be selected. This completes the proof of the base case. For the inductive step, we will assume that all edges Vi [φ(i)]Vj [φ(j)] with 1 ≤ i < k 0 and i < j ≤ k are selected. We need to show that all edges Vk0 [φ(k 0 )]Vj [φ(j)] with k 0 < j ≤ k are also selected. We know from Proposition 3.5 that |fP−1 (k 0 )| = 2n2 + k + 1 − 2k 0 . Since |Pk0 | = 2n2 , and we know from the inductive hypothesis that exactly k 0 −1 edges Vi [φ(i)]Vk0 [φ(k 0 )] with i < k 0 are selected (each of which reduces the number of vertices in fP−1 (k 0 ) by one), it follows that there must be exactly 2n2 + k + 1 − 2k 0 − (2n2 − (k 0 − 1)) = k − k 0 edges selected with one endpoint in Vk0 and one endpoint in Vj for some j > k 0 . By Proposition 3.6, the only such edges which could be selected are Vk0 [φ(k 0 )]Vk0 +1 [φ(k 0 + 1)], . . . , Vk0 [φ(k 0 )]Vk [φ(k)]; it follows that all of these edges must be selected by P . This completes the proof by induction, and the result follows immediately. Proposition 3.8. The set of vertices {Vi [φ(i)] : 1 ≤ i ≤ k} induces a multicolour clique in G. Proof. It is immediate that this set of vertices is multicoloured, since it contains exactly one vertex from each vertex class V1 , . . . , Vk . Moreover, we know from Proposition 3.7 that P selects Vi [φ(i)]Vj [φ(j)] for each 1 ≤ i < j ≤ k, so Vi [φ(i)]Vj [φ(j)] must be an edge of G, for each 1 ≤ i < j ≤ k. Hence {Vi [φ(i)] : 1 ≤ i ≤ k} induces a clique. The fact that the existence of a valid Hamilton path in H implies the existence of a multicolour clique in G now follows immediately. Lemma 3.9. If (H, L) is a yes-instance for List Hamilton Path, then G is a yes-instance for Multicolour Clique. 14 It now remains only to bound the pathwidth of the graph H. Lemma 3.10. H has pathwidth at most 5k. Proof. We construct a path decomposition of H, indexed by a path T with |T | = |Q| + 2n2 − 5. Every bag of the decomposition contains the vertices Vend = {Pj [0], Pj [2n2 − 1] : 1 ≤ j ≤ k}. In addition, for 1 ≤ i ≤ |Q| − 1, the bag indexed by the ith node of T contains the ith and (i + 1)th vertices of Q, while, for |Q| ≤ i ≤ |Q| + 2n2 − 5, the bag indexed by the ith node of T contains all vertices {Pj [i − |Q| + 1], Pj [i − |Q| + 2], Pj [i − |Q| + 3] : 1 ≤ j ≤ k}. Note that every bag contains at most 5k vertices. It is immediate from this construction that, for any vertex v ∈ V (H), the nodes indexing bags that contain v induce a subpath of T . So it remains to show that, for every edge uv ∈ E(H), there exists some bag of the decomposition that contains both u and v. For all edges within Q this is clearly true. Note that, for 1 ≤ l ≤ 2n2 − 2, any vertex Pi [l] is only adjacent to vertices Pj [l0 ] where |l − l0 | ≤ 2, and so any edge between internal vertices of the paths P1 , . . . , Pk must have both its endpoints in some bag of the decomposition. All remaining edges are then incident with some v ∈ Vend , but Vend is contained in every bag, and so the condition is also satisfied for these edges. Hence we have a path decomposition of H of width at most 5k. We are now ready to prove the main theorem of this section. Proof of Theorem 3.1. It follows immediately from Lemmas 3.2 and 3.9 that (H, L) is a yes-instance for List Hamilton Path if and only if G is a yes-instance for Multicolour Clique. H has order polynomial in |G|, and can clearly be computed from G in polynomial time. Moreover, by Lemma 3.10 we know that the pathwidth of H depends only on the parameter k, the number of colours used in G. This completes the reduction to show that List Hamilton Path, parameterised by treewidth, is W[1]-hard. Moreover, the construction given above demonstrates that if there is an algorithm to solve List Hamilton Path in time f (k)no(k) on graphs of pathwidth k (for some function f ) then Multicolour Clique and hence Clique can be solved in time g(k)no(k) (for some function g); thus, by Theorem 1.3, there can be no such algorithm for List Hamilton Path unless the Exponential Time Hypothesis fails. 4 Conclusions and Open Problems We have proved that List Edge Chromatic Number and List Total Chromatic Number are fixed parameter tractable, parameterised by treewidth, although the List Edge Colouring and List Total Colouring problems are NP-hard on graphs of treewidth at most two. Thus, as for vertex colouring, it is computationally easier to calculate list edge or total chromatic number of a graph than to determine whether a given set of lists admits a proper colouring of the graph. We also demonstrated that List Hamilton Path is W[1]-hard, even when parameterised by pathwidth, giving another example of a problem that solvable in linear time on graphs of bounded treewidth but has a W[1]-hard list version. Our reduction also implies f (k)no(k) lower bound on the running time for any algorithm to solve this problem on graphs of treewidth k, under the exponential time hypothesis. A natural open question is whether List Hamilton Path may belong to FPT with respect to other parameters, such as the feedback vertex set size or the vertex cover number of the graph. More generally, it would be interesting to investigate whether there are further problems that are fixed parameter tractable parameterised by treewidth but have a list version which is W[1]-hard in this setting. 15 References [1] Noga Alon, Restricted colorings of graphs, Surveys in Combinatorics, 1993, Proceedings, 14th British Combinatorial Conference (K. Walker, ed.), London Mathematical Society Lecture Note Series, vol. 187, Cambridge University Press, 1993, pp. 1–33. [2] Stefan Arnborg and Andrzej Proskurowski, Linear time algorithms for NP-hard problems restricted to partial k-trees, Discrete Applied Mathematics 23 (1989), 11–24. [3] M. Behzad, Graphs and their chromatic numbers, Ph.D. thesis, Michigan State University, 1965. [4] Hans L. Bodlaender, A linear-time algorithm for finding tree-decompositions of small treewidth, SIAM Journal on Computing 25 (1996), no. 6, 1305–1317. [5] B. Bollobás and A. Harris, List-colourings of graphs, Graphs and Combinatorics 1 (1985), 115– 127. [6] Richard B. Borie, R. Gary Parker, and Craig A. Tovey, Automatic generation of linear-time algorithms from predicate calculus descriptions of problems on recursively constructed graph families, Algorithmica 7 (1992), 555–581. [7] O. V. Borodin, A. V. Kostochka, and D. R. Woodall, List edge and list total colourings of multigraphs, Journal of Combinatorial Theory, Series B 71 (1997), no. 2, 184–204. [8] Henning Bruhn, Richard Lang, and Maya Stein, List edge-coloring and total coloring in graphs of low treewidth, Journal of Graph Theory 81 (2016), no. 3, 272–282. [9] Jianer Chen, Benny Chor, Mike Fellows, Xiuzhen Huang, David Juedes, Iyad A. Kanj, and Ge Xia, Tight lower bounds for certain parameterized NP-hard problems, Information and Computation 201 (2005), no. 2, 216 – 231. [10] B. Courcelle, The monadic second-order logic of graphs I: recognizable sets of finite graphs, Information and Computation 85 (1990), 12–75. [11] Gruia Cǎlinescu, Cristina G. Fernandes, and Bruce Reed, Multicuts in unweighted graphs and digraphs with bounded degree and bounded tree-width, Journal of Algorithms 48 (2003), 333–359. [12] Rodney G. Downey and Michael R. Fellows, Fundamentals of parameterized complexity, Texts in Computer Science, Springer, 2013. [13] M. Fellows, D. Hermelin, F. Rosamond, and S. Vialette, On the fixed-parameter intractability and tractability of multiple-interval graph properties, Theoretical Computer Science 410 (2009), 53–61. [14] Michael R. Fellows, Fedor V. Fomin, Daniel Lokshtanov, Frances Rosamond, Saket Saurabh, Stefan Szeider, and Carsten Thomassen, On the complexity of some colorful problems parameterized by treewidth, Information and Computation 209 (2011), 143–153. [15] J. Flum and M. Grohe, Parameterized complexity theory, Springer, 2006. [16] F. Galvin, The list chromatic index of a bipartite multigraph, Journal of Combinatorial Theory, Series B 63 (1995), no. 1, 153–158. [17] M. R. Garey, D. S. Johnson, and R. Endre Tarjan, The planar Hamilton circuit problem is NP-complete, SIAM Journal on Computing 5 (1976), 704–714. 16 [18] Roland Häggkvist and Amanda Chetwynd, Some upper bounds on the total and list chromatic numbers of multigraphs, Journal of Graph Theory 16 (1992), no. 5, 503–516. [19] Ian Holyer, The NP-completeness of edge-coloring, SIAM J. on Computing 10 (1981), no. 4, 718–720. [20] Shuji Isobe, Xiao Zhou, and Takao Nishizeki, Total colourings of degenerate graphs, Combinatorica 27 (2007), no. 2, 167–182. [21] Klaus Jansen and Petra Scheffler, Generalized coloring for tree-like graphs, Discrete Applied Mathematics 75 (1997), 135–155. [22] Jeff Kahn, Asymptotics of the chromatic index for multigraphs, Journal of Combinatorial Theory, Series B 68 (1996), no. 2, 233–254. [23] M. S. Krishnamoorthy, An NP-hard problem in bipartite graphs, SIGACT News 7 (1975), 26–26. [24] Daniel Leven and Zvi Galil, NP completeness of finding the chromatic index of regular graphs, Journal of Algorithms 4 (1983), no. 1, 35–44. [25] Daniel Lokshtanov, Dániel Marx, Saket Saurabh, et al., Lower bounds based on the exponential time hypothesis, Bulletin of EATCS 3 (2013), no. 105. [26] Dániel Marx, NP-completeness of list coloring and precoloring extension on the edges of planar graphs, Journal of Graph Theory 49 (2005), 313–324. [27] Colin J.H. McDiarmid and Abdón Sánchez-Arroyo, Total colouring regular bipartite graphs is NP-hard, Discrete Mathematics 124 (1994), no. 1-3, 155–162. [28] D. Seese, Tree-partite graphs and the complexity of algorithms, Fundamentals of Computation Theory (Lothar Budach, ed.), Lecture Notes in Computer Science, vol. 199, Springer Berlin / Heidelberg, 1985, pp. 412–421. [29] V. G. Vizing, On an estimate of the chromatic class of a p-graph. (Russian), Diskret. Analiz 3 (1964), 25–30. [30] V. G. Vizing, Some unsovled problems in graph theory (Russian), Uspekhi Math. Nauk. 23 (1968), 117–134. [31] Xiao Zhou, Yuki Matsuo, and Takao Nishizeki, List total colorings of series-parallel graphs, Journal of Discrete Algorithms 3 (2005), 47–60. [32] Xiao Zhou, Shin-ichi Nakano, and Takao Nishizeki, Edge-colouring partial k-trees, Journal of Algorithms 21 (1996), 598–617. 17
8cs.DS
1 Nonlinear Bayesian Estimation: From Kalman Filtering to a Broader Horizon arXiv:1712.01406v2 [cs.SY] 14 Dec 2017 Huazhen Fang, Ning Tian, Yebin Wang, MengChu Zhou, and Mulugeta A. Haile Abstract—This article presents an up-to-date tutorial review of nonlinear Bayesian estimation. State estimation for nonlinear systems has been a challenge encountered in a wide range of engineering fields, attracting decades of research effort. To date, one of the most promising and popular approaches is to view and address the problem from a Bayesian probabilistic perspective, which enables estimation of the unknown state variables by tracking their probabilistic distribution or statistics (e.g., mean and covariance) conditioned on the system’s measurement data. This article offers a systematic introduction of the Bayesian state estimation framework and reviews various Kalman filtering (KF) techniques, progressively from the standard KF for linear systems to extended KF, unscented KF and ensemble KF for nonlinear systems. It also overviews other prominent or emerging Bayesian estimation methods including the Gaussian filtering, Gaussian-sum filtering, particle filtering and moving horizon estimation and extends the discussion of state estimation forward to more complicated problems such as simultaneous state and parameter/input estimation. Index Terms—State estimation, nonlinear Bayesian estimation, Kalman filtering, stochastic estimation. I. I NTRODUCTION S a core subject of control systems theory, state estimation for nonlinear dynamic systems has been undergoing active research and development for a few decades. Considerable attention is gained from a wide community of researchers, thanks to its significant applications in signal processing, navigation and guidance, and econometrics, just to name a few. When stochastic systems, i.e., systems subjected to the effects of noise, are considered, the Bayesian estimation approaches have evolved as a leading estimation tool enjoying wide popularity. Bayesian analysis traces back to the 1763 essay [1], published two years after the death of its author, Rev. Thomas Bayes. This seminal work was meant to tackle the following question: “Given the number of times in which an unknown event has happened and failed: Required the chance that the probability of its happening in a single trial lies somewhere between any two degrees of probability that can be named”. Rev. Bayes developed a solution to examine the case of only continuous probability, single parameter and A H. Fang and N. Tian are with the Department of Mechanical Engineering, University of Kansas, Lawrence, KS 66045, USA (e-mail: {fang, ning.tian}@ku.edu). Y. Wang is with the Mitsubishi Electric Research Laboratories, Cambridge, MA 02139, USA (e-mail: [email protected]). M. Zhou is with the Department of Electrical and Computer Engineering, New Jersey Institute of Technology, Newark, NJ 07102, USA (e-mail: [email protected]). M.A. Haile is with the Vehicle Technology Directorate, US Army Research Laboratory, Aberdeen, MD 21005, USA (e-mail: [email protected]). a uniform prior, which is an early form of the Bayes’ rule known to us nowadays. Despite its preciousness, this work remained obscure for many scientists and even mathematicians of that era. The change came when the French mathematician Pierre-Simon de Laplace rediscovered the result and presented the theorem in the complete and modern form. A historical account and comparison of Bayes’ and Laplace’s work can be found in [2]. From today’s perspective, the Bayes’ theorem is a probability-based answer to a philosophical question: How should one update an existing belief when given new evidence [3]? Quantifying the degree of belief by probability, the theorem modifies the original belief by producing the probability conditioned on new evidence from the initial probability. This idea was applied in the past century from one field to another whenever the belief update question arose, driving numerous intriguing explorations. Among them, a topic of relentless interest is Bayesian state estimation, which is concerned with determining the unknown state variables of a dynamic system using the Bayesian theory. The capacity of the Bayesian analysis to provide a powerful framework for state estimation has been well recognized now. A representative method within the framework is the wellknown Kalman filter (KF), which “revolutionized the field of estimation ... (and) opened up many new theoretical and practical possibilities” [4]. KF was initially developed by using the least squares in the 1960 paper [5] but reinterpreted from a Bayesian perspective in [6], only four years after its invention. Further envisioned in [6] was that “the Bayesian approach offers a unified and intuitive viewpoint particularly adaptable to handling modern-day control problems”. This investigation and vision ushered a new statistical treatment of nonlinear estimation problems, laying a foundation for prosperity of research on this subject. In this article, we offer a systematic and bottom-to-up introduction to major Bayesian state estimators, with a particular emphasis on the KF family. We begin with outlining the essence of Bayesian thinking for state estimation problems, showing that its core is the model-based prediction and measurement-based update of the probabilistic belief of unknown state variables. A conceptual KF formulation can be made readily in the Bayesian setting, which tracks the mean and covariance of the states modeled as random vectors throughout the evolution of the system. Turning a conceptual KF into executable algorithms requires certain approximations to nonlinear systems; and depending on the approximation adopted, different KF methods are derived. We demonstrate three primary members of the KF family in this context: extended KF (EKF), unscented KF (UKF), and ensemble 2 KF (EnKF), all of which have achieved proven success both theoretically and practically. A review of other important Bayesian estimators and estimation problems is also presented briefly in order to introduce the reader to the state of the art of this vibrant research area. II. A BAYESIAN V IEW OF S TATE E STIMATION We consider the following nonlinear discrete-time system: ( xk+1 = f (xk ) + wk , (1) yk = h(xk ) + vk , where xk ∈ Rnx is the unknown system state, and yk ∈ Rny the output, with both nx and ny being positive integers. The process noise wk and the measurement noise vk are mutually independent, zero-mean white Gaussian sequences with covariances Qk and Rk , respectively. The nonlinear mappings f : Rnx → Rnx and h : Rnx → Rny represent the process dynamics and the measurement model, respectively. The system in (1) is assumed input-free for simplicity of presentation, but the following results can be easily extended to an input-driven system. The state vector xk comprises a set of variables that fully describe the status or behavior of the system. It evolves through time as a result of the system dynamics. The process of states over time hence represents the system’s behavior. Because it is unrealistic to measure the complete state in most practical applications, state estimation is needed to infer xk from the output yk . More specifically, the significance of estimation comes from the crucial role it plays in the study of dynamic systems. First, one can monitor how a system behaves with state information and take corresponding actions when any adjustment is necessary. This is particularly important to ensure the detection and handling of internal faults and anomalies at the earliest phase. Second, high-performing state estimation is the basis for the design and implementation of many control strategies. The past decades have witnessed a rapid growth of control theories, and most of them, including optimal control, model predictive control, sliding mode control and adaptive control, premise the design on the availability of state information. While state estimation can be tackled in a variety of ways, the stochastic estimation has drawn remarkable attention and been profoundly developed in terms of both theory and applications. Today, it is still receiving continued interest and intense research effort. From a stochastic perspective, the system in (1) can be viewed as a generator of random vectors xk and yk . The reasoning is as follows. Owing to the initial uncertainty or lack of knowledge of the initial condition, x0 can be considered as a random vector subject to variation due to chance. Then, f (x0 ) represents a nonlinear transformation of x0 , and its combination with w0 modeled as another random vector generates a new random vector x1 . Following this line, xk for any k is a random vector, and the same idea applies to yk . In practice, one can obtain the sensor measurement of the output at each time k, which can be considered as a sample drawn from the distribution of the random vector yk . For simplicity of notation, we also denote the output measurement as yk and the measurement set at time k as k := {y1 , y2 , · · · , yk }. The state estimation then is to build an estimate of xk using k at each time k. To this end, one’s interest then lies in how to capture p(xk | k ), i.e., the probability density function (pdf) of xk conditioned on k . This is because p(xk | k ) captures the information of xk conveyed in k and can be leveraged to estimate xk . A “prediction-update” procedure1 can be recursively executed to obtain p(xk | k ). Standing at time k − 1, we can predict what p(xk | k−1 ) is like using p(xk−1 | k−1 ). When the new measurement yk conveying information about xk arrives, we can update p(xk | k−1 ) to p(xk | k ). Characterizing a probabilistic belief about xk before and after the arrival of yk , p(xk | k−1 ) and p(xk | k ) are referred to as the a priori and a posteriori pdf’s, respectively. Specifically, the prediction at time k − 1, demonstrating the pass from p(xk−1 | k−1 ) to p(xk | k−1 ), is given by Z p(xk | k−1 ) = p(xk |xk−1 )p(xk−1 | k−1 )dxk−1 . (2) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Let us explain how to achieve (2). By the ChapmanKolmogorov equation, it can be seen that Z p(xk | k−1 ) = p (xk , xk−1 | k−1 ) dxk−1 , Y Y which, according to the Bayes’ rule, can be written as Z p(xk | k−1 ) = p(xk |xk−1 , k−1 )p(xk−1 | k−1 )dxk−1 . Y Y Y Y It reduces to (2), because p(xk |xk−1 , k−1 ) = p(xk |xk−1 ) as a result of the Markovian propagation of the state. Then on the arrival of yk , p(xk | k−1 ) can be updated to yield p(xk | k ), which is governed by Y |xk )p(xk |Yk−1 ) . Yk ) = p(ykp(y k |Yk−1 ) p(xk | Y (3) The above equation is also owing to the use of the Bayes’ rule: Yk ) = p(xp(kY, Yk )k ) = p(xp(yk ,ky,kY, Yk−1k−1) ) p(yk |xk , Yk−1 )p(xk , Yk−1 ) = p(yk , Yk−1 ) p(yk |xk , Yk−1 )p(xk |Yk−1 ) = . p(yk |Yk−1 ) Note that we have p(yk |xk , Yk−1 ) = p(yk |xk ) from the fact p(xk | that yk only depends on xk . Then, (3) is obtained. Together, (2)-(3) represent the fundamental principle of Bayesian state estimation for the system in (1), describing the sequential propagation of the a priori and a posteriori pdf’s. The former captures our belief over the unknown quantities in the presence of only the prior evidence, and the latter updates this belief using the Bayesian theory when new evidence becomes available. The two steps, prediction and update, are executed alternately through time, as illustrated in Fig. 1. 1 The two steps are equivalently referred to as ‘time-update’ and ‘measurement-update’, or ‘forecast’ and ‘analysis’, in different literature. 3 the problem further, certain Gaussianity approximations can be made because of the mathematical tractability and statistical soundness of Gaussian distributions (for the reader’s convenience, several properties of the Gaussian distribution to be used next are summarized in the Appendix.). Proceeding in this direction, we can reach a formulation of the Kalman filtering (KF) methodology, as shown below. In order to predict xk at time k − 1, we consider the minimum-variance unbiased estimation, which gives that the best estimate of xk given k−1 , denoted as x̂k|k−1 , is E(xk | k−1 ) [7, Theorem 3.1]. That is, Z x̂k|k−1 = E(xk | k−1 ) = xk p(xk | k−1 )dxk . (4) Y Y Fig. 1. The Bayesian filtering principle. The running of a dynamic system propagates the state xk through time and produces output measurement yk at each time k. For the purpose of estimation, the Bayesian filtering principle tracks the pdf of xk given the measurement set k = {y1 , y2 , · · · , yk }. It consists of two steps sequentially implemented: the prediction step from p(xk−1 | k−1 ) to p(xk | k−1 ), and the update step from p(xk | k−1 ) to p(xk | k ) upon the arrival of yk . Y Y Y Y Y Y Y Inserting (2) into the above equation, we have  Z Z x̂k|k−1 = xk p(xk |xk−1 )dxk Yk−1)dxk−1. · p(xk−1 | Looking at the above Bayesian filtering principle, we can summarize three elements that constitute the thinking of Bayesian estimation. First, all the unknown quantities or uncertainties in a system, e.g., state, are viewed from the probabilistic perspective. In other words, any unknown variable is regarded as a random variable. Second, the output measurements of the system are samples drawn from a certain probability distribution dependent on the concerned variables. They provide data evidence for state estimation. Finally, the system model represents transformations that the unknown and random state variables undergo over time. Originating from the philosophical abstraction that anything unknown, in one’s mind, is subject to variations due to chance, the randomnessbased representation enjoys universal applicability even when the unknown or uncertain quantities are not necessarily random in physical sense. In addition, it can easily translate into a convenient ‘engineering’ way for estimation of the unknown variables, as will be shown in the following discussions. By assuming that wk is a white Gaussian noise independent R of xk , we have xk |xk−1 ∼ N (f (xk−1 ), Q) and then xk p(xk |xk−1 )dxk = f (xk−1 ) according to (A.1). Hence, (5) becomes Z x̂k|k−1 = f (xk−1 )p(xk−1 | k−1 )dxk−1 Y Yk−1)] . = E [f (xk−1 | (6) For x̂k|k−1 in (6), the associated prediction error covariance is   x Pk|k−1 = E (xk − x̂k|k−1 )(xk − x̂k|k−1 )> Z = (xk − x̂k|k−1 )(xk − x̂k|k−1 )> p(xk | k−1 )dxk . (7) Y With the use of (2) and (A.1), we can obtain Z x > Pk|k−1 = xk x> k p(xk | k−1 )dxk − x̂k|k−1 x̂k|k−1  Z Z = xk x> p(x |x )dx p(xk−1 | k−1 )dxk−1 k k−1 k k Y Y III. F ROM BAYESIAN F ILTERING TO K ALMAN F ILTERING In the above discussion, we have shown the probabilistic nature of state estimation and presented the Bayesian filtering principle (2)-(3) as a solution framework. However, this does not mean that one can simply use (2)-(3) to track the conditional pdf of a random vector passing through nonlinear transformations, because the nonlinearity often makes it difficult or impossible to derive an exact or closed-form solution. This challenge turns against the development of executable state estimation algorithms, since a dynamic system’s state propagation and observation are based on the nonlinear functions of the random state vector xk , i.e., f (xk ) and h(xk ). Yet for the sake of estimation, one only needs the statistics (mean and covariance) of xk conditioned on the measurements in most circumstances, rather than a full grasp of its conditional pdf. A straightforward and justifiable way is to use the mean as the estimate of xk and the covariance as the confidence (or equivalently, uncertainty) measure. Reducing the pdf tracking to the mean and covariance tracking can significantly mitigate the difficulty in the design of state estimators. To simplify (5) Z − x̂k|k−1 x̂> k|k−1   f (xk−1 )f > (xk−1 ) + Q p(xk−1 | Z − x̂k|k−1 x̂> k|k−1   > f (xk−1 ) − x̂k|k−1 f (xk−1 ) − x̂k|k−1 = = Yk−1)dxk−1 Yk−1)dxk−1 + Q = Cov [f (xk−1 )|Yk−1 ] + Q. · p(xk−1 | (8) When yk becomes available, we assume that p(xk , yk | k−1 ) can be approximated by a Gaussian distribution    xy x   Pk|k−1 Pk|k−1 x̂  , (9) N  k|k−1 ,  xy > ŷk|k−1 P Py Y k|k−1 k|k−1 where ŷk|k−1 is the prediction of yk given as Z ŷk|k−1 = E(yk | k−1 ) = yk p(yk | Y Yk−1 and expressed Yk−1)dyk . (10) 4 Y a Gaussian approximation can be constructed for p (xk | k ). Its mean and covariance can be expressed as −1  y xy (yk − ŷk|k−1 ), (16) Pk|k−1 x̂k|k = x̂k|k−1 + Pk|k−1 | {z } Kalman gain > −1   xy y xy x x . Pk|k−1 Pk|k−1 − Pk|k−1 = Pk|k−1 Pk|k Fig. 2. A schematic sketch of the KF technique. KF performs the predictionupdate procedure recursively to track the mean and covariance of xk for estimation. The equations show that its implementation depends on determining the mean and covariance of the random state vector through nonlinear functions f (·) and h(·). The associated covariance is Z >  y Pk|k−1 = yk − ŷk|k−1 yk − ŷk|k−1 Yk−1) dyk . · p (yk | (11) It is noted that Yk−1) = Yk−1)dxk Z p(yk | p(yk |xk )p(xk | = Yk−1)dxk . IV. S TANDARD L INEAR K ALMAN F ILTER (12) Combining (10)-(11) with (12) yields  Z Z ŷk|k−1 = yk p(yk |xk )dyk p(xk | k−1 )dxk Z = h(xk )p(xk | k−1 )dxk = E [h(xk )| k−1 ] , Y Y Y (13) Z h(xk ) − ŷk|k−1  h(xk ) − ŷk|k−1 > Yk−1)dxk + R = Cov [h(xk )|Yk−1 ] + R. · p(xk | (14) The cross-covariance between xk and yk is ZZ  > xy Pk|k−1 = xk − x̂k|k−1 yk − ŷk|k−1 Z · p (xk , yk | Z  xk − x̂k|k−1 yk − ŷk|k−1 > Yk−1) dxk  p (yk |xk ) dyk · p (xk | Z = xk − x̂k|k−1 = Cov [xk , h(xk )|  h(xk ) − ŷk|k−1 Yk−1] . > In this section, KF for linear systems is reviewed briefly to pave the way for discussion of nonlinear KFs. Consider a linear time-invariant discrete-time system of the form ( xk+1 = F xk + wk , (18) yk = Hxk + vk , where: 1) {wk } and {vk } are zero-mean white Gaussian noise sequences with wk ∼ N (0, Q) and vk ∼ N (0, R), 2) x0 is Gaussian with x0 ∼ N (x̄0 , P0 ), and 3) x0 , {wk } and {vk } are independent of each other. Note that, under these conditions, the Gaussian assumptions in Section III will exactly hold for the linear system in (18). The standard KF for the linear dynamic system in (18) can be readily derived from the conceptual KF summarized in Fig. 2. Since the system is linear and under a Gaussian setting, p (xk−1 | k−1 ) and p (xk | k−1 ) are strictly Gaussian according to the properties of Gaussian  vectors. Specifically,  x xk−1 | k−1 ∼ N x̂k−1|k−1 , Pk−1|k−1 and xk | k−1 ∼   x N x̂k|k−1 , Pk|k−1 . According to (6) and (8), the prediction is Y Yk−1) dxk dyk = Putting together (6)-(8), (13)-(14) and (15)-(17), we can establish a conceptual description of the KF technique, which is outlined in Fig. 2. Built in the Bayesian-Gaussian setting, it conducts state estimation through tracking the mean and covariance of a random state vector. It is noteworthy that one needs to develop explicit expressions to enable the use of the above KF equations. The key that bridges the gap is to find the mean and covariance of a random vector passing through nonlinear functions. For linear dynamic systems, the development is straightforward, because, in the considered context the involved pdf’s are strictly Gaussian and the linear transformation of the Gaussian state variables can be readily handled. The result is the standard KF to be shown in the next section. However, complications arise in the case of nonlinear systems. This issue has drawn significant interest from researchers. A wide range of ideas and methodologies have been developed, leading to a family of nonlinear KFs. The three most representative among them are EKF, UKF, and EnKF to be introduced following the review of the linear KF. p(xk , yk | Z y Pk|k−1 = (17) Yk−1) dxk p (xk | (15) For two jointly Gaussian random vectors, the conditional distribution of one given another is also Gaussian, which is summarized in (A.4) in Section IV. It then follows from (9) that Y Y Y Yk−1) = F x̂k−1|k−1, Yk−1) + Q x̂k|k−1 = E (F xk−1 | (19) x Pk|k−1 = Cov (F xk−1 | x = F Pk−1|k−1 F > + Q, (20) The update can be accomplished along the similar lines. y Based on (13)-(15), we have ŷk|k−1 = H x̂k|k−1 , Pk|k−1 = 5 EKF and UKF in the field of control systems and the EnKF popular in the data assimilation community. A. Extended Kalman Filter Fig. 3. A schematic of the KF/EKF structure, modified from [8]. KF/EKF comprises two steps sequentially executed through time, prediction and update. For prediction, xk is predicted by using the data up to time k − 1. The forecast is denoted as x̂k|k−1 and subject to uncertainty quantified by the prediction error covariance Pk|k−1 . The update step occurs upon the arrival of the new measurement yk . In this step, yk is leveraged to correct x̂k|k−1 and produce the updated estimate x̂k|k . Meanwhile, Pk|k−1 is updated to generate Pk|k to quantify the uncertainty imposed on x̂k|k . xy HPk|k−1 H > + R, and Pk|k−1 = Pk|k−1 H > . Then, as indicated by (16)-(17), the updated state estimate is  −1 x x x̂k|k = x̂k|k−1 + Pk|k−1 H > HPk|k−1 H> + R {z } | Kalman gain x Pk|k  · yk − H x̂k|k−1 , (21)  −1 x x x = Pk|k−1 − Pk|k−1 H > HPk|k−1 H> + R x · HPk|k−1 . (22) Together, (19)-(22) form the linear KF. Through the predictionupdate procedure, it generates the state estimates and associated estimation error covariances recursively over time when the output measurement arrives. From the probabilistic perspective, x̂k|k and Pk|k together determine the Gaussian distribution of xk conditioned on k . The covariance, quantifying how widely the random vector xk can potentially spread out, can be interpreted as a measure of the confidence on or uncertainty of the estimate. A schematic diagram of the KF is shown in Fig. 3 (it can also be used to demonstrate EKF to be shown next). 1 Given that (F, H) is detectable and (F, Q 2 ) stabilizable, x Pk|k−1 converges to a fixed point, which is the solution to a discrete-time algebraic Riccati equation (DARE) Y X = F XF > − F XH > (HXH > + R)−1 HXF > + Q. This implies that KF can approach a steady state after a few time instants. With this idea, one can design a steady-state KF by solving DARE offline to obtain the Kalman gain and then apply it to run KF online, as detailed in [7]. Obviating the need for computing the gain and covariance at every time instant, the steady-state KF, though suboptimal, presents higher computational efficiency than the standard KF. V. R EVIEW OF N ONLINEAR K ALMAN F ILTERS In this section, an introductory overview of the major nonlinear KF techniques is offered, including the celebrated EKF is arguably the most celebrated nonlinear state estimation technique, with numerous applications across a variety of engineering areas and beyond [9]. It is based on the linearization of nonlinear functions around the most recent state estimate. When the state estimate x̂k−1|k−1 is generated, consider the first-order Taylor expansion of f (xk−1 ) at this point:  f (xk−1 ) ≈ f (x̂k−1|k−1 ) + Fk−1 xk−1 − x̂k−1|k−1 , (23) ∂f . (24) Fk−1 = ∂x x̂k−1|k−1 Y For simplicity, let p(xk−1 | k−1 ) be approximated by a disx tribution with mean x̂k−1|k−1 and covariance Pk−1|k−1 . Then inserting (23) to (6)-(8), we can readily obtain the one-stepforward prediction  (25) x̂k|k−1 = E [f (xk−1 | k−1 )] ≈ f x̂k−1|k−1 , Y x Pk|k−1 Yk−1] + Q = Cov [xk | = x > Fk−1 Pk−1|k−1 Fk−1 + Q. (26) Looking into (23), we find that the Taylor expansion approximates the nonlinear transformation of the random vector xk by an affine one. Proceeding on this approximation, we can easily estimate the mean and covariance of f (xk−1 ) once provided the mean and covariance information of xk−1 conditioned on k−1 . This, after being integrated with the effect of the noise wk on the prediction error covariance, establishes a prediction of xk , as specified in (25)-(26). After x̂k|k−1 is produced, we can investigate the linearization of h(xk ) around this new operating point in order to update the prediction. That is,   (27) h(xk ) ≈ h x̂k|k−1 + Hk xk − x̂k|k−1 , ∂h Hk = . (28) ∂x x̂k|k−1 Y Y Similarly, we assume that p(xk | k−1 ) can be replaced by x a distribution with mean x̂k|k−1 and covariance Pk|k−1 . Using (27), the evaluation of (13)-(15) yields ŷ ≈ k|k−1  y xy x Hk> + R, and Pk|k−1 h x̂k|k−1 , Pk|k−1 ≈ Hk Pk|k−1 ≈ x > Pk|k−1 Hk . Here, the approximate mean and covariance information of h(xk ) and yk are obtained through the linearization of h(xk ) around x̂k|k−1 . With the aid of the Gaussianity assumption in (9), an updated estimate of xk is produced as follows:  −1 x x Hk> + R x̂k|k = x̂k|k−1 + Pk|k−1 Hk> Hk Pk|k−1   · yk − h x̂k|k−1 , (29)  −1 x x x x Pk|k = Pk|k−1 − Pk|k−1 Hk> Hk Pk|k−1 Hk> + R x · Hk Pk|k−1 . (30) 6 Then, EKF consists of (25)-(26) for prediction and (29)-(30) for update. When comparing it with the standard KF in (19)(22), we can find that they share significant resemblance in structure, except that EKF introduces the linearization procedure to accommodate the system nonlinearities. Since the 1960s, EKF has gained wide use in the areas of aerospace, robotics, biomedical, mechanical, chemical, electrical and civil engineering, with great success in the real world witnessed. This is often ascribed to its relative easiness of design and execution. Another important reason is its good convergence from a theoretical viewpoint. In spite of the linearization-induced errors, EKF has provable asymptotic convergence under some conditions that can be satisfied by many practical systems [10–14]. However, it also suffers from some shortcomings. The foremost one is the inadequacy of its first-order accuracy for highly nonlinear systems. In addition, the need for explicit derivative matrices not only renders EKF futile for discontinuous or other nondifferentiable systems, but also pulls it away from convenient use in view of programming and debugging, especially when nonlinear functions of a complex structure are faced. This factor, together with the computational complexity at O(n3x ), limits the application of EKF to only low-dimensional systems. Some modified EKFs have been introduced for improved accuracy or efficiency. In this regard, a natural extension is through the second-order Taylor expansion, which leads to the second-order EKF with more accurate estimation [15– 17]. Another important variant, named iterated EKF (IEKF), iteratively refines the state estimate around the current point at each time instant [18–20]. Though requiring an increased computational cost, it can achieve higher estimation accuracy even in the presence of severe nonlinearities in systems. B. Unscented Kalman Filter As the performance of EKF degrades for systems with strong nonlinearities, researchers have been seeking better ways to conduct nonlinear state estimation. In the 1990s, UKF was invented [21, 22]. Since then, it has been gaining significant popularity among researchers and practitioners. This technique is based on the so-called “unscented transform (UT)”, which exploits the utility of deterministic sampling to track the mean and covariance information of a random variable passing through a nonlinear transformation [23–25]. The basic idea is to approximately represent a random variable by a set of sample points (sigma points) chosen deterministically to completely capture the mean and covariance. Then, projecting the sigma points through the nonlinear function concerned, one obtains a new set of sigma points and then use them to form the mean and covariance of the transformed variable for estimation. To explain how UT tracks the statistics of a nonlinearly transformed random variable, we consider a random variable x ∈ n and a nonlinear function z = g(x). It is assumed that the mean and covariance of x are x̄ and Px , respectively. The UT proceeds as follows [23, 24]. First, a set of sigma points {xi , i = 0, 1, · · · , 2n} are chosen deterministically: R x0 = x̄, (31) Fig. 4. A schematic sketch of the UT procedure, adapted from [23]. A set of sigma points (blue dots) are generated first according to the initial mean (red five-pointed star) and covariance (red ellipse) (left) and projected through the nonlinear function to generate a set of new sigma points (right). The new sigma points are then used to calculate the new mean (green star) and covariance (green ellipse). xi = x̄ + xi+n = x̄ − √ √ n+λ hp n+λ hp Px Px i ii , i = 1, 2, · · · , n, (32) , i = 1, 2, · · · , n, (33) i where [·]i represents the i-th column of the matrix and the √ √ > matrix square root is defined by P P = P achievable through the Cholesky decomposition. The sigma points spread across the space around x̄. The width of spread is dependent on the covariance P and the scaling parameter λ, where λ = α2 (n + κ) − n. Typically, α is a small positive value (e.g., 10−3 ), and κ is usually set to 0 or 3 − n [21]. Then the sigma points are propagated through the nonlinear function g(·) to generate the sigma points for the transformed variable z, i.e.,  z i = g xi , i = 0, 1, · · · , 2n. The mean and covariance of z are estimated as 2n X (m) z̄ = E [g(x)] ≈ Wi z i , (34) i=0 h i > Pz = E (g(x) − z̄) (g(x) − z̄) ≈ 2n X (c) Wi z i − z̄  z i − z̄ > , (35) i=0 where the weights are (m) W0 (c) W0 (m) Wi λ , n+λ λ = + (1 − α2 + β), n+λ 1 (c) = Wi = , i = 1, 2, · · · , 2n. 2(n + λ) = (36) (37) (38) The parameter β in (37) can be used to include prior information on the distribution of x. When x is Gaussian, β = 2 is optimal. The UT procedure is schematically shown in Fig. 4. To develop UKF, it is necessary to apply UT at both prediction and update steps, which involve nonlinear state transformations based on f and h, respectively. For prediction, suppose that the mean and covariance of xk−1 , x̂k−1|k−1 and x Pk−1|k−1 , are given. To begin with, the sigma points for xk−1 are generated: (0) x̂k−1|k−1 = x̂k−1|k−1 , (39) 7 (i) x̂k−1|k−1 = x̂k−1|k−1 + (i+n ) x x̂k−1|k−1 = x̂k−1|k−1 − p p nx + λ hq x Pk−1|k−1 i , i i = 1, 2, · · · , nx , (40) i hq x , nx + λ Pk−1|k−1 i i = 1, 2, · · · , nx . (41) Then, they are propagated forward through the nonlinear function f (·), that is,   −(i) (i) x̂k|k−1 = f x̂k−1|k−1 , i = 0, 1, · · · , 2nx . (42) These new sigma points are considered capable of capturing the mean and covariance of f (xk−1 ). Using them, the prediction of xk can be achieved as follows: 2nx X Yk−1] = Wi(m)x̂−(i) k|k−1 , i=0 x = Cov [f (xk−1 ) |Yk−1 ] + Q Pk|k−1 x̂k|k−1 = E [f (xk−1 ) | = 2nx X (c) Wi  −(i) x̂k|k−1 − x̂k|k−1 (43)  > −(i) x̂k|k−1 − x̂k|k−1 i=0 + Q. (44) By analogy, the sigma points for xk need to be generated first in order to perform the update, which are +(0) x̂k|k−1 = x̂k|k−1 , +(i) x̂k|k−1 = x̂k|k−1 + +(i+n ) x̂k|k−1 x (45) p hq i x nx + λ Pk|k−1 , i i = 1, 2, · · · , nx , hq i p x Pk|k−1 , = x̂k|k−1 − nx + λ (46) i = 1, 2, · · · , nx . (47) i Propagating them through h(·), we can obtain the sigma points for h(xk ), given by   (i) +(i) (48) ŷk|k−1 = h x̂k|k−1 , i = 0, 1, · · · , 2nx . The predicted mean and covariance of yk and the predicted cross-covariance between xk and yk are as follows: 2nx X (i) Yk−1] = Wi(m)ŷk|k−1 , i=0 y Pk|k−1 = Cov [h(xk )|Yk−1 ] + R ŷk|k−1 = E [yk | = 2nx X (c) Wi (49)   > (i) (i) ŷk|k−1 − ŷk|k−1 ŷk|k−1 − ŷk|k−1 + R, i=0 xy Pk|k−1 2nx X = Yk−1] = Cov [xk , h(xk )| (c) Wi  +(i) x̂k|k−1 − x̂k|k−1 (50) (51)  > (i) ŷk|k−1 − ŷk|k−1 , (52) i=0 With the above quantities becoming available, the Gaussian update in (16)-(17) can be leveraged to enable the projection from the predicted estimate x̂k|k−1 to the updated estimate x̂k|k . Summarizing the above equations leads to UKF sketched in Fig. 5. Compared with EKF, UKF incurs a computational Fig. 5. A schematic of UKF. Following the prediction-update procedure, UKF tracks the mean and covariance of state xk using sigma points chosen deterministically. A state estimate is graphically denoted by a red five-pointed star mean surrounded by a covariance ellipse, and the sigma points are colored in blue dots. cost of the same order O(n3x ) but offers second-order accuracy [23], implying an overall smaller estimation error. In addition, its operations are derivative-free, exempt from the burdensome calculation of the Jacobian matrices in EKF. This will not only bring convenience to practical implementation but also imply its applicability to discontinuous undifferentiable nonlinear transformations. Yet, it is noteworthy that, with a complexity of O(n3x ) and operations of 2nx + 1 sigma points, UKF faces substantial computational expenses when the system is high-dimensional with a large nx , thus unsuitable for this kind of estimation problems. Owing to its merits, UKF has seen a growing momentum of research since its advent. A large body of work is devoted to the development of modified versions. In this respect, square-root UKF (SR-UKF) directly propagates a square root matrix, which enjoys better numerical stability than squaring the propagated covariance matrices [26]; iterative refinement of the state estimate can also be adopted to enhance UKF as in IEKF , leading to iterated UKF (IUKF). The performance of UKF can be improved by selecting the sigma points in different ways. While the standard UKF employs symmetrically distributed 2nx + 1 sigma points, asymmetric point sets or sets with a larger number of points may bring 8 better accuracy [27–30]. Another interesting question is the determination of the optimal scaling parameter κ, which is investigated in [31]. UKF can be generalized to the so-called sigma-point Kalman filtering (SPKF), which refers to the class of filters that uses deterministic sampling points to determine the mean and covariance of a random vector through nonlinear transformation [32, 33]. Other SPKF techniques include the central-difference Kalman filter (CDKF) and Gauss-Hermite filter (GHKF), which perform sigma-point-based filtering and can also be interpreted from the perspective of Gaussianquadrature-based filtering [34] (GHKF will receive further discussion in Section VII). where vki is generated as per the Gaussian distribution N (0, R) to delineate the measurement noise vk . The sample mean of this ensemble is ŷk|k−1 = Ns 1 X (i) ŷ , Ns i=1 k|k−1 with the associated sample covariance N y = Pk|k−1 s   X 1 (i) ŷk|k−1 − ŷk|k−1 Ns − 1 i=1  > (i) · ŷk|k−1 − ŷk|k−1 . The cross-covariance between xk and yk given C. Ensemble Kalman Filter Y Y The sample mean and covariance of this ensemble can be calculated as: Ns X Yk−1) ≈ N1s x̂(i) k|k−1 , i=1 x Pk|k−1 = Cov (xk |Yk−1 ) (54) N ≈ s   > X 1 (i) (i) x̂k|k−1 − x̂k|k−1 x̂k|k−1 − x̂k|k−1 , Ns − 1 i=1 (55) which form the prediction formulae. The update step begins with the construction of the ensemble for p (yk | k−1 ) by means of   (i) (i) (i) ŷk|k−1 = h x̂k|k−1 + vk , i = 1, 2, · · · , Ns (56) Y (58) Yk−1 is N Since its early development in [35–37], ensemble Kalman filter (EnKF) has established a strong presence in the field of state estimation for large-scale nonlinear systems. Its design is built on an integration of KF with the Monte Carlo method, which is a prominent statistical method concerning simulationbased approximation of probability distributions using samples directly drawn from certain distributions. Basically, EnKF maintains an ensemble representing the conditional distribution of a random state vector given the measurement set. The state estimate is generated from the sample mean and covariance of the ensemble. In view of the sample-based approximation of probability distributions, EnKF shares similarity with UKF; however, the latter employs deterministic sampling while EnKF adopts non-deterministic sampling. (i) Suppose that there is an ensemble of samples, x̂k−1|k−1 for i = 1, 2, · · · , Ns , drawn from p(xk−1 | k−1 ) to approximately (i) represent this pdf. Next, let an ensemble of samples, {wk−1 } for i = 1, 2, · · · , Ns , be drawn independently and identically from the Gaussian distribution N (0, Q) in order to account (i) for the process noise wk−1 at time k − 1. Then, x̂k−1|k−1 can o n (i) hence be projected to generate a priori ensemble x̂k|k−1 that represents p(xk | k−1 ) as follows:   (i) (i) (i) x̂k|k−1 = f x̂k−1|k−1 + wk−1 , i = 1, 2, · · · , Ns (53) x̂k|k−1 = E (xk | (57) xy = Pk|k−1 s   X 1 (i) x̂k|k−1 − x̂k|k−1 Ns − 1 i=1  > (i) · ŷk|k−1 − ŷk|k−1 . (59) Once it arrives, the latest measurement yk can be applied to update each member of a priori ensemble in the way defined by (16), i.e.,   −1  (i) (i) (i) xy y x̂k|k = x̂k|k−1 + Pk|k−1 Pk|k−1 yk − ŷk|k−1 , i = 1, 2, · · · , Ns . (60) n o (i) This a posteriori ensemble x̂k|k can be regarded as an approximate representation of p(xk | k ). Then, the updated estimation of the mean and covariance of xk can be achieved by Y x̂k|k = Ns 1 X x̂i , Ns i=1 k|k (61) N x Pk|k s   > X 1 (i) (i) . x̂k|k − x̂k|k x̂k|k − x̂k|k = Ns − 1 i=1 (62) The above ensemble-based prediction and update will be repeated recursively, forming EnKF. Note that the computation of estimation error covariance in (55) and (62) can be skipped if a user has no interest in learning about the estimation accuracy. This can further cut down EnKF’s storage and computational cost. EnKF is illustrated schematically in Fig. 6. It features direct operation on the ensembles as a Monte Carlo-based extension of KF. Essentially, it represents the pdf of a state vector by using an ensemble of samples, propagates the ensemble members and makes estimation by computing the mean and covariance of the ensemble at each time instant. Its complexity is O(n3y + n2y Ns + ny Ns2 + nx Ns2 ) (nx  ny and nx  Ns for high-dimensional systems) [38], which contrasts with O(n3x ) of EKF and UKF. This, along with the derivativefree computation and freedom from covariance matrix propagation, makes EnKF computationally efficient and appealing to be the method of choice for high-dimensional nonlinear systems. An additional contributing factor in this respect is that the ensemble-based computational structure places it in an advantageous position for parallel implementation [39]. It has 9 ψ̇dr = αLm ids − αψdr − ψqr ω, ψ̇qr = αLm iqs + ψdr ω − αψqr , µ TL ω̇ = (−ids ψqr + ψdr iqs ) − , J J   i y = ds , iqs Fig. 6. A schematic of EnKF. EnKF maintains an ensemble of sample points for the state vector xk . It propagates and updates the ensemble to track the distribution of xk . The state estimation is conducted by calculating the sample mean (red five-pointed-star) and covariance (red ellipse) of the ensemble. been reported that convergence of the EnKF can be fast even with a reasonably small ensemble size [40, 41]. In particular, its convergence to KF in the limit for large ensemble size and Gaussian state probability distributions is proven in [41]. VI. A PPLICATION TO S PEED S ENSORLESS I NDUCTION M OTORS This section presents a case study of applying EKF, UKF and EnKF to state estimation for speed sensorless induction motors. Induction motors are used as an enabling component for numerous industrial systems, e.g., manufacturing machines, belt conveyors, cranes, lifts, compressors, trolleys, electric vehicles, pumps, and fans [42]. In an induction motor, electromagnetic induction from the magnetic field of the stator winding is used to generate the electric current that drives the rotor to produce torque. This dynamic process must be delicately controlled to ensure accurate and responsive operations. Hence, control design for this application was researched extensively during the past decades, e.g., [42–44]. Recent years have seen a growing interest in speed sensorless induction motors, which have no sensors to measure the rotor speed to reduce costs and increase reliability. However, the absence of the rotor speed makes control design more challenging. To address this challenge, state estimation is exploited to recover the speed and other unknown variables. It is also noted that an induction motor as a multivariable and highly nonlinear system makes a valuable benchmark for evaluating different state estimation approaches [44, 45]. The induction motor model in a stationary two-phase reference frame can be written as i̇ds = −γids + αβψdr + βψqr ω + uds /σ, i̇qs = −γiqs − βψdr ω + αβψqr + uqs /σ, where (ψdr , ψqr ) is the rotor fluxes, (ids , iqs ) is the stator currents, and (uds , uqs ) is the stator voltages, all defined in a stationary d-q frame. In addition, ω is the rotor speed to be estimated, J is the rotor inertia, TL is the load torque, and y is the output vector composed of the stator currents. The rest symbols are parameters, where σ = Ls (1 − L3m /Ls Lr ), α = Rr /Lr , β = Lm /σLr , γ = Rs /σ + αβLm , µ = 3Lm /2Lr ; (Rs , Ls ) and (Rr , Lr ) are the resistance-inductance pairs of the stator and rotor, respectively; Lm is the mutual inductance. As shown above, the state vector x comprises ids , iqs , ψdr , ψqr , and ω. The parameter setting follows [46]. Note that, because of the focus on state estimation, an open-loop control scheme is considered with uds (t) = 380 sin(100πt) and uqs (t) = −380 sin(200πt). The state estimation problem is then to estimate the entire state vector through time using the measurement data of ids , iqs , uds and uqs . In the simulation, the model is initialized with x0 = [0 0 0 0 0]> . The initial state guess for all the filters is set to be x̂0|0 = [1 1 1 1 1]> and P0x = 10−2 I. For EnKF, its estimation accuracy depends on the ensemble size. Thus, different sizes are implemented to examine this effect, with Ns = 40, 100, 200 and 400. To make a fair evaluation, EnKF with each Ns is run for 100 times as a means to reduce the influence of randomly generated noise. The estimation error for each run P is defined as k kxk − x̂k|k k2 ; the errors from the 100 runs are averaged to give the final estimation error for comparison. Fig. 7 shows the estimation errors for ω along with ±3σ bounds in a simulation run of EKF, UKF and EnKF with ensemble size of 100 (here, σ stands for the standard deviation associated with the estimate of ω, and ±3σ bounds correspond to the 99% confidence region). It is seen that, in all three cases, the error is large at the initial stage but gradually decreases to a much lower level, indicating that the filters successfully adapt their running according to their own equations. In addition, UKF demonstrates the best estimation of ω overall. The average estimation errors over 100 runs are summarized in Table I. It also shows that UKF offers the most accurate estimation when all state variables are considered. In addition, the estimation accuracy of EnKF improves when the ensemble size increases. We draw the following remarks about nonlinear state estimation from our extensive simulations with this specific problem and experience with other problems in our past research. • The initial estimate can significantly impact the estimation accuracy. For the problem considered here, it is found that EKF and EnKF are more sensitive to an initial guess. It is noteworthy that an initial guess, if differing much from the truth, can lead to divergence of filters. Hence, one is encouraged to obtain a guess as close as possible to 10 50 50 Estimation error 3σ bounds 30 20 10 0 −10 30 20 10 0 −10 0 0.2 0.4 0.6 0.8 1 Estimation error 3σ bounds 40 Estimation error for ω 40 Estimation error for ω Estimation error for ω 40 50 Estimation error 3σ bounds 30 20 10 0 −10 0 0.2 Time (second) 0.4 0.6 0.8 1 0 0.2 Time (second) (a) 0.4 0.6 0.8 1 Time (second) (b) (c) Fig. 7. Estimation error for ω: (a) EKF; (b) UKF; (c) EnKF with Ns = 100. TABLE I AVERAGE ESTIMATION ERRORS FOR EKF, UKF, AND E N KF. Filter EKF UKF Average estimation error 682.63 321.05 Ns = 40 347.24 EnKF Ns = 100 Ns = 200 329.70 323.96 Ns = 400 320.30 TABLE II C OMPARISON OF EKF, UKF AND E N KF. • • • Computational complexity Jacobian matrix System dimensions EKF High Needed Low UKF High Not needed Low to medium EnKF Low Not needed High the truth through using prior knowledge or trying different guesses. A filter’s performance can be problem-dependent. A filter can provide estimation at a decent accuracy when applied to a problem but may fail when used to handle another. Thus, the practitioners are suggested to try different filters whenever allowed to find out the one that performs the best for his/her specific problem. Successful application of a filter usually requires to tune the covariance matrices and in some cases, parameters involved in a filter (e.g., λ, α and β in UKF), because of their important influence on estimation [47]. The trialand-error method is common in practice. Meanwhile, there also exist some studies of systematic tuning methods, e.g., [48, 49]. Readers may refer to them for further information. In choosing the best filter, engineers need to take into account all the factors relevant to the problem they are addressing, including but not limited to estimation accuracy, computational efficiency, system’s structural complexity, and problem size. To facilitate such a search, Table II summarizes the main differences and application areas of EKF, UKF and EnKF. Applications Guidance and navigation, flight control, attitude control, target tracking, robotics (e.g., simultaneous localization and mapping), electromechanical systems (e.g., induction motors and electric drives), vibration control, biomedical signal processing, sensor fusion, structural system monitoring, sensor networks, process control, computer vision, battery management, HVAC systems, econometrics Meteorology, hydrology, weather forecasting, oceanography, reservoir engineering, transportation systems, power systems VII. OTHER F ILTERING A PPROACHES AND E STIMATION P ROBLEMS Nonlinear stochastic estimation remains a major research challenge for the control research community. Continual research effort has been in progress toward the development of advanced methods and theories in addition to the KFs reviewed above. This section gives an overview of other major filtering approaches. Gaussian filters (GFs). GFs are a class of Bayesian filters enabled by a series of Gaussian distribution approximations. They bear much resemblance with KFs in view of their prediction-update structure and thus, in a broad sense, belong to the KF family. As seen earlier, the KF-based estimation relies on the evaluation of a set of integrals indeed—for example, the prediction of xk is attained in (6) by computing the conditional mean of f (xk−1 ) on k−1 . The equation is repeated here for convenience of reading: Y Y x̂k|k−1 = E [f (xk−1 )| k−1 ] Z = f (xk−1 )p(xk−1 | Y Yk−1)dxk−1. GFs approximate p(xk−1 | k−1 ) with a Gaussian distribution x having mean x̂k−1|k−1 and covariance Pk−1|k−1 . Namely, 11 Y x p(xk−1 | k−1 ) is replaced by N (x̂k−1|k−1 , Pk−1|k−1 ) [34]. Continuing with this assumption, one can use the Gaussian quadrature integration rules to evaluate the integral. A quadrature is a means of approximating a definite integral of a function by a weighted sum of values obtained by evaluating the function at a set of deterministic points in the domain of integration. An example of a one-dimensional Gaussian quadrature is the Gauss-Hermite quadrature, which plainly states that, for a given function g(x), Z ∞ m X g(x) · N (x; 0, 1)dx ≈ wi g(xi ), −∞ i=1 where m is the number of points used, xi for i = 1, 2, · · · , m the roots of the Hermite polynomial Hm (x), and wi the associated weights √ 2m−1 m! π wi = 2. m2 [Hm−1 (xi )] Exact equality holds for polynomials of order up to 2m − 1. Applying the multivariate version of this quadrature, one can obtain a filter in a KF form, which is named GaussHermite KF (GHKF) [34, 50]. GHKF reduces to UKF in certain cases [34]. Besides, the cubature rules for numerical integration can also be used in favor of a KF realization, which yields a cubature Kalman filter (CKF) [51, 52]. It is noteworthy that CKF is a special case of UKF given α = 1, β = 0 and κ = 0 [53]. Gaussian-sum filters (GSFs). Though used widely in the development of GFs and KFs, Gaussianity approximations are often inadequate and performance-limiting for many systems. To deal with a non-Gaussian pdf, GSFs represent it by a weighted sum of Gaussian basis functions [7]. For instance, the a posteriori pdf of xk is approximated by m   X i Wki N xk ; x̂ik|k , Pk|k p(xk | K ) = , Y i=1 i where Wki , x̂ik and Pk|k are the weight, mean and covariance of the i-th Gaussian basis function (kernel), respectively. This can be justified by the Universal Approximation Theorem, which states that a continuous function can be approximated by a group of Gaussian functions with arbitrary accuracy under some conditions [54]. A GSF then recursively updates i i x̂ik|k , Pk|k and Wki . In the basic form, x̂ik|k and Pk|k for i = 1, 2, · · · , m are updated individually through EKF, and Wki updated according to the output-prediction accuracy of x̂ik . The assumption for the EKF-based update is that the system’s nonlinear dynamics can be well represented by aggregating linearizations around a sufficient number of different points (means). In recent years, more sophisticated GSFs have been developed by merging the Gaussian-sum pdf approximation with other filtering techniques such as UKF, EnKF, GFs and particle filtering [34, 55–58] or optimization techniques [59]. Particle filters (PFs). The PF approach was first proposed in the 1990s [60] and came to prominence soon after that owing to its capacity for high-accuracy nonlinear non-Gaussian estimation. Today they have grown into a broad class of filters. As random-sampling-enabled numerical realizations of the Bayesian filtering principle, they are also known as the sequential Monte Carlo methods in the literature. Here, we introduce the essential idea with minimum statistical theory to offer the reader a flavor of this approach. Suppose that (i) Ns samples, x̂k−1|k−1 for i = 1, 2, · · · , Ns are drawn from p(xk−1 | k−1 ) at time k−1. The i-th sample is associated with PNs (i) (i) Wk−1 = 1. Then, p(xk−1 | k−1 ) a weight Wk−1 , and i=1 can be empirically described as Y Y Yk−1) ≈ p(xk−1 | Ns X   (i) (i) Wk−1 δ xk−1 − x̂k−1|k−1 . (63) i=1 This indicates that the estimate of xk−1 is Z x̂k−1|k−1 = xk−1 p(xk−1 | k−1 )dxk−1 Y = N X (i) (i) Wk−1 x̂k−1|k−1 . i=1 The samples can be propagated one-step forward to generate a sampling-based description of xk , i.e.,   (i) (i) (i) x̂k = f x̂k−1|k−1 + wk−1 , i = 1, 2, · · · , Ns , (i) where wk−1 for i = 1, 2, · · · , Ns are samples drawn from the distribution of wk−1 . After the propagation, each new sample should take a different weight in order to be commensurate with its probabilistic importance with  respect  to the others. To (i) account for this, one can evaluate p yk |x̂k , which quantifies (i) the likelihood of yk given the i-th sample x̂k . Then, the weight can be updated and normalized on [0, 1] by (i)   W (i) (i) (i) (i) Wk = Wk−1 p yk |x̂k , Wk = PN k (i) . s i=1 Wk Then, an empirical sample-based distribution is built for p(xk | k ) as in (63), and the estimate of xk can be computed as Y x̂k = Ns X (i) (i) Wk x̂k . i=1 In practical implementation of the above procedure, the issue of degeneracy may arise, which refers to the scenario that many or even most samples take almost zero weights. Any occurrence of degeneracy renders the affected samples useless. Remedying this situation requires the deployment of resampling, which replaces the samples by new ones drawn from the discrete empirical distribution defined by the weights. Summarizing the steps of sample propagation, weight update and resampling gives rise to a basic PF, which is schematically shown in Fig. 8. While the above outlines a reasonably intuitive explanation of the PF approach, a rigorous development can be made on a solid statistical foundation, as detailed in [16, 61, 62]. With the sample-based pdf approximation, PFs can demonstrate estimation accuracy superior to other filters given a sufficiently large Ns . It can be proven that their estimation error bound does not depend on the dimension of the system [64], implying applicability for high-dimensional systems. 12 + k−1 X wl> Q−1 wl + l=k−N subject to : k X vl> R−1 vl , l=k−N xl+1 = f (xl ) + wl , yl = h(xl ) + vl , x ∈ X, w ∈ W, v ∈ V, Fig. 8. A graphic diagram of the PF technique modified from [63]. Suppose that a set of samples (particles, as shown in gray color in the figure) are used to approximate the conditional pdf of the state on the available measurements as a particle discrete distribution. A one-step-froward propagation is implemented to generate the samples for the state at the next time instant. On its arrival, the new measurement will be used to update the weight of each sample to reflect its importance relative to others. Some samples may be given almost zero weight, referred to as degeneracy, and thus have meaningless contribution to the state estimation. Resampling will then be performed to generate a new set of samples. A possible limitation is their computational complexity, which comes at O(Ns n2x ) with Ns  nx . Yet, a strong anticipation is that the rapid growth of computing power tends to overcome this limitation, enabling wider application of PFs. A plethora of research has also been undertaken toward computationally efficient PFs [65]. A representative means is the RaoBlackwellization that applies the standard KF to the linear part of a system and a PF to the nonlinear part and reduces the number of samples to operate on [16]. The performance of PFs often relies on the quality of samples used. To this end, KFs can be used in combination to provide high-probability particles for PFs, leading to a series of combined KF-PF techniques [66–68]. A recent advance is the implicit PF, which uses the implicit sampling method to generate samples capable of an improved approximation of the pdf [69, 70]. Moving-horizon estimators (MHEs). MHEs are an emerging estimation tool based on constrained optimization. In general, they aim to find the state estimate through minimizing a cost function subject to certain constraints. The cost function is formulated on the basis of the system’s behavior in a moving horizon. To demonstrate the idea, we consider the Maximum a Posteriori estimation (MAP) for the system in (1) during the horizon [k − N, k] as shown in (64). Assuming wk ∼ N (0, Q) and vk ∼ N (0, R) and using the logarithmic transformation, the above cost function becomes min xk−N ,··· ,xk Φ(xk−N ) + k−1 X wl> Q−1 wl + l=k−N k X vl> R−1 vl , l=k−N where Φ(xk−N ) is the arrival cost summarizing the past information up to the beginning of the horizon. The minimization here should be subject to the system model in (1). Meanwhile, some physically motivated constraints for the system behavior should be incorporated. This produces the formulation of MHE given as {x̂k−N , · · · , x̂k } = arg min Φ(xk−N ) xk−N ,··· ,xk where X, W and V are, respectively, the sets of all feasible values for x, w and v and imposed as the constraints. It is seen that MHE tackles the state estimation through constrained optimization executed over time in a receding-horizon manner, as shown in Fig. 9. For an unconstrained linear system, MHE reduces to the standard KF. It is worth noting that the arrival cost Φ(xk−N ) is crucial for the performance or even success of MHE approach. In practice, an exact expression is often unavailable, thus requiring an approximation [71, 72]. With the deployment of constrained optimization, MHE is computationally expensive and usually more suited for slow dynamic processes; however, the advancement of real-time optimization has brought some promises to its faster implementation [73, 74]. Simultaneous state and parameter estimation (SSPE). In state estimation problems, a system model is considered fully known a priori. This may not be true in various real-world situations, where part or even all of the model parameters are unknown or subject to time-varying changes. Lack of knowledge of the parameters can disable an effort for state estimation in such a scenario. Hence, SSPE is motivated to enable state estimation self-adapting to the unknown parameters. Despite the complications, a straightforward and popular way for SSPE is through state augmentation. To deal with the parameters, the state vector is augmented to include them, and on account of this, the state-space model will be transformed accordingly to one with increased dimensions. Then, a state estimation technique can be applied directly to the new model to estimate the augmented state vector, which is a joint estimation of the state variables and parameters. In the literature, EKF, UKF, EnKF and PFs have been modified using this idea for a broad range of applications [20, 75–78]. Another primary solution is the so-called dual Kalman filtering. By “dual”, it means that the state estimation and parameter estimation are performed in parallel and alternately. As such, the state estimate is used to estimate the parameters, and the parameter estimate is used to update the state estimation. Proceeding with this idea, EKF, UKF and EnKF can be dualized [79– 82]. It should be pointed out that caution should be taken when an SSPE approach is developed. Almost any SSPE problem is nonlinear by nature with coupling between state variables and parameters. The joint state observability and parameter identifiability may be unavailable, or the estimation may get stuck in local minima. Consequently, the convergence can be vulnerable or unguaranteed, diminishing the chance of successful estimation. Thus application-specific SSPE analysis and development are recommended. Simultaneous state and input estimation (SSIE). Some practical applications entail not only unknown states but also unknown inputs. An example is the operation monitoring for an industrial system subject to unknown disturbance, where the 13 {x̂k−N , · · · , x̂k } = arg = arg = arg max p(xk−N , · · · , xk |yk−N , · · · , yk ) max p(xk−N ) xk−N ,··· ,xk xk−N ,··· ,xk max xk−N ,··· ,xk k Y p(yl |xl ) l=k−N p(xk−N ) k Y l=k−N k−1 Y p(xl+1 |xl ) l=k−N p(vl ) k−1 Y p(wl ). (64) l=k−N approaches may find their use in solving SSPE problems. Fig. 9. MHE performed over a moving observation horizon that spans N + 1 time instants. For estimation at time k, the arrival cost Φ(xk−N ) is determined first, which summarizes the information of the system behavior up to the beginning of the horizon. Then, the output measurements within the horizon, yk−N , · · · , yk , are used, along with the arrival cost, to conduct estimation of x̂k−N , · · · , x̂k through constrained optimization. operational status is the state and the disturbance the input. In maneuvering target tracking, the tracker often wants to estimate the state of the target, e.g., position and velocity, and the input, e.g., the acceleration. Another example is the wildfire data assimilation extensively investigated in the literature. The spread of wildfire is often driven by local meteorological conditions such as the wind. This gives rise to the need for a joint estimation of both the fire perimeters (state) and the wind speed (input) toward accurate monitoring of the fire growth. The significance of SSIE has motivated a large body of work. A lead was taken in [83] with the development of a KF-based approach to estimate the state and external white process noise of a linear discrete-time system [83]. Most recent research builds on the existing state estimation techniques. Among them, we highlight KF [84, 85], MHE [86], H∞ filtering [87], sliding mode observers [88, 89], and minimumvariance unbiased estimation [90–94]. SSIE for nonlinear systems involves more complexity, with fewer results reported. In [95, 96], SSIE is investigated for a special class of nonlinear systems that consist of a nominally linear part and a nonlinear part. However, the Bayesian statistical thinking has been generalized to address this topic, exemplifying its power in the development of nonlinear SSIE approaches. In [97, 98], a Bayesian approach along with numerical optimization is taken to achieve SSIE for nonlinear systems of a general form. This Bayesian approach is further extended in [99, 100] to build an ensemble-based SSIE method, as a counterpart of EnKF, for high-dimensional nonlinear systems. It is noteworthy that SSIE and SSPE would overlap if we consider the parameters as a special kind of inputs to the system. In this case, the SSIE VIII. C ONCLUSION This article offered a state-of-the-art review of nonlinear state estimation approaches. As a fundamental problem encountered across a few research areas, nonlinear stochastic estimation has stimulated a sustaining interest during the past decades. In the pursuit of solutions, the Bayesian analysis has proven to be a time-tested and powerful methodology for addressing various types of problems. In this article, we first introduced the Bayesian thinking for nonlinear state estimation, showing the nature of state estimation from the perceptive of Bayesian update. Based on the notion of Bayesian state estimation, a general form of the celebrated KF is derived. Then, we illustrated the development of the standard KF for linear systems and EKF, UKF and EnKF for nonlinear systems. A case study of state estimation for speed sensorless induction motors was provided to present a comparison of the EKF, UKF and EnKF approaches. We further extended our view to a broader horizon including GF, GSF, PF and MHE approaches, which are also deeply rooted in the Bayesian state estimation and thus can be studied from a unified Bayesian perspective to a large extent. Despite remarkable progress made thus far, it is anticipated that nonlinear Bayesian estimation continues to see intensive research in the coming decades. This trend will be partially driven by the need to use state estimation as a mathematical tool to enable various emerging systems in contemporary industry and society, stretching from autonomous transportation to sustainable energy and smart X (grid, city, planet, geosciences, etc.). Here, we envision several directions that may shape the future research in this area. The first one lies in accurately characterizing the result of a nonlinear transformation applied to a probability distribution. Many of the present methods such as EKF, UKF and EnKF were more or less motivated to address this fundamental challenge. However, there still exists no solution generally acknowledged as being satisfactory, leaving room for further exploration. Second, much research is needed to deal with uncertainty. Uncertainty is intrinsic to many practical systems because of unmodeled dynamics, external disturbances, inherent variability of a dynamic process, and sensor noise, representing a major threat to successful estimation. Although the literature contains many results on state estimation with robustness to uncertainty, the research has not reached a level of maturity because of the difficulty involved. A third research direction is optimal sensing structure design. Sensing structure 14 or sensor deployment is critical for data informativeness and thus can significantly affect the effectiveness of estimation. An important question thus is how to achieve co-design of a sensing structure and Bayesian estimation approach to maximize estimation accuracy. Fourth, Bayesian estimation in a cyber-physical setting is an imperative. Standing at the convergence of computing, communication and control, cyberphysical systems (CPSs) are foundationally important and underpinning today’s smart X initiatives. They also present new challenges for estimation, which include communication constraints or failures, computing limitations, and cyber data attacks. The current research is particularly rare on nonlinear Bayesian estimation for CPSs. Finally, many emerging industrial and social applications are data-intensive, thus asking for a seamless integration of Bayesian estimation with big data processing algorithms. New principles, approaches and computing tools must be developed to meet this pressing need, which will make an unprecedented opportunity to advance the Bayesian estimation theory. A PPENDIX This appendix offers a summary of the properties of the Gaussian distribution. Suppose z ∈ n is a Gaussian random vector with z ∼ N (z̄, Pz ). The pdf of z is expressed as  1 exp −(z − z̄)Pz−1 (z − z̄)> . p(z) = p n ( (2π) |Pz | R Some useful properties of the Gaussian vectors are as follows [101]. 1) Z Z zp(z)dz = z̄, (z − z̄)(z − z̄)> p(z)dz = Pz , Z zz > p(z)dz = Pz + z̄ z̄ > . (A.1) 2) The affine transformation of z, Az + b, is Gaussian, i.e.,  Az + b ∼ N Az̄ + b, APz A> . (A.2) 3) The sum of two independent Gaussian random vectors is Gaussian; i.e., if z1 ∼ N (z̄1 , Pz1 ) and z2 ∼ N (z̄2 , Pz2 ) and if z1 and z2 are independent, then  Az1 + Bz2 ∼ N Az̄1 + B z̄2 , APz1 A> + BPz2 B > . (A.3) 4) For two random vectors jointly Gaussian, the conditional distribution of one given the other is Gaussian. Specifically, if z1 and z2 are jointly Gaussian with       P Pz1 z2 z1 z̄1 ∼N , >z1 , z2 z̄2 Pz1 z2 Pz2 then  z1 |z2 ∼ N z̄1 + Pz1 z2 Pz−1 (z2 − z̄2 ), 2  > Pz1 − Pz1 z2 Pz−1 P . z z 2 1 2 (A.4) R EFERENCES [1] Mr. Bayes and Mr. Price, “An essay towards solving a problem in the doctrine of chances,” Philosophical Transactions, vol. 53, pp. 370–418, 1763. [2] A. Dale, “Bayes or Laplace? An examination of the origin and early applications of bayes’ theorem,” Archive for History of Exact Sciences, vol. 27, no. 1, pp. 23–47, 1982. [3] D. Malakoff, “Bayes offers a ‘New’ way to make sense of numbers,” Science, vol. 286, no. 5444, pp. 1460–1464, 1999. [4] A. Jackson, “Kalman receives national medal of science,” Notices of the AMS, vol. 57, no. 1, pp. 56–57, 2010. [5] R. E. Kalman, “A new approach to linear filtering and prediction problems,” Journal of Basic Engineering, vol. 82, no. 1, pp. 35–45, 1960. [6] Y.-C. Ho and R. Lee, “A Bayesian approach to problems in stochastic estimation and control,” IEEE Transactions on on Automatic Control, vol. 9, no. 4, pp. 333–339, 1964. [7] B. D. Anderson and J. B. Moore, Optimal filtering. PrenticeHall, 1979. [8] Wikipedia contributors, “Kalman filter — Wikipedia, the free encyclopedia,” [Online; accessed 24-September2016]. [Online]. Available: \url{https://en.wikipedia.org/wiki/ Kalman filter} [9] F. Auger, M. Hilairet, J. Guerrero, E. Monmasson, T. Orlowska-Kowalska, and S. Katsura, “Industrial applications of the Kalman filter: A review,” IEEE Transactions on Industrial Electronics, vol. 60, no. 12, pp. 5458–5471, 2013. [10] M. Boutayeb, H. Rafaralahy, and M. Darouach, “Convergence analysis of the extended Kalman filter used as an observer for nonlinear deterministic discrete-time systems,” IEEE Transactions on Automatic Control, vol. 42, no. 4, pp. 581–586, 1997. [11] A. Krener, “The convergence of the extended Kalman filter,” in Directions in Mathematical Systems Theory and Optimization, A. Rantzer and C. Byrnes, Eds. Springer, 2003, vol. 286, pp. 173–182. [12] S. Kluge, K. Reif, and M. Brokate, “Stochastic stability of the extended Kalman filter with intermittent observations,” IEEE Transactions on Automatic Control, vol. 55, no. 2, pp. 514– 518, 2010. [13] S. Bonnabel and J.-J. Slotine, “A contraction theory-based analysis of the stability of the deterministic extended Kalman filter,” IEEE Transactions on Automatic Control, vol. 60, no. 2, pp. 565–569, 2015. [14] A. Barrau and S. Bonnabel, “The invariant extended kalman filter as a stable observer,” IEEE Transactions on Automatic Control, vol. 62, no. 4, pp. 1797–1812, 2017. [15] H. Tanizaki, Nonlinear Filters: Estimation and Applications. Springer-Verlag Berlin Heidelberg, 1996. [16] S. Särkkä, Bayesian Filtering and Smoothing. Cambridge University Press, 2013. [17] M. Roth and F. Gustafsson, “An efficient implementation of the second order extended Kalman filter,” in Proceedings of the 14th International Conference on Information Fusion (FUSION), 2011, pp. 1–6. [18] A. H. Jazwinski, Stochastic processes and filtering theory. New York, NY, USA: Academic Press, 1970. [19] B. Bell and F. Cathey, “The iterated Kalman filter update as a gauss-newton method,” IEEE Transactions on Automatic Control, vol. 38, no. 2, pp. 294–297, 1993. [20] H. Fang, Y. Wang, Z. Sahinoglu, T. Wada, and S. Hara, “State of charge estimation for lithium-ion batteries: An adaptive approach,” Control Engineering Practice, vol. 25, pp. 45–54, 2014. [21] S. Julier, J. Uhlmann, and H. Durrant-Whyte, “A new approach for filtering nonlinear systems,” in Proceedings of American Control Conference, vol. 3, 1995, pp. 1628–1632. [22] S. J. Julier and J. K. Uhlmann, “A new extension of the Kalman filter to nonlinear systems,” in Proceedings of AeroSense: The 11th International Symposium on Aerospace/Defence Sensing, Simulation and Controls, 1997, pp. 182–193. 15 [23] S. Julier and J. Uhlmann, “Unscented filtering and nonlinear estimation,” Proceedings of the IEEE, vol. 92, no. 3, pp. 401– 422, 2004. [24] E. Wan and R. van der Merwe, “The unscencted Kalman filter,” in Kalman Filtering and Neural Networks, S. Haykin, Ed. John Wiley & Sons, 2001, pp. 221–269. [25] H. M. T. Menegaz, J. Y. Ishihara, G. A. Borges, and A. N. Vargas, “A systematization of the unscented kalman filter theory,” IEEE Transactions on Automatic Control, vol. 60, no. 10, pp. 2583–2598, 2015. [26] R. Van Der Merwe and E. Wan, “The square-root unscented Kalman filter for state and parameter-estimation,” in Proceedings of IEEE International Conference on Acoustics, Speech, and Signal Processing, vol. 6, 2001, pp. 3461–3464. [27] S. Julier, “The spherical simplex unscented transformation,” in Proceedings of the American Control Conference, vol. 3, 2003, pp. 2430–2434. [28] W.-C. Li, P. Wei, and X.-C. Xiao, “A novel simplex unscented transform and filter,” in Proceedings on International Symposium on Communications and Information Technologies, 2007, pp. 926–931. [29] P. Date, K. Ponomareva, and Z. Wang, “A new unscented Kalman filter with higher order moment-matching,” in Proceedings of Mathematical Theory of Networks and Systems, 2010, pp. 926–931. [30] A. Charalampidis and G. Papavassilopoulos, “Development and numerical investigation of new non-linear Kalman filter variants,” IET Control Theory Applications, vol. 5, no. 10, pp. 1155–1166, 2011. [31] J. Dunik, M. Simandl, and O. Straka, “Unscented Kalman filter: Aspects and adaptive setting of scaling parameter,” IEEE Transactions on Automatic Control, vol. 57, no. 9, pp. 2411– 2416, 2012. [32] J. Crassidis, “Sigma-point Kalman filtering for integrated GPS and inertial navigation,” IEEE Transactions on Aerospace and Electronic Systems, vol. 42, no. 2, pp. 750–756, 2006. [33] R. van der Merwe, “Sigma-point Kalman filters for probabilistic inference in dynamic state-space models,” Ph.D. dissertation, Oregon Health & Science University, 2004. [34] K. Ito and K. Xiong, “Gaussian filters for nonlinear filtering problems,” IEEE Transactions on Automatic Control, vol. 45, no. 5, pp. 910–927, 2000. [35] G. Evensen, “Sequential data assimilation with a nonlinear quasi-geostrophic model using Monte Carlo methods to forecast error statistics,” Journal of Geophysical Research: Oceans, vol. 99, no. C5, pp. 10 143–10 162, 1994. [36] G. Evensen and P. J. van Leeuwen, “Assimilation of geosat altimeter data for the agulhas current using the ensemble Kalman filter with a quasigeostrophic model,” Monthly Weather Review, vol. 124, pp. 85–96, 1996. [37] P. L. Houtekamer and H. L. Mitchell, “Data assimilation using an ensemble Kalman filter technique,” Monthly Weather Review, vol. 126, pp. 796–811, 1998. [38] J. Mandel, “Efficient implementation of the ensemble Kalman filter,” University of Colorado at Denver, Tech. Rep. UCDHSC/CCM Report No. 231, May 2006. [39] S. Lakshmivarahan and D. Stensrud, “Ensemble Kalman filter,” IEEE Control Systems, vol. 29, no. 3, pp. 34–46, 2009. [40] G. Evensen, Data Assimilation: The Ensemble Kalman Filter, 2nd ed. Springer, 2009. [41] J. Mandel, L. Cobb, and J. Beezley, “On the convergence of the ensemble Kalman filter,” Applications of Mathematics, vol. 56, no. 6, pp. 533–541, 2011. [42] M. Montanari, S. M. Peresada, C. Rossi, and A. Tilli, “Speed sensorless control of induction motors based on a reducedorder adaptive observer,” IEEE Transactions on Control Systems Technology, vol. 15, no. 6, pp. 1049–1064, 2007. [43] S. R. Bowes, A. Sevinc, and D. Holliday, “New natural observer applied to speed-sensorless dc servo and induction motors,” IEEE Transactions on Industrial Electronics, vol. 51, no. 5, pp. 1025–1032, 2004. [44] R. Marino, P. Tomei, and C. Verrelli, “A global tracking control for speed-sensorless induction motors,” Automatica, vol. 40, no. 6, pp. 1071–1077, 2004. [45] Y. Wang, L. Zhou, S. A. Bortoff, A. Satake, and S. Furutani, “High gain observer for speed-sensorless motor drives: Algorithm and experiments,” in Proceedings of IEEE International Conference on Advanced Intelligent Mechatronics, 2016, pp. 1127–1132. [46] L. Zhou and Y. Wang, “Speed sensorless state estimation for induction motors: A moving horizon approach,” in Proceedings of American Control Conference, 2016, pp. 2229–2234. [47] Q. Ge, T. Shao, Z. Duan, and C. Wen, “Performance analysis of the kalman filter with mismatched noise covariances,” IEEE Transactions on Automatic Control, vol. 61, no. 12, pp. 4014– 4019, 2016. [48] L. A. Scardua and J. J. da Cruz, “Complete offline tuning of the unscented kalman filter,” Automatica, vol. 80, pp. 54 – 61, 2017. [49] B. F. La Scala, R. R. Bitmead, and B. G. Quinn, “An extended kalman filter frequency tracker for high-noise environments,” IEEE Transactions on Signal Processing, vol. 44, no. 2, pp. 431–434, 1996. [50] B. Jia, M. Xin, and Y. Cheng, “Sparse Gauss-Hermite quadrature filter with application to spacecraft attitude estimation,” AIAA Journal of Guidance, Control, and Dynamics, vol. 34, no. 2, pp. 367–379, 2011. [51] I. Arasaratnam and S. Haykin, “Cubature Kalman filters,” IEEE Transactions on Automatic Control, vol. 54, no. 6, pp. 1254–1269, 2009. [52] B. Jia, M. Xin, and Y. Cheng, “High-degree cubature Kalman filter,” Automatica, vol. 49, no. 2, pp. 510–518, 2013. [53] S. Särkkä, J. Hartikainen, L. Svensson, and F. Sandblom. On the relation between Gaussian process quadratures and sigmapoint methods. [54] J. Park and I. W. Sandberg, “Universal approximation using radial-basis-function networks,” Neural Computation, vol. 3, no. 2, pp. 246–257, 1991. [55] O. Straka, J. Dunik, and M. Simandl, “Gaussian sum unscented Kalman filter with adaptive scaling parameters,” in Proceedings of the 14th International Conference on Information Fusion, 2011, pp. 1–8. [56] L. Dovera and E. Della Rossa, “Multimodal ensemble Kalman filtering using Gaussian mixture models,” Computational Geosciences, vol. 15, no. 2, pp. 307–323, 2011. [57] J. Horwood and A. Poore, “Adaptive Gaussian sum filters for space surveillance,” IEEE Transactions on Automatic Control, vol. 56, no. 8, pp. 1777–1790, 2011. [58] J. H. Kotecha and P. Djuric, “Gaussian sum particle filtering,” IEEE Transactions on Signal Processing, vol. 51, no. 10, pp. 2602–2612, 2003. [59] G. Terejanu, P. Singla, T. Singh, and P. Scott, “Adaptive Gaussian sum filter for nonlinear Bayesian estimation,” IEEE Transactions on Automatic Control, vol. 56, no. 9, pp. 2151– 2156, 2011. [60] N. Gordon, D. Salmond, and A. Smith, “Novel approach to nonlinear/non-Gaussian Bayesian state estimation,” Radar and Signal Processing, IEE Proceedings F, vol. 140, no. 2, pp. 107–113, 1993. [61] A. Doucet and A. M. Johansen, “Tutorial on particle filtering and smoothing: Fifteen years later,” in The Oxford Handbook of Nonlinear Filtering, D. Crisan and B. Rozovskii, Eds. Oxford University Press, 2011, pp. 656–704. [62] M. Arulampalam, S. Maskell, N. Gordon, and T. Clapp, “A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking,” IEEE Transactions on Signal Processing, vol. 50, no. 2, pp. 174–188, 2002. [63] A. Parker, “Dealing with data overload in the scientific realm,” pp. 4–11, January/February 2013. 16 [64] D. Crisan and A. Doucet, “Convergence of sequential Monte Carlo methods,” 2000, technical Report, University of Cambridge. [65] W. Yi, M. Morelande, L. Kong, and J. Yang, “A computationally efficient particle filter for multitarget tracking using an independence approximation,” IEEE Transactions on Signal Processing, vol. 61, no. 4, pp. 843–856, 2013. [66] A. H. G. J. F. G. de Freitas, M. Niranjan and A. Doucet, “Sequential monte carlo methods to train neural network models,” Neural Computation, vol. 12, no. 4, pp. 955–993, 2000. [67] R. van der Merwe, N. de Freitas, A. Doucet, and E. Wan, “The unscented particle filter,” in Advances in Neural Information Processing Systems 13, 2001, pp. 584–590. [68] L. Li, H. Ji, and J. Luo, “The iterated extended Kalman particle filter,” in Proceedings of IEEE International Symposium on Communications and Information Technology, vol. 2, 2005, pp. 1213–1216. [69] A. J. Chorin and X. Tu, “Implicit sampling for particle filters,” Proceedings of the National Academy of Sciences, vol. 106, no. 41, pp. 17 429–17 254, 2009. [70] A. Chorin, M. Morzfeld, and X. Tu, “Implicit particle filters for data assimilation,” Communications in Applied Mathematics and Computational Science, vol. 5, no. 2, pp. 221–240, 2010. [71] C. Rao, J. Rawlings, and D. Mayne, “Constrained state estimation for nonlinear discrete-time systems: stability and moving horizon approximations,” IEEE Transactions on Automatic Control, vol. 48, no. 2, pp. 246–258, 2003. [72] C. V. Rao, “Moving horizon strategies for the constrained monitoring and control of nonlinear discrete-time systems,” Ph.D. dissertation, University of Wisconsin Madison, 2000. [73] M. Tenny and J. Rawlings, “Efficient moving horizon estimation and nonlinear model predictive control,” in Proceedings of American Control Conference, vol. 6, 2002, pp. 4475–4480. [74] M. Diehl, H. Ferreau, and N. Haverbeke, “Efficient numerical methods for nonlinear mpc and moving horizon estimation,” in Nonlinear Model Predictive Control, L. Magni, D. Raimondo, and F. Allg´’ower, Eds. Springer Berlin Heidelberg, 2009, vol. 384, pp. 391–417. [75] J. Ching, J. L. Beck, and K. A. Porter, “Bayesian state and parameter estimation of uncertain dynamical systems,” Probabilistic Engineering Mechanics, vol. 21, no. 1, pp. 81– 96, 2006. [76] H. Fang, Y. Wang, Z. Sahinoglu, T. Wada, and S. Hara, “Adaptive estimation of state of charge for lithium-ion batteries,” in Proceedings of American Control Conference, 2013, pp. 3485– 3491. [77] G. Chowdhary and R. Jategaonkar, “Aerodynamic parameter estimation from flight data applying extended and unscented kalman filter,” Aerospace Science and Technology, vol. 14, no. 2, pp. 106–117, 2010. [78] T. Chen, J. Morris, and E. Martin, “Particle filters for state and parameter estimation in batch processes,” Journal of Process Control, vol. 15, no. 6, pp. 665–673, 2005. [79] E. A. Wan and A. T. Nelson, “Dual extended Kalman filter methods,” in Kalman Filtering and Neural Networks, S. Haykin, Ed. John Wiley & Sons, Inc., 2001, pp. 123– 173. [80] E. A. Wan, R. V. D. Merwe, and A. T. Nelson, “Dual estimation and the unscented transformation,” in Advances in Neural Information Processing Systems. MIT Press, 2000, pp. 666–672. [81] M. C. Vandyke, J. L. Schwartz, and C. D. Hall, “Unscented Kalman filtering for spacecraft attitude state and parameter estimation,” in Proceedings of the AAS/AIAA Space Flight Mechanics Conference, 2004. [82] H. Moradkhani, S. Sorooshian, H. V. Gupta, and P. R. Houser, “Dual stateparameter estimation of hydrological models using ensemble Kalman filter,” Advances in Water Resources, vol. 28, no. 2, pp. 135–147, 2005. [83] J. Mendel, “White-noise estimators for seismic data processing in oil exploration,” IEEE Transactions on Automatic Control, vol. 22, no. 5, pp. 694–706, 1977. [84] C.-S. Hsieh, “Robust two-stage Kalman filters for systems with unknown inputs,” IEEE Transactions on Automatic Control, vol. 45, no. 12, pp. 2374–2378, 2000. [85] ——, “On the optimality of two-stage Kalman filtering for systems with unknown inputs,” Asian Journal of Control, vol. 12, no. 4, pp. 510–523, 2010. [86] L. Pina and M. A. Botto, “Simultaneous state and input estimation of hybrid systems with unknown inputs,” Automatica, vol. 42, no. 5, pp. 755–762, 2006. [87] F.-Q. You, F.-L. Wang, and S.-P. Guan, “Hybrid estimation of state and input for linear discrete time-varying systems: A game theory approach,” Acta Automatica Sinica, vol. 34, no. 6, pp. 665–669, 2008. [88] T. Floquet, C. Edwards, and S. K. Spurgeon, “On sliding mode observers for systems with unknown inputs,” International Journal of Adaptive Control & Signal Processing, vol. 21, no. 8-9, pp. 638–656, 2007. [89] F. Bejarano, L. Fridman, and A. Poznyak, “Exact state estimation for linear systems with unknown inputs based on hierarchical super-twisting algorithm,” International Journal of Robust and Nonlinear Control, vol. 17, no. 18, pp. 1734– 1753, 2007. [90] S. Gillijns and B. De Moor, “Unbiased minimum-variance input and state estimation for linear discrete-time systems with direct feedthrough,” Automatica, vol. 43, no. 5, pp. 934–937, 2007. [91] ——, “Unbiased minimum-variance input and state estimation for linear discrete-time systems,” Automatica, vol. 43, no. 1, pp. 111–116, 2007. [92] H. Fang, Y. Shi, and J. Yi, “A new algorithm for simultaneous input and state estimation,” in Proceedings of American Control Conference, 2008, pp. 2421–2426. [93] ——, “On stable simultaneous input and state estimation for discrete-time linear systems,” International Journal of Adaptive Control and Signal Processing, vol. 25, no. 8, pp. 671–686, 2011. [94] H. Fang and R. A. de Callafon, “On the asymptotic stability of minimum-variance unbiased input and state estimation,” Automatica, vol. 48, no. 12, pp. 3183–3186, 2012. [95] M. Corless and J. Tu, “State and input estimation for a class of uncertain systems,” Automatica, vol. 34, no. 6, pp. 757–764, 1998. [96] Q. P. Ha and H. Trinh, “State and input simultaneous estimation for a class of nonlinear systems,” Automatica, vol. 40, no. 10, pp. 1779–1785, 2004. [97] H. Fang, R. A. de Callafon, and J. Cortés, “Simultaneous input and state estimation for nonlinear systems with applications to flow field estimation,” Automatica, vol. 49, no. 9, pp. 2805 – 2812, 2013. [98] H. Fang, R. A. de Callafon, and P. J. S. Franks, “Smoothed estimation of unknown inputs and states in dynamic systems with application to oceanic flow field reconstruction,” International Journal of Adaptive Control and Signal Processing, vol. 29, no. 10, pp. 1224–1242, 2015. [99] H. Fang and R. de Callafon, “Simultaneous input and state filtering: An ensemble approach,” in Proceedings of IEEE 52nd Annual Conference on Decision and Control (CDC), 2013, pp. 7690–7695. [100] H. Fang, T. Srivas, R. A. de Callafon, and M. A. Haile, “Ensemble-based simultaneous input and state estimation for nonlinear dynamic systems with application to wildfire data assimilation,” Control Engineering Practice, vol. 63, pp. 104– 115, 2017. [101] J. V. Candy, Bayesian Signal Processing: Classical, Modern and Particle Filtering Methods. New York, NY, USA: WileyInterscience, 2009.
3cs.SY
Margins of discrete Bayesian networks Robin J. Evans arXiv:1501.02103v2 [math.ST] 30 Jan 2017 January 31, 2017 Abstract Bayesian network models with latent variables are widely used in statistics and machine learning. In this paper we provide a complete algebraic characterization of Bayesian network models with latent variables when the observed variables are discrete and no assumption is made about the state-space of the latent variables. We show that it is algebraically equivalent to the so-called nested Markov model, meaning that the two are the same up to inequality constraints on the joint probabilities. In particular these two models have the same dimension. The nested Markov model is therefore the best possible description of the latent variable model that avoids consideration of inequalities, which are extremely complicated in general. A consequence of this is that the constraint finding algorithm of Tian and Pearl (2002) is complete for finding equality constraints. Latent variable models suffer from difficulties of unidentifiable parameters and non-regular asymptotics; in contrast the nested Markov model is fully identifiable, represents a curved exponential family of known dimension, and can easily be fitted using an explicit parameterization. 1 Introduction Directed acyclic graph (DAG) models, also known as Bayesian network models, are widely used multivariate models in probabilistic reasoning, machine learning and causal inference (Bishop, 2007; Darwiche, 2009; Pearl, 2009). These models are defined by simple factorizations of the joint distribution, and in the case of discrete or jointly Gaussian random variables, are curved exponential families of known dimension. The inclusion of latent variables within Bayesian network models can greatly increase their flexibility, and also account for unobserved confounding. However, this flexibility comes at the cost of creating models that are not easy to explicitly describe when considered as marginal models over the observed variables. Latent variable models generally do not have fully identifiable parameterizations, and contain ‘singularities’ that lead to non-regular asymptotics (Drton, 2009a). In addition, using them may force a modeller to specify a parametric structure over the latent variables, introducing additional assumptions that are generally difficult to test and may be unreasonable. If no parametric assumptions are made about the latent variables, and no assumption is made about their state-space, this leads to an implicitly defined marginal model. The marginal model has the advantage of avoiding some of the assumptions made by a parametric latent variable model, however no explicit 1 0 1 2 3 4 Figure 1: A directed acyclic graph on five vertices. characterization of the model is available, and nor is there any obvious method for fitting it to data. Example 1.1. Consider the DAG on five vertices shown in Figure 1. The graph represents a multivariate model over five random variables X0 , X1 , X2 , X3 and X4 , with the restriction that the joint density factorizes as p(x0 , x1 , x2 , x3 , x4 ) = p(x0 ) · p(x1 ) · p(x2 | x0 , x1 ) · p(x3 | x2 ) · p(x4 | x0 , x3 ); here, for example, p(x3 | x2 ) represents the conditional density of X3 given X2 . This model arises naturally in the context of dynamic treatment regimes and longitudinal exposures (Robins, 1986): X1 and X3 represent treatments and X2 and X4 some outcome of interest. The treatments are randomized, though the second treatment X3 may depend upon the first outcome X2 , for example a dose may be dynamically adjusted. Since the outcomes are measured on the same patient, they are assumed to be correlated due to a common cause X0 , which might represent an underlying health status, as well as genetic and lifestyle factors. If we treat X0 as a latent variable, the marginal model over the remaining observed variables (X1 , X2 , X3 , X4 ) is the collection of probability distributions that can be written in the form p(x1 , x2 , x3 , x4 ) Z p(x0 ) · p(x1 ) · p(x2 | x0 , x1 ) · p(x3 | x2 ) · p(x4 | x0 , x3 ) dx0 . = (1) X0 That is, any (X1 , X2 , X3 , X4 )-margin of a distribution which factorizes according to the DAG over all five variables, for any state-space or distribution of X0 1 . ⊥ X1 | X2 From (1) we can deduce that the conditional independence X3 ⊥ holds in the marginal model; i.e. p(x3 | x1 , x2 ) = p(x3 | x2 ). (2) In addition this model satisfies the so-called Verma constraint of Robins (1986) (see also Verma and Pearl, 1990), because the expression X p(x2 | x1 ) · p(x4 | x1 , x2 , x3 ) (3) q(x4 | x3 ) ≡ x2 1 In general it is sufficient to assume hidden variables are uniform on (0, 1); for this particular graph, we can choose X0 to be finite and discrete without loss of generality provided it has a sufficiently large number of states. 2 M N L Figure 2: Diagrammatic representation of the probability simplex (dashed outline) and a marginal model (M, in blue) sitting strictly within the associated nested model (N , in red); note the two models have the same dimension. Any parametric latent variable model will be contained strictly within M, but it may have a smaller dimension and be non-regular (an example is shown as L). The ‘ordinary Markov model’ is not shown, but contains N and would generally have larger dimension. does not depend upon x1 (see Example 3.2). The set of distributions satisfying both (2) and (3) is a so-called nested Markov model (Richardson et al., 2017). If the four observed variables are binary these equations represent four independent constraints, and the nested model is therefore an 11-dimensional subset of the 15-dimensional probability simplex. It is not immediately clear whether or not this nested model is the same as the marginal model defined by (1): in principle the marginal model might impose additional restrictions beyond (2) and (3). This begs the question, is the set of distributions that satisfy (1) characterized by (2) and (3)? The answer turns out to be ‘almost’, in the sense that the set of distributions that can be written in the form (1) is a full-dimensional subset of the set that satisfy (2) and (3), though there are additional inequality constraints. This situation is represented by Figure 2, which shows the marginal model (M, in blue) lying strictly within the nested model (N , in red), but the two having the same dimension. This paper shows that this result holds generally for all models of this kind. That is, the constraints on the model are precisely those derived from the algorithm of Tian and Pearl (2002), as represented by the statistical model of Richardson et al. (2017). Existing approaches to the problem of describing Bayesian network models with hidden variables either make use of parametric structure on the latent 3 variables (for example, Silva and Ghahramani, 2009; Anandkumar et al., 2013), or are restricted to testing conditional independences and do not consider constraints such as (3). This latter category includes the ancestral graph models of Richardson and Spirtes (2002) and the equivalent2 models on acyclic directed mixed graphs (ADMGs) of Richardson (2003); these pure conditional independence models, which we refer to as the ordinary Markov models, generally have a larger dimension than any latent variable model, so using them as a proxy leads to a loss of power to distinguish between certain kinds of model. On the other hand parametric hidden variable models suffer from various problems caused by the choice of state-space. They may be ‘too large’, in the sense that the dimension of the full model is greater than the dimension of the model over the observed data, thereby introducing identifiability problems. They may also be ‘too small’, in that unwanted additional restrictions are implied by the parametric structure, and therefore the models have a smaller dimension than the marginal model: this is depicted by the curve labelled L in Figure 2. Paradoxically, it may even be the case that a hidden variable model is ‘too large’ and ‘too small’ at the same time! For example, if we use a latent variable in Example 1.1 with the simplest possible state-space in which everything is binary, then the full model over all five variables has dimension 12; however, we have already established that the dimension of the marginal model over the observed variables is at most 11, so the model is clearly over-parameterized. In fact, it can be shown that the dimension of this latent variable model over the observed variables is only 10, so an additional artificial restriction is present due to the choice of a binary latent variable model (see Appendix A). If X0 is given enough states, the latent variable model and the marginal model coincide for graphs such as the one in Figure 1, a fact we will exploit in our proofs. However, this latent variable model is less useful for statistical inference because it is generally massively over-parameterized. 1.1 A Short Algebra Tutorial This paper makes use of some results from real algebraic geometry, which provides powerful tools for analysing these complicated sets of distributions. All our statistical models are collections of distributions within the probability simplex that satisfy certain constraints. The constraints on a Bayesian network model are conditional independences, and can be represented as the requirement that certain polynomials in the probabilities are equal to zero; for example the conditional independence X1 ⊥ ⊥ X3 | X2 is equivalent to p(x2 ) · p(x1 , x2 , x3 ) − p(x1 , x2 ) · p(x2 , x3 ) = 0 ∀x1 , x2 , x3 . A set defined by the zeros of polynomials is said to be an algebraic variety, or sometimes an algebraic set. In addition to equality constraints, these models will satisfy polynomial inequalities; i.e. p(xV ) ≥ 0. A set defined by a combination of polynomial equalities and inequalities is said to be semi-algebraic; this category includes many common finite-dimensional statistical models. Semi-algebraic sets have the nice property that when we eliminate one of the variables or 2 The models are equivalent if selection variables are not present, which is the case throughout this paper. 4 project onto a linear subspace, they remain semi-algebraic, generally known as the Tarski-Seidenberg theorem (see, for example, Basu et al., 1996, Theorem 2.72). A consequence of this is that the margin of any model defined by a semi-algebraic set is also defined by a semi-algebraic set. The Zariski closure of a set is the smallest algebraic variety that contains it; the fact that this is well-defined is a significant result in algebraic geometry. For a semi-algebraic set one can informally think of its Zariski closure as the set obtained by keeping the equality constraints and ‘throwing away’ the inequality constraints. Semi-algebraic sets have many interesting properties, but they are not necessarily ‘nice’ from a statistical perspective, in the sense of leading to regular asymptotics. For this we need our set to be a manifold, i.e. to be locally Euclidean. 1.2 Contribution In this paper we show that marginal models with finite discrete observed variables are algebraically equivalent to the appropriate nested Markov model, in the sense that the Zariski closures of the marginal model and the nested model are the same. A consequence of this is that a margin of a DAG model and its nested counterpart have the same dimension, and differ only by inequality constraints. The marginal model defined by (1) in Example 1.1 is indeed 11dimensional, and is algebraically defined by (2) and (3); however, the marginal model also satisfies polynomial inequality constraints that the nested model does not. The result can be interpreted as showing that the constraint finding algorithm of Tian and Pearl (2002) is ‘complete’, in the sense that there are no other equality constraints to find without making further assumptions. This means that we have, for the first time, a full algebraic characterization of margins of Bayesian network models. It also shows that the nested model represents a sensible and pragmatic approximation to the marginal model: inequality constraints are typically extremely complicated, so the nested model—which has a factorization criterion, separation criteria, and a discrete parameterization (Richardson et al., 2017)—is much easier to work with, and can easily be fitted with existing algorithms (Evans and Richardson, 2010). In addition, the nested model inside the probability simplex is a manifold and therefore regular whenever the joint distribution is positive, whereas the marginal model may have a boundary that lies strictly inside the simplex. The nested model therefore has better statistical properties than the marginal model, in the sense that data generated from any strictly positive distribution will lead to regular asymptotics. Causal discovery methods such as the FCI algorithm that use conditional independence constraints could, in principle, be extended to the constraints implied by nested models (Spirtes et al., 2000); our main result shows that is ‘as good as it gets’, in the sense that there are no other equality constraints to test without making further (e.g. parametric) assumptions. Thus, this paper probes the limits of what it is possible to learn about causal models with hidden variables from observational data. We work with a class of hyper-graphs called mDAGs, with which we associate marginals of DAG models (Evans, 2016). The remainder of the paper is organized as follows: Section 2 introduces DAG models, their margins and 5 0 1 2 3 4 Figure 3: A conditional directed acyclic graph with three random vertices (0, 2, 4) and two fixed vertices (1, 3). mDAGs, and carefully defines the problem of interest. Section 3 describes the nested Markov property. Section 4 describes latent variable models that can be used to represent the marginal model without loss of generality, and Section 5 contains the main results of the paper. Finally, in Section 6 we show that a large class of marginal models represent smooth manifolds, and provide some discussion. 2 Directed Graphical Models We begin with some elementary graphical definitions. Definition 2.1. A directed graph, G(V, E), consists of a finite set of vertices, V , and a collection of edges, E, which are ordered pairs of distinct elements of V . If (v, w) ∈ E we denote this by v → w, and say that v is a parent of w; the set of parents of w is denoted by paG (w). Similarly w is a child of v, and the child set is denoted by chG (v). A directed graph is acyclic if there is no sequence of edges v1 → v2 → · · · → vk → v1 for k > 1. We call such a graph a directed acyclic graph, or DAG. Graphs are best understood visually: an example of a DAG with five vertices and five edges is given in Figure 1. We will require the following generalization of a DAG that allows for two separate types of vertex. ˙ 3 Definition 2.2. A conditional DAG G(V, W, E) is a DAG with vertices V ∪W and edge set E, with the restriction that no vertex in W may have any parents. The vertices in V are the random vertices, and W the fixed vertices; these two sets are disjoint. If W = ∅, this reduces to the ordinary definition of a DAG. We denote fixed vertices with square nodes, and random ones with round nodes: see the example in Figure 3. 2.1 Graphical Models A graphical model arises from the identification of a graph with a collection of multivariate probability distributions; see Lauritzen (1996) for an introduction. Each vertex v ∈ V represents a random variable Xv taking values in a finite state-space Xv , and a model for their joint distribution is determined by the structure of the graph. With a conditional DAG G we associate a collection 3 Here and throughout ∪˙ denotes a disjoint union of sets. 6 of probability measures P (· | xW ) on XV ≡ ×v∈V Xv , indexed by xW ∈ XW . Mathematically, fixed nodes play a similar role to the ‘parameter nodes’ used by Dawid (2002). Following Lauritzen (1996), we say a probability kernel P over XA given XB is a non-negative function q : XA × XB → R such that xA q(xA | xB ) = 1 for all xB ∈ XB . A kernel behaves much like a conditional probability distribution, but no assumption is made about any distribution over the indexing set XB . We apply the usual definitions for marginalizing and conditioning in kernels: q(xA | xB ) ≡ X q(xA , xC | xB ), q(xA | xB , xC ) ≡ xC q(xA , xC | xB ) . q(xC | xB ) If q(xA | xB , xC ) does not depend upon xB then we will denote it q(xA | xC ), and say that XA ⊥ ⊥ XB | XC [q]. Here, and elsewhere, we use the shorthand V W for V ∪ W in subscripts. Definition 2.3. Let p(xV | xW ) be a probability kernel over XV indexed by XW . We say that p obeys the factorization criterion with respect to a DAG G if it factorizes into univariate kernels as Y p(xV | xW ) = p(xv | xpa(v) ), xV W ∈ XV W . (4) v∈V The definition reduces to the familiar factorization criterion for DAGs if W = ∅. The extra generality will be useful for discussing Markov properties which involve factorization of the distribution into conditional pieces. The fixed vertices are analogous to variables that have been conditioned upon; if p satisfies (4) then, after renormalization, it also satisfies the factorization criterion for the same DAG with all vertices random. The definition of a Bayesian network can be extended to the case where no joint density exists by insisting that each random variable Xv can be written as a measurable function of Xpa(v) and an independent noise variable; we call this the structural equation property. If the density exists the two criteria are equivalent, and since we work with discrete variables this condition is always satisfied. Although the factorization property is often simpler to work with for practical purposes such as modelling and fitting, the structural equation property is useful in proofs. The well-known global Markov property based on d-separation is also equivalent to the structural equation property (Pearl, 2009). Example 2.4. A distribution P with density p obeys the factorization criterion for the graph in Figure 1 if the density has the form p(x0 , x1 , x2 , x3 , x4 ) = p(x0 ) · p(x1 ) · p(x2 | x0 , x1 ) · p(x3 | x2 ) · p(x4 | x0 , x3 ). Such distributions are precisely those which satisfy the conditional independences X1 ⊥ ⊥ X0 , X3 ⊥ ⊥ X0 , X1 | X2 , X4 ⊥ ⊥ X1 , X2 | X0 , X3 . Example 2.5. A kernel p obeys the factorization criterion for the conditional DAG in Figure 3 if it can be written as p(x0 , x2 , x4 | x1 , x3 ) = p(x0 ) · p(x2 | x0 , x1 ) · p(x4 | x0 , x3 ). 7 1 2 3 4 Figure 4: An mDAG representing the DAG in Figure 1, with the vertex 0 treated as unobserved. 2.2 Latent Variables and mDAGs We now introduce the possibility that some of the random variables are unobserved or latent, leaving the marginal distribution over the remaining observed variables. We represent the collection of margins of DAG models using a larger class of hyper-graphs called mDAGs (‘marginal DAGs’). These avoid dealing with latent variables directly, instead introducing additional edges to represent them. For example, the DAG in Figure 1, with the vertex 0 treated as a latent variable, is represented by the mDAG in Figure 4. Define an abstract simplicial complex B over V as a collection of non-empty subsets of V such that (i) {v} ∈ B for every v ∈ V , and (ii) if A ∈ B and B ⊆ A with B 6= ∅, then B ∈ B. Definition 2.6. An mDAG, G(V, W, E, B), is hyper-graph consisting of a conditional DAG with random vertices V , fixed vertices W and directed edge set E, together with an abstract simplicial complex B over V , called the bidirected faces. We say that G ′ (V ′ , W ′ , E ′ , B ′ ) is a subgraph of G if V ′ ⊆ V , E ′ ⊆ E, B ′ ⊆ B, and W ′ ⊆ V ∪ W : that is, each component is contained within the previous one, but random vertices may become fixed. The mDAG was introduced by Evans (2016), without the additional generality of fixed vertices. This aspect changes very little to the theory of these graphs, but is necessary for understanding the nested Markov model; note that bidirected faces only involve the random vertices. As with conditional DAGs, when representing mDAGs graphically the fixed vertices are drawn as square nodes and random vertices as circles. The bidirected simplicial complex is represented by its maximal non-trivial elements (i.e. those of size at least 2), called the bidirected hyperedges, or just edges. These are drawn in red, as in Figure 5(a); in this case W = {6} and the maximal sets of B are {1, 2}, {2, 3, 4}, and {3, 4, 5}. With each mDAG, G, we can associate a conditional DAG Ḡ by replacing each maximal element B ∈ B (of size at least 2) with a new random vertex u, such that the children of u are precisely the vertices in B. The new vertex u becomes the ‘unobserved’ variable represented by the bidirected edge B. We call Ḡ the canonical DAG associated with G. The mDAG in Figure 5(a) is thus associated with the canonical DAG in Figure 5(b). Our interest in mDAGs lies in their representation of the margin of the associated canonical DAG, and so we define our model in this spirit; see Evans (2016). ˙ , and let Ḡ be the Definition 2.7. Let G be an mDAG with vertices V ∪W ˙ ∪W ˙ . A kernel p over XV indexed by XW is canonical DAG with vertices V ∪U 8 1 2 3 6 4 5 (a) 1 u1 2 3 u2 u3 6 4 5 (b) Figure 5: (a) An mDAG, G, and (b) a DAG with hidden variables, Ḡ, representing the same model (the canonical DAG). 9 said to be in the marginal model for G if there exists a kernel q that factorizes according to Ḡ, and Z q(xV , xU | xW ) dxU . p(xV | xW ) = XU That is, the margin of q over XV is p. Denote the collection of such kernels by M(G). In other words, the marginal model is the collection of kernels that could be constructed as the margin of a Bayesian network with latent variables replacing the bidirected edges. If G is a DAG then the marginal model is just the usual model defined by the factorization. A latent variable model corresponding to a canonical DAG Ḡ (i.e. possibly with parametric or distributional assumptions on the latent variables) always lies within the marginal model corresponding to the mDAG G. This should not be taken as meaning that the marginal model supersedes all latent variable models, since sometimes the additional parametric assumptions made in a latent variable model are crucial to their utility. For example, representing hidden Markov models and phylogenetic tree models using an mDAG leads to a bidirected hyper-edge containing all vertices; the marginal models are therefore saturated, and rather uninteresting from the perspective statistical inference. From the definitions above it may seem as though the set of marginal DAG models that can be represented by mDAGs is restricted to cases where the latent variables have no parents; in fact this does not cause any loss of generality, since all marginal DAG models can be represented in this way (see Evans, 2016). 2.3 Districts and Sterile Vertices Definition 2.8. A collection of random vertices C ⊆ V in an mDAG G is bidirected-connected if for any distinct v, w ∈ C, there is a sequence of vertices v = v0 , v1 , . . . , vk = w all in C such that, for each i = 1, . . . , k, the pair {vi−1 , vi } ∈ B. A district of an mDAG is an inclusion maximal bidirected-connected set of random vertices. More informally, a district is a maximal set of random vertices joined by the red edges in an mDAG. It is easy to see from the definition that districts form a partition of the random vertices in an mDAG. The mDAG in Figure 4, for example, contains three districts, {1}, {3} and {2, 4}. Districts inspire a useful reduction of mDAGs, via the following special subgraph. Definition 2.9. Let G be an mDAG containing random vertices C ⊆ V . Then G[C] is the subgraph of G with (i) random vertices C and fixed vertices paG (C) \ C; (ii) those directed edges w → v such that v ∈ C (and w ∈ paG (C)); (iii) the bidirected simplicial complex BC ≡ {B ∩ C : B ∈ B(G)}. G[C] is therefore the subgraph induced over C, together with parents of C and edges directed towards C. Any edges (whether directed or bidirected) between the newly fixed vertices are removed. 10 1 2 3 (b) (a) 1 2 3 4 (c) Figure 6: Subgraphs corresponding to factorization of the graph in Figure 4 into districts. Parent nodes of the district are drawn as squares. For the graph in Figure 4 the subgraphs G[{1}], G[{3}] and G[{2, 4}] are shown in Figures 6(a), (b) and (c) respectively. Note in particular that the edge 2 → 3 is not in the subgraph G[{2, 4}]. Definition 2.10. Let G be an mDAG with random vertices V . For an arbitrary set C ⊆ V , define sterileG (C) ≡ C \ paG (C). In words sterileG (C) is the subset of C whose elements have no children in C. We say a set C is sterile if C = sterileG (C). Proposition 2.11. Let G be an mDAG with districts D1 , . . . , Dk . A probability kernel p is in the marginal model for G if and only if p(xV | xW ) = k Y gi (xDi | xpa(Di )\Di ), i=1 where each gi is a probability kernel in the marginal model for G[Di ]. In addition, p is in the marginal model for G only if for every v such that chG (v) = ∅, the marginal distribution X p(xV | xW ) p(xV \v | xW ) = xv is in the marginal model for G[V \ {v}]. Proof. Consider the factorization of the canonical DAG Ḡ. The first result follows from grouping the factors according to districts and noting that there is no overlap in the variables being integrated out. The second result follows from noting that if v has no children, the variable xv only appears in a single factor, and that factor is a conditional distribution that integrates to 1. It follows from this result that to characterize the marginal model we need only consider mDAGs containing a single district, since other models can always be reduced to combinations of such graphs. 11 1 2 1 3 2 (a) 3 (b) Figure 7: (a) An mDAG on three vertices representing a saturated model; (b) the bidirected 3-cycle, the simplest non-geared mDAG. 2.4 Relationship between mDAGs and ADMGs Previous papers considering marginal and nested models for DAGs have used acyclic directed mixed graphs, which are the restriction of mDAGs with random vertices so that each bidirected edge has size two (Richardson, 2003; Shpitser et al., 2012; Evans and Richardson, 2014; Richardson et al., 2017). From the perspective of the nested Markov property this distinction is unimportant: if we replace any bidirected simplicial complex with all its subsets of size 2, we obtain a conditional ADMG that represents the same model under the nested Markov property. However, if we consider the marginal model the models are not equal, as the restriction to pairwise independent latent parents will sometimes introduce additional inequality constraints. The marginal model for the mDAG in Figure 7(b) is strictly smaller than the one for 7(a) (Fritz, 2012, Proposition 2.13), for example. See Evans (2016) for a more detailed discussion. It follows from the results of this paper that there is no difference in equality constraints between graphs that differ only in this manner; algebraically the model defined by having a single latent parent for several variables is the same as having separate parents for each pair of vertices. The mDAGs in Figure 7 both represent marginal models of full dimension, for example. Hence, in terms of model dimension, nothing is lost by using ADMGs instead of mDAGs. 3 Nested Markov Property The nested Markov property imposes constraints on a joint distribution that mimic those satisfied by the marginal model, including conditional independences and the Verma constraint in Example 1.1 (Richardson et al., 2017). It is defined in the following recursive way, which is a modification of the algorithm of Tian and Pearl (2002). Definition 3.1 (Nested Markov Property). A kernel p over XV indexed by XW obeys the nested Markov property for an mDAG G(V, W ) if V = ∅, or both: 12 1. p factorizes over the districts D1 , . . . , Dl of G: p(xV | xW ) = l Y gi (xDi | xpa(Di )\Di ) i=1 where each gi is a kernel which (if l ≥ 2 or W \ paG (V ) 6= ∅) obeys the nested Markov property with respect to G[Di ]; and 2. for each v ∈ V such that chG (v) = ∅, the marginal kernel X p(xV | xW ) p(xV \v | xW ) = xv obeys the nested Markov property with respect to G[V \ {v}]. The set of kernels that obey the nested Markov property for G is the nested Markov model, denoted by N (G). The condition that l ≥ 2 or W \ paG (V ) 6= ∅ in the first criterion of this definition is simply to prevent an infinite recursion of the definition: all the graphs invoked recursively have either fewer random vertices or fewer vertices overall than their predecessor in the recursion. When we reach a graph with a single random vertex v such that all fixed vertices are parents of v, then any kernel p(xv | xpa(v) ) satisfies the nested Markov property. Example 3.2. Consider again the mDAG in Figure 4. Applying criterion 1 to this graph implies that p(x1 , x2 , x3 , x4 ) = g1 (x1 ) · g24 (x2 , x4 | x1 , x3 ) · g3 (x3 | x2 ) for some g1 , g3 and g24 obeying the nested Markov property with respect to the mDAGs in Figures 6(a), (b) and (c) respectively. Applying the second criterion to g24 and the now childless vertex 2 (see Figure 6(c)) gives X g24 (x2 , x4 | x1 , x3 ) = h(x4 | x3 ), x2 for some function h independent of x1 (by a further application of the first criterion); this is precisely the Verma constraint. The marginal model implies additional conditions on joint distributions because, although it satisfies the properties used to define the nested model, these properties are not sufficient to describe it. In particular, for p to be in the marginal model, the kernel g24 must satisfy Bell’s inequalities (see, for example, ver Steeg and Galstyan, 2011, Section 4.1). The nested Markov property is ‘sound’ with respect to marginal models, in the sense that all constraints represented by the former also hold in the latter. Theorem 3.3. For any mDAG G we have M(G) ⊆ N (G). Proof. This follows from the fact that the nested Markov model is defined in terms of constraints which are proven in Proposition 2.11 to be satisfied by the marginal model. 13 3.1 Parameterizing Sets Definition 3.4. Let G be an mDAG. A subset of random vertices S ⊆ V is called intrinsic if S is a district in any graph which can be obtained by iteratively applying graphical operations of the form 1 and 2 in Definition 3.1 (i.e. taking the graph G[D] for a district D, or G[V \ {v}] for a sterile vertex v). Given an intrinsic set, S, define H = sterileG (S) to be the recursive head, and T = paG (S) the tail, associated with S (note that H and T are disjoint). The collection of all recursive heads in G is denoted by H(G). There is a one-to-one correspondence between intrinsic sets and recursive heads (Evans and Richardson, 2015). Throughout we will use H and T to indicate recursive heads and tails respectively, with the context making it clear which intrinsic set is being referred to. Define A(G) ≡ {H ∪ A | H ∈ H(G), A ⊆ T } to be the parameterizing sets of G. This collection of sets is so-called because it (locally) describes the set of distributions (or kernels) contained in the nested and marginal models, as we prove in Section 5. Conversely, non-empty sets not in A(G) are called the constrained sets, and locally describe the set of constraints imposed by the nested and marginal models. Example 3.5. The mDAG in Figure 4 has districts {1}, {3} and {2, 4}, so these are all intrinsic sets. Further, in the subgraph G[{2, 4}] the vertices 2 and 4 have no children, so we can marginalize either to see that respectively {4} and {2} are intrinsic sets. The corresponding recursive heads and tails are then: S {1} H {1} T ∅ {2} {3} {2} {3} {1} {2} {4} {2,4} {4} {2,4} {3} {1,3} A {1} {2}, {1,2} {3}, {2,3} . {4}, {3,4} {2,4}, {1,2,4}, {2,3,4}, {1,2,3,4} Note that every non-empty subset of V is represented in A except for {1, 3}, {1, 2, 3}, {1, 4} and {1, 3, 4}. These are the ‘constrained sets’; the first two correspond to the conditional independence, X1 ⊥ ⊥ X3 | X2 in (2), and the others to the Verma constraint (3). Intrinsic sets and recursive heads consist only of random vertices, while tails may include both random and fixed vertices. Proposition 3.6. Let C be a bidirected-connected set in an mDAG G; then there exists an intrinsic set S such that C ⊆ S and sterileG (S) ⊆ sterileG (C). Proof. The district containing C is intrinsic by definition, so there exists an intrinsic set containing C; let S be a minimal intrinsic set (by inclusion) containing C. By the definition of intrinsic sets S is a district in some graph reached by iteratively applying the operations 1 and 2 to G: applying operation 1 again gives the graph G[S]. 14 Suppose for contradiction that there exists v ∈ sterileG (S)\ sterileG (C); then v∈ / C, since otherwise some child of v would be in C, and therefore in S. In addition, v is childless in the subgraph G[S], so we can remove v under operation 2 of Definition 3.1. In the resulting strictly smaller graph, C is still contained within one district, say S ′ , since C is bidirected-connected; in addition S ′ is also intrinsic, so we have found a strictly smaller intrinsic set S ′ ⊇ C, and reached a contradiction. We use the △ operator to denote the symmetric difference of two sets: A△B ≡ (A \ B) ∪ (B \ A). Given a collection of sets Ai , i = 1, . . . , k indexed by a finite set I, let k i Ai ≡ A1 △A2 △ · · · △Ak . i=1 denote the symmetric difference of all the Ai . That is, it is the set containing precisely those elements a which appear in an odd number of the sets Ai . The following result gives a characterization of the parameterizing sets in terms of symmetric differences which will be fundamental to our proof of the main results in this paper. Lemma 3.7. A set A ∈ A(G) if and only if there exists a bidirected-connected set C = {v1 , . . . , vk } in G, and sets Ai , i = 1, . . . , k, satisfying {vi } ⊆ Ai ⊆ {vi } ∪ paG (vi ), such that A= k i Ai = A1 △ · · · △Ak . (5) i=1 Proof. Suppose that A ∈ A(G); then H ⊆ A ⊆ H ∪ T for some head-tail pair (H, T ), with associated intrinsic set S. Then let C = S, since intrinsic sets are by definition bidirected-connected. Now consider sets A′ of the form (5); start with Ai = {vi }, so that A′ = S, and we will adjust the sets Ai to obtain A′ = A. We always have that A′ contains H, because each vi ∈ H appears in Ai and, by sterility of heads, in no other set Aj . Each vertex t ∈ T is (by definition) the parent of some vertex vj(t) ∈ S, so we can either include or exclude it from A′ (as required) just by replacing Aj(t) = {vj(t) } by {vj(t) , t}. Hence we just do this to include vertices in A \ S ⊆ T and exclude vertices in S \ A ⊆ T . Conversely, suppose that A is of the form (5) for some bidirected-connected set C; let S be an intrinsic set satisfying the conditions of Proposition 3.6, and (H, T ) be its associated head-tail pair. Then the head H = sterileG (S) ⊆ sterileG (C). Each vi ∈ H ⊆ C appears in A, since vi ∈ Aj if and only if i = j. Also A ⊆ C ∪ paG (C) ⊆ S ∪ paG (S) = H ∪ T , so A ∈ A(G). 3.2 Parameterization of the nested model The nested Markov model can be parameterized with parameters indexed by head-tail sets (Evans and Richardson, 2015), and the parameterization defines a smooth bijection between an open subset of a real vector space (i.e. the parameter space) and the model (the set of probability distributions). This has 15 some nice consequences that we now state (for proofs see Evans and Richardson, 2015). In particular, for a fixed state-space XV W the set N (G) is a smooth manifold within the strictly positive probability simplex, and has dimension Y X |XT | (|Xh | − 1). d(G, XV W ) ≡ h∈H H∈H(G) In the all-binary case this reduces to d(G, XV W ) ≡ X 2|T | . H∈H(G) Our main result will show that M(G) always has the same dimension as N (G). Indeed, the parameterization of N (G) will in principle also serve as a parameterization of M(G), except that one would also have to restrict the parameter space in order to enforce the inequality constraints; of course, this is currently impractical since the inequality constraints are not generally known. 4 Geared mDAGs In this section we introduce a special class of mDAGs which we term ‘geared’. For marginal models relating to such graphs, the state-space of the hidden vertices can be restricted without loss of generality, making proofs considerably easier. In Section 5 we prove our main result first for geared graphs, and then extend the result to the general case. Definition 4.1. Let G be an mDAG with bidirected simplicial complex B. We say that G is geared if the maximal elements of B satisfy the running intersection property. That is, there is an ordering of the edges B1 , . . . , Bk such that for each j > 1, there exists s(j) < j with [ Bi = Bj ∩ Bs(j) . Bj ∩ i<j In other words, the vertices that are contained in both Bj and any previous edge are all contained within one such edge Bs(j) . A particular ordering of the elements of B which satisfies running intersection is called a gearing of G.4 Example 4.2. The simplest non-geared mDAG is the bidirected 3-cycle, depicted in Figure 7(b); there is no way to order the bidirected edge sets {1, 2}, {2, 3}, {1, 3} in a way which satisfies the running intersection property, since whichever edge is placed last in the ordering shares a different vertex with each of the two other edges. 4 The term ‘geared’ is chosen because a collection of bidirected edges which satisfies running intersection may appear rather like ‘cogs’ in a set of gears: see Figure 5. The definition is equivalent to the requirement that the simplicial complex B is vertex decomposable (Provan and Billera, 1980), and is also closely related to the notion of decomposability in an undirected or directed graph. Indeed the term ‘decomposable’ is used by Fox et al. (2014) to describe the same idea. We avoid using this terminology because of its existing meaning in connection with undirected and directed graphical models: for example, ordinary DAGs are trivially geared, but they may or may not be decomposable in the original sense (Lauritzen, 1996). 16 The following fact about geared subgraphs of mDAGs will allow us to generalize our later results to graphs which are not geared. Lemma 4.3. Let G be an mDAG with parameterizing sets A(G). For any A ∈ A(G) there exists a geared mDAG G ′ ⊆ G, such that A ∈ A(G ′ ). Proof. By Lemma 3.7, A is of the form (5) for some bidirected-connected set C. Let G ′ have the same vertices (random and fixed) and directed edges as G, but be such that the set C is singly connected by bidirected edges (i.e. the edges are all of size 2 and removing any of them will cause C to be disconnected) chosen to be a subgraph of G. Then G ′ is geared by standard properties of trees and running intersection, and using Lemma 3.7 again we have A ∈ A(G ′ ). 4.1 Functional Models The key property of geared graphical models is that we can find a finite discrete latent variable model that is the same (over the observed variables) as the marginal model; that is, if the latent variables have a sufficiently large state-space then they do not impose additional restrictions on the observed distribution. This is achieved by letting each observed variable be a deterministic function of its latent and observed parents. We illustrate this with an example. Example 4.4. Consider the mDAG in Figure 8(a) representing the instrumental variables model, used to model non-compliance in clinical trials; here, for example, X1 represents a randomized treatment, X2 the treatment actually taken, and X3 a patient’s outcome or response, such as survival. Suppose that each of these quantities is binary, taking values in {0, 1}. Conceptually, it can be useful to posit the existence of two different potential outcomes X3 (0), X3 (1) for the survival response, one for each level of the treatment; X3 (0) is the patient’s outcome given that they choose not to take the treatment (so that X2 = 0) and X3 (1) is their outcome given that they do (X2 = 1). For example, if X3 (0) = 0 and X3 (1) = 1 then the patient survives if they take the treatment but dies if they do not. This pair of values is known as a patient’s response type. Of course, we can only ever observe one of these outcomes in a given patient, the one corresponding to the observed value of X2 . Similarly, we can conceive of two versions of the treatment X2 (0), X2 (1) depending upon the assigned value of X1 , this pair being called the patient’s compliance type. For example, X2 (0) = X2 (1) = 0 means that the patient will not take the treatment, regardless of whether or not they are assigned to the treatment group. These concepts have proved fruitful in causal inference, as they enable discussion of whether treatments have effects at the level of individual patients, rather than just over the entire population on average (Neyman, 1923; Rubin, 1974; Richardson et al., 2011). Now, since the latent variable (say U ) with children {2, 3} can take any value, we can—without loss of generality—assume that it includes the pair (X3 (0), X3 (1)), or equivalently a function f3 : X2 → X3 that determines, given the observed X2 , which value X3 will take. In this case X3 is still a measurable function of its parents U and X2 . Similarly we can assume U includes a function f2 : X1 → X2 that determines X2 given an observed X1 . An observation for a particular patient can be obtained by drawing a random treatment assignment X1 , a random compliance type for the patient f2 , and a 17 f2 , f3 1 2 3 1 (a) 2 3 (b) Figure 8: (a) An mDAG representing the instrumental variables model; (b) a DAG with functional latent variables equivalent to the potential outcomes model of instrumental variables. random response type f3 , and then evaluating (X1 , X2 , X3 ) = (X1 , f2 (X1 ), f3 (f2 (X1 ))). The key point is that one can place a distribution over (X1 , f2 , f3 ) and obtain a distribution over the observed variables (X1 , X2 , X3 ). The only requirement for the distribution to be Markov with respect to this particular graph is that X1 ⊥ ⊥ {f2 , f3 }, as depicted in Figure 8(b). The functional construction outlined above is mathematically equivalent to potential outcomes, and provides a model that is somewhat simpler to study than the general latent variable model. In fact, any geared mDAG can be reduced to a latent variable model in the way described above, something we now proceed to show. 4.2 Remainder Sets Given a single-district, geared mDAG with at least one bidirected edge and a gearing B1 , . . . , Bk , define [ Bi Rj ≡ Bj \ i<j (taking R1 ≡ B1 ) to be the remainder set associated with Bj . Remainder sets partition V , so for a random vertex v ∈ V , define r(v) to be the unique j such that v ∈ Rj . Now say that an ordering < on the vertices in V respects the gearing if for v ∈ Ri and w ∈ Rj , we have v < w whenever i > j; in other words, all the vertices in Rk precede all those in Rk−1 , etc; such an ordering always exists. For each v ∈ V with r(v) = j, let [ Ri ; π(v) = i>j v∈Bi that is, the remainders associated with all bidirected edges which contain v and are later than j in the ordering. Then define a collection of functions Fv ≡ {f : Xpa(v) × Fπ(v) → Xv }, where FA = ×a∈A Fa and F∅ = X∅ = {1}. This is valid recursive definition, since all the vertices in π(v) precede v in an ordering which respects the gearing. 18 Example 4.5. The mDAG in Figure 8(a) has only one bidirected edge and therefore is trivially geared with R1 = B1 = {2, 3}. This leads to the sets F2 = {f2 : X1 → X2 }, F3 = {f3 : X2 → X3 }, which are precisely the sets of functions for compliance type and response type respectively. Example 4.6. Consider the mDAG in Figure 5, and order the bidirected edges as B1 = {1, 2}, B2 = {2, 3, 4} and B3 = {3, 4, 5}, giving respective remainder sets R1 = {1, 2}, R2 = {3, 4} and R3 = {5}. The ordering 5 < 4 < 3 < 2 < 1 of the random vertices respects the gearing, and we have π(1) = π(5) = ∅, π(3) = π(4) = {5}, π(2) = {3, 4}. In this case then F5 = {f : X3 → X5 } F4 = {f : X2,3,6 × F5 → X4 } F3 = {f : X1 × F5 → X3 } F1 = {f : {1} → X1 } F2 = {f : F3,4 → X2 } Alternatively, if we order the bidirected edges as {2, 3, 4}, {1, 2}, {3, 4, 5}, then we could take 5 < 1 < 2 < 3 < 4, and π(1) = π(5) = ∅, π(3) = π(4) = {5}, π(2) = {1}; this yields F2 = {f : F1 → X2 }, with other collections Fv remaining unchanged. 4.3 Functional Models for Geared Graphs If a vertex v is contained within exactly one bidirected edge, B, then without loss of generality we can assume that the latent variable corresponding to B contains all the residual information about how Xv should behave given the values of its visible parents, Xpa(v) . In other words, the latent variable associated with B includes a (random) function fv : Xpa(v) → Xv which, once instantiated, ‘tells’ Xv = fv (Xpa(v) ) which value it should take for each value of its other parents, exactly as in Example 4.5.5 All the randomness of Xv is collapsed into fv and Xpa(v) . If v is contained within two or more bidirected edges, say Bi and Bj , we might say that Bi tells Xv what value to take for every value of its visible parents and the other latent variables. However, it is not clear how to define such a function until the state-space associated with the other latent parents (i.e. Bj ) has already been fixed. The decomposable structure of geared graphs makes it possible to iteratively fix state-spaces for latent variables without loss of generality. To see this, suppose we have a single-district, geared mDAG G with remainder sets R1 , . . . , Rk , and form the canonical DAG Ḡ by replacing each bidirected edge Bi in G with a new vertex ui , such that chḠ (ui ) = Bi . Compare, for example, the structure of the graphs in Figures 5(a) and (b). 5 Equivalently, one could take a deterministic function fv and introduce an ‘error term’ Ev so that Xv = fv (Xpa(v) , Ev ), as in the non-parametric structural equation models of Pearl (2009). 19 1 f1 , f2 2 3 f3 , f4 f5 6 4 5 Figure 9: A DAG with functional latent variables, associated with a gearing of the mDAG in Figure 5(a). 2 3 f3 , f4 f5 6 4 Figure 10: Subgraph of the DAG in Figure 9 containing the vertex 4 and its parents. Note that each vertex v ∈ Rk has a single latent parent uk in Ḡ. Then, without loss of generality, incorporate the function fv : XpaG (v) → Xv into the latent variable Uk . We ‘replace’ Uk with the collection of such functions f Rk ∈ F Rk . Each vertex v ∈ Rk−1 has latent parent uk−1 and possibly also uk ; but since the state-space of Uk has been fixed as FRk , we can define fv : Xpa(v) ×FRk → Xv for those v with latent parents uk−1 and uk , and just fv : Xpa(v) → Xv otherwise. These functions fRk−1 can be integrated into Uk−1 , and the process repeated for i = k − 2, . . . , 1. We end up with latent variables Ui taking values in FRi for i = 1, . . . , k. For example, with the first gearing given in Example 4.6 for the graph in Figure 5(a), we would have U1 = (f1 , f2 ), U2 = (f3 , f4 ), U3 = (f5 ). Associating each variable Ui with the vertex ui leads to the DAG in Figure 9. Notice that, for each v ∈ V , the function fv is contained within a parent variable of v. In addition, all the arguments of the function fv are also parents of v. For example, take v = 4, whose parents are drawn separately in Figure 10. The function f4 ∈ F4 is generated as part of the latent variable U2 = (f3 , f4 ), 20 and the associated vertex u2 is indeed a parent of 4. In addition, F4 = {f : X2,3,6 × F5 → X4 }, so the arguments of the function f4 , namely X2 , X3 , X6 and f5 , all correspond to vertices which are also parents of 4. Thus, in setting X4 = f4 (X2 , X3 , X6 , f5 ) we ensure that X4 is a well defined function of its parent variables. In fact using this construction we can set Xv = fv (fπ(v) , Xpa(v) ) for every v ∈ V , which is well defined because the directed part of the original mDAG is acyclic. The following result shows that the resulting conditional distribution over XV given XW is in the marginal model for the original mDAG. Theorem 4.7. Let G be a geared mDAG, and Ri , i = 1, . . . , k be the remainder sets corresponding to some gearing of G. Suppose we generate functions fv ∈ Fv according to a distribution in which (fv | v ∈ Ri ) ⊥ ⊥ (fw | w ∈ V \ Ri ), for each i = 1, . . . , k, and then define Xv = fv (fπ(v) , Xpa(v) ), v ∈ V. Then the induced conditional distribution on XV given XW is in the marginal model for G. Proof. For each bidirected edge Bi , define the random variable Ui = (fv | v ∈ Ri ). The Ui s are represented by exogenous variables on the DAG Ḡ, and the conditions given in the statement of the theorem ensures they are all independent. The structural equation property for Ḡ will therefore be satisfied if each Xv is a well defined function of its parents in the graph. In other words, the three components fv , fπ(v) and Xpa(v) must all be determined from random variables which are parents of v in Ḡ. This holds for Xpa(v) by definition. Additionally v ∈ Ri implies that v ∈ Bi , and that therefore the variable Ui ≡ (fv : v ∈ Ri ) is a parent variable of Xv . Lastly suppose w ∈ π(v); this happens if and only if w, v ∈ Bj for some j > i, in which case w ∈ Rj for the minimal such j by the running intersection property of the gearing. Then fw is contained in Uj , which is also a parent variable of Xv . In fact it is not hard to see that any distribution in the marginal model of a geared graph can be generated in the way described in Theorem 4.7. Since each of these latent variables takes values in a finite collection of functions, this means that the marginal model of a geared graph is equivalent to a latent variable model in which all the random variables (latent and observed) are finite and discrete. It follows from this that marginal models for geared mDAGs are semi-algebraic sets by the Tarski-Seidenberg theorem (Basu et al., 1996, Chapter 2). Example 4.8. Consider the marginal model for the graph in Figure 4. In this case the vertices 2 and 4 are each contained in only one bidirected edge, so 21 without loss of generality this edge could be replaced in the canonical DAG (Figure 1) with a latent variable taking values in F2 × F4 where F2 ≡ {f : X1 → X2 }, F4 ≡ {f : X3 → X4 }. That is, the latent variable may be assumed to be U = (f2 , f4 ), where f2 and f4 respectively assign values to X2 and X4 given particular values of X1 and X3 . For non-geared graphs such as that in Figure 12(a), there is no clear way to write the marginal model as a latent variable model without possible loss of generality. It is therefore not possible for us to prove that marginal models corresponding to non-geared mDAGs are semi-algebraic; however, we conjecture that they indeed are. Our results will show that for a sufficiently large latent state-space the dimension of the latent variable model becomes the same as that of the nested model, but it is at least conceivable that there are non-polynomial inequality constraints on the marginal model for non-geared graphs. 4.4 Generating Distributions for Geared mDAGs Let G be a single-district, geared mDAG, with gearing given by remainder sets R1 , . . . , Rk ; assign a probability distribution ρi to each collection of functions Ui ≡ (fv | v ∈ Ri ). Suppose we draw values for variables Ui = (fv )v∈Ri independently according to ρi , and use them to generate values for the observed variables XV for each possible value of the fixed vertices XW . The resulting (conditional) distribution over XV given XW is, by Theorem 4.7, in the marginal model for G. S Let π(Ri ) ≡ v∈Ri π(v) and fA ≡ (fv | v ∈ A). Define p[ρk , . . . , ρ1 ](xV | xW ) = X ρk (fRk ) · · · X ρ1 (fR1 ), (6) fR1 ∈Φ1 (fπ(R1 ) ,xV W ) fRk ∈Φk (xV W ) where Φi (fπ(Ri ) , xV W ) = {fRi | fv (xpa(v) , fπ(v) ) = xv for each v ∈ Ri }; (7) that is, Φi (fπ(Ri ) , xV W ) is precisely the set of functions fRi that, given the indicated values of parents variables, jointly evaluate to xRi . Hence (6) is a sum over all the combinations of functions fV that, given the input XW = xW , recursively evaluate to xV . The function p[·] takes distributions over the functions fV and returns a kernel over XV indexed by XW . For brevity we will generally denote this by X X p[ρk , . . . , ρ1 ] = ρk · · · ρ1 , Φk Φ1 with the dependence upon xV W left implicit. It may be helpful to think of this as an over-parameterized family of kernels for XV given XW , with parameters ρ1 , . . . , ρk . The mapping p[·] is clearly smooth (infinitely differentiable), and its image defines the marginal model. Hence we will be able to deduce various aspects of the model’s geometry by studying p[·] and its derivatives. Choosing ρi (fRi ) = 1 for each i (up to a constant of proportionality which, for simplicity, we do not 22 write explicitly) induces the uniform distribution on XV for each xW ∈ XW ; we denote this kernel by p0 ≡ p[1, . . . , 1]. Clearly p0 is contained within M(G) for any mDAG G—as, in fact, is any distribution corresponding to all variables being independent. Example 4.9. For the instrumental variables model in Figure 8 (if we consider X1 to be fixed), we have X ρ(f2 , f3 ) p[ρ](x2 , x3 | x1 ) = Φ(x123 ) where Φ(x123 ) = {(f2 , f3 ) : f2 (x1 ) = x2 , f3 (x2 ) = x3 }. Example 4.10. In the case of the mDAG in Figure 5(a) we have three bidirected edges and remainder sets, and the gearing used in Figure 9 gives X X X p[ρ3 , ρ2 , ρ1 ] = ρ3 (f5 ) ρ2 (f3 , f4 ) ρ1 (f1 , f2 ), Φ3 Φ2 Φ1 where Φ1 = {(f1 , f2 ) | f1 = x1 , f2 (f3 , f4 ) = x2 } Φ2 = {(f3 , f4 ) | f3 (x1 ) = x3 , f4 (x2 , x3 , x6 , f5 ) = x4 } Φ3 = {f5 | f5 (x3 ) = x5 }. 5 Main Results In this section we provide our main results, showing that the marginal model M(G) has the same dimension as the nested model. This is done first for geared mDAGs, and the result is then extended to general graphs. For geared graphs, the marginal model is just the image of the infinitely differentiable function p[·] described in the previous section. Such functions can be locally approximated at a particular point, say p0 = p[1, . . . , 1], by the linear map given by the derivative of p[·]. This column space of this linear map (also called the pushforward map) gives the linear space that approximates the model at p0 , also known as the tangent space. We will show that the tangent space to the marginal model at p0 is equal to the tangent space of the nested model N (G) at p0 . To do this we take a basis of the tangent space of N (G), and for every vector λ in the basis we explicitly construct a vector δ such that the directional derivative of p[·] with respect to δ is equal to λ. This shows that each λ is also contained in the tangent space of M(G). Since the marginal model is contained within the nested model, it will then follow from results in algebraic geometry that the two models coincide in a neighbourhood of p0 . For non-geared graphs we have do slightly more work, showing that we can combine maps from different geared sub-graphs to obtain the same result. 23 5.1 Vector Spaces and Tangent Cones A probability kernel p(xV | xW ) can be thought of equally as a vector with entries indexed by XV W , or a real function with domain XV W . The following decomposition of the vector space R|XV | will prove useful. Definition 5.1. For any A ⊆ V , let ΛA be the subspace of R|XV | consisting of vectors p such that P (i) ya ∈Xa p(ya , xV \a ) = 0 for each a ∈ A and xV \{a} ∈ XV \{a} ; (ii) p(xV ) = p(yV ) whenever xA = yA . In other words, considered as a function p : XV → R, the value of p ∈ ΛA only depends upon xA , and its sum over xa for a ∈ A (keeping the other arguments fixed) is 0. In particular Λ∅ is the subspace spanned by the vector of Q 1s. The dimension of ΛA is a∈A (|Xa | − 1); in the case where all the variables are binary, each ΛA has dimension one and is the same as the space spanned by the corresponding column of a log-linear design matrix. It is simple to check that the spaces ΛA are all orthogonal, and the real vector space R|XV | can be decomposed as the direct sum M R|XV | = ΛA . A⊆V Definition 5.2. Let A be a subset of Rk containing a point x. The tangent cone of A at x is the set of vectors of the form v = lim ηn−1 (vn − x) n→∞ where ηn → 0 and each vn ∈ A. A tangent cone is a cone, but may or may not be a vector space, depending upon whether the set A is regular at x. If A is defined by the image of a differentiable bijective map then the tangent cone is a vector space, and the same as the image of the pushforward map. This is the case with the nested model N (G), which has an explicit and smooth parameterization (Evans and Richardson, 2015). Its tangent cone at the uniform distribution p0 is the vector space M ΛA , (8) TSn0 ≡ A∈A(G) where A(G) are the parameterizing sets; this can be deduced by looking directly at the parameterization. As noted in Section 4, any marginal model M(G) also contains the uniform distribution p0 (xV | xW ) ≡ |XV |−1 , xV ∈ XV , xW ∈ XW , at which point all variables are totally independent. The tangent cone of the marginal model M(G) at p0 is also the vector space (8), which forms the main result of this section. 24 Theorem 5.3. The tangent cone of M(G) at p0 , denoted TC0 , is the vector space M TC0 = TSn0 ≡ ΛA . A∈A That TC0 ⊆ TSn0 follows from the fact that M(G) ⊆ N (G). The proof of the reverse inclusion is delayed until the end of the section. 5.2 Results for Geared Graphs Definition 5.4. Let λ : XA → R; we say that λ is A-degenerate (or just degenerate) if for each a ∈ A, and xA\a ∈ XA\a , X λ(ya , xA\a ) = 0. ya It is not hard to see that the set of A-degenerate functions is isomorphic to the vector space ΛA ; both formulations will be useful. Definition 5.5. Given a degenerate function εi : FRi → R, define Di (εi ) = lim η −1 {p[1, . . . , 1 + ηεi , . . . , 1] − p[1, . . . , 1, . . . , 1]} , η↓0 so that Di (εi ) is a vector in R|XV W | , the directional derivative of the ith component of p[·] with respect to εi . For sufficiently small η > 0, the vector 1 + ηεi is non-negative and therefore a valid distribution over FRi (up to the normalizing constant); it follows that Di (εi ) ∈ TC0 , the tangent cone of M(G) at p0 . Let Ti = {Di (εi ) | εi degenerate}. Since the function p[·] is differentiable at [1, . . . , 1] it follows that Ti is a vector space, and also that the vector space T1 + · · · + Tk is contained within the tangent cone of M at the uniform distribution. We will show that T1 + · · · + Tk is in fact the same as (8). It will be useful to define the following collection of supersets of Φi , for B ⊆V: ΦB i (fπ(Ri ) , xV W ) ≡ {fRi | fv (xpa(v) , fπ(v) ) = xv for each v ∈ Ri ∩ B}. (9) That is, the collection of functions fRi such that, given inputs fπ(Ri ) and xpa(Ri )\Ri , the values of fB∩Ri jointly evaluate to xB∩Ri . Note that ΦB i = Φi for any B ⊇ Ri . Lemma 5.6. Let C ⊆ Ri , with sterileG (C) ⊆ A ⊆ C ∪ paG (C) and E ⊆ π(C). Then for every degenerate function λ : XA × FE → R, there exists a degenerate function δ : FC → R such that X δ(fC ) = λ(xA , fE ), fRi ∈Φi where Φi is given by (7). In addition,  X |XRi \B |λ(xA , fE ) if C ⊆ B δ(fC ) = 0 otherwise. B fRi ∈Φi 25 Proof. See appendix, Section B.2. Note that if we set E = ∅, the above result shows that for any λ ∈ ΛA there exists a δ such that η −1 {p[1, . . . , 1 + ηδ, . . . , 1] − p[1, . . . , 1, . . . , 1]}   X X X X  ··· = η −1 ηδ(fC ) ··· 1   Φk Φi Φi−1 Φ1 = λ. Hence ΛA ≤ Ti (i.e. ΛA is a subspace of Ti ) for any A such that sterileG (C) ⊆ A ⊆ C ∪ paG (C) and C ⊆ Ri . The next result forms the backbone for proving Theorem 5.3: it extends Lemma 5.6 to sets C that are not contained within a single remainder set. Lemma 5.7. Let C be a bidirected-connected set, and for each i define Ci ≡ C ∩ Ri ; let I ≡ {i | Ci 6= ∅}. For sterileG (Ci ) ⊆ Ai ⊆ Ci ∪ paG (Ci ), let i A= Ai . i∈I Then ΛA ≤ Tl , where l is the minimal element of I. Proof. By Lemma B.5 (see Appendix), there exists a rooted tree Π with vertices I, such that i → j in Π only if there exist vi ∈ Ri ∩ C and vj ∈ Rj ∩ C with vj ∈ π(vi ). In particular i → j only if Cj ⊆ π(vi ). Let l be the root node of Π, and for each j ∈ chΠ (l) denote by Πj the rooted tree with root j formed only from the descendants of j. Let λi : XAi → R be arbitrary Ai -degenerate functions for each i ∈ I. Then starting with vertices which have no children (i.e. the leaves of the tree), and using Lemma 5.6, recursively define δi for i ∈ I as the degenerate function of fCi such that X Y δj (fCj ), δi (fCi ) = λi (xAi ) Φi j∈chΠ (i) where the empty product is defined to be equal to 1. Then X X XX X Y δj (fCj ). ··· δl (fCl ) = λl (xAl ) ··· Φk Φl+1 Φl Φk Φl+1 j∈chΠ (l) P For each i ∈ I an expression of the form Φi δi (fCi ) is only a function of fCα (and xAi ) for α ∈ chΠ (i) and Π is a tree, so the sum factorizes into components only involving the descendants of each j ∈ chΠ (l): X X Y X ··· δl (fCl ) = λl (xAl ) δj (fCj ). Φk Φ1 j∈chΠ (l) Φs s∈deΠ (j) But then for each j the factor represents a disjoint sub-tree Πj with root node j, so we can just iterate this process within each factor, and get Y = (10) λi (xAi ). i∈I 26 f1 , f2 1 2 1 2 f3 3 4 f4 3 (a) 4 (b) Figure 11: (a) an mDAG on 4 variables, and (b) a DAG with hidden variables corresponding to a gearing of the mDAG in (a). It follows that any function of the form (10) lies in Tl . Since ΛA is spanned by such functions by Lemma B.3 (see Appendix B) it follows that ΛA ≤ Tl . Corollary 5.8. For geared graphs G, we have M ΛA ≤ T 1 + · · · + T k . A∈A(G) Proof. Reformulating Lemma S 3.7 slightly, S for any A ∈ A(G) there exists a bidirected-connected set C = i Ci = i {vi1 , . . . , viki }, where Ci = C ∩ Ri (we have changed nothing other than to label the vertices vij by which remainder set they are contained in). Then A is of the form   i j i i j  Ai  Ai = A= i i,j j for some sets Aji such that {vij } ⊆ Aji ⊆ {vij } ∪ paG (vij ). Applying Lemma 3.7 in reverse to the bidirected-connected set Ci shows that a Ai ≡ j Aji is in A(G), and therefore satisfies sterileG (Ci ) ⊆ Ai ⊆ Ci ∪ paG (Ci ). Then by Lemma 5.7 the space ΛA is contained in some Ti , i = 1, . . . , k. Example 5.9. In the IV model from Figure 8 (see Examples 4.5 and 4.9) has a saturated nested model with the following parameterizing sets: head H {1} {2} {3} tail T ∅ {1} {1, 2} parametrizing sets A {1} . {2}, {1,2} {3}, {1,3}, {2,3}, {1,2,3} Indeed, taking the functional parameterization suggested in Example 4.9, one can see that altering the distribution of the compliance functions f2 will affect the distribution of X2 conditional on X1 , which is why Λ2 and Λ12 are contained in TC0 . For example, to introduce a correlation between X1 and X2 whilst keeping the marginal distributions fixed, we can increase the proportion 27 of ‘compliers’ (that is the people for whom f2 (0) = 0, f2 (1) = 1) and decrease the proportion of ‘defiers’ (f2 (0) = 1, f2 (1) = 0). Similarly, modifying the distribution of f3 gives us Λ3 and Λ23 . Obtaining the directional derivatives in Λ13 and Λ123 requires modifying the distribution of f2 , f3 jointly. Example 5.10. Consider the single-district, geared mDAG in Figure 11(a); the nested Markov model for this graph is saturated (i.e. has no constraints), and thus its tangent space at p0 is of full dimension. Correspondingly, one can check that A(G) consists of all non-empty subsets of {1, 2, 3, 4}: head H {1} {2} {1,2} {3} {1,3} {4} {2,4} {3,4} tail T ∅ ∅ ∅ {2} {2} {1} {1} {1,2} parametrizing sets A {1} {2} {1,2} . {3}, {2,3} {1,3}, {1,2,3} {4}, {1,4} {2,4}, {1,2,4} {3,4}, {1,3,4}, {2,3,4}, {1,2,3,4} Let us now see how our previous results apply to the marginal model in this case. Consider the gearing B1 = {1, 2} R1 = {1, 2} B2 = {1, 3} R2 = {3} B3 = {2, 4} R3 = {4} and ordering 4 < 3 < 1 < 2 which respects this gearing. This leads to the hidden variable model in Figure 11(b); here f 3 : X2 → X3 f 4 : X1 → X4 f 1 : F3 → X1 f 2 : F4 → X2 . Applying Lemma 5.6 to each remainder set in turn tells us that Λ1 + Λ2 + Λ12 ≤ T1 , Λ3 + Λ23 ≤ T2 , Λ4 + Λ14 ≤ T3 . We can apply Lemma 5.7 with the connected set C = {1, 2, 3, 4} to find that ΛA ≤ T1 , where A is a set of the form A = {1, 2}△A2△A3 and {3} ⊆ A2 ⊆ {2, 3}, {4} ⊆ A3 ⊆ {1, 4}; this gives us any A ∈ {{3, 4}, {1, 3, 4}, {2, 3, 4}, {1, 2, 3, 4}}, and so Λ34 + Λ134 + Λ234 + Λ1234 ≤ T1 . Repeating with C = {1, 2, 3} and {1, 2, 4} respectively gives Λ13 + Λ123 ≤ T1 and Λ24 + Λ124 ≤ T1 . Thus for every non-empty A ⊆ {1, 2, 3, 4} there is some i ∈ {1, 2, 3} such that ΛA ≤ Ti , and therefore the tangent cone of M(G) at the uniform distribution is the same as that of the saturated model on four variables. In other words the nested model and marginal model are both of full dimension. Evans (2012) shows that the marginal model associated with this graph induces some inequality constraints on the joint distribution, and so the nested and marginal models are not identical. 28 1 2 1 2 1 2 4 3 4 3 4 3 (a) (b) (c) Figure 12: (a) the bidirected 4-cycle, and (b), (c) two geared subgraphs. 5.3 Extension to non-geared graphs Corollary 5.8 put us in a position to prove Theorem 5.3 for geared graphs; however it does not so far extend to the general case, because we cannot fix the state-spaces of the latent variables without a gearing. In this section we will show that the tangent cone of a general marginal model at the uniform distribution is the vector space spanned by the tangent cones of its geared subgraphs, and that therefore the problem can be reduced to geared graphs. Proposition 5.11. Let G be an arbitrary mDAG containing geared subgraphs G1 , . . . , Gk . Suppose that, for each subgraph and a suitable gearing ΛAi ≤ TC0 (Gi ) as a consequence of the earlier results in this section. Then ΛA1 + · · · + ΛAk ≤ TC0 (G). In other words, the tangent cone of G includes the vector space spanned by all the tangent cones of the subgraphs. Proof. First consider the case W = ∅ and k = 2, from which the general result will follow similarly. Let p1 ∈ M(G1 ) ⊆ M(G) be formed by random functions fV according to a gearing of G1 , and p2 ∈ M(G2 ) ⊆ M(G) by random functions f˜V according to a gearing of G2 . Let Uv be independent Bernoulli( 21 ) variables, and define a new distribution by setting Zv = Uv fv (fπ(v) , Zpa(v) ) + (1 − Uv )f˜v (f˜π̃(v) , Zpa(v) ); i.e. we randomly (and independently of all other vertices) choose one of the mechanisms fv or f˜v to generate Zv . Denote Xv ≡ fv (fπ(v) , Zpa(v) ) and Yv ≡ f˜v (f˜π(v) , Zpa(v) ). Note that although fv and f˜v are independent the values of Xv and Yv are not, since they share parent variables. Denote the resulting joint distribution of ZV by p. We have p ∈ M(G) since we are still generating each variable as a random function of its parents and some independent noise, which clearly satisfies the structural equation property for Ḡ. 29 Splitting into cases indexed by B ≡ {v : Uv = 1}, we have X P (ZV = zV ) = P (UB = 1, UV \B = 0, XB = zB , YV \B = zV \B ) B⊆V = 1 2|V | X P (XB = zB , YV \B = zV \B ). (11) B⊆V It follows from the proof of Lemma 5.7 that if A1 ∈ A(G1 ) and λA1 ∈ ΛA1 then there exists a degenerate δ(fCi ) such that X X X ··· δ(fCi ) · · · 1 = λA1 (xA1 ) Φk Φi Φ1 and from Lemma 5.6 that  X X X |XV \B |λA1 (xA1 ) if Ci ⊆ B 1= ··· δ(fCi ) · · · 0 otherwise. B B B Φk (12) Φ1 Φi Similarly, given A2 ∈ A(G2 ) and λA2 ∈ ΛA2 there exists a δ̃(f˜Cj ) satisfying equivalent conditions over f˜s. Now since the functions used to generate XV and YV are independent, P (XB = zB , YV \B = zV \B )    X X  X X X X ρ̃1  ρ1   ρ̃k · · · (ρ̃j + η δ̃) · · · (ρi + ηδ) · · · ρk · · · = ΦB k ΦB 1 ΦB i = |XB |−1 + ηc1 λA1  V \B Φ̃k |XV \B |−1 + ηc2 λA2 = |XV |−1 + η(c′1 λA1 + c′2 λA2 ) + O(η 2 ). V \B Φ̃j V \B Φ̃1  The first equality above follows just from consideration of which functions we need to evaluate to which values in order to obtain XB = zB and YV \B = zV \B (although this expression apparently factorizes, note that both factors can depend upon all of zV ). Note that possibly c′i = 0, depending on which of the conditions from (12) are satisfied. However, certainly c′i > 0 for some subsets B, so plugging this back into (11) we get P (ZV = zV ) = |XV |−1 + η(c′′1 λA1 + c′′2 λA2 ) + O(η 2 ), where c′′i > 0. Then by an appropriate choice of scaling for each λAi we see that ΛA1 + ΛA2 ≤ TC0 (G). For non-empty W , we can draw ZW = XW = YW as a uniform random variable, and then look at XV | XW ; the proof is otherwise the same. Example 5.12. The bidirected 4-cycle in Figure 12(a) is not geared, and therefore we cannot apply our earlier results to it directly. The nested model for this graph is equivalent to the model defined by the constraints X1 ⊥ ⊥ X3 and X2 ⊥ ⊥ X4 , and has parameterizing sets A(G) = {{1}, {2}, {1, 2}, {3}, {2, 3}, {1, 2, 3}, {4}, {1, 4}, {1, 2, 4}, {3, 4}, {1, 3, 4}, {2, 3, 4}, {1, 2, 3, 4}}, 30 which are also the bidirected-connected sets of vertices. The two subgraphs in Figures 12(b) and (c), say G1 and G2 , are geared, however, and have parameterizing sets A(G1 ) = {{1}, {2}, {1, 2}, {3}, {2, 3}, {1, 2, 3}, {4}, {3, 4}, {2, 3, 4}, {1, 2, 3, 4}} A(G2 ) = {{1}, {2}, {1, 2}, {3}, {4}, {1, 4}, {1, 2, 4}, {3, 4}, {1, 3, 4}, {1, 2, 3, 4}}; L we have A∈A(Gi ) ΛA ≤ TC0 (Gi ) for i = 1, 2 by Corollary 5.8. Note that A(G1 ) ∪ A(G2 ) = A(G), and therefore by applying Proposition 5.11 with these graphs, we find that M M M ΛA ≤ TC0 (G). ΛA + ΛA = A∈A(G) A∈A(G2 ) A∈A(G1 ) It follows that the marginal model is also defined by the independences X1 ⊥ ⊥ X3 and X2 ⊥ ⊥ X4 , possibly with some additional inequality constraints. We are now in a position to put together these ideas and prove the main result for general mDAGs. Proof of Theorem 5.3. Suppose first that G is geared. p[1, . . . , 1 + ηεi , . . . , 1] obeys the nested Markov property for any degenerate function εi and η sufficiently small that 1 + ηεi is positive; it follows that Ti ≤ TC0 for each i, and that therefore using Corollary 5.8, M ΛA ≤ T 1 + · · · + T k A∈A(G) is also contained in TC0 , by the differentiability of p[·] at (1, . . . , 1). Now for general G, and each A ∈ A(G), there exists a geared subgraph G ′ of G such that ΛA ≤ TC0 (G ′ ) by Lemma 4.3. Then applying Proposition 5.11, we see that the space spanned by these subspaces is contained within the tangent cone for G: M ΛA ≤ TC0 (G). A∈A(G) If a distribution is in the marginal model then it is also in the nested model, and therefore TC0 is contained within the tangent space TSn0 of N (G) at p0 , which has dimension Y X |XT | (|Xh | − 1) dim(TSn0 ) = h∈H H∈H(G) = X dim(ΛA ); A∈A(G) Q the second equality here follows from dim(ΛA ) = h∈A (|Xh | − 1) and X X Y Y dim(ΛA ) = (|Xh | − 1) = |XT | (|Xh | − 1). H⊆A⊆H∪T H⊆A⊆H∪T h∈A 31 h∈H Then combining M ΛA ≤ TC0 ⊆ TSn0 A∈A(G) with the dimension of TSn0 gives the result. As a corollary of this result, within a neighbourhood of p0 the models M(G) and N (G) are the same. This is because N (G) is parametrically defined via polynomials, and therefore its Zariski closure is an irreducible variety (see, e.g. Cox et al., 2007, Proposition 4.5.5). For algebraic varieties V1 , V2 , if V1 ⊆ V2 and V2 is irreducible, then either V1 has a strictly smaller dimension than V2 , or they are identical. The results about the tangent space show that the Zariski closures of M and N have the same dimension, and therefore they are the same. This means that, locally to p0 , the models themselves are also the same. 6 Smoothness of the marginal model The results of Section 5, together with the smoothness of the nested model, allow us to show that for geared graphs, the interior of the marginal model is a smooth manifold. Theorem 6.1. For a geared graph G and state-space XV W , the relative interior of the marginal model M(G) is a manifold of dimension d(G, XV W ), and its boundary is described by a finite number of semi-algebraic constraints. Proof. The nested Markov model is parametrically defined (with a polynomial parameterization), and therefore its Zariski closure is an irreducible variety (see, e.g. Cox et al., 2007, Proposition 4.5.5). Furthermore Evans and Richardson (2015) give a diffeomorphism between the set of strictly positive distributions obeying the nested Markov property, and an open parameter set. It follows that N (G) is a manifold on the interior of the simplex (see, for example, Kass and Vos, 1997, Appendix A). As noted in the previous section, the marginal model for a geared graph is a semi-algebraic set. Since the M(G) ⊆ N (G) and these two sets have the same Zariski closure, it follows that M(G) is defined from N (G) by a finite number of additional polynomial inequalities. It further follows that it is also a manifold at any point these inequality constraints are not active. It follows from Theorem 6.1 that the interior of the marginal model for a geared mDAG is a curved exponential family of dimension d(G, XV W ), and that therefore the nice statistical properties of these models can be applied. For example, the maximum likelihood estimator of a distribution within the model will be asymptotically normal and unbiased, and the likelihood ratio statistic for testing this model has an asymptotic χ2 -distribution. For non-geared mDAGs we cannot assume that the latent variables are discrete without loss of generality, so it is conceivable that these marginal models may be defined by non-polynomial inequalities on the probabilities. We conjecture, however, that a result akin to Theorem 6.1 does hold for general graphs. For a point on the boundary defined by an active inequality constraint, the asymptotic distribution of the likelihood ratio statistic may be much more 32 p̂ × M p̂m N p̂n Figure 13: Diagramatic representation of estimation with the marginal model. The thicker line represents the marginal model, and its thinner extension the nested model. The unconstrainted MLE is shown as p̂, and its projection to MLEs under the marginal and nested models as p̂m and p̂n respectively. Note that p̂m is on the boundary of the model M; if the true data generating distribution is on the boundary this generally leads to irregular asymptotics. complicated (Drton, 2009b); in general it is a mixture of χ2 -distributions, and this mixture will vary depending upon the unknown truth. A possible advantage of the nested model is that we can guarantee that the true distribution does not lie on the boundary of N if the MLE consists of strictly positive probabilities, because the boundary only consists of distributions with at least some zero probabilities; the same cannot be said for M. This is depicted in Figure 2, in which the MLE under the nested model (p̂n ) is in the interior of N , but the MLE for the marginal model p̂m lies on the boundary of M. Inequality constraints are generally much more complicated than equality constraints, and efforts to characterize them fully in DAGs with latent variable models have been limited by computational challenges. Evans (2012), generalizing a result first given by Pearl (1995), provides a graphical criterion for obtaining some inequalities, but deriving a complete set of bounds may be an NP-hard problem (ver Steeg and Galstyan, 2011). 6.1 Model Fitting In theory we can exactly fit the marginal model for a geared graph using a latent variable model of the kind derived in Section 4. In practice this model is massively over-parameterized and unidentifiable, with the state-space of sets Fv being potentially very large even for modest graphs; this will cause problems for most standard fitting algorithms. We can restrict the state-space of the latent variables to something more managable to obtain some latent variable model L(G) ⊆ M(G); in general the inclusion will be strict, as in the example in the introduction and as depicted in Figure 2. However, for any graph G—whether geared or not—and any latent variable model we have L(G) ⊆ M(G) ⊆ N (G). Fitting the nested model by maximum likelihood (ML) is straightforward using the algorithm in Evans and Richardson (2010), and a latent variable model can be fitted using (for example) an EM algorithm. A measure of goodness-of-fit for these two models can be used to bound the goodness-of-fit of the marginal model, and thus potentially used to confirm or refute the marginal model. Fitting the marginal model directly is likely to be extremely difficult for general graphs: see the discussion in Evans (2016). 33 Acknowledgements We thank Angelos Armen for a very close reading and substantial comments, as well as the associate editor and two anonymous referees for their suggestions. References A. Anandkumar, D. Hsu, A. Javanmard, and S. Kakade. Learning linear Bayesian networks with latent variables. In Proceedings of The 30th International Conference on Machine Learning, volume 28, pages 249–257, 2013. S. Basu, R. Pollack, and M.-F. Roy. Algorithms in real algebraic geometry. Springer, 1996. C. M. Bishop. Pattern recognition and machine learning. Springer, 2007. D. Cox, J. Little, and D. O’Shea. Ideals, varieties, and algorithms: an introduction to computational algebraic geometry and commutative algebra. Springer, 2007. Third Edition. A. Darwiche. Modeling and reasoning with Bayesian networks. Cambridge University Press, 2009. A. P. Dawid. Influence diagrams for causal modelling and inference. International Statistical Review, 70(2):161–189, 2002. W. Decker, G.-M. Greuel, G. Pfister, and H. Schönemann. Singular 4-1-0 — A computer algebra system for polynomial computations. http://www.singular.uni-kl.de, 2016. M. Drton. Discrete chain graph models. Bernoulli, 15(3):736–753, 2009a. M. Drton. Likelihood ratio tests and singularities. Annals of Statistics, 37(2): 979–1012, 2009b. R. J. Evans. Graphical methods for inequality constraints in marginalized DAGs. In Machine Learning for Signal Processing (MLSP), 2012. R. J. Evans. Graphs for margins of Bayesian networks. Scandinavian Journal of Statistics, 43(3):625–648, 2016. R. J. Evans and T. S. Richardson. Maximum likelihood fitting of acyclic directed mixed graphs to binary data. In Proceedings of the 26th conference on Uncertainty in Artificial Intelligence (UAI-08), 2010. R. J. Evans and T. S. Richardson. Markovian acyclic directed mixed graphs for discrete data. Annals of Statistics, 42:1452–1482, 2014. R. J. Evans and T. S. Richardson. Parameterization of the discrete nested Markov model. In preparation, 2015. C. J. Fox, A. Käufl, and M. Drton. On the causal interpretation of acyclic mixed graphs under multivariate normality. Linear Algebra and its Applications, 2014. 34 T. Fritz. Beyond Bell’s Theorem: Correlation scenarios. New J. Phys, 14: 103001, 2012. R. E. Kass and P. W. Vos. Geometrical foundations of asymptotic inference. John Wiley & Sons, 1997. S. L. Lauritzen. Graphical Models. Clarendon Press, Oxford, UK, 1996. J. Neyman. Sur les applications de la théorie des probabilités aux experiences agricoles: Essai des principes. Roczniki Nauk Rolniczych, 10:1–51, 1923. In Polish; English translation by D. Dabrowska and T. Speed in Statist. Science 5 463–472, 1990. J. Pearl. On the testability of causal models with latent and instrumental variables. In Proceedings of the 11th conference on Uncertainty in Artificial Intelligence (UAI-95), pages 435–443, 1995. J. Pearl. Causality: Models, Reasoning, and Inference. Cambridge University Press, second edition, 2009. J. Provan and L. Billera. Decompositions of simplicial complexes related to diameters of convex polyhedra. Mathematics of Operations Research, 5(4): 576–594, 1980. T. S. Richardson. Markov properties for acyclic directed mixed graphs. Scand. J. Statist., 30(1):145–157, 2003. T. S. Richardson and P. Spirtes. Ancestral graph Markov models. Annals of Statistics, 30(4):962–1030, 2002. T. S. Richardson, R. J. Evans, and J. M. Robins. Transparent parameterizations of models for potential outcomes. Bayesian Statistics, 9:569–610, 2011. T. S. Richardson, R. J. Evans, J. M. Robins, and I. Shpitser. Nested Markov properties for acyclic directed mixed graphs. arXiv:1701.06686, 2017. J. Robins. A new approach to causal inference in mortality studies with a sustained exposure period-application to control of the healthy worker survivor effect. Mathematical Modelling, 7(9):1393–1512, 1986. D. B. Rubin. Estimating causal effects of treatments in randomized and nonrandomized studies. Journal of Educational Psychology, 66(5):688–701, 1974. I. Shpitser, T. S. Richardson, J. M. Robins, and R. J. Evans. Parameter and structure learning in nested Markov models. In UAI-12 (Workshop on Causal Structure Learning), 2012. R. Silva and Z. Ghahramani. The hidden life of latent variables: Bayesian learning with mixed graph models. The Journal of Machine Learning Research, 10:1187–1238, 2009. P. Spirtes, C. Glymour, and R. Scheines. Causation, Prediction and Search. MIT press, 2000. 35 J. Tian and J. Pearl. On the testable implications of causal models with hidden variables. In Proceedings of the 18th Conference on Uncertainty in Artificial Intelligence (UAI-02), pages 519–527, 2002. G. ver Steeg and A. Galstyan. A sequence of relaxations constraining hidden variable models. In Proceedings of the 27th Conference on Uncertainty in Artificial Intelligence (UAI-11), 2011. T. S. Verma and J. Pearl. Equivalence and synthesis of causal models. In Proceedings of the 6th Conference on Uncertainty in Artificial Intelligence (UAI-90), pages 255–268, 1990. A Degenerate Binary State-Space Consider the model from Example 1.1 where we take all five variables to be binary. The model can be written as X p(x0 ) · p(x1 ) · p(x2 | x1 , x0 ) · p(x3 | x2 ) · p(x4 | x3 , x0 ) p(x1 , x2 , x3 , x4 ) = x0 = p(x1 ) · p(x3 | x2 ) · X p(x0 ) · p(x2 | x1 , x0 ) · p(x4 | x3 , x0 ) . x0 | {z p∗ (x2 ,x4 |x1 ,x3 ) } The dimension of the model is therefore the sum of the dimensions of these three factors (of which the first two are 1 and 2 respectively). For the final factor, assuming X0 is binary means it may be written as X p(x0 ) · p(x2 | x1 , x0 ) · p(x4 | x3 , x0 ) p∗ (x2 , x4 | x1 , x3 ) = x0 = α · q(x2 | x1 ) · q(x4 | x3 ) + (1 − α) · r(x2 | x1 ) · r(x4 | x3 ) (13) for some distributions q, r. This is a parametric definition of a variety over the probabilities p(x2 , x4 | x1 , x3 ), and using the computational algebra package Singular (Decker et al., 2016) we explicitly found the polynomial constraints that define it6 . It turns out that the set of such probabilities that can be written in the form (13) has dimension 7, and therefore the total dimension of the latent variable model is 1 + 2 + 7 = 10. B B.1 Technical Proofs Degenerate Functions We present a series of Lemmas which build up to showing that we can construct degenerate functions from finite sums and products of degenerate functions with simpler argument sets. 6 For the code used and the resulting polynomial constraints, see http://www.stats.ox.ac.uk/~ evans/bell.html. As well as the usual marginal independence constraints, the latent variable model implies an additional cubic polynomial constraint on the observed conditional probabilities (for which we were unable to find a nice interpretation). 36 Lemma B.1. Let λ be a discrete (A ∪ B)-degenerate function, for A ∩ B = ∅. Then λ can be written as a finite sum X λiA λiB λ= i of A-degenerate functions λiA , and B-degenerate functions λiB . Proof. Since a matrix can be written as a sum of rank one matrices, clearly we can find (not necessarily degenerate) functions such that the result holds. But now suppose that the λiA are not degenerate over a ∈ A, and consider ! X X i i λA (xA\a , ya ) λiB (xB ) λA (xA ) − ya i = X λiA (xA )λiB (xB ) − XX ya i = λ(xA , xB ) − X λiA (xA\a , ya )λiB (xB ) i λ(ya , xA\a , xB ) ya = λ(xA , xB ). Thus we can replace each λiA with the degenerate function ! X i i i λA (xA\a , ya ) λ̃A (xA ) ≡ λA (xA ) − ya and not affect the result. By repeating the argument we can assume that each λiA is degenerate in every a ∈ A, and each λiB degenerate in every b ∈ B. Lemma B.2. Let λ be a discrete (A△B)-degenerate function. Then λ can be written as a finite sum X j j λA λB λ= j of A-degenerate functions λjA , and B-degenerate functions λjB . Proof. Let A′ = A \ B and B ′ = B \ A and D = A ∩ B, so that A△B = A′ ∪ B ′ , A = A′ ∪ D and B = B ′ ∪ D; note that A′ , B ′ and D are all disjoint. For each yD ∈ XD , define a degenerate function ηD (·; yD ) : XD → R by Y  ηD (xD ; yD ) = α−1 |Xd |1{xd =yd } − 1 . d∈D where α = d∈D |Xd | · (|Xd | − 1) and 1 denotes an indicator function. One can verify easily that X ηD (xD ; yD ) = 0 Q xd ∈Xd for any yD and xD\d , and that X ηD (xD ; yD )2 = 1; yD ∈XD 37 in particular the last expression is independent of xD . Now, let λ be a discrete (A△B)-degenerate function, and using Lemma B.1 write it as λ= j X λjA′ λjB ′ i=1 where λjA′ and λjB ′ are respectively A′ and B ′ degenerate. Then for each k ∈ j jk j XD , define λjk A = λA′ ηD (·; k) and λB = λB ′ ηD (·; k). Clearly each of these is degenerate in A = A′ ∪ D and B = B ′ ∪ D respectively. Further, j X X jk λjk A λB = j X X λjA′ λjB ′ ηD (·; k)2 i=1 k∈XD i=1 k∈XD = j X λjA′ λjB ′ i=1 = j X X ηD (·; k)2 k∈XD λjA′ λjB ′ i=1 = λ. a Lemma B.3. Let λ : XA → R be an A-degenerate function, and let A = i∈I Ai for some finite collection of sets {Ai : i ∈ I}. Then there exists a finite collection of Ai -degenerate functions λji : XAi → R for i ∈ I, j ∈ J, such that XY j λ= λi . j∈J i∈I Proof. This just follows from repeatedly applying Lemma B.2. B.2 Proof of Lemma 5.6 Lemma B.4. Let X and Y be finite sets, define F = {f : X → Y}, and take λ : Y → R. Then for any A ⊆ Y and x ∈ X , X X λ(f (x)) = |Y||X|−1 λ(y), f ∈F f (x)∈A y∈A and if x1 6= x2 , X λ(f (x2 )) = |A||Y||X|−2 · f ∈F f (x1 )∈A X λ(y). y∈Y In particular note that if λ is degenerate, the last expression is zero. 38 Proof. Clearly if A = Y, then X X λ(f (x)) = λ(f (x)) f ∈F f ∈F f (x)∈Y = |Y||X|−1 X λ(y), y∈Y since there are exactly |Y||X|−1 functions in F such that f (x) = y for each y ∈ Y. The first result follows in general by applying the result for A = Y to the function λ′ (y) = λ(y)1{y∈A} . The second result follows by similar combinatorical methods. Proof of Lemma 5.6. It is clear that we only need prove the result for E = ∅, since we can just incorporate fE as though they were observable parents of C, and the result is the same. First consider the case C = {v}; let L = paG (v) and take any set K ⊆ L. Let λ : Xv × XK → R be a degenerate function, and for each f : XL × Fπ(x) → Xv , define X δ(f ) = λ(f (yL , gπ(v) ), yK ). yL ∈XL gπ(v) ∈Fπ(v) Then for fixed xv , xL , fπ(v) , X δ(f ) = f ∈Fv f (xL ,fπ(v) )=xv X X λ(f (yL , gπ(v) ), yK ) f ∈Fv yL ∈XL f (xL ,fπ(v) )=xv gπ(v) ∈Fπ(v) = X X λ(f (yL , gπ(v) ), yK ). yL ∈XL f ∈Fv gπ(v) ∈Fπ(v) f (xL ,fπ(v) )=xv But since λ is degenerate, the inner sum is zero unless both xL = yL and fπ(v) = gπ(v) by Lemma B.4. This leaves = X λ(f (xL , fπ(v) ), xK ) f ∈Fv f (xL ,fπ(v) )=xv = |Xv ||XL ||Fπ(v) |−1 · λ(xv , xK ) again by Lemma B.4, where the constant represents the number of distinct functions f ∈ Fv such that f (xL , fπ(v) ) = xv . Hence the result holds for C = {v}. Now consider a general C ⊆ Ri ; we prove the result by induction on the size of C. Given any sterileG (C) ⊆ A ⊆ C ∪ paG (C), we first claim that we can write A = A1 △A2 where sterileG (Ci ) ⊆ Ai ⊆ Ci ∪ paG (Ci ) for i = 1, 2 and disjoint non-empty C1 , C2 with C1 ∪ C2 = C. To see this pick C2 = {w}, C1 = C \ {w} for some w ∈ sterileG (C), and then set A1 = (A ∪ sterileG (C1 )) ∩ (C1 ∪ paG (C1 )) and A2 = A \ A1 . Clearly A1 satisfies the required conditions. Since w was chosen to be sterile in C we 39 have w ∈ / A1 and therefore w ∈ A2 ; in addition, the only elements of A not contained in A1 are those which are neither in C1 nor paG (C1 ); but since they are in C ∪ paG (C), they must instead be in {w} ∪ paG (w). Hence the claim holds. Now first suppose that λ = λ1 · λ2 for degenerate functions λi : XAi → R. By the induction hypothesis, we can find degenerate δ1 , δ2 such that X δ1 (fC1 ) = c1 · λ1 (xA1 ) fv (x,f )=xv v∈C1 X δ2 (fC2 ) = c2 · λ2 (xA2 ). fv (x,f )=xv v∈C2 (Here we have written fv (x, f ) for fv (xL , fπv ) to reduce notational clutter.) Then letting E = Ri \ C, X X X X δ1 (fC1 ) · δ2 (fC2 ) δ1 (fC1 ) · δ2 (fC2 ) = fv (x,f )=xv v∈Ri fv (x,f )=xv fv (x,f )=xv fv (x,f )=xv v∈C2 v∈C1 v∈E = c0 X X δ1 (fC1 ) · δ2 (fC2 ) fv (x,f )=xv fv (x,f )=xv v∈C2 v∈C1 = c0 X δ1 (fC1 ) fC1 ∈FC1 fC1 (x)=xC1 X δ2 (fC2 ) fC2 ∈FC2 fC2 (x)=xC2 = c0 c1 c2 · λ1 (xA1 ) · λ2 (xA2 ). However a general degenerate function λ : XA → R can be written as a finite linear combination X j j λ1 · λ2 λ= j of degenerate functions λji : XAi → R, so the result follows by linearity of summations. For the final part, note that if v ∈ C \ B, then the summation over ΦB i will include every function fv ∈ Fv . Since δ is degenerate and a function of fv , the sum is 0. On the other hand, if v ∈ (Ri ∩ B) \ C, then δ is not a function of fv and summing over all Fv just involves |Xv | identical terms. Lemma B.5. Let G be a single-district, geared mDAG, and C a bidirectedconnected set of vertices. There exists a rooted tree ΠC with vertex set IC = {i | Ri ∩ C 6= ∅}, and edges i → j only if there exist vj ∈ Rj ∩ C and vi ∈ Ri ∩ C such that vj ∈ π(vi ). Proof of Lemma B.5. First construct a directed graph Π∗ on IC in which i → j precisely when there exist vj ∈ Rj ∩ C and vi ∈ Ri ∩ C such that vj ∈ π(vi ). Note that vj ∈ π(vi ) implies r(vj ) > r(vi ), so Π∗ is acyclic. 40 Let j be the minimal element of IC ; we claim that for any other i ∈ IC , there is always a directed path in ΠC from j to i. To see this, note that since C is bidirected-connected, there is a bidirected path in G from some vj ∈ C ∩ Rj to vi ∈ C ∩ Ri ; given such a path, ρ, trim it so that only the end-points are in C ∩ Rj and C ∩ Ri respectively. If ρ is just vj ↔ vi , then we are done, since vj ∈ π(vi ) by definition of π. Otherwise, ρ begins vi ↔ vk ↔ · · · for some vk ∈ Rk ∩ C, where i > k > j. So we can apply an inductive argument to find a path from j to k in Π∗C , and the edge vi ↔ vk implies that k → i in Π∗C . Now, Π∗C is a connected DAG with a unique root node j, so we can simply take any singly connected subgraph ΠC to fulfil the conditions of the lemma. 41
10math.ST
Deep Convolutional Neural Networks for Massive MIMO Fingerprint-Based Positioning Joao Vieira, Erik Leitinger, Muris Sarajlic, Xuhong Li, Fredrik Tufvesson arXiv:1708.06235v1 [stat.ML] 21 Aug 2017 Dept. of Electrical and Information Technology, Lund University, Sweden [email protected] Abstract—This paper provides an initial investigation on the application of convolutional neural networks (CNNs) for fingerprint-based positioning using measured massive MIMO channels. When represented in appropriate domains, massive MIMO channels have a sparse structure which can be efficiently learned by CNNs for positioning purposes. We evaluate the positioning accuracy of state-of-the-art CNNs with channel fingerprints generated from a channel model with a rich clustered structure: the COST 2100 channel model. We find that moderately deep CNNs can achieve fractional-wavelength positioning accuracies, provided that an enough representative data set is available for training. Index Terms—Deep Learning, Convolutional Neural Networks, Massive MIMO, Fingerprint, Positioning, Localization. I. I NTRODUCTION Massive MIMO is a candidate technology to integrate next generation cellular systems, such as 5G systems, and deliver manifold enhancements in the communications link [1]. In its conceived form [2], massive MIMO uses a large number of base station (BS) antennas together with measured channel state information (CSI) to multiplex user terminals spatially. Measured CSI is essential to yield spectrally efficient communications, but it can also be a key enabler to achieve highlyaccurate terminal positioning, where down to centimeter order accuracy may be required in some 5G applications, e.g., autonomous driving [3]. Explained briefly, since positioning is a spatial inference problem, it makes sense to use large antenna arrays that oversample the spatial dimension of a wireless channel (thus benefiting from, e.g., increased angular resolution, resilience to small-scale fading, and array gain effects) to aid the positioning task. Several approaches that make use of measured massive MIMO channels for positioning exist. For example, the approach proposed in [4] detects a terminal’s position (from a grid of candidate positions) using line-of-sight (LOS) based triangulation from a terminal to several distributed massive MIMO BSs. In [5], positioning is performed using the phases of multipath components estimated from massive MIMO channels. Another positioning approach was proposed in [6], where received signal strength (RSS) based fingerprinting from one single-antenna terminal to NBS M -antenna BSs is employed. Here, the challenge was to learn the inverse map −1 fRSS : {|Yi |2 } → {xi } (1) from a set of training observations, i.e. the training set Train . Here the label xi ∈ R2x1 is the 2{Yi , xi }N i=1 dimensional terminal coordinate of training observation i, and Yi ∈ CM xNBS is its associated channel fingerprint. Gaussian −1 Process-based Regression was used to learn fRSS (·). What the previous two mentioned positioning proposals and other proposals have in common (e.g., [7] and [8]), is that the structure of their solutions is typically composed by 2 distinct steps. In the first step, empirical feature extraction (from the measured channel snapshots) is performed (e.g., RSS), and in the second step, positioning of the terminal is done using the extracted features and a suitable algorithm-the algorithm typically being is the main contribution of the work. Although such 2 step solutions simplify the entire positioning task, they are inherently sub-optimal since they are constrained to use only partial–and typically not statistically sufficient [9]– channel statistics to solve the problem at hand. Thus, is it of interest to explore positioning frameworks that jointly extract and process channel features from measurements–under some joint optimality criterion. In this work, fingerprinting-based positioning is performed using a framework that jointly extracts and processes channel features for positioning. More specifically, we are interested to learn f −1 : {s (Yi )} → {xi }, (2) i.e., the inverse of the underlying function f (·) that maps a set of single-antenna terminal coordinate vectors {xi } to their respective measured but transformed channel snapshots s (Yi ) ∈ Cd1 x...xdD ∀i, where D is the dimensionality of the transformed snapshot. We note that the main point of the transformation s(·) is to obtain a sparse representation for s (Yi ). This is motivated in detail in Sec. II-B. For now, we remark that the sparse transformations considered in this work are bijective, and thus yield no information loss.1 Our proposal to learn (2) is by means of deep convolutional neural networks (CNNs). Deep neural networks provide stateof-the-art learning machines that yield the most learning capacity from all machine learning approaches [10], and lately 1 We remark that this positioning approach is inherently designed for the single-user case. This fits well within a massive MIMO context since mutually orthogonal pilot sequences, which are seen as sounding sequences in the context of this work, are typically used by different users during uplink training [2]. The extention of this approach to a multi-user case is thus straightforward. have been very successful in image classification tasks. Just like most relevant information for an image classification task is sparsely distributed at some locations of the image [10], measured channel snapshots Yi have, when represented in appropriate domains, a sparse structure which–from a learning perspective–resemble that of images. This sparse channel structure can be learned by CNNs and therefore used for positioning purposes. To the best of the authors’ knowledge there is no prior work on this matter. The main contributions of this paper are summarized below. • • We investigate the feasibility of deep CNNs for fingerprint-based positioning with massive MIMO channels, and provide insights on how to design such networks based on machine learning and wireless propagation theory. As a proof-of-concept, we demonstrate the accuracy of our approach by performing fractional-wavelength positioning using channel realizations generated from a widely accepted cellular channel model: the COST 2100 MIMO channel model [11]. II. C HANNEL F INGERPRINTING AND P RE -P ROCESSING In this section, we explain the fingerprinting scenario addressed in this work, and motivate why CNNs are learning machines suitable to perform positioning under such scenarios. To maximize insights, we focus most motivational remarks on the current case-study, but also provide several generalization remarks at the end of the section. A. Channel Fingerprinting In this work, we assume a BS equipped with a linear M antenna array made of omnidirectional λ/2-spaced elements, and that narrowband channels sampled at NF equidistant frequency points are used for positioning. With that, the dimensionality of each channel fingerprint Yi (and, as it will be seen later, of each transformed fingerprint s(Yi )) is D = 3 and in this work, f (·) is implemented as a bijective deterministic map, i.e., there is only one unique fingerprint per position.2 B. Motivation for CNNs and Sparse Input Structures Applying standard feed-forward neural networks to learn the structure of {Yi } may be computationally intractable, specially when M grows very large. However, the structure of neural networks can be enhanced, both from a computational complexity and a learning point-of-view, if designed with sparse interaction and parameter sharing properties [10]. This is a widely used architecture for CNNs, suitable to process inputs with grid-like structures (e.g., an image can be thought as a two-dimensional grid of pixels) with minimal amounts of pre-processing. CNNs are efficient learning machines given that their inputs meet the following two structural assumptions: 1) most relevant information features are sparsely distributed in the input space; 2) the shape of most relevant information features is invariant to their location in the input space, and are well captured by a finite number of kernels. From a wireless channel point-of-view, these assumptions apply well when channels snapshots (i.e., the CNN inputs) are represented in domains that yield a sparse structure [13]. For example, in the current case study, sparsity is achieved by representing Yi in its, so-called, angular-delay domains, see Fig. 1. Trivially, s(·) can take the form of a two-dimensional discrete Fourier transform, i.e., s(Yi ) = F Yi FH . (3) If specular components of the channel, which are typically modeled by Dirac delta functions [13], are seen as the information basis for positioning, then the two structural assumptions of the CNNs inputs listed above are met. The same applies, if instead, clusters of multipath components are seen as the information features for positioning. C. Generalizing the Current Case Study d1 = M, d2 = NF , and d3 = 2. The current case study can be extended to more generic/higher-dimensionality fingerprints. For example, if {Yi } is comprised by snapshots measured from a multiantenna terminal to a BS array, both with arbitrary array structures and non-omnidirectional antenna elements, the effective aperture distribution function (EADF) [14] may be accounted in s(·) in order to obtain a sparse fingerprint Given a terminal position, its associated fingerprint is generated through f (·), i.e. the inverse of the function we wish to learn. We implement f (·) using the COST 2100 channel model, the structure of which is illustrated by Fig. 1, under the parametrization proposed in [12]. This parametrization was performed for outdoor environments and is further detailed in Sec. IV. However, we note that our method is not restricted to work only in outdoor channels–we remark on the required channel properties in Sec. II-B. It is important to note that, 2 Bijectiveness of f (·) applies in most practical propagation scenarios with high probability (the probability typically approaches one as M increases). This is an important aspect to consider as it addresses the conditions needed to be able to use CNNs (or more generally, to solve the inverse problem). On a different note, regarding the deterministic structure for f (·), this is done by generating both training and test sets from the same given realization of the COST 2100 channel model stochastic parameters. This makes each fingerprint to be completely determined solely by the geometry of the propagation channel itself. Stochastic effects in the fingerprinting process, such as measurement and labeling noise, or even time-variant channel fading are interesting impairments to be considered in the design of CNN in future work. For now, we focus on the case of having unique fingerprints per position, due to simplicity. r aA y ra Magnitude of a (Sparse) Channel Snapshot n en t An ar 3 Delay [µs] e Lin 25 λ ×10 -4 1 2.5 0.8 2 0.6 1.5 0.4 1 0.2 0.5 0 25 50 75 100 125 150 175 Angle [ °] Fig. 1. Left–Link setup considered in this work: an M -linear BS array positioning one single-antenna terminal in a confined square area. Channel realizations are generated through the COST 2100 MIMO channel model. This geometry-based stochastic channel model is composed by different types of clusters of multipath components (MPCs) that illuminate certain visibility regions (VRs) of an area. Right–Example of the magnitude of a channel snapshot represented in a sparse domain. Such channel channel has a rich structure that can be learned by a CNN for positioning purposes. representation. However, we emphasize that, in contrast to most propagation studies, one does not need to necessarily deembed the measurement system from the propagation channel in order to obtain valid fingerprints for positioning. Also, multi-antenna channels yielding phenomena such as violation of the plane wave assumption, or even the existence of cluster visibility regions [15], can be made sparse by means of proper transformations, e.g., generalized Fourier transforms. In any case, the key is the ability to obtain a sparse representation for s (Yi ). III. D EEP CNN A RCHITECTURE In this section, we describe the network architecture used for learning f −1 (·), and discuss some design aspects. For notation convenience, we drop the dependence of the training sample index i, and write Y , Yi and x , xi until explicitly stated otherwise. A. Convolutional-Activation-Pooling Layers After the input layer, which takes the transformed snapshots, a typical structure of CNNs employs a cascade of L convolutional-activation-pooling (CAP) layers. Each CAP layer is composed by: i) a convolutional operation of its input with K convolutional Kernels, ii) a non-linear transformation, i.e., activation function, and iii) a pooling layer, respectively. A detailed description of the CAP layer structure used in this work follows below. Let the tensor H`−1 ∈ RM xNF xS3 be the input of the `th CAP layer, with 1 ≤ ` ≤ L. Also, let the jth convolutional Kernel of the `th layer be denoted by wj` ∈ RS1 xS2 xS3 , with 1 ≤ j ≤ K, and S1 and S2 denoting the sizes of the Kernels S1 xS2 xS3 (which are CNN hyper-parameters). With h`−1 r,c ∈ R 3 being a sub-tensor of a zero-padded version of H`−1 , an zero-padded version of H`−1 is obtained by padding the borders of the volume of H`−1 with zeros, such that, when convolved with any Kernel wj` , the input and output volumes are the same [10]. 3 The output entry of the `th convolutional layer can be written as  c`r,c,j = b`j + 1T wj` ◦ h`−1 1. (4) r,c Here ◦ denotes the Hadamard product, b`j is a bias term, 1 denotes the all-ones column vector, and r and c are indices in the convolution output volume which are implicitly defined. In the first CAP layer, the input H0 is a tensor made out of the complex-valued entries of (3), and thus we have S3 = 2 (real dimensions). This is because, although channel snapshots are inherently complex-valued, we pursue an implementation of a real-valued CNN with real-value inputs (thus we have S3 = 2 in the first CAP layer). We motivate why we do so in Sec. III-D. In the remaining CAP layers, we have S3 = K. Each convolutional output entry (4) is fed to an activation function. We use the current default choice for activation functions in CNNs, namely, the rectified linear unit (RELU) [10], where the output can be written as  ` gr,c,j = max c`r,c,j , 0 . (5) Finally, after each activation function follows a pooling operation which down samples the outputs of the activation functions. A standard option, also used here, is to forward propagate the maximum value within group of N1 × N2 activation functions outputs. The pooling result can be written as   N1 N2 ` h`r,c,j =max max g(r−1)N . (6) 1 +m, (c−1)N2 +n, j m=1 n=1 B. Fully-Connected Layer A fully-connected layer, following the L CAP layers, finalizes the CNN. With that, the position estimate of the network, t ∈ R2x1 , is given by  t = W vec HL + bL , (7) L T where vec {·} vectorizes its argument, bL = [bL is a 1 b2 ] vector of biases, and W is a weight matrix whose structure is implicitly defined. C. Network Optimization  wj` The CNN network learns the weights W and , and biases b`j , in order to make t the best approximation of x. Since we address positioning as a regression problem, we use the squared residuals averaged over the training set as the optimizing metric. Re-introducing the dependence on the sample index i, and defining the column θ by stacking all network parameters as h vector iT  1 T 1 K T L θ = vec [w1 . . . wL ] vec {W} [b1 . . . b2 ] , the optimum parameters are given by θ̂ = argmin J(θ), (8) θ with J(θ) = NX train 1 β T (xi − ti (θ))2 . θ θ+ 2 Ntrain i=1 be statistically dependent, but different clusters are typically not. E. Complexity Aspects The most computationally challenging aspect of the entire approach is the optimization stage of the network. This is due to the large size of the training sets, network dimensionality, non-convexity of J(θ), etc. However, once the optimization stage is finalized, real-time positioning can easily be achieved due to the feed-forward structure of the network. This can be easily observed (in the current case-study) by looking at the overall complexity order of a CNN point-estimate: O(K 2 M LNF S1 S2 ). The fact that the complexity does not depend on the training set size Ntrain is one main advantage of using CNNs for positioning. (9) IV. P OSITIONING R ESULTS A Tikhonov penalty term is added to harvest the benefits of regularization in CNNs–β is its associate hyper-parameter. On a practical note, we minimize (9) using stochastic gradientdescent and back propagation [10]. Next, we address the positioning capabilities of CNNs by means of numerical results. We omit showing optimization aspects of the network (e.g., convergence across epochs) as the main point of the paper is to analyse the positioning capabilities of an optimized CNN. D. Network Design Considerations A. Simulation Setup We now motivate our choice for the implementation of real-valued CNNs. From our experience, the main challenge of generalizing CNNs to the complex-valued case appears to be in finding a suitable generalization of (5), the RELU, in order to ”activate” complex inputs. For example, the complexvalued CNN generalizations presented in [16] apply (5) to both real and imaginary parts separately, which from our experience appears not to perform well from a network optimization point-of-view. Explained briefly, such RELUs are non-continuous functions in C, as opposed to only being nondifferentiable in R as in real-valued network. This makes the network’s optimization unstable with the current optimization method (i.e. gradient descent). Therefore, as real-valued CNNs have been very successful in image classification tasks, we conservatively choose to pursue this design option, and let the extension to the complex-valued case to be a matter of future work. A practical remark regarding the choice of the number of CAP Kernels, K, follows. In practice, information features, addressed in Sec. II-B, are subject to a number of variability factors. For example, the shape of a ”measured Dirac delta function” can vary with its location due to discretization. Also, it is clear that, there is a higher variability in the informational features if they are seen as clusters of MPCs, rather than single MPCs themselves. In both cases, a practical approach to deal with such variability factors is to set a high number for K, and let the CNNs learn a set of kernels that span most possible variations. To finalize, if the information features are seen as the clusters of MPCs, the sizes of the Kernels, S1 and S2 , should cover their range in the angular and delay channel representations. This is because MPCs within a cluster may The setup used in our experiments is illustrated by Fig. 1: the terminal is constrained to be in a square area A of 25 × 25 wavelengths. Channel fingerprints are obtained in this area through the COST 2100 channel model under the 300 MHz parameterization (e.g., for path-loss and cluster-based parameters) established in [12]. The remaining parameters are shown in Table I, and the other CNNs hyper-parameters, i.e. L and K, are varied during the simulations. TABLE I C HANNEL AND CNN S PARAMETERS Parameter Variable Value Carrier frequency Bandwidth # Frequency points # BS antennas First BS antenna coordinate Last BS antenna coordinate fc W NF M B1 BM 300 MHz 20 MHz 128 128 [−200λ − 200λ]T [−200λ − 200λ + Tikhonov hyper-parameter Kernel angular length [ ◦ ] Kernel delay length [µs] Pooling windows length β S1 S2 N1 and N2 10−3 9.8 0.175 2 (M −1)λ T ] 2 The closest and furthest coordinate points of A with respect to the first BS antenna are: uc = [−12.5λ − 12.5λ]T and uf = [12.5λ 12.5λ]T , respectively (i.e., the user is at least ||uc −B1 ||/λ wavelengths away from the first BS antenna). The coordinates of these two spatial points implicitly define the relative orientation of the linear array with the area A. Similarly, the upcoming performance analysis is done by means of the normalized root mean-squared error (NRMSE) where the mean is calculated as the average over the test sets samples. Thus, we have v u Ntest 1u 1 X NRMSE = t (xi − ti (θ))2 . λ Ntest i=1 This error metric has an understandable physical intuition as it shows how the error distance relates to the wavelength. The CNN training and testing is described as follow: 1) First, the training set is obtained by fingerprinting a 2dimensional uniformly-spaced (thus, deterministic) grid of positions spanning the totality of A. The impact of the sampling density is discussed in Sec. IV-C. 2) For the test set, each fingerprint’s position is obtained by sampling a random variable with a uniform distribution with support A. Note that, if the CNN cannot use the available fingerprints for training, then the position estimator is E{x} = 0, see (9). Its NRMSE, for the current case study, is given by s Z 1 1 2 ref R (d − E{x}) ∂d ≈ 10.2. NRMSE (A) = λ ∂d A A (10) Obviously, this reference value increases when A is larger. Since an optimized CNN with a non-zero number of fingerprints should be able to do better or equal than (10), we use (10) as a reference level in the analysis. For benchmarking purposes, we also contrast our CNN results against a standard non-parametric fingerprinting approach [17]. Seeing a training fingerprint as a function of its position, i.e. Yi (xi ), this approach computes the position from a new fingerprint Ynew through a grid-search over normalized correlations as we see that for the same parameterizations, a network fed with untransformed inputs (i.e., s (Yi ) = Yi ) cannot effectively learn the channel structure for positioning purposes– the order of magnitude of the positioning error is similar to (10). However, with transformed inputs, fractional-wavelength positioning can be achieved in both network settings, with the lowest achieved test NRMSE being of about −6dB ≈ 1/2 of a wavelength. This showcases the capabilities of CNNs to learn the structure of the channel for positioning purposes. We remind that such positioning accuracies are attained with only 20 MHz of signaling bandwidth, see Table I, which suggests that CNNs can efficiently trade-off signal bandwidth by BS antennas and still achieve very good practical performance. Decreasing the error further than fractional-wavelength ranges becomes increasingly harder due to the increased similarities of nearby fingerprints–such range approaches the coherence distance of the channel. Also, as an illustrative example of the positioning accuracy, Fig. 2 (right) shows the point-estimates of the CNN under the parameterization that attained the lowest test NRMSE. C. Accuracy for Different Training Grids To finalize, we analyze the impact of spatial sampling during training. For benchmarking, we contrast the CNN performance with the performance of the correlation-based classifier (11). We use the CNN hyper-parameters that attained the lowest MSE in Fig. 2, namely, the model with L = 4 and K = 20.4 Fig. 3 contrasts the NRMSEs obtained from a CNN and the correlation-based classifier (11), against spatial sampling in the training set. Overall, both approaches are able to attain fractional-wavelength accuracies at smaller training densities. Noticeably, the CNN tend to behave better than (11) for less dense training sampling. Given that (11) does not have interpolation abilities, this result is closely connected with the | Tr{Yi (xi )H Ynew }| p x̂i = argmax . inherent interpolation abilities of the CNNs. The fact that the H Y Ntrain | Tr{Yi (xi )H Yi (xi )} Tr{Ynew CNNs achieve similar, or even superior performance compared new }| xi ∈{xi }i=1 (11) to standard non-parametric approaches while having attractive The following remarks can be made about this non-parametric implementation complexity further corroborates their use in approach: fingerprint-based localization systems. 1) Compared to the use of CNNs, a main drawback is its V. TAKEAWAYS AND F URTHER W ORK computational complexity order, O(M NF2 Ntrain ), as it We have investigated a novel approach for massive MIMO depends on the size of the training set; fingerprint-based positioning by means of CNNs and measured 2) it has no inherent interpolation abilities, and thus its error channel snapshots. CNNs have a feedforward structure that is can be lower bounded given the spatial density of the able to compactly summarize relevant positioning information training set; in large channel data sets. The positioning capabilities of B. Proof-of-Concept and Accuracy for Different CNN CNNs tend to generalize well, e.g. in highly-clustered propaParametrizations gation scenarios with or without LOS, thanks to their inherent Here, we report the positioning results when the spacing feature learning abilities. Proper design allows fractionalbetween neighbor training fingerprints is λ/4. We consider wavelength positioning to be obtained under real-time requirethis extreme case for now, in order to mitigate the impact of ments, and with low signal bandwidths. The current investigation showcased some of the potentials spatial undersampling from the results-here the focus is solely of CNNs for positioning using channels with a complex on the positioning capabilities of the network. The impact of the training fingerprints spacing is addressed later in Sec. IV-C. 4 Ideally, the CNN hyper-parameters should be tuned according to the Fig. 2 (left) illustrates the positioning accuracy for different current training set. However, we keep the same hyper-parameterization cases of CNN parameterizations. First, and as a sanity check, throughout this analysis, for simplicity. 225 15 True Positions CNN Estimates 10 5 eq. (10) K=20 0 Y coordinate [λ] 20 log10 NRMSE Untransformed K=10 Transformed -5 -10 3 4 5 6 7 8 Number of CAP layers L 220 RMSE = 0.6 [λ] 215 210 205 200 200 205 210 215 220 225 X coordinate [λ] Fig. 2. Left–NRMSE obtained by CNNs under different parameterizations. The upper horizontal line corresponds to the reference level (10). Here we only report the test error, since a similar error value was obtained during training (i.e., no overfitting exists). Right–An illustrative example of the point-estimates from a pre-defined set of positions by the optimized CNN (from the left figure) with K = 20 and L = 4. 5 CNN Correlation-based NRMSE 4 3 2 1 0 0 1 2 3 4 5 Spacing between Training Samples [λ] Fig. 3. NRMSE obtained by different positioning approaches for different spacings between samples of the uniform training grid. structure. However, the design of CNNs in this contexts should be a matter of further investigation, in order to be able to deal with real-world impairments during the fingerprinting process. In this vein, some questions raised during this study are, for example, i) how to achieve a robust CNN design that is able to deal with impairments such as measurement and labeling noise, or channel variations that are not represented in the training set, or ii) how to design complex-valued CNNs that perform well and are robust during optimization. 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, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” IEEE Transactions on Wireless Communications, vol. 9, no. 11, pp. 3590–3600, Nov. 2010. [3] Z. Chaloupka, “Technology and Standardization Gaps for High Accuracy Positioning in 5G,” IEEE Communications Standards Magazine, vol. 1, no. 1, pp. 59–65, March 2017. [4] N. Garcia, H. Wymeersch, E. G. Larsson, A. M. Haimovich, and M. Coulon, “Direct Localization for Massive MIMO,” IEEE Transactions on Signal Processing, vol. 65, no. 10, pp. 2475–2487, May 2017. [5] X. Li et al., “Robust Phase-Based Positioning Using Massive MIMO with Limited Bandwidth,” in 2017 IEEE International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC), Oct 2017. [6] V. Savic and E. G. Larsson, “Fingerprinting-Based Positioning in Distributed Massive MIMO Systems,” in 2015 IEEE 82nd Vehicular Technology Conference (VTC2015-Fall), Sept 2015, pp. 1–5. [7] S. A. Shaikh and A. M. Tonello, “Localization based on angle of arrival in EM lens-focusing massive MIMO,” in 2016 IEEE 6th International Conference on Consumer Electronics - Berlin (ICCE-Berlin), Sept 2016, pp. 124–128. [8] M. Zhu, J. Vieira, Y. Kuang, K.Astrom, A. F. Molisch, and F. Tufvesson, “Tracking and positioning using phase information from estimated multi-path components,” in 2015 IEEE International Conference on Communication Workshop (ICCW), June 2015, pp. 712–717. [9] S. M. Kay, Fundamentals of Statistical Signal Processing: Estimation Theory. Prentice-Hall, Inc., 1993. [10] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. MIT Press, 2016. [11] L. Liu et al., “The COST 2100 MIMO channel model,” IEEE Wireless Communications, vol. 19, no. 6, pp. 92–99, December 2012. [12] M. Zhu, G. Eriksson, and F. Tufvesson, “The COST 2100 Channel Model: Parameterization and Validation Based on Outdoor MIMO Measurements at 300 MHz,” IEEE Transactions on Wireless Communications, vol. 12, no. 2, pp. 888–897, February 2013. [13] A. Molisch, Wireless Communications, ser. Wiley - IEEE. Wiley, 2010. [14] T. Kaiser, H. B. Andre Bourdoux, J. B. A. Javier Rodriguez Fonollosa, and W. Utschick, Smart Antennas - State of the Art. Hindawi Publishing Corporation, 2005. [15] X. Gao, F. Tufvesson, and O. Edfors, “Massive MIMO channels Measurements and models,” in 2013 Asilomar Conference on Signals, Systems and Computers, Nov 2013, pp. 280–284. [16] N. Guberman, “On complex valued convolutional neural networks,” CoRR, vol. abs/1602.09046, 2016. [Online]. Available: http://arxiv.org/ abs/1602.09046 [17] Z. H. Wu, Y. Han, Y. Chen, and K. J. R. Liu, “A time-reversal paradigm for indoor positioning system,” IEEE Transactions on Vehicular Technology, vol. 64, no. 4, pp. 1331–1339, April 2015.
7cs.IT
On the Ergodic Rate of OFDMA Cognitive Radios under Imperfect Cross-Link Information H. Saki, A. Shojaeifard, M. M. Mahyari, and M. Shikh-Bahaei arXiv:1711.07371v1 [cs.IT] 17 Nov 2017 Institute of Telecommunications, King’s College London, London, WC2R 2LS, United Kingdom Email: {hadi.saki,a.shojaeifard,m.sbahaei}@kcl.ac.uk Abstract—The ergodic rate performance and limits of orthogonal frequency-division multiple access (OFDMA) cognitive radios (CRs) is studied under imperfect cross-link knowledge. We propose a novel stochastic interference management and exploitation technique to mitigate and control the imposed interference by CRs on licensed users in underlay spectrum sharing. The optimum downlink channel-adaptive resource allocation (RA) algorithm is designed to maximize the CRs functionality subject to satisfying average transmit and probabilistic peak interference power constraints. An expression for the cumulative density function (cdf) of CRs’ received signal-to-interference-plus-noise ratio (SINR) is developed to evaluate the resultant ergodic rate. Simulation studies are conducted to examine the proposed RA algorithm and investigate the impact of parameters uncertainty on the overall system performance. I. I NTRODUCTION Spectrum sharing has attracted a lot of attention recently as measurements performed by regulators have indicated that the allocated radio spectrum experiences low utilization [1]. In fact, according to the Office of Communications (Ofcom) report [2], the spectrum is severely underutilized in both spacial and temporal dimensions as a result of static management policies, and that 90% of locations have around 100 MHz of spectrum available for other services. Cognitive radio (CR), defined as an intelligent system capable of observing the surrounding environment and adapting accordingly [3], is a promising solution to overcome the spectrum crunch in modern wireless systems by exploiting spectral opportunities. Three main paradigms have been proposed in regards to CRs access to primary spectrum [4], [5]: (i) underlay approach where CRs coexist with primary users (PUs), provided they satisfy an interference limit set by a regulatory authority (ii) overlay approach in which CRs access the vacant parts of the licensed spectrum, and (iii) hybrid approach, a combination of the two former strategies where CRs can dynamically select between the underlay and overlay modes depending on the traffic and interference characteristics. Here, we focus on underlay spectrum access, where interference management and exploitation is essential for achieving desirable performance whilst tackling any harmful cross-service interference. Orthogonal frequency-division multiple-access (OFDMA) has emerged as a prominent air interface technology for new generation of wireless communication systems including long term evolution (LTE)-advanced [6, 7] and [8]. Further, OFDMA is considered a de facto standard for CR networks due to its inherent advantages in terms of flexibility and adaptability in allocating radio resources in shared-spectrum environments [9]. Resource allocation (RA) plays a significant role in improving the spectral efficiency of conventional OFDMA systems [10, 11, 12]. In addition, RA is an active area of research in OFDMA CR networks with the aim of achieving a balance between maximizing the cognitive system performance and minimizing the inflicted interference on the licensed users. Analysing the performance and limits of CR is essential towards identifying the viable business models and initiating standardization. A substantial amount of study on various performance metrics of CR systems has recently emerged, see, e.g., [13], [14], and the references herein. A central assumption for controlling the cross-service interference in many of the works in the literature is perfect knowledge of the interfering links between the CRs and licensed receivers. Imposing transmit and interference power constraints under the perfect channel state information (CSI) assumption guarantees a limited inflicted interference on the PUs. However, obtaining cross-link information requires a cooperative signalling protocol between the primary and cognitive networks [15]. This may be infeasible in practice, and even if a cross-connection mechanism is implemented, the inherent nature of wireless environment and estimation errors result in noisy CSI. A number of works on CR have considered the impact of imperfect cross-link knowledge: [13] studies the rate under an average interference constraint, the capacity under peak interference constraint is derived in [16], and optimum power allocation policy and ergodic capacity are derived under two different interference outage and signal-to-interference-plusnoise ratio (SINR) outage constraints in [17]. However, all of these studies consider a single CR scenario, and further, [13] and [16] adopt deterministic interference constraints. The motivation of this work is to analyze the impact of noisy cross-link knowledge on ergodic transmission rate of multi-user multi-band OFDMA CR networks under average transmit and probabilistic peak interference power constraints. We propose a novel stochastic approach for mitigating the CSI imperfections and design the optimum downlink RA algorithm in the cognitive network. Further, in order to compute the ergodic rate, we develop an approximated expression for the cumulative density function (cdf) of CRs’ received SINR. Notations: E {x} and P(x) denote the expectation and probability of x, respectively. var(x) denotes the variance of x and cov(y, z) is defined as the covariance of y and z. [x]+ signifies max(0, x), and x∗ is the optimal value of x. II. C OGNITIVE S YSTEM M ODEL AND P RELIMINARIES Consider a shared-spectrum environment as shown in Fig. 1, where a secondary network of N CRs (indexed by n) coexist with a primary network over K non-overlapping bands (indexed by k) subject to satisfying the power constraints set by a regulatory authority. The bandwidth of each band is assumed to be much smaller than the coherence bandwidth of the wireless channel, thus, each subcarrier experiences frequencyps ss flat fading. Let Hn,k (t), Hn,k (t), and Hksp (t), at time t, denote the complex channel gains over band k from the cognitive transmitter (CTx) to nth cognitive receiver (CRx), primary transmitter (PTx) to nth CRx, and CTx to primary receiver ss (PRx), respectively. The channel power gains |Hn,k (t)|2 , ps sp 2 2 |Hn,k (t)| , and |Hk (t)| , are assumed to be ergodic and stationary with continuous probability density functions (pdfs) ps 2 (.), and f ss |2 (.), f f|Hn,k |Hn,k | |Hksp |2 (.), respectively. In addition, the instantaneous values and distribution information of secondary-secondary channel gains are assumed to be available at the CTx [17]. Due to the impact of several systematic factors, such as channel estimation error, feedback delay, and mobility, perfect cross-link information is not available. We consider imperfect cross-link knowledge at the CTx obtained from maximum likelihood (ML) estimation and model the associated uncertainty in cross-link in the following form Hksp (t) = Ĥksp (t) + ∆Hksp (t) (1) Fig. 1: Schematic diagram of the underlay spectrum sharing system. For simplicity, the corresponding channels of a single CR are drawn. sp sp 2 δ∆H sp sp = var(∆Hk |Ĥk ) k |Ĥk   cov 2 (∆Hksp , Ĥksp ) 2 2 sp 1 − sp . = δ∆H = (1 − ρ2 )δ∆H 2 2 k k δ∆H sp δ sp Ĥ k k Proposition 2: The posterior distribution of the true crosslink Hksp given the estimation Ĥksp is a complex Gaussian random variable with respective mean and variance of µH sp |Ĥ sp = E (Ĥksp + ∆Hksp |Ĥksp ) k k = E (Ĥksp |Ĥksp ) + E (∆Hksp |Ĥksp ) = (1 + ρ2 )Ĥksp where over subcarrier (band) k, at time t, is the sp true cross-link gain, Ĥk (t) is the estimated channel gain considered to be known, and ∆Hksp (t) denotes the estimation error. Hksp (t), Ĥksp (t), and ∆Hksp (t) are assumed to be zeromean complex Gaussian random variables with respective vari2 2 2 ances δH sp , δ sp , and δ ∆H sp [16]. For robust receiver design, Ĥ k k k we consider the estimation Ĥksp (t) and error ∆Hksp (t) to be statistically correlated random variables with a correlation factor ρ, which determines the accuracy of channel estimation in relation to true channel states, defined as [18] r .  ρ= 2 δ∆H sp k 2 2 δ∆H sp + δ sp . H k (2) k We proceed by deriving posteriori distributions of the true cross-link given the estimation and hence the estimation error given the estimation. For notational brevity, we omit the time reference t where the context is clear. Proposition 1: The posterior distribution of the estimation error ∆Hksp given the estimation Ĥksp is a complex Gaussian random variable with respective mean and variance of µ∆H sp |Ĥ sp = E (∆Hksp |Ĥksp ) = E (∆Hksp )+ k k  cov(∆Hksp , Ĥksp )  sp Ĥk − E (Ĥksp ) = ρ2 Ĥksp 2 2 δ∆H sp + δH sp k k (3) (5) 2 δH = var(Ĥksp + ∆Hksp |Ĥksp ) = var(Ĥksp |Ĥksp ) sp |Ĥ sp k k +var(∆Hksp |Ĥksp ) + 2cov(∆Hksp |Ĥksp , Ĥksp |Ĥksp ) 2 sp . = (1 − ρ2 )δ∆H k Hksp (t) (4) (6) In the OFDMA CR network, the downlink RA algorithm allocates power and subcarrier to CRs based on the fadinginduced fluctuations in the true secondary-secondary and estimated interfering secondary-primary channels. Each subcarrier is assigned exclusively to at most one CR at any given time, hence, there is no mutual interference between different CRxs [8]. It should also be noted that by utilizing an appropriate cyclic prefix (CP), the inter-symbol-interference (ICI) can be ignored [15]. The instantaneous received SINR of CR n over band k with a fixed transmit power Pn,k is given by γn,k = ss 2 Pn,k |Hn,k | 2 2 σn + σps (7) where σn2 is the power of circularly symmetric zero-mean 2 complex Gaussian noise and σps is the received interference power from the primary network taken as white Gaussian noise 2 [15], [19], Without loss of generality, σn2 and σps are assumed to be the same across all users and subcarriers [19], [20]. III. I NTERFERENCE M ANAGEMENT AND E XPLOITATION In a spectrum sharing paradigm, and particularly for delaysensitive licensed services, the PUs’ quality of service (QoS) is highly dependent on the instantaneous received interference power from the CRs. To protect the licensed spectrum from harmful interference, extra constraints are needed to facilitate interference control. However, due to the underlying uncertainties about the shared-spectrum environment and PUs’ activity, it is unrealistic to assume that the CRs can always satisfy deterministic interference constraints. In practice, the tolerable interference level is confined by a maximum collision probability that guarantees a certain grade of QoS for PUs. In this paper, we consider an underlay spectrum sharing system where the primary network tolerates a maximum collision probability of ε. Collision is considered to occur when the interference level imposed by CRs is higher than I th . Adopting a probabilistic interference constraint is crucial for robust interference management given noisy cross-link knowledge. To improve overall system performance and to mitigate the impact of channel estimation errors, the following probabilistic peak interference constraint is considered P N X K X ϕn,k (γn,k )Pn,k (γn,k ) Hksp 2 Ĥksp > I th n=1 k=1 ! ≤ε (8) where for cognitive user n over band k, ϕn,k (γn,k ) is the timesharing factor (subcarrier allocation policy), and Pn,k (γn,k ) is the allocated transmit power. Assuming equal variance 2 δH across all users and subcarriers, the collision probasp |Ĥksp k bility constraint in (8) can be expressed as 2 P δH sp |Ĥ sp k k K N X X n=1 k=1 ! ϕn,k (γn,k )Pn,k (γn,k )|Ξk |2 > I th ≤ ε (9) where |Ξk |2 is a non-central Chi-Square random variable with two degrees of freedom and non-centrality parameter 2 µΞk = µH sp |Ĥ sp /δH sp |Ĥ sp . Note that (9) includes a sum of k k k k non-equal-weighted Chi-Square random variables. In general, obtaining the exact distribution of the linear combination of weighted Chi-Square random variables is rather complex. Although several approximations have been proposed, e.g., [21], they mostly rely on prior knowledge of the weights, in this case prior knowledge of power and subcarrier assignments. Hence, conventional approaches cannot be applied to the resource allocation problem under consideration. In this work, we propose a novel PN simple PK approximation based on the 2 2 moments of δH sp sp n=1 k=1 ϕn,k (γn,k )Pn,k (γn,k )|Ξk | . PN k |Ĥ2 k Let βk = n=1 δH sp |Ĥ sp ϕn,k (γn,k )Pn,k (γn,k ), hence k 2 δH sp |Ĥ sp k k N X K X k ϕn,k (γn,k )Pn,k (γn,k )|Ξk |2 = n=1 k=1 K X k=1 βk |Ξk |2 . (10) Proposition 3: The distribution of the sum of nonequal-weighted non-central Chi-Square random variables, PK 2 non-central k=1 βk |Ξk | , is similar to that of a weighted ′ ′ Chi-Square-distributed random variable ξχ2D (δ ), where δ , D, and ξ are respectively the non-centrality parameter, degrees of freedom, and weight of the new random variable: ′ δ = K X µΞ k (11) D = 2K (12) k=1 ξ= PK βk (2 + µΞk ) . P 2K + K k=1 µΞk k=1 (13) To investigate the above similarity, we compare the cdf of the proposed Chi-Square distribution with that of (10), using Monte-Carlo simulations. The results in Fig. 2 illustrate that the approximation is accurate over a wide range of practical values for K over randomly-distributed - e.g., Chi-Square or Gamma - weights βk . Now (9) can be simplified to: ! N X K X 2 ϕn,k (γn,k )Pn,k (γn,k )|Ξk |2 > I th P δH sp |Ĥ sp k ≈P  k n=1 k=1 ′ ξχ2D (δ )  > I th . (14) Given the non-centrality parameter is small relative to the degrees of freedom, we can approximate the non-central ChiSquare distribution with a central one using the following [21]     ′ I th /ξ 2 th 2 . (15) P ξχD (δ ) > I ≈ P χD (0) > 1 + δ ′ /D The right hand side of (15) can be formulated using the upper Gamma function as th  P χ2D (0) > I th /ξ 1 + δ ′ /D  = I /ξ G(K, 2(1+δ ) ′ /D) G(K) (16) where G(., .) is the upper incomplete Gamma function, and G(.) is the complete Gamma function. Proposition 4: For all integer values K 6= 1, and all positive ′ I th /ξ - this condition is always true because, I th , δ βk , and 1+δ ′ /D ′ K are positive, consequently, ξ, δ , and D are also positive the deterministic inequality 2 δH sp |Ĥ sp k k K X k=1 ≤ (2 + µΞk ) N X ϕn,k (γn,k )Pn,k (γn,k ) n=1 th KI  (K!)1/K ln 1 − (1 − ε)1/K (17) satisfies the probabilistic inequality (9). Therefore, the constraint (9) can be replaced by (17). Additionally, mitigating the interference between neighbouring cells is a vital issue due to the increasing frequency reuse aggressiveness in modern wireless communication systems [22]. As a remedy to inter-cell interference, and to maintain effective and efficient power consumption, we impose a total average transmit power limit Pt on the cognitive network: N X K X n=1 k=1 n o Eγn,k ϕn,k (γn,k )Pn,k (γn,k ) ≤ Pt . (18) 1 1 0.9 0.9 K = 64 K = 128 Cumulative Probability Cumulative Probability K = 32 0.8 0.7 0.6 0.5 0.4 0.3 0.8 K = 64 K = 32 K = 128 0.7 0.6 0.5 0.4 0.3 0.2 0.2 Approximated Model Empirical Data 0.1 0 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Approximated Model Empirical Data 0.1 0 200 400 600 Data 800 1000 1200 Data 2 (a) βk ∼ Chi-Square(2, 2), δH sp sp = 1. |Ĥ k k 2 (b) βk ∼ Gamma(2, 0.5, 4), δH sp sp = 0.5. |Ĥ k k Fig. 2: Approximated Model and Empirical Data cdfs, obtained from Monte-Carlo simulations. IV. E RGODIC R ATE The ergodic transmission rate (bps/Hz) of the OFDMA CR network operating under interference and transmit power constraints can be expressed as !) ( N X K X γn,k Pn,k (γn,k )  ϕn,k (γn,k ) R= Eγn,k log2 1+ t min PKt , NIsp n=1 k=1 (19) P K 2 where N sp = δH = sp sp k=1 (2 + µΞk ) and It k |Ĥk   th 1/K 1/K K I (K!) ln 1 − (1 − ε) . In order to evaluate the ergodic rate, the distribution of CRs’ received SINR, dependent on secondary-secondary and secondary-primary channel gains, must be developed. Limited by the constraints (17) and (18), the cdf of γn,k can be written as   ss 2 ss 2 It |Hn,k | Pt |Hn,k | ≤ Γ, ≤ Γ . Fγn,k (Γ) = P 2 ) 2 ) K(σn2 + σps N sp (σn2 + σps (20) The expression in (20) can be simplified by considering the ss 2 ss 2 Pt |Hn,k | It |Hn,k | sp cases K(σ2 +σ : 2 ) S N sp (σ 2 +σ 2 ) and conditioning on N n ps n ps  ss 2 It |Hn,k | 1−P > Γ, sp 2 > Γ = 2 ) N (σn + σps   2  KΓ(σn2 + σps )  It K ss 2   N sp ≤ P |Hn,k | > Pt Pt 1−   sp 2 2  N Γ(σn + σps ) It K  ss 2  N sp > . | > P |Hn,k It Pt (21)  ss 2 Pt |Hn,k | 2 2 ) K(σn + σps Invoking central limit theorem for large values of K, N sp can be approximated as a Gaussian random variable with  2 2 2 2 2 mean µN sp = 2KδĤ + 2K 1 − ρ2 δ∆H sp and sp 1 + ρ k k  2 4 2 4 ss 2 variance δN . Suppose that |H sp = 4Kδ sp 1 + ρ n,k | Ĥk ss |2 , hence, follows an Exponential distribution with mean µ|Hn,k with further manipulation, a closed-form expression for cdf of γn,k is developed in (22). Trivially, through respective differentiation of (22), the pdf of γn,k can be obtained. V. R ADIO R ESOURCE A LLOCATION A LGORITHM In this section, we design the optimal downlink power and subcarrier allocation algorithm to maximize the ergodic rate of the OFDMA CR network subject to satisfying the transmit and interference power constraints under noisy cross-link CSI. The optimization problem can be formulated as max ϕn,k (γn,k ),Pn,k (γn,k ) R (23a) s. t.: constraints in (17), (18) N X n=1 ϕn,k (γn,k ) = 1, ∀k ∈ {1, ..., K} (23b) ϕn,k (γn,k ) ∈ {0, 1}, ∀n ∈ {1, ..., N }, ∀k ∈ {1, ..., K} (23c) where constraints (23b) and (23c) ensure that every subcarrier is allocated to at most one CR. It can be observed that the optimization problem is convex with respect to Pn,k (γn,k ), however, it is non-convex with respect to ϕn,k (γn,k ). By applying Lagrangian dual decomposition, the non-convex optimization problem can be decomposed into independent subproblems each corresponding to a given CR. By solving the Lagrangian optimization problem the following potential optimal power allocation solution can be obtained for user n over subcarrier k with Lagrangian multipliers µ and η ∗ Pn,k (γn,k ) = " 1  − 2 ln(2) µ+ηδH sp sp (2 + µΞk ) |Ĥ k min Pt It K , N sp γn,k  #+ . (24) k The solution in (24) can be considered as a multi-level waterfilling algorithm. Using (24) and by applying the KarushKuhn-Tucker (KKT) conditions, the optimal subcarrier allocation problem is formulated as   n∗ = arg max Λ(γn,k ) , ∀n ∈ {1, ..., N } , ∀k ∈ {1, ..., K} (25) Fγn,k (Γ) ≈  ! !"  It K # 2 2 2 2 2 ss |2 It + δ sp Γ(σ Γ(σn2 + σps ) −2µN sp µ|Hn,k + σps ) sp − µ n −KΓ(σn2 + σps ) N N 1 1 t 1 + erf Pp − exp 1 − exp 2 ss |2 2 Pt µ|Hn,k 2 2µ2H ss It 2 2δN sp n,k   "  µ ss 2 I −µ sp + It K + δ 2 sp Γ(σ 2 + σ 2 ) # N |Hn,k | t n ps N Pt √ . (22) 1 − erf ss sp 2µ|Hn,k |2 It δN where n∗ is the optimal CR index, and ∗ γn,k Pn,k (γn,k ) It P min( Kt , N sp ) +  ∗ γn,k Pn,k (γn,k ) ln(2) 1 + It P min( Kt , N sp )  Λ(γn,k ) =  ln 1 + ∗ γn,k Pn,k (γn,k ) P I t min( Kt , N sp ) ln(2) . (26) The optimal subcarrier allocation policy is achieved by assigning the k th subcarrier to the CR with the highest value of Λ(γn,k ), i.e., placing a Lagrangian multiplier λk between the first and second maximas of Λ(γn,k ). If there are multiple equal maximas, the time-slot can be identically shared among the respective users. Here, we use the subgradient-based method to update the values of the multipliers µ and η:   N X K X ∗ ϕ∗n,k (γn,k )Pn,k (γn,k ) (27) µi+1 = µi − τ1i Pt − n=1 k=1 η i+1 (γn,k ) = η i (γn,k ) − τ2i × It − 2 δH sp sp k |Ĥk K X (2+µΞk ) k=1 N X ∗ ϕ ! ∗ (γn,k ) (γn,k )Pn,k n=1 (28) where for the iteration number i, τ1i and τ2i are the step sizes. The initial values of dual multipliers and step size selection are important towards obtaining the optimal solution, and can greatly affect the optimization problem convergence. VI. P ERFORMANCE E VALUATION AND D ISCUSSION The performance of the OFDMA CR network using the proposed RA algorithm, subject to satisfying average transmit and probabilistic peak interference power limits under imperfect cross-channel estimation, is studied. Perfect CSI is assumed between CTx and CRxs through an error-free feedss back channel. |Hn,k |, ∀{n, k}, are assumed to be Rayleighdistributed and the secondary-secondary power gain mean valss |2 , ∀{n, k}, are taken as Uniformly-distributed ranues, µ|Hn,k dom variables within 0 to 2. Interfering cross-channel values, Hksp , ∀{k}, are distributed according to a complex Gaussian distribution with mean 0.05 and variance 0.1. The channel estimation and error for all sub-channels are taken as independent and identically distributed (i.i.d.) zero-mean Normallydistributed random variables. The noise and primary-secondary interference power spectral densities are set to N0 = −110 dBm and 2500N0, respectively. All results correspond to a CR network with 64 subcarriers and 3 CRxs. The approximated pdfs for the received SINR of the three CRs, dependent on noise floor and true secondary-secondary and estimated secondary-primary channel gains, in a randomly taken subcarrier, i.e., here k = 55, is plotted in Fig. 3. The results are obtained using Monte-Carlo simulations. Fig. 4 shows the ergodic rate of the OFDMA CRs versus the collision threshold. As expected, a higher collision limit results in improved R as I th limits the CRs’ transmit power functionality. The gain in ergodic rate, however, approaches a plateau in high I th region as Pt becomes the dominant power constraint. Given Pt is dominant, imposing a higher average power setting enhances the CRs’ uppermost performance, e.g., where I th = 10 Watts, a 7.50% increase in ergodic rate is realized as Pt is increased from 20 to 25 Watts. The ergodic rate against the probabilistic interference constraint for different collision thresholds is illustrated in Fig. 5. Increasing the maximum probability of violating the collision threshold improves R, the tradeoff, however, is the greater possibility of degrading the primary service operation which is deemed undesirable in practical scenarios. For more stringent collision limits, i.e., small I th , increasing the maximum collision probability provides higher gains in ergodic rate. E.g., varying ε from 0% to 5%, increases R by 26.2% and 15.4% with I th = 5 and I th = 7, respectively; the gain diminishes quickly however as increasing ε in high I th region implies a faster rate towards reaching a saturated performance limit. System performance versus the correlation coefficient between the estimation and error random variables is depicted in Fig. 6. Higher ρ correspond to greater accuracy of the estimation technique, with the ideal case of ρ = 1 where error variance is zero. Precise cross-link estimation is essential towards robust interference control, however, it typically implies more training symbols and thus increased signalling overhead. VII. C ONCLUSIONS The ergodic transmission rate performance and limits of multi-user multi-band OFDMA CRs with underlay spectrum settings under imperfect cross-link knowledge was studied. We designed the downlink RA algorithm to maximize the cognitive network performance subject to satisfying average transmit and probabilistic peak interference power constraints. To compute the quantified loss in ergodic rate due to the added constraints, an approximated expression of the CRs’ received 0.4 270 CRx #1 CRx #2 CRx #3 260 0.3 Ergodic Rate, R (bps/Hz) Probability Density Function 0.35 0.25 0.2 0.15 0.1 250 240 230 220 th I = 11 Watts 210 th I = 9 Watts 0.05 th I = 7 Watts 200 th I = 5 Watts 0 5 10 15 Received SINR, γ 20 n,k 190 25 0 2 (dB) Fig. 3: Probability density functions of the received SINR for OFDMA CRs in a given subcarrier k. System parameters are: k = 55, Pt = 25 Watts, I th = 5 Watts, ρ = 0.25, ε = 30%. 4 6 8 Maximum Probability of Collision, ε (%) 10 Fig. 5: Ergodic rate against the probabilistic interference constraint with different values of collision threshold. System parameters are: Pt = 40 Watts, ρ = 0.75. 242 260 250 240 Ergodic Rate, R (bps/Hz) Ergodic Rate, R (bps/Hz) 240 230 220 210 200 190 180 236 234 232 Pt = 35 Watts 170 Pt = 30 Watts 160 150 238 ε = 25% ε = 22.5% ε = 20% 230 Pt = 25 Watts 228 2 4 6 8 10 12 14 th Collision Threshold, I (Watts) 0 0.2 0.4 0.6 Correlation Coefficient, ρ 0.8 1 Fig. 4: Ergodic rate versus the collision threshold with different values of average transmit power limit. System parameters are: ρ = 0.5, ε = 15%. Fig. 6: Ergodic rate against the correlation factor between estimation and error random variables for different probabilistic interference constraints. System parameters are: Pt = 25 Watts, I th = 20 Watts. SINR was developed. As a remedy to the imperfections associated with CSI and varying shared-spectrum environment, a stochastic interference management and exploitation technique was employed to confine the probability of collision to a predefined limit. The impact of parameters uncertainty on overall system performance was investigated through simulation results. Our proposed framework is an improvement in terms of practical feasibility and flexibility over the existing literature with perfect cross-link availability assumption, deterministic interference management policies, and single-user scenarios. [5] S. Boyd, J. Frye, M. Pursley, and T. Royster, “Spectrum monitoring during reception in dynamic spectrum access cognitive radio networks,” IEEE Trans. Commun., vol. 60, no. 2, pp. 547–558, Feb. 2012. [6] I. Koffman and V. Roman, “Broadband wireless access solutions based on ofdm access in ieee 802.16,” IEEE Commun. Mag., vol. 40, no. 4, pp. 96–103, Apr. 2002. [7] K. Nehra, A. Shadmand, and M. Shikh-Bahaei, “Cross-layer design for interference-limited spectrum sharing systems,” in 2010 IEEE Global Telecommunications Conference GLOBECOM 2010, Dec 2010, pp. 1–5. [8] G. Li and H. Liu, “Downlink radio resource allocation for multi-cell ofdma system,” IEEE Trans. Wireless Commun., vol. 5, no. 12, pp. 3451–3459, Dec. 2006. [9] X. Zhou, G. Li, D. Li, D. Wang, and A. Soong, “Probabilistic resource allocation for opportunistic spectrum access,” IEEE Trans. Wireless Commun., vol. 9, no. 9, pp. 2870–2879, Sep. 2010. [10] A. Kobravi and M. Shikh-Bahaei, “Cross-layer adaptive arq and modulation tradeoffs,” in 2007 IEEE 18th International Symposium on Personal, Indoor and Mobile Radio Communications, Sept 2007, pp. 1–5. [11] H. Saki and M. Shikh-Bahaei, “Cross-layer resource allocation for video streaming over OFDMA cognitive radio networks,” IEEE Trans. Multimedia, vol. 17, no. 3, pp. 333–345, 2015. [Online]. Available: https://doi.org/10.1109/TMM.2015.2389032 [12] A. Olfat and M. Shikh-Bahaei, “Optimum power and rate adaptation for mqam in rayleigh flat fading with imperfect channel estimation,” IEEE Transactions on Vehicular Technology, vol. 57, no. 4, pp. 2622–2627, July 2008. [13] L. Musavian and S. Aissa, “Fundamental capacity limits of cognitive radio in fading environments with imperfect channel information,” IEEE Trans. Commun., vol. 57, no. 11, pp. 3472–3480, Nov. 2009. [14] X. Kang, Y.-C. Liang, A. Nallanathan, H. Garg, and R. Zhang, “Optimal power allocation for fading channels in cognitive radio networks: Ergodic capacity and outage capacity,” IEEE Trans. Wireless Commun., vol. 8, no. 2, pp. 940–950, Feb. R EFERENCES [1] A. MacKenzie, J. Reed, P. Athanas, C. Bostian, R. M. Buehrer, L. DaSilva, S. Ellingson, Y. Hou, M. Hsiao, J.-M. Park, C. Patterson, S. Raman, and C. da Silva, “Cognitive radio and networking research at virginia tech,” Proc. IEEE, vol. 97, no. 4, pp. 660–688, Apr. 2009. [2] OfCom, “OfCom report. Digital dividend: cognitive access.” Jul. 2009. [3] J. Mitola and J. Maguire, G.Q., “Cognitive radio: making software radios more personal,” IEEE Pers. Commun., vol. 6, no. 4, pp. 13–18, May 1999. [4] I. Akyildiz, W.-Y. Lee, M. C. Vuran, and S. Mohanty, “A survey on spectrum management in cognitive radio networks,” IEEE Commun. Mag., vol. 46, no. 4, pp. 40–48, Apr. 2008. 2009. [15] N. Mokari, K. Navaie, and M. Khoshkholgh, “Downlink radio resource allocation in ofdma spectrum sharing environment with partial channel state information,” IEEE Trans. Wireless Commun., vol. 10, no. 10, pp. 3482–3495, Oct. 2011. [16] H. Suraweera, P. Smith, and M. Shafi, “Capacity limits and performance analysis of cognitive radio with imperfect channel knowledge,” IEEE Trans. Veh. Technol., vol. 59, no. 4, pp. 1811–1822, May 2010. [17] Z. Rezki and M.-S. Alouini, “Ergodic capacity of cognitive radio under imperfect channel-state information,” IEEE Trans. Veh. Technol., vol. 61, no. 5, pp. 2108– 2119, Jun. 2012. [18] S.-S. Sadough and P. Duhamel, “Improved iterative detection and achieved throughputs of ofdm systems under imperfect channel estimation,” IEEE Trans. Wireless Commun., vol. 7, no. 12, pp. 5039–5050, Dec. 2008. [19] R. Zhang, S. Cui, and Y.-C. Liang, “On ergodic sum capacity of fading cognitive multiple-access and broadcast channels,” IEEE Trans. Inf. Theory, vol. 55, no. 11, pp. 5161–5178, Nov. 2009. [20] X. Gong, S. Vorobyov, and C. Tellambura, “Optimal bandwidth and power allocation for sum ergodic capacity under fading channels in cognitive radio networks,” IEEE Trans. Signal Process., vol. 59, no. 4, pp. 1814–1826, Apr. 2011. [21] D. R. Cox and N. Reid, “Approximations to noncentral distributions,” The Canadian Journal of Statistics, vol. 15, no. 2, pp. 105–114, 1987. [22] H. Zhang, L. Venturino, N. Prasad, P. Li, S. Rangarajan, and X. Wang, “Weighted sum-rate maximization in multi-cell networks via coordinated scheduling and discrete power control,” IEEE J. Sel. Areas Commun., vol. 29, no. 6, pp. 1214–1224, Jun. 2011.
7cs.IT
ULB-TH/08-10 AEI-2008-013 arXiv:0805.3018v2 [math.RT] 14 Jul 2017 Hyperbolic Weyl groups and the four normed division algebras Alex J. Feingold 1 , Axel Kleinschmidt 2 and Hermann Nicolai 3 1 Department of Mathematical Sciences, The State University of New York Binghamton, New York 13902–6000, U.S.A. 2 Physique Théorique et Mathématique, Université Libre de Bruxelles & International Solvay Institutes, Boulevard du Triomphe, ULB – CP 231, B-1050 Bruxelles, Belgium 3 Max-Planck-Institut für Gravitationsphysik, Albert-Einstein-Institut Am Mühlenberg 1, D-14476 Potsdam, Germany Abstract: We study the Weyl groups of hyperbolic Kac– Moody algebras of ‘over-extended’ type and ranks 3, 4, 6 and 10, which are intimately linked with the four normed division algebras K = R, C, H, O, respectively. A crucial role is played by integral lattices of the division algebras and associated discrete matrix groups. Our findings can be summarized by saying that the even subgroups, W + , of the Kac–Moody Weyl groups, W , are isomorphic to generalized modular groups over K for the simply laced algebras, and to certain finite extensions thereof for the nonsimply laced algebras. This hints at an extended theory of modular forms and functions. “The mathematical universe is inhabited not only by important species but also by interesting individuals.” – C. L. Siegel 1 Introduction In [20] Feingold and Frenkel gained significant new insight into the structure of a particularly interesting rank 3 hyperbolic Kac–Moody algebra which they called F , along with some connections to the theory of Siegel modular forms of genus 2. The first vital step in their work was the discovery that the Weyl group of that hyperbolic algebra is W (F ) ∼ = P GL2 (Z), the projective group of (2 ×2) integral matrices with determinant ±1, isomorphic to the hyperbolic triangle group T (2, 3, ∞). They showed that the root system of that algebra could be realized as the set of (2 × 2) symmetric integral matrices X with det(X) ≥ −1, and that the action of M ∈ W (F ) on X is given by MXM T . In notation used commonly by physicists today, the hyperbolic algebra studied in [20] is designated as A++ since it is obtained from the finite-dimensional 1 Lie algebra sl2 of type A1 by a process of double extension. The first step of (1) the extension gives the affine algebra A1 ≡ A+ 1 , and the second step, often referred to as over-extension, gives the hyperbolic algebra. In the realization of the root lattice via symmetric matrices X, the real roots consist of the integral points X with det(X) = −1 on a single-sheeted hyperboloid, and the imaginary roots consist of the integral points X on the light-cone det(X) = 0 and on the two-sheeted hyperboloids det(X) > 0. In [20] it was also mentioned that these results could be extended to two other (dual) rank 4 hyperbolic algebras whose Weyl groups were both the Klein–Fricke group Ψ∗1 containing as an index 4 subgroup the Picard group Ψ1 = P SL2 (Z(i)) whose entries are from the Gaussian integers. The results expected to hold for these rank 4 hyperbolic algebras included connections to the theory of Hermitian modular forms, but that line of research was not pursued in later work. A paper by Kac, Moody and Wakimoto [26] generalized the structural results of [20] to the hyperbolic algebra E10 = E8++ , but until now there has not been any new insight into the structure of the Weyl groups of hyperbolic algebras which are usually just given as Coxeter groups defined by generators and relations. In the present work, we take up this line of development again, and present a coherent picture for many higher rank hyperbolic Kac–Moody algebras which is based on the relation to generalized modular groups associated with lattices and subrings of the four normed division algebras. More specifically, we shall show that the Weyl groups of all hyperbolic algebras of ranks 4, 6 and 10 which can be obtained by the process of double extension described above, admit realizations in terms of generalized modular groups over the complex numbers C, the quaternions H, and the octonions O, respectively. We are encouraged to find that these Weyl groups are amenable to explicit matrix descriptions, but understand that the hyperbolic algebras themselves have still eluded any effective characterization. For K = C, the present work on these hyperbolic Weyl groups is thus a very natural extension of [20], showing in particular that ++ the rank 4 hyperbolics A++ and G++ are naturally connected with cer2 , C2 2 1 tain subrings in the normed division algebra C. Analogous results are obtained ++ ++ ++ for all the ‘over-extended’ rank 6 hyperbolics A++ and F4++ , 4 , B4 , C4 , D4 whose (even) Weyl groups can be described in terms of quaternionic modular groups. Finally, K = O, the largest and non-associative division algebra of octonions, is associated with rank 10 hyperbolics, and in particular, the maximally extended hyperbolic Kac–Moody algebra E10 . The other two hyperbolic over-extended algebras B8++ and D8++ can also be described using octonions. In this paper we present the rich structure which we found in the complex and quaternionic cases, as well as partial (and intriguing) results for the octonionic case. As explained in more detail in Section 3, a new feature for the division algebras beyond R is that simple reflections involve complex conjugation of all entries of X. For that reason only the even part of a given Weyl group will act by matrix conjugation of X and is therefore the main focus of our study. Throughout the paper we will denote by W + the even part of a Weyl group W . In the case of F one has W + (F ) ∼ = P SL2 (Z), the modular group, and for the other division algebras we discover a number of apparently new modular groups. An announcement of our work appears in [21], based on a talk presented by A.J.F. at the conference on “Vertex Operator Algebras and Related Areas” in honor of Geoffrey Mason, July 2008, at Illinois State University. In table 1 we summarize our findings for the (even) Weyl groups of the finite and hyperbolic Kac–Moody algebras studied in relation to the various division algebras. By g++ we mean the over-extension of the finite-dimensional Lie algebra g to a hyperbolic Kac–Moody algebra, where the first extension g+ is an untwisted affine algebra. In Appendix A we discuss other cases where the first extension is twisted affine, so a different notation is required. In the table, we use the standard group theory notation C = A . B to mean a group C which contains group A as a normal subgroup, with quotient group C/A isomorphic to B. Such a group C is called an extension of A by B. If B has order |B|, A is said to be of index |B| in A . B. It can happen that the extension is a semi-direct product, so that B is a subgroup of C which acts on A via conjugation as automorphisms, and in this case the product is denoted by A ⋊ B. By Sn we denote the symmetric group on n letters. The various rings appearing in the table are as follows. For K = C these are the Gaussian integers G ≡ Z(i) and the Eisenstein integers E; for the quaternions H we use the terminology of [8], referring to the maximal order of quaternions having all coefficients in Z or all in Z+ 12 as Hurwitz integers H. To understand W + (A++ 4 ) we will need the icosian quaternions I [7,35]. The octonionic integers are called the octavians O [8]. The generalized modular groups that we find are all discrete as matrix groups. Our results are complete for the cases K = C and K = H. For all of these we can reformulate the even Weyl groups as new kinds of modular groups, most of which have not yet appeared in the literature so far. We note that 2 W + (g++ ) K Root system g W (g) R A1 2 ≡ Z2 P SL2 (Z) C A2 Z3 ⋊ 2 P SL2 (E) C B2 ≡ C2 Z4 ⋊ 2 P SL2 (G) ⋊ 2 C G2 Z6 ⋊ 2 P SL2 (E) ⋊ 2 H A4 S5 P SL2 (I) H B4 24 ⋊ S4 P SL2 (H) ⋊ 2 H C4 24 ⋊ S4 ] P SL2 (H) ⋊ 2 H D4 23 ⋊ S4 P SL2 (H) H F4 25 ⋊ (S3 × S3 ) P SL2 (H) ⋊ 2 O D8 27 ⋊ S8 P SL2 (O) O B8 28 ⋊ S8 P SL2 (O) ⋊ 2 O E8 2 . O8+ (2) . 2 P SL2 (O) (0) (0) (0) (0) (0) (0) Table 1 Root systems, number systems and Weyl groups within the normed division algebras. The groups in the right column are defined in detail in the relevant sections. A. Krieg [30,31] has developed a theory of modular forms over the quaternions, however the modular groups defined there do not appear to coincide with the ones found here. Nevertheless, we will make extensive use of some results of [30] in our analysis, in particular Theorem 2.2 on p. 16. The most interesting Weyl group, however, is the one of the maximally extended hyperbolic Kac–Moody algebra E10 ≡ E8++ , where our results are still incomplete, and which provided the chief motivation for the present work. In this case, the even Weyl group is given by W + (E10 ) ∼ = P SL2 (O) . (1.1) Because the (2 × 2) matrices over the octonions obviously do not form a group, the ‘modular group’ over the octavians O appearing on the r.h.s. of this equation can so far only be defined recursively, by nested sequences of matrix conjugations with the generating (octonionic) matrices introduced in Section 3 of this paper. This is in analogy with the generators and relations description of the E10 Weyl group as products of fundamental reflections (and also in analogy with the description of the continuous Lorentz group SO(1, 9; R) via octonionic (2 × 2) matrices in [41,34]). It remains an outstanding problem to find a more manageable realization of this modular group directly in terms of (2×2) matrices with octavian entries and the G2 (2) automorphism group of the octavian integers. In the final section we present some results in this direction 3 which we believe are new, and which may be of use in future investigations. The case E10 is also the most important because it has recently been shown that all simply laced hyperbolic Kac–Moody algebras can be embedded into E10 [42]. Because the associated Weyl groups are then subgroups of W (E10 ), all these Weyl subgroups should admit an octonionic realization. Conversely, the structure and explicit realizations of modular groups found here for the quaternionic case should help in understanding the group P SL2 (O), because all rank 6 algebras occur as subalgebras inside E10 (and A++ and D4++ as 4 regular subalgebras, in particular). The remarks above also apply to the Weyl groups of B8++ and D8++ . Ref. [20] also highlighted a possible link with the theory of Siegel modular forms. In the present context, one would thus start from the Jordan algebra H2 (KC ) over the complexified division algebra KC , and consider a generalized Siegel upper half-plane for Z ∈ H2 (KC ). This can be done not only for the quaternions [31], but also for K = O, where the outlines of a corresponding theory of ‘Siegel modular forms’ have been described and developed in [16]. However, it remains to be seen what role P SL2 (O) as defined here has to play in this context, and whether results in this direction can substantially advance our understanding of the hyperbolic algebra E10 . We believe that our results are also interesting in the light of recent developments in the study of black hole microstates for particular classes of black holes. It was found already in [14] that the degeneracy formula of dyonic quarter BPS black holes of N = 4 is controlled by the denominator formula of a specific Borcherds completion of a hyperbolic subalgebra of F , whose Weyl group is index 6 in W (F ). In more recent work [5] it was argued that the Weyl group has a more immediate interpretation in this setup as realizing the socalled attractor flow of a given dyonic solution to an ‘immortal dyon’ by crossing walls of marginal stability in moduli space [3,40,10]. The correspondence to the Weyl group is such that a point X inside the forward light-cone corresponds to dyonic solutions with the given moduli and charges. As the light-cone is tessellated by the action of the Weyl group one can move such a point to a standard fundamental domain by a finite number of Weyl reflections and the endpoint of this motion is the immortal dyon. The walls between the different cells crossed during the motion in moduli space are the walls of marginal stability. It would be interesting to study the degeneracy and the attractor flow of less supersymmetric solutions and their relation to the higher rank hyperbolic algebras and modular groups discussed in this work. The possible relevance of modular forms is also mentioned in recent work on E10 unification and quantum gravity [4,12]. Weyl groups of the so-called hidden symmetry groups also appear in the context of U-duality groups [23,17,36,19]. 1 1 We stress, however, that the Weyl groups discussed here must not be confused with the arithmetic duality groups conjectured to be symmetries of (compactified) 4 The organization of the paper is as follows. In Section 2.1 we fix the common notation for the four division algebras and describe the general structure of the hyperbolic root systems. Section 3 contains the central general results about the realization of the simple reflections, the even hyperbolic Weyl group and the affine and finite Weyl groups for all division algebras. The commutative division algebras R and C and the associated hyperbolic Weyl groups are treated in Section 4, the algebras admitting a quaternionic realization in Section 5 and the case E8++ which requires the octonions in Section 6. In appendix A we also present two cases involving complex numbers which are not of over-extended type but involve a twisted affine extension. Acknowledgements: We would like to thank M.C.N. Cheng, F. Englert, H.R.P. Ferguson, R.L. Griess, M. Mazur, W. Nahm, P. Ramond and D. Zagier for discussions and correspondence. A.J.F. and A.K. gratefully acknowledge the hospitality of the Albert Einstein Institute on various visits, while H.N. thanks U.L.B. Brussels for hospitality. A.K. is a Research Associate of the Fonds de la Recherche Scientifique–FNRS, Belgium. 2 Division algebras and hyperbolic root lattices We wish to describe the Weyl groups of the various hyperbolic Kac–Moody algebras as matrix groups which are to be interpreted as modular groups. In order to accomplish this, we will describe in this section a lattice (integral linear combinations of explicit elements) in the Lorentzian space of Hermitian (2 × 2) matrices over one of the normed division algebras K. This lattice will be shown to be isometric to the root lattice of the hyperbolic algebra. In the following section we will show how the Weyl group acts as on this lattice by matrix conjugation, leading to interesting matrix groups in the associative cases. 2.1 Subrings and integers in division algebras To begin we review some facts about division algebras, their subrings and orders in certain algebraic extensions of the rational division algebras. M theory. For instance, W (E10 ) can be realized as an arithmetic subgroup of O(1, 9), whereas the hypothetical arithmetic duality group E10 (Z) is infinitely larger. Independently of its possible physical significance, a proper definition of this object at the very least would presuppose properly understanding the continuous group E10 , a goal still beyond reach. 5 Let K be one of the four normed division algebras (over R): R (the real numbers), C (the complex numbers), H (the Hamilton quaternions) or O (the Cayley octonions). K will also be a topological metric space with respect to the norm topology. Each algebra K has an involution, sending a ∈ K to ā, generalizing the complex conjugation in C, such that the norm of a ∈ K, N(a) = aā, is a non-negative real number, and satisfies the composition law N(ab) = N(a)N(b) for all a, b ∈ K. For a ∈ R, we have a = ā, and for a ∈ C, ā is the usual complex conjugation in C. One also defines the real part a + ā = 2Re(a) ∈ R (also sometimes called trace), and the imaginary part of a is defined by a − ā = 2Im(a). The real-valued symmetric bilinear form on K (a, b) = N(a + b) − N(a) − N(b) = ab̄ + bā (2.1) is positive definite, giving K the structure of a real Euclidean space. For each choice of K there is a standard basis such that the structure constants are all in {−1, 0, 1}, so if one takes only rational linear combinations of these basis vectors, one gets four rational normed division algebras KQ (over Q). If F is any subfield of R one has the normed division algebra KF (over F), consisting of all F-linear combinations of the standard basis elements of K, such that K = KF ⊗F√R. We √ will actually√only be using a few specific choices for F, namely, Q, Q( 2), Q( 3) and Q( 5). The consideration of KF is necessary to describe the various finite root systems which can have angles with cosines involving the listed square roots. The matrices acting on the root lattices will have entries from certain orders O within KF . We briefly review this concept from algebraic number theory (see e.g. [38,8]). The subfield F of R, assumed to be a finite extension of Q, determines a√ ring S of algebraic in F, which for our cases are simply √ √ integers 2 Z, Z( 2), Z( 3) and Z((1 + 5)/2). Note that, as a subring of a field, S is always commutative. An order O in KF over S is a subring of KF (nonassociative for K = O) containing 1 and which is finitely generated as an S-module (under addition). Furthermore it has to contain a basis of KF over F, such that O ⊗F F = KF . An order is called a maximal order if it is an order not properly contained in another order. Orders in rings are a generalization of the integers in the rationals, and occupy an important role in number theory. We stress that it is important for an order O to be finitely generated and that this implies that elements x ∈ O satisfy a monic polynomial equation √ These examples follow the general pattern of algebraic integers in Q( D) which are those elements that satisfy a monic minimal polynomial with coefficients in Z, √ √ that is, Z( D) or Z((1 + D)/2), depending on D(mod 4). 2 6 xn + cn−1 xn−1 + · · · + c0 = 0 with cn−1 , . . . , c0 ∈ Z , (2.2) which also can be used for defining orders for the non-associative octonions [8]. The polynomial (2.2) arises as follows. Let B = {x1 , · · · , xm } be a finite set of generators for O over S, so that O= ( m X si xi i=1 ) si ∈ S . (2.3) Left multiplication by x ∈ O, Lx , can be represented by a matrix [lij ] such that xxj = m X i=1 lij xi and all lij ∈ S (2.4) since O is a subring and an S-module. The characteristic polynomial det(λI − Lx ) of the linear transformation Lx is a monic polynomial of degree m with coefficients in the commutative ring S and which is satisfied by Lx . Since K is a division algebra, the polynomial is also satisfied by x, and so x satisfies a monic polynomial equation with coefficients in S. Multiplying this polynomial √ √ by the conjugate polynomial, where D has been replaced by − D in the coefficients (where D = 2, 3, 5), will give a polynomial of degree 2m for x with coefficients in Z as claimed. 3 It can happen that the minimal polynomial satisfied by x is of lower degree but for our purposes it is sufficient to know that some such polynomial exists. Since in all cases we consider in this paper there is finite group of units EO we know that the ring spanned by them under addition and multiplication will form an order in the corresponding KF , which we interpret as integers. Although one usually thinks of integers as being ‘discrete’ in some topology, note that orders need For example, √ not be discrete in the norm topology. √ the order O = Z( 2) = S is a dense subring of F = Q( 2) where K = R (and thus also dense in R). Although we will use in some cases such dense subrings (cf. in particular Section 5.2), the Weyl groups we define will be discrete groups (in the sense that there exists a fixed ǫ > 0 such that the ǫ-neighborhoods of different matrices do not intersect). As we will explain in Section 3.4, this discreteness can be traced back to the discreteness of the hyperbolic root lattices. The discreteness is also important with regard to the 3 This can also be stated as follows: Since S is the ring of algebraic integers over F the norm from F to Q sends S to Z. Applying the norm to the equation satisfied by x gives another equation satisfied by x, but with coefficients in Z. 7 properly discontinuous action of the matrix group on a suitable ‘upper halfplane’ and the existence of fundamental domains with non-empty interior. 4 For the division algebra K = R we take F = Q, S = Z and O = Z. For K = C we use different choices of F and order O. Either F = Q, S = Z, such that KF = Q(i) is the ‘standard’ rational form of C, and the order is √ the ring of Gaussian integers O = G ≡ Z(i); or we choose F = Q( 3) so that KF = F(i) is an F-form of C containing √the order of Eisenstein integers √ √ 3 . Each of these is a maximal O = E ≡ Z( 3 1), where 3 1 = e2πi/3 = −1+i 2 order in its algebra KF . Matters get a little more complicated for K = H, as is to be expected in order to get the different rank 6 hyperbolic Weyl groups. In one case we choose F = Q, S = Z and the (non-maximal) order is the ring of Lipschitz integers O = L which are generated over Z by the standard basis elements {1, i, j, k}. The same rational form contains the maximal order of Hurwitz integers O = H which is generated over Z by {i, j, k, 1+i+j+k }, or by 2 the elements given below in (5.40). In another case we add to H the octahedral √ units (see Section 5.2), producing an order R which is generated over Z( 2) √ and b = 1+j √ . In yet another case we will need by {a, b, ab, ba} where a = 1+i 2 2 √ to make use of icosian units, and appropriate choices of field F = Q( 5), algebraic integers S and order O, which are described in detail in Section 5. For the octonions K = O, and to get the Weyl group of E10 we will need the octavians which are both discrete and a maximal order in the (non-associative) ring of rational octonions. Finally, recall that a unit ε ∈ O is an element having a multiplicative inverse ν ∈ O in the order, but since 1 = N(εν) = N(ε)N(ν) and for all the orders we use, N(ε), N(ν) ∈ Z, we find that N(ε) = ε̄ε = εε̄ = 1. We will use the symbol EO to denote the finite group (unless K = O, where the product is not associative) of units in O. 2.2 Root lattices The Kac–Moody algebras we are concerned with are hyperbolic extensions of finite-dimensional algebras associated with discrete subsets of the normed division algebras K = R, C, H, O and, therefore, are of ranks 3, 4, 6, and 10, respectively. In the main text we consider algebras g++ of over-extended type [22,11] which arise from simple finite-dimensional Lie algebras g by constructing the non-twisted affine extension g+ (also often denoted by g(1) ), and 4 This can also be traced back to the fact that the matrices making up the Weyl group, though formally taking entries in some dense order, always are constructed in such a way that an underlying discrete order governs the structure, see table 1, consistent with the group multiplication laws of the matrices. 8 connecting the hyperbolic node of the Dynkin diagram by a single line to the affine node. Our methods also apply to hyperbolic algebras which are extensions of twisted affine algebras, and we discuss examples in Appendix A. But to make the required formulas more uniform we restrict ourselves to the non-twisted cases in the main text. We begin with (the Jordan algebra of) all Hermitian (2 × 2) matrices over K, X = X† ,     + x H2 (K) = X =    z  − z̄ x  T    x+ , x− ∈ R, z ∈ K (2.5)  where X† = X is the conjugate transpose of X. 5 H2 (K) is equipped with a quadratic form  ||X||2 = −2 det(X) = −2 x+ x− − zz̄  (2.6) and a corresponding symmetric bilinear form (X, Y) := 12 (||X+Y||2 −||X||2 −||Y||2 ) which is Lorentzian. The subspace of matrices X ∈ H2 (K) with x+ = x− = 0 is isomorphic to K, and the restriction of the bilinear form to this subspace agrees with the positive definite form on K, making the isomorphism an isometry. It is in that Euclidean subspace that we will find root systems of finite type, and extend them to hyperbolic root systems in H2 (K). Suppose that we have been able to find a set of simple roots ai ∈ K, i = 1, . . . , ℓ, where ℓ = dimR (K), with Cartan matrix " # 2(ai , aj ) . C = [Cij ] = (aj , aj ) (2.7) of finite type (the bilinear product is defined in (2.1)). Let Q = i Zai ⊂ K be the finite type root lattice additively generated by those (finite) simple roots. If necessary, we will denote the Lie algebra type by a subscript on Q. We also find the highest root θ of the finite type root system, and normalize the lengths of the simple roots ai so that θθ = 1 always. In some twisted affine cases described in Appendix A, we may instead choose θ to be the highest short root, but we still assume that θθ = 1. P In the Jordan algebra H2 (K), depending on the choice of Q, we define the lattice 5 We note that all Jordan algebras employed in this paper can also be realized via Lorentzian signature Clifford algebras. 9      + z  x Λ = Λ(Q) := X =   ∈ H2 (K)   z̄ x−    x+ , x− ∈ Z, z ∈ Q . (2.8)   The restriction of the bilinear form to Λ makes it a Lorentzian lattice, which we will identify as the root lattice of a hyperbolic Kac–Moody Lie algebra. Our first step is to identify the hyperbolic simple roots in the lattice Λ as follows:  α−1 =    1 0  , 0 −1  α0 =    −1 −θ  , −θ 0  αi =    0 ai  āi 0 , 1 ≤ i ≤ ℓ. (2.9) It follows immediately that (α−1 , α−1 ) = 2 , (α−1 , α0 ) = −1 , (α−1 , αi ) = 0 for 1 ≤ i ≤ ℓ ,(2.10) as well as (α0 , α0 ) = 2θθ = 2 and (αi , αj ) = ai āj + aj āi = (ai , aj ) for 1 ≤ i, j ≤ ℓ. (2.11) We will give specific choices for the ai so that the matrix C in (2.7) is the Cartan matrix of a finite type root system, consistent with the embedding of the corresponding Euclidean root lattice Q into Λ. We will see that choosing θ to be the highest root of the finite root system (or the highest short root) makes {α0 , α1 , · · · , αℓ } the simple roots of an untwisted (or a twisted) affine root system. Furthermore we will see that including α−1 to get all the simple roots in (2.9) gives the simple roots of a hyperbolic root system with Cartan matrix " 2(αI , αJ ) [AIJ ] := (αJ , αJ ) # for I, J = −1, 0, 1, · · · , ℓ. (2.12) The unit norm condition on θ is necessary to obtain the single line between the hyperbolic and affine node. For simply laced algebras all the ai can also be chosen as units whereas this is no longer true for cases where the Dynkin diagram has arrows. The hyperbolic Kac–Moody algebras (of over-extended type) of rank 3,4,6 and 10, respectively, which we obtain by this construction are as follows: F ≡ A++ 1 ++ ++ ++ ++ ++ ++ ++ (for K = R), A++ , C and G (for K = C), A , B , C , D and F 2 2 2 4 4 4 4 4 10 (for K = H), and E10 ≡ E8++ , D8++ and B8++ (for K = O). 6 In all cases, real roots are characterized by det X < 0 and imaginary roots by det X ≥ 0, with null roots obeying det X = 0. 3 Weyl groups In this section we study abstractly the Weyl groups of the hyperbolic Kac– Moody algebras identified in the preceding section. As we define the root lattice using the Jordan algebra H2 (K) we aim to find a description of the Weyl group acting on this space. Except where explicitly stated otherwise, the results of this section apply to all four division algebras, including K = O. Specific features of the four individual division algebras will be studied separately in the following sections. 3.1 The simple reflections The Weyl group associated with the hyperbolic Cartan matrix (2.12) is the Coxeter group generated by the simple reflections wI (X) = X − 2(X, αI ) αI , (αI , αI ) I = −1, 0, 1, · · · , ℓ . (3.1) These generators are known to satisfy the Coxeter relations, which give a complete presentation for the Weyl group. Recall [24] that a Coxeter group is defined by the presentation D E RI | RI2 = 11, (RI RJ )mIJ = 11 for I 6= J . (3.2) For Weyl groups only special values may occur for the entries of the matrix M = [mIJ ], namely mIJ ∈ {2, 3, 4, 6, ∞}. More specifically, the relations (3.2) say that |wI | = 2, that is, each generator has order 2, and they give the orders of the products of pairs of distinct generators, determined by the entries of the Cartan matrix as follows: |wI wJ | = mIJ , I 6= J ∈ {−1, 0, 1, · · · , ℓ}, (3.3) where The over-extensions of the other finite simple rank 8 root systems C8++ and A++ 8 do not give rise to hyperbolic reflection groups. 6 11 mIJ =               2 if AIJ AJI = 0 3 if AIJ AJI = 1 4       6       ∞ (3.4) if AIJ AJI = 2 if AIJ AJI = 3 if AIJ AJI ≥ 4. For other values of mIJ , the Coxeter group defined by (3.2) cannot be the Weyl group of a Kac–Moody algebra. Nevertheless, Coxeter groups with other values of mIJ besides 2, 3, 4, 6, ∞ may be of interest in the present context, as such groups may occur as subgroups of Weyl groups. A prominent example of such a non-crystallographic Coxeter group is the group H4 , which is a subgroup of the Weyl group of E8 [18,35,28]. Of central importance for our analysis is that the action of the simple hyperbolic Weyl reflections wI can be rewritten as a matrix action on X. Theorem 1 Denote by X = (X† )T the matrix X with each entry conjugated but the matrix not transposed, let q εi = ai / N(ai ) for i = 1, · · · , ℓ (3.5) be the unit norm versions of the simple roots ai ∈ Q, and let θ ∈ Q be the highest root of the finite root system with simple roots ai , always normalized so that θθ = 1. (For simply laced finite root systems we have εi = ai .) Define the (2 × 2) matrices MI , I = −1, 0, 1, · · · , ℓ, by  0 M−1 =   1 10  ,   −θ M0 =   1 0 θ  ,   εi Mi =   0  0 −ε¯i  , (3.6) i = 1, · · · , ℓ. Then the simple reflections (3.1) can be written as wI (X) = MI X̄MI† , I = −1, 0, 1, . . . , ℓ. (3.7) Proof: In the non-associative octonionic case one needs to check that the expression on the right side of (3.7) is well defined for the matrices in (3.6) without placing parentheses. Since each matrix MI involves only one non-real octonion, this follows immediately from the alternativity property of O. (See the section on octonions below for more details.) 12 Now we will check directly that the two formulas (3.1) and (3.7) for wI agree. First, note that (X, α−1 ) = x+ − x− , (X, α0 ) = −zθ − θz̄ + x− , (X, αi ) = zāi + ai z̄(3.8) for 1 ≤ i ≤ ℓ, so w−1 (X) = X − w0 (X) = X −  =  =   − z  2(X, α−1 ) x α−1 = X − (x+ − x− )α−1 =  , (α−1 , α−1 ) z̄ x+ 2(X, α0 ) α0 = X − (−zθ − θz̄ + x− )α0 (α0 , α0 ) + − −  (x − zθ − θz̄ + x ) (z − zθθ − θz̄θ + x θ)  (z̄ − θzθ − θθz̄ + θx− ) wi (X) = X −    x− zāi + ai z̄ 2(X, αi ) αi = X − αi (αi , αi ) N(ai ) + x −ε̄i z ε̄i  −εi z̄εi  . x− , (3.9) where we used the definition (3.5) in the last equation. Compare these with  0 † M−1 XM−1 =    + 1 x 10    z̄   0 1  z x−       10     − x = z  z̄ x+  + z̄   −θ 0   −θ 1   x M0 XM0† =   0 θ   z x−   1 θ    ,  + − −  (θθx − zθ − θz̄ + x ) (−θz̄θ + x θ)  =  (−θzθ + θx− )   θθx−    + z̄   ε¯i 0   εi 0   x Mi XMi† =   =  0 −ε¯i +   z x−  εi ε̄i x −εi z̄εi  −ε¯i z ε¯i ε¯i εi x−   . 0 −εi  ,  (3.10) 13 † Hence w−1 (X) = M−1 XM−1 , w0 (X) = M0 XM0† , since θθ = 1, and wi (X) = Mi XMi† since εi ε̄i = 1. The explicit expressions (3.8) and (3.10) are manifestly well defined for octonions without placing parentheses.  Our aim in this paper is to study the group generated by the simple reflections (3.7) as an extension of a matrix group. This extension may always be realized in the associative cases (K 6= O) as an extension of a matrix group by a small finite group. Since the full Weyl group W is a semi-direct product of the even part W + with Z2 = hw−1 i, we will be satisfied to understand just the even Weyl group W + as an extension of a matrix group. 3.2 Even part of the Weyl group The formula (3.7) for the simple reflections involves complex conjugation of X. Therefore all even elements s ∈ W + ⊂ W can be represented without complex conjugation of X, and it turns out to be simpler to study the even Weyl group W + in many cases. The even Weyl group W + is an index 2 normal subgroup of W and consists of those elements which can be expressed as the product of an even number of simple reflections. It is generated by the following list of ℓ+1 double reflections: s0 = w−1 w0 , si = w−1 wi (i = 1, . . . , ℓ) . (3.11) Of course, this is not a unique set of generating elements. From the Coxeter relations (3.2)–(3.4) satisfied by the simple reflections, wI , these even elements satisfy the relations s30 = 11 , s2i = 11 for i 6= 0 (3.12) and mij (s−1 = 11 for i 6= j and i, j = 0, 1, . . . , ℓ, i sj ) where mij is given as before in (3.4). In analogy with Theorem 1 we have Theorem 2 Define the matrices 14 (3.13)   0 θ S0 =    , −θ 1   0 −εi  Si =    . ε̄i 0 (3.14) Then the generating double reflections (3.11) acting on X ∈ Λ can be written for all K as sI (X) = SI XSI† , I = 0, 1, . . . , ℓ . (3.15) Proof: Follows by direct computation as in the proof of Theorem 1.  An important corollary is Corollary 3 For the associative division algebras K = R, C, H, all elements s ∈ W + can be realized by a matrix action according to s(X) = SXS † , (3.16) where S = Si1 · · · Sin if s = si1 · · · sin ∈ W + in terms of the generating elements (3.11). Proof: The iterated action of two even Weyl transformations is given by the associative product of matrices (for K = R, C, H) (s1 s2 )(X) = S1 (S2 XS2† )S1† = (S1 S2 )X(S1 S2 )† (3.17) and has an obvious extension to arbitrary words in the even Weyl group by associativity.  For K = O, the formula (3.16) no longer holds (even though we have for any octonionic matrices (S1 S2 )† = S2† S1† ). This can be seen most easily in the continuous case by a dimension count as will be discussed in Section 6 where we collect our results specific to the octonionic case. Let us remark that in the commutative case (3.15) follows immediately by acting with two successive simple Weyl reflections, say wJ and wI ; the effect on X is † , wI (wJ (X)) = MI (MJ X̄MJ† )MI† = SIJ XSIJ (3.18) where SIJ ≡ MI M J . In this notation the matrices (3.14) are Si ≡ S−1 i for i = 0, 1, . . . , ℓ. However, in the non-commutative cases one has to be more 15 careful because quaternionic and octonionic conjugation also reverses the order of factors inside a product, such that, in general MJ X̄MJ† 6= M̄J XMJT (3.19) and MI and M J do not obviously combine into a matrix SIJ which acts by conjugation as in (3.16). Therefore it is crucial that Theorem 2 applies to all division algebras. In the associative cases we obtain from Corollary 3 that W + is isomorphic to a matrix group generated by (3.14). All elements s ∈ W + act by invertible matrices and we therefore obtain subgroups of GL2 (K). Furthermore, they all act by matrix conjugation and therefore a matrix and its negative have the same action. Other scalar matrices ε11 ∈ GL2 (K), for ε a central unit in K, would act trivially, so we should be finding W + isomorphic to a subgroup of P GL2 (K). It is important to note that for general (2 × 2) matrices over K the determinant is not well defined unless K is commutative. In the cases K = R and K = C, the matrices MI satisfy det MI = −1, so products of two such fundamental Weyl reflections have determinant +1 and hence W + is a subgroup of P SL2 (K) for commutative K. With a suitable definition of P SL2 (K) this statement is also true for non-commutative K. The necessary refinements required for P SL2 (H) and P SL2 (O) will be presented in the relevant sections. For all K the P in P SL means that only the quotient by {11, −11} has been taken. We will argue that the even Weyl groups constitute interesting discrete ‘modular’ subgroups of P SL2 (K). 3.3 Finite and affine Weyl subgroups By specialization, the construction given above also yields matrix representations of the finite and the affine Weyl subgroups contained in the respective hyperbolic algebras. We first note that the action of the finite Weyl group Wfin ≡ W (g) on the root lattice of the finite subalgebra g is obtained as a special case of (3.7) by setting x± = 0 and restricting indices to I ≡ i = 1, · · · , ℓ; as follows immediately from the last formula in (3.10), the simple reflections are thus realized on any lattice vector z via wi (z) = −εi z̄εi (for z ∈ Q ⊂ K). (3.20) The same transformation on z is obtained by matrix conjugation (3.16) with the even element Si with i = 1, . . . , ℓ, i.e. without complex conjugation of X. Similarly, it follows from (3.11) that 16 si sj = w i w j for i, j = 1, . . . , ℓ . (3.21) so that, in terms of the matrix representation (3.14) for K 6= O we obtain   −εi ε̄j Si Sj =  0  0 (3.22)   −ε̄i εj whence the even part W + (g) of the finite Weyl group acts by diagonal matrices. Defining uij = εi ε̄j and vij = ε̄i εj we deduce si (sj (z)) = uij zv̄ij = uij zvji for z ∈ Q. To summarize: the even and odd parts of the finite Weyl group, respectively, act by purely diagonal or purely off-diagonal matrices for K = R, C, H. 7 Because of the extra w−1 contained in the definition of Si the action of the odd part is only correct on the subspace with x± = 0; on the full H2 (K) the odd parts act with an additional interchange of x+ and x− . The affine subalgebra g+ is characterized by all roots with det X ≤ 0 which are of the form   m z X= z̄ 0 for z ∈ Q and m ∈ Z .  (3.23) Its associated affine Weyl group Waff is well known to be isomorphic to a semi-direct product of the finite Weyl group and an abelian group of (affine) translations T , such that Waff = T ⋊ Wfin . The latter is generated by elements of the form wtθ w −1 = tw(θ) where w ∈ Wfin and the relevant affine translation is   1 θ tθ = w0 wθ =  01  . (3.24) Here, wθ is the reflection about the highest root θ and this is the correct expression for the affine translation for all the algebras we consider in this paper. It is straightforward to check that this matrix indeed generates translations since 7 For K = H the same action can be alternatively written in terms of pairs [l, r] and ∗[l, r] of unit quaternions, cf. [8] p. 42. The relation to our notation is as follows:  [l, r] ←→ S =  ¯ l 0 0 r̄  ,  ∗[l, r] ←→ S =  17 0 ¯l r̄ 0  .     m z  †  m + θz̄ + zθ z  tθ    tθ =   z̄ 0 z̄ 0 (3.25) This statement also holds for the octonionic case. We note that the interesting S-type transformations in the Weyl groups are then solely due to the hyperbolic extension. If K is associative, and once the finite Weyl group has been identified in terms of diagonal and off-diagonal matrices, the full even hyperbolic Weyl group is obtained by adjoining the affine Weyl transformation (3.24) to the set of both diagonal and off-diagonal matrices as generating set. 3.4 Lattice symmetries and Weyl groups In the associative cases, there are general necessary constraints on the structure of the matrices   a b S= cd  , (3.26) which represent transformations of the even Weyl group acting on the hyperbolic root lattice Λ of (2.8). These follow from the fact that the transformed X′ = SXS † again has to lie in the root lattice Λ and should have the same norm as X. Working out the matrix product one finds the following set of conditions for the transformed X′ to lie in the root lattice: aā, bb̄, cc̄, dd¯∈ Z , cā, db̄ ∈ Q , ¯ aai b̄ + bāi ā, cai d + dāi c̄ ∈ Z for i = 1, . . . , ℓ , aai d¯ + bāi c̄ ∈ Q for i = 1, . . . , ℓ . (3.27) Here, Q is the finite root lattice with simple basis vectors ai . It is the collection of the conditions (3.27) that will turn the matrices S into a discrete subgroup of the group of (2 × 2) matrices over K = R, C, H (even if the relevant rings inside K to which the matrix entries belong are not discrete). The norm preservation requirement will lead to additional determinant-type constraints. The conditions (3.27) are only necessary but not sufficient since they also allow for solutions which correspond to lattice symmetries of Q which are not elements of the Weyl group. This happens when the finite Dynkin diagram admits outer automorphisms, and we will be concerned with finding manageable conditions which eliminate these. 18 4 Commutative cases We first discuss the commutative cases K = R and K = C where one has the usual definition of the determinant. 4.1 K = R, type A1 For this case we recover the results of [20] for the rank 3 hyperbolic algebra F = A++ 1 , where W (F ) = P GL2 (Z). The root system of type A1 is shown in fig. 1, and the Dynkin diagram of F is shown in fig. 2. A simplification here is that we do not have to worry about conjugation; it is for this reason that an isomorphism with a matrix group exists for the full Weyl group W , rather than only its even subgroup W + . We have the simple root a1 = 1, which is identical to the highest root θ = 1, so that the simple roots of the hyperbolic algebra are represented by the three matrices  1 α−1 =   0  0 −1 ,    −1 α0 =   −1  −1 0 ,   0 α1 =   1 10  . (4.1) The corresponding matrices MI representing the simple Weyl group generators are   0 1 M−1 =  10     −1 1  , M0 =  0 1  ,   1 0  M1 =  0 −1  . (4.2) The even part of the Weyl group is thus generated by the following two matrices (conjugation can be omitted)  0 S := M−1 M1 =   −1  1 0  ,   −1 T := M0 M1 =   −1  0 −1    ∼ =  1 1 01  (4.3) implying that W + (F ) ∼ = P SL2 (Z). The full Weyl group in this case can be obtained by adjoining the matrix M−1 of determinant −1 from which one recovers W (F ) ∼ = P GL2 (Z) [20]. 19 t ✲ta1 r Fig. 1. The A1 root system with simple root labeled. The root lattice is the lattice of (rational) integers Z. ✇ −1 ✇ ✇ 0 1 Fig. 2. Dynkin diagram of F ≡ A++ 1 with numbering of nodes. 4.2 K = C, simple reflections For K = C there are different choices of simple finite root systems which we discuss separately in the following sections, corresponding to the root lattices A2 , B2 ∼ = C2 , G2 . Here, we collect some common features of all cases. However, the overextension of the B2 ∼ = C2 root system leads to the hyperbolic algebra ++ C2 if θ is the highest root. In all cases in this subsection, the matrices giving rise to the simple reflections are  0 M−1 =    1 10  0 −1  −θ ,  1 0  M1 =     1 M0 =  0 θ M2 =  0 −ε̄2   ,   ε2 0  ,  . (4.4) where we used the fact that for K = C it is always possible to choose ε1 = 1 (as for K = R). The even Weyl group W + is thus generated by the elements    0 θ S0 = M−1 M 0 =  −θ 1 S2 = M−1 M 2 =  ε̄2 0   ,   0 −ε2     0 −1  S1 = M−1 M 1 =  1 0  , (4.5)  and we note that S22 = −11 which acts as the identity on X in agreement with the Coxeter relation s22 = 11. We repeat that we will always normalize θθ = 1. In the above form the main difference between the three algebras is 20 encoded in θ and ε2 . The three algebras are then distinguished simply by the multiplicative order of these numbers, which will be specified below for each case. We note that the even parts of the finite Weyl groups W + (A2 ), W + (B2 ) ∼ = W + (C2 ) and W + (G2 ) are cyclic groups of orders 3, 4, and 6, respectively. This follows also since their generating elements are rotations in the plane and so one obtains finite subgroups of the abelian group SO(2). From this point of view the non-abelian nature of the full finite Weyl group arises because of a single reflection realized as complex conjugation, which shows that the full finite Weyl group is a dihedral group. In order to determine the even Weyl group W + for the hyperbolic algebras A++ and G++ the following result will be useful. 2 2 Proposition 4 Let O be a discrete Euclidean ring in C, that is, a discrete additive group, closed under multiplication, satisfying the Euclidean algorithm. Furthermore, assume that O = {m + nθ2 ∈ C | m, n ∈ Z} with θ ∈ O a unit, and that all units in O have norm 1. Then SL2 (O), the group of (2 × 2) matrices with entries from O and with determinant 1, is generated by    1 1 ε  ,  0 01   0  0  , −1 ε̄  1 0  , (4.6) where ε ∈ EO runs through all units of O. Proof: We prove the proposition by using arguments from [30]. Let ∆ denote the group generated by the matrices in (4.6). These matrices belong to SL2 (O) and we want to show that ∆ = SL2 (O). First, we claim that ∆ contains all ‘translation’ matrices  1   a 01  for a ∈ O. (4.7) To see this, note that     θ 01 1θ 0  0θ  01  0θ    2 1 θ  = 0 1  . (4.8) We used that the unit θ ∈ O satisfies θθ = 1. Since the translation matrices form an abelian group with addition of the upper right corner entry, and 1 and θ2 are an integral basis of O, for any m, n ∈ Z, we have 21  m  n 2 1 1 1 θ    01   0 1   2  1 m + nθ  = 0  1 , (4.9) so all matrices (4.7) are in ∆. We also get that all matrices        0 1   1 −a   0 −1   1 =   a 1 0 0 1 −1 0  0 1 (4.10)  are in ∆. To complete the proof, choose any matrix A ∈ SL2 (O) and consider the set of norms n o N = N(bij ) | [bij ] = B = UAV for some U, V ∈ ∆ \{0}. (4.11) Because the ring O is discrete, and the norm is positive definite, any set of non-zero norms has a least element. Then N contains a non-zero minimum element N(b), and suppose   b11 B=  b12  b21 b22 (4.12)  is a matrix for which this occurs. Multiplying B on the left and/or right by the third generating matrix in (4.6) (the rotation matrix), we can move any of its entries into the upper left corner, so we may assume that the minimum occurs with N(b) = N(b11 ). Now, using the Euclidean algorithm, we may write with 0 ≤ N(r1 ) < N(b11 ) with 0 ≤ N(r2 ) < N(b11 ) b12 = q1 b11 + r1 b21 = q2 b11 + r2 (4.13) for q1 , q2 , r1 , r2 ∈ O. Then we have  1 B  −q1  0 1    b11 = r1 b21 b22 − q1 b21    (4.14) is a matrix of the form UAV for U, V ∈ ∆, so the norms of its entries cannot be less than the minimal value N(b11 ). This forces r1 = 0, so b12 = q1 b11 . Similarly, we have 22     b12  b11   1 0   B =  r2 b22 − q2 b12 −q2 1 (4.15) is a matrix of the form UAV for U, V ∈ ∆, so the norms of its entries cannot be less than the minimal value N(b11 ). This forces r2 = 0, so b21 = q2 b11 . Finally, we see that         1 0   1 −q1   b11 0  ′ =B , = B  ′ 0 b22 0 1 −q2 1 (4.16) where b′22 = b22 − q1 q2 b11 , is a diagonal matrix of the form UAV for U, V ∈ ∆, with determinant b11 b′22 = 1. Therefore, b11 must be a unit in O and b′22 = ′ ′ b−1 11 = b11 so that B ∈ ∆. All operations transforming A into B ∈ ∆ were performed using matrices from ∆, so we conclude that A ∈ ∆, completing the proof.  We remark that this proposition does not apply to the Gaussian integers since all Gaussian units square to real numbers and one therefore cannot generate the whole ring from 1 and θ2 for any unit θ. 4.3 K = C, type A2 The first choice of integers we consider is the case of type A2 , which is simply laced. The simple roots can therefore be chosen as units ai = εi and we take them to be √ √ 1+i 3 −1 + i 3 , θ = −ε̄2 = , ε1 = a1 = 1 , ε2 = a2 = 2 2 where also the highest root θ has been given. The A2 root lattice is spanned by integral linear combinations of the simple roots, and they form the order of ‘Eisenstein integers’ E. The A2 root system is depicted in fig. 3. 23 a2 t ❪ ❏ t t ✡ ✡ θ ❏ ✲ta1 r ❏✡ ✡❏ ✡ ❏ t ✡ ❏t Fig. 3. The A2 root system with simple roots labeled. The root lattice is the ring of Eisenstein integers. ✇ −1 ✇ 2 ✇ 0❅ ❅ ❅✇ 1 Fig. 4. Dynkin diagram of A++ with numbering of nodes. 2 The hyperbolic algebra A++ has the Dynkin diagram shown in fig. 4. The 2 following choice of simple roots in Λ provides us with that diagram:  1 α−1 =   0  0 −1  0 1 α1 =   10   , ,   −1 ,  , −θ  α0 =  −θ̄ 0 α2 =  −θ 0     0 −θ̄   (4.17) where we used ε2 = −θ̄. All roots have equal length in this case, so the hyperbolic extension A++ is also simply laced. We have 2 Proposition 5 The even part of the Weyl group in this case is ∼ W + (A++ 2 ) = P SL2 (E) (4.18) where P SL2 (E) denotes the ‘Eisenstein modular subgroup’ of P SL2 (C) obtained by restricting all entries to be Eisenstein integers. Proof: The statement (4.18) is an immediate corollary of Proposition 4, given that E satisfies the Euclidean algorithm, and all generating matrices in (4.6) can be obtained within the even part of the Weyl group of A++ 2 . This is true by inspection of the matrices (4.5): the rotation matrix is just S1−1 , and all diagonal matrices are obtained from powers of 24 t t a2 ❅ ■ ❅ ❅ t θ ❅ ❅ ❅ t ❅ ✲t ❅r a1 ❅ ❅ t t ❅t Fig. 5. The root system of type C2 , with simple roots labeled and indicated by arrows. The lattice they generate is a scaled version of the ring of Gaussian integers. There are both long and short roots, and the same system gives type B2 .  B := S1 S2 =    θ 0  . 0θ (4.19) Finally the translation matrix is obtained from   −θ (S2 S0 )(S1 S2 )−1 =  2   θ  θ · 0 −θ2 0  0 θ   1 =  1 01  (4.20) where we used θ3 = −1. Thus S0 , S1 and S2 generate a group isomorphic to SL2 (E). Since in the action, the normal subgroup {11, −11} acts trivially, the action of the even Weyl group on X is that of the quotient P SL2 (E).  4.4 K = C, type C2 The root system of type C2 is shown in fig. 5. It is the same as the system of type B2 but the over-extension constructed from this root system is C2++ with Dynkin diagram shown in fig. 6. The dual diagram corresponds to the (2) extension of the twisted affine Lie algebra D2 (not B2++ !) and will be discussed in Appendix A. The C2 root system is not simply laced, having simple roots whose squared lengths are in the ratio 2 to 1: √ −1 + i 1+i ε1 = a1 2 = 1 , ε2 = a2 = √ , θ = −ε̄2 = √ . 2 2 (4.21) We obtain the hyperbolic C2++ Dynkin diagram since our simple roots satisfy (α−1 , α−1 ) = (α0 , α0 ) = (α2 , α2 ) = 2 , (α1 , α1 ) = 1, 25 (4.22) (α−1 , α0 ) = −1 , (α0 , α1 ) = −1 , (α1 , α2 ) = −1 (4.23) and all other inner products are zero. From (4.21) we see that θ is a primitive eighth root of unity with θ2 = −θ̄2 = i. The hyperbolic simple roots of C2++ from (4.21) are   1 0  α−1 =   α1 =   0 −1 0 √1 2  √1 2 0   −1 ,    α0 =  −1+i √ 2 0 α2 =  0 −1+i √ 2 −1−i √ 2 0  , −1−i √ 2     ,    . (4.24) The long root α2 has a2 as a unit whereas a1 , entering the short root α1 , is not a unit. To determine W + (C2++ ) it proves convenient to bring the matrices {S0 , Si } to another form by means of a similarity transformation  θ S̃ = USU −1 , U = 1/2  0  0 θ−1/2 (4.25)  which gives   2  0 θ  S̃0 =  −θ̄2 1     0 −θ  , S̃1 =  θ 0  ,    0 1 S̃2 =  −1 0  . (4.26) Here, we have used θ = −ε̄2 . From these we can build the matrices  A = S̃2 =      0 1  , −1 0 B = S̃1 S̃2 =     2  0 −θ  C = S̃1 S̃2 S̃1 =   , θ̄2 0   θ 0  , 0 θ̄  1 −1  D = S̃1 S̃0 S̃1 S̃2 =  ,  0 1  1 −θ2  E = S̃1 S̃2 S̃1 S̃0 =   .  0 1 (4.27) The group generated by these matrices is isomorphic to the even part of the hyperbolic Weyl group. Hence, these matrices contain inversions and rotations (generated by A, B and C), and translations along some lattice directions 26 ✇❅ ✇ ✇ Fig. 6. C2++ −1 0 1 ❅ ✇ 2 Dynkin diagram with numbering of nodes. (generated by D and E). The similarity transformation (4.25) is useful for explicitly exhibiting the correct lattice translations along two independent basis vectors 1 and θ2 of the chosen integers via the matrices D and E, respectively. We note that for all θ the relation C · A = B 2 is valid, showing that the group generated by A, B, C, D and E is an index 2 extension of the group generated by A, C, D and E. With this we can easily recover the link with the so-called Klein–Fricke group which was first noticed in [20]. Because θ2 = i the matrices C and E of (4.27) become    0 −i  C= −i 0  ,    1 −i  E= 0 1  . (4.28) Together with A and D, these matrices generate the Picard group P SL2 (G) (where G ≡ Z(i) are the Gaussian integers), see e.g. [32]. We thus recover the result of [20] (where, however, the explicit form of the embedding was not given). Proposition 6 The even Weyl group W + (C2++ ) is an index 2 extension of P SL2 (G), that is, W + (C2++ ) ∼ = P SL2 (G) ⋊ 2 ≡ P SL2 (Z(i)) ⋊ 2 . (4.29) Semi-directness follows since conjugation of P SL2 (G) by the matrix B is an automorphism. 4.5 K = C, type G2 The root system of type G2 is depicted in fig. 7. It is not simply laced, having simple roots whose squared lengths are in the ratio 3 to 1. ε1 = a1 = 1 , ε2 = √ √ √ 1 + 3i − 3+i , θ= . 3a2 = 2 2 (4.30) The G2 root system is thus √ the superposition◦ of two A2 root systems which are scaled by a factor of 3 and rotated by 30 degrees relative to each other. 27 Note that in this case θ 6= −ε̄2 ; rather, we have ε22 = θ, and that θ is identical to the highest root of A2 . The Dynkin diagram of the hyperbolic algebra G++ is shown in fig. 8. We will 2 get this diagram if our simple roots satisfy 2 (α−1 , α−1 ) = (α0 , α0 ) = (α1 , α1 ) = 2 , (α2 , α2 ) = , 3 (4.31) (α−1 , α0 ) = −1 , (α0 , α1 ) = −1 , (α1 , α2 ) = −1 (4.32) and all others zero. The hyperbolic simple roots from (4.30) of G++ are 2  α−1 =     1 0  , 0 −1  0 1 α1 =    , 10  √ −1− 3i 2 −1 α0 =   −1+ 3i 2 0 α2 =   0 √ −1− 3i 2 √ −1+ 3i 2  √ 0    ,    . (4.33) (NOTE: This formula for α2 had a typographical error in the published version which is corrected above.) We label α2 as a short root, so a2 is not a unit. The finite Weyl group W (A2 ) is a subgroup of index 2 in W (G2 ). The same is true for their hyperbolic extensions: we have Proposition 7 The even Weyl group W + (G++ 2 ) is an index 2 extension of ++ W (A2 ), that is, + ++ W + (G++ 2 ) = W (A2 ) ⋊ 2 = P SL2 (E) ⋊ 2 . (4.34) Proof: Because θ 6= −ε̄2 we must proceed slightly differently than before. First we notice that   −ε̄2 0  S1 S2 =    ⇒ 0 −ε2  S1 S2 2   θ 0 =  0θ  (4.35) Since θ6 = 1 (as for A2 ), the set of matrices S0 , S1 and (S1 S2 )2 S1 coincides with the set (4.5) for A2 , hence these matrices generate the group P SL2 (E), again by Proposition 4. To get the full even Weyl group we must adjoin the matrix S2 obeying S22 = −11, generating a Z2 . The semi-directness of the product 28 a2 t θt t ❏ ✡ ❏ ✡ t ❏ ✡ ✡ t t ❏ ❨❍ ❏ ✡ ✟✟ ❍ ❍❍ ❏✡ ✟✟ ✟ ❍❍ ✟ ✡❏ ✟ t ✟ ✡ ❏ ❍❍t ❏ ✡ ✡ t ❏ ❏ ✡ ❏t ✡ t ✲t a1 Fig. 7. The root system of type G2 . The long and short roots are labeled and indicated by arrows. ✇ Fig. 8. G++ 2 −1 ✇ 0 ✇❅ ✇ 1 2 Dynkin diagram with numbering of nodes. will follow from the action S2 SS2−1 ∼ = S2 SS2 of the extending matrix S2 on S ∈ P SL2 (E), if the resulting matrix is in P SL2 (E) so that this action gives an automorphism of P SL2 (E). By expanding the product, commutativity and the fact that ε22 ∈ E the result follows. 5 Quaternions K = H Within the four-dimensional quaternion algebra one can find the root systems of types A4 , B4 , C4 , D4 and F4 . The associated hyperbolic rank 6 Kac–Moody ++ ++ ++ ++ algebras are now A++ 4 , B4 , C4 , D4 , and F4 , and we will give explicit descriptions of their even Weyl groups in terms of matrix groups below. 8 The quaternionic case is more subtle than the commutative cases because the criterion for selecting the matrix group to which the even Weyl group belongs cannot be so easily done via a determinant. Before turning to the issue of how to define determinants and matrix groups with quaternionic entries we first discuss different types of quaternionic integers and numbers required for exhibiting the root systems. 5.1 Hurwitz and Lipschitz integers The standard basis for H, {1, i, j, k}, has the famous products 8 A description of the finite root systems of types B4 , D4 and F4 , and their Weyl groups in terms of quaternions has been given in [29]. 29 i2 = j 2 = k 2 = −1, ij = −ji = k, jk = −kj = i, ki = −ik = j, (5.1) so an obvious subring of integers is formed by the Lipschitz integers L = {n0 + n1 i + n2 j + n3 k n0 , n1 , n2 , n3 ∈ Z} . (5.2) They form an order (a subring of the rational quaternions, HQ , finitely generated as a Z-module, containing a Q-basis of HQ ) but are not a maximal order in HQ since they are contained in the ring of Hurwitz integers  H = n0 + n1 i + n2 j + n3 k n0 , n1 , n2 , n3 ∈ Z or n0 , n1 , n2 , n3 ∈ Z + 1 2  , (5.3) which constitute a maximal order in HQ . We note that these two rings, L and H, are generated by the Lipschitz and Hurwitz units given below in (5.9) and (5.10), respectively, and as Z-modules, they are discrete lattices. Also note that the non-commutative ring H of Hurwitz integers satisfies the division with small remainder property required for the Euclidean algorithm (cf. Proposition 4), whereas the Lipschitz integers L do not [8]. For the determination of some of the even Weyl groups we rely on the following definition and lemma. Define C to be the two-sided ideal in the ring H generated by the commutators [a, b] = ab − ba for all a, b ∈ H . (5.4) To understand this we use the integral basis for H used in [30], 1 e0 = (1 + i + j + k), 2 i, j, k, (5.5) which has the nice property that an integral combination m0 e0 + m1 i + m2 j + m3 k is in L when m0 ∈ 2Z. It is easy to check the commutators [e0 , i] = j − k, [i, j] = 2k, [e0 , j] = k − i, [j, k] = 2i, [e0 , k] = i − j, [k, i] = 2j, (5.6) which are all purely imaginary Lipschitz integers. [H, H] is all integral linear combinations of the commutators above, but that is not even a subring of H, as we can see, for example, from the fact that (2i)(j − i) − 2k = 2 is not a commutator. The ideal C = H[H, H]H consists of finite sums of the form a[b, c]d for any a, b, c, d ∈ H, and it is enough to compute these for a and d from the above integral basis and [b, c] from (5.6). The only products we need to know 30 are e0 i = −e0 + i + j, ie0 = −e0 + i + k, e0 j = −e0 + j + k, je0 = −e0 + i + j, e0 e0 = −e0 + i + j + k. e0 k = −e0 + i + k, ke0 = −e0 + j + k, (5.7) Using these, it is clear that a[b, c]d is in L, and consists of all integral linear combinations of the elements ±1 ± i, ±1 ± j, ±1 ± k, ±i ± j, ±i ± k, ±j ± k, (5.8) which is clearly an index 2 integral lattice in L. Since L is an index 2 sublattice in H, we have that H/C is a ring of four elements, and we can take as coset representatives {0, −e0 , (−e0 )2 = e0 − 1, (−e0 )3 = 1} which form the field F4 of order 4 whose nonzero elements form the cyclic group of order 3. Also note that there are no units in C since its nonzero elements have minimal length 2. Lemma 1 Let a1 , . . . , an ∈ H be any n Hurwitz numbers. Then the product a1 · · · an is commutative modulo C. Proof: Since the quotient ring H/C is a field, where the product is commutative, the projection of the product a1 · · · an is equal to the projection of aσ(1) · · · aσ(n) for any permutation σ of {1, . . . , n}.  5.2 Quaternionic units and rings For the root lattices of A4 , B4 , C4 and F4 (but not D4 ) we also need quaternionic units which are neither Lipschitz nor Hurwitz numbers. These other units parametrize finite subgroups of SU(2), and are, respectively, related to the octahedral (for B4 , C4 and F4 ) and icosahedral (for A4 ) groups, as explained e.g. in [8]. Using diagonal and off-diagonal (2 × 2) matrices of such units (or alternatively pairs of units [8], cf. footnote 7 in Section 3.3) we can then reconstruct the Weyl groups of all the finite simple rank 4 algebras, as we shall explain below. Besides the eight Lipschitz units EL = {±1, ±i, ±j, ±k} (5.9) which form the quaternionic group, often denoted by Q8 , we have the 24 Hurwitz units 1 EH = ±1 , ±i , ±j , ±k , (±1 ± i ± j ± k) 2  31  (5.10) which form a subgroup in the unit quaternions. According to [7], p. 55, EH ∼ = 2 · A4 is an index two extension of the alternating group on four letters. It can also be seen that EH ∼ = EL ⋊ Z3 is a semi-direct product of the group of Lipschitz units with a cyclic group of order 3 related to triality and explained below in Section 5.4. Any quaternion z = n0 + n1 i + n2 j + n3 k is a root of the real polynomial pz (t) = (t − z)(t − z̄) = t2 − 2n0 t + (n20 + n21 + n22 + n23 ) (5.11) whose coefficients will be integers if z is in L or H, and in that case, unless z ∈ Z, this is the minimal polynomial satisfied by z ∈ H. We will also need the following set of 24 octahedral units ( ±1 ± i ±1 ± j ±1 ± k ±i ± j ±i ± k ±j ± k √ , √ , √ , √ , √ , √ 2 2 2 2 2 2 ) (5.12) which do not form a group by themselves, but the product of any two of them is a Hurwitz unit, and the product of any Hurwitz unit and an octahedral unit is an octahedral unit, so their union forms a group of order 48 which we call the octahedral subgroup, ER . We can write it as the disjoint union of two cosets of its normal subgroup, EH , ER ≡ EH ∪ iO · EH j−k where iO ≡ √ . 2 (5.13) These are, in fact, all the units in the ring, R, generated by integral linear combinations of units in ER . Contrary to the Lipschitz and Hurwitz numbers, the ring R is not discrete but dense in H√(using the usual topology). Nevertheless R is an order of HF (with F = Q( 2)) as defined in Section 2.1, since it is finitely generated by√its 48 units over Z. It is not hard to show that it is generated over S = Z[ 2] just by the four elements, {a, b, ab, ba}, where √ and b = 1+j √ . Note also that the integral span of the coset of ‘purely a = 1+i 2 2 octahedral numbers’ iO · H constitutes a lattice in H which can be regarded as a ‘rotated’ version of the lattice H (but which, unlike H, is not closed under multiplication). 9 Finally, we have 96 icosian units [7], p. 207, defined in terms of 9 In fact, we will only encounter matrices S whose entries belong either to H (and have minimal polynomial of degree two) or to iO H (and have minimal polynomial of degree four). This will be distributed over the matrix in such a way that this structure is preserved under multiplication. 32 √ √ 1 1 τ = (1 + 5) and σ = (1 − 5) , 2 2 (5.14) to be all elements obtained from the following eight basic elements  1 ± i ± σj ± τ k 2 (5.15) by the 12 even permutations of the Lipschitz units (1, i, j, k). Together with the 24 Hurwitz units they form the icosian subgroup EI , which are the 120 units in the ring I defined to be their integral span. According to [7], the structure of the icosian group EI ∼ = 2 · A5 is an index two extension√ of the alternating group on five letters. I is an order of HF where F = Q( 5). As in the order R, the ring I is dense in H, but it is finitely generated over the integers by its 120 units. In fact, it is generated over S = Z(τ ) by the four elements i, j, 1 ω = (−1 + i + j + k) , 2 1 iI = (i + σj + τ k) . 2 (5.16) It is straightforward to check that all their products can be expressed as linear combinations of those four elements with coefficients from S, for example: i2 = −1 = −(σ + 1)i − (σ + 2)j + 2ω + 2σiI , (5.17) jiI = −2σi − (2σ + 1)j + σω + (2σ + 1)iI , ωiI = ω − i − k iI ω = −i − (σ + 1)j + ω + σiI , iI j = −i − σj + σω + iI . These can be used to compute the commutators of pairs of generators, e.g. [i, iI ] = −τ j + σk, [i, j] = 2k, (5.18) If we try to imitate what we did for the Hurwitz integers, and let CI = I[I, I]I be the ideal of I generated by the commutators [I, I], we find that CI = I is the whole icosian ring. This follows since the two elements in (5.18) have norms 2 and 3, respectively, so that the difference of their norms is 1 and hence 1 ∈ CI . This means that the quotient ring, I/CI is trivial, not a field as was H/C, and we do not have an analog of Lemma 1 for I. Even though most rank four root systems contain units from one of the dense rings R or I we will explain how one can nevertheless construct discrete matrix groups from them which are related to the even Weyl groups. 33 5.3 Quaternionic determinants Useful introductory references for quaternionic determinants are [15,1]. When K = H, the matrices in (3.16) are (2 × 2) matrices over the quaternions, that is, matrices of the form   a b S= cd with a, b, c, d ∈ H .  (5.19) To describe the hyperbolic Weyl groups, we will only need to take these entries from the rings introduced above, but the following observations apply to all quaternionic matrices. If one tries to define the determinant of the quaternionic matrix S to be ad − bc, the non-commutativity of H spoils the usual multiplication law for determinants (see [1]). A quantity which does have good properties for K = H is obtained by observing that the determinant is well defined for Hermitian quaternionic matrices (for which a and d are real, and b = c̄). Given any quaternionic matrix S, we therefore associate with it the Hermitian matrix SS † which has a well-defined determinant given by det(SS † ) = det(S † S). 10 The multiplication law is then obeyed provided that       det (S1 S2 ) · (S2† S1† ) = det S1 S1† det S2 S2† . (5.20) This relation (which is obviously satisfied for K = R, C) can be verified for K = H by direct calculation (however, it will fail for K = O because of nonassociativity). Any quaternionic matrix S satisfying det(SS † ) 6= 0 has left and right inverses given by  S †S −1  S † = S † SS † −1 . (5.21) Here, (SS † )−1 denotes the well-defined inverse of a Hermitian matrix. That the two expressions can be shown by explicit computation. 11 Hence,   coincide † the condition det SS = 1 for (2 × 2) matrices with quaternionic entries indeed defines a continuous group which we denote by    10  a SL2 (H) := S =    b cd       a, b, c, d ∈ H , det SS † = 1 .  (5.22) These expressions also make sense for K = O but in general are no longer equal. For K = O, the two expressions in (5.21) are generally different because of nonassociativity. 11 34 Writing 11 for the (2×2) identity matrix, the subgroup {±11} is normal and we define P SL2 (H) = SL2 (H)/{±11} to be the quotient group. We write elements in the quotient as matrices S but we identify S with −S. 12 This group has real dimension 15 = 4 · 4 − 1, and is known to be isomorphic to the Lorentz group in six dimensions [41,2], i.e. P SL2 (H) ∼ = P SO(1, 5; R) . (5.23) We will soon see that the even Weyl groups of all rank six Kac–Moody algebras under consideration are discrete subgroups of P SL2 (H). The easiest of these discrete groups to describe is P SL2 (H), which is obtained from P SL2 (H) by restricting all matrix entries to be Hurwitz integers. We will also need its subgroup (0)   a P SL2 (H) := S =   b cd  ∈ P SL2 (H) ad − bc ≡ 1(mod C)  (5.24) which can be understood in the following way. The composition of the group homomorphism P SL2 (H) → P SL2 (H/C) (5.25) with the usual determinant of a (2 × 2) matrix over the field H/C ∼ = F4 , yields a group homomorphism Det : P SL2 (H) → F∗4 (5.26) onto F∗4 ∼ = Z3 the cyclic group of order 3. 13 Since this composition is a group homomorphism, we have Det (S1 S2 ) = Det S1 · Det S2 . Its kernel is a normal subgroup of index 3 in P SL2 (H), giving an alternative form of (5.24) as (0) o n P SL2 (H) = S ∈ P SL2 (H) Det S = 1 . (5.27) Since L = C ∪ (1 + C) is the coset decomposition of L, the condition ad − bc ≡ 1(mod C) says that ad − bc ∈ (1 + C) ⊂ L and Lemma 1 says that the order of the products in the expression ad − bc does not matter. Since ad − bc ∈ / C, the (0) condition for S ∈ P SL2 (H) is just ad − bc ∈ L. We have proved the following. 12 In fact, if S ∈ SL2 (H) then so is εS for any unit ε. Because of non-commutativity, only ε = ±1 are in the center and quotiented out. 13 This ‘determinant’ is different from the Dieudonné determinant [1]. 35 (0) Lemma 2 P SL2 (H) is index 3 in P SL2 (H), and (0) P SL2 (H)/P SL2 (H) = A3 (5.28) where A3 ∼ = Z3 is the alternating group on three letters. (0) The modular group P SL2 (H) contains the modular group P SL2 (L), but is strictly larger, so that we arrive at the following chain of subgroup relations (0) P SL2 (L) ⊂ P SL2 (H) ⊂ P SL2 (H) . (5.29) The map Det extends to the ring of all (2 × 2) Hurwitz matrices, first reducing entries modulo C, and then taking the usual determinant. It is still a multiplicative map so that the invertible matrices have non-zero Det. But it is possible for a ‘non-invertible’ matrix in that ring to also have a non-zero Det. For example, the diagonal matrix diag(1, 3) does not have an inverse over the Hurwitz integers, but since 2 ∈ C, it reduces to the identity matrix modulo C, whose usual determinant is 1 + C ∈ F∗4 . (0) Proposition 8 The modular group P SL2 (H) is generated by the matrices   1 1  01  ,   0 1  10  ,   a 0  0b  , (5.30) where a, b ∈ EH are Hurwitz units and ab ≡ 1(mod C). Proof: This claim can be proved by adapting Theorem 2.2 on page 16 of [30], and arguments very similar to those of Proposition 4. According to Krieg’s theorem, the set of all uni-modular (= invertible) (2×2) Hurwitz quaternionic matrices, here denoted by SL2 (H) ⊂ SL2 (H) in accordance with definition (5.22) (but designated as GL2 (H) in [30]) is generated by taking products of the matrices in (5.30) without any restriction on the product ab, so that a, b run through all Hurwitz units. This is also true for the quotient P SL2 (H). So we can write any element S ∈ P SL2 (H) as S = G1 · · · Gn (5.31) where each Gi , i = 1, . . . , n, is one of the three types of generating matrices in (5.30), but with no restriction on the product ab for the third type in accordance with Krieg’s theorem. We will show that we can rewrite S in the form 36   c 0 ′ ′ S=   G1 · · · Gn ′ , 01 (5.32) where c ∈ H and all G′i matrices are from (5.30) with the third type satisfying the ab ≡ 1(mod C) condition. In order to arrive at this new presentation we show explicitly how to convert the presentation (5.31) to one of the form (5.32), and how the element c represents Det(S). Examine the matrices in the expression G1 · · · Gn from the right to the left. We don’t need to change a matrix of the first or second kind from (5.30), nor do we change one of the third kind if it satisfies the ab ≡ 1(mod C) condition. Let i0 be the largest index for which Gi0 = diag(ai0 , bi0 ) with ai0 bi0 6≡ 1(mod C). Then we can factorize it as    ai0 0   0 bi0      ε̄ 0   εai0 0  = 01  0 bi0 (5.33)  where the unit ε ∈ EH \ EL is chosen such that εai0 bi0 = 1 ∈ L. We will show below how the new matrix diag(ε̄, 1) can be moved to the left by passing through the other generators Gi with i < i0 , and leaving only acceptable generators on its right. We first note that from (5.30) (with the restriction on the product) we can generate all translation matrices   1 a  01  , for a ∈ H . (5.34) For a ∈ {±i, ±j, ±k} we have  a     0   1 1   −a 0  01  01  0 1   1 =  a 01 (5.35)  and a ≡ 1 (mod C) so each matrix on the left side is from (5.30). Products of these provide all translation matrices (5.34) with a ∈ L. To extend this to all a ∈ H it is sufficient to find one translation matrix with a ∈ H \ L. The computation in (4.8) where θ = 12 (1 − i − j − k) satisfies θ2 = −θ̄ = 1 (−1 − i − j − k), yields this, so that we indeed obtain all matrices (5.34) 2 from (5.30). From this and 37       01 ε  ε̄  1 1   ε̄ 0  =   0 01 01 1  01 (5.36)  we see that we can pass the matrix diag(ε̄, 1) across a matrix Gi of the first kind in (5.30) by replacing Gi by a translation matrix which is a product of the allowed generators. Similarly we have     0 1   ε̄ 0   10  01       ε̄ 0   ε 0   0 1  = 01  0 ε̄  10  , (5.37) so that we can also pass through the second type of generating matrices by replacing it by a product of allowed matrices. Finally, for any units a, b ∈ H, we can also write  a    0   ε̄ 0  0b  01    aε̄b =   0   b̄ 0  0 1  0b  , (5.38) so the matrix on the far right is an allowed generator, but the matrix being moved to the left has been changed to another of the form diag(c, 1) with c = aε̄b ∈ H a unit. Using (5.36)–(5.38), for some unit c ∈ H, we finally arrive at the expression   c 0 S= 01 ′ ′  G1 · · · Gn ′ (5.39) with all G′i belonging to the list of generating matrices (5.30) and those of the third kind have ab ≡ 1(mod C), so all Det(G′i ) = 1 ∈ F∗4 . Then Det(S) = Det(diag(c, 1))Det(G′1 ) · · · Det(G′n′ ) = c + C ∈ H/C = F4 . If we assume that (0) S ∈ P SL2 (H), so Det(S) = 1, then we must have c ≡ 1(mod C) so that diag(c, 1) is an allowed generator from (5.30) and the proof is complete.  We close this section by counting the number of diagonal matrices diag(a, b) such that a, b ∈ H are units and ab ∈ L. There are 64 = 8 × 8 such matrices when both a, b ∈ L. If a ∈ H\L is one of the 16 pure Hurwitz units there are 8 choices for b such that ab ∈ L, which gives 128 = 16 × 8 such matrices. Descending to the quotient by {11, −11} we are left with 96 = 12 × 192 diagonal 38 (0) matrices in P SL2 (H). The full P SL2 (H) has 288 = matrices. This gives another way to see Lemma 2. 1 2 × 24 × 24 diagonal 5.4 Even Weyl group W + (D4++ ) We first study the Weyl group of the rank 6 hyperbolic algebra D4++ . Among the Weyl groups associated to the rank 6 algebras, this is the ‘easiest’ to understand because it is the only one whose root system can be expressed solely in terms of Hurwitz numbers. As we will see, the Weyl groups in all the other cases, except for A++ 4 , are finite extensions of this one. In the lattice H equipped with the inner product (2.1), we can recognize that EH forms the D4 root system, and among these we choose as simple roots ε1 = a1 = 1 , ε3 = a3 =  1 −1+i−j−k , 2  1 ε4 = a4 = −1−i−j+k . 2 ε2 = a2 =  1 −1−i+j −k , 2 (5.40) We can choose ai = εi for all i because D4 is simply laced. This system of simple roots exhibits S3 ‘triality’ symmetry as outer automorphisms, that is, it is symmetric under cyclic permutation of the three imaginary units (i, j, k), and under the exchange of any two imaginary units, e.g. (j ↔ k). The former is concretely realized by the map z 7→ θz θ̄, whereas the latter corresponds to z 7→ iO z̄ı̄O . Here, θ is the highest D4 root θ = 2a1 + a2 + a3 + a4 =  1 1 − i − j − k = jε2 = kε3 = iε4 2 (5.41) and iO is the specific octahedral unit of order four defined in (5.13). The 16 units in EH \ EL are of order three or six, viz. ε32 = ε33 = ε34 = 1 , θ6 = 1 . (5.42) With these choices we build the simple roots (2.9) of the hyperbolic algebra D4++ in its root lattice Λ(Q) where Q = H is the D4 root lattice. The corresponding Dynkin diagram of D4++ , the hyperbolic over-extension of the D4 Dynkin diagram, is depicted in fig. 9. Recall that the Weyl group of D4 is W (D4 ) = 23 ⋊ S4 . Our central result is (0) Proposition 9 W + (D4++ ) ∼ = P SL2 (H). 39 ✇ ✇ ✇ −1 2 ✇ 0 ✇ 1 3 ✇ 4 Fig. 9. Dynkin diagram of D4++ with numbering of nodes. Proof: Substituting (5.40) into the expressions of the generating matrices Si , 0 ≤ i ≤ 4, given in (3.14), one sees that all these matrices have det(Si Si† ) = 1 (0) and Det(Si ) = 1 so they belong to P SL2 (H) ⊂ P SL2 (H) as defined in (5.24). (0) Therefore, we get W + (D4++ ) ⊂ P SL2 (H). To prove the converse we show that all the generating matrices of Proposition 8 are in W + (D4++ ). To do this we compute    εi 0  Si S1−1 =   0 ε̄i   i 0 S2 S3 =  0j for i = 2, 3, 4 ,     j 0 , S3 S4 =  0k    k 0 , S4 S2 =  0 i  . (5.43) It is straightforward to see that by further multiplication and permutation we can obtain from these matrices and S1 any matrix of the form   a 0  0b  and   0 a  b0 (5.44)  where (a, b) is any pair of Hurwitz units whose product is a Lipschitz unit, i.e. N(a) = N(b) = 1 and ab ≡ 1 (mod C). We note that up to (a, b) ∼ = (−a, −b) there are 96 pairs with this property so that there are 96 matrices of each type in (5.44) in P SL2 (H) corresponding to the even and odd part of the finite Weyl group W (D4 ) of order 192. Given the matrices (5.44) we can also reconstruct the translation matrix from S0 (using θ3 = −1) and         2  0 θ   0 θ   −θ 0   1 −1   2 · · =  . 0 θ θ 0 −θ 1 0 1 (5.45) The translation matrix is the inverse of this, giving the last of the required generators (5.30).  40 (0) The appearance of the group P SL2 (H) for D4++ (rather than P SL2 (H)) may be viewed as a manifestation of the triality symmetry of the D4 Dynkin diagram. Since the even cyclic permutation of (i, j, k) is realized by conjugation by the Hurwitz unit θ, the associated diagonal matrix diag(θ, θ) ∈ P SL2 (H) solves the necessary conditions (3.27), but itself is not part of the Weyl group, and therefore has to be removed from P SL2 (H). This is what the DetS = 1 (0) condition achieves, and since θ3 = −1 we find that the subgroup P SL2 (H) is index three in P SL2 (H), in accordance with Lemma 2. In this way, the group of (even) outer automorphism of D4 can also be realized by matrix conjugation. For later reference we denote the alternative generating set of the group (0) P SL2 (H) furnished by the even D4++ Weyl group by gi = SiD4 for i = 0, . . . , 4 . (5.46) An alternative argument leading to the statement of the proposition can be based on the fact that every Hermitian matrix X ∈ Λ(D4 ) obeying det X = −1 is a real root, 14 and that the (full) Weyl group acts transitively on the set of real roots. In the case of D4++ they form a single Weyl orbit, since the Dynkin diagram has only single lines. This implies that we can generate all real roots from the hyperbolic simple root α−1 by acting with the full Weyl group, viz. n   1 0  o ∆re = X ∈ Λ(D4 ) | det X = −1 = W ·  0 −1  . (5.47) In particular, considering all even Weyl images of the form s(α−1 ) = Sα−1 S † , and using the fact that Weyl transformations preserve the norm, we get −1 = det(α−1 ) = det(Sα−1 S † ) = − det(SS † ) (5.48) where the third equality can be verified by direct computation for the quaternions. This is the same condition as (5.22). Conversely, to any S ∈ P SL2 (H) satisfying (5.22) we can associate the real root Sα−1 S † , whence S becomes associated to some symmetry of Λ(D4 ). This seems to give all of P SL2 (H) but the reasoning does not distinguish between inner and outer transformations. As argued above, taking the outer (diagram) automorphisms into account is the same as demanding the extra condition (5.24). 14 It is here that the hyperbolicity of the Kac–Moody algebra is essential; this statement is no longer true if the indefinite Kac–Moody algebra is not hyperbolic. 41 ✇ ✇ −1 ✇ 2 ✇❅ ✇ ✇ 0 1 3 4 Fig. 10. Dynkin diagram of B4++ with numbering of nodes. 5.5 Even Weyl group W + (B4++ ) The B4 root lattice is isomorphic to the hypercubic lattice of the Lipschitz integers (in the same way that B2 was associated with the cubic lattice of Gaussian integers). The simple roots can be chosen as follows  1 −1+i−j−k , ε2 = a2 = 2 √ −j + k ε4 = 2a4 = √ . (5.49) 2 ε1 = a1 = 1 , ε3 = a3 =  1 −1−i+j−k , 2 The highest (long) root is θ = a2 + 2a1 + 2a3 + 2a4 =  1 1−i−j−k . 2 (5.50) Hence, a4 is the short simple root, while the other (long) roots, including the highest root θ, are normalized to unity. These simple roots were chosen to be close to the D4 simple roots: a1 , a2 and a3 agree and only a4 is changed; the highest roots agree. This somewhat obscures the fact that the B4 lattice is a scaled and rotated version of the lattice of Lipschitz numbers but makes the determination of the Weyl group simpler. The finite Weyl group is W (B4 ) = 24 ⋊ S4 , and is concretely realized via permutations and reflections of the four basis elements 1, i, j, k. Observe also that the above set of simple roots is not invariant under cyclic (triality) transformations of the three imaginary units, as was to be expected. The hyperbolic extension B4++ can be obtained by following the procedure described before and leads to the Dynkin diagram of fig. 10. Turning to its even hyperbolic Weyl group W + (B4++ ) we notice that among the generators Si ∈ P SL2 (H) (for i = 0, . . . , 4) the first four are identical to those of W + (D4++ ). By explicit computation one finds furthermore that  S4 S3 S4 =   0 1 (−1 2 + i + j − k) 1 (1 2  + i + j − k)  0 42  = g4 , (5.51) (0) where g4 was defined in (5.46) in the alternative generating set of P SL2 (H). (0) This shows that W + (B4++ ) has a subgroup isomorphic to P SL2 (H) generated by S0 , S1 , S2 , S3 and S4 S3 S4 . Adjoining to these the element S4 which satisfies (0) S42 = −11 ∼ = 11 gives an extension in which P SL2 (H) is a normal subgroup of index 2, and we arrive at Proposition 10 W + (B4++ ) ∼ = P SL2 (H) ⋊ 2. (0) (0) The semi-directness follows from expanding the action S4 SS4−1 for S ∈ P SL2 (H) and using the properties of√ε4 . As the index 2 extension is realized via the matrix S4 which contains 1/ 2 in all entries we see that W + (B4++ ) consists of all matrices (5.19) in P SL2 (H) such that either all a, b, c, d are Hurwitz numbers, or all are pure octahedral numbers ∈ iO · H (it is easy to see that this property is preserved under matrix multiplication because iO H · H = iO H and iO H · iO H = H). This is the ‘trick’ by which the discreteness of the matrix group is achieved despite the fact that R is dense in H. To conclude the analysis of B4++ we relate our results, restricted to the finite Weyl group W + (B4 ), to the classification of [8] (see their Table 4.2) where W + (B4 ) is denoted by ± 61 [O×O]. It is not hard to check that all the generating elements given in [8] can be obtained from products of matrices of the type (3.22) when the B4 units (5.49) are plugged in. 5.6 Even Weyl group W + (C4++ ) For C4 the direction of the arrow in the finite Dynkin diagram is reversed compared to B4 . A convenient choice of simple roots requires again quaternions which are not Hurwitz. In order to facilitate the comparison with D4 we choose the first three simple roots of C4 to coincide with the simple roots a3 , a1 , a4 of D4 up to a re-scaling required to maintain the unit normalization of the highest root θ. Thus ε1 = √ 2a1 = 1 , ε3 = √ 2a3 =  1 −1−i+j−k , 2 √  1 −1+i−j−k 2 −j + k ε4 = a4 = √ (5.52) 2 ε2 = 2a2 = with the (long) highest root θ = 2a1 + 2a2 + 2a3 + a4 = −j − k √ , 2 43 (5.53) ✇❅ ✇ ✇ −1 0 2 ✇ ✇ 1 3 ❅ ✇ 4 Fig. 11. Dynkin diagram of C4++ with numbering of nodes. For the determination of the Weyl group we again choose a convenient basis. The hyperbolic extension C4++ has Dynkin diagram given in fig. 11. Although the B4 and C4 Weyl groups are isomorphic (cf. table 1), the Weyl groups of C4++ and B4++ are nevertheless different. This difference in our basis is reflected only in the difference between the highest roots; for C4 we have an octahedral unit of order four whereas for B4 the highest root was a Hurwitz number of order six. Proceeding as for W + (B4++ ) we first observe that all Si for i = 1, . . . , 4 are identical to those of B4++ (since the finite Weyl groups are isomorphic), and hence again  S4 S3 S4 =   1 (1 2 0 1 (−1 2 + i + j − k)  + i + j − k)  0  = g4 (5.54) in terms of (5.46). Therefore we obtain all diagonal and off-diagonal matrices (5.44) reflecting the fact that the finite Weyl groups of B4 and C4 are isomorphic. Using the C4 highest root (5.53) we now define  θ g̃i =    θ̄  gi  0 01   0 01  for i = 1, 2, 3, 4 , (5.55) (0) which is a unitary transformation of all the generators of P SL2 (H) defined in (5.46) except for g0 . The matrices g̃i (i = 1, 2, 3, 4) also belong to W + (C4++ ) since θaθ̄b ≡ ab (mod C). Furthermore, since      θ 0   1 1   θ̄ 0   01  01  01    1 θ = 01  . (5.56) we also have the unitarily transformed translation matrix. From this we conclude that the group generated by S0 , S1 , S2 , and S3 and S4 S3 S4 consists of matrices of the type 44      θ 0   a b   θ̄ 0   01  cd  01    a b (0) for    ∈ P SL2 (H) . cd (5.57) (0) (0) ] We denote this transformed (or ‘twisted’) P SL2 (H) by P SL2 (H). In order ++ + to describe the full W (C4 ) we still need to adjoin the matrix S4 which still satisfies S42 = −11 ∼ = 11 so that we find (0) ] Proposition 11 W + (C4++ ) ∼ SL2 (H) ⋊ 2 . =P The semi-directness of the product can be verified by expanding the action of (0) (0) ] ] SL2 (H). S4 on P SL2 (H) which can be seen to give an automorphism of P (0) (0) ] Although P SL2 (H) ∼ = P SL2 (H), it must be stressed that the Weyl groups of C4++ and B4++ are nevertheless different, since for C4++ the extension S4 matrix is not unitarily transformed, so that the group extension is different. 15 The P SL2 (H) matrices (5.19) belonging to W + (C4++ ) can be described by saying that either a, d ∈ H and b, c ∈ iO ·H, or conversely a, d ∈ iO ·H and b, c ∈ H. Again, one can easily verify that this structure is preserved under multiplication. Since the finite Weyl group satisfies W (C4) ∼ = W (B4 ), the relation to the 1 chiral group ± 6 [O × O] of the classification in [8] holds analogously to the last section. 5.7 Even Weyl group W + (F4++ ) The root system of F4 consists of two copies of the D4 system, one of which is rescaled. There are two short simple roots and two long simple roots. We choose the simple roots as follows ε1 = a1 = 1 , √ −i + j ε3 = 2a3 = √ , 2  1 ε2 = a2 = −1+i−j−k , 2 √ −j + k ε4 = 2a4 = √ ; (5.58) 2 the highest (long) root is θ = 2a1 + 3a2 + 4a3 + 2a4 =  1 1−i−j−k . 2 (5.59) This is similar to the affine Weyl groups W + (B4+ ) and W + (C4+ ) although both are semi-direct products of isomorphic finite groups with abelian groups of the same rank. However, the automorphism involved in the definition of the semi-direct product is different. 15 45 ✇ −1 ✇ 0 ✇❅ ✇ ✇ 1 2 ✇ 3 4 Fig. 12. Dynkin diagram of F4++ with numbering of nodes. The hyperbolic extension F4++ has the Dynkin diagram shown in fig. 12. (0) The even Weyl group W + (F4++ ) can be related to P SL2 (H) in the following way: The generators g0 , g1 and g2 are identical to S0 , S1 and S2 constructed from the F4 simple roots (5.58). Now consider  S3 S2 S3 =   1 (−1 2 0 1 (1 2 − i + j − k)  − i + j − k)   0 ≡ g3 (5.60) and  S4 S3 S2 S3 S4 =   0 1 (1 2 1 (−1 2 − i − j + k)  − i − j + k)  0  ≡ g4 , (5.61) (0) in terms of (5.46), so that we find all P SL2 (H) generators in W + (F4++ ). (0) Adjoining to P SL2 (H) the generators S3 and S4 one obtains all of W + (F4++ ). Since S3 and S4 together generate the symmetric group on three letters we arrive at (0) Proposition 12 W + (F4++ ) ∼ = P SL2 (H) ⋊ S3 ∼ = P SL2 (H) ⋊ 2. The last equality follows because the (diagonal) entries of S3 S4 are pure Hurwitz units, and both of order three, generating the cyclic group Z3 which (0) extends P SL2 (H) to P SL2 (H). The semi-directness of the product can be verified explicitly by using the properties of ε3 and ε4 . The finite Weyl group W + (F4 ) is now the chiral group ± 21 [O × O] in the classification of [8]. Again it is not hard to see that the units (5.58) give rise to the generating elements given there. 46 4 ✇ −1 ✇ 0 ✇ ❅ ❅ ❅ ✇ ✇ ❅ ❅✇ 1 2 3 Fig. 13. Dynkin diagram of A++ with numbering of nodes. 4 5.8 Even Weyl group W + (A++ 4 ) We discuss the algebra A++ last, because, somewhat surprisingly, it is the 4 most cumbersome to describe in the present framework among the rank 6 algebras. In order to embed its root system into the quaternions one needs to make use of the icosians I introduced at the end of Section 5.2. The algebra is simply laced, and we choose the following four units A++ 4 1 ε2 = a2 = (−1 + i − j − k) , 2 1 ε4 = a4 = (i + σj + τ k) , 2 ε1 = a1 = 1 , ε3 = a3 = −i , (5.62) which have inner products corresponding to the A4 Cartan matrix. The highest root is 1 θ = a1 + a2 + a3 + a4 = (1 − τ j − σk) . 2 (5.63) The Dynkin diagram of A++ is displayed in fig. 13. 4 As a first step we identify the finite Weyl group W (A4 ) of order 120 in terms of diagonal and off-diagonal matrices. The diagonal matrices can be generated from diag (εi , ε̄i ) for i = 2, 3, 4 and, modulo −11, one obtains all 60 even elements of W (A4 ) in this way. This shows that the root system of A4 is not multiplicatively closed. Closer inspection reveals that the diagonal and off-diagonal matrices are of the form   a 0   0 a∗  and    0 a  , −a∗ 0 (5.64) where a∗ = a′0 − a′1 i − a′3 j − a′2 k for a = a0 + a1 i + a2 j + a3 k 47 (5.65) √ √ with (p + 5q)′ := p − 5q for p, q ∈ Q. For icosians the conjugation in √ 5 amounts to interchanging τ and σ everywhere. The operation (5.65) is an involutive automorphism of the ring I of icosians and satisfies in particular √ (ab)∗ = a∗ b∗ . The automorphism is outer due to the ‘conjugation’ in 5; however, the exchange of j and k together with the complex conjugation alone is an inner automorphism of the quaternion algebra H, and is explicitly realized by conjugation with the octahedral unit iO from (5.13). Since there are 120 icosian units there are 60 matrices of either type in (5.64) after quotienting out by {11, −11} in agreement with the order of the Weyl group W (A4 ) ∼ = S5 . Moreover, the A4 root lattice is defined by the condition QA4 = {z ∈ I z ∗ = z̄} . (5.66) Because conjugation reverses the order of factors but the ∗-automorphism does not, we see from (5.66) again that QA4 is not multiplicatively closed and therefore does not form a subring of I. QA4 is closed under complex conjugation. 16 The action of the even finite Weyl group on z ∈ QA4 is computed to be z 7→ azā∗ , which manifestly preserves the root lattice. The full W + (A++ 4 ) is obtained by adjoining to (5.64) the matrix  1   θ 01 (5.67)  and the result is (0) ∼ Proposition 13 W + (A++ 4 ) = P SL2 (I). (0) Here, P SL2 (I) is defined as the discrete subgroup of P SL2 (I) satisfying the conditions (3.27) with the four units ai from (5.62); the (0)-superscript indicates that additionally the Z2 outer automorphism of the A4 Dynkin diagram has to be removed. This outer automorphism acts concretely as z 7→ −z on z ∈ QA4 and the corresponding matrix is diag(1, −1) which has to be quotiented out. The explicit result of solving the conditions (3.27) and taking the quotient for diagonal and off-diagonal matrices leaves the ones listed in (5.64). For the general matrices S it leaves in particular the matrix (5.67). 1 ¯ The finite Weyl group W + (A4 ) in terms of the classification of [8] is + 60 [I × I] and again we see that there the generators given there can be reproduced from the icosian units (5.62). 16 The fixed point set of ∗ on the set of icosian units is {1}. 48 (0) One might hope to give a more natural description of P SL2 (I) as the kernel (0) of a group homomorphism analogous to Det used to define P SL2 (H), but since the ideal CI generated by the commutators in I is not proper, this idea fails. 5.9 Icosians and E8 Using icosians it is also possible to give an embedding of the E8 root system into H at the cost of introducing a new inner product. This inner product is defined by (a, b)τ := x , if (a, b) = ab̄ + bā = x + τ y (5.68) for a, b, x, y being rational quaternions. The E8 simple roots are then given by (see e.g. [35]) 1 a1 = (−σ − τ i − k) , 2 1 a3 = (+i − σj − τ k) , 2 1 a5 = (+τ i + j − τ 2 k) , 2 1 a7 = (+1 − τ 2 i − τ k) , 2 1 a2 = (−σi − τ j + k) , 2 1 a4 = (−τ i + j + τ 2 k) , 2 1 a6 = (+i − τ 2 j + τ k) , 2 1 a8 = (−i − σj + τ k) . 2 (5.69) Note that τ 2 = τ + 1. Here, a4 , a5 , a6 and a7 belong to τ I constituting the second half of the 240 E8 roots. The subspace spanned by integer linear combinations of the basis vectors (5.69) is dense in H (as one would expect, since we are projecting an 8-dimensional lattice onto a 4-dimensional hyperplane in such a way that distincts points remain distinct), and the same is, of course, true for the ring generated by the above elements in H. In the following section we will present and discuss an octonionic realization of the E8 root system, and we will see that the non-associativity leads to drastic changes in the matrix realization of the Weyl group. For this reason, one might have hoped to be able to avoid problems with non-associativity by working with the above quaternionic realization, but unfortunately the difficulties remain, mainly due to the modified inner product (5.68). Namely, the projection orthogonal to τ , which enters (5.68), invalidates our Theorem 1, and we therefore cannot use the above representation to find a matrix representation of the E8 Weyl group. For this reason we do not pursue this quaternionic realization of E8 further in this paper. 49 6 Octonions K = O In this section we turn to the non-associative octonions and their relation to hyperbolic algebras of maximal rank 10. We restrict our attention mostly to the case E8++ ≡ E10 and exhibit in this case the kind of new complications arising due to the non-associativity of O. For the other two hyperbolic overextended algebras B8++ and D8++ we content ourselves with briefly presenting the octonionic realizations of their root lattices and stating their relation to that of E10 . 6.1 Octavians and the E8 lattice We use the octonionic multiplication conventions of Coxeter [9]. Hence, the seven imaginary units ei appearing in the expansion of an octonion z via (e0 = 1) z = n0 + 7 X ni ei (6.1) i=1 multiply (in quaternionic subalgebras) according to ei ei+1 ei+3 = −1 , (6.2) where the indices are to be taken modulo seven and the relation is totally antisymmetric. The multiplication table for the octonions can be neatly summarized by using the Fano plane, as shown in Fig. 14. The following notation for the structure constants of the imaginary units can also be used ei ej = −δij + fijk ek (6.3) where we adopt the usual summation convention from now on. The structure constants fijk are totally antisymmetric, and satisfy (see e.g. [13] where many further identities involving these structure constants can be found) 1 fijk f kmn = 2δijmn − ǫij mnrst frst , 6 (6.4) with δijmn := 21 δim δjn − 12 δin δjm . We introduce a few concepts which are useful for studying the E8 and E8++ Weyl groups. The associator of octonions is defined by 50 1 1 0 0 1 11 00 4 00 11 00 11 11 00 6 00 11 00 11 7 1 0 0 1 0 1 1 0 0 1 3 0 21 1 0 05 1 Fig. 14. The Fano plane illustrating associative triples and octonionic multiplication. [a, b, c] = a(bc) − (ab)c (6.5) and is totally antisymmetric in a, b, c by virtue of the alternativity of O. Put differently, any subalgebra generated by two elements is associative. In components it reads [a, b, c] = [a, b, c]i ei 1 with [a, b, c]i = − ǫi jklrstaj bk cl frst . 3 (6.6) The Jacobi identity gets modified by an associator term to [[a, b] , c] + [[b, c] , a] + [[c, a] , b] + 6 [a, b, c] = 0 . (6.7) The Moufang laws can be written as x(yz) = (xyx)(x−1 z) , (yz)x = (yx−1)(xzx) . (6.8) They imply for example that a(xy)a = (ax)(ya). Similarly one can transform axa−1 to show that this is an automorphism whenever a ∈ O satisfies a3 = ±1. Another consequence of alternativity is that the following expressions are well defined without brackets axa = (ax)a = a(xa) , axa−1 = (ax)a−1 = a(xa−1 ) . 51 (6.9) ✇ ✇ −1 ✇ 0 ✇ 1 ✇ 2 ✇ 3 ✇ 4 8 ✇ 5 ✇ 6 ✇ 7 Fig. 15. Dynkin diagram of E10 ≡ E8++ with numbering of nodes. The first one implies the second one since a−1 = ā/N(a). These relations are the basic reason why our formulas (3.7) with the generating matrices (3.6) also make sense for octonions. Coxeter (following Bruck) has established that there is a maximal order of integers within O [9]. We briefly recall the construction from [8]. One starts from the sets of all Hurwitz numbers for all associative triples (1, ei , ei+1 , ei+3 ) of fig. 14 and their complements, arriving at the ‘Kirmse numbers’. This is not a maximal order but will be so after exchanging 1 with any of the seven imaginary units; for definiteness we choose this unit as e3 . In addition, the lattice of integers is a scaled copy of the E8 root lattice. The following octonionic units correspond to the simple roots of E8 (labeled as in fig. 15) a1 = e3 , a3 = e1 , a5 = 1 , a7 = e6 ,  1 − e1 − e2 − e3 + e4 2  1 − 1 − e1 − e4 + e5 a4 = 2  1 a6 = − 1 − e5 − e6 − e7 2  1 − 1 + e2 + e4 + e7 . a8 = 2 a2 = (6.10) Their integer span gives all octonionic integers and, following [8], we call these integers octavians and denote them by O. The highest E8 root is represented by the unit θ = 2a1 + 3a2 + 4a3 + 5a4 + 6a5 + 4a6 + 2a7 + 3a8  1 = e3 + e4 + e5 − e7 . 2 (6.11) There is a total of 240 unit octavians corresponding to the 240 roots of E8 . These definitions imply that no octavian contains only a quaternionic triple or its complement in its expansion. 52 ✇ ✇ −1 ✇ 0 7 ✇ 1 ✇ ✇ 2 ✇ 3 ✇ 4 ✇ 5 8 ✇ 6 Fig. 16. Dynkin diagram of DE10 ≡ D8++ with numbering of nodes. 6.2 D8 and B8 root systems Before studying the E8 and E10 Weyl groups we give the octonionic realizations of the root lattices of D8 and B8 which can be extended to the hyperbolic overextensions in the usual manner. For D8 the simple roots are (as labeled in fig. 16) D8 : a7 = a1 = e3 , a3 = e1 , a5 = 1 ,  1 e2 − e3 + e6 − e7 2 ,  1 − e1 − e2 − e3 + e4 2  1 a4 = − 1 − e1 − e4 + e5 2  1 − 1 − e5 − e6 − e7 a6 = 2  1 a8 = − 1 + e2 + e4 + e7 . 2 a2 = (6.12) Compared to the E8 simple roots of (6.10) the only difference is in the simple root a7 which is a specific linear combination describing an embedding of D8 into E8 [39,27]. The highest root of D8 is given by θD = 2a1 + 2a2 + 2a3 + 2a4 + 2a5 + a6 + a7 + a8  1 = e3 + e4 + e5 − e7 . 2 (6.13) which is identical to the highest E8 root. This will make it easy to relate the two hyperbolic Weyl groups. For B8 the simple roots are (as labeled in fig. 17) 53 ✇ ✇ −1 ✇ 7 ✇ 0 1 ✇ ✇ 2 3 ✇ 4 ✇ 5 ✇❅ ✇ 6 8 Fig. 17. Dynkin diagram of BE10 ≡ B8++ with numbering of nodes. B8 : a7 = a1 = e3 , a3 = e1 , a5 = 1 ,  1 e2 − e3 + e6 − e7 2 ,  1 − e1 − e2 − e3 + e4 2  1 a4 = − 1 − e1 − e4 + e5 2  1 − 1 − e5 − e6 − e7 a6 = 2  1 a8 = e2 + e4 + e5 + e6 + 2e7 . 4 a2 = (6.14) Compared to the D8 simple roots of (6.12) the only difference is in the simple root a8 , which is no longer an octavian, in agreement with the fact that B8 is not a subalgebra of E8 . A specific linear combination of the B8 simple root gives the D8 expressions, describing an embedding of D8 into B8 . The highest root of B8 is given by θB = 2a1 + 2a2 + 2a3 + 2a4 + 2a5 + 2a6 + a7 + 2a8  1 = e3 + e4 + e5 − e7 . 2 (6.15) which is identical to the highest E8 and D8 roots. 6.3 Weyl group W (E8 ) It is known that the Weyl group of E8 is of order 696 729 600 and has the structure [6] W (E8 ) = 2 . O8+ (2) . 2 . (6.16) Since W (E8 ) naturally is a discrete subgroup of the continuous O(8; R) of real dimension 28, we first record some facts about O(8; R). The space of unit octonions is isomorphic to the seven sphere S 7 and hence of dimension 7. At the level of Lie algebras one has [41,2] so(8; R) ∼ = Im(O) ⊕ G2 ⊕ Im(O) (6.17) 54 as a direct sum of vector spaces but not as Lie algebras. Here, Im(O) denotes the purely imaginary octonions which constitute the tangent space to S 7 at the octonion unit 1. The exceptional 14-dimensional Lie algebra G2 is isomorphic to the algebra of derivations of the octonion algebra; the associated Lie group, which we also denote by G2 , is the group of automorphism of the octonionic multiplication table. The formula (6.17) suggests a representation of an arbitrary finite SO(8; R) transformation as constructed from two unit octonions (aL , aR ) and a G2 automorphism γ. The following formula was proposed in [37] z 7→ (aL γ(z))aR (6.18) where γ(z) = ḡ1 ḡ2 (g1 (g2 zḡ2 )ḡ1 )g2 g1 (6.19) is also expressed in terms of unit octonions g1 and g2 . This formula reproduces the correct infinitesimal so(8, R) transformations when all unit octonions are close to the identity and expressed as aL = exp(αL ), etc., for some αL ∈ Im(O). However, it is not true that any finite transformation is of this form as we will show below, see also [33]. It is known that any SO(8; R) transformation can be written as seven times iterated (left) multiplication of z by unit octonions [8]. Turning to the finite E8 Weyl group we observe that a statement similar to (6.17) is true for the integral octavians O. For this we first need some facts about the discrete automorphism group of O. The group Aut(O) is a finite group of order 12 096, usually denoted by G2 (2) [8]. This group is not simple but has as simple part U3 (3) of order 6 048. One obtains an explicit description of a generating set of U3 (3) in the following way. As above, the transformation z 7→ azā (for a, z ∈ O) gives an automorphism iff a3 ∈ R, i.e. a3 = ±1. Such a ∈ O were called Brandt transformers in [43]. Among the simple roots of E8 given in (6.10) this is true for the simple roots a4 , a5 , a6 , a8 which constitute a D4 tree in the E8 diagram. The automorphisms of O generated by z 7→ ai zāi (for i = 4, 5, 6, 8) generate in fact all of U3 (3). In order to describe the index two extension needed for the full G2 (2) it is instructive to consider the following four ‘diagonal’ automorphisms of z = P7 i=0 ni ei (where e0 = 1) (n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 ) 7→ (n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 ) , (n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 ) 7→ (n0 , −n1 , −n2 , n3 , n4 , −n5 , n6 , −n7 ) , (n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 ) 7→ (n0 , n1 , −n2 , n3 , −n4 , −n5 , −n6 , n7 ) , (n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 ) 7→ (n0 , −n1 , n2 , n3 , −n4 , n5 , −n6 , −n7 ) , 55 corresponding to choosing the three lines passing through unit e3 as associative triples for the Dickson doubling process. 17 This suggests that one can obtain another automorphism by choosing a line not passing through e3 , for example (n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 ) 7→ (n0 , −n1 , −n2 , −n3 , n4 , n5 , −n6 , n7 ) . This automorphism is a Z2 and one can check that it combines with U3 (3) above to give all automorphisms of O. In this way one obtains eight diagonal automorphisms: one is the identity, while the other seven correspond to treating any of the seven lines of the Fano plane as the quaternion subalgebra entering the Dickson doubling process. 18 Combining Aut(O) with two sets of octavian units (of order 240), one finds that there is a total of 240 × |Aut(O)| × 240 = 696 729 600 = |W (E8 )| (6.20) elements, coinciding with the order of the E8 Weyl group. This is the promised discrete (and finite) version of (6.17). It is again tempting to associate the action of this group on z ∈ O with the expression z 7→ (aL γ(z))aR , similar to (6.18), in particular since (6.17) is invariant under (aL , aR ) ↔ (−aL , −aR ) thereby reducing the tentative number of transformation described in this way to the order of the even Weyl group W + (E8 ), consistent with the fact that the odd Weyl transformations will involve an additional conjugation of z. However, the map (6.18) has a kernel in the discrete case in the sense that there are non-trivial triples (aL , γ, aR ) which act trivially on z ∈ O: Consider a γ given by a Brandt transformer a ∈ O with a 6= 1. Choosing aL = ā and aR = a leads to z 7→ z by alternativity of O. There are 56 Brandt transformers among the 240 units of O and one can check that the kernel of the action (6.18) comes solely from situations of the type just described. Since we do not have the correct formula for any w ∈ W (E8 ) expressed in terms of unit octavians and a G2 (2) transformation (also expressed in terms of unit octavians) we cannot give a closed description of W (E8 ) using the set (6.20). This will also impede our giving a fully explicit description of W (E8++ ). We close this section by explaining why the formula for finite G2 automorphisms given in (6.19) is not correct for arbitrary unit octonions g1 and g2 . Using the Moufang identities one can show that z 7→ g1 (g2 zḡ2 )ḡ1 is an automorphism iff g12 g23g1 ∈ R, so in particular whenever g1 and g2 are Brandt 17 Dickson doubled pairs (a, b) of quaternions manifestly have the automorphism (a, b) 7→ (a, −b). 18 The Fano plane itself has the automorphism group P SL(2, 7) of order 168 and there are several copies contained in Aut(O). None is generated as a subgroup of the permutation group acting on the seven imaginary units. 56 transformers. Conjugating with ḡ1 ḡ2 to obtain (6.19) leads to the necessary and sufficient criterion {{ḡ1 , ḡ2 } , g2 } ∈ R (6.21) for (6.19) to be an automorphism. Here, {x, y} = xyx−1 y −1 is the (group) commutator which is well defined by virtue of alternativity of O. The criterion (6.21) is clearly not satisfied for arbitrary octavians; one example is given by g1 = a2 and g2 = a1 in terms of the E8 simple roots. We note as a curiosity that W + (E8 ) has a subgroup of type H4 which is non-crystallographic and plays a role in the theory of quasi-crystals [35]. 6.4 W + (E10 ) ≡ W + (E8++ ) As already remarked after equation (3.16) the formula SXS † for general even Weyl transformations of the even hyperbolic Weyl group acting on Hermitian (2 × 2) matrices ceases to be valid in the octonionic case. The even Weyl transformations form a discrete subgroup of SO(9, 1; R) and similar to (6.17) it is known that at the level of Lie algebras [41,2] so(1, 9; R) ∼ = sl2 (O) ) , = L′2 (O) ⊕ Im(O) ⊕ G2 (∼ (6.22) again as a sum vector spaces. Here, L′2 (O) denotes the 24-dimensional vector space of all octonionic traceless (2 × 2) matrices. Combining this with Im(O) one obtains the 31-dimensional vector space of all octonionic (2 × 2) matrices with vanishing real part of the trace. This is analogous to (5.23) in the quaternionic case; the additional complication of non-associativity is that one also requires an ‘intertwining’ G2 automorphism of O. Similar to the suggestive, but incorrect, formula (6.18) one could envisage the action of P SO(1, 9; R) on H2 (O) to be given by X 7→ Sγ(X)S † . (6.23) However, this ‘definition’ is ambiguous since it requires a prescription for how to place the parentheses in case there are more than two independent octonionic entries involved. Furthermore, we expect that in analogy with the finite E8 case discussed above that (6.23) is not general enough to describe all transformations. Presumably both shortcomings of (6.23) are related and can be resolved together. We stress nevertheless that Theorem 2 is still applicable and any even Weyl transformation can be described by an iterated action of (2 × 2) matrices. 57 Though we cannot offer a complete resolution to this problem we make a comment on the issue of placing parentheses. In [34] the approach was taken that S has to be such that there is no ambiguity when placing parentheses in the matrix expressions. This leads to very restrictive conditions on S, allowing essentially only one octonionic entry, which is the situation covered by Theorem 1. However, we are here interested in the case with more than one independent octonionic entry. In order to make sense of (6.23), one must presumably define the triple product by putting parentheses inside the matrix elements in such a way that the resulting matrix is again Hermitian (simply bracketing whole matrices will not do). This is for example required to reduce (6.23) to (6.18) for the embedding of W (E8 ) in W (E10 ) for the cases when (6.18) is correct. Defining the Weyl group of E10 by iterated action of the basic matrices given in Theorem 1 with the simple roots (6.10) (for which there arise no ambiguities due to non-associativity) we arrive at W + (E8++ ) ∼ = P SL2 (O) , (6.24) where the group P SL2 (O) on the r.h.s. is defined by the iterated action. Since, unlike the D4 Dynkin diagram, the E8 diagram has no outer automorphism no additional quotients of P SL2 (O) are necessary for describing the Weyl group. It is an outstanding problem to find a better and more ‘intrinsic’ definition of the group P SL2 (O), and to explore its implications for an associated theory of modular forms. We point out that P SL2 (O) has a rich structure of subgroups, (0) of types P SL2 (H), P SL2 (E), W (D9 ), and others, which remains to be exploited. We hope that the information on these subgroups we have obtained in the preceding sections will help to find a better description of (6.24). 6.5 W + (D8++ ) and W + (B8++ ) We close by giving the relations between the Weyl groups W + (D8++ ) and W + (B8++ ), and W + (D8++ ) and W + (E8++ ), respectively. One can check that S8D = S8B ◦ S6B ◦ S8B and (S8D )2 = 11 (6.25) by using either the abstract relations or iterated matrix action of octonionic matrices on X; the ◦ is meant to indicate that the product is to be understood as an iterated action. All other generators are identical and since S8B is acting by a conjugation automorphism this shows that 58 Proposition 14 W + (B8++ ) ∼ = W + (D8++ ) ⋊ 2. Turning to W + (D8++ ) one finds that S7D is the only generator which is not common to W + (D8++ ) and W + (E8++ ) since all other simple roots and the highest roots are identical. A calculation reveals that S7D can be expressed as the result of a conjugation action of the W + (E8++ ) generators as S7D = S7 S6 S5 S8 S4 S3 S5 S4 S6 S7 S5 S8 S6 S5 S4 S3 S2 ◦S3 S4 S5 S6 S8 S5 S7 S6 S4 S5 S3 S4 S8 S5 S6 S7 , (6.26) where we omitted a superscript on SiE and the ◦ symbols on the r.h.s. in order not to clutter notation. The Weyl transformation (6.26) maps the simple root α7E to α7D . This shows that W + (D8++ ) is a subgroup of W + (E10 ) but one can check that it is not normal in W + (E10 ) since conjugation by S7E does not preserve the subgroup. For the finite Weyl groups W (D8 ) has index 135 in W (E8 ). By contrast, for the hyperbolic Weyl groups one has the following result from [44,45]. 19 Proposition 15 W + (D8++ ) is an index 527 subgroup of W + (E8++ ) ∼ = P SL2 (O). Without a direct definition of P SL2 (O) we cannot give a more detailed octonionic description of W + (D8++ ) that would be analogous to (5.24). There is no direct relation between W + (B8++ ) and W + (E8++ ). A Examples with twisted affine algebras In this appendix we show that our techniques are also suited for treating hyperbolic algebras which do not arise as over-extensions but whose Dynkin diagrams instead involve subdiagrams of twisted affine type. For simplicity we will exemplify this for two cases constructed over the complex numbers with (2) (3) twisted affine algebras D2 and D4 in the terminology of [25], both of which have rank three. The hyperbolic node is attached to the ‘twisted affine’ node with the single node for the cases we consider and we therefore denote the (2)+ (3)+ associated hyperbolic algebras by D2 and D4 . However, we anticipate that there are also other, more general hyperbolic cases which fit into the picture we develop in this paper. 19 We thank N. Johnson and P. Tumarkin for bringing to our attention a mistake in the published version of the following proposition. 59 θs t t t a2 ❅ ■ ❅ ❅ ❅ ❅ ❅ t ❅ ✲t ❅r a1 ❅ ❅ t t ❅t Fig. A.1. The root system of type B2 , with simple roots labeled and indicated by arrows. The lattice they generate is the ring of Gaussian integers. There are both long and short roots and we indicate the highest short root θs . A.1 (2)+ K = C, type D2 (2)+ The hyperbolic Kac–Moody algebra D2 can be constructed from the root system of type B2 . Although the root system is identical to that of C2 already depicted in fig. 5 we draw it again in fig. A.1 where we highlight the short (2) highest root which enters the twisted affine extension D2 . The root system is not simply laced, having simple roots whose squared lengths are in the ratio 2 to 1. We choose the following units and simple roots for B2 in the complex plane a2 −1 + i ε1 = a1 = 1 , ε2 = √ = √ , θs = i . 2 2 (A.1) These formulas are identical to √ those of (4.21) except that the whole lattice has been rescaled by a factor 2. (2)+ The hyperbolic simple roots of D2  1 0  α−1 =  0 −1 α1 =    0   1 10  now take the form  , −θ̄s 0 α2 =  −1 − i  , −1 −θs  α0 =     0    −1 =  −1 + i  0  i .  −i  0  , (A.2) (2)+ The Dynkin diagram of the hyperbolic algebra D2 is shown in fig. A.2. The non-zero inner products between the simple roots are (α−1 , α−1 ) = (α0 , α0 ) = (α1 , α1 ) = 2 , (α2 , α2 ) = 4 , (α−1 , α0 ) = −1 , (α0 , α2 ) = −2 , (α1 , α2 ) = −2 (2)+ and these give rise to the D2 diagram. 60 (A.3) ✇ Fig. A.2. (2)+ D2 ✇ −1 0 Fig. A.3. ✇❅ ✇ 2 1 Dynkin diagram with numbering of nodes. ✇ (3)+ D4 ❅ ✇ −1 0 ✇ 2 ❅ ✇ 1 Dynkin diagram with numbering of nodes. a2 t t t ❏ ✡ θs ❏ ✡ t ❏ ✡ ✡ t t ❏ ❍❍ ❨ ❍ ❍ ❏ ✡ ✟✟ ✟ ❍❍ ❍ ❏✡ ✟ ❍ ❍❍ ✟✟ ✡❏ ✟ ✟ ✡ ❏ ❍❍t t ❏ ✡ t ❏ ✡ ❏ ✡ ❏t ✡ t ✲t a1 Fig. A.4. The root system of type G2 with highest short root indicated. (2)+ Turning to the Weyl group of D2 , we realize that the Weyl group is isomorphic to that of C2++ since the Coxeter group is insensitive to the direction of the arrows. (2)+ Proposition 16 W + (D2 A.2 )∼ = W + (B2++ ) ∼ = P SL2 (G) ⋊ 2. (3)+ K = C, type D4 The final hyperbolic algebra we consider is the hyperbolic extension of the (3) twisted affine algebra of type D4 (the only one twisted with an order three (3)+ automorphism). We denote the hyperbolic extension by D4 and its diagram is shown in fig. A.3. Its construction employs the G2 root system, shown again in fig. A.4, and we make the following choices of units and simple roots in the complex plane: √ a1 − 3+i ε1 = √ = 1 , ε2 = a2 = , θs = i . 2 3 (A.4) √ Again, these formulas are those of (4.30) except for a rescaling by a factor 3 and the use of the highest short root θs instead of the highest (long) root θ. 61 (3)+ The associated hyperbolic simple roots of D4   1 0   , 0 −1  √  0 3 α1 =  √  , 3 0 α−1 =   are then   −1 −θs  α0 =   −θ̄s 0 α2 =   0 √ − 3−i 2   = 0   √ − 3+i 2   −1 −i   i 0  , . (A.5) The non-zero inner products between these simple roots are (α−1 , α−1 ) = (α0 , α0 ) = (α2 , α2 ) = 2 , (α1 , α1 ) = 6 , (α−1 , α0 ) = −1 , (α0 , α2 ) = −1 , (α1 , α2 ) = −3 . (A.6) The Weyl group is again easy to determine in this case since it is isomorphic to that of the standard G++ case. 2 (3)+ Proposition 17 W + (D4 ∼ )∼ = W + (G++ 2 ) = P SL2 (E) ⋊ 2. References [1] H. Aslaksen, Quaternionic determinants, Math. Int. 18 (1996), 57-65. [2] J.C. Baez, The Octonions, Bull. Am. Math. Soc. 39 (2002) 145, Bull. Am. Math. Soc. 42 (2005), 213 (Erratum), arXiv:math/0105155. [3] O. Bergman, Three-pronged strings and 1/4 BPS states in N = 4 super-YangMills theory, Nucl. Phys. B 525 (1998), 104, arXiv:hep-th/9712211. [4] J. Brown, O. Ganor and C. Helfgott, M theory and E10 : Billiards, branes and imaginary roots, JHEP 0408: 063 (2004), arXiv:hep-th/0401053. [5] M.C.N. Cheng and E. Verlinde, Wall crossing, discrete attractor flow and Borcherds algebra, SIGMA 4 (2008), 068, 33 pages. [6] J.H. Conway, R.T. Curtis, S.P. Norton, R.A. Parker and R.A. Wilson, Atlas of finite groups, Clarendon Press, Oxford, 1985. [7] J.H. Conway and N.J.A.Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, New York, 1988. [8] J.H. Conway and D.A. Smith, On quaternions and octonions, A K Peters, Natick, MA, 2003. [9] H.M.S. Coxeter, Integral Cayley numbers, Duke Math. J. 13 (1946), 561-578. 62 [10] A. Dabholkar, D. Gaiotto and S. Nampuri, Comments on the spectrum of CHL dyons, JHEP 0801 (2008) 023, arXiv:hep-th/0702150. [11] T. Damour, S. de Buyl, M. Henneaux and C. Schomblond, Einstein billiards and overextensions of finite-dimensional simple Lie algebras, JHEP 0208 (2002) 030, arXiv:hep-th/0206125. [12] T. Damour and H. Nicolai, Symmetries, singularities and the de-emergence of space, Int. J. Mod. Phys. D 17 (34) (2008) 525531, arXiv:0705.2643. [13] B. de Wit and H. Nicolai, The Parallelizing S 7 Torsion In Gauged N = 8 Supergravity, Nucl. Phys. B 231 (1984), 506. [14] R. Dijkgraaf, E.P. Verlinde and H.L. Verlinde, Counting dyons in N = 4 string theory, Nucl. Phys. B 484 (1997), 543, arXiv:hep-th/9607026. [15] F.J. Dyson, Quaternion determinants, Helv. Phys. Acta 45 (1972), 289–302. [16] M. Eie and A. Krieg, The Maass-space on the half-plane of Cayley numbers of degree two, Math. Z. 210 (1992), 113. [17] S. Elitzur, A. Giveon, D. Kutasov and E. Rabinovici, Algebraic aspects of matrix theory on T d , Nucl. Phys. B 509 (1998), 122, arXiv:hep-th/9707217. [18] V. Elser and N.J.A. Sloane, A highly symmetric four-dimensional crystal, J. Phys. A 20 (1987), 6161–6168. [19] F. Englert, L. Houart, A. Kleinschmidt, H. Nicolai and N. Tabti, An E9 multiplet of BPS states, JHEP 0705 (2007), 065, arXiv:hep-th/0703285. [20] A.J. Feingold and I.B. Frenkel, A hyperbolic Kac–Moody algebra and the theory of Siegel modular forms of genus 2, Math. Ann. 263 (1983), 87-144. [21] A.J. Feingold, A. Kleinschmidt and H. Nicolai, Hyperbolic Weyl groups and the four normed division algebras, in Vertex operator algebras and related areas, Contemporary Mathematics, vol. 497, Amer. Math. Soc., Providence, RI (2009), 53–64. [22] P. Goddard and D. Olive, Algebras, Lattices, and Strings, in: Vertex Operators in mathematics and physics, eds. J. Lepowsky et al., Springer, Berlin, 1985. [23] C. M. Hull and P. K. Townsend, Unity of superstring dualities, Nucl. Phys. B 438 (1995), 109, arXiv:hep-th/9410167. [24] J.E. Humphreys, Reflection groups and Coxeter groups, Cambridge University Press, Cambridge, 1997. [25] V. Kac, Infinite dimensional Lie algebras, Cambridge University Press, Cambridge, 1990. [26] V. Kac, R.V. Moody and M. Wakimoto, On E10 , in Differential geometrical methods in theoretical physics, eds. K. Bleuler and M. Werner, Kluwer, 1988. 63 [27] A. Kleinschmidt and H. Nicolai, E10 and SO(9, 9) invariant supergravity JHEP 0407 (2004), 041, arXiv:hep-th/0407101. [28] M. Koca, R. Koc and M. Al-Barwani, Noncrystallographic Coxeter group H4 in E8 , J. Phys. A 34 (2001), 11201–11213. [29] M. Koca, R. Koc and M. Al-Barwani, Quaternionic roots of SO(8), SO(9), F 4 and the related Weyl groups, J. Math. Phys. 44 (2003), 3123–3140. [30] A. Krieg, Modular forms on half-spaces of quaternions, Lecture Notes in Mathematics 1143, Springer, Berlin, 1985. [31] A. Krieg, The Maass-space on the half-space of quaternions of degree 2, Math. Ann. 276 (1987), 675. [32] D. Lanphier and J. Rosenhouse, A decomposition theorem for Cayley graphs of Picard group quotients, J. Comb. Math. Comb. Comput. 50 (2004), 95-104. [33] C.A. Manogue and T. Dray, Octonionic Moebius transformations, Mod. Phys. Lett. A 14 (1999), 1243, arXiv:math-ph/9905024. [34] C.A. Manogue and J. Schray, Finite Lorentz transformations, automorphisms, and division algebras, J. Math. Phys. 34 (1993), 3746, arXiv:hep-th/9302044. [35] R.V. Moody and J. Patera, Quasicrystals and icosians, J. Phys. A: Math. Gen. 26 (1993), 2829–2853. [36] N. A. Obers and B. Pioline, U-duality and M-theory, Phys. Rept. 318 (1999), 113, arXiv:hep-th/9809039. [37] P. Ramond, Introduction to exceptional Lie groups and algebras, Caltech preprint, CALT 68-577, 1977. [38] I. Reiner, Maximal Orders, London Mathematical Society Monographs, Vol. 5, Academic Press, London 1975. Oxford University Press, reprinted 2003. [39] I. Schnakenburg and P. West, Kac-Moody symmetries of ten-dimensional nonmaximal supergravity theories, JHEP 0405 (2004), 019, arXiv:hep-th/0401196. [40] A. Sen, Walls of Marginal Stability and Dyon Spectrum in N=4 Supersymmetric String Theories, JHEP 0705 (2007), 039, arXiv:hep-th/0702141. [41] A. Sudbery, Division algebras, (pseudo)orthogonal groups and spinors, J. Phys. A 17 (1984), 939-955. [42] S. Viswanath, Embeddings of Hyperbolic Kac–Moody Algebras into E10 , Lett. Math. Phys. 83 (2008), 139–148, arXiv:0801.2586 [math.QA]. [43] M. Zorn, The automorphisms of Cayley’s non-associative algebra, Proc. Nat. Acad. Sc. 21 (1935), 355–358. [44] N. W. Johnson, J. G. Ratcliffe, R. Kellerhals and S. T. Tschantz, The size of a hyperbolic Coxeter simplex, Transform. Groups 4 (1999) 329–353. [45] P. V. Tumarkin, Root subsystems of full rank in hyperbolic root systems, Sb. Math. 195 (2004) 121–134. 64
4math.GR
A Genetic Algorithm for solving Quadratic Assignment Problem (QAP) H. Azarbonyada, R. Babazadehb a b Department of Electrical and computers engineering, University of Tehran, Tehran, Iran, [email protected] Department of industrial engineering, University of Tehran, Tehran, Iran, [email protected] Abstract— The Quadratic Assignment Problem (QAP) is one of the models used for the multi-row layout problem with facilities of equal area. There are a set of n facilities and a set of n locations. For each pair of locations, a distance is specified and for each pair of facilities a weight or flow is specified (e.g., the amount of supplies transported between the two facilities). The problem is to assign all facilities to different locations with the aim of minimizing the sum of the distances multiplied by the corresponding flows. The QAP is among the most difficult NP-hard combinatorial optimization problems. Because of this, this paper presents an efficient Genetic algorithm (GA) to solve this problem in reasonable time. For validation the proposed GA some examples are selected from QAP library. The obtained results in reasonable time show the efficiency of proposed GA. Key words- Genetic Algorithm, QAP, Multi-row layout problems optimization problems. The QAP is NP-hard optimization problem [7], so, to practically solve the QAP one has to apply heuristic algorithms which find very high quality solutions in short computation time. And also there is no known algorithm for solving this problem in polynomial time, and even small instances may require long computation time [2]. The location of facilities with material flow between them was first modeled as a QAP by Koopmans and Beckmann [3]. In a facility layout problem in which there are n facilities to be assigned to n given location. The QAP formulation requires an equal number of facilities and locations. If there are fewer than n, say m<n, facilities to be assigned to n locations, then to use the QAP formulation, n-m dummy facilities should be created and a zero flow between each of these and all others must be 1. INTRODUCTION assigned ( including the other dummy facilities). If there are Some multi-row layout problems are the control layout problem, the machine layout problem in an automated manufacturing system and office layout problem also the Travelling Salesman Problem (TSP) may be seen as a fewer locations than facilities, then the problem is infeasible [4]. Considering previous works in QAP ([2],[8] and [9]) this paper is developed to solve this problem with GA in short computation time. special case of QAP if one assumes that the flows connect all facilities only along a single ring, all flows have the same non- In the next section the QAP is described and formulated. After zero of introducing GA in Section 3, the encoding scheme, solution standard combinatorial optimization problems may be written representation and GA operators are described in this section. in this form (see [1] and [2]). The computational results are reported in Section 4. Finally, The Quadratic Assignment Problem (QAP) is one of the Section 5 concludes this paper and offers some directions for classical combinatorial optimization problems and is known further research. for its diverse applications and is widely regarded as one of 2. Mathematical model (constant) value. Many other problems the most difficult problem in classical combinatorial The following notation is used in formulation of QAP [4]: parameters total number of facilities and locations n flow of material from facility I to facility k fik distance from location j to location l djl Variable 1 If facility I is assigned to location j = xij 0 Otherwise individuals and happens in generations. In each generation, the fitness of every individual in the population is evaluated, multiple individuals are stochastically selected from the current population (based on their fitness), and modified (recombined and possibly randomly mutated) to form a new population. The new population is then used in the next iteration of the algorithm. Commonly, the algorithm n n n i j k (1) n ∑∑∑∑ Min f ik d jl x ij x kl terminates when either a maximum number of generations has been produced, or a satisfactory fitness level has been reached l for the population. If the algorithm has terminated due to a n ∑x ij =1 (2) ∀i maximum number of generations, a satisfactory solution may or may not have been reached [5]. j n ∑x ij =1 (3) ∀j i (4) xij is binary 3.1. Encoding scheme In this section we describe the encoding scheme for different component of proposed GA when n=5. For creating initial The objective function (1) minimizes the total distances and flows between facilities. Constraints (2) and (4) ensure that each facility I is assigned to exactly one location. As well as Constraints (3) and (4) assure that each location j has exactly one facility which assigned to it. The term quadratic stems population we consider a chromosome with n gene, as any gene is depictive of assignment each facility to exactly one location. For example the chromosome in Figure 1 show that facilities 2,4,3,1 and 5 is assigned to locations 1,2,3,4 and 5 respectively that it is a feasible solution. from the formulation of the QAP as an integer optimization problem with a quadratic objective function. 3. Genetic Algorithm 2 4 3 1 5 1 2 3 4 5 Fig.1. chromosome representation Genetic Algorithms (Gas) are routinely used to generate useful For making above chromosome (feasible solution) to create solutions to optimization and search problems. Genetic initial population, firstly we assume that all content of algorithms belong to the larger class of evolutionary chromosome are placed equal to 1, then random integer algorithms (EA), which generate solutions to optimization number from 1 to 5 is produced, say that 3, and then it is problems using techniques inspired by natural evolution. In a compared with the content of corresponding square, so if the genetic (called corresponding content is equal to 1, facility 3 is assigned to chromosomes or the genotype of the genome), which encode location 1 and then this content is set equal to zero (see figure candidate solutions (called individuals, creatures) to an 2). Again a random integer number from 1 to 5 is produced, optimization problem, evolves toward better solutions. then If it is equal to 3 because of the corresponding content is Traditionally, solutions are represented in binary as strings of zero (it means that facility 3 is assigned) so, another number 0s and 1s, but other encodings are also possible. The evolution should be produced. This way continues until all facilities are algorithm, a population of strings usually starts from a population of randomly generated assigned to locations and also the determined number of initial 2 5 3 1 4 2 4 3 1 5 population of chromosomes is satisfied. 1 1 1 1 1 1 1 0 1 1 Fig.4. Mutation representation 3.1.3. Selection Fig.2. making chromosome (feasible solution) In selection operator the number of chromosomes required to 3.1.1. Crossover complete next generation from crossover, mutation and We use two point crossovers for implementation of GA. For making child 1 and child 2, two points are randomly selected from 1 to 5 and between these points is hold fixed. Then, child 1 is created according to orders of parent 2 and fixed components of parent 1, as well as child 2 is produced previous generation are determined special mechanism that we use roulette wheel mechanism. In roulette wheel selection, candidate solutions are given a probability of being selected that is directly proportionate to their fitness. The selection probability of a candidate solution I is Fi , where Fi is P ∑ according to order of parent 1 and fixed components of parent Fj j 2 (see Figure 3). After tuning the crossover probability is the fitness of chromosome I (objective function in QAP determined equal to 0.8. This means that 80% of selected formulation) and P is the population size. parents participate in crossover operation. 3 5 2 4 1 5 3 4. Computational Results PARENT 1 2 1 4 PARENT 2 For validation the proposed GA some examples are selected from QAP library. The proposed GA was programmed in Java net beans 6.9.1 on a Pentium dual-core 2.66 GHZ computer with 4 GB RAM. The objective function values of the best 1 5 2 4 3 As it is illustrated in Table 1 the proposed GA results in CHILD 1 3 2 4 known solutions are given by Burkard et al. [6]. 5 1 the short computational time with acceptable GAP. CHILD 2 Table 1: Computational results of proposed GA FIG.3. CROSSOVER REPRESENTATION 3.1.2. Mutation Mutation operator changes the value of each gene in a chromosome with probability 0.2. For mutation two genes are randomly selected from selected chromosome and then their locations are substituted (see Figure 4). Test Problems Nug 12 Nug 17 Nug 20 Nug 24 Nug 28 chr12a.dat chr12b.dat chr15a.dat Global/local optimum global local local local local local local local Gap% 0 .0034 0 .0034 .012 0 0 1 Run time (second) 1 3 3 4 5 1 2 4 5. Conclusion In this paper at first QAP as a special type of multi-row layout problem with facilities of equal area is introduced and its various applications in different fields are described. Then, due to NP-hard nature of QAP an efficient GA algorithm is developed to solve it in reasonable time. Finally, some computational results from data set of QAP library are provided to show the efficiency and capability of proposed GA. Comparing outcome results with those works available in literature justify the proficiency of proposed GA in achieving acceptable solutions in reasonable time. For future research direction, developing other heuristic and/or meta-heuristic such as simulated annealing (SA) algorithm and PSO algorithm and then comparison results of them with results of this paper can be attractive work. References [1] Burkard R.E.(1984). Location with spatial interaction – Quadratic assignment problem in discrete location theory edited by R.L. Francis and P.B. Mirchandani. New York: Academic. [2] Ravindra K. Ahuja, James B. Orlin, Ashish Tiwari (2000). A greedy genetic algorithm for the quadratic assignment Problem. Computers & Operations Research 27. 917-934. [3] Koopmans T.C. and Beckmann M. (1957). Assignment problems and the location of economic activities. Econometrica 25, 1:53-76. [4] Heragu S. (1997). Facilities Design. Boston, PWS Publishing company. [5] Eiben, A. E. et al (1994). Genetic algorithms with multi-parent recombination. PPSN III: Proceedings of the International Conference on Evolutionary Computation. The Third Conference on Parallel Problem Solving from Nature: 78–87. [6] Burkard RE, Karisch SE, Rendl F. (1997). QAPLIB – A quadratic assignment program library. J. Global Optim.10:391- 403. [7] S. Sahni and T. Gonzales, P-Complete Approximation Problems, J. ACM, vol. 23, pp. 555-565, 1976. [8] V. Maniezzo and A. Colorni. The Ant System Applied to the Quadratic Assignment Problem. Accepted for publication in IEEE Transactions on Knowledge and Data Engineering, 1999. [9] P. Merz and B. Freisleben. A Genetic Local Search Approach to the Quadratic Assignment Problem. In T. B¨ack, editor, Proceedings of the Seventh International Conference on Genetic Algorithms (ICGA’97), pages 465–472. Morgan Kaufmann, 1997.
9cs.NE
From output regulation theory to flatness based tracking: a bridge for linear systems arXiv:1612.01406v1 [cs.SY] 5 Dec 2016 Saman Khodaverdian Institute of Automatic Control and Mechatronics, Control Methods and Robotics Lab, Technische Universität Darmstadt, Landgraf-Georg-Str. 4, 64283 Darmstadt, Germany. Email: [email protected] The trajectory tracking problem for multivariable linear systems is considered. Two different techniques are examined: the output regulation theory (ORT) and the flatness based tracking (FBT). ORT and FBT are two different approaches to solve the tracking problem, and both methods have different restrictions. The tracking controller of the ORT furthermore depends on the solution of the so-called regulator equations. In this paper, a special analytic solution of the regulator equations is presented. Additionally, based on this analytic solution, a link from the ORT to the FBT approach is provided, and the connection of both tracking controllers is highlighted. It is shown how the ORT controller can be converted to the FBT controller and that both methods lead to identical control laws for a certain class of systems. Keywords: trajectory tracking; output regulation theory; regulator equations; flat outputs 1. Introduction This paper considers the tracking problem for multivariable linear systems. Tracking means that the system is controlled in a way such that its output follows a given reference trajectory. There is a considerable amount of literature dealing with this problem, where the tracking problem is usually solved by means of system inverses (Brockett & Mesarovic, 1965; Hirschorn, 1979; Sain & Massey, 1969; Silverman, 1969). Based on these results, there have been developed different methods to solve the tracking problem. A proven way is the flatness based tracking (FBT) approach (Fliess, Levine, Martin, & Rouchon, 1995, 1999), where a set of (virtual) outputs is searched such that the system states and inputs can be completely characterized by this so-called flat output and its time derivatives. The tracking problem can easily be solved for such flat outputs. However, the conversion to the real system output might be problematic since for non-minimum phase systems the relation is determined by an unstable differential equation.1 Nevertheless, the FBT is a common and widespread technique in control literature (see for instance (Fliess & Marquez, 2000; Hagenmeyer & Delaleau, 2003; Hagenmeyer & Zeitz, 2004; Martin, Devasia, & Paden, 1996; Rothfuss, Rudolph, & Zeitz, 1996) and the references therein). Another approach to solve the tracking problem is provided by the output regulation theory (ORT) which has been developed in (Francis, 1977; Francis & Wonham, 1976) for linear systems, and was extended to the nonlinear case in (Isidori & Byrnes, 1990).2 The ORT achieves stable tracking under mild assumptions (especially in the linear case), and bypasses the stability prob1 It is possible to overcome this problem, for instance, with approximate tracking techniques (Benvenuti, Di Benedetto, & Grizzle, 1994; Hauser, Sastry, & Meyer, 1992) where non-minimum phase systems are approximated by minimum phase systems. However, this results in inexact tracking due to neglected terms. Another technique leading to exact tracking is the stable inversion theory (Chen & Paden, 1996; Devasia, Chen, & Paden, 1996), but the solution needs non-causal and possibly unbounded control inputs (Tomlin, Lygeros, Benvenuti, & Sastry, 1995). 2 An alternative name for the ORT is the robust servomechanism problem (Davison, 1976). lems of non-minimum phase systems. The solution depends on the solvability of a set of equations, the regulator equations, which is usually solved numerically. The drawback of the ORT is that the reference trajectory must be given by a so-called exosystem, while in the FBT approach the reference trajectory can be any function that is sufficiently often differentiable. Thus, the ORT method is restricted in the treatable class of reference trajectories. Like the FBT, the ORT is a common technique for the design of tracking controllers (the textbooks (Saberi, Stoorvogel, & Sannuti, 2000) and (Huang, 2004) are recommendable for a detailed overview). FBT and ORT are different approaches to solves the tracking problem, but in this paper it is shown that under certain conditions both methods lead to identical control laws. First, a special analytic solution of the regulator equations is presented which allows to interpret the tracking controller of the ORT in a new light. Based on this analytic solution, it is shown that ORT and FBT result in identical tracking controllers if the system output is flat, which also implies that in case of flat system outputs no exosystem is needed. Additionally, it is shown that in case of non-flat outputs, the ORT tracking controller can be converted to an FBT-like controller for a special choice of the free parameters. As expected, this controller parametrization leads to an unstable closedloop behavior if the system is non-minimum phase. Note that the ORT approach has the ability to achieve stable tracking even in case of non-minimum phase systems. But then, the reference trajectory must be restricted to the class of exosystem trajectories, which can also be seen from the derived solution of the regulator equations. In the following, some notations are summarized, before the problem setup and basics are stated in Section 2. The main result is presented in Section 3, where the single-input single-output (SISO) case is considered first (Section 3.1), before the general multiple-input multiple-output (MIMO) case is examined (Section 3.2). Finally, the results are summarized in Section 4. Notation. Boldface letters denote vectors and matrices and italic letters represent scalar values. The identity matrix of dimension n is written as I n , while 0 denotes a zero matrix or vector of appropriate size. For a linear time-invariant system ẋ = Ax + Bu, y = Cx, the invariant zeros are all numbers λ for which the matrix   λI n − A −B R(λ) = C 0 has a rank deficit (MacFarlane & Karcanias, 1976). R(λ) is known as the Rosenbrock’s system matrix. The system is called minimum phase if the real part of all invariant zeros is negative, otherwise it is called non-minimum phase. The relative degree of the k-th output states how often yk must be differentiated with respect to time until the input u appears, i.e. δk = min{ν ≥ 1 : ν C k Aν−1 B 6= P 0} where C k is the k-th row vector of C. The relative degree of the system is then given by δ = m k=1 δk . 2. Problem statement and preliminaries The trajectory tracking problem for multivariable linear systems is considered (as depicted in Figure 1) where the plant is described by ẋ = Ax + Bu y = Cx, (1a) (1b) with state, input and output vector x ∈ Rn , u ∈ Rm and y ∈ Rm , respectively. It is assumed that the plant is fully controllable and rank (B) = rank (C) = m. To avoid vastness, square systems are considered (dim (u) = dim (y)), but the results hold also for systems with more inputs than 2 Trajectory generator Tracking controller u y Linear plant x Figure 1. Basic setup for trajectory tracking. outputs. The goal is to find a feedback controller such that for any initial condition the output of the plant tracks a desired reference trajectory y d , i.e. lim (y(t) − y d (t)) = 0. (2) t→∞ The desired output vector y d can be given by a trajectory generator as illustrated in Figure 1. Two different approaches for solving the tracking problem (2) are summarized subsequently: the output regulation theory (ORT) and the flatness based tracking (FBT). 2.1 Review of FBT A system is called flat if there exists a virtual output z such that all input and state variables can be expressed as functions of this output vector and its time derivatives, i.e. x = f x (z, ż, z̈, . . .) and u = f u (z, ż, z̈, . . .) (Fliess et al., 1995, 1999). The virtual output z is called a flat output and does not necessarily need to coincide with the real output y. Some basics regarding the FBT of linear systems are summarized in the following. More details can be found in the mentioned references. Proposition 1: A linear system (1) is flat if and only if it is controllable (Fliess et al., 1995). Thus, for controllable linear systems there exists always a flat output which (in contrast to the nonlinear case) can be found very easily: since (1) is assumed to be controllable, there exists a linear e x which brings the system into controllable canonical form (Luenberger, e = T transformation x e B, e C) e = (T e AT e −1 , T e B, C T e −1 ) are given 1967), meaning that the transformed system matrices (A, by  e 11 A A e 21 e = A  .  .. e m1 A  0 1  .. .. e ii =  A . . 0 0 ⋆ ⋆  e ii = 0 · · · B   e 12 · · · A e 1m e 11 A B  0 e 22 · · · A e 2m  A  e = , B   . .. . .. ..   .. . . e m2 · · · A e mm A 0   ··· 0 0  .. ..  .. . . e ij =  A .  ∈ Rκi ×κi , 0 · · · 1 i6=j ··· ⋆ ⋆  T e ij = 0 0 1 ∈ R1×κi , B e 12 · · · B e 22 · · · B .. .. . . 0 ···  0 ..  .  ∈ Rκi ×κj , 0 ⋆ T 0 ⋆ ∈ R1×κi . 0 ··· .. . . . . 0 ··· ⋆ ··· ··· j>i  e 1m B e 2m  B  , ..  .  e mm B (3a) (3b) (3c) P Herein, the κi ’s are the controllablity (or Kronecker ) indices, with m i=1 κi = n, and ⋆ denotes elee ments that are not necessarily zero. The transformed output matrix C does not have any specified structure. Obviously, a flat output is  z = z1 z2 · · · zm T  e1 x eκ1 +1 · · · = x 3 x en−κm +1 T (4) since  (k) with zi   h = z1 ż1 · · · T h x eκ1 +κ2 = z2 ż2 · · · x e1 x e2 · · · x eκ1 +1 x eκ1 +2 · · · x eκ1 T (κ1 −1) z1 (κ2 −1) z2 .. . x en−κm +1 x en−κm +2 · · · x en h = zm żm · · · T iT (5a) iT (κ −1) zm m iT (5b) , (5c) = dk zi /dtk . By a further derivation, and with the relations (5), it can simply be seen that (κ1 ) u = f u (z1 , ż1 , . . . , z1 (κm ) , . . . , zm , żm , . . . , zm ). (6) thatPfor the flat output z, we have κi = δi which follows from (3) and (4). Thus, δ = PNote m δ = m i i=1 i=1 κi = n which implies that with the flat output there is no zero dynamics (since δ = n). Given a sufficiently often differentiable reference trajectory z d , a tracking controller for the flat output can be designed such that lim (z(t) − z d (t)) = 0. Considering the error differential t→∞ equations (κ1 ) (z1 d (κ1 ) − z1 )+ κX 1 −1 (k) d (k) p1k (z1 − z1 )=0 (7a) k=0 (κm ) (zm − d (κm ) zm )+ κX m −1 .. . (k) d (k) pmk (zm − zm )=0 (7b) k=0 and the relations (5) and (6), a state feedback controller of the form e + F z d∆ , u = −K x (8) iT h d (κ ) d d with z d∆ = z1d ż1d · · · z1d (κ1 ) · · · zm żm · · · zm m , can be found which regulates the flat output z to its desired trajectory z d . Herein, the controller parameters pik must be chosen such that the dynamics (7) is stable. Remark 1: Flat outputs are not unique since every virtual output for which δ = n holds is a flat output (Martin et al., 1996). With the described approach, we get a tracking controller for z, but the goal is to design a tracking controller for the real output y. Note that the relationship from the virtual flat output to the real system output is given by h e z ż · · · y=C 1 1 (κ1 −1) z1 ··· zm żm · · · (κ −1) zm m iT . (9) The differential equations (9) can be used to calculate the virtual reference output z d from a desired reference output y d . Then, the feedback controller (8) regulates the flat output z to z d , which implies that y will be regulated to y d . 4 The problem of the FBT approach is that (9) describes the zero dynamics which is unstable in case of non-minimum phase systems. Thus, the solution of (9) might lead to unbounded reference signals z d and, therefore, needs unbounded control inputs u. A common way to bypass this problem is to approximate the virtual reference trajectory by a polynomial which fits the starting and ending point of the desired trajectory (Fliess, Sira-Ramirez, & Marquez, 1998). However, this method is only suitable for the change of the operating point along a specified trajectory, but not for the tracking of, e.g., sinusoidal signals. In addition, this approximation results in inexact tracking. Remark 2: An alternative way to handle non-minimum phase systems is provided by the stable inversion theory (Chen & Paden, 1996; Devasia et al., 1996), but the obtained control input is non-causal and can lead to large input signals (Tomlin et al., 1995). For minimum phase systems, (9) describes stable zero dynamics and the calculation of z d is unproblematic. In this case, the FBT approach provides an intuitive way to design a trajectory tracking controller. 2.2 Review of ORT For the ORT approach, it is assumed that the trajectory to be tracked is described by an autonomous linear system (the exosystem) ω̇ = Sω d y = Qω, (10a) (10b) with ω ∈ Rr , y d ∈ Rm . Like in the FBT approach, the goal is to design a feedback controller u = −Kx + F ω (11) which leads to a stable closed-loop system and achieves output regulation in the sense of (2). Without loss of generality, it is assumed that all eigenvalues of S have nonnegative real part since eigenmodes with negative real part vanish asymptotically. According to (Francis, 1977; Francis & Wonham, 1976), the following proposition is formulated. Proposition 2: The output regulation problem is solvable if and only if there exists a matrix pair (Π, Γ) solving the so-called regulator equations (sometimes called Francis equations) ΠS = AΠ + BΓ Q = CΠ. (12a) (12b) Then, control law (11) achieves output regulation (or tracking) if K is chosen such that A − BK is stable and F = KΠ + Γ. Since Proposition 2 is a well known result, the proof is omitted and can be found for instance in (Saberi et al., 2000). Remark 3: The feedback matrix K in (11) must be determined such that A − BK is stable. Thus, for the ORT approach it is sufficient to have a stabilizable system instead of a controllable system. The next proposition gives information about the solvability of the matrix equations (12). 5 Proposition 3: The regulator equations (12) are solvable if and only if rank (R(λ)) = rank  λI n − A −B C 0  =n+m for every λ which is an eigenvalue of S. This follows from a result presented in (Hautus, 1983). In this paper, an alternative proof will be derived in Section 3. Note that R(λ) is the Rosenbrock’s system matrix. Therefore, the rank condition in Proposition 3 implies that none of the systems invariant zeros coincide with an eigenvalue of S. Summing up, we conclude that if the reference trajectory is described by an exosystem of the form (10), tracking can be achieved by a feedback controller (11) if and only if the rank condition in Proposition 3 holds. It should be noted that the classical ORT can be used not only to track a desired reference trajectory, but also to reject disturbances. This will be achieved if the exosystem is extended by the disturbance dynamics that need to be rejected. However, since we are interested in output tracking, the disturbance rejection problem is not considered in the following. The problem of the ORT approach is that y d must be determined by an exosystem of the form (10). This restricts the class of treatable reference trajectories. For the FBT approach, the reference trajectory can be any function which is sufficiently often differentiable, however, with the drawback that – in contrast to the ORT approach – it is not directly applicable to non-minimum phase systems. Remark 4: The important class of Bohl functions (combinations of polynomial, exponential and sinusoidal signals) can be represented by exosystems (Trentelman, Stoorvogel, & Hautus, 2001). 3. From ORT to FBT In the following, an analytic solution of the regulator equations (12) is presented. Based on this analytic solution, it is shown that the tracking controller of the ORT is identical to the tracking controller of the FBT for systems with δ = n. Furthermore, the difficulties in case of δ < n are highlighted, and it is shown how the controller parameters given from ORT and FBT are correlated. For reasons of clarity, SISO systems are considered at first, before the general MIMO case is examined. 3.1 SISO systems Let system (1) be a SISO system with transfer function g(s) = b0 + b1 · s + . . . + b τ · s τ , a0 + a1 · s + . . . + an−1 · sn−1 + sn τ < n. (13) Without loss of generality, it is assumed that the system matrices are given in controllable canonical form, i.e.  0 1 ···  .. .. ..  . . A= .  0 0 ··· −a0 −a1 · · ·  0 .. . 1 −an−1   ,  6   0  ..    B = . , 0 1   b0  ..    CT =  .  . bτ  0 (14) Then, the regulator equations (12) read    π1 0 1 ··· π2   .. .. ..    . .  ..  S =  .  .   0 0 ··· −a0 −a1 · · · πn  Q = b0 · · · bτ 0 .. .     π1 0   π 2   ..     .   ..  +   Γ   .  0 1 −an−1 πn   π1    π2  0 · · · 0  ..  ,  .  (15a) 1 (15b) πn where the matrix Π is split into its row vectors. From the first n − 1 equations in (15a), it follows that π k = π 1 S k−1 , k = 2, . . . , n. (16) Taking this into account, the last equation in (15a) can be written as Γ = π 1 (a0 I r + a1 S + . . . + an−1 S n−1 + S n ) = π 1 N . {z } | (17) Q = π 1 (b0 I r + b1 S + . . . + bτ S τ ) = π 1 M . | {z } (18) π 1 = QM −1 (19) N Furthermore, from (15b) and (16), we get M Note that the coefficients b0 , . . . , bτ are the coefficients of the zero polynomial of the plant (cf. (13)). From the Cayley-Hamilton theorem (Gantmacher, 1959), it is clear that M is regular if and only if no plant zero coincides with an eigenvalue of the exosystem. In this case, (18) yields and, finally, the solution of the regulator equations reads    Π=  QM −1 QM −1 S .. . QM −1 S n−1    ,  Γ = QM −1 N . (20) The above derivation is also a proof for Proposition 3. Theorem 1: Given system (13) or (14) has no zero dynamics, i.e. δ = n, ORT and FBT lead to the same control law. Proof. First note that τ = 0 for δ = n, and y = b0 · x1 is a flat output. Thus, as described for the FBT approach, taking the error dynamics (y (n) − y d (n) ) + . . . + p1 (ẏ − ẏ d ) + p0 (y − y d ) = 0 7 (21) and considering (14), we get 1 (p0 · y d + p1 · ẏ d + . . . + y d (n) ) b0  p1 · · · 1 y d∆ , {z } u = −k1 · x1 − k2 · x2 − . . . − kn · xn +  = − k1 k2 · · · | {z  1  kn x + p0 b0 } | K (22) F T  with ki = pi−1 − ai−1 and y d∆ = y d ẏ d · · · y d (n) . The controller gain K and pre-filter F are determined by the parameters pk which are the coefficients of the specified error dynamics (21). In the ORT approach, the tracking controller is given by u = −Kx + (KΠ + Γ)ω. Furthermore, with (20) and M −1 = Πω = 1 b0  1 b0 I r , Qω QSω .. . (23) we have   yd ẏ d .. .     1         =    b0  n−1 d (n−1) QS ω y (24a) 1 Q(a0 I r + a1 S + . . . + an−1 S n−1 + S n )ω b0 1 = (a0 · y d + a1 · ẏ d + . . . + y d (n) ). b0 Γω = (24b) (24c) Therefore, the tracking controller can be written as  u = − k1 k2 · · · {z | K  1  k1 + a0 k2 + a1 · · · kn x + b } {z |0 F Substituting ki + ai−1 = pi−1 , (25) is exactly the same as (22).  1 y d∆ . } (25) It should be noted that the coefficients of the closed-loop characteristic polynomial are ki + ai−1 (since the system is in controllable canonical form). Thus, choosing ki = pi−1 − ai−1 , the closedloop characteristic polynomial and the tracking error dynamics (21) are both determined by the coefficients pi−1 . The above result shows that for systems without zero dynamics, ORT and FBT lead to the same control law. Thus, the following is a logical consequence. Corollary 1: In the ORT approach, the reference trajectory does not need to be determined by an exosystem of the form (10) if the plant has no zero dynamics. For systems without zero dynamics, we only need to know y d and its time derivatives up to the order y d (n) , like in the FBT approach. If there are zero dynamics, i.e. τ > 0, reformulating the feedforward part of the tracking controller as in (24) is not possible and the exosystem matrices S and Q appear in the control law (25). The next result presents how the ORT controller can be converted into a FBT-like control law even if the plant is determined by zero dynamics. Corollary 2: An exosystem formulation can be omitted if the plant zeros are canceled by closedloop poles. 8 Proof. Given that τ > 0 and taking (20) into account, the tracking controller (23) is written as   k1 I r + . . . + e kn S n−1 + S n ω, u = −Kx + QM −1 e {z } | (26) KS with e ki = ki + ai−1 . Furthermore, the controller gains can be chosen such that   K S = k1 I r + . . . + kτ +1 S τ b k1 I r + . . . + b kδ S δ−1 + 1 k τ +1  Sδ , (27) kj are the free parameters and δ = n − τ . Including (27) into (26), we see that for where ki and b ki = bi−1 the matrix M −1 cancels out, leading to  1  u = −Kx + Q b k1 I r + . . . + b kδ S δ−1 + S δ ω bτ   1 d (δ) d d (δ−1) b b . = −Kx + k1 · y + . . . + kδ · y ·y + bτ (28a) (28b) Note that the choice ki = bi−1 implies pole-zero cancellations in the closed-loop system (A − BK, B, C). However, (28) depends only on y d , ẏ d , . . . , y d (δ) and the exosystem can be omitted. Corollary 2 is not surprising since the transfer function of the closed-loop system is given by g(s) = 1 b0 + . . . + bτ · s τ b0 + . . . + bτ · sτ · = e k1 + . . . + kτ +1 · sτ b k1 + e k2 · s + . . . + sn k1 + . . . + 1 kτ +1 sδ , and choosing ki = bi−1 yields g(s) = 1 b1 + . . . + k bδ sδ−1 + k 1 δ bτ s . (29) Transfer function (29) describes a zero free system with reduced dynamical order δ = n − τ for which Theorem 1 is applicable. It is clear that Corollary 2 is only useful for minimum phase systems since for non-minimum phase systems the cancellation of zeros leads to an unstable behavior. Summarizing the results of Corollary 1 and 2, we conclude that the ORT tracking controller can be converted into a FBT-like control law. This also implies that for the ORT approach, the exosystem can be omitted in case of minimum phase systems. Only y d and its time derivatives up to order y d (δ) are needed for output tracking as in the FBT approach. It should be noted that for the ORT approach, the controller gain does not need to be determined as in Corollary 2, but then the reference trajectory must be provided by an exosystem. Thus, in contrast to the FBT approach, the ORT approach can handle unstable zero dynamics, albeit at the expense of the treatable class of reference trajectories. The results presented for SISO systems are extended to the MIMO case in the following. 9 3.2 MIMO systems Since system (1) is controllable, we can transform its system matrices into the MIMO controllable fx eu e+F e such that canonical form (3). In addition, it is always possible to choose u = −K eF eu e −B e K) f x e e + |{z} ė = (A B x {z } | ′ B A′ with  0 ··· A′11  0 A′ 22 · · ·  A′ =  .. .. ..  . . . 0 0 ···  0  ..  A′ii =  . 0 0 (30)   0 ··· B ′11 ′  0  B 22 · · ·   ′  , B =  .. .. ..  .  . . 0 0 ··· A′mm    0 1 ··· 0  ..  ..  .. . .   . . . B ′ii =  .  . , 0  0 ··· 1 1 0 ··· 0 0 0 .. . 0 0 .. . B ′mm    ,  (31a) (31b) e has no This means that system (30) is described by integrator chains of length κi . Note that C specific structure. Since such input and state transformations are always possible for controllable systems, in the following it is assumed that the MIMO system (1) is determined by   A11 · · · 0 B 11 · · ·   ..  . . .. ..  x +  ... .. ẋ =  . . 0 · · · Amm 0 ···   C 11 · · · C 1m  ..  x, .. y =  ... . .  C m1 · · · C mm   0 ..  u .  (32a) B mm (32b) where Aii and B ii are given as in (31). (The symbols f and ′ are omitted for simplicity.) Furthermore, we assume that the exosystem matrices are specified by  S1 · · ·  .. .. S= . . 0 ···  0 ..  .  Sm and  Q1 · · ·  .. .. Q= . . 0 ···  0 ..  , .  Qm (33) i.e. every reference output is described by its own exosystem S k ∈ Rrk ×rk , Qk ∈ R1×rk . This assumption is not restrictive since every output has (usually) its own reference trajectory.3 Partitioning the matrices Π and Γ in (12) as  Π11  ..  . Πm1 3 The ··· .. . ···  Π1m ..  .  and Πmm  Γ11  ..  . Γm1 ··· .. . ···  Γ1m ..  , .  Γmm assumption can be relaxed for the subsequent steps, but it considerably simplifies the derivations. 10 (34) it is not hard to see that Πij S j = Aii Πij + B ii Γij , i, j ∈ {1, . . . , m}. (35) Note that Aii and B ii are given as in (31b). With the result presented in Section 3.1, it follows immediately that   π 1ij π 1ij S j .. .     Πij =     κi −1 1 π ij S j and Γij = π 1ij S κj i . (36) Hence, the only unknowns are the row vectors π 1ij (i, j ∈ {1, . . . , m}), which can be determined from the second regulator equation (12b):  h Let C ij = c0ij Q1 · · ·  .. ..  . . 0 ··· c1ij ···   Pm ··· 0 l=1 C 1l Πl1 .. ..  =  .. . . .  P m Qm l=1 C ml Πl1 · · · κ −1 cijj Pm l=1 C 1l Πlm   .. . . Pm l=1 C ml Πlm (37) i , the entries in the k-th column block of (37) are given by m X π 1lk κX l −1 ν=0 l=1 | cνil S νk {z = } M kil ( Qk , i = k, 0, i= 6 k. (38) The index in M kil ∈ Rrk ×rk denotes the l-th summand of the i-th block entry in the k-th column block. Now, (38) can be rearranged to with the square matrix    π 1mk M k = 0 · · · π 11k · · ·  M k11 · · ·  .. .. Mk =  . . M k1m · · · Qk · · ·  0  M km1 ..  ∈ Rmrk ×mrk . .  (39a) (39b) M kmm Thus, given that M k is regular, the solution reads  1 π 1k · · ·   π 1mk = 0 · · · Remark 5: A simple construction rule for M k is M k = S k (C T ⊗ I rk ) Qk · · ·  0 M −1 k . (40) (41a) 11 where S k ∈ Rmrk ×nrk is defined as  I rk  .. Sk =  . 0 S kκ1 −1 · · · .. .. . . Sk · · · .. . 0 ··· 0 .. . ··· 0 I rk 0 .. . ··· Sk · · · 0 .. . S κk m −1   . (41b) From (40), it is clear that the solvability of the regulator equations depends on the invertibility of the matrices M k , k = 1, . . . , m. Hence, we have to check the regularity of M k . Proposition 4: M k is regular if and only if no invariant system zero coincides with an exosystem eigenvalue, i.e. if rank (R(λ)) = n + m for every λ which is an eigenvalue of S. The proof of Proposition 4 is given in Appendix A. The following theorem summarizes the results. Theorem 2: Given a plant in canonical form (31)–(32) and let the exosystem be described as in (33). Then, provided that M k (defined as in (41)) is regular, the solution of the regulator equations is determined by (36) and (40). e B, e C) e = (T e AT e −1 , T e B, C T e −1 ) into account, the solution of the Remark 6: Taking (30) and (A, regulator equations for the original system (1) is given by e −1 Π, Πorig = T e Γ − KΠ. f Γorig = F Theorem 2 provides an analytic solution of the regulator equations for MIMO systems in controllable canonical form. However, the canonical form (32) is not well suited to compare the ORT and FBT methods. Therefore, given the system output is flat, an alternative solution will be presented which is better suited to compare both methods. Let us consider the transformation matrix  C1 .. .     C 1 Aδ1 −1  .. T = .   C  m  ..  . C m Aδm −1        ∈ Rδ×n ,      (42) where C k is the k-th row vector of C. Note that rank (T ) = δ (cf. Appendix B). Furthermore, assume that y is a flat output such that δ = n and T is a square matrix. Applying the transformation (42), we get A′ = T AT −1 as in (31) and C ′ = CT −1  ′ C 11 · · ·  .. .. = . . 0 ···  0 ..  , .  C ′mm  with C ′kk = 1 0 · · ·  0 . (43) Due to the definition of the relative degrees, the input matrix changes to  B′ = T B = 0 · · · (d⋆1 )T · · · 0 ··· (d⋆m )T T , (44) with d⋆k = C k Aδk −1 B. It can easily be checked that A′ has the same integrator chain form as 12 before. The transformed system (A′ , B ′ , C ′ ) is suitable to prove the following claim. Theorem 3: ORT and FBT approach lead to the same control law for systems with δ = n, i.e. Theroem 1 also holds for MIMO systems. Proof. First note that the output of (A′ , B ′ , C ′ ) is a flat output (since δ = n). Thus, as described in Section 2.1, for the FBT controller we consider the error differential equations (δ ) d (δ1 ) (y1 1 − y1 )+ δX 1 −1 (k) d (k) p1k (y1 − y1 )=0 (45a) k=0 (δm ) (ym − d (δm ) ym ) + δX m −1 .. . (k) d (k) pmk (ym − ym ) = 0, (45b) k=0 leading to D ⋆ u − y dδ + P (x − y d∇ ) = 0, (46) with h iT T  d (δm ) D ⋆ = (d⋆1 )T · · · (d⋆m )T , y dδ = y1d (δ1 ) · · · ym h iT d (δm −1) d d y d∇ = y1d ẏ1d · · · y1d (δ1 −1) · · · ym , ẏm · · · ym   p10 · · · p1δ1 −1 · · · 0 ··· 0  .. . . ..  . . .. .. .. P = . .  0 ··· 0 · · · pm0 · · · pmδm −1 Therefore, the control law   u = −(D ⋆ )−1 P (x − y d∇ ) − y dδ (47) achieves the desired tracking behavior. Note that the inverse (D⋆ )−1 exists, which follows from (44). Since T is a regular matrix and rank (B) = m, it is clear that rank (B ′ ) = m and, therefore, rank (D⋆ ) = m. Next, we consider the ORT approach. Apparently, for u = (D ⋆ )−1 u′ we get completely decoupled SISO systems where the k-th SISO system is zero free with dynamical order δk (the k-th transfer function reads yk (s)/u′k (s) = 1/sδk ). Thus, we can use the results of Section 3.1 and the ORT tracking controller for the k-th SISO system is given by (cf. (25))  u′k = − pk0 · · · or after some rearrangements u′k = −    pkδk −1 xk + pk0 · · · pk0 · · ·  pkδk −1 1 y d∆,k   d (δ ) pkδk −1 (xk − y d∇,k ) − yk k , 13 (48) (49) with iT h y d∆,k = (y d∇,k )T ykd (δk ) , iT h y d∇,k = ykd ẏkd · · · ykd (δk −1) , h iT Pk · · · x xk = xPk−1 . δ +1 δ j=1 j j=1 j Stacking the vectors together for all k = 1, . . . , m, i.e. T  y d∇ = (y d∇,1 )T · · · (y d∇,m )T ,  T x = xT , · · · xT m 1 u′ is given by   u′ = − P (x − y d∇ ) − y dδ , and   u = (D ⋆ )−1 u′ = −(D ⋆ )−1 P (x − y d∇ ) − y dδ (50) which is identical to (47). From the above prove, it is clear that Corollary 1 is also true in the MIMO case. Furthermore, similar to Corollary 2, we have the following result for MIMO systems with δ < n. Corollary 3: Given that D⋆ is invertible, the invariant zeros can be compensated by closed-loop poles and an exosystem formulation can be omitted. Proof. Let us define the matrix  T  tδ+1    T n =  ..  ∈ Rn×n ,  .  tn (51) where T is determined as in (42) and tδ+1 , . . . , tn are chosen such that T n is regular. For the −1 transformed system An = T n AT −1 n , B n = T n B, C n = CT n , we get   A′ Aδ An = , Aφ Aη  B′ , Bn = Bη    Cn = C′ 0 , with A′ ∈ Rδ×δ , B ′ ∈ Rδ×m , C ′ ∈ Rm×δ as before, and   Aδ,1  ..  Aδ =  .  ∈ Rδ×(n−δ) , Aδ,m Aδ,k 14  0 ···  ..  = . 0 · · · ⋆ ···  0 ..  .  ∈ Rδk ×(n−δ) . 0 ⋆ (52) The matrices Aφ ∈ R(n−δ)×δ , Aη ∈ R(n−δ)×(n−δ) and B η ∈ R(n−δ)×m do not have any specific  T structure. Let us denote the last row of Aδ,k as A⋆δ,k and A⋆δ = (A⋆δ,1 )T · · · (A⋆δ,m )T . Then,   provided that D⋆ is invertible, we can design a feedback controller with gain K n = (D ⋆ )−1 0 A⋆δ such that the closed-loop system matrix reads   A′ 0 An − B n K n = , Aφ A′η with A′η = Aη − B η (D ⋆ )−1 A⋆δ . (53) The dynamics A′η are not observable and represent the internal dynamics of the system. The reduced system (A′ , B ′ , C ′ ) – with dynamical order δ – has no zero dynamics and Theorem 3 is directly applicable for it. This means that, like in the SISO case, we can compensate the zero dynamics by an appropriate feedback and design the tracking controller without an exosystem. Note that the eigenvalues of the internal dynamics A′η are the invariant zeros of the plant. If there are invariant zeros in the closed right half of the complex plane, the controller K n leads to an unstable closed-loop behavior. Additionally to the minimum phase characteristics of the plant, there is another restriction on the zero compensation approach in case of MIMO systems. For the compensation gain K n , it is required that D⋆ is invertible. Thus, the compensation approach is only applicable for systems with regular D⋆ . Remark 7: For δ = n, D⋆ is regular as shown in the proof of Theorem 3, but for δ < n this must not be true. It should be noted that if the FBT approach is directly applied to systems with δ < n, this results into the zero compensation method described above. Then, the error dynamics (45)–(46) or the tracking controller (47) leads to an input-output decoupled system for which the internal zero dynamics are made unobservable by pole-zero compensations. In this case, the regularity of D⋆ is a necessary (and sufficient) condition for the zero compensation or input-output decoupling (cf. e.g. (Falb & Wolovich, 1967)), and leads to unstable closed-loop dynamics for non-minimum phase systems. However, the ORT approach enables tracking even if the system is non-minimum phase or if D ⋆ is singular. The only requirement is that the plant is stabilizable and that no invariant zero coincides with an eigenvalue of the exosystem. It is not necessary to compensate the zero dynamics, but then the reference trajectory must be provided by an exosystem. 4. Conclusion Two different approaches for the trajectory tracking problem of multivariable linear systems have been considered: the output regulation theory (ORT) and the flatness based tracking (FBT). It has been shown that both methods lead to identical tracking controllers if the output of the plant is flat. Moreover, an analytic solution of the regulator equations has been derived which sheds new light into the tracking controller of the ORT. Based on this solution, the connection to the FBT approach has been discussed and it has been shown that an exosystem formulation for the reference trajectory can be omitted if the controller parameters are chosen appropriately. In case of non-minimum phase systems, however, this special choice leads to an unstable closed-loop behavior. An interesting point for future research would be to extend the results of this paper to nonlinear systems. One of the main difficulties is to find an analytic solution of the regulator equations which in the nonlinear case are partial differential equations. Presumably, a solution in closed form may be impossible to find. 15 References Benvenuti, L., Di Benedetto, M. D., & Grizzle, J. W. (1994). Approximate output tracking for nonlinear non-minimum phase systems with an application to flight control. International Journal of Robust and Nonlinear Control, 4 (3), 397–414. Brockett, R., & Mesarovic, M. D. (1965). The reproducibility of multivariable systems. Journal of Mathematical Analysis and Applications, 11, 548–563. Chen, D., & Paden, B. (1996). Stable inversion of nonlinear non-minimum phase systems. International Journal of Control, 64 (1), 81–97. Davison, E. J. (1976). The robust control of a servomechanism problem for linear time-invariant multivariable systems. IEEE Transactions on Automatic Control, AC-21 (1), 25–34. Devasia, S., Chen, D., & Paden, B. (1996). Nonlinear inversion-based output tracking. IEEE Transactions on Automatic Control, 41 (7), 930–942. Falb, P. L., & Wolovich, W. (1967). Decoupling in the design and synthesis of multivariable control systems. IEEE Transactions on Automatic Control, AC-12 (6), 651–659. Fliess, M., Levine, J., Martin, P., & Rouchon, P. (1995). Flatness and defect of non-linear systems: introductory theory and examples. International Journal of Control, 61 (6), 1327–1361. Fliess, M., Levine, J., Martin, P., & Rouchon, P. (1999). A Lie-Bäcklund approach to equivalence and flatness of nonlinear systems. IEEE Transactions on Automatic Control, 44 (5), 922–937. Fliess, M., & Marquez, R. (2000). Continuous-time linear predictive control and flatness: a module-theoretic setting with examples. International Journal of Control, 73 (7), 606–623. Fliess, M., Sira-Ramirez, H., & Marquez, R. (1998). Requlation of non-minimum phase outputs: a flatness based approach. In D. Normand-Cyrot (Ed.), Perspectives in Control (pp. 143–163). London: Springer. Francis, B. A. (1977). The linear multivariable regulator problem. SIAM Journal on Control and Optimization, 15 (3), 486–505. Francis, B. A., & Wonham, W. M. (1976). The internal model principle of control theory. Automatica, 12 (5), 457–465. Gantmacher, F. R. (1959). The theory of matrices. New York, NY: Chelsea. Hagenmeyer, V., & Delaleau, E. (2003). Exact feedforward linearization based on differential flatness. International Journal of Control, 76 (6), 537–556. Hagenmeyer, V., & Zeitz, M. (2004). Internal dynamics of flat nonlinear SISO systems with respect to a non-flat output. Systems & Control Letters, 52 (3–4), 323–327. Hauser, J., Sastry, S., & Meyer, G. (1992). Nonlinear control design for slightly non-minimum phase systems: application to V/STOL aircraft. Automatica, 28 (4), 665–679. Hautus, M. L. J. (1983). Linear matrix equations with applications to the regulator problem. In I. D. Landau (Ed.), Outils et Modéles Mathèmatique pour l’Automatique (pp. 339–412). Paris: C.N.R.S. Hirschorn, R. M. (1979). Invertibility of multivariable nonlinear control systems. IEEE Transactions on Automatic Control, AC-24 (6), 855–865. Huang, J. (2004). Nonlinear Output Regulation: Theory and Applications. Philadelphia: SIAM. Isidori, A., & Byrnes, C. I. (1990). Output regulation of nonlinear systems. IEEE Transactions on Automatic Control, 35 (2), 131–140. Lohmann, B. (1991). Vollständige und teilweise Führungsentkopplung im Zustandsraum. PhD thesis, Universität Karlsruhe, Germany. Luenberger, D. G. (1976). Canonical forms for linear multivariable systems. IEEE Transactions on Automatic Control, 12 (3), 290–293. MacFarlane, A. G. J., & Karcanias, N. (1976). Poles and zeros of linear multivariable systems: a survey of the algebraic, geometric and complex-variable theory. International Journal of Control, 24 (1), 33–74. Martin, P., Devasia, S., & Paden, B. (1996). A different look at output tracking: control of a VTOL aircraft. Automatica, 32 (1), 101–107. Rothfuss, R., Rudolph, J., & Zeitz, M. (1996). Flatness based control of a nonlinear chemical reactor model. Automatica, 32 (10), 1433–1439. Saberi, A., Stoorvogel, A. A., & Sannuti, P. (2000). Control of Linear Systems with Regulation and Input Constraints. London: Springer. Sain, M. K., Massey, J. L. (1969). Invertibility of linear time-invariant dynamical systems. IEEE Transactions on Automatic Control, AC-14 (2), 141–149. 16 Silvermann, L. M. (1969). Inversion of multivariable linear systems. IEEE Transactions on Automatic Control, AC-14 (3), 270–276. Tomlin, C., Lygeros, J., Benvenuti, L., & Sastry, S. (1995). Output tracking for a non-minimum phase dynamic CTOL aircraft model. Proceedings of the 34th IEEE Conference on Decision and Control, New Orleans, USA (pp. 1867–1872). Trentelman, H. L., Stoorvogel, A. A., & Hautus, M. L. J. (2001). Control Theory for Linear Systems. London: Springer. Appendix A. Proof of Proposition 4 Let us define the matrices Ξk ∈ R(n−m)rk ×nrk and Ψk ∈ Rnrk ×(n−m)rk :    0 −I rk · · · 0    ..  .. .. .. (κ1 − 1) · rk rows .  . . .     0  0 · · · −I rk     . . Ξk =   .      0 −I · · · 0  r k     . . . .. .. .. ..  (κm − 1) · rk rows   .   0 0 · · · −I rk     Sk 0 ··· 0       −I rk S k · · · 0       . .   .. .. −I rk κ1 · rk rows   0   .   .. ..   .  . Sk  .   .     0  0 · · · −I rk        .. Ψk =   .        S 0 · · · 0   k       −I S · · · 0   rk k     . .  .. ..  0 −I rk κm · rk rows       . . .  ..   .. ..  S  k      0 0 · · · −I rk where the empty entries are all zero. Then, the following equation holds   i  T Ξk h T C Φ Ξ k k k = S k |Ψk {zC k } 0 Mk | {z } Θk with    Φ k = Ξk Ψ k =   I rk 0 .. . 0 Zk −S k · · · .. . I rk .. .. . . ··· ··· 17  0 ..  .   ∈ R(n−m)rk ×(n−m)rk . −S k  I rk (A1) Note that Θk on the left-hand side of (A1) is regular since there is exactly one identity matrix in every column and row block. Therefore, the regularity of the matrix on the right-hand side of (A1) depends on the regularity of Z k . Obviously, Φk is a regular matrix, thus, M k is regular/singular if Z k is regular/singular. However, Z k is regular if and only if no invariant system zero coincides with an exosystem eigenvalue. To see this, consider the Rosenbrock’s system matrix  λ −1 · · · .. . 0 λ .. .. .. . . .        0   R(λ) =           0 ··· 0 .. . 0 −1 λ 0 −1  0 .. .. . λ −1 · · · .. . 0 λ .. .. .. . . . 0 0 ··· . 0 .. . 0 0 .. . −1 λ C −1 0          .          (A2)  Expanding from the last m columns, it is clear that rank (R(λ)) = rank R(λ) , where R(λ) is the P matrix which results from deleting the last m columns and the rows ji=1 κi for all j = 1, . . . , m:          R(λ) =          λ −1 0 · · · 0 λ −1 · · · .. .. .. .. . . . . 0 0 ··· λ  0 0 .. . −1 .. . λ −1 0 · · · 0 λ −1 · · · .. .. .. .. . . . . 0 0 ··· λ C 0 0 .. . −1         .         (A3) Note that R(λ) is singular for every λ which is an invariant zero of the system or, equivalently, the invariant zeros are the roots of the polynomial P (λ) = det R(λ) . Comparing (A3) with Z k , it T can be seen that Z T k is equal to (R(λ) ⊗ I rk ) if λ is replaced by S k , i.e. Z k = (R(λ) ⊗ I rk )|λ=S k . Using determinant and Kronecker product rules, we know that the following identity holds:   det R(λ) ⊗ I rk = det R(λ) det (I rk ) = det R(λ) = P (λ). Thus, by the Cayley-Hamilton theorem, the matrix P (S k ) = (P (λ) ⊗ I rk )|λ=S k is regular if and only if no invariant zero of the plant coincides with an eigenvalue of S k . This implies that Z k is regular and since regularity of M k is equivalent to regularity of Z k , Proposition 4 is proved. 18 Appendix B. Rank of transformation matrix T It is shown that the rank of the matrix T in (42) is δ. The proof is inspired by (Lohmann, 1991) and given as follows. Consider the equation  λij I n − A −B C 0     v ij 0 = , wij ei i = 1, . . . , m, j = 1, . . . , δi , (B1) where ei is the unit vector with the i-th element equal to 1 and all other elements 0. The matrix on the left-hand side of equation (B1) is the Rosenbrock’s system matrix. Thus, choosing λij different from the invariant zeros, (B1) can be solved for v ij and wij . In this case, the second row block of (B1) yields ( 1, C k vij = 0, k = i, k 6= i. (B2) Multiplying the first row block of (B1) with C k , . . . , C k Aδk −2 leads to ( λij , k = i, C k Av ij + C k B wij = | {z } 0, k= 6 i, (B3a) 0 .. . ( δi −1 λij , k = i, C k Aδk −1 v ij + C k Aδk −2 B wij = {z } | 0, k= 6 i. (B3b) 0 Eqs. (B2) and (B3) are written in a more compact way as    Ck .. . C k Aδk −1    v ij = ( Λij , k = i, 0, k= 6 i, with  1 λij .. .      Λij =  .   δi −1 λij This procedure is repeated for all j = 1, . . . , δi , leading to   with Λi = Λi1 · · · that   Ck .. . CkA     v i1 · · · v iδi = {z } δk −1 | Vi ( Λi , 0, k = i, k 6= i, (B4)  Λiδi . Writing (B4) for all k, i ∈ {1, . . . , m} in a matrix, it can easily be seen  Λ1 · · ·    . .. T V 1 · · · V m =  .. . {z } | 0 ··· V ∈Rn×δ 19  0 ..  ∈ Rδ×δ , .  Λm (B5) where T is given as in (42). Note that the matrices    Λi =   1 λi1 .. . ··· ··· λδi1i −1 · · · 1 λiδi .. . δi −1 λiδ i     ∈ Rδi ×δi  are Vandermonde matrices which are regular if all the numbers λij are distinct. Thus, for distinct λij , the matrix on the right-hand side of (B5) is regular. But this is only possible if the rank of both matrices T and V on the left-hand side of (B5) is δ. 20
3cs.SY
Fast and Scalable Inference of Multi-Sample Cancer Lineages Victoria Popic1 , Raheleh Salari1 , Iman Hajirasouliha1 , Dorna Kashef-Haghighi1 , Robert B West2 and Serafim Batzoglou1* 1 2 Department of Computer Science, Stanford University, Stanford, CA Department of Pathology, Stanford University School of Medicine, Stanford, CA arXiv:1412.8574v1 [cs.CE] 30 Dec 2014 Abstract Somatic variants can be used as lineage markers for the phylogenetic reconstruction of cancer evolution. Since somatic phylogenetics is complicated by sample heterogeneity, novel specialized tree-building methods are required for cancer phylogeny reconstruction. We present LICHeE (Lineage Inference for Cancer Heterogeneity and Evolution), a novel method that automates the phylogenetic inference of cancer progression from multiple somatic samples. LICHeE uses variant allele frequencies of SSNVs obtained by deep sequencing to reconstruct multi-sample cell lineage trees and infer the subclonal composition of the samples. LICHeE is open-sourced and available at http://viq854.github.io/lichee. Background Cancer is driven by the accumulation of somatic mutations that confer fitness advantages to the tumor cells. Numerous studies have shown tumors to be highly heterogeneous, consisting of mixtures of cell subpopulations with distinct sets of somatic variants (for example see review papers [1, 2]). With the advent of nextgeneration sequencing technologies, many large-scale efforts are underway to catalog the somatic mutational events driving the progression of cancer [3, 4] and infer the phylogenetic relationships of tumor subclones. Characterizing the heterogeneity and inferring tumor phylogenies are key steps for developing targeted cancer therapies [5] and understanding the biology and progression of cancer. In order to reconstruct tumor phylogenies, studies have utilized variant allele frequency (VAF) data of somatic single nucleotide variants (SSNVs) obtained by whole-genome [6, 7], exome [8], and targeted deep sequencing [6, 9]. Clustering of SSNVs based on VAF similarity [10–12] and detection of copy number aberrations, while accounting for variable sample purity [8, 13, 14], have been used to differentiate and order groups of mutational events. While many evolutionary studies of cancer have focused on single-sample intra-tumor heterogeneity [15], several studies have also compared multiple tumor samples extracted from a single patient either at different points in time during cancer progression [16–18] or from different regions of the same tumor or its metastases [7,19–23]. In multi-sample approaches, the patterns of SSNV sharing (i.e., distinguishing somatic mutations that are omnipresent, partially shared, or private among the samples) can serve as phylogenetic markers from which lineage trees are reconstructed [24]. On the basis of * Correspondence: [email protected] the lineage trees, the evolutionary timing of each mutational event can then be inferred with high confidence [7, 17, 19, 25]. Most existing multi-sample studies with a relatively small number of SSNVs infer the tumor phylogenies manually by analyzing SSNV VAFs and presence patterns across samples [7, 22, 26]. Several other studies used implementations of traditional phylogeny reconstruction methods, such as neighbor joining with Pearson correlation distances [27], or maximum parsimony [21] on patterns of somatic mutational sharing across samples. However, in order to scale to datasets comprised of large numbers of samples per patient and extract fine-grained SSNV timing information, as well as handle sample heterogeneity, which traditional treebuilding techniques are not designed to do, specialized computational approaches need to be developed for tumor cell lineage reconstruction. Two recent computational methods, SubcloneSeeker [28] and PhyloSub [29], have been developed to address this need. The method SubcloneSeeker requires as input clusters of variant cell prevalence (CP) estimates that need to be obtained by processing the data using other existing tools. Given the CP clusters, the method generates all possible subclone structures in each sample separately. The persample solutions are then trimmed by checking their compatibilities during the merge step. However, the merge step is designed to check compatibilities of two tumor samples only (e.g. relapse/primary tumor sample pairs that are common in clinical studies) and it cannot merge the subclone structures of more than two samples. Currently it only reports which sample trees are compatible across the given pair of samples. The method PhyloSub performs reasonably on samples with very few mutations that form simple (chain) topologies; however, it produces unsatisfactory results on larger multi-sample datasets, such as [21] (see Appendix A for details). Page 2 of 18 In this work we introduce LICHeE (Lineage Inference for Cancer Heterogeneity and Evolution), a novel computational method for the reconstruction of multisample tumor phylogenies and tumor subclone decomposition from targeted deep sequencing SSNV datasets. Given SSNV VAFs from multiple samples, LICHeE finds the set of lineage trees that are consistent with the SSNV presence patterns and VAFs within each sample and are valid under the cell division process. Given each such tree, LICHeE provides estimates of the subclonal mixtures of the samples by inferring sample heterogeneity simultaneously with phylogenetic cell lineage tree reconstruction. LICHeE is able to search for lineage trees very efficiently by incorporating the SSNVs into an evolutionary constraint network that embeds all such trees and applying VAF constraints to reduce the search space. LICHeE runs in only a few seconds given hundreds of input SSNVs and does not require data preprocessing. We demonstrate that LICHeE is highly effective in reconstructing the lineage trees and sample heterogeneity by evaluating it on simulated trees of heterogeneous cancer cell lineage evolution, as well as on three recently published ultra-deep sequencing multi-sample datasets of clear cell renal cell carcinoma (ccRCC) by Gerlinger et. al [21], high-grade serous ovarian cancer (HGSC) by Bashashati et. al [27], and breast cancer xenoengraftment in immunodeficient mice by Eirew et. al [30], for which single-cell validation results are also available. LICHeE found unique trees for each ccRCC patient and for all except one patient (for which multiple valid trees were found) of the HGSC study. For the ccRCC dataset, LICHeE trees were nearly identical to the published trees, which are the result of a multistep thorough analysis of the data, involving SSNV calling, clustering, and tree-building using maximum parsimony. For the HGSC dataset, LICHeE improved on the results reported by the study, producing trees with better support from the data. LICHeE also revealed additional heterogeneity in the samples of both studies. In particular, LICHeE identified subclones in one more sample of the ccRCC study (in addition to the reported six samples) and three samples of the HGSC study, all supported by the data. Finally, the trees reconstructed by LICHeE on the xenoengraftment dataset can be highly-validated by the singlecell analysis presented in the paper. LICHeE is opensource and freely distributed at [31], and includes an intuitive graphical user interface (GUI) that may aid users to perform quality control on the output trees as well as interpret the trees biologically. Results and Discussion Overview of the Multi-Sample Cancer Phylogeny Inference Method, LICHeE LICHeE is a method designed to reconstruct cancer cell lineages using SSNVs from multiple related normal and tumor samples of individual cancer patients, allowing for heterogeneity within each sample. Given a set of validated deeply sequenced SSNVs, LICHeE uses the presence patterns of SSNVs across samples and their VAFs as lineage markers by relying on the perfect phylogeny model [32]. This model assumes that mutations do not recur independently in different cells; hence, cells sharing the same mutation must have inherited it from a common ancestral cell. This assumption can be used to derive the following SSNV ordering constraints. Firstly, (1) a mutation present in a given set of samples cannot be a successor of a mutation that is present in a smaller subset of these samples, since it could not have arisen independently by chance in the additional samples. Similarly, (2) a given mutation cannot have a VAF higher than that of its predecessor mutation (except due to CNVs), since all cells containing this mutation will also contain the predecessor. Finally, (3) the sum of the VAFs of mutations disjointly present in distinct subclones cannot exceed the VAF of a common predecessor mutation present in these subclones, since the subclones with the descendent mutations must contain the parent mutations (this constraint is formally defined in the Methods section). These constraints provide key information about the topology of the true cell lineage tree and are leveraged by LICHeE to define the search space of the possible underlying lineage trees and evaluate the validity of the resulting topologies. The final goal of LICHeE is to find phylogenetic trees encoding an evolutionary ordering of the input SSNVs that does not violate any of these three constraints. At a high level, the LICHeE algorithm can be broken down into the following main steps (Figure 1). First, LICHeE partitions SSNVs into groups based on their occurrence in each sample, such that each group stores all the mutations that were called in the same subset of samples. To separate subclone lineages, the SSNV members of each resulting group are then further clustered based on their VAFs, such that SSNVs with similar VAFs across samples are clustered together. The final lineage tree needs to provide a valid ordering of these resulting SSNV clusters (i.e. an ordering that does not violate the three constrains defined above). In order to find such a tree, we construct an evolutionary constraint network, which encodes whether a given cluster of SSNVs could have preceded another, for each pair of clusters. More specifically, this network is an acyclic directed graph (DAG) that has SSNV clusters Page 3 of 18 ✢✣✤ ✤❀❁ ✦r✩ ✚❡s ✫❛r✩ss s✫♠✦✚❡s ✢❂ ❃❃❃ ✢❄ ❫❴ ●❡r♠✚✛✜❡ ✢✣✤ ▲② ✁✂ ❙✄❙☛ ❙✑ ❙✙ ✵✯✰ ✢✢✣✤s ✥✦r❡s❡✜t ✛✜ s✧★s❡ts ✩✪ s✫♠✦✚❡s✱ ✜✩t ✛✜ ✚✬♠✦✭✮ ✴✳ ✲ ✹✺✻✼③♦✽✻ ❇✾✽✿✺✼ P✺♦ ❧✻ ✄ ✄ ✄ ✄ ✄ ✵ ✄ ✄ ✄ ✵ ✵ ✄ ✵ ✄ ✄ ✵ ✵ ✄ ✄ ✵ ✵ ✵ ✵ ✵ ✄ ❜❴ ✢✢✣✤ ●r✩✧✦s ❙✄ ❙☛ ❙✑ ✢✧★✦✩✦✧❅ ✚✫t✛✩✜ ❛✚✧st❡rs ❵❴ ✵✯✰ ✞✝ ✆☎ ❱ ❙✄ ▼✻✿✽ ❆❈❉❑■❋ ❈❉❑❋ ❈❉❊❏ ✵✯✰ ❆❈❉❍❋❈❉❊❋❈❉❍❏ ✎✏ ☞✌✍ ✵✯✰ ✟✠✡ ❙☛ ❙☛ ❙✑ ❙✑ ❙✙ ✵✯✰ ✵✯✰ ❆❈❉❊❋ ❈❉❊❋ ❈❉❍■❏ ✞✝ ✆☎ ❱ ❙✙ ✵✯✰ ✕✖ ✒✓✔ ✵✯✰ ✟✠✡ ❙✑ ✵✯✰ ❆❈❉❊❋ ❈❉❍■❏ ✆☎ ✘✝ ❱ ✽♦✾♥✻ ✶✷✸ ✟✠✡ ❙✑ ✗✝ ✆☎ ❱ ❆❈❉❍❏ ✵✄✄✄✵ ❞❴ ❖✈✩✚✧t✛✩✜✫r✬ ❛✩✜str✫✛✜t ✜❡t✇✩r❦ ✵✵✄✄✵ ❣✻✺◆❧✾✽✻ ❆❈❉■❋❈❉■❋❈❉■❋❈❉■❋❈❉■❏ ✄✄✄✄✄ ✵✄✄✄✵ ❚❯❲ ❝♦✽♥❳✺✿✾✽❳ ❨✾♦❧✿❳✾♦✽ ✵✵✵✵✄ ✵✄✵✄✄ ✢✫♠✦✚❡ ❛✩♠✦✩s✛t✛✩✜ ❩✬♠✦✭ ❢❴ ❖✈✩✚✧t✛✩✜✫r✬ ✚✛✜❡✫◗❡ tr❡❡ ✫✜❘ s✫♠✦✚❡ ❛✩♠✦✩s✛t✛✩✜ ✢✫♠✦✚❡ ❬ ✵✄✄✄✵ ✄✄✄✄✄ ✵✄✄✄✵ ✢✫♠✦✚❡ ❭ ✵✵✄✄✵ ✢✫♠✦✚❡ ❪ ✵✄✵✄✄ ✵✵✵✵✄ ✢✫♠✦✚❡ ❄ Figure 1 (a) Toy example of five samples (Lymph control and four tumor samples S1– S4) with one germline SNV and four SSNVs, each associated with a binary sample profile. (b) SSNVs are partitioned into groups based on their binary profile (displayed groups contain other SSNVs with varying VAFs). (c) Group SSNV are clustered based on their VAFs. (d) The clusters of each SSNV group are incorporated into an evolutionary constraint network. An edge is placed between a parent and child node if, for each sample, the VAF of the parent is greater than or equal that of the child node. For example, this constraint is violated for the green 01110 node and node 00110. (e) The lineage tree is constructed from the constraint network. The leaves of the tree are the individual samples. The horizontal line subdivisions in a sample indicate mixed lineages, separating the different subpopulations of cells in the sample. The colors in each subdivision describe the mutation groups that the cells in this subpopulation have. Consider the orange node 01110, which denotes SSNVs of class 01110. Those SSNVs are found in samples 1, 2, and 3. After an ancestral cell division, the daughter cells’ lineages accumulated SSNVs too (01110, green; 00110) that are now present in their descendant samples or subclones. About 20% of sample 1 are cells that come from the orange and green lineage, and about 40% come from the blue lineage. Samples 1, 2, and 3 grew from two or more subclones, whereas sample 4 only grew from one subclone. as its nodes and whose edges encode possible predecessor relationships among the nodes’ mutations (i.e. an edge denotes that the mutations of a given pair of clusters satisfy ordering constraints (1) and (2)). This network greatly reduces the search space of possible valid trees and allows us to formulate the task of inferring such trees as a search for spanning trees of the network that satisfy constraint (3) (within a given error margin), which ensures that the reconstructed trees are composed of parent-daughter edges that exhibit somatic VAF consistency with the cell lineage expansion. If multiple valid lineage trees are found during the search, the trees are ranked based on how well they support the cluster VAF data, the top-ranking Page 4 of 18 tree minimizing the use of the permitted error margin (see Methods for details). Finally, as shown in Figure 1, the leaves of the resulting trees are the individual samples (added post-search), whose composition can be reconstructed by tracing back their respective subclone cell lineages in the tree. We detail each of these steps in Methods. Since finding true SSNV groups is a crucial step of the algorithm, it is important to minimize false positive and false negative SSNV calls across samples. However, accurately detecting SSNVs in each sample is a challenging task due to high levels of noise in the data, which can come from various sources, such as sequencing errors, systematic amplification bias, mapping errors, and sample impurities. Multiple techniques have been developed to address this problem to date [33–37], many employing a Bayesian approach to model the distributions of noise and true genotypes in matched-normal samples. LICHeE can work with variant calls produced for each sample by any specialized existing method. However, it does not require the users to pre-process the data using these tools, providing its own heuristic mechanism to call SSNVs using the multi-sample VAF data. At a high level, it first finds SSNVs that can be called reliably in each sample using two hard thresholds Tpresent and Tabsent , above and below which, respectively, the SSNV are considered robustly present or absent. Then, assuming that the presence patterns of such SSNVs capture most of the topology of the true underlying evolutionary tree, it uses this inferred tree to inform the group assignment of the SSNVs whose VAF falls in between the thresholds (the ’greyzone’). Currently LICHeE does not automatically detect or incorporate the CNVs explicitly into the model, although the method can still find valid phylogenies even in the presence of SSNVs within such regions (for example, each patient in the ccRCC dataset had numerous variants from CNV regions). In order to address this limitation, LICHeE also accepts cell prevalence (CP) values instead of VAFs, which can be computed by several recently-developed tools, such as PyClone [12], ABSOLUTE [8], and ASCAT [38], and account for CNVs, LOH status, and sample purity. The same algorithmic steps can then be directly applied to CP values of each variant. It can be easily seen that the three perfect phylogeny ordering constraints still hold for CP values and can be used to search for the underlying lineage tree. Furthermore, in order to support outputs of specialized clustering approaches (e.g. PyClone [12]), LICHeE also accepts already computed clusters of mutations (with given CP and VAF-based centroid values) and uses these clusters as nodes of the phylogenetic constraint network. We evaluated LICHeE on three recently published ultra-deep sequencing multi-sample datasets of clear cell renal cell carcinoma (ccRCC) by Gerlinger et. al [21], high-grade serous ovarian cancer (HGSC) by Bashashati et. al [27], and breast cancer xenoengraftment by Eirew et. al [30], as well as on simulated trees of heterogeneous cancer cell lineage evolution. On the ccRCC dataset, LICHeE constructs near-identical trees to the trees published in the study. We show that the interesting difference in the topology of one tree arises due to potential heterogeneity of a sample that cannot be discovered using the traditional maximum parsimony approach and analyze when this approach can fail to detect existing sample subclones. For each patient LICHeE finds a unique valid tree. On the HGSC datasets we show that the trees generated by LICHeE are better supported by the data and demonstrate why applying neighbor joining with Pearson correlation distance metric, used by the study, might not be suitable for cancer datasets. LICHeE finds a unique valid tree for all patients except Case5. Finally, we show that the trees inferred by LICHeE on the xenoengraftment dataset are consistent with the single-cell analysis done by the study. On each patient dataset LICHeE takes only a few seconds to run. Lineage Tree Reconstruction on ccRCC Data The ccRCC study by Gerlinger et. al [21] validated 602 nonsynonymous nucleotide substitutions and indels from multiple samples of 8 individuals. It used VAF-based clustering of each sample to detect subclones prior to determining the variant presence patterns used in tree reconstruction. The phylogenetic trees were then reconstructed using maximum parsimony, revealing a branched pattern of ccRCC evolution in all tumors. Figure 2 juxtaposes the trees produced by LICHeE with the trees presented by Gerlinger et. al [21] (for details about the parameters used by LICHeE and the ccRCC dataset see Appendix B). The trees presented in the figure have been redrawn using AI. We can see that the trees generated by LICHeE are topologically identical (consisting of the same branches) to the published trees for patients EV005, EV007, RMH002, RMH008, and RK26. Furthermore, LICHeE identified subclones in all the samples reported to be heterogeneous by the study. In particular, it identified the following regions as a mixture of two subclones: R6 in EV005 (with frequencies of 0.29 and 0.04), R3 and R9 in EV007 (with frequencies of 0.15 and 0.03 and 0.21 and 0.03, respectively), R4 and R6 in RMH008 (with frequencies of 0.19 and 0.14 and 0.21 and 0.15, respectively), and R5 in RK26 (with frequencies of 0.15 and 0.03). These subclones correspond to the dominant (dom) and minor (min) shown Page 5 of 18 GL GL 6 27 4 21 3 2 1 2 1 R1 R2 R5 R3 R6 R4 1 1 R9 R7 RK26 1 2 6 R9 R10 R5 R8 R7 R6 R11 R2 R3 R1 R4 GL GL 18 32 2 18 10 2 4 3 2 EV003 10 8 14 2 3 13 10 2 6 2 1 6 17 29 EV005 R1 R5 RMH004 R7 R6 R4 R3 R2 VT R10 R2 R4 GL 12 R8 R3 GL 50 22 10 8 5 2 1 EV006 4 4 R1 R2 R3 R4 R6 R7 R15 LN1a LN1b RMH008 R1 R2 R3 R6 GL R4 R5 R7 GL 19 Tumor region 2 2 8 Mixed lineage 9 8 2 5 3 Terminal branch 1 4 8 1 4 RMH002 R7 R5 R6 R8 Number of SSNVs 12 3 EV007 6 7 3 3 6 2 1 9 R1 R9 R2 R3 R4 R1 R2 R3 8 4 R7 R6 Internal branch Trunk Contribution link Figure 2 Comparison of lineage trees for ccRCC patients 001-008. Phylogenetic trees obtained with LICHeE (on the left) are contrasted with the trees published in [21] for each patient in the study. in the published trees. Evidence supporting each subclone can be analyzed using the presented trees. The trees generated for patients EV003 and EV006 also highly match the published results. For EV006, the LICHeE-generated tree does not contain the following two partially shared groups: (R2, LN1a, and LN1b) and (R3, R1, R4, R7, R15). For the first group we find no evidence in the data – no SSNVs are shared in these three samples and absent from the others. We do find one mutation that supports the second group. Because, by default, LICHeE eliminates nodes that have evidence from only one SSNV, this group is not shown in our tree. The RMH004 dataset contains three partially overlapping groups (R3, VT, R10, R4, R2), (R3, VT, R10, R4, R8), and (R10, R4, R2, R8). These groups represent separate branches where their lowest common ancestor is the group with mutations present across all samples (R3, VT, R10, R4, R2, R8). However, the VAF of this parent group in sample R10 is 0.34, while the average VAF across each of the three groups is 0.32, 0.27, and 0.21, respectively. Therefore, no more than one of these groups can be a descendant of the parent group, without violating the VAF phylogenetic constraint. In order to generate a valid tree, the two least populated conflicting branches among the three are removed from the dataset. Similarly, these two groups are ignored by the maximum parsimony algorithm and are not present in the published tree. The difference between our tree and the published one comes from the mixed lineage we observe in sample R4. Due to the VAF of 0.17 of the group of R4 private mutations, the private group is not a descendant of the group shared by R4 and R2 since the average VAF of that node is 0.06, which is too small to be a parent to 0.17. Therefore, our method suggests two different subclones in R4. Since the group (R2, R4) is small (total of three mutations) and has a low frequency in R4, the evidence of the two subclones cannot be considered very strong; however, it does constitute a signal in the data for the R4 mixed lineage possibility. While the ccRCC study does perform VAF clustering of each sample to find subclones at the onset, it runs the phylogenetic reconstruction using the presence pattern profiles only. On the other hand, our tree reconstruction with LICHeE applies the VAF constraint to the resulting tree topologies and clusters Page 6 of 18 SSNVs in each group based on their VAFs across all the samples. For patient RMH004, applying the VAF constraint, reveals additional sample heterogeneity, for which we produced a potentially improved tree compared to the tree reported using maximum parsimony. It can also be shown that clustering across all the samples rather than each sample individually, is a more appropriate approach for revealing the heterogeneity in the data. For example, if two subclones occur with high and low VAFs in one sample but are uniform in another sample, single sample clustering will detect them only in the sample where they differ. For example, if the two subclones in samples R3 and R9 of patient EV007 (discussed above) had highly similar VAFs in these samples, clustering would not be able to differentiate the subclones. On the other hand, LICHeE would still be able to detect the mixed lineages in the two samples due to the presence of groups (R1, R2, R3, R5, R6, R7, R9) and (R3, R4, R9) in the data, which must form divergent branches in the lineage tree. Lineage Tree Reconstruction on HGSC Data We further evaluated LICHeE on the HGSC dataset from the study by Bashashati et. al. [27]. This study validated 340 somatic mutations from 19 tumor samples of six patients. It used neighbor joining with Pearson correlation distances (computed on the binary sample presence patterns) to infer lineage trees. The trees generated by LICHeE juxtaposed with those presented in the paper are shown in Figure 3 (for details about the parameters used by LICHeE and the HGSC dataset see Appendix B). In four out of six cases (Case2, Case3, Case 4, and Case6) the possible tree topologies are very simple and the trees produced by the two methods are unsurprisingly highly similar. Below we discuss the difference between the two remaining trees. For Case1 the tree reported in the paper suggests that sample d diverged first, followed by c. This suggests that there should be a group of mutations shared exclusively between samples a and b and another group shared between samples a, b, and c. However, examining the dataset VAF values, as well as the results of the binomial test determining SSNV presence in the samples used by this study, we found no evidence for these two groups. On the other hand, the tree produced by LICHeE suggests the presence of mutations shared by samples a, b, and d only, which we found both in the results of the study’s binomial test and by applying the LICHeE hard threshold caller. For Case5, the study reports an early divergence of sample c. This suggests that there should be mutations shared between all the samples except c. We have confirmed that no such mutational profile exists in the data. On the other hand, the data shows the presence of mutations that exist in samples a, b, c, e, and f but not in d that cannot be supported by the reported tree. The reason why the neighbor-joining algorithm of the study chose sample c as the first diverging branch of the tree must be because of the large presence of private mutations in sample c, which led to a low Pearson correlation (and hence a greater distance) with the profiles of other samples. This shows that using the Pearson correlation metric is not suitable for this data. Furthermore, directly applying traditional phylogeny reconstruction techniques (e.g. neighbor joining) cannot reveal sample heterogeneity. The tree produced by LICHeE for Case5, reveals mixed lineages in samples b, e, and f. Interestingly, LICHeE detects two clusters in group (a, b, c, e, f) with mean VAFs of [0.29, 0.34 0.3, 0.19, 0.4] and [0.17, 0.14, 0.13, 0.1, 0.13], respectively. The two subclones in each sample are then produced by the divergence of the higher VAF cluster into two branches: one branch containing the lower VAF cluster and the other branch containing the group of mutations (e, f, b). While the presence of group (e, f, b) is weak (supported by three mutations only), the presence of group (b, f) is substantial (supported by 14 mutations) and provides strong evidence for the mixed lineage of b and f. Furthermore, due to the presence of group (a, b), the group (b, f) cannot be assigned as a child of the low VAF cluster (a, b, c, e, f) without violating the VAF phylogenetic constraint. However, since there are only three mutations in group (a, b), eliminating this group may be a reasonable alternative reconstruction. Therefore, multiple topologies are possible in this scenario, each supported by varying degrees of evidence. LICHeE presents the tree that best fits the data given input parameters of expected noise level and minimum mutational support needed for a node. Using LICHeE with different parameters and interacting with the trees can allow users to explore other evidence existing in the data. It is important to point out that, as opposed to the results of the neighborjoining algorithm that produces trees with lack of evidential support in some branches, each branch in a tree reported by LICHeE reflects the presence of the corresponding SSNV groups in the data. Lineage Tree Reconstruction on Xenoengraftment Data The study by Eirew et. al. [30] used deep-genome and single-cell sequencing to evaluate the clonal dynamics of xenoengraftment of breast cancer tissue into immunodeficient mice. The study applied PyClone [12] to infer mutational clusters representing clonal genotypes and then validated these results using single-cell analysis of two cases, SA494 and SA501. The study used Page 7 of 18 a. GL Case 1 GL Case 2 Case 3 GL 37 GL Case 4 15 21 11 37 5 4 5 5 15 1 c d a 5 b d b Case 5 5 9 1 c a a c d e f g h i j Case 6 GL 8 13 Number of SSNVs 5 27 3 Tumor region 7 Mixed lineage 3 Terminal branch 1 6 b b. GL 14 a c b Internal branch Trunk 63 4 Contribution link d b f e a c a b Figure 3 Comparison of lineage trees for HGSC cases 1-6. Phylogenetic trees obtained with LICHeE (Panel a) are contrasted with the trees published in [27] (Panel b) for each patient in the study. a. Ancestral B 27 A 16 C D b. E 10 16 501X1 501X2 501X4 46 494T 5 494X4 Figure 4 LICHeE reconstruction on breast cancer xenoengraftment data [30]. a, Lineage tree generated by LICHeE (on left) is juxtaposed with the phylogeny derived from single-cell data in the study (on right) for SA501. b, Lineage tree generated by LICHeE for SA494. Bayesian phylogenetic inference to reconstruct the evolutionary relationships between the single-cell nuclei. We applied LICHeE to the deep-sequencing VAF data of this study. We then compared the results of LICHeE to the single-cell phylogenetic trees and clonal genotypes for both SA494 and SA501. Single-cell phylogenetic inference of SA501 passages X1, X2, and X4 reveals an ancestral genotype that branched into two sibling clades A and B. Sequential acquisition of additional mutations in clade B then gave rise to genotypes C, D, and E. Samples X1 and X2 were found to be a mixture of clones with genotypes A, B, C, and D; while, sample X4 was found to be dominated by genotype E and did not contain clones with genotype A (see Figure 2 in [30]). As can be seen in Figure 4a, the tree reconstructed by LICHeE mirrors the phylogeny and sample compositions revealed by the study. In particular, it presents the same two sibling clades derived from the ancestral genotype. Samples X1 and X2 both contain subclones with genotype A Page 8 of 18 (with a higher percentage of this genotype in sample X2, as confirmed by the single-cell analysis), while this genotype is missing from sample X4. Similarly, genotype E is found to be private to and dominates sample X4. The only difference in the LICHeE tree is the collapse of genotypes B and C into one cluster; however, examining the bulk CP values reported by the study, we can see that the CP values of these genotypes are highly similar in the three given samples (X1, X2, and X4) and, as a result, cannot get subdivided into two separate clusters during the clustering step (note: the PyClone analysis of the study was simultaneously performed on three additional samples T, X3, and X5, which showed higher CP value differences). The single-cell analysis of SA494 samples T and X4 reveals two clades, with mutually exclusive sets of mutations, emerging from an ancestral clone present in both samples (see Extended Data Figure 3 in [30]). LICHeE reconstructs the exact same topology (Figure 4b), showing two groups of mutations private to T and X4, respectively. In accordance with the results reported by PyClone, LICHeE also finds two clusters of mutations private to X4 (with the descendant cluster present in about 20% of the sample). Simulations We developed a cancer cell lineage simulator to better asses the performance of LICHeE. Our simulator models cancer evolution from normal tissue producing a branching hierarchy of monoclonal cell populations in accordance with the branched-tree cancer evolution model [26,39,40]. Starting with the normal cell population, the simulator iteratively expands the cell lineage tree by introducing (with some given probability) new daughter cell populations corresponding to newly acquired SSNV or CNV events. In particular, in every iteration, each cell population present in the tree can give rise to a new population of cells (with a given randomly generated size) representing a new SSNV with probability PSSN V or a CNV event with probability PCN V . Each cell population can also undergo a cell death event with probability PDeath . Each simulated SSNV is randomly associated with a genome location (chromosome and position) and haplotype; the CNVs are associated with a chromosome arm and haplotype and correspond to a duplication of this chromosome arm. For the evaluation, we generated 100 lineage trees, each expanded over 50 iterations, with the following parameters: PSSN V = 0.15; PCN V = 0, 0.1, and 0.18; and PDeath = 0.06. This process results in lineage trees with an arbitrary number of branches and nodes (several hundred to thousands of nodes on average). Figure 5 illustrates one such lineage tree. Multiple samples are then collected from each lineage tree. Each sample consists of several cell populations (nodes) of the tree, where each such cell population represents a subclone in the sample. We implemented two sampling schemes: randomized sampling and localized sampling. The randomized sampling process selects a random subset of nodes from the tree for each sample; on the other hand, the localized sampling process is meant to mimic biopsies from spatially distinct sites and selects nodes such that samples mostly contain subclones from distinct branches of the simulated tree. Localized sampling for n samples is achieved by selecting n disjoint subtrees in the simulated tree using an approach based on breadthfirst search, which finds disjoint subtree roots as high on the tree as possible (if n disjoint subtrees do not exist in the tree, the maximum number of subtrees is used and some samples are obtained from the same subtree in a round-robin fashion). Figure 5 illustrates the localized sampling procedure for 10 samples. Given a selected subset of cell populations, the sample is then created by obtaining a fraction of the cells from each population by sampling from a multinomial distribution with probabilities corresponding to the cell population sizes. For randomized sampling, we select up to 5 subclones for each sample. For localized sampling, there can be up to 5 subclones from the same distinct subtree, exactly one subclone from a neighboring subtree, and some fraction of normal cells to represent normal contamination (the fraction is randomly selected to be from 0 up to 20% of the sample). In order to determine how the performance of LICHeE degrades as the number of SSNVs located in CNV regions grows, we ran several experiments with increasing numbers of CNV events. In particular, we set PCN V = [0, 0.1, 0.18], which resulted in a total of 0%, 65%, and 80% of SSNVs to be affected by CNVs in the collected samples, respectively. Given the sample cell population counts, we can compute the VAF of each SSNV in this sample. In the absence of CNVs, the VAF of a given SSNV is simply the fraction of the cells containing the SSNV out of all the cells in the sample. When CNVs are present, we count the number of haplotypes containing the SSNV and the reference allele across all cells of the sample. Given an SSNV, we consider the chain of mutations present in each cell population affecting its genome position. Let HPv be the number of haplotypes containing the SSNV in population P and HPr be the number of haplotypes containing the reference allele. The VAF of a given SSNV M is then: PN v P ·HP V AF (M ) = PN PP=1·(Hn v +H r , P =1 n P P) where N is the total number of selected populations and Pn is the number of cells selected from population P. Page 9 of 18 ROOT M10 M15 M35 CNV M13 M23 M89 M79 M39 M101 M61 M33 M45 M83 M65 M95 M40 M106 M50 M54 M49 Sample 2 Sample 3 Sample 4 M100 M62 M118 M92 M103 M56 M67 M102 M81 M104 Sample 5 M73 M51 M60 M113 Sample 1 M42 M119 M8 M22 M25 M34 M93 M66 M110 Sample 7 M19 M38 CNV M29 M71 M31 M37 M44 M107 M41 M75 M55 M82 Sample 6 M11 M17 CNV CNV M68 M7 M28 M74 M0 M1 M69 M26 M2 CNV M5 M3 M30 M47 M59 M72 M9 M12 M16 M63 M6 M86 M14 M20 CNV M36 M48 M85 M57 M32 M70 M18 CNV M64 M80 M90 M91 M99 M108 M115 M117 M105 M88 CNV M43 M27 M84 M24 M53 M46 M98 M78 M97 M76 M112 M116 M96 M94 M111 Sample 8 Sample 9 Figure 5 Example of a small simulated lineage tree (with SSNV and CNV events) with localized sampling (10 samples total indicated by different colors). Each node represents a cell population that contains every mutation in its lineage. Gray indicates dead cell populations. Finally, given the true VAFs of each SSNV, we add sampling and sequencing noise to each value. In particular, in order to simulate reads covering each SSNV position, we sample the VAFs from the Binomial distribution B(n, p), where p is the true VAF of each SSNV and n is the total simulated read coverage (100X, 1,000X, and 10,000X); the generated frequencies have . We simulate a Q30 (1 a mean p and variance p(1−p) n in 1000) base call sequencing accuracy. Given the simulated VAFs, we first assessed the performance of LICHeE in SSNV calling. Table 1 presents LICHeE’s sensitivity in calling mutations across the samples (i.e. the number of SSNVs with correctly identified sample presence patterns out of all the simulated SSNVs) given true VAF values and for coverages of 100x, 1,000X, and 10,000X. As expected, higher coverage results in higher sensitivity. The method achieves 94 − 99% sensitivity across all the experiments. Next we compared the topology of the reported lineage trees and the simulated trees and measured LICHeE’s accuracy in reconstructing the ancestordescendant and sibling relationships. For every pair of mutations in the simulated tumor hierarchy, we checked if LICHeE preserved the relationship between them in the generated top tree. More specifically, we checked for the following two types of violations: 1) if an ancestor-descendant relationship was inverted or became a sibling relationship, and 2) if a sibling relationship became an ancestor-descendant relationship. Tables 2 and 3 summarize the accuracy of these metrics. Since LICHeE may remove nodes from the network representing non-robust SSNV groups (as described in Methods) if no valid trees are found during the search, not all of the simulated mutations will be present in the final tree. We report the percentage of the SSNVs and of simulated ancestor-descendant (AD) and sibling (Sib) mutation pairs that are present in the tree. As expected, the number of mutations present in the trees decreases with higher numbers of input samples, lower coverage, and the presence of CNVs (which can significantly alter the VAF values, causing the violation of the VAF ordering constraints). In particular, with a low coverage of 100X and 15 samples, only 81% of SSNVs are preserved in the tree. Therefore, LICHeE is best applied to data with higher coverage when the number of input samples is high. For instance, with a higher coverage of 1,000X, 91-94% of SSNVs and 8388% of mutation pairs are present in the trees with 15 samples (although this metric drops with the presence of CNVs to 91-92% SSNVs and 66-70% SSNV pairs). Since LICHeE groups mutations with the same presence patterns across samples and similar VAFs, only the mutations occurring in a different set of samples or with significantly different VAFs will be placed in distinct nodes of the tree. We report the percentage of such ancestor-descendant pairs (AD-Ord) in Tables 2 and 3. We then evaluate how many ordered mutations preserved the correct ancestor-descendant relationship (AD-Corr). Across all the experiments without CNVs, we get 99-100% correctness (with less than 1% of pairs being in reversed order). We see 92-96% correctness in experiments with 80% of SSNVs located in CNV regions and 1000X coverage. AD mutations that were not ordered or grouped in the same node, will be siblings in the reconstructed tree (AD →Sib). We find that Page 10 of 18 the vast majority of such mutation pairs involve private mutations, whose placement in the tree is usually under-constrained (i.e. multiple tree nodes can serve as ancestors to such mutation groups). Finally, we can see that the reverse violation of sibling mutations being placed into ancestor-descendant nodes (Sib→AD) is also very rare (up to 7% across all the experiments). Therefore, we conclude that the trees reconstructed by LICHeE provide highly accurate ordering of the mutations in its nodes. Conclusion LICHeE has been designed to automatically infer cell lineages of multiple tumor samples and the sample subclone decomposition. Our analysis shows that LICHeE is highly effective in reconstructing the phylogenies and uncovering the heterogeneity of previously published datasets and in simulations, improving not only upon traditional tree-building methods, but also on recent developments specialized for cancer data. Currently LICHeE works with deep sequencing data that provides VAF estimates with low variance (as well as on CP values that can be obtained from existing tools and can correct for SCNAs, LOH, and sample purity). SSNV data obtained from deep whole-genome sequencing, targeted resequencing of informative SSNVs, or exome sequencing in tumors with a high degree of somatic SSNVs present in exomes, should be appropriate inputs to LICHeE. Several directions for future work are open: extension of this method to lower coverage whole-genome sequencing data and incorporation of aneuploidies and large CNVs directly into the model. Methods Grouping and Clustering SSNVs When partitioning SSNVs into groups based on sample occurrence, each SSNV is first associated with a binary sample profile denoting its presence or absence in each sample. Given S samples from an individual, the binary profile is defined as a binary sequence of length S where the ith bit is set to 1 if this SSNV is called in the ith sample, and is 0 otherwise (e.g. given 5 samples, an SSNV with the profile 01011 is called in samples 2, 4, and 5). SSNVs with the same profile are assigned to the same SSNV group (e.g. a group with the profile 01101 will contain all the SSNVs occurring in samples 2, 3, and 5). The group with the profile consisting entirely of 1s will contain SSNVs that occur in all the samples and are, therefore, germline variants (assuming that the sample set includes a normal control sample). The SSNV binary profiles can be passed as input or computed from SSNV VAFs as follows. First two hard VAF thresholds, Tpresent and Tabsent are used to determine if an SSNV is robustly present or absent from a sample. An SSNV profile is classified as robust if its VAF is above or below the two thresholds, respectively, and if at least a minimum number of other robust SSNVs (default set to one) have the same binary profile. All other SSNVs are considered non-robust and are assigned to a group as follows. Given a non-robust SSNV m, its VAF across samples can either fall below (marked 0), above (marked 1), or in between (marked *) the thresholds Tpresent and Tabsent , resulting in a profile such as 01*11. The candidate groups, to which m can be assigned, must have an identical profile in all the samples that are marked 0 or 1 (e.g. for profile 01*11 two valid candidate groups are 01111 and 01011). Since m can be assigned to more than one target group, we consider that the group containing a robust SSNV that is most similar in VAF to m is the best candidate. The following metric is used to compute the similarity between two SSNVs m and n: simmn = X i∈samples min(m.VAFi , n.VAFi ) max(m.VAFi , n.VAFi ) , (1) where m.VAFi is the VAF of m in sample i. If the maximum similarity is higher than a given threshold, m is assigned to the group of argmaxn∈Candidates simmn . Unassigned non-robust SSNVs will form new profile groups. We minimize the number of such new groups by formulating this task as a set cover problem. In particular, let X be the set of all unassigned SNVs. Denote Y as the set of subsets of X, where each subset represents mutations that can be assigned to the same potential target group. The target groups are a list of all possible binary profiles that the SSNVs can be assigned to, obtained by substituting all *s by 0 or 1. We want to find the minimum number of target groups (i.e., smallest subset of Y ), which cover all mutations in X. This problem is known to be NP-complete and searching for the exact solution is not feasible. Instead we apply the standard greedy algorithm by choosing (at each stage) the target group that covers the largest number of non-robust SSNVs. For SSNVs whose targets are not supported by any other mutations, we convert each * to 1 or 0 depending on whether the VAF is closest to Tpresent or Tabsent , respectively. Once the SSNVs are partitioned into groups, the SSNVs of each group are further clustered based on their sample VAFs. Each SSNV group is associated with a matrix M of VAFs of size n × s, where n is the number of SSNVs in this group and s is the number of represented samples (e.g. s = 3 for a group with the profile 0110001). The EM clustering algorithm for GMMs is Page 11 of 18 GL 19 011111111 [-, .08, .29, .08, .17, .14, .18, .2, .2] 3 [-, -, -, -, -, -, .03, .21, .2] 8 000000111 001000010 [-, -, 0.33, -, -, -, -, .01, -] 1 000000010 [.14] 011111110 [-, .07, .27, .09, .18, .14, .15, .03, -] 000011100 8 3 000000100 [.1] [-, -, -, -, .18, .15, .14, -, -] [-, -, -, -, -, .11, .12, -, -] 000001100 1 8 001000000 [.22] 2 2 000010000 [.21] Figure 6 Evolutionary constraint network for patient EV007 with 8 tumor samples and 55 SSNVs. Each node is associated with the binary profile of its corresponding SSNV group, the VAF centroid, and the number of SSNVs assigned to it. The edges represent the potential precedence relationships between the node SSNVs. The spanning tree reported for patient EV007 is highlighted (see Results). run on the resulting VAF matrix M using [41]. The result is a set of SSNV clusters with an associated VAF ~ . To handle the high variance in centroid vector, V AF the VAF data due to noise, some of the resulting clusters are eliminated (based on size) or collapsed with neighboring clusters, based on the distance between their centroid vectors. Evolutionary Constraint Network Construction Given the clusters of each SSNV group, we construct an evolutionary constraint network to capture valid evolutionary timing relationships between the mutations of each cluster pair. The network is a DAG, where each node corresponds to an SSNV cluster (except the root, which represents the germline) and each edge between two nodes, (u → v) denotes that parent node u could be an evolutionary predecessor of child node v (i.e. that SSNVs in cluster u could have ”happened before” SSNVs in cluster v). In particular, an edge (u → v) is added only if the nodes satisfy the following two constraints ∀i ∈ samples (which guarantee that the network will be acyclic): (1) u.VAFi ≥ v.VAFi − uv and (2) if u.VAFi = 0, v.VAFi = 0 , (2) where uv is the VAF noise error margin (note: the error margin is the maximum of the sum of the standard errors for sample i of the two clusters and a configurable parameter). In the resulting network, each node will have at least one parent (since all nodes can be connected to the root). We avoid checking all node pairs, by organizing the nodes into levels according to the Hamming weight (i.e. number of 1s) of the binary group profile to which they belong. Nodes that are in the same level and have conflicting binary profiles cannot satisfy the above constraints. Nodes from different levels can only be connected such that the node in the higher level is the parent of the node in the lower level. Finally, for nodes that are in the same level and have the same binary profile, the edge is added in the direction that minimizes VAFERR , where: X VAFERRu→v = ~1ERR · (v.VAFi − u.VAFi )2 i∈samples (3) with the indicator function:  1, v.VAFi > u.VAFi ~1ERR = 0, otherwise . (4) Figure 6 illustrates the constraint network produced for the dataset of ccRCC Patient EV007 (described in the Results section). Phylogenetic Tree Search By the constraint network construction, a valid lineage tree T of the SSNV clusters (i.e. a tree that does not violate the three constraints of the perfect phylogeny model) must be a spanning tree of the network that satisfies the following requirement ∀ nodes u ∈ T : X ∀i ∈ samples : v s.t. v.VAFi ≤ u.VAFi + . (u→v)∈T (5) That is, the sum of the VAF centroids of all the children must not exceed the centroid of the parent. We Page 12 of 18 use inequality here since our method does not require all the true lineage branches to have been observed. To tolerate noise in the VAF data, we relax the constraint by allowing the sum of children VAFs to exceed the parent by an error margin . Given such a valid lineage tree, each sample can then be decomposed into subpopulations by enumerating all the paths in the tree starting with the germline root and ending in the last node containing mutations in that sample. The problem of finding all such trees is equivalent to the problem of finding all spanning trees of the constraint network DAG for which Eqn. (5) holds. We have extended the Gabow and Myers spanning tree search algorithm [42] to generate all such spanning trees. The original algorithm generates all spanning trees of a directed graph using backtracking and an efficient bridge edge detection method based on DFS. Our extension consists of enforcing Eqn. (5) during the tree search by terminating the expansion of a given tree and backtracking as soon as an edge violating Eqn. (5) is added (see Algorithm 1). Same as the original algorithm, this search runs in O(|V | + |E| + |E|N ) time, where |V | is the number of nodes, |E| is the number of edges, and N is the number of spanning trees in the network. While the runtime of the program depends on the number of spanning trees in the constraint network, in practice the search is very fast (taking on the order of a few seconds). However, since, in theory, it is possible for the algorithm to take longer on datasets that result in constraint networks with many spanning trees, we provide a bound on the maximum number of lineage trees to generate in order to avoid searches that are too long. Similarly, we also have a high bound on the number of calls to the GROW procedure in Algorithm 1. We expect this scenarios to be very rare in typical validation datasets. To reduce search space we also optionally constrain the placement of private mutation nodes in the constraint network to their closest valid predecessors. The above search algorithm will find all spanning trees for which Eqn. (5) holds locally at each individual node; however, it is possible that in order to satisfy this constraint, the centroid values are deviated (within ) in a globally inconsistent way. Therefore, in order to enforce consistency, we apply one additional requirement to the trees returned by the search. In particular, we formulate the following quadratic programming (QP) problem to find a set of ev,i such that for every sample i and node v: minimize subject to P 2 i ev,i P P v  s.t. (u→v)∈T v.VAFi + ev,i ≤ u.VAFi + eu,i and |ev,i | ≤ , ev,i ≤ v.VAFi v Algorithm 1 Finding All Lineage Trees 1: Initialization: f ← emtpy list, L ← null // stores the last tree output 2: procedure Lineage Tree Search(N ) // N is a constraint network rooted at r 3: Tree t ← new empty Tree 4: t.addNode(r) 5: add all edges (r → v) ∈ N to f 6: grow(t) 7: procedure grow(t, N ) 8: if t contains all the nodes in N then 9: L←t 10: output L 11: else 12: s ← emtpy list 13: b ← false 14: while (not b and f not empty) do 15: // e defined as (e.From → e.To) 16: Edge e ← f.removeLast() 17: Node v ← e.To 18: t.addNode(v) 19: t.addEdge(e.From → v) 20: // ret. true if Eqn. (5) is satisfied for node e.From 21: if t.checkConstraint(e.From) then 22: add all edges (v → w), w 6∈ t to f 23: remove all edges (w → v), w ∈ t from f 24: grow(t) 25: if number of returned trees > max trees return 26: remove all edges (v → w), w 6∈ t from f 27: add all edges (w → v), w ∈ t to f 28: t.removeEdge(e.From → e.To) 29: N.removeEdge(e.From → e.To) 30: s.add(e) 31: if ∃ an edge (w → v) s.t. w not a descendent of v in L then 32: b ← false 33: else b ← true 34: for all edges e starting from the end of s do 35: remove e from s, add e to f , add e to N (6) If no solution exists, the tree is considered invalid. Since multiple valid lineage trees can be generated, we rank them using the resulting ev,i solution, which corresponds to how well each tree fits the VAF data. The top-ranking tree will be thePtree P with the minimum sum of squared deviations: v i e2v,i . Since for certain networks the total number of valid lineage trees can be large, it is impractical to run a QP program on each tree. Therefore, we first rank the trees based on the sum of squared deviations computed locally at each node, and then run QP on the resulting top k trees (k is 5 by default). Multiple lineage trees can support a dataset equally well since the placement of certain nodes in the tree may be ambiguous using perfect phylogeny SSNV ordering constraints only (especially when not all lineage branches have been observed). In these cases, more sophisticated custom evaluation criteria would be required to rank the trees. We do not address defining such criteria in this work. Instead we report all the Page 13 of 18 SSNV node selected ID: Binary Profile (Size) Subclone B Subclone A Selected Sample Selected Decomposition (a) SSNV group selected (b) Sample selected Figure 7 LICHeE graphical user interface output for top lineage tree of ccRCC patient RK26. (a) Information is displayed about the SSNV members of the selected node. (b) Information is displayed about the sample composition. produced trees to the user ranked by their associated score (the number of trees reported is configurable) and provide a GUI to allow the user to easily explore the differences in the topologies (see the Visualization for details). We expect that under any optimality criteria, the sub-optimal trees can also represent signals in the data of potential biological significance. It is also possible that no valid lineage trees are found during the search. This can happen if the noise error margin is too narrow or the network contains nodes corresponding to SSNV groups with a misclassified binary profile. In this case the network is adjusted and searched again. Currently the network adjustment procedure will remove one-by-one all the nodes that belong to non-robust SSNV groups (smallest nodes first). Other adjustments, such as increasing the noise error margin, are also possible but not currently implemented. Visualization The constraint network and the phylogenetic trees can be visualized and interacted with in GUI form. The JUNG graph library [43] is used to generate the resulting graphs. When visualizing lineage trees, each input sample appears as a leaf in the tree and is connected to the nodes that contain SSNVs present in the sample. By clicking on the nodes of a tree, it is possible to obtain additional information about each node. The information displayed about an internal (non-sample) tree node consists of its binary group profile, its cluster centroid and standard deviation vectors, and the list of the SSNVs in its cluster (these SSNVs can be annotated with information from public databases such as COSMIC, TCGA, etc). If a sample leaf node is clicked, the information displayed consists of the lineage of this specific sample obtained by doing a DFS traversal of the tree starting with the germline root. Finally, the user can rearrange the nodes in the tree, as well as remove nodes and collapse nodes (provided they are clusters of the same group). See Figure 7 for several examples. In addition to the GUI, the program reports the number of trees found and the score of the highestranking tree. The user can control how many trees to display. Implementation The LICHeE algorithm was implemented in Java. It is open-sourced and freely available online at [31]. Competing interests SB is a founding advisor of DNAnexus Inc, and member of the Scientific Advisory Boards of 23andMe and Eve Biomedical. Author’s contributions VP, RS, and SB developed the method. VP implemented the LICHeE program and simulator and drafted the manuscript. RS, SB, DK, IH contributed to the manuscript. VP, RS, SB performed the evaluation and analysis. All authors were involved in discussions. Acknowledgements Authors would like to thank Arend Sidow for valuable discussions and Aaron C. Abajian for contributing to the simulation studies. VP was supported by the Stanford-KAUST grant. RS and IH were also supported by Natural Sciences and Engineering Research Council of Canada (NSERC) Postdoctoral Fellowships. DK was supported by an STMicroelectronics Stanford Graduate Fellowship. This work was funded by a grant from KAUST to SB. References 1. Yates, L.R., Campbell, P.J.: Evolution of the cancer genome. Nature Reviews Genetics 13(11), 795–806 (2012) 2. Marusyk, A., Almendro, V., Polyak, K.: Intra-tumour heterogeneity: a looking glass for cancer? Nature Reviews Cancer 12(5), 323–334 (2012) 3. Bamford, S., Dawson, E., Forbes, S., Clements, J., Pettett, R., Dogan, A., Flanagan, A., Teague, J., Futreal, P.A., Stratton, M., et al.: The cosmic (catalogue of somatic mutations in cancer) database and website. British journal of cancer 91(2), 355–358 (2004) Coverage # Sim SSNVs True VAF (+CNV) 10,000X (+CNV) 1,000X (+CNV) 100X (+CNV) 26.6 (42.2) 99.2 (96.9) 98.9 (96.7) 99.1 (96.7) 97.2 (95.5) 5 25 (44.5) 99.5 (97.4) 99.1 (97.3) 99.3 (97.4) 97.4(95.9) 43.9 (89.7) 99.2 (97.8) 98.5 (97.5) 98.5 (97.7) 95 (96) 10 40.7 (88.6) 99.5 (97.5) 99.1 (97.3) 99 (97.3) 96.3 (95.9) 53.6 (131.1) 98.8 (96.9) 98.2 (96.7) 97.9 (96.5) 94.2 (95.4) 15 51 (136.1) 99.1(97.6) 98.7 (97.4) 98.5 (97.2) 94.5 (95.8) Table 1 SSNV group assignment sensitivity on simulated data. Values indicate the number of correctly assigned SSNVs out of the total number of SSNVs collected in each experiment (# Sim SSNVs). Results are shown for 5, 10, 15 samples given true VAFs, 10000X, 1000X, and 100X coverage data obtained with localized (top row) and randomized (bottom row) sampling, from trees without CNVs and with 80% of SSNVs in CNV regions (in parentheses). All values are averaged over 100 simulated trees. # Samples Samples Cov Page 14 of 18 Trees % SSNVs % AD % AD-Ord % AD-Corr % AD→Sib (-priv) % Sib % Sib-Corr % Sib→AD (-priv) 94 98.9 99 41.5 100 30.2 (2.6) 98.2 83.2 7.3 (1.5) t-VAF 98 99.5 99.5 40.4 100 26.3 99.2 84.8 6.6 (0.9) 95 98.8 98.7 40.4 99.9 30.5 (2.5) 97.8 82.5 7.7 (1.4) 10K 98 99.2 98.7 39 100 27.4 98.8 84.7 7 (1.3) 5 95 98.6 97.7 39.7 100.0 30.5 (2.3) 97.1 82.8 7.2 (1.3) 1K 98 99.4 99.5 38.1 99.7 29.2 98.9 83.9 7.5 (2.2) 97 96.8 93.2 38.7 99.8 31.4 (3.5) 93.1 81.8 7.9 (1.7) 100 97 97.3 94.8 35.2 99.7 30.1 95.3 83.7 7.2 (2.2) 97 97.5 96.2 58.8 100 43.1 (2.2) 96.9 94.4 3.3 (0.2) t-VAF 95 97.7 96.5 58.2 100 38.1 (1.9) 96.7 93.5 4.2 (1.4) 98 96.5 94.4 57.3 100 44.9 (4) 95.2 94 3.6 (0.4) 10K 96 97 96.1 56.5 100 39.8 (2.3) 96.2 93.3 4.3 (1.2) 10 98 97.4 96.4 57.5 99.9 45.2 (3.9) 96.8 94.1 3.7 (0.4) 1K 96 97 95.7 57.4 99.9 38.7 (2.4) 96 92.7 4.8 (1.5) 93 90.8 75.7 52.3 99.7 38.6 (4.4) 78.0 93.9 3.4(0.7) 100 91 90.5 80.4 47.9 99.5 40.3 (5.7) 83.3 92.8 4.4 (1.5) 99 91.7 85 63.1 100 40.8 (2.2) 88 96.6 2 (0.2) t-VAF 96 92.1 87.5 61.7 100 41.5 (2) 89.1 96.9 2 (0.3) 98 92.3 85.3 61.2 100 44.3 (3.5) 87.6 96.2 2.4 (0.3) 10K 100 90.6 83.6 59.1 100 41.8 (2.6) 85.8 96.6 2.1 (0.3) 15 93 94.7 83.5 61.5 99.9 42.7 (4.3) 85.4 96.1 2.6 (0.6) 1K 100 91.8 85.4 59.1 100 43.5 (2.9) 87.8 96.7 2.1 (0.3) 92 81.1 55.2 48.4 99.4 37.4 (5) 61.3 96.1 2.1 (0.3) 100 98 81.8 57.1 46.1 99.8 36.5 (2.2) 63.1 96.2 2.2 (0.4) Table 2 Topological ancestry-descendant and sibling relationship reconstruction on simulated data. Results are shown for 5, 10, 15 samples given true VAFs, 10000X, 1000X, and 100X coverage data (without CNVs) obtained with localized (top row) and randomized (bottom row) sampling. All values are averaged over the number of reconstructed trees (Trees) out of 100 simulated trees. The following metrics are presented: SSNVs present in the tree (% SSNVs), ancestor-descendant pairs of mutations in the tree (AD), ordered AD pairs (AD-Ord), correctly ordered AD pairs (AD-Corr), unordered AD pairs reconstructed as siblings (AD→Sib) (with and without private mutation nodes), sibling pairs of mutations in the tree (Sib), correctly reconstructed sibling pairs (Sib-Corr), sibling pairs reconstructed as AD (Sib→AD) (with and without private mutation nodes). Samples Trees % SSNVs % AD % AD-Ord % AD-Corr % AD→Sib (-priv) % Sib % Sib-Corr % Sib→AD (-priv) 95 96.2 89.1 14.4 93.7 20 (0.4) 92.6 80.8 2.4(0) 98 97.42 91.96 10.74 96.1 0.20 94.85 80.46 2 (0.02) 91 94.8 77.1 14.6 93.5 24.9 (0.6) 90.9 91.8 1.3(0) 10 92 94.55 78.97 11.95 93.1 0.41 90.5 91.7 1.1 (0.01) 97 91.8 65.9 11.1 92.5 23.3 (0.4) 85.5 94.6 0.7 (0) 15 94 92.9 69.6 10.8 94.5 24.2 (0.35) 87.5 94.8 0.6 (0.01) Table 3 Topological ancestry-descendant and sibling relationship reconstruction on simulated data in the presence of CNVs. Results are shown for 5, 10, 15 samples given 1000X coverage data obtained with localized (top row) and randomized (bottom row) sampling with 80% of SSNVs in CNV regions. All values are averaged over the number of reconstructed trees (Trees). 5 Page 15 of 18 Page 16 of 18 4. Collins, F.S., Barker, A.D.: Mapping the cancer genome. Scientific American 296(3), 50–57 (2007) 5. Fisher, R., Pusztai, L., Swanton, C.: Cancer heterogeneity: implications for targeted therapeutics. British journal of cancer 108(3), 479–485 (2013) 6. Schuh, A., Becq, J., Humphray, S., Alexa, A., Burns, A., Clifford, R., Feller, S.M., Grocock, R., Henderson, S., Khrebtukova, I., et al.: Monitoring chronic lymphocytic leukemia progression by whole genome sequencing reveals heterogeneous clonal evolution patterns. Blood 120(20), 4191–4196 (2012) 7. Newburger, D.E., Kashef-Haghighi, D., Weng, Z., Salari, R., Sweeney, R.T., Brunner, A.L., Zhu, S.X., Guo, X., Varma, S., Troxell, M.L., et al.: Genome evolution during progression to breast cancer. Genome research 23(7), 1097–1108 (2013) 8. Carter, S.L., Cibulskis, K., Helman, E., McKenna, A., Shen, H., Zack, T., Laird, P.W., Onofrio, R.C., Winckler, W., Weir, B.A., et al.: Absolute quantification of somatic dna alterations in human cancer. Nature biotechnology 30(5), 413–421 (2012) 9. Campbell, P.J., Pleasance, E.D., Stephens, P.J., Dicks, E., Rance, R., Goodhead, I., Follows, G.A., Green, A.R., Futreal, P.A., Stratton, M.R.: Subclonal phylogenetic structures in cancer revealed by ultra-deep sequencing. Proceedings of the National Academy of Sciences 105(35), 13081–13086 (2008) 10. Nik-Zainal, S., Van Loo, P., Wedge, D.C., Alexandrov, L.B., Greenman, C.D., Lau, K.W., Raine, K., Jones, D., Marshall, J., Ramakrishna, M., et al.: The life history of 21 breast cancers. Cell 149(5), 994–1007 (2012) 11. Shah, S.P., Roth, A., Goya, R., Oloumi, A., Ha, G., Zhao, Y., Turashvili, G., Ding, J., Tse, K., Haffari, G., et al.: The clonal and mutational evolution spectrum of primary triple-negative breast cancers. Nature 486(7403), 395–399 (2012) 12. Roth, A., Khattra, J., Yap, D., Wan, A., Laks, E., Biele, J., Ha, G., Aparicio, S., Bouchard-Côté, A., Shah, S.P.: Pyclone: statistical inference of clonal population structure in cancer. Nature methods (2014) 13. Oesper, L., Mahmoody, A., Raphael, B.J.: Inferring intra-tumor heterogeneity from high-throughput dna sequencing data. In: Research in Computational Molecular Biology, pp. 171–172 (2013). Springer 14. Ha, G., Roth, A., Khattra, J., Ho, J., Yap, D., Prentice, L.M., Melnyk, N., McPherson, A., Bashashati, A., Laks, E., et al.: Titan: inference of copy number architectures in clonal cell populations from tumor whole-genome sequence data. Genome research, 180281 (2014) 15. Hajirasouliha, I., Mahmoody, A., Raphael, B.J.: A combinatorial approach for analyzing intra-tumor heterogeneity from high-throughput sequencing data. Bioinformatics 30(12), 78–86 (2014) 16. Ding, L., Ley, T.J., Larson, D.E., Miller, C.A., Koboldt, D.C., Welch, J.S., Ritchey, J.K., Young, M.A., Lamprecht, T., McLellan, M.D., et al.: Clonal evolution in relapsed acute myeloid leukaemia revealed by whole-genome sequencing. Nature 481(7382), 506–510 (2012) 17. Landau, D.A., Carter, S.L., Stojanov, P., McKenna, A., Stevenson, K., Lawrence, M.S., Sougnez, C., Stewart, C., Sivachenko, A., Wang, L., et al.: Evolution and impact of subclonal mutations in chronic lymphocytic leukemia. Cell 152(4), 714–726 (2013) 18. McFadden, D.G., Papagiannakopoulos, T., Taylor-Weiner, A., Stewart, C., Carter, S.L., Cibulskis, K., Bhutkar, A., McKenna, A., Dooley, A., Vernon, A., et al.: Genetic and clonal dissection of murine small cell lung carcinoma progression by genome sequencing. Cell 156(6), 1298–1311 (2014) 19. Campbell, P.J., Yachida, S., Mudie, L.J., Stephens, P.J., Pleasance, E.D., Stebbings, L.A., Morsberger, L.A., Latimer, C., McLaren, S., Lin, M.-L., et al.: The patterns and dynamics of genomic instability in metastatic pancreatic cancer. Nature 467(7319), 1109–1113 (2010) 20. Yachida, S., Jones, S., Bozic, I., Antal, T., Leary, R., Fu, B., Kamiyama, M., Hruban, R.H., Eshleman, J.R., Nowak, M.A., et al.: Distant metastasis occurs late during the genetic evolution of pancreatic cancer. Nature 467(7319), 1114–1117 (2010) 21. Gerlinger, M., Horswell, S., Larkin, J., Rowan, A.J., Salm, M.P., Varela, I., Fisher, R., McGranahan, N., Matthews, N., Santos, C.R., et al.: Genomic architecture and evolution of clear cell renal cell carcinomas defined by multiregion sequencing. Nature genetics 46(3), 225–233 (2014) 22. Green, M.R., Gentles, A.J., Nair, R.V., Irish, J.M., Kihira, S., Liu, C.L., Kela, I., Hopmans, E.S., Myklebust, J.H., Ji, H., et al.: Hierarchy in somatic mutations arising during genomic evolution and progression of follicular lymphoma. Blood 121(9), 1604–1611 (2013) 23. de Bruin, E.C., McGranahan, N., Mitter, R., Salm, M., Wedge, D.C., Yates, L., Jamal-Hanjani, M., Shafi, S., Murugaesu, N., Rowan, A.J., et al.: Spatial and temporal diversity in genomic instability processes defines lung cancer evolution. Science 346(6206), 251–256 (2014) 24. Hajirasouliha, I., Raphael, B.J.: Reconstructing mutational history in multiply sampled tumors using perfect phylogeny mixtures. In: Algorithms in Bioinformatics, pp. 354–367. Springer, ??? (2014) 25. Salari, R., Saleh, S.S., Kashef-Haghighi, D., Khavari, D., Newburger, D.E., West, R.B., Sidow, A., Batzoglou, S.: Inference of tumor phylogenies with improved somatic mutation discovery. Journal of Computational Biology 20(11), 933–944 (2013) 26. Gerlinger, M., Rowan, A.J., Horswell, S., Larkin, J., Endesfelder, D., Gronroos, E., Martinez, P., Matthews, N., Stewart, A., Tarpey, P., et al.: Intratumor heterogeneity and branched evolution revealed by multiregion sequencing. New England Journal of Medicine 366(10), 883–892 (2012) 27. Bashashati, A., Ha, G., Tone, A., Ding, J., Prentice, L.M., Roth, A., Rosner, J., Shumansky, K., Kalloger, S., Senz, J., et al.: Distinct evolutionary trajectories of primary high-grade serous ovarian cancers revealed through spatial mutational profiling. The Journal of pathology 231(1), 21–34 (2013) 28. Qiao, Y., Quinlan, A.R., Jazaeri, A.A., Verhaak, R.G., Wheeler, D.A., Marth, G.T.: Subcloneseeker: a computational framework for reconstructing tumor clone structure for cancer variant interpretation and prioritization. Genome Biol 15, 443 (2014) 29. Jiao, W., Vembu, S., Deshwar, A.G., Stein, L., Morris, Q.: Inferring clonal evolution of tumors from single nucleotide somatic mutations. BMC bioinformatics 15(1), 35 (2014) 30. Eirew, P., Steif, A., Khattra, J., Ha, G., Yap, D., Farahani, H., Gelmon, K., Chia, S., Mar, C., Wan, A., et al.: Dynamics of genomic clones in breast cancer patient xenografts at single-cell resolution. Nature (2014) 31. Http://viq854.github.io/lichee/ 32. Gusfield, D.: Efficient algorithms for inferring evolutionary trees. Networks 21(1), 19–28 (1991) 33. Gerstung, M., Beisel, C., Rechsteiner, M., Wild, P., Schraml, P., Moch, H., Beerenwinkel, N.: Reliable detection of subclonal single-nucleotide variants in tumour cell populations. Nature communications 3, 811 (2012) 34. Yost, S., Alakus, H., Matsui, H., Jepsen, K., Schwab, R., Frazer, K., Harismendy, O.: Mutascope: a high-sensitivity variant caller dedicated to high-throughput pcr amplicons sequencing. In: BMC Proceedings, vol. 6, p. 22 (2012). BioMed Central Ltd 35. Larson, D.E., Harris, C.C., Chen, K., Koboldt, D.C., Abbott, T.E., Dooling, D.J., Ley, T.J., Mardis, E.R., Wilson, R.K., Ding, L.: Somaticsniper: identification of somatic point mutations in whole genome sequencing data. Bioinformatics 28(3), 311–317 (2012) 36. Koboldt, D.C., Zhang, Q., Larson, D.E., Shen, D., McLellan, M.D., Lin, L., Miller, C.A., Mardis, E.R., Ding, L., Wilson, R.K.: Varscan 2: somatic mutation and copy number alteration discovery in cancer by exome sequencing. Genome research 22(3), 568–576 (2012) 37. Saunders, C.T., Wong, W.S., Swamy, S., Becq, J., Murray, L.J., Cheetham, R.K.: Strelka: accurate somatic small-variant calling from sequenced tumor–normal sample pairs. Bioinformatics 28(14), 1811–1817 (2012) 38. Van Loo, P., Nordgard, S.H., Lingjærde, O.C., Russnes, H.G., Rye, I.H., Sun, W., Weigman, V.J., Marynen, P., Zetterberg, A., Naume, B., et al.: Allele-specific copy number analysis of tumors. Proceedings of the National Academy of Sciences 107(39), 16910–16915 (2010) 39. Greaves, M., Maley, C.C.: Clonal evolution in cancer. Nature 481(7381), 306–313 (2012) 40. Yap, T.A., Gerlinger, M., Futreal, P.A., Pusztai, L., Swanton, C.: Intratumor heterogeneity: seeing the wood for the trees. Science translational medicine 4(127), 127–1012710 (2012) 41. Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann, P., Witten, I.H.: The weka data mining software: an update. ACM SIGKDD explorations newsletter 11(1), 10–18 (2009) Page 17 of 18 42. Gabow, H.N., Myers, E.W.: Finding all spanning trees of directed and undirected graphs. SIAM Journal on Computing 7(3), 280–287 (1978) 43. O’Madadhain, J., Fisher, D., Smyth, P., White, S., Boey, Y.-B.: Analysis and visualization of network data using jung. Journal of Statistical Software 10(2), 1–35 (2005) Appendix A — Evaluation of Phylosub We ran PhyloSub [29] on the Gerlinger et al dataset [21] using default parameters. For each patient in the dataset we compared the top tree structures (by default, three) with the published tree. It is hard to find similarities between the topology of reported trees and the published trees. Therefore, we analyzed the performance of PhyloSub in finding the correct clusters of mutations, which is a preliminary requirement for building the cancer progression pathway. Gerlinger et. al have categorized mutation groups as shared, heterogeneous (partially shared), and private. Generally speaking, we observed that shared mutations were clustered correctly but partially shared mutations were often clustered all together as one group, which violates their presence pattern. As an example, PhyloSub reported a tree for patient EV003 with three mutation groups (see Figure 8 below). The trunk branch (colored blue) includes all shared mutations as well as one private and two partially shared mutations. Second branch (colored green) contains several partially shared mutations and the rest of private mutations with very different presence patterns, and the third branch (colored red) contains three partially shared mutations. Case EV003 has a heterogenous group with 8 mutations shared by R9 and R6 (LONRF2, RHOB, BHLHE40, CMYA5, NOD1, GCC1, SLC5A12, YLPM1), whereas PhyloSub puts two of them in the trunk branch, four in the second, and two in the third brach. Note that, as discussed in the Results section, for EV003 LICHeE was able to find all mutation groups and build the lineage matching the reported tree in Gerlinger et. al dataset. For other cases PhyloSub showed similar performance. We also observed that PhyloSub does not deal with private mutations properly. Often private mutations are either clustered into singleton groups or are distributed into shared or partially shared groups. For example, for six out of eight patients in at least one of the top-trees there are private mutations clustered with shared mutations and located in the trunk branch of the corresponding tree. Note that PhyloSub shows acceptable performance in analyzing samples with very few mutations and simple (chain) topology. However, when tested on more complex multi-sample cancer datasets, the performance of LICHeE is far more superior. Figure 8 PhyloSub results for patient EV003. Appendix B — Experimental Details of the ccRCC, HGSC, and Xenoengraftment Comparison ccRCC. The clear cell renal cell carcinoma (ccRCC) study by Gerlinger et. al [21] validated 602 nonsynonymous nucleotide substitutions and indels from multiple samples of 8 individuals using ultra-deep amplicon sequencing with an average depth of >400x. The analysis was performed on 587 out of these mutations guaranteeing a minimum coverage higher than 100x. Based on the expected sequencing platform error rate, mutations were called in a sample if their VAF was ≥ 0.5% for substitutions and 1% for indels. In accordance with the study, we set the cutoffs to Tpresent = Tabsent = 0.005 for calling SSNVs across samples for all patients except RMH004 and required at least two mutations as evidence of a node in the tree. For RMH004 we set Tpresent = Tabsent = 0.01 to allow editing, observing that some mutations with the frequencies slightly higher that 0.5% were considered absent in some samples of the study. HGSC. In the high-grade ovarian cancer (HGSC) dataset from the study by Bashashati et. al. [27], 19 tumor samples from six patients were used to validate 340 somatic mutations using deep amplicon sequencing (with a median coverage of > 5000x). When run- Page 18 of 18 ning LICHeE, we used the hard thresholds of Tabsent = 0.005 and Tpresent = 0.01 for all the patients except Case5, where we used Tabsent = 0.01 and Tpresent = 0.04 due to a higher level of noise in the data, and required at least three mutations as evidence of a node in the tree. For Case5 we also removed the samples g and h from consideration since they had multiple inconclusive validation results as stated in the manuscript [27]. Xenoengraftment. The study by Eirew et. al. [30] used deep-genome and single-cell sequencing to evaluate the clonal dynamics of xenoengraftment of breast cancer tissue into immunodeficient mice. Single-cell analysis was done on passages SA501 (samples X1, X2, and X4) and SA494 (samples T and X4). When running LICHeE on both passages, we used the hard thresholds of Tabsent = 0.03 and Tpresent = 0.05 (the value 0.05 was indicated in the study’s supplementary materials); a minimum cluster size of 6 for non-private mutations and 5 for private mutations; and a maximum cluster collapse distance of 0.085.
5cs.CE
New Integrality Gap Results for the Firefighters Problem on Trees Parinya Chalermsook1 and Daniel Vaz1,2 1 arXiv:1601.02388v3 [cs.DM] 29 Jul 2016 2 Max-Planck-Institut für Informatik, Saarbrücken, Germany Graduate School of Computer Science, Saarland University, Saarbrücken, Germany {parinya, ramosvaz}@mpi-inf.mpg.de 1st August 2016 Abstract In the firefighter problem on trees, we are given a tree G = (V, E) together with a vertex s ∈ V where the fire starts spreading. At each time step, the firefighters can pick one vertex while the fire spreads from burning vertices to all their neighbors that have not been picked. The process stops when the fire can no longer spread. The objective is to find a strategy that maximizes the total number of vertices that do not burn. This is a simple mathematical model, introduced in 1995, that abstracts the spreading nature of, for instance, fire, viruses, and ideas. The firefighter problem is NP-hard and admits a (1 − 1/e) approximation based on rounding the canonical LP. Recently, a PTAS was announced[1]. 1 The goal of this paper is to develop better understanding on the power of LP relaxations for the firefighter problem. We first show a matching lower bound of (1 − 1/e + ) on the integrality gap of the canonical LP. This result relies on a powerful combinatorial gadget that can be used to derive integrality gap results in other related settings. Next, we consider the canonical LP augmented with simple additional constraints (as suggested by Hartke). We provide several evidences that these constraints improve the integrality gap of the canonical LP: (i) Extreme points of the new LP are integral for some known tractable instances and (ii) A natural family of instances that are bad for the canonical LP admits an improved approximation algorithm via the new LP. We conclude by presenting a 5/6 integrality gap instance for the new LP. 1 Introduction Consider the following graph-theoretic model that abstracts the fire spreading process: We are given graph G = (V, E) together with the source vertex s where the fire starts. At each time step, we are allowed to pick some vertices in the graph to be saved, and the fire spreads from burning vertices to their neighbors that have not been saved so far. The process terminates when the fire cannot spread any further. This model was introduced in 1995 [13] and has been used extensively by researchers in several fields as an abstraction of epidemic propagation. There are two important variants of the firefighters problem. (i) In the maximization variant (Max-FF), we are given graph G and source s, and we are allowed to pick one vertex per time step. The objective is to maximize the number of vertices that do not burn. And (ii) In the minimization variant (Min-FF), we are given a graph G, a source s, and a terminal set 1 The (1 − 1/e) approximation remained the best until very recently when Adjiashvili et al. [1] showed a PTAS. Their PTAS does not bound the LP gap. 1 X ⊆ V (G), and we are allowed to pick b vertices per time step. The goal is to save all terminals in X , while minimizing the budget b. In this paper, we focus on the Max-FF problem. The problem is n1− hard to approximate in general graphs [2], so there is no hope to obtain any reasonable approximation guarantee. Past research, however, has focused on sparse graphs such as trees or grids. Much better approximation algorithms are known on trees: The problem is NP-hard [15] even on trees of degree at most three, but it admits a (1 − 1/e) approximation algorithm. For more than a decade [2, 6, 5, 10, 14, 15], there was no progress on this approximability status of this problem, until a PTAS was recently discovered [1]. Besides the motivation of studying epidemic propagation, the firefighter problem and its variants are interesting due to their connections to other classical optimization problems: • (Set cover) The firefighter problem is a special case of the maximum coverage problem with group budget constraint (MCG) [7]: Given a collection of sets S = {S1 , . . . , Sm } : Si ⊆ X, together with group constraints, i.e. a partition of S into groups G1 , . . . , G` , we are interested in choosing one set from each group in a way that maximizes the total number of elements covered, i.e. a feasible solution is a subset S 0 ⊆ S where |S 0 ∩ Gj | ≤ 1 for all j, S and | Si ∈S 0 Si | is maximized. It is not hard to see that Max-FF is a special case of MCG. We refer the readers to the discussion by Chekuri and Kumar [7] for more applications of MCG. • (Cut) In a standard minimum node-cut problem, we are given a graph G together with a source-sink pair s, t ∈ V (G). Our goal is to find a collection of nodes V 0 ⊆ V (G) such that G \ V 0 has s and t in distinct connected components. Anshelevich et al. [2] discussed that the firefighters’ solution can be seen as a “cut-over-time” in which the cut must be produced gradually over many timesteps. That is, in each time step t, the algorithm is allowed to choose vertex set Vt0 to remove from the graph G, and again the final goal is to “disconnect” s from t 2 . This cut-over-time problem is exactly equivalent to the minimization variant of the firefighter problem. We refer to [2] for more details about this equivalence. 1.1 Our Contributions In this paper, we are interested in developing a better understanding of the Max-FF problem from the perspective of LP relaxation. The canonical LP relaxation has been used to obtain the known (1 − 1/e) approximation algorithm via straightforward independent LP rounding (each node is picked independently with the probability proportional to its LP-value). So far, it was not clear whether an improvement was possible via this LP, for instance, via sophisticated dependent rounding schemes 3 . Indeed, for the corresponding minimization variant, Min-FF, Chalermsook and Chuzhoy designed a dependent rounding scheme for the canonical LP in order to obtain O(log∗ n) approximation algorithm, improving upon an O(log n) approximation obtained via independent LP rounding. In this paper, we are interested in studying this potential improvement for Max-FF. Our first result refutes such possibility for Max-FF. In particular, we show that the integrality gap of the standard LP relaxation can be arbitrarily close to (1 − 1/e). Theorem 1. For any  > 0, there is an instance (G, s) (whose size depends on ) such that the ratio between optimal integral solution and fractional one is at most (1 − 1/e + ). 2 The notion of disconnecting the vertices here is slightly non-standard. Cai, Verbin, and Yang [5] claimed an LP-respecting integrality gap of (1 − 1/e), but many natural rounding algorithms in the context of this problem are not LP respecting, e.g. in [6] 3 2 Our techniques rely on a powerful combinatorial gadget that can be used to prove integrality gap results in some other settings studied in the literature. In particular, in the b-Max-FF problem, the firefighters can pick up to b vertices per time step, and the goal is to maximize the number of saved vertices. We provide an integrality gap of (1 − 1/e) for the b-Max-FF problem for all constant b ∈ N, thus matching the algorithmic result of [9]. In the setting where √ an input tree has degree at most d ∈ [4, ∞), we show an integrality gap result of (1−1/e+O(1/ d)). The best known algorithmic result in this setting was previously a (1 − 1/e + Ω(1/d)) approximation due to [14]. Motivated by the aforementioned negative results, we search for a stronger LP relaxation for the problem. We consider adding a set of valid linear inequalities, as suggested by Hartke [12]. We show the following evidences that the new LP is a stronger relaxation than the canonical LP. • Any extreme point of the new LP is integral for the tractable instances studied by Finbow et al. [11]. In contrast, we argue that the canonical LP does not satisfy this integrality property of extreme points. • A family of instances which captures the bad integrality gap instances given in Theorem 1, admits a better than (1 − 1/e) approximation algorithm via the new LP. • When the LP solution is near-integral, e.g. for half-integral solutions, the new LP is provably better than the old one. Our results are the first rigorous evidences that Hartke’s constraints lead to improvements upon the canonical LP. All the aforementioned algorithmic results exploit the new LP constraints in dependent LP rounding procedures. In particular, we propose a two-phase dependent rounding algorithm, which can be used in deriving the second and third results. We believe the new LP has an integrality gap strictly better than (1 − 1/e), but we are unable to analyze it. Finally, we show a limitation of the new LP by presenting a family of instances, whose integrality gap can be arbitrarily close to 5/6. This improves the known integrality gap ratio [12], and puts the integrality gap answer somewhere between (1 − 1/e) and 5/6. Closing this gap is, in our opinion, an interesting open question. Organization: In Section 2, we formally define the problem and present the LP relaxation. In Section 3, we present the bad integrality gap instances. We present the LP augmented with Hartke’s constraints in Section 4 and discuss the relevant evidences of its power in comparison to the canonical LP. Some proofs are omitted for space constraint, and are presented in Appendix. Related results: King and MacGillivray showed that the firefighter problem on trees is solvable in polynomial time if the input tree has degree at most three, with the fire starting at √ a degree-2 vertex. From exponential time algorithm’s perspective, Cai et al. showed 2O( n log n) time, exact algorithm. The discrete mathematics community pays particularly high attention to the firefighter problem on grids [16, 10], and there has also been some work on infinite graphs [13]. The problem also received a lot of attention from the parameterized complexity perspectives [8, 3, 5] and on many special cases, e.g., when the tree has bounded pathwidth [8] and on bounded degree graphs [8, 4]. Recent update: Very recently, Adjiashvili et al. [1] showed a polynomial time approximation scheme (PTAS) for the Max-FF problem, therefore settling the approximability status. Their results, however, do not bound the LP integrality gap. We believe that the integrality gap questions are interesting despite the known approximation guarantees. 3 2 Preliminaries A formal definition of the problem is as follows. We are given a graph G and a source vertex s where the fire starts spreading. A strategy is described by a collection of vertices U = {ut }nt=1 where ut ∈ V (G) is the vertex picked by firefighters at time t. We say that a vertex u ∈ V (G) is saved by the strategy U if for all path P = (s = v0 , . . . , vz = u) from s to u, we have vi ∈ {u1 , . . . , ui } for some i = 1, . . . , z. A vertex v not saved by U is said to be a burning vertex. The objective of the problem is to compute U so as to maximize the total number of saved vertices. Denote by OPT(G, s) the number of vertices saved by an optimal solution. When G is a tree, we think of G as being partitioned into layers L1 , . . . , Lλ where λ is the height of the tree, and Li contains vertices whose distance is exactly i from s. Every strategy has the following structure. Proposition 2. Consider the firefighters problem’s instance (G, s) where G is a tree. Let U = {u1 , . . . , un } be any strategy. Then there is another strategy U 0 = {u0t } where u0t belongs to layer t in G, and U 0 saves at least as many vertices as U does. We remark that this structural result only holds when an input graph G is a tree. LP Relaxation: This paper focuses on the linear programming aspect of the problem. For any vertex v, let Pv denote the (unique) path from s to v, and let Tv denote the subtree rooted at v. A natural LP relaxation is denoted by (LP-1): We have variable xv indicating whether v is picked by the solution, and yv indicating whether v is saved. (LP-2) (LP-1) max X max yv xv ≤ 1 for all layer j X xv ≤ 1 for all layer j v∈Lj v∈Lj yv ≤ yv v∈X v∈V X X X xu for all v ∈ V yv ≤ X xu for all v ∈ X u∈Pv u∈Pv xv , yv ∈ [0, 1] for all v xv , yv ∈ [0, 1] for all v Let LP(T, s) denote the optimal fractional LP value for an instance (T, s). The integrality gap gap(T, s) of the instance (T, s) is defined as gap(T, s) = OPT(T, s)/LP(T, s). The integrality gap of the LP is defined as inf T gap(T, s). Firefighters with terminals: We consider a more general variant of the problem, where we are only interested in saving a subset X of vertices, which we call terminals. The goal is now to maximize the number of saved terminals. An LP formulation of this problem, given an instance (T, v, X ), is denoted by (LP-2). The following lemma argues that these two variants are “equivalent” from the perspectives of LP relaxation. Lemma 3. Let (T, X , s), with |X | > 0, be an input for the terminal firefighters problem that gives an integrality gap of γ for (LP-2), and that the value of the fractional optimal solution is at least 1. Then, for any  > 0, there is an instance (T 0 , s0 ) that gives an integrality gap of γ +  for (LP-1). Proof. Let M = 2|V (T )|/. Starting from (T, X , s), we construct an instance (T 0 , s0 ) by adding M children to each vertex in X , so the number of vertices in T 0 is |V (T 0 )| = |V (T )| + M |X |. We denote the copies of X in T 0 by X 0 and the set of their added children by X 00 . The root of 4 the new tree, s0 , is the same as s (the root of T .) Now we argue that the instance (T 0 , s0 ) has the desired integrality gap, i.e. we argue that OPT(T 0 , s0 ) ≤ (γ + )LP(T 0 , s0 ). Let (x0 , y 0 ) be an integral solution to the instance (T 0 , s0 ). We upper bound the number of P vertices saved by this solution, i.e. upper bounding v∈V (T 0 ) yv0 . We analyze three cases: • For a vertex v ∈ V (T 0 ) \ X 00 , we upper bound the term yv0 by 1, and so the sum P 0 v∈V (T 0 )\X 00 yv by |V (T )|. • Now define X̃ ⊆ X 00 as the set of vertices v for which yv0 = 1 but yu0 = 0 for the parent u of P 0 ≤ |X |: We break the v. This means that x0v = 1 for all vertices in X̃ . Notice that v∈X̃ yvo n o n set X̃ into X̃u where X̃u = v ∈ X̃ : u is the parent of v . The LP constraint u∈V (T 0 ) P P guarantees that v∈X̃u yv0 = v∈X̃u x0v ≤ 1 (all vertices in X̃u belong to the same layer.) Summing over all such u ∈ X 0 , we get the desired bound. • Finally, consider the term v∈X 0 \X̃ yv0 . Let (x∗ , y ∗ ) be an optimal fractional solution to (T, X , s) for (LP-2). We only need to care about all vertices v such that yu0 = 1 P for the parent u of v. This term is upper bounded by M u∈X 0 yu0 , which is at most P M γ ( v∈X yv∗ ), due to the fact that the solution (x0 , y 0 ) induces an integral solution on instance (T, X , s). P Combining the three cases, we get |V (T )| + |X | + M γ ( v∈X yv∗ ) ≤ M + γM ( v∈X yv∗ ) ≤ P P M (γ + ) ( v∈X yv∗ ), if v∈X yv∗ ≥ 1. Now, notice that the fractional solution (x∗ , y ∗ ) for (LP-2) on instance (T, X , s) is also feasible for (LP-1) on (T 0 , s0 ) with at least a multiplicative factor of M times the objective value: Each fractional saving of u ∈ X 0 contributes to save all M P children of u. Therefore, M ( v∈X yv∗ ) ≤ M · LP(T 0 , s0 ), thus concluding the proof. P P We will, from now on, focus on studying the integrality gap of (LP-2). 3 Integrality Gap of (LP-2) We first discuss the integrality gap of (LP-2) for a general tree. We use the following combinatorial gadget. Gadget: A (M, k, δ)-good gadget is a collection of trees T = {T1 , . . . , TM }, with roots S r1 , . . . , rM where ri is a root of Ti , and a subset S ⊆ V (Ti ) that satisfy the following properties: • (Uniform depth) We think of these trees as having layers L0 , L1 , . . . , Lh , where Lj is the union over all trees of all vertices at layer j and L0 = {r1 , . . . , rm }. All leaves are in the same layer Lh . • (LP-friendly) For any layer Lj , j ≥ 1, we have |S ∩ Lj | ≤ k. Moreover, for any tree Ti and a leaf v ∈ V (Ti ), the unique path from ri to v must contain at least one vertex in S. • (Integrally adversarial) Let B ⊆ {r1 , . . . , rM } be any subset of roots. Consider a subset of vertices U = {uj }hj=1 such that uj ∈ Lj . For ri ∈ B and a leaf v ∈ Lh ∩ V (Ti ), we say that v is (U, B)-risky if the unique path from ri to v does not contain any vertex in U. There must be at least (1 − 1/k − δ) |B| M |Lh | vertices in Lh that are (U, B)-risky, for all choices of B and U. We say that vertices in S are special and all other vertices are regular. 5 Lemma 4. For any integers k ≥ 2, M ≥ 1, and any real number δ > 0, a (M, k, δ)-good gadget exists. Moreover, the gadget contains at most (k/δ)O(M ) vertices. We first show how to use this lemma to derive our final construction. The proof of the lemma follows later. Construction: Our construction proceeds in k phases, and we will define it inductively. The first phase of the construction is simply a (1, k, δ)-good gadget. Now, assume that we have constructed the instance up to phase q. Let l1 , . . . , lMq ∈ Lαp be the leaves after the construction of phase q that all lie in layer αq . In phase q + 1, we take the (Mq , k, δ)-good gadget (Tq , {rq }, Sq ); recall that such a gadget consists of Mq trees. For each i = 1, . . . , Mq , we unify each root ri with the leaf li . This completes the description of the construction. S Denote by S̄q = q0 ≤q Sq0 the set of all special vertices in the first q phases. After phase q, we argue that our construction satisfies the following properties: • All leaves are in the same layer αq . • For every layer Lj , |Lj ∩ S̄q | ≤ k. For every path P from the root to v ∈ Lαi , |P ∩ S̄q | = q. • For any integral solution U, at least |Lαq | ((1 − 1/k)q − qδ) vertices of Lαq burn. It is clear from the construction that the leaves after phase q are all in the same layer. As to the second property, the properties of the gadget ensure that there are at most k special vertices per layer. Moreover, consider each path P from the root to some vertex v ∈ Lαq+1 . We can split this path into two parts P = P 0 ∪ P 00 where P 0 starts from the root and ends at some v 0 ∈ Lαq , and P 00 starts at v 0 and ends at v. By the induction hypothesis, |P 0 ∩ S̄q | = q and the second property of the gadget guarantees that |P 00 ∩ Sq+1 | = 1. To prove the final property, consider a solution U = {u1 , . . . , uαq+1 }, which can be seen as 0 U ∪ U 00 where U 0 = {u1 , . . . , uαq } and U 00 = {uαq +1 , . . . , uαq+1 }. By the induction hypothesis, we have that at least ((1 − 1/k)q − qδ) |Lαq | vertices in Lαq burn; denote these burning vertices |B| by B. The third property of the gadget will ensure that at least (1 − 1/k − δ) M |Lαq+1 | vertices q 00 in Lαq+1 must be (U , B)-risky. For each risky vertex v ∈ Lαq+1 , a unique path from the root to v 0 ∈ B does not contain any vertex in U 0 , and also the path from v 0 to v does not contain a vertex in U 00 (due to the fact that it is (U 00 , B)-risky.) This implies that such vertex v must burn. Therefore, the fraction of burning vertices in layer Lαq+1 is at least (1 − 1/k − δ)|B|/Mq ≥ (1 − 1/k −δ)((1−1/k)q −qδ), by induction hypothesis. This number is at least (1−1/k)q+1 −(q +1)δ, maintaining the invariant. After the construction of all k phases, the leaves are designated as the terminals X . Also, Mq+1 ≤ (k/δ)2Mq , which means that, after k phases, Mk is at most a tower function of (k/δ)2 , ··· that is, (k/δ)2(k/δ) with k − 1 such exponentiations. The total size of the construction is P 2Mq ≤ (k/δ)2Mk = O(M k+1 ). q (k/δ) An example construction, when k = 2, is presented in Figure 3 (in Appendix). Theorem 5. A fractional solution, that assigns xv = 1/k to each special vertex v, saves every terminal. On the other hand, any integral solution can save at most a fraction of 1−(1−1/k)k +. Proof. We assign the LP solution xv = 1/k to all special vertices (those vertices in S̄k ), and xv = 0 to regular vertices. Since the construction ensures that there are at most k special vertices P per layer, we have v∈Lj xv ≤ 1 for every layer Lj . Moreover, every terminal is fractionally P saved: For any t ∈ X , the path |Pt ∩ S̄k | = k, so we have v∈Pt xv = 1. For the integral solution analysis, set δ = /k. The proof follows immediately from the properties of the instance. 6 3.1 Proof of Lemma 4 We now show that the (M, k, δ)-good gadget exists for any value of M ∈ N, k ∈ N, k ≥ 2 and δ ∈ R>0 . We first describe the construction and then show that it has the desired properties. Construction: Throughout the construction, we use a structure which we call spider. A spider is a tree in which every node except the root has at most one child. If a node has no children (i. e. a leaf), we call it a foot of the spider. We call the paths from the root to each foot the legs of the spider. Let D = d4/δe. For each i = 1, . . . , M , the tree Ti is constructed as follows. We have a spider rooted at ri that contains kDi−1 legs. Its feet are in Di−1 consecutive layers, starting at P layer αi = 1 + j<i Dj−1 ; each such layer has k feet. Denote by S (i) the feet of these spiders. Next, for each vertex v ∈ S (i) , we have a spider rooted at v, having D2M −i+1 feet, all of which P S (i) belong to layer α = 1 + j≤M Dj−1 . The set S is defined as S = M i=1 S . This concludes the construction. We will use the following observation: Observation 6. For each root ri , the number of leaves of Ti is kD2M . Analysis: We now prove that the above gadget is (M, k, δ)-good. The construction ensures that all leaves are in the same layer Lα . The second property also follows obviously from the construction: For i 6= i0 , we have that 0 (i) S ∩ S (i ) = ∅, and that each layer contains exactly k vertices from S (i) . Moreover, any path from ri to the leaf of Ti must go through a vertex in S (i) . The third and final property is established by the following two lemmas. Lemma 7. For any ri ∈ B and any subset of vertices U = {uj }hj=1 such that uj ∈ Lj , a fraction of at least (1 − 1/k − 2/D) of S (i) are (U, B)-risky. Proof. Notice that a vertex v is (U, B)-risky if U is not a vertex cut separating v from B. There are kDi−1 vertex-disjoint paths from ri ∈ B to vertices in S (i) . But the cut U induced on these P 0 paths contains at most i0 ≤i Di −1 vertices (because all vertices in S (i) are contained in the P 0 first i0 ≤i Di −1 ≤ Di−1 + 2Di−2 layers.) Therefore, at most (1/k + 2/D) fraction of vertices in S (i) can be disconnected by U, and those that are not cut remain (U, B)-risky. Lemma 8. Let v ∈ S (i) that is (U, B)-risky. Then at least (1 − 2/D) fraction of descendants of v in Lα must be (U, B)-risky. Proof. Consider each v ∈ S (i) that is (U, B)-risky and a collection of leaves Lv that are descendants of vertex v. Notice that a leaf u ∈ Lv is (U, B)-risky if removing U does not disconnect vertex v from u. There are D2M −i+1 ≥ DM +1 vertex disjoint paths connecting vertex v with leaves in Lv , while the cut set U contains at most 2DM vertices. Therefore, removing U can disconnect at most 2/D fraction of vertices in Lv from v. Combining the above two lemmas, for each ri ∈ B, the fraction of leaves of Ti that are (U, B)-risky are at least (1 − 1/k − 2/D)(1 − 2/D) ≥ (1 − 1/k − 4/D). Therefore, the total number of such leaves, over all trees in T , are (1 − 1/k − δ)|B||Lα |/M . We extend the cosntruction to other settings in Section 3.1 (in Appendix). Arbitrary number of firefighters: Let b ∈ N. In the b-firefighter problem, at each time step, the firefighters may choose up to b vertices, and the fire spreads from the burning vertices to vertices that have not been chosen so far. The goal is to maximize the number of saved vertices. In this section, we show the following: 7 Theorem 9. For any integer b ∈ N (independent of |V (G)|), the integrality gap of the canonical LP can be arbitrarily close to (1 − 1/e). Proof. To prove this theorem, one only need to design a slightly different good gadget. That is, an (M, k, δ)-good gadget is now a collection of trees T with roots r1 , . . . , rM together with S S ⊆ V (Ti ) that satisfy the following properties: • All leaves of Ti are in the same layer Lh . • For each layer Lj , we have |S ∩ Lj | ≤ kb. Moreover, for any tree Ti and a leaf v ∈ V (Ti ), the unique path from ri to v must contain at least one vertex in S. h| • For any subset B ⊆ {r1 , . . . , rM } of roots and for any strategy U, at least (1−1/k−δ) |B||L M vertices in Lh are (U, B)-risky. It is not hard to see that these gadgets can be used to construct the integrality gap in the same way as in the previous section. Details are omitted. Bounded degrees: Iwakawa et al. showed a (1 − 1/e + Ω(1/d)) approximation algorithm for the instance that has degree at most d. We show an instance where this dependence on 1/d is almost the best possible that can be obtained from this LP. Theorem 10. For all d ≥ 4, the integrality gap of (LP-1) on degree-d graphs is (1 − 1/e + √ O(1/ d)). Proof. To prove this theorem, we construct a “bounded degree” analogue of our good gadgets. That is, the (M, k)-good gadget in this setting guarantees that • All leaves of Ti are in the same layer Lh . • For each layer Lj , we have |S ∩ Lj | ≤ k. For each tree Ti , for each leaf v ∈ V (Ti ), the unique path from ri to v contains one vertex in S. h| • For any subset B ⊆ {r1 , . . . , rM }, for any strategy U, at least (1 − 1/k − O(1/d)) |B||L M vertices in Lh are (U, B)-risky. This gadget can be used to recursively construct the instance in k phases. The final instance √ k guarantees the integrality √ gap of 1−(1−1/k) +O(k/d). By setting k = d, we get the integrality gap of (1 − 1/e + O(1/ d)) as desired4 . 4 Hartke’s Constraints Due to the integrality gap result in the previous section, there is no hope to improve the best known algorithms via the canonical LP relaxation. Hartke [12] suggested adding the following constraints to narrow down the integrality gap of the LP. X xu ≤ 1 for all vertex v ∈ V (T ) and layer Lj below the layer of v u∈Pv ∪(Tv ∩Lj ) We write the new LP with these constraints below: 4 By analyzing the Taylor’s series expansion of 1/e − (1 − 1/k)k , we get the term 8 1 2ek + O(1/k2 ) (LP’) max X yv v∈V xu ≤ 1 for all layer j below vertex v X u∈Pv ∪(Tv ∩Lj ) yv ≤ X xu for all v ∈ V u∈Pv xv , yv ∈ [0, 1] for all v Proposition 11. Given the values {xv }v∈V (T ) that satisfy the first set of constraints, then the P solution (x, y) defined by yv = u∈Pv xv is feasible for (LP’) and at least as good as any other feasible (x, y 0 ). In this section, we study the power of this LP and provide three evidences that it may be stronger than (LP-1). 4.1 New properties of extreme points In this section, we show that Finbow et al. tractable instances [11] admit a polynomial time exact algorithm via (LP’) (in fact, any optimal extreme point for (LP’) is integral.) In contrast, we show that (LP-1) contains an extreme point that is not integral. We first present the following structural lemma. Lemma 12. Let (x, y) be an optimal extreme point for (LP’) on instance T rooted at s. Suppose s has two children, denoted by a and b. Then xa , xb ∈ {0, 1}. Proof. Suppose that xa , xb ∈ (0, 1). We will define two solutions (x0 , y0 ) and (x00 , y00 ) and derive that (x, y) can be written as a convex combination of (x0 , y0 ) and (x00 , y00 ), a contradiction. First, we define (x0 , y0 ) by setting x0b = 1, x0a = 0. For each vertex v ∈ Tb , we set x0v = 0. For each vertex v ∈ Ta , we define x0v = xv /(1 − xa ). We verify that x0 is feasible for (LP’): For each P  v ∈ Ta and any layer Lj below v, 0 u∈Pv xu P + 0 u∈Tv ∩Lj xu P = P xu −xa (1−xa ) u∈Pv + u∈Tv ∩Lj xu (1−xa ) ≤  P u∈Pv ∪(Tv ∩Lj ) xu −xa ≤ 1 (the last inequality is due to the fact that x is feasible). The P constraint is obviously satisfied for all v ∈ Tb . For the root node v = s, we have u∈Lj x0u = (1−xa ) P  u ∈(Lj ∩Ta x −xa ) u ≤ 1. We define analogously: x00b = 0, x00a = 1. For each vertex v ∈ Ta , we set x00v = 0, and for each v ∈ Tb , we define x00v = xv /(1 − xb ). It can be checked similarly that (x00 , y00 ) is a feasible solution. (1−xa ) (x00 , y00 ) Claim 13. If x is an optimal extreme point, then xa + xb = 1. Proof. Observe that, for each v ∈ Tb , yv0 = 1 and for each v ∈ Ta , yv0 = value of x0 is |Tb | + P v∈Ta yv0 = |Tb | + 1 (1−xa ) v∈Ta (yv P Similarly, the objective value of solution x00 is |Ta | + xb (1−xb ) |Tb |. 9 − xa ) = |Tb | + 1 (1−xb ) v∈Tb (yv P yv −xa P1−xa . The objective y v∈Ta v (1−xa ) − − xb ) = |Ta | + xa (1−xa ) P v∈Tb |Ta |. yv (1−xb ) − Consider the convex combination has the objective value of 1−xa 0 (2−xa −xb ) x + 1−xb 00 (2−xa −xb ) x . This solution is feasible and   1 · (1 − xa − xb ) (|Ta | + |Tb |) + yv  (2 − xa − xb ) v∈V (T ) X If xa + xb < 1, we apply the fact that |Ta | + |Tb | > v∈V (T ) yv to get the objective of strictly P more than v∈V (T ) yv , contradicting the fact that (x, y) is optimal. P Finally, we define the convex combination by z = (1 − xa )x0 + xa x00 . It can be verified easily that zv = xv for all v ∈ V (T ). Finbow et al. Instances: In this instance, the tree has degree at most 3 and the root has degree 2. Finbow et al. [11] showed that this is polynomial time solvable. Theorem 14. Let (T, s) be an input instance where T has degree at most 3 and s has degree two. Let (x, y) be a feasible fractional solution for (LP-3). Then there is a polynomial time P algorithm that saves at least v∈V (T ) yv vertices. Proof. We prove this by induction on the number of nodes in the tree that, for any tree (T 0 , s0 ) that is a Finbow et al. instance, for any fractional solution (x, y) for (LP’), there is an integral P P solution (x0 , y 0 ) such that v∈T 0 \{s0 } yv0 = v∈T 0 \{s0 } yv . Let a and b be the children of the P root s. From Lemma 12, assume w.l.o.g. that xa = 1, so we have v∈Ta yv = |Ta |. By the induction hypothesis, there is an integral solution (x0 , y 0 ) for the subtree Tb such that P P P 0 0 0 0 extended to the instance T v∈Tb yv . The solution (x , y ) can be P v∈Tb \{b} yv = v∈Tb yv = P 0 by defining xa = 1. This solution has the objective value of |Ta | + v∈Tb yb0 = |Ta | + v∈Tb yb , completing the proof. Bad instance for (LP-1): We show in Figure 1 a Finbow et al. instance as well as a solution for (LP-1) that is optimal and an extreme point, but not integral. a b Claim 15. The solution (x, y) represented in Figure 1, with y defined c d according to Proposition 11, is an extreme point of this instance for (LP-1). Figure 1 Instance with Proof. Suppose (for contradiction) that (x, y) is not an extreme point. a non-integral extreme Then, there are distinct solutions (x0 , y 0 ), (x00 , y 00 ) and α ∈ (0, 1) such point for (LP-1). Gray vertices: xv = 1/2; oththat (x, y) = α(x0 , y 0 ) + (1 − α)(x00 , y 00 ). Since yc = 1 and yc0 , yc00 ≤ 1, erwise: x = 0. v then yc0 = yc00 = 1, and likewise, yd0 = yd00 = 1. Combining that x0a + x0c = yc0 = 1 with x0a + x0d = yd0 = 1 and x0c + x0d ≤ 1, we conclude that x0a ≥ 1/2. Similarly, we get that x00a ≥ 1/2, which implies that x0a = x00a = 1/2. Similar reasoning using that x0a + x0b ≤ 1 allows us to conclude that x0b = x00b = 1/2, and thus, (x0 , y 0 ) = (x00 , y 00 ) = (x, y), which contradicts our assumption. 4.2 Rounding 1/2-integral Solutions We say that the LP solution (x, y) is (1/k)-integral if, for all v, we have xv = rv /k for some integer rv ∈ {0, . . . , k}. By standard LP theory, one can assume that the LP solution is (1/k)integral for some polynomially large integer k. In this section, we consider the case when k = 2 (1/2-integral LP solutions). From Theorem 5, (LP-1) is not strong enough to obtain a 3/4 +  approximation algorithm, for any  > 0. Here, we show a 5/6 approximation algorithm based on rounding (LP’). 10 Theorem 16. Given a solution (x, y) for (LP’) that is 1/2-integral, there is a polynomial time P algorithm that produces a solution of cost 5/6 v∈V (T ) yv . We believe that the extreme points in some interesting special cases will be 1/2-integral. Algorithm’s Description: Initially, U = ∅. Our algorithm considers the layers L1 , . . . , Ln in this order. When the algorithm looks at layer Lj , it picks a vertex uj and adds it to U, as follows. Consider Aj ⊆ Lj , where Aj = {v ∈ Lj : xv > 0}. Let A0j ⊆ Aj contain vertices v such that there is no ancestor of v that belongs to Aj 0 for some j 0 < j, and A00j = Aj \ A0j , i.e. for each v ∈ A00j , there is another vertex u ∈ Aj 0 for some j 0 < j such that u is an ancestor of v. We choose the vertex uj based on the following rules: • If there is only one v ∈ Aj , such that v is not saved by U so far, choose uj = v. • Otherwise, if |A0j | = 2, pick uj at random from A0j with uniform probability. Similarly, if |A00j | = 2, pick uj at random from A00j . • Otherwise, we have the case |A0j | = |A00j | = 1. In this case, we pick vertex uj from A0j with probability 1/3; otherwise, we take from A00j . Analysis: Below, we argue that each vertex v ∈ V (T ) : xv > 0 is saved with probability at least (5/6)yv . It is clear that this implies the theorem: Consider a vertex v 0 : xv0 = 0. If yv0 = 0, we are immediately done. Otherwise, consider the bottommost ancestor v of v 0 such that xv > 0. Since yv = yv0 , the probability that v 0 is saved is the same as that of v, which is at least (5/6)yv . We analyze a number of cases. Consider a layer Lj such that |Aj | = 1. Such a vertex v ∈ Aj is saved with probability 1. Next, consider a layer Lj such that |A0j | = 2. Each vertex v ∈ A0j is saved with probability 1/2 and yv = 1/2. So, in this case, the probability of saving v is more than (5/6)yv . Lemma 17. Let Lj be the layer such that |A0j | = |A00j | = 1. Then the vertex u ∈ A0j is saved with probability 2/3 ≥ (5/6)yu and vertex v ∈ A00j is saved with probability 5/6. Proof. Let v 0 ∈ Aj 0 be the ancestor of v in some layer above Aj . The fact that v has not been saved means that v 0 is not picked by the algorithm, when it processed Aj 0 . We prove the lemma by induction on the value of j. For the base case, let Lj be the first layer such that |A0j | = |A00j | = 1. This means that the layer Lj 0 must have |A0j 0 | = 2, and therefore the probability of v 0 being saved is at least 1/2. Vertex u is not saved only if both v 0 and u are not picked, and this happens with probability 1/2 · 2/3 = 1/3. Hence, vertex u is saved with probability 2/3 as desired. Consider now the base case for vertex v, which is not saved only if v 0 is not saved and u is picked by the algorithm among {u, v}. This happens with probability 1/2 · 1/3 = 1/6, thus completing the proof of the base case. For the purpose of induction, we now assume that, for all layer Li above Lj such that |A0i | = |A00i | = 1, the probability that the algorithm saves the vertex in A0i is at least 2/3. Since the vertex u is not saved only if v 0 is not saved, this probability is either 1/2 or 1/3 depending on the layer to which v 0 belongs. If it is 1/3, we are done; otherwise, the probability is at most 1/2 · 2/3 = 1/3. Now consider vertex v, which is not saved only if v 0 is not saved and u is picked at Lj . This happens with probability at most 1/2 · 1/3 = 1/6. Lemma 18. Let Lj be a layer such that A00j = {u, v} (containing two vertices). Then each such vertex is saved with probability at least 5/6. 11 Proof. Let u0 and v 0 be the ancestors of u and v in some sets A0i and A0k above the layer Lj . There are the two possibilities: either both u0 and v 0 are in layers with |A0i | = |A0k | = 2 (maybe i = k); or u0 is in the layer with |A0i | = |A00i | = 1. We remark that u0 6= v 0 : otherwise, the LP constraint for v 0 and Lj would not be satisfied. For u or v to be unsaved, we need that both u0 and v 0 are not saved by the algorithm. Otherwise, if, say, u0 is saved, u is also saved, and the algorithm would have picked v. P [u is not saved] = P [u not picked ∧ u0 is not saved ∧ v 0 is not saved] = P [u not picked] · P [u0 is not saved ∧ v 0 is not saved] 1 1 1 = · = 2 4 8 7 5 P [u is saved] = ≥ 8 6 It must be that P [u0 burns ∧ v 0 burns] ≤ 1/4, since either u0 and v 0 are in different layers or they are in the same layer. If they are in different layers, picking each of them is independent, and the probability of neither being saved is at most 1/4. If they are in the same layer, one of them is necessarily picked, which implies that the probability of neither being saved is 0. In any case, the probability is at most 1/4. In the second case, at least one of the vertices u0 , v 0 is in a layer with one 2-special vertex. W. l. o. g. let u0 be in such a layer. By Lemma 17, we know that the probability that u0 is not saved is at most 1/3. Therefore, P [u burns] = P [u not picked ∧ u0 burns ∧ v 0 burns] = P [u not picked] · P [u0 burns ∧ v 0 burns] ≤ P [u not picked] · P [u0 burns] 1 1 1 ≤ · = 2 3 6 5 P [u is saved] ≥ 6 The proof for both cases works analogously for v. 4.3 Ruling Out the Gap Instances in Section 3 In this section, we show that the integrality gap instances for (LP-1) presented in the previous section admit a better than (1 − 1/e) approximation via (LP’). To this end, we introduce the concept of well-separable LP solutions and show an improved rounding algorithm for solutions in this class. Let η ∈ (0, 1). Given an LP solution (x, y) for (LP-1) or (LP’), we say that a vertex v is P η-light if u∈Pv \{v} xu < η; if a vertex v is not η-light, we say that it is η-heavy. A fractional solution is said to be η-separable if for all layer j, either all vertices in Lj are η-light, or they are all η-heavy. For an η-separable LP solution (x, y), each layer Lj is either an η-light layer that contains only η-light vertices, or η-heavy layer that contains only η-heavy vertices. Observation 19. The LP solution in Section 3 is η-separable for all values of η ∈ {1/k, 2/k, . . . , 1}. Theorem 20. If the LP solution (x, y) is η-separable for some η, then there is an efficient P algorithm that produces an integral solution of cost (1 − 1/e + f (η)) v yv , where f (η) is some function depending only on η. 12 Algorithm: Let T be an input tree, and (x, y) be a solution for (LP’) on T that is ηseparable for some constant η ∈ (0, 1). Our algorithm proceeds in two phases. In the first phase, it performs randomized rounding independently for each η-light layer. Denote by V1 the (random) collection of vertices selected in this phase. Then, in the second phase, our algorithm performs randomized rounding conditioned on the solutions in the first phase. In particular, when we process each η-heavy layer Lj , let L̃j be the collection of vertices that   have not yet been saved by V1 . We sample one vertex v ∈ L̃j from the distribution xv x(L̃j ) . Let V2 be the v∈L̃j set of vertices chosen from the second phase. This completes the description of our algorithm. For notational simplification, we present the proof when η = 1/2. It will be relatively obvious that the proof can be generalized to work for any η. Now we argue that each terminal t ∈ X is saved with probability at least (1 − 1/e + δ)yt for some universal constant δ > 0 that depends only on η. We will need the following simple observation that follows directly by standard probabilistic analysis. Proposition 21. For each vertex v ∈ V (T ), the probability that v is not saved is at most Q −yv . u∈Pv (1 − xu ) ≥ 1 − e We start by analyzing two easy cases. Lemma 22. Consider t ∈ X . If yt < 0.9 or there is some ancestor v ∈ Pt such that xv > 0.2, then the probability that v is saved by the algorithm is at least (1 − 1/e + δ)yt . Proof. First, let us consider the case where yt < 0.9. The probability of t being saved is at least 1 − e−yv , according to the straightforward analysis. If yt < 0.9, we have 1 − e−yt /yt > 1.04(1 − 1/e)yt as desired. Consider now the second case when xv > 0.2 for some ancestor v ∈ Pt . The bound used typically in the analysis is only tight when the values are all small, and, therefore, we get an advantage when one of the values is relatively big. In particular, Pr [t is saved] ≥ 1 − Y (1 − xu ) u∈Pt ≥ 1 − (1 − xv )e−(yt −xv ) ≥ 1 − (1 − 0.2)e−(yt −0.2) ≥ 1.01(1 − 1/e)yv From now on, we only consider those terminals t ∈ X such that yt ≥ 0.9 and xv < 0.2, for all v ∈ Pt . We remark here that if the value of η is not 1/2, we can easily pick other suitable thresholds instead of 0.9 and 0.2. For each vertex v ∈ V , let X1 ⊆ X be the set of terminals that are saved by V1 , i.e. a vertex t ∈ X1 if and only if t is a descendant of some vertex in V1 . Let X2 ⊆ X \ X1 contain the set of terminals that are not saved by the first phase, but are saved by the second phase, i.e. t ∈ X2 if and only if t has some ancestor in V2 . PrV1 ,V2 [t 6∈ X1 ∪ X2 ] = PrV1 ,V2 [t 6∈ X1 ] PrV1 ,V2 [t 6∈ X2 : t 6∈ X1 ] For any terminal t, let St0 and St00 be the sets of ancestors of t that are η-light and η-heavy respectively, i.e. ancestors in St0 and St00 are considered by the algorithm in Phase 1 and 2 0 respectively. By Proposition 21, we can upper bound the first term by e−x(St ) . In the rest of 13 00 this section, we show that the second term is upper bounded by e−x(St ) c for some c < 1, and 0 00 therefore Pr [t 6∈ X1 ∪ X2 ] ≤ ce−x(St )−x(St ) ≤ ce−yt , as desired. The following lemma is the main technical tool we need in the analysis. We remark that this lemma is the main difference between (LP’) and (LP-2). Lemma 23. Let t ∈ X and Lj be a layer containing some η-heavy ancestor of t. Then EV1 [x(L̃j ) | t 6∈ X1 ] ≤ α 1 + (1 − e−1/2 ) ≤ 0.9 2 Intuitively, this lemma says that any terminal that is still not saved by the result of the first phase will have a relatively “sparse” layer above it. We defer the proof of this lemma to the next subsection. Now we proceed to complete the analysis. For each vertex v, denote by `(v) the layer to which vertex v belongs. For a fixed choice of P V1 , we say that terminal t is partially protected by V1 if v∈St00 xv x(L̃`(v) ) ≤ Cx(St00 ) (we will choose the value of C ∈ (α, 1) later). Let X 0 ⊆ X \ X1 denote the subset of terminals that are partially protected by V1 . for α = Claim 24. For any t ∈ X , PrV1 [t ∈ X 0 | t 6∈ X1 ] ≥ 1 − α/C. Proof. By linearity of expectation and Lemma 23,  EV1   X xv x(L̃`(v) ) | t 6∈ X1  = v∈St00 X h i xv EV1 x(L̃`(v) ) | t 6∈ X1 ≤ αx(St00 ) v∈St00 Using Markov’s inequality,   PrV1  X xv x(L̃`(v) ) ≤ Cx(St00 ) | t 6∈ X1  v∈St00  = 1 − Pr  ≥1− =1−  X xv x(L̃`(v) ) > Cx(St00 ) | t 6∈ X1  v∈St00 αx(St00 ) Cx(St00 ) α C We can now rewrite the probability of a terminal t ∈ X not being saved by the solution after the second phase. PrV1 ,V2 [t 6∈ X2 | t 6∈ X1 ] = Pr t ∈ X 0 | t 6∈ X1 Pr t 6∈ X2 | t ∈ X 0 + Pr t 6∈ X 0 | t 6∈ X1 Pr t 6∈ X2 | t 6∈ X 0   α 00 ≤ (1 − α/C)PrV1 ,V2 t 6∈ X2 | t ∈ X 0 + · e−x(St ) C        00  The last inequality holds because PrV1 ,V2 [t 6∈ X2 | t 6∈ X 0 ] is at most e−x(St ) from Proposition 21. It remains to provide a better upper bound for Pr [t 6∈ X2 | t ∈ X 0 ]. Consider a vertex v ∈ St00 that is involved in the second phase rounding. We say that vertex v is good for t and 14 V1 if x(L̃`(v) ) ≤ C 0 (we will choose the value C 0 ∈ (C, 1) later.) Denote by Stgood ⊆ St00 the set of good ancestors of t. The following claim ensures that good ancestors have large LP-weight in total. Claim 25. For any node t ∈ X 0 , x(Stgood ) = P xv ≥ (1 − C/C 0 )x(St00 ). v∈Stgood Proof. Suppose (for contradiction) that the fraction of good layers was less than 1 − C/C 0 . This means that x(St00 \ Stgood ) ≥ C/C 0 . For each such v ∈ St00 \ Stgood , we have x(L̃(v)) > C 0 . Then, P P x C 0 ≥ C. This contradicts the assumption that t is partially v∈St00 xv x(L̃`(v) ) > v∈St00 \Stgood v protected, and concludes our proof. Now the following lemma follows. Lemma 26. PrV1 ,V2 [t 6∈ X2 | t ∈ X 0 ] ≤ e−x(St ) e−(1− C 0 )x(St )( C 0 −1) C 00 00 1 Proof. PrV1 ,V2 t 6∈ X2 | t ∈ X 0  =  PrV1 V1 = V10 PrV2 t 6∈ X2 | V1 = V10 X     V10 :t∈X 0 ≤ PrV1 V1 = V10 X   V10 :t∈X 0 ≤  V10 :t∈X 0 ≤ X bad v∈St00 PrV1 1− good v∈St00 e−xv Y  Y bad v∈St00 0 PrV1 V1 = V1 X (1 − xv ) Y Y e−xv /C xv C0  0 good v∈St00  0 00 0 00 C V1 = V10 e−x(St ) C 0 −(1−C/C )x(St )/C  V10 :t∈X 0 00 C 0 00 ≤ e−x(St ) C 0 −(1−C/C )x(St )/C 0 X PrV1 V1 = V10   V10 :t∈X 0 00 C 0 00 0 ≤ e−x(St ) C 0 −(1−C/C )x(St )/C 1 0 00 00 ≤ e−x(St ) e−(1−C/C )x(St )( C 0 −1) Now we choose the parameters C and C 0 such that C = (1 + δ)α, C 0 = (1 + δ)C, and (1 + δ)C 0 = 1, where (1 + δ)3 = 1/α. Notice that this choice of parameters satisfy our previous requirements that α < C < C 0 < 1. The above lemma then gives the upper bound of 00 δ2 00 00 e−x(St ) e− 1+δ x(St ) , which is at most e−(1+δ /2)x(St ) . Since δ > 0 is a constant, notice that we do have an advantage over the standard LP rounding in this case. Now we plug in all the parameters to obtain the final result. 2 PrV1 ,V2 [t 6∈ X1 ∪ X2 ] = PrV1 ,V2 [t 6∈ X1 ] PrV1 ,V2 [t 6∈ X2 | t 6∈ X1 ] 0  (1 − α/C) PrV1 ,V2 t 6∈ X2 | t ∈ X 0 + 0  (1 − α/C) e−x(St ) e− 2 x(St ) + ≤ e−x(St ) ≤ e−x(St ) ≤ e−yt  ≤ e−yt   00 δ2 00  δ2 (1 − α/C) e− 2 x(St ) + α/C 00  δ −(1+δ2 /2)x(St00 ) 1 e + 1+δ 1+δ 15  α −x(St00 ) e C α −x(St00 ) e C   Since we assume that yt > 0.9 and xv ≤ 0.2, we must have x(St00 ) ≥ 0.2, and therefore the above term can be seen as e−yt · δ 0 for some δ 0 < 1. Overall, the approximation factor we get is (1 − δ 0 /e) for some universal constant δ 0 ∈ (0, 1). 4.3.1 Proof of Lemma 23 For each u, let Eu denote the event that u is not saved by V1 . First we break the expectation P term into u∈Lj xu Pr [Eu | t 6∈ X1 ]. Let v ∈ L be the ancestor of t in layer Lj . We break down the sum further based on the “LP coverage” of the least common ancestor between u and v, as follows: k/2 X xu Pr [Eu | t 6∈ X1 ] X i=0 u∈Lj :q 0 (lca(u,v))=i Here, q 0 (u) denotes k · x(Pu ); this term is integral since we consider the 1/k-integral solution (x, y). The rest of this section is devoted to upper bounding the term Pr [Eu | t 6∈ X1 ]. The following claim gives the bound based on the level i to which the least common ancestor belongs. Claim 27. For each u ∈ Lj such that q 0 (lca(u, v)) = i, Pr [Eu | t 6∈ X1 ] ≤ e−(1/2−i/k) Proof. First, we recall that yu ≥ 1/2 and q 0 (u) ≥ k/2, since u is in the 1/2-heavy layer Lj . Let w = lca(u, v) and P 0 be the path that connects w to u. Moreover, denote by S ⊆ P 0 the set of P P light vertices on the path P 0 , i.e. S = St0 ∩ P 0 . Notice that x(S) ≥ a∈St0 ∩Pu xa − a∈Pw xa ≥ (1/2 − i/k). For each w0 ∈ S, Pr [w0 6∈ V1 | t 6∈ X1 ] ∈ {1 − xw0 , 1 − xw0 /(1 − xv0 )} depending on whether there is a vertex v 0 in Pv that shares a layer with w0 . In any case, it holds that Pr [w0 6∈ V1 | t 6∈ X1 ] ≤ (1 − xw0 ). This implies that Pr [Eu | t 6∈ X1 ] ≤ Y Pr w0 6∈ V1 | t 6∈ X1   w0 ∈S ≤ Y (1 − xw0 ) w0 ∈S ≤ Y e−xw0 w0 ∈S −(1/2−i/k) ≤e Claim 28. Let i be an integer and L0 ⊆ Lj be the set of vertices u such that q 0 (lca(u, v)) is at least i. Then x(L0 ) ≤ (k − i)/k. Proof. This claim is a consequence of Hartke’s constraints. Let v 0 be the topmost ancestor of v such that q 0 (v 0 ) ≥ i. We remark that all vertices in L0 must be descendants of v 0 , so it must be P that w∈Pv0 xw + x(L0 ) ≤ 1. The first term is i/k, implying that x(L0 ) ≤ (k − i)/k. Let Lij ⊆ Lj denote the set of vertices u whose least common ancestor lca(u, v) satisfies P 0 q 0 (lca(u, v)) = i. As a consequence of Claim 28, i0 ≥i x(Lij ) ≤ (k − i)/k. Combining this inequality with Claim 27, we get that h i E x(L̃j ) | t 6∈ X1 ≤ k/2 X x(Lij )e−1/2+i/k i=0 16 k/2 This term is maximized when x(Lj ) = 1/2 and x(Lij ) = 1/k for all other i = 0, 1, . . . , k/2− 1. This implies that k/2−1 h i E x(L̃j ) | t 6∈ X1 ≤ 1/2 + X e−1/2+i/k /k i=0 Finally, using some algebraic manipulation and the fact that 1 + x ≤ ex , we get k/2−1 h i E x(L̃j ) | t 6∈ X1 ≤ 1/2 + X e−1/2+i/k /k i=0 1 −1/k 1 − e−1/2 e k 1 − e−1/k 1/k 1 = 1/2 + (1 − e−1/2 ) 1/k e 1 − e−1/k 1/k = 1/2 + (1 − e−1/2 ) 1/k e −1 ≤ 1/2 + (1 − e−1/2 ) = 1/2 + 4.4 Integrality Gap for (LP’) In this section, we present an instance where (LP’) has an integrality gap of 5/6 + , for any  > 0. Interestingly, this instance admits an optimal 21 -integral LP solution. Gadget: The motivation of our construction is a simple gadget represented in Figure 2. In this instance, vertices are either special (colored gray) or regular. This gadget has three properties of our interest: • If we assign an LP-value of xv = 1/2 to every special vertex, then this is a feasible LP solution that ensures yu = 1 for all leaf u. • For any integral solution U that does not pick any vertex in the first layer of this gadget, at most 2 out of 3 leaves of the gadget are saved. • Any pair of special vertices in the same layer do not have a common ancestor inside this gadget. Our integrality gap instance is constructed by creating partially overlapping copies of this gadget. We describe it formally below. Construction: The first layer of this instance, L1 , contains 4 nodes: two special nodes, which we name a(1) and a(2), and two regular nodes, which we name b(1) and b(2). We recall the definition of spider from Section 3.1. Let α = 5 d1/e. The nodes b(1) and b(2) are the roots of two Figure 2 Gadget used spiders. Specifically, the spider Z1 rooted at b(1) has α feet, with one to get 5/6 integrality foot per layer, in consecutive layers L2 , . . . , Lα+1 . For each j ∈ [α], gap. Special vertices are denote by b0 (1, j), the j th foot of spider Z1 . The spider Z2 , rooted at colored gray. b(2), has α2 feet, with one foot per layer, in layers Lα+2 , . . . , Lα2 +α+1 . For each j ∈ [α2 ], denote by b0 (2, j), the j th foot of spider Z2 . All the feet of spiders Z1 and Z2 are special vertices. 0 , with α2 feet, lying in the α2 For each j ∈ [α], the node b0 (1, j) is also the root of spider Z1,j consecutive layers L2+α+jα2 , . . . , L1+α+(j+1)α2 (one foot per layer). For j 0 ∈ [α2 ], let b00 (1, j, j 0 ) 17 0 that lies in layer L 3 denote the j 0 -th foot of spider Z1,j 1+α+jα2 +j 0 . Notice that we have α such feet of these spiders [α2 ], n 0 Z1,j b0 (2, j) oα j=1 lying in layers L2+α+α2 , . . . , L1+α+α2 +α3 . Similarly, for each 0 j ∈ the node is the root of spider Z2,j with α2 feet, lying in consecutive layers L2+α+α3 +jα2 , . . . , L1+α+α3 +(j+1)α2 . We denote by b00 (2, j, j 0 ) the j 0 -th foot of this spider. The special node a(1) is also the root of spider W1 which has α + α3 feet: The first α feet, denoted by a0 (1, j) for j ∈ [α], are aligned with the nodes b0 (1, j), i.e. for each j ∈ [α], the foot a0 (1, j) of spider W1 is in the same layer as the foot b0 (1, j) of Z1 . For each j ∈ [α], j 0 ∈ [α2 ], we also have a foot a00 (1, j, j 0 ) which is placed in the same layer as b00 (1, j, j 0 ). Similarly, the special node a(2) is the root of spider W2 having α2 + α4 feet. For j ∈ [α2 ], spider W2 has a foot a0 (2, j) placed in the same layer as b0 (2, j). For j ∈ [α2 ], j 0 ∈ [α2 ], W2 also has a foot a00 (2, j, j 0 ) in the layer of b00 (2, j, j 0 ). All the feet of both W1 and W2 are special vertices. Finally, for i ∈ {1, 2}, and j ∈ [αi ], each node a0 (i, j) has α5−i children, which are leaves of the instance. For j ∈ [α], j 0 ∈ [α2 ], the nodes b00 (i, j, j 0 ), a00 (i, j, j 0 ) have α3−i children each which are also leaves of the instance. The set of terminals X is simply the set of leaves. Proposition 29. We have |X | = 6α5 . Moreover, (i) the number of terminals in subtrees Ta(1) ∪ Tb(1) is 3α5 , and (ii) the number of terminals in subtrees Ta(2) ∪ Tb(2) is 3α5 . Proof. Each node a0 (1, j) has α4 children, and there are α such nodes. Similarly, each node a0 (2, j) has α3 children. There are α2 such nodes. This accounts for 2α5 terminals. For i ∈ {1, 2}, each node a00 (i, j, j 0 ) has α3−i children. There are αi+2 such nodes. This accounts for another 2α5 terminals. Finally, there are α3−i children of each b00 (i, j, j 0 ), and there are α2+i such nodes. Fractional Solution: Our construction guarantees that any path from root to leaf contains 2 special vertices: For a leaf child of a0 (i, j), its path towards the root must contain a0 (i, j) and a(i). For a leaf child of a00 (i, j, j 0 ), its path towards the root contains a00 (i, j, j 0 ) and a(i). For a leaf child of b00 (i, j, j 0 ), the path towards the root contains b00 (i, j, j 0 ) and b0 (i, j). Lemma 30. For each special vertex v, for each layer Lj below v, the set Lj ∩ Tv contains at most one special vertex. Proof. Each layer contains two special vertices of the form {a0 (i, j), b0 (i0 , j 0 )} or {a00 (i, j), b00 (i0 , j 0 )}. In any case, the least common ancestor of such two special vertices in the same layer is always the root s (since one vertex is in Ta(i) , while the other is in Tb(i) ) This implies that, for any non-root vertex v, the set Lj ∩ Tv can contain at most one special vertex. Notice that, there are at most two special vertices per layer. We define the LP solution x, with xv = 1/2 for all special vertices v and xv = 0 for all other vertices. It is easy to verify that this is a feasible solution. P We now check the constraint at v and layer Lj below v: If the sum u∈Pv xu = 0, then the P P constraint is immediately satisfied, because u∈Lj ∩Tv xu ≤ 1. If u∈Pv xu = 1/2, let v 0 be the P P special vertex ancestor of v. Lemma 30 guarantees that u∈Lj ∩Tv xu ≤ u∈Lj ∩Tv0 xu ≤ 1/2, P and therefore the constraint at v and Lj is satisfied. Finally, if u∈Pv xu = 1, there can be no P special vertex below v and therefore u∈Lj ∩Tv xu = 0. Integral Solution: We argue that any integral solution cannot save more than (1 + 5/α)5α5 terminals. The following lemma is the key to our analysis. Lemma 31. Any integral solution U : U ∩{a(1), b(1)} = ∅ saves at most (1+5/α)5α5 terminals. 18 Proof. Consider the set Q = {a0 (1, j)}αj=1 ∪{b0 (1, j)}αj=1 , and a collection of paths from {a(1), b(1)} to vertices in set Q. These paths are contained in the layers L1 , . . . , Lα+1 , so the strategy U induces a cut of size at most α + 1 on them. This implies that at most α + 1 vertices (out of 2α vertices in Q) can be saved by U. Let Q̃ ⊆ Q denote the set of vertices that have not been saved by U. We remark that |Q̃| ≥ α − 1. We write Q̃ = Q̃a ∪ Q̃b where Q̃a contains the set of vertices a0 (1, j) that are not saved, and Q̃b = Q̃ \ Q̃a . For each vertex in Q̃a , at least α4 − 1 of its children cannot be saved, so we have at least (α4 − 1)|Q̃a | ≥ α4 |Q̃a | − α unsaved terminals that are descendants of Q̃a . If |Q̃b | ≤ 3, we are immediately done: We have |Q̃a | ≥ α − 4, so (α4 − 1)(α − 4) ≥ α5 − 5α4 unsaved terminals. Consider the set  R= [    00 a (1, j, j 0 )  ∪  j∈[α],j 0 ∈[α2 ] [  [  b00 (1, j, j 0 )  j:b0 (1,j)∈Q̃b j 0 ∈[α2 ] This set satisfies |R| = α3 + |Q̃b |α2 , and the paths connecting vertices in R to Q̃b ∪ {a(1)} lie in layers L1 , . . . , Lα3 +α2 +α+1 . So the strategy U induced on these paths disconnects at most α3 + α2 + α + 1 vertices. Let R̃ ⊆ R contain the vertices in R that are not saved by U, so we have |R̃| ≥ (|Q̃b | − 1)α2 − α − 1, which is at least (|Q̃b | − 2)α2 . Each vertex in R̃ has α2 children. We will have (α2 − 1) unsaved terminals for each such vertex, resulting in a total of at least (α2 − 1)(|Q̃b | − 2)α2 ≥ α4 |Q̃b | − 4α4 terminals that are descendants of b(1). In total, by summing the two cases, at least (α4 |Q̃a |−α)+(α4 |Q̃b |−4α4 ) ≥ (|Q̃a |+|Q̃b |)α4 − 4 5α ≥ α5 − 5α4 terminals are not saved by U, thus concluding the proof. Lemma 32. Any integral solution U : U ∩{a(2), b(2)} = ∅ saves at most (1+5/α)5α5 terminals. Since nodes a(1), a(2), b(1), b(2) are in the first layer, it is only possible to save one of them. Therefore, either Lemma 31 or Lemma 32 apply, which concludes the analysis. 5 Conclusion and Open Problems In this paper, we settled the integrality gap question for the standard LP relaxation. Our results ruled out the hope to use the canonical LP to obtain better approximation results. While a recent paper settled the approximability status of the problem [1], the question whether an improvement over (1−1/e) can be done via LP relaxation is of independent interest. We provide some evidences that Hartke’s LP is a promising candidate for doing so. Another interesting question is to find a more general graph class that admits a constant approximation algorithm. We believe that this is possible for bounded treewidth graphs. References [1] Adjiashvili, D., Baggio, A., Zenklusen, R.: Firefighting on Trees Beyond Integrality Gaps. ArXiv e-prints (Jan 2016) [2] Anshelevich, E., Chakrabarty, D., Hate, A., Swamy, C.: Approximability of the firefighter problem - computing cuts over time. Algorithmica 62(1-2), 520–536 (2012) [3] Bazgan, C., Chopin, M., Cygan, M., Fellows, M.R., Fomin, F.V., van Leeuwen, E.J.: Parameterized complexity of firefighting. JCSS 80(7) (2014) 19 [4] Bazgan, C., Chopin, M., Ries, B.: The firefighter problem with more than one firefighter on trees. Discrete Applied Mathematics 161(7-8), 899–908 (2013) [5] Cai, L., Verbin, E., Yang, L.: Firefighting on trees: (1-1/e)-approximation, fixed parameter tractability and a subexponential algorithm. In: ISAAC (2008) [6] Chalermsook, P., Chuzhoy, J.: Resource minimization for fire containment. In: SODA (2010) [7] Chekuri, C., Kumar, A.: Maximum coverage problem with group budget constraints and applications. In: APPROX 2004. pp. 72–83 (2004) [8] Chlebíková, J., Chopin, M.: The firefighter problem: A structural analysis. In: Cygan, M., Heggernes, P. (eds.) IPEC. Lecture Notes in Computer Science, vol. 8894, pp. 172–183. Springer (2014) [9] Costa, V., Dantas, S., Dourado, M.C., Penso, L., Rautenbach, D.: More fires and more fighters. Discrete Applied Mathematics 161(16–17), 2410 – 2419 (2013) [10] Develin, M., Hartke, S.G.: Fire containment in grids of dimension three and higher. Discrete Applied Mathematics 155(17), 2257–2268 (2007) [11] Finbow, S., MacGillivray, G.: The firefighter problem: a survey of results, directions and questions. Australas. J. Combin 43, 57–77 (2009) [12] Hartke, S.G.: Attempting to narrow the integrality gap for the firefighter problem on trees. Discrete Methods in Epidemiology 70, 179–185 (2006) [13] Hartnell, B.: Firefighter! an application of domination. In: Manitoba Conference on Combinatorial Mathematics and Computing (1995) [14] Iwaikawa, Y., Kamiyama, N., Matsui, T.: Improved approximation algorithms for firefighter problem on trees. IEICE Transactions 94-D(2), 196–199 (2011) [15] King, A., MacGillivray, G.: The firefighter problem for cubic graphs. Discrete Mathematics 310(3), 614–621 (2010) [16] Wang, P., Moeller, S.A.: Fire control on graphs. Journal of Combinatorial Mathematics and Combinatorial Computing 41, 19–34 (2002) 20 A Omitted Figures 21 k kD D2 D D . . . . . . . . . . . . . . . . Figure 3 Simplified example of the instance used to achieve integrality gap of 1 − 1/e, when k = 2 and D = 2. The labels in the figure indicate, in general, the number of edges in that location, in terms of k and D. Special vertices are colored gray. y1 y2 x2 x1 ... ... ... ... ... ... ... ... Figure 4 Simplified example of the instance with low integrality gap for 1/2-integral solutions. Special vertices are colored gray. 22
8cs.DS
The Simulation and Mapping of Building Performance Indicators based on European Weather Stations A.W.M. (Jos) van Schijndel Department of the Built Environment, Eindhoven University of Technology, Netherlands Keywords: mapping, modeling, building, performance ABSTRACT Due to the climate change debate, a lot of research and maps of external climate parameters are available. However, maps of indoor climate performance parameters are still lacking. This paper presents a methodology for obtaining maps of performances of similar buildings that are virtually spread over whole Europe. The produced maps are useful for analyzing regional climate influence on building performance indicators such as energy use and indoor climate. This is shown using the Bestest building as a reference benchmark. An important application of the mapping tool is the visualization of potential building measures over the EU. Also the performances of single building components can be simulated and mapped. It is concluded that the presented method is efficient as it takes less than 15 minutes to simulate and produce the maps on a 2.6GHz/4GB computer. Moreover, the approach is applicable for any type of building. 1. Introduction Buildings and their systems can be considered as complex dynamic systems. The control and operation of building systems are of eminent importance regarding durability, health and costs. Energy use can be drastically reduced if building systems are properly controlled and optimal operated. At the same time comfort can be improved and costs can significantly be lowered. The goal of Computational Building Physics is to search for physics based models behind the empirical facts in order to control the built environment. Furthermore Computational Building Physics studies the built environment on several scales (see Figure 1) Figure 1. Scale levels involved within building physics research Building physics research applications are so far almost always limited to the scale levels of material, building and urban area. In this paper we present a building physics research application of the scale level of the EU. 1.1 Related work In this Section we will focus on two important building related research areas where EU mappings are already common techniques. First, we start with cultural heritage and climate change. Grossi et al. (2007) are using maps to visualize the prediction of the evolution in frost patterns due to climate change during the 21st century and the potential damage to historic structures and archeological remains in Europe. Figure 2 shows an exemplarily result of the application of a freezing event map. Figure 2. Pan-European maps of average yearly freezing events in 30 years period 1961–1990 (top) and far future 2070–2099 (bottom) by Grossi et al. (2007). Similar maps as presented in Figure 2 are used to show the expected reduction of freezing and lowering the potential for frost shattering of porous building stone. The underlying data for these maps are based on regional climate models. This is the second research area where EU maps are commonly used. There is an enormous amount of literature on climate change and mapping. Therefore we illustrate the use of these maps by one state of the art regional climate model: REMO (Jacob 1997, Larsen 2010). Figure 3 shows the twenty-five-year mean modeled wind at 10 m height over Central Europe using REMO with a 10 km resolution. Figure 4. The distributions of the locations of the external climates in Europe. Figure 3. Twenty-five-year mean modeled wind at 10 m height over the entire domain REMO 10 km resolution (Larsen 2010) Maps like figure 3 are suited for wind energy assessment application in Northern Europe. Moreover, literature of the related work shows that a lot of EU maps of external climate parameters are available. Each climate file includes hourly based values for the common used external climate parameters: Horizontal global solar radiation [W/m2] (ISGH), Diffuse solar radiation Air temperature [W/m2] (ISD), Cloud cover [0-1] (CI), [oC] (TA), Relative humidity [%] (HREL), Wind speed [m/s] (WD), Rain intensity (WS), Wind direction [0-360o] [mm/h] (RN), Long wave radiation [W/m2] (ILAH). 1.2 2.2 Goal and Outline The maps presented in the previous section are all based on external climate parameters. However, the goal of this work is produce maps that include also indoor climate performance parameters. The outline of the paper is as follows: Section 2 presents the methodology of the application for obtaining maps of performances of similar buildings that are virtual spread over whole Europe. The produced maps are useful for analyzing regional climate influence on building performance indicators such as energy use and indoor climate. Section 3 shows a benchmark of the EU mapping of the Bestest building. Section 4 comprehends a case study on the simulation and mapping of the effect of improved glazing using the Bestest building as a reference. 2. Methodology The methodology used for obtaining the required simulation results and maps can be divided into three steps. These are presented in the following sections. 2.1 External climate files Over 130 external hourly-based climate files were produced using commercially available software (Meteonorm 2011) using so-called wac format. Figure 4 presents the distribution of the locations over Europe. Whole building simulation model The whole building model originates from the thermal indoor climate model ELAN which was already published in 1987 (de Wit et al. 1988). Separately a model for simulating the indoor air humidity (AHUM) was developed. In 1992 the two models were combined and programmed in the MatLab environment. Since that time, the model has constantly been improved using newest techniques provided by recent MatLab versions. The current hourly-based model HAMBase, is part of the Heat, Air and Moisture Laboratory (HAMLab 2011), and is capable of simulating the indoor temperature, the indoor air humidity and energy use for heating and cooling of a multi-zone building. The physics of this model is extensively described by de Wit (2006). The main modeling considerations are summarized below. The HAMBase model uses an integrated sphere approach. It reduces the radiant temperatures to only one node. This has the advantage that complicated geometries can easily be modeled. Figure 5 shows the thermal network. ΣΦxy ΣΦab Tx Ta Lxa -h Φ /h Φcv cv r r Φr+hcvΦr/hr Ca Figure 5. The room radiative model as a thermal network Where Ta is the air temperature and Tx is a combination of air and radiant temperature. Tx is needed to calculate transmission heat losses with a combined surface coefficient. hr and hcv are the surface weighted mean surface heat transfer coefficients for convection and radiation. Φr and Φcv are respectively the radiant and convective part of the total heat input consisting of heating or cooling, casual gains and solar gains. For each heat source a convection factor can be given between 0 and 1 by the user. For example, for air heating this factor is close to 1 and for radiative heat sources a factor ranging from 0.4 – 0.6 can be used. The factor for solar radiation depends on the window system and the amount of radiation falling on furniture. Ca is the heat capacity of the air. Lxa is a coupling coefficient (de Wit et al. 1988):  h  Lxa = At hcv  1 + cv  hr   (1) ∑Φab is the heat loss by air entering the zone with an air temperature Tb. At is the total area. In case of ventilation Tb is the outdoor air temperature. ∑Φ xy is transmission heat loss through the envelope part y. For external envelope parts Ty is the sol-air temperature for the particular construction including the effect of atmospheric radiation. The admittance for a particular frequency can be represented by a network of a thermal resistance (1/Lx) and capacitance (Cx) because the phase shift of Yx can never be larger than π/2. To cover the relevant set of frequencies (period 1 to 24 hours) two parallel branches of such a network are used giving the correct admittance's for cyclic variations with a period of 24 hours and of 1 hour. This means that the heat flow Φxx(tot) is modeled with a second order differential equation. For air from outside the room with temperature Tb a loss coefficient Lv is introduced. This model is summarized in Figure 6. Ty Τb Lyx ∆Φxy Lv Tx Ta Lxa The HAMbase model is adapted in such a way that all climate (.wac) files in a directory are automatically processed. For each climate file a corresponding output file is produced containing hourly based values for the indoor climate and heating and cooling power. A separate Matlab mfile is developed for calculating annual means and peak values for each location (i.e. wac file) and together with the longitude and latitude stored in a single file suitable for mapping purposes. 2.3 Mapping of the results A MatLab mfile was developed for the visualization of the just mentioned mapping file. For the exact details of this mfile, we refer to the HAMLab website (HAMLab 2012). 3. Benchmark: EU Mapping of the Bestest building 3.1 Bestest using HAMBase The Bestest (ASHRAE, (2001)) is a structured approach to evaluate the performance of building performance simulation tools. The evaluation is performed by comparing results of the tested tool relative to results by reference tools. The procedure requires simulating a number of predefined and hierarchal ordered cases. Firstly, a set of qualification cases have to be modeled and simulated. If the tool passes all qualification cases the tool is considered to perform Bestest compliant. In case of compliance failure the procedure suggests considering diagnostic cases to isolate its cause. Diagnostic cases are directly associated with the qualification cases (Judkoff and Neymark 1995). The first qualification case, case 600 (see Figure 7) was used for the performance comparison. Φp1 Φg1 Φg2 Φp2 b) the moisture storage in walls and furniture, carpets etc is dependent on the relative humidity and temperature. Lx2 L x1 Figure 7. Bestest case 600 geometry Cx1 Cx2 Ca Figure 6. The thermal ventilation model for one zone In a similar way a model for the air humidity is made. Only vapour transport is modeled, the hygroscopic curve is linearized between RH 20% and 80%. The vapour permeability is assumed to be constant. The main differences are: a) there is only one room node (the vapour pressure) and The thermal part of HAMBase has been subjected to a standard method of test (Bestest ASHRAE, (2001)), with satisfactory results. The accompanying climate file of the Bestest is based on weather station near Denver (USA). For further details, see Table I. Table I Comparison of the HAMBase model with some cases of the standard test. Case 600ff 600ff 600ff 900ff 900ff Nr. Simulation of model o mean indoor temperature [ C] 25.1 o min. indoor temperature [ C] -17.9 o max. indoor temperature [ C] 64.0 o mean indoor temperature [ C] 25.1 test min ..max 24.2 .. 25.9 -18.8 .. -15.6 64.9 .. 69.5 24.5.. 25.9 o -5.1 -6.4.. -1.6 o min. indoor temperature [ C] 900ff max. indoor temperature [ C] 43.5 41.8.. 44.8 600 annual sensible heating [MWh] 4.9 4.3.. 5.7 600 annual sensible cooling [MWh] 6.5 6.1.. 8.0 600 peak heating [kW] 4.0 3.4.. 4.4 600 peak sensible cooling [kW] 5.9 6.0.. 6.6 900 annual sensible heating [MWh] 1.7 1.2.. 2.0 900 annual sensible cooling [MWh] 2.6 2.1 .. 3.4 900 peak heating [kW] 2.9 .. 3.9 3.2 3.5 EU mapping Now we apply the method of Section 2 in order to produce EU maps of certain (performance) parameters. 3.2.1 External climate We start with the outdoor climate. For these maps simulation is not required because the information is already present in the climate (.wac) files. Figure 8 shows the expected northsouth temperature distribution. The influence of higher altitude weather stations near the Alps is also visible. Figure 9. Mean annual external relative humidity [%] (This figure relies on color, see digital version of the paper) Quite remarkably there is a peak in relative humidity at the east part of the Alps corresponding with the low temperature (see Figure 8) which is not present at the west side of the Alps. 3.2.2 Indoor Climate The simulation of all 130 weather stations of the Bestest case 600 building takes less than 15 minutes using HAMBase on a 2.6GHz/4GB computer. Figure 10 shows the mean annual indoor air temperature distribution. Figure 10. Mean annual indoor air temperature [°C] of the Bestest case 600 building (This figure relies on color, see digital version of the paper) Figure 8. Mean annual external air temperature [°C] (This figure relies on color, see digital version of the paper) The relative humidity distribution is shown in Figure 9. As expected the mean annual indoor temperature is within the 20 to 27 oC range (the upper left part of the map near Greenland is not accurate due to the absence of weather stations). Although it is not within the Bestest, it could be interesting to simulate the mean annual indoor relative humidity (in case that there are no internal moisture gains). This is presented in Figure 11. Figure 11. Mean annual indoor relative humidity [%] of the Bestest case 600 building (This figure relies on color, see digital version of the paper) Figure 13. Mean annual heating power [W] of the Bestest case 600 building (This figure relies on color, see digital version of the paper) As expected at the cold regions (see Figure 8) the indoor relative humidity is low. Because the Bestest case 600 building has 12 m2 of window area facing south it is interesting to visualize the mean annual solar gain [W] entering the room. This is shown in Figure 12. Figure 14. Mean annual cooling power [W] of the Bestest case 600 building (see also digital version of the paper for color) Figure 12. Mean annual solar gain [W] of the Bestest case 600 building (This figure relies on color, see digital version of the paper) Figure 12 is in line with what we expect. 3.2.3 Heating & Cooling The energy use for heating and cooling the Bestest case 600 building is shown in figure 13 through 16. The mean annual heating and cooling power maps are quite as expected. Also the peak heating power (Figure 15) has an intuitive map. Remarkably, the peak cooling power map (Figure 16) shows a quite uniform distribution ranging from 5.5-7 kW. Figure 15. Peak heating power [W] the of Bestest case 600 building (see also digital version of the paper for color) Figure 16. Peak cooling power [W] of the Bestest case 600 building (see also digital version of the paper for color) 4. EU Mapping of single building components effects In the previous Section the main performances of a reference building model subjected to EU weather stations data, were visualized using EU maps. This leads to a new interesting application. If we change a single building component we can visualize the single effect of this change by subtracting these (new) results with the reference case. In order to demonstrate this idea we study the effect of replacing the original glazing (U value = 3 W/m2K; Solar gain factor = 0.787) of the case 600 building with improved glazing (U value = 1.5 W/m2K; Solar gain factor = 0.40) called variant. Figure 17. Reduction of mean annual solar gain [W] of the Bestest case 600 building due to the improved glazing (see also digital version of the paper for color) 4.2 4.2.1 Heating & Cooling Mean annual heating reduction Figures 18 through 20 show the three types of maps for the mean annual heating. Figure 18 provides the mean annual heating of the building with improved glazing: The method to obtain the results below was as follows: (1) The building was simulated and mapped again using the new glazing parameters. (2) A net change effect map was obtained by subtracting two maps, i.e. reference - variant map. (3) A percentage change effect map was obtained by using the formula: (1- variant/reference) * 100% map. 4.1 Indoor climate change The results show only minor changes in the mean indoor climates of respectively 1 oC and 1%. Because the solar gain factor is reduced from 0.787 to 0.40 we expect substantial differences between the reference and the variant. Figure 17 shows the result: Figure 18. Mean annual heating power [W] of the Bestest case 600 building with improved glazing (see also digital version of the paper for color) Using the map of mean annual heating power of the reference building (i.e. Figure 13), a net change effect map was obtained by subtracting two maps, i.e. reference map minus variant map. This is shown in figure 19. 4.2.2 Mean annual cooling reduction Figure 21 provides the mean annual cooling reduction. Figure 19. Change in mean annual heating power [W] of the Bestest case 600 building with improved glazing (see also digital version of the paper for color) The highest reduction in heating amount can be observed in the Nordic countries (up to 250Wy x 8.76 kh/y = 2190 kWh). The lowest reduction can be found in the Mediterranean as expected. The reduction can also be expressed as a percentage change effect map, using the formula: (1variant/reference) * 100%. This is presented in figure 20. Figure 20. Percent change in mean annual heating power [%] of the Bestest case 600 building with improved glazing (see also digital version of the paper for color) Please note that although the Mediterranean has a relatively high percent change, the absolute values for the mean annual heating power are low, so almost no heating energy savings are expected in this region. Secondly in areas where improved glazing do have impact, the relative improvement is quite uniform between 10 and 20%. Figure 21. Change in mean cooling power [W] of the Bestest case 600 building with improved glazing (see also digital version of the paper for color) The highest reduction in cooling amount can be observed in the Mediterranean (up to -500Wy x 8.76 kh/y = 4400 kWh). The reduction can also be expressed as a percentage change effect map. This is presented in figure 22. Figure 22. Percent change in mean annual cooling power [%] of the Bestest case 600 building with improved glazing (This figure relies on color, see digital version of the paper) Although the percent change at the Alps is relatively high, the absolute values for the mean annual cooling power are low, so almost no cooling energy savings are expected in this region. 4.2.3 Peak heating reduction Figure 23 shows the relative the peak heating power reduction. concluded that the presented method efficient as it takes less than 15 minutes to simulate and produce the maps on a 2.6GHz/4GB computer. Moreover, the approach is applicable for any type of building Future research Within the mentioned EU FP7 project ‘Climate for Culture’, detailed EU external climate files are currently under development for the period 1960 – 2100 using the REMO model (Jacob et al. 1997) and a moderate climate scenario. With these future external climate files we will be able to predict future building performance indicators. Together with the EU mapping tool this could be helpful to locate EU regions with the highest impact on the specific building performances. Figure 23. Reduction of the peak heating power [%] of the Bestest case 600 building (see also digital version of the paper for color) Remarkably, figure 23 shows a quite uniform relative change in peak heating power reduction. 4.2.4 Peak cooling reduction Figure 24 shows the absolute peak cooling power reduction. 6. Acknowledgement This work was inspired and sponsored by the EU FP7 project ‘Climate for Culture’. 7. References ASHRAE (2001). Standard method of test for the evaluation of building energy analysis computer programs, standard 140-2001. Judkoff, R. and Neymark, J. (1995). “International energy agency building energy simulation test (Bestest) and diagnostic method”, National Renewable Energy Laboratory, Golden, CO. Schijndel, A.W.M. van & Wit, M.H. de, (1999). A building physics toolbox in MatLab, 7TH Symposium on Building Physics in the Nordic Countries Goteborg, pp 81-88 Grossi, C.M., Brimblecombe, P., Harris, I. (2007). Predicting long term freeze-thaw risks on Europe built heritage and archaeological sites in a changing climate. Science of the Total Environment 377, pp 273-281 HAMLab (2012), http://archbps1.campus.tue.nl/bpswiki/index.php/Ha mlab Jacob, D. and Podzun, R. (1997). Sensitivity studies with the Regional Climate Model REMO. Meteorology and Atmospheric Physics, 63, pp 119-129. Larsen X.G., Mann, J., Berg, J., Gottel, H., Jacob, D. (2010). Wind climate from the regional climate model REMO. Wind Energy 13, pp 279-206 Figure 24. Reduction of the peak cooling power [W] of the Bestest case 600 building (see also digital version of the paper for color) Meteonorm (2011).http:/meteonorm.com/ Figure 24 shows a uniform relative change in cooling power reduction (3 – 4 kW). Schijndel A.W.M. van (2007). Integrated Heat Air and Moisture Modeling and Simulation, PhD Dissertation, Eindhoven University of Technology 5. Conclusions The produced maps are useful for analyzing regional climate influence on building performance indicators such as energy use and indoor climate. This is shown using the Bestest building as a reference benchmark. An important application of the mapping tool is the visualization of potential building measures over the EU. Also the performances of single building components can be simulated and mapped. It is Wit M.H. de ,H.H. Driessen (1988). ELAN A Computer Model for Building Energy Design. Building and Environment 23, pp 285-289 Wit, M.H. de, (2006). HAMBase, Heat, Air and Moisture Model for Building and Systems Evaluation, Bouwstenen 100, Eindhoven University of Technology
5cs.CE
Electronic Journal of Statistics Vol. 0 (2017) 1–99 ISSN: 1935-7524 Errors-in-variables models with dependent measurements arXiv:1611.04701v2 [stat.ML] 1 Apr 2017 Mark Rudelson∗ and Shuheng Zhou† Department of Mathematics, Department of Statistics University of Michigan, Ann Arbor, MI 48109 e-mail: [email protected]; [email protected] Abstract: Suppose that we observe y ∈ Rn and X ∈ Rn×m in the following errors-invariables model: y = X0 β ∗ +  X = X0 + W where X0 is an n × m design matrix with independent subgaussian row vectors,  ∈ Rn is a noise vector and W is a mean zero n × m random noise matrix with independent subgaussian column vectors, independent of X0 and . This model is significantly different from those analyzed in the literature in the sense that we allow the measurement error for each covariate to be a dependent vector across its n observations. Such error structures appear in the science literature when modeling the trial-to-trial fluctuations in response strength shared across a set of neurons. Under sparsity and restrictive eigenvalue type of conditions, we show that one is able to recover a sparse vector β ∗ ∈ Rm from the model given a single observation matrix X and the response vector y. We establish consistency in estimating β ∗ and obtain the rates of convergence in the `q norm, where q = 1, 2 for the Lasso-type estimator, and for q ∈ [1, 2] for a Dantzig-type Conic programming estimator. We show error bounds which approach that of the regular Lasso and the Dantzig selector in case the errors in W are tending to 0. We analyze the convergence rates of the gradient descent methods for solving the nonconvex programs and show that the composite gradient descent algorithm is guaranteed to converge at a geometric rate to a neighborhood of the global minimizers: the size of the neighborhood is bounded by the statistical error in the `2 norm. Our analysis reveals interesting connections between computational and statistical efficiency and the concentration of measure phenomenon in random matrix theory. We provide simulation evidence illuminating the theoretical predictions. MSC 2010 subject classifications: Primary 60K35, 60K35; secondary 60K35. Keywords and phrases: Errors-in-variable models, measurement error data, subgaussian concentration, matrix variate distributions, nonconvexity. Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 ∗ Mark Rudelson is partially supported by NSF grant DMS 1161372 and USAF Grant FA9550-14-10009. † Shuheng Zhou is supported in part by NSF under Grant DMS-1316731 and Elizabeth Caroline Crosby Research Award from the Advance Program at the University of Michigan. 1 imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 2 Rudelson and Zhou/Errors-in-variables 1.1 The model and the method . . . . . . . . . . . . . . . . . . . 1.2 Gradient descent algorithms . . . . . . . . . . . . . . . . . . 1.3 Our contributions . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Assumptions and preliminary results . . . . . . . . . . . . . . . . . 3 Main results on the statistical error . . . . . . . . . . . . . . . . . . 3.1 Regarding the MA constant . . . . . . . . . . . . . . . . . . . 3.2 Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Improved bounds when the measurement errors are small . . . . . . 4.1 Oracle results on the Lasso-type estimator . . . . . . . . . . . 4.2 Oracle results on the Conic programming estimator . . . . . . 5 Optimization error on the gradient descent algorithm . . . . . . . . 5.1 Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Proof of theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Stochastic error terms . . . . . . . . . . . . . . . . . . . . . . 6.2 Outline for proof of Theorem 3 . . . . . . . . . . . . . . . . . 6.3 Improved bounds for the corrected Lasso estimator . . . . . . 6.4 Outline for proof of Theorem 4 . . . . . . . . . . . . . . . . 6.5 Improved bounds for the DS-type estimator . . . . . . . . . . 7 Lower and Upper RE conditions . . . . . . . . . . . . . . . . . . . 8 Numerical results . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 Relative error . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Corrected Lasso via GD versus Conic programming estimator 8.3 Sensitivity to tuning parameters . . . . . . . . . . . . . . . . 8.4 Statistical and optimization error in Gradient Descent . . . . . 9 Proof of Lemma 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Proof of Theorem 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Proof of Theorem 4 . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Proof of Theorem 6 . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Proof of Theorem 7 . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Proof of Theorem 9 . . . . . . . . . . . . . . . . . . . . . . . . . . 14.1 Proof of Corollary 10 . . . . . . . . . . . . . . . . . . . . . . 15 Proof of Theorem 12 . . . . . . . . . . . . . . . . . . . . . . . . . 16 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B Proof of Theorem 2 . . . . . . . . . . . . . . . . . . . . . . . . . . C Some auxiliary results . . . . . . . . . . . . . . . . . . . . . . . . . C.1 Proof of Lemma 5 . . . . . . . . . . . . . . . . . . . . . . . . C.2 Proof of Lemma 11 . . . . . . . . . . . . . . . . . . . . . . . D Proof of Corollary 13 . . . . . . . . . . . . . . . . . . . . . . . . . E Proof of Corollary 14 . . . . . . . . . . . . . . . . . . . . . . . . . F Proof of Lemma 15 . . . . . . . . . . . . . . . . . . . . . . . . . . F.1 Comparing the two type of RE conditions in Theorems 3 and 4 G Proof of Theorem 16 . . . . . . . . . . . . . . . . . . . . . . . . . H Proofs for the Lasso-type estimator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 6 7 9 11 16 19 20 22 24 27 28 29 31 31 33 35 35 37 37 38 40 43 44 49 50 52 53 54 55 56 57 60 61 62 62 62 67 68 71 73 73 74 75 76 78 imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 3 Rudelson and Zhou/Errors-in-variables H.1 Proof of Lemma 17 . . . . . . . . . . . H.2 Proof of Lemma 18 . . . . . . . . . . . I Proofs for the Conic Programming estimator . I.1 Proof of Lemma 19 . . . . . . . . . . . I.2 Proof of Lemma 20 . . . . . . . . . . . I.3 Proof of Lemma 21 . . . . . . . . . . . J Proof for Theorem 7 . . . . . . . . . . . . . . J.1 Proof of Lemma 22 . . . . . . . . . . . J.2 Proof of Lemma 23 . . . . . . . . . . . J.3 Proof of Lemma 24 . . . . . . . . . . . K Some geometric analysis results . . . . . . . L Proof of Corollary 25 . . . . . . . . . . . . . M Proof of Theorem 26 . . . . . . . . . . . . . N Proof of Lemma 32 . . . . . . . . . . . . . . O Proof of Lemmas 40 and 41 and Corollary 42 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 80 81 81 81 82 83 84 84 85 86 90 90 93 94 96 1. Introduction The matrix variate normal model has a long history in psychology and social sciences. In recent years, it is becoming increasingly popular in biology and genomics, neuroscience, econometric theory, image and signal processing, wireless communication, and machine learning; see for example [15, 22, 17, 52, 5, 54, 18, 2, 26] and references therein. We call the random matrix X, which contains n rows and m columns a single data matrix, or one instance from the matrix variate normal distribution. We say that an n × m random matrix X follows a matrix normal distribution with a separable covariance matrix ΣX = A ⊗ B and mean M ∈ Rn×m , which we write Xn×m ∼ Nn,m (M, Am×m ⊗ Bn×n ). This is equivalent to say vec { X } follows a multivariate normal distribution with mean vec { M } and covariance ΣX = A ⊗ B. Here, vec { X } is formed by stacking the columns of X into a vector in Rmn . Intuitively, A describes the covariance between columns of X, while B describes the covariance between rows of X. See [15, 22] for more characterization and examples. In this paper, we introduce the related sum of Kronecker product models to encode the covariance structure of a matrix variate distribution. The proposed models and methods incorporate ideas from recent advances in graphical models, high-dimensional regression model with observation errors, and matrix decomposition. Let Am×m , Bn×n be symmetric positive definite covariance matrices. Denote the Kronecker sum of A = (aij ) and B = (bij ) by Σ = = A ⊕ B := A ⊗ In + Im ⊗ B  a11 In + B a12 In ... a1m In  a I a I + B . . . a 21 n 22 n 2m In   ... am1 In am2 In . . . amm In + B     (mn)×(mn) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 4 where In is an n × n identity matrix. This covariance model arises naturally from the context of errors-in-variables regression model defined as follows. Suppose that we observe y ∈ Rn and X ∈ Rn×m in the following model: y = X0 β ∗ +  (1.1a) X = X0 + W (1.1b) where X0 is an n × m design matrix with independent row vectors,  ∈ Rn is a noise vector and W is a mean zero n × m random noise matrix, independent of X0 and , with independent column vectors ω 1 , . . . , ω m . In particular, we are interested in the additive model of X = X0 + W such that vec { X } ∼ N (0, Σ) where Σ = A ⊕ B := A ⊗ In + Im ⊗ B (1.2) where we use one covariance component A ⊗ In to describe the covariance of matrix X0 ∈ Rn×m , which is considered as the signal matrix, and the other component Im ⊗B to describe that of the noise matrix W ∈ Rn×m , where Eω j ⊗ ω j = B for all j, where ω j denotes the j th column vector of W . Our focus is on deriving the statistical properties of two estimators for estimating β ∗ in (1.1a) and (1.1b) despite the presence of the additive error W in the observation matrix X. We will show that our theory and analysis works with a model much more general than that in (1.2), which we will define in Section 1.1. Before we go on to define our estimators, we now use an example to motiviate (1.2) and its subgaussian generalization in (1.4). Suppose that there are n patients in a particular study, for which we use X0 to model the “systolic blood pressure” and W to model the seasonal effects. In this case, X models the fact that among the n patients we measure, each patient has its own row vector of observed set of blood pressures across time, and each column vector in W models the seasonal variation on top of the true signal at a particular day/time. Thus we consider X as measurement of X0 with W being the observation error. That is, we model the seasonal effects on blood pressures across a set of patients in a particular study with a vector of dependent entries. Thus W is a matrix which consists of repeated independent sampling of spatially dependent vectors, if we regard the individuals as having spatial coordinates, for example, through their geographic locations. We will come back to discuss this example in Section 1.4. 1.1. The model and the method We first need to define an independent isotropic vector with subgaussian q marginals as P 2 in Definition 1.1. For a vector y = (y1 , . . . , yp ) in Rp , denote by kyk2 = j yj the length of y. Definition 1.1. Let Y be a random vector in Rp   2 2 1. Y is called isotropic if for every y ∈ Rp , E | h Y, y i | = kyk2 . imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 5 Rudelson and Zhou/Errors-in-variables 2. Y is ψ2 with a constant α if for every y ∈ Rp ,  k h Y, y i kψ2 := inf{t : E exp( h Y, y i 2 /t2 ) ≤ 2} ≤ α kyk2 . (1.3) The ψ2 condition on a scalar random variable V is equivalent to the subgaussian tail decay of V , which means P (|V | > t) ≤ 2 exp(−t2 /c2 ), for all t > 0. Throughout this paper, we use ψ2 vector, a vector with subgaussian marginals and subgaussian vector interchangeably. The model. Let Z be an n × m random matrix with independent entries Zij satisfying 2 EZij = 0, 1 = EZij ≤ kZij kψ2 ≤ K. Let Z1 , Z2 be independent copies of Z. Let X = X0 + W (1.4) such that X0 = Z1 A1/2 is the design matrix with independent subgaussian row vectors, and W = B 1/2 Z2 is a random noise matrix with independent subgaussian column vectors. Assumption (A1) allows the covariance model in (1.2) and its subgaussian variant in (1.4) to be identifiable. (A1) We assume tr(A) = m is a known parameter, where tr(A) denotes the trace of matrix A. In the Kronecker sum model, we could assume we know tr(B), in order not to assume knowing tr(A). Assuming one or the other is known is unavoidable as the covariance model is not identifiable otherwise. Moreover, by knowing tr(A), we can construct an estimator for tr(B):  2 1 b b kXkF − ntr(A) + and define τbB := n1 tr(B) ≥ 0 (1.5) tr(B) = m P P 2 2 where (a)+ = a ∨ 0 and kXkF := i j Xij . We first introduce the corrected Lasso estimator, adapted from those as considered in [30]. b Suppose that tr(B) is an estimator for tr(B); for example, as constructed in (1.5). Let b Γ = 1 T 1b X X − tr(B)I m n n and γ b = 1 T n X y. (1.6) For a chosen penalization parameter λ ≥ 0, and parameters b0 and d, we consider the following regularized estimation with the `1 -norm penalty, βb = arg min√ β:kβk1 ≤b0 1 Tb β Γβ − h γ b, β i + λkβk1 , 2 d (1.7) which is a variation of the Lasso [48] or the Basis Pursuit [12] estimator. Although in our analysis, we set b0 ≥ kβ ∗ k2 and d = |supp(β ∗ )| := {j : βj∗ 6= 0} for simplicity, in practice, both b0 and d are understood to be parameters chosen to provide an upper bound on the `2 norm and the sparsity of the true β ∗ . imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 6 Rudelson and Zhou/Errors-in-variables For a vector β ∈ Rm , denote by kβk∞ := maxj |βj |. Recently, [3] discussed the following conic programming compensated matrix uncertainly (MU) selector , which is a variant of the Dantzig selector [6, 35, 36]. Adapted to our setting, it is defined as follows. Let λ, µ, τ > 0,  βb = arg min kβk1 + λt : (β, t) ∈ Υ where (1.8) o n m b ≤ µt + ω, kβk2 ≤ t b − Γβ Υ = (β, t) : β ∈ R , γ ∞ q b are as defined in (1.6) with µ ∼ log m , ω ∼ where γ b and Γ n estimator as the Conic programming estimator from now on. q log m n . We refer to this 1.2. Gradient descent algorithms In order to obtain fast, approximate solutions to the optimization goal as in (1.10), we adopt the computational framework of [1, 30], namely, the composite gradient descent method due to Nesterov [34] to analyze our computational and statistical errors in an integrated manner. First we denote the population and empirical loss functions by L(β) = 1 T β Σx β − β ∗T Σx β 2 and Ln (β) = 1 Tb β Γβ − γ bT β 2 (1.9) respectively. We consider regularizers that are separable across all coordinates and write ρλ (β) = m X ρλ (βi ). i=1 Throughout this paper, we denote by φ(β) = 1 Tb β Γβ − γ bT β + ρλ (β). 2 From the formulation (1.7), the corrected linear regression estimator is given by minimizing the penalized loss function φ(β) subject to the constraint that g(β) ≤ R:   1 Tb T b β Γβ − γ b β + ρλ (β) (1.10) β ∈ arg min β∈Rm ,g(β)≤R 2 where g(β) is a convex function, which is allowed to be identical to kβk1 and R is a second tuning parameter that is chosen to confine the solution βb within the `1 ball of radius R, while at the same time ensuring that β ∗ is a feasible solution. The gradient descent method generates a sequence {β t }∞ t=0 of iterates by first initializing to some parameter β 0 ∈ Rm , and then for t = 0, 1, 2, . . ., applying the recursive updates:   ζ 2 β t+1 = arg min Ln (β t ) + h ∇Ln (β t ), β − β t i + β − β t 2 + ρλ (β) (1.11) 2 β∈Rm ,g(β)≤R imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 7 where ζ is the step size parameter. More generally, we consider loss function Ln : Rm → R and ρλ which are possibly nonconvex and consider the regularized M-estimator of the form βb ∈ arg min {Ln (β; X) + ρλ (β)} (1.12) β∈Rm ,g(β)≤R where ρλ : Rm → R is a regularizer depending on a tuning parameter λ > 0. Because of this potential nonconvexity, we also include a side constraint in the form of g(β) ≤ R, where o µ 1n 2 (1.13) ρλ (β) + kβk2 g(β) := λ 2 so that this choice of g is convex for properly chosen parameter µ ≥ 0 for a class of weakly convex penalty functions ρ [51]; See Assumption 1 in [31] where properties of g and ρλ are stated in terms of the univariate function ρλ : R → R and the parameter µ ≥ 0. While our results hold for the general nonconvex penalty ρλ that is weakly convex in the sense that (1.13) holds for some parameter µ > 0, we focus our discussion to the choice of ρλ (β) = λ kβk1 and µ = 0 in the present paper. 1.3. Our contributions We provide a unified analysis of the rates of convergence for both the corrected Lasso estimator (1.7) and the Conic programming estimator (1.8), which is a Dantzig selectortype, although under slightly different conditions. We will show the rates of convergence in the `q norm for q = 1, 2 for estimating a sparse vector β ∗ ∈ Rm in the model (1.1a) and (1.1b) using the corrected Lasso estimator (1.7) in Theorems 3 and 6, and the Conic programming estimator (1.8) in Theorems 4 and 7 for 1 ≤ q ≤ 2. We also show bounds on the predictive errors for the Conic programming estimator. The bounds we derive in Theorems 3 and 4 focus on cases where the errors in W are not too small in their magnitudes in the sense that τB := tr(B)/n is bounded from below. For the extreme case when τB approaches 0, one hopes to recover bounds close to those for the regular Lasso or the Dantzig selector since the effect of the noise in matrix W on the procedure becomes negligible. We show in Theorems 6 and 7 that this is indeed the case. These results are new to the best of our knowledge. Let Z1 , Z2 be independent subgaussian random matrices with independent entries (cf. (1.4)). In Theorems 3 to 7, we consider the regression model in (1.1a) and (1.1b) with subgaussian random design, where X0 = Z1 A1/2 is a subgaussian random matrix with independent row vectors, and W = B 1/2 Z2 is an n × m random noise matrix with independent column vectors, This model is significantly different from those analyzed in the literature. For example, unlike the present work, the authors in [30] apply Theorem 16 which states a general result on statistical convergence properties of the estimator (1.7) to cases where W is composed of independent subgaussian row vectors, imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 8 when the row vectors of X0 are either independent or follow a Gaussian vector autoregressive model. See also [35, 36, 3] for the corresponding results on the compensated MU selectors, variations on the Conic programming estimator (1.8). The second key difference between our framework and the existing work is that we assume that only one observation matrix X with the single measurement error matrix W is available. Assuming (A1) allows us to estimate EW T W as required in the estimation procedure (1.6) directly, given the knowledge that W is composed of independent column vectors. In contrast, existing work needs to assume that the covariance matrix ΣW := n1 EW T W of the independent row vectors of W or its functionals are either known a priori, or can be estimated from a dataset independent of X, or from replicated X measuring the same X0 ; see for example [35, 36, 3, 30, 10]. Although the model we consider is different from those in the literature, the identifiability issue, which arises from the fact that we observe the data under an additive error model, is common. Such repeated measurements are not always available or costly to obtain in practice [10]. We will explore such tradeoffs in future work. A noticeable exception is the work of [11], which deals with the scenario when the noise covariance is not assumed to be known. We now elaborate on their result, which is a variant of the orthogonal matching pursuit (OMP) algorithm [49, 50]. Their support recovery result, that is, recovering the support set of β ∗ , applies only to the case when both signal matrix and the measurement error matrix have isotropic subgaussian row vectors. In other words, they assume independence among both rows and columns in X (X0 and W ). Moreover, their algorithm requires the knowledge of the sparsity ∗ parameter d, which is the number  in β , as well as a βmin conqof non-zero entries log m ∗ dition: minj∈supp β ∗ βj∗ = Ω n (kβ k2 + 1) . Under these conditions, they recover essentially the same `2 -error bounds as in the current work, and [30], where the covariance ΣW is assumed to be known. Finally, we present in Theorems 2 and 9 the optimization error for the gradient descent algorithms in solving (1.12) and more specifically (1.7). Let βb be a global optimizer of (1.12). Let λmax (A) and λmin (A) be the largest and smallest eigenvalues, and κ(A) be the condition number for matrix A. Let 0 < κ < 1 be a contraction factor to be defined in (2.11). Similar to the work of [1, 30], we show that the geometric convergence is not guaranteed to an arbitrary precision, but only to an accuracy related to statistical precision of the problem, measured by the `2 error: kβb − β ∗ k22 =: ε2stat between the global optimizer βb and the true parameter β ∗ . More precisely, our analysis guarantees geometric convergence of the sequence {β t }∞ t=0 to a parameter β ∗ up to a neighborhood of radius defined through the statistical error bound ε2stat δ2  ε2stat d log m , 1−κ n where κ is a contraction coefficient to be defined (2.11), so that for all t ≥ T ∗ (δ) as imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 9 in (2.17), α`  λmin (A) and αu  λmax (A), 4δ 2 α` ε2stat 4δ 4 + + 2 = O(ε2stat ) α` 4 b0 α` λmax (A) 2 q n e e for λ, ζ ≥ αu appropriately chosen, R = O( log m ) and n = Ω (d log m), where the β t − βb 2 ≤ e and Ω(·) e symbols hide spectral parameters regarding A and B. To quantify such O(·) results, we first need to introduce some conditions in Section 2. See Theorem 2 and Corollary 10 for the precise conditions and statements. 1.4. Discussion The theory on matrix variate normal data show that having replicates will allow one to estimate more complicated graphical structures and achieve faster rates of convergence under less restrictive assumptions [56]. Our consistency results in the present work deal with only a single random matrix following the model (1.4), assuming that tr(A) is known. With replicates, this assumption can be lifted off immediately. Assume there exists a replicate e = X0 + W f, X (1.14) e −X = W f − W to estimate B using existing methods. The rathen we can use X tionale for considering such an option is one may have a repeated measurement of X0 f follow the same error distribution. Such external data for which the errors W and W or knowledge of the noise distribution is needed in order to do inference under such additive measurement error model [10]. The second key modeling question is: would each row vector in W for a particular patient across all time points be a correlated normal or subgaussian vector as well? It is our conjecture that combining the newly developed techniques, namely, the concentration of measure inequalities we have derived in the current framework with techniques from existing work [56], we can handle the case when W follows a matrix normal distribution with a separable covariance matrix ΣW = C ⊗ B, where C is an m × m positive semi-definite covariance matrix. Moreover, for this type of ”seasonal effects” as the measurement errors, the time varying covariance model would make more sense to model W , which we elaborate in the second example. In neuroscience applications, population encoding refers to the information contained in the combined activity of multiple neurons [27]. The relationship between population encoding and correlations is complicated and is an area of active investigation, see for example [40, 13]. It becomes more often that repeated measurements (trials) simultaneously recorded across a set of neurons and over an ensemble of stimuli are available. In this context, one can use a random matrix X0 ∼ Nn,m (µ, A ⊗ B) which follows a matrix-variate normal distribution, or its subgaussian correspondent, to model the ensemble of mean response variables, e.g., the membrane potential, corresponding to the imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 10 cross-trial average over a set of experiments. Here we use A to model the task correlations and B to model the baseline correlation structure among all pairs of neurons at the signal level. It has been observed that the onset of stimulus and task events not only change the cross-trial mean response in µ, but also alter the structure and correlation of the noise for a set of neurons, which correspond to the trial-to-trial fluctuations of the neuron responses. We use W to model such task-specific trial-to-trial fluctuations of a set of neurons recorded over the time-course of a variety of tasks. Models as in (1.1a) and (1.1b) are useful in predicting the response of set of neurons based on the current and past mean responses of all neurons. Moreover, we could incorporate non-i.i.d. non-Gaussian W = [w1 , . . . , wm ] with wt = B 1/2 (t)z(t), where z(1), . . . , z(m) are independent isotropic subgaussian random vectors and B(t)  0 for all t, to model the time-varying correlated noise as observed in the trial-to-trial fluctuations. It is possible to combine the techniques developed in the present paper with those in [57, 56] to develop estimators for A, B and the time varying B(t), which is itself an interesting topic, however, beyond the scope of the current work. In summary, oblivion in ΣW and a general dependency condition in the data matrix X are not simultaneously allowed in existing work. In contrast, while we assume that X0 is composed of independent subgaussian row vectors, we allow rows of W to be dependent, which brings dependency to the row vectors of the observation matrix X. In the current paper, we focus on the proof-of-the-concept on using the Kronecker sum covariance and additive model to model two way dependency in data matrix X, and derive bounds in statistical and computational convergence for (1.7) and (1.8). In some sense, we are considering a parsimonious model for fitting observation data with two-way dependencies: we use the signal matrix to encode column-wise dependency among covariates in X, and error matrix W to explain its row-wise dependency. When replicates of X or W are available, we are able to study more sophisticated models and inference problems, some of which are described earlier in this section. We leave the investigation of this more general modeling framework and relevant statistical questions to future work. We refer to [10] for an excellent survey of the classical as well as modern developments in measurement error models. In future work, we will also extend the estimation methods to the settings where the covariates are measured with multiplicative errors which are shown to be reducible to the additive error problem as studied in the present work [36, 30]. Moreover, we are interested in applying the analysis and concentration of measure results developed in the current paper and in our ongoing work to the more general contexts and settings where measurement error models are introduced and investigated; see for example [16, 8, 44, 24, 20, 45, 9, 7, 14, 46, 25, 28, 47, 53, 23, 29, 32, 2, 43, 41, 42] and references therein. Notation. Let e1 , . . . , ep be the canonical basis of Rp . For a set J ⊂ {1, . . . , p}, denote EJ = span{ej : j ∈ J}. For a matrix A, we use kAk2 to denote its operator norm. For a set V ⊂ Rp , we let conv V denote the convex hull of V . For a finite set Y , the cardinality is denoted by |Y |. Let B1p , B2p and S p−1 be the unit `1 ball, the unit Euclidean ball and the unit sphere respectively. For a matrix A = (aij )1≤i,j≤m Pm , let kAkmax = maxi,j |aij | denote the entry-wise max norm. Let kAk1 = maxj i=1 |aij | denote the imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 11 Rudelson and Zhou/Errors-in-variables P P 2 matrix `1 norm. The Frobenius norm is given by kAkF = i j a2ij . Let |A| denote 2 the determinant and tr(A) be the trace of A. The operator or `2 norm kAk2 is given T by λmax (AA ). For a matrix A, denote by r(A) the effective rank tr(A)/ kAk2 . Let 2 2 kAkF /kAk2 denote the stable rank for matrix A. We write diag(A) for a diagonal matrix with the same diagonal as A. For a symmetric matrix A, let Υ(A) = (υij ) where υij = I(aij 6= 0), where I(·) is the indicator function. Let I be the identity matrix. For two numbers a, b, a ∧ b := min(a, b) and a ∨ b := max(a, b). For a function g : Rm → R, we write ∇g to denote a gradient or subgradient, if it exists. We write a  b if ca ≤ b ≤ Ca for some positive absolute constants c, C which are independent of n, m or sparsity parameters. Let (a)+ := a ∨ 0. We write a = O(b) if a ≤ Cb for some positive absolute constants C which are independent of n, m or sparsity parameters. The absolute constants C, C1 , c, c1 , . . . may change line by line. 2. Assumptions and preliminary results We will now define some parameters related to the restricted and sparse eigenvalue conditions that are needed to state our main results. We also state a preliminary result in Lemma 1 regarding the relationships between the two conditions in Definitions 2.1 and 2.2. Definition 2.1. (Restricted eigenvalue condition RE(s0 , k0 , A)). Let 1 ≤ s0 ≤ p, and let k0 be a positive number. We say that a q × p matrix A satisfies RE(s0 , k0 , A) condition with parameter K(s0 , k0 , A) if for any υ 6= 0, kAυk2 1 min := min > 0. J⊆{1,...,p}, kυJ c k ≤k0 kυJ k K(s0 , k0 , A) kυJ k2 1 1 (2.1) |J|≤s0 where υJ represents the subvector of υ ∈ Rp confined to a subset J of {1, . . . , p}. It is clear that when s0 and k0 become smaller, this condition is easier to satisfy. We also consider the following variation of the baseline RE condition. Definition 2.2. (Lower-RE condition) [30] The matrix Γ satisfies a Lower-RE condition with curvature α > 0 and tolerance τ > 0 if 2 2 θT Γθ ≥ α kθk2 − τ kθk1 ∀θ ∈ Rm . P where kθk1 := j |θj |. As α becomes smaller, or as τ becomes larger, the Lower-RE condition is easier to be satisfied. Lemma 1. Suppose that the Lower-RE condition holds for Γ := AT A with α, τ > 0 such that τ (1 + k0 )2 s0 ≤ α/2. Then the RE(s0 , k0 , A) condition holds for A with r α 1 ≥ > 0. K(s0 , k0 , A) 2 Assume that RE((k0 + 1)2 , k0 , A) holds. Then the Lower-RE condition holds for Γ = AT A with 1 α= >0 (k0 + 1)K 2 (s0 , k0 , A) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 12 Rudelson and Zhou/Errors-in-variables where s0 = (k0 + 1)2 , and τ > 0 which satisfies λmin (Γ) ≥ α − τ s0 /4. The condition above holds for any τ ≥ 4 (k0 +1)3 K 2 (s0 ,k0 ,A) (2.2) − 4λmin (Γ) (k0 +1)2 . The first part of Lemma 1 means that, if k0 is fixed, then smaller values of τ guarantee RE(s0 , k0 , A) holds with larger s0 , that is, a stronger RE condition. The second part of the Lemma implies that a weak RE condition implies that the Lower-RE (LRE) holds with a large τ . On the other hand, if one assumes RE((k0 + 1)2 , k0 , A) holds with a large value of k0 (in other words, a strong RE condition), this would imply LRE with a small τ . In short, the two conditions are similar but require tweaking the parameters. Weaker RE condition implies LRE condition holds with a larger τ , and Lower-RE condition with a smaller τ , that is, stronger LRE implies stronger RE. We prove Lemma 1 in Section 9. Definition 2.3. (Upper-RE condition) [30] The matrix Γ satisfies an upper-RE condition with smoothness α e > 0 and tolerance τ > 0 if 2 2 θT Γθ ≤ α e kθk2 + τ kθk1 ∀θ ∈ Rm . Definition 2.4. Define the largest and smallest d-sparse eigenvalue of a p × q matrix A to be ρmax (d, A) := and ρmin (d, A) := 2 (2.3) 2 (2.4) max kAtk22 / ktk2 , where d < p, min kAtk22 / ktk2 . t6=0;d−sparse t6=0;d−sparse Before stating some general result for the optimization program (1.12) and its implications for the Lasso-type estimator (1.7) in terms of statistical and optimization errors, we need to introduce some more notation and the following assumptions. Let amax = maxi aii and bmax = maxi bii be the maximum diagonal entries of A and B respectively. In general, under (A1), one can think of λmin (A) ≤ 1 and for s ≥ 1, 1 ≤ amax ≤ ρmax (s, A) ≤ λmax (A), (2.5) where λmax (A) denotes the maximum eigenvalue of A. (A2) The minimal eigenvalue λmin (A) of the covariance matrix A is bounded: 1 ≥ λmin (A) > 0. (A3) Moreover, we  assume that the condition number κ(A) is upper bounded by q n O log m and τB = O(λmax (A)). Throughout the rest of the paper, s0 ≥ 32 is understood to be the largest integer chosen such that the following inequality still holds: r √ λmin (A) n where $(s0 ) := ρmax (s0 , A) + τB (2.6) s0 $(s0 ) ≤ 32C log m imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 13 where we denote by τB = tr(B)/n and C is to be defined. Denote by MA = 64C$(s0 ) ≥ 64C. λmin (A) (2.7) b as Throughout this paper, we denote by A0 the event that the modified gram matrix Γ defined in (1.6) satisfies the Lower as well as Upper RE conditions with curvature and tolerance 11 5 λmin (A), smoothness α e= λmax (A) 8 8 384C 2 $(s0 )2 log m λmin (A) − α 396C 2 $2 (s0 + 1) log m ≤ τ := ≤ λmin (A) n s0 λmin (A) n α= for α, α e and τ as defined in Definitions 2.2 and 2.3, and C, s0 , $(s0 ) in (2.6). To bound the optimization errors, we show that the corrected linear regression loss function (1.9) satisfies the following Restricted Strong Convexity (RSC) and Restricted Smoothness (RSM) conditions when the sample size and effective rank of matrix B satisfy certain lower bounds (cf. Theorem 3); namely, for all vectors β0 , β1 ∈ Rm and T (β1 , β0 ) := Ln (β1 ) − Ln (β0 ) − h ∇Ln (β0 ), β1 − β0 i , we show that for some parameters (α` , τ` (Ln )) and (αu , τu (Ln )), α` 2 2 kβ1 − β0 k2 − τ` (Ln ) kβ1 − β0 k1 and 2 αu 2 2 kβ1 − β0 k2 + τu (Ln ) kβ1 − β0 k1 . 2 T (β1 , β0 ) ≥ T (β1 , β0 ) ≤ (2.8) (2.9) Applied to (1.12), the composite gradient descent procedure of [34] produces a sequence of iterates {β t }∞ t=0 via the updates ) (   2 ∇Ln (β t ) ρλ (β) 1 t t+1 β− β − + (2.10) β = arg min 2 ζ ζ β∈Rm ,g(β)≤R 2 where ζ1 is the step size. Let ν` = 64dτ` (Ln ) and ᾱ` := α` − ν` . We show that the composite gradient updates exhibit a type of globally geometric convergence in terms of the compound contraction coefficient κ = 1− ᾱ` 4ζ +% 1−% , where % := 2ν(d, m, n) 128dτu (Ln ) := α` − ν` ᾱ` (2.11) where ν` < α` /C for some C > 1 to be specified. Let τ (Ln ) = τ` (Ln ) ∨ τu (Ln ). Define   2τ (Ln ) ᾱ` ξ := + 2% + 5 > 10τ (Ln ). (2.12) 1−% 4ζ For simplicity, we present in Theorem 2 the case for ρλ (β) = λ kβk1 only. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 14 Rudelson and Zhou/Errors-in-variables Theorem 2. Consider the optimization program (1.12) for a radius R such that β ∗ is feasible. Let g(β) = λ1 ρλ (β) where ρλ (β) = λ kβk1 . Suppose that the loss function Ln satisfies the RSC/RSM conditions (2.8) and (2.9) with parameters (α` , τ` (Ln )) and (αu , τu (Ln )) respectively. Let %, κ and ξ be defined as in (2.11) and (2.12) respectively. Suppose that the regularization parameter is chosen such that for ζ ≥ αu   16Rξ . (2.13) λ ≥ max 12 k∇Ln (β ∗ )kmax , (1 − κ) Suppose that κ < 1. Suppose that βb is a global minimizer of (1.12). Then for any step size parameter ζ ≥ αu and tolerance parameter δ2 ≥ cε2stat d log m =: δ̄ 2 , 1−κ n where ε2stat = βb − β ∗ 2 , 2 (2.14) the following hold for all t ≥ T ∗ (δ) b ≤ δ2 , φ(β t ) − φ(β) 2 β t − βb ≤ 2 where ν = 64dτ (Ln ), τ (Ln )  0 2 ᾱ` log m n , 16δ 4 ∧ 4R2 , λ2  δ 2 + 4νε2stat + 4τ (Ln )2 , and for 2 = b (2.16) and β) 2 log( φ(β )−φ( ) δ2 T (δ) = + log log log(1/κ) ∗ (2.15)  λR δ2  1+ log 2 log(1/κ)  . (2.17) We prove Theorem 2 in Section B. Theorem 2 is similar in spirit to the main result Theorem 2 in [1] that deals with a convex loss function, and Theorem 3 in [31] on a similar setting to the present work. Compared to [31], we simplified the condition on λ by not imposing an upper bound. Moreover, we present refined analysis on the sample requirement and illuminate its dependence upon the condition number κ(A) and the tolerance parameter τ when applied to the corrected linear regression problem (1.10). It is understood throughout the paper that for the same C as in (2.7), τ  τ0 log m 400C 2 $(s0 + 1)2 , where τ0  ≈ MA2 λmin (A)/10 n λmin (A) (2.18) and it is helpful to consider MA as being upper bounded by O(κ(A)) in view of (2.5) and (A3). Toward this end, we prove in Section 5 that under event A0 ∩B0 , the RSC and RSM conditions as stated in Theorem 2 hold with α`  λmin (A) and αu  λmax (A) and τ` (Ln ) = τu (Ln )  τ ; then we have for all t ≥ T ∗ (δ) as defined in (2.17) and for ε2stat d log m δ 2  1−κ , n β t − βb 2 ≤ 2 4 2 α` 2 δ + εstat + O α` 4  δ 2 ε2stat b20  , (2.19) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 15 Rudelson and Zhou/Errors-in-variables where 0 < κ < 1 so long as ζ  λmax (A) and n = Ω(κ(A)MA2 d log m). We now check the conditions on λ in Theorem 2. First, we note that both types of conditions on λ are also required in the present paper for the statistical error bounds shown in Theorems 3 and 6. We state in Theorem 16 a deterministic result from [30] on the statistical error for the corrected linear model, which requires that λ ≥ 2 k∇Ln (β ∗ )kmax and √ log m λ ≥ 4b0 dτ  4Rτ for τ := τ0 n (2.20) as defined in (2.18) and dτ ≤ α32` in order to obtain the statistical error bound for the corrected linear model at the order of ε2stat = βb − β ∗ 2  2 400 2 λ d. α`2 (2.21) Under suitable conditions on the sample size n and the effective rank of matrix B to be stated in Theorem 3, we show that for the loss function (1.9), the RSC and RSM conditions hold under event A0 (cf. Lemma 15) following the Lower and Upper-RE conditions as derived in Lemma 15, ᾱ` ≈ α`  λmin (A) , 2 αu  3λmax (A) , 2 and τ (Ln )  τ. Compared with the lower bound imposed on λ as in (2.20) that we use to derive statisξ that crucially depends on the tical error bounds, the penalty now involves a term 1−κ condition number κ(A) in (2.13); Assuming that ζ ≥ αu , then the second condition in (2.13) on λ implies that λ ξ 1−κ = Ω(Rτ (Ln )κ(A)) given ζ ≥ 40τ (Ln ) + 2τ (Ln )  τ κ(A), ᾱ` (2.22) which now √ depends explicitly on the condition number κ(A) in addition to the radius R  b0 d and the tolerance parameter τ . This is expected given that both RSC and RSM conditions are needed in order to derive the computational convergence bounds, while for the statistical error, we only require the RSC (Lower RE) condition to hold. Remarks. Consider the regression model in (1.1a) and (1.1b) with independent random matrices X0 , W as in (1.4), and an error vector  ∈ Rn independent of X0 , W , with independent entries j satisfying Ej = 0 and kj kψ2 ≤ M . Theorem 12 and its b ∗− corollaries provide an upper bound on the `∞ norm of the gradient ∇Ln (β ∗ ) = Γβ b γ b of the loss function in the corrected linear model, where Γ and γ b are as defined in (1.6). Let 1/2 D00 = kBk2 + a1/2 max , and 1/2 Doracle = 2(kAk2 1/2 + kBk2 ). (2.23) Specializing to the case of corrected linear models, we have by Corollary 14, on event B0 as defined therein, r log m ∗ ∗ b −γ k∇Ln (β )k∞ = Γβ b ≤ψ n ∞ imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 16   +/2 +/2 1/2 oracle where ψ := C0 D00 K M + τB K kβ ∗ k2 and τB = τB + D√ for D00 , Doracle m as defined in (2.23). b for solving (1.7) using the The bound (2.15) characterizes the excess loss φ(β t ) − φ(β) composite gradient algorithm; moreover, for any iterate β t such that (2.15) holds, the following bound on the optimization error β t − βb follows immediately:   2 2 64τ` (Ln )δ 4 ≤ β t − βb , δ 2 + 4νε2stat + ᾱ` λ2 2 4 where ν = 64dτ (Ln ) and 4τ (Ln )2 = 64τ (Ln ) λδ 2 by definition of 2 in view of (2.21). Finally, we note that Theorem 2 holds for a class of weakly convex penalties as considered in [31] with suitable adaptation of RSC and parameters and conditions to involve µ, following exactly the same sequence of arguments. Notable examples of such weakly convex penalty functions are SCAD [19] and MCP [55]. The rest of the paper is organized as follows. In Section 3, we present two main results in Theorems 3 and 4. In Section 4, we state more precise results which improve upon Theorems 3 and 4; these results are more precise in the sense that our bounds and penalty parameters now take tr(B), the parameter that measures the magnitudes of errors in W , into consideration. In Section 5, we show that the RSC and RSM conditions hold for the corrected linear loss function and present our computational convergence bounds with regard to (1.7) in Theorem 9 and Corollary 10. In Section 6, we outline the proof of the main theorems. In particular, we outline the proofs for Theorems 3, 4, 6 and 7 in Section 6, 6.3 and 6.5 respectively. In Section 7, we show a deterministic result b − A for Γ b as in (1.6) with regards to as well as its application to the random matrix Γ the upper and Lower RE conditions. In Section 8, we present results from numerical simulations designed to validate the theoretical predictions in previous sections. The technical details of proofs are collected at the end of the paper. We prove Theorem 3 in Section 10. We prove Theorem 4 in Section 11. We prove Theorems 6 and 7 in Section 12 and Section 13 respectively. We defer the proof of Theorem 2 to Section B. The paper concludes with a discussion of the results in Section 16. We list a set of symbols we use throughout the paper in Table 1. Additional proofs and theoretical results are collected in the Appendix. 3. Main results on the statistical error In this section, we will state our main results in Theorems 3 and 4 where we consider the regression model in (1.1a) and (1.1b) with random matrices X0 , W ∈ Rn×m as defined in (1.4). For the corrected Lasso estimator, we are interested in the case where the smallest eigenvalue of the column-wise covariance matrix A does not approach 0 too quickly and the effective rank of the row-wise covariance matrix B is bounded from below (cf. (3.2)). More precisely, (A2) thus ensures that the Lower-RE condition as in Definition 2.2 is not vacuous. (A3) ensures that (2.6) holds for some s0 ≥ 1. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 17 Rudelson and Zhou/Errors-in-variables TABLE 1 symbols we used throughout the proof Symbol α α` αu ¯stat Definition curvature: α := 85 λmin (A) Lower RE/ RSC curvature parameter: α` = α Upper RE/ RSM parameter αu  23 λmax (A) √ ¯stat = 8 dεstat where εstat = βb − β ∗ τ0 τ0  λ (A)−α 400C 2 $(s0 +1)2 λmin (A) 2 τ = mins 0 τB s0 ≥ 1 tolerance parameter τ = τ0 lognm in Lower/Upper RE conditions τB = tr(B)/n the largest integer chosenqsuch that the following inequality still holds: √ λ (A) n s0 $(s0 ) ≤ min 32C log m $(s0 ) τ` (Ln ) τu (Ln ) ν` ν(d, m, n) ᾱ` φ(β) ∇Ln (β) ρmax (s0 , A) + τB tolerance parameter in RSC condition: τ` (Ln )  τ0 log m/n tolerance parameters in RSM condition: τu (Ln )  τ0 log m/n ` ν` = 64dτ` (Ln ) < α 60 ν(d, m, n) = 64dτu (Ln ) effective RSC coefficient ᾱ` = α` − ν` b −γ bT + ρλ (β) loss function: φ(β) = 12 β T Γβ b −γ Gradient of the loss function Γβ b q log m n q m 2C0 K 2 log mn ρn = C0 K ρn rm,n ζ % κ rm,n = step size parameter: ζ ≥ αu = 11λmax /8 128dτu (Ln ) 2ν(d,m,n) ` = < ᾱ contraction parameter % := ᾱ` ᾱ` 8ζ ᾱ` −1 contraction coefficient as κ := (1 − 4ζ + %)(1 − %) <1 δ2 tolerance parameter in computational errors δ 2 ≥ MA MA = cε2 stat d log p 1−κ n 64C$(s0 ) where $(s0 ) = ρmax (s0 , A) + τB . λmin (A) 32C$(s0 +1) where $(s0 + 1) = ρmax (s0 + 1, A) M+ = λ (A) min   ` + 2% + 5 (1 − %)−1 ξ = 2(τ` (Ln ) ∨ τu (Ln )) ᾱ 4ζ 3 /2 V = 3eMA M+ ξ V + τB . Throughout this paper, for the corrected Lasso estimator, we will use the expression τ := λmin (A) − α 4n 5 , where α = λmin (A) and s0  2 s0 8 MA log m where MA is as defined in (2.7). Let √ D0 = τB + a1/2 max and D2 = 2(kAk2 + kBk2 ). (3.1) Theorem 3. (Estimation for the corrected Lasso estimator) Consider the regression model in (1.1a) and (1.1b) with independent random matrices X0 , W as in (1.4), and an error vector  ∈ Rn independent of X0 , W , with independent entries j satisfying Ej = 0 and kj kψ2 ≤ M . Set n = Ω(log m). Suppose n ≤ (V/e)m log m, where V is a constant which depends on λmin (A), ρmax (s0 , A) and tr(B)/n. Suppose m is sufficiently large. Suppose (A1), (A2) and (A3) hold. Let C0 , c0 , c2 , c3 > 0 be some absolute constants. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 18 Rudelson and Zhou/Errors-in-variables 2 2 Suppose that kBkF / kBk2 ≥ log m. Suppose that c0 K 4 ≤ 1 and r(B) := tr(B) kBk2 ≥ 16c0 K 4 Vm log m n log . log m n (3.2) Let b0 , φ be numbers which satisfy M2 ≤ φ ≤ 1. K 2 b20 (3.3) Assume that the sparsity of β ∗ satisfies for some 0 < φ ≤ 1 c0 φK 4 n 2 log m < n/2, 40M+ 32C$(s0 + 1) M+ = λmin (A) d := |supp(β ∗ )| ≤ where (3.4) (3.5) for $(s0 + 1) = ρmax (s0 + 1, A) + τB . Let βb be an optimal solution to the corrected Lasso estimator as in (1.7) with r log m λ ≥ 4ψ where ψ := C0 D2 K (K kβ ∗ k2 + M ) . n (3.6) Then for any d-sparse vectors β ∗ ∈ Rm , such that 2 φb20 ≤ kβ ∗ k2 ≤ b20 , (3.7)      Vm log m n 4c2 n we have with probability at least 1−4 exp − M 2c3log log − −2 exp − 2 4 n m M K A A 22/m3 , βb − β ∗ ≤ 2 20 √ λ d and α βb − β ∗ ≤ 1 80 λd. α We give an outline of the proof of Theorem 3 in Section 6.2. We prove Theorem 3 in Section 10. We defer discussions on conditions appearing Theorem 3 in Section 3.2. For the Conic programming estimator, we impose a restricted eigenvalue condition as p formulated in [4, 38] on A and assume that the sparsity of β ∗ is bounded by o( n/ log m). These conditions will be relaxed in Section 4 where we allow τB to approach 0. Theorem 4. Suppose (A1) holds. Set 0 < δ < 1. Suppose that n < m  exp(n) and 1 ≤ d0 < n. Let λ > 0 be the same parameter as in (1.8). Suppose that 2 2 kBkF / kBk2 ≥ log m. Suppose that the sparsity of β ∗ is bounded by p (3.8) d0 := |supp(β ∗ )| ≤ c0 n/ log m for some constant c0 > 0. Suppose   2000dK 4 60em where log n ≥ δ2 dδ d = 2d0 + 2d0 amax 16K 2 (2d0 , 3k0 , A1/2 )(3k0 )2 (3k0 + 1) . δ2 (3.9) (3.10) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 19 Consider the regression model in (1.1a) and (1.1b) with X0 , W as in (1.4) and an error vector  ∈ Rn , independent of X0 , W , with independent entries j satisfying Ej = 0 and kj kψ2 ≤ M . Let βb be an optimal solution to the Conic programming estimator b as defined in (1.6). Recall τB := tr(B)/n. Choose for as in (1.8) with input (b γ , Γ) D0 , D2 as in (3.1) and r r log m log m 2 and ω  D0 KM . µ  D2 K n n βb − β ∗ q c0 m2 − 2 exp(−δ 2 n/2000K 4 ), r   log m M 2 1/q ≤ CD2 K d0 kβ ∗ k2 + n K Then with probability at least 1 − (3.11) for 2 ≥ q ≥ 1. Under the same assumptions, the predictive risk admits the following bounds with the same probability as above,  2 2 1 log m M ∗ 0 2 4 ∗ b X(β − β ) ≤ C D2 K d0 kβ k2 + n n K 2 where c0 , C0 , C, C 0 > 0 are some absolute constants. We give an outline of the proof of Theorem 4 in Section 6 while leaving the detailed proof in Section 11. 3.1. Regarding the MA constant Denote by MA = 64C$(s0 ) ρmax (s0 , A) + τB  λmin (A) λmin (A) • (A3) ensures that MA and qM+ are  upper bounded by the condition number of A: λmax (A) n κ(A) := λmin (A) = O log m given that τB := tr(B)/n = O(λmax (A)). • So the condition (3.4) in Theorem 3 allows d  n/ log m in the optimal setting when the condition number κ(A) is understood to be a constant. As κ(A) increases, the conservative worst case upper bound on d needs to be adjusted correspondingly. Moreover, this adjustment is also crucial in order to ensure the composite gradient algorithm to converge in the sense of Theorem 2. We will illustrate such dependencies on κ(A) in numerical examples in Section 8. • The condition τB = O(λmax (A)) puts an upper bound on how large the measurement error in W can be. We do not allow the measurement error to overwhelm the signal entirely. When τB → 0, we recover the ordinary Lasso bound in [4], which we elaborate in the next two sections. Throughout this paper, we assume that MA  M+ , where recall M+ = 32C$(s0 +1) λmin (A) . imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 20 Rudelson and Zhou/Errors-in-variables 3.2. Discussions Throughout our analysis, we set the parameter b0 ≥ kβ ∗ k2 and d = |supp(β ∗ )| := {j : βj∗ 6= 0} for the corrected Lasso estimator. In practice, both b0 and d are understood to be parameters chosen to provide an upper bound on the `2 norm and the sparsity of the true β ∗ . The parameter 0 < φ < 1 is a parameter that we use to describe 2 the gap between kβ ∗ k2 and its upper bound b20 . Denote the Signal-to-noise ratio by 2 2 S/N := K 2 kβ ∗ k2 /M2 , where N := M2 and φK 2 b20 ≤ S := K 2 kβ ∗ k2 ≤ K 2 b20 . The two conditions (3.3) and (3.7) on b0 and φ imply that N ≤ K 2 φb20 ≤ S. Notice that this could be restrictive if φ is small. We will show in Section 6.2 that condition (3.3) is not needed in order for the `p , p = 1, 2 errors as stated in the Theorem 3 to hold. It was indeed introduced so as to further simplify the expression for the condition on d as shown in (3.4). Therefore we provide slightly more general conditions on d in (6.9) in Lemma 17, where (3.3) is not required. We introduce the parameter φ so that the conditions on d depend on φ and b20 rather than the true signal kβ ∗ k2 (cf. Proof of Lemmas 17 and 18). It will also become clear in the sequel from the proof of Lemma 17 (cf. (H.4)) that we could use kβ ∗ k2 rather than its the lower bound b20 φ in the expression for d. However, we choose to state the condition on d as in Theorem 3 for clarity of our exposition. See also Theorem 6 and Lemma 18. In fact, we prove that Theorem 3 holds with N = M2 and S = φK 2 b20 in arbitrary orders, so long as conditions (3.2) and q (3.4) or (6.9) hold. For both cases, we require √ that λ  (kAk2 + kBk2 )K S + N lognm as expressed in (3.6). That is, when either the noise level M or the signal strength K kβ ∗ k increases, we need to increase λ 2 correspondingly; moreover, when N dominates the signal K 2 kβ ∗ k2 , we have for d  1 n as in (3.4), M 2 log m A r βb − β ∗ ∗ 2 / kβ k2 = OP D2 K 2 N 1 S $(s0 + 1) ! , which eventually becomes a vacuous bound when N  S. This bound appears a bit crude as it does not entirely discriminate between the noise, measurement error, and the signal strength. We further elaborate on the relationships among these three elements in Section 4. We will then present an improved bound in Theorem 6. 1. The choice of λ for the Lasso estimator and parameters µ, ω for the DS-type estimator satisfy λ  µ kβ ∗ k2 + ω. This relationship is made clear through Theorem 16 regarding the corrected Lasso estimator, which follows from Theorem 1 by [30], and Lemmas 19 and 22 for the Conic programming estimator. The penalty parameter λ is chosen to b ∗ bound γ b − Γβ from above, which is in turn bounded in Theorem 12. See ∞ imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 21 Corollaries 13 and 14, which are the key results in proving Theorems 3, 4, 6, and 7. 2. Throughout our analysis of Theorems 3 and 4, our error bounds are stated in a way assuming the errors in W are sufficiently large in the sense that these bounds are optimal only when τB is bounded from below by some absolute constant. For example, when kBk2 is bounded away from 0, the lower bound on the effective rank r(B) = tr(B)/ kBk2 implies that τB must also be bounded away from 0. More precisely, by the condition on the effective rank as in (3.2), we have τB = tr(B) n ≥ 16c0 K 4 kBk2 Vm log m log where V = 3eMA3 /2. log m n Later, we will state our results with τB = tr(B)/n > 0 being explicitly included in the error bounds as well as the penalization parameters and sparsity constraints. 3. In view of the main Theorems 3 and 4, at this point, we do not really think one estimator is preferable to the other. While the `q error bounds we obtain for the two estimators are at the same order for q = 1, 2, the conditions under which these error bounds are obtained are somewhat different. In Theorem 4, we only require that RE(2d0 , 3k0 , A1/2 ) holds for k0 = 1 + λ where λ  1, while in Theorem 3 we need the minimal eigenvalue of A to be bounded from below, namely, we need to assume that (A2) holds. As mentioned earlier, (A2) ensures that the Lower-RE condition as in Definition 2.2 is not vacuous while (A3) ensures that (2.6) holds for some s0 ≥ 1. Th condition (3.2) on the effective rank of the row-wise covariance matrix B is also needed to establish the Lower and Upper RE conditions in Lemma 15 for the corrected Lasso estimator. Moreover, for the sparsity parameter d0 in (3.8), we show in Lemma 34 that (A2) is a sufficient condition for a type of RE(2d0 , 3k0 ) condition to hold on non positive b as defined in (1.6). See also Theorem 26. definite Γ 4. In some sense, the assumptions in Theorem 3 appear to be slightly stronger, while at the same time yielding correspondingly stronger results in the following sense: The corrected Lasso procedure can recover a sparse model using O(log m) number of measurements per nonzero component despite the measurement error in X and the p stochastic noise , while the Conic programming estimator allows only d  n/ log m to achieve the error rate at the same order as the corrected Lasso estimator. Hence, while Conic programming estimator is conceptually more adaptive by not fixing an upper bound on kβ ∗ k2 a priori, the price we pay seems to be a more stringent upper bound on the sparsity level. 5. We note that following Theorem 2 as in [3], one can show that without the relatively restrictive sparsity condition (3.8), a bound similar to that in (3.11) holds, however, with kβ ∗ k2 being replaced by kβ ∗ k1 , so long as the sample size satisfies the condition as in (4.9). However, we show in Theorem 7 in Section 6.5 that this restriction on the sparsity can be relaxed for the Conic programming estimator (1.8), when we make a different choice for the parameter µ based on a more refined analysis. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 22 Results similar to Theorems 3 and 4 have been derived in [30, 3], however, under different assumptions on the distribution of the noise matrix W . When W is a random matrix with i.i.d. subgaussian noise, our results in Theorems 3 and 4 will essentially recover the results in [30] and [3]. We compare with their results in Section 4 in case B = τB I after we present our improved bounds in Theorems 6 and 7. We refer to the paper of [3] for a concise summary of these and some earlier results. Finally, one reviewer asked about the dependence of the tuning parameter on properties √ 1/2 1/2 1/2 of A and B, namely parameters D0 = τB + amax , D00 = kBk2 + amax and D2 = kAk2 + kBk2 . We now state in Lemma 5 a sharp bound on estimating τB using τbB as in (1.5), which will provide a natural plug-in estimate for parameters such as D0 that involve τB . Lemma 5. Let m ≥ 2. Let X be defined as in (1.4) and τbB be as defined in (1.5). Denote by τB = tr(B)/n and τA = tr(A)/m. Suppose that n ∨ (r(A)r(B)) > log m. Denote by B6 the event such that r   kBk log m kAkF 2 √ + √ F =: D1 rm,m , |b τB − τB | ≤ 2C0 K mn m n q kAk kBk m 3 where D1 = √mF + √nF and rm,m = 2C0 K 2 log mn . Then P (B6 ) ≥ 1 − m3 . √ If we replace log m with log m in the definition of event B6 , then we can drop the tr(B) condition on n or r(A)r(B) = tr(A) kAk kBk to achieve the same bound on event B6 . 2 2 In an earlier version of the present work by the same authors [39], we presented the b := 1 XX T − tr(A) Im to rate of convergence for using the corrected gram matrix B m m estimate B and proved isometry properties in the operator norm once the effective rank b and its of A is sufficiently large compared to n; one can then use such estimated B 0 operator norm in D2 and D0 . See Theorem 21 and Corollary 22 therein. As mentioned, we use the estimated τbB (cf. Lemma 5) in D0 . The dependencies on A, kβ ∗ k2 and  are known problems in the Lasso and corrected Lasso literature; see [4, 30]. For example, the RE condition as stated in Definition 2.1 and its subgaussian concentration properties as shown [38] clearly depend on unknown parameter amax related to covariance matrix A. See Theorem 27 in the present paper. We prove Lemma 5 in Section C.1. Lemma 5 provides the powerful technical insight and one of the key ingredients leading to the tight analysis in Theorems 6 and 7 for the corrected Lasso estimator (1.7) as well as the Conic programming estimator (1.8) in Section 4, where we also present theory for which the dependency on kAk2 becomes extremely mild. 4. Improved bounds when the measurement errors are small Although the conclusions of Theorems 3 and 4 apply to cases when kBk2 → 0, the error bounds are not as tight as the bounds we are about to derive in this section. So far, we have used more crude approximations on the error bounds in terms of estimating b ∗ γ b − Γβ for the sake of reducing the amount of unknown parameters we need to ∞ imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 23 Rudelson and Zhou/Errors-in-variables consider. The bounds we derive in this section take the magnitudes of the measurement errors in W into consideration. As such, we allow the error bounds to depend on the parameter τB explicitly, which become much tighter as τB becomes smaller. For the extreme case when τB approaches 0, one hopes to recover a bound close to the regular Lasso or the Dantzig selector as the effect of the noise on the procedure should become negligible. We show in Theorems 6 and 7 that this is indeed the case. Denote by +/2 τB := √ Doracle 1/2 1/2 τB + √ , where Doracle = 2(kAk2 + kBk2 ). (4.1) m We first state a more refined result for the Lasso-type estimator, for which we now only require that r p log m 1/2 1/2 λ  (amax + kBk2 )K N + τB S . n √ √ That is, we replace N + S in λ (3.6) now with N + τB S, which leads to significant improvement on the rates of convergence for estimating β ∗ when τB → 0. Theorem 6. Suppose all conditions in Theorem 3 hold, except that we drop (3.3) and replace (3.6) with r   log m +/2 λ ≥ 4ψ , where ψ := C0 D00 K M + τB K kβ ∗ k2 (4.2) n +/2 for D00 and τB as defined in (2.23) and (4.1) respectively. Let c0 , φ, b0 , M , K and +/2 M+ be as defined in Theorem 3. Let τB+ = (τB )2 . Suppose that for 0 < φ ≤ 1 and CA := 1 2 , 160M+ n {c0 c00 Dφ ∧ 8} =: d¯0 , where log m kBk2 + amax K 2 M2 and Dφ = + τB+ K 4 φ c00 = 2 $(s0 + 1) b20 d := |supp(β ∗ )| ≤ CA (4.3) (4.4) 2 Then for any d-sparse vectors β ∗ ∈ Rm , such that φb20 ≤ kβ ∗ k2 ≤ b20 , we have 80 20 √ λ d and βb − β ∗ ≤ λd (4.5) α α 1 2      Vm log m n 4c2 n with probability at least 1 − 4 exp − M 2c3log log − 2 exp − − 2 4 n M K m βb − β ∗ ≤ A A 22/m3 . We give an outline for the proof of Theorem 6 in Section 6.3, and show the actual proof in Section 12. We next state in Theorem 7 an improved bounds for the Conic programming estimator (1.8), which dramatically improve upon those in Theorem 4 when τB is small, where an “oracle” rate for estimating β ∗ with the Conic programming estimator βb (1.8) 2 is defined and the predictive error kXvk2 when τB = o(1) is derived. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 24 Let C0 satisfy (H.6) for c as defined in Theorem 31. Throughout the rest of the paper, we denote by: r r log m log m 2 ρn = C0 K and rm,m = 2C0 K ; (4.6) n mn 3 †/2 1/2 1/2 τB = (τB + C6 rm,m ) and τB‡  2τB + 3C62 rm,m . (4.7) 2 √ 1/2 Theorem 7. Let D0 = τB + amax , and D00 , Doracle be as defined in (2.23). Let C6 ≥ Doracle . Let ρn and rm,m be as defined in (4.6). Suppose all conditions in Theorem 4 hold, except that we replace the condition on d as in (3.8) with the following. Suppose that the sample size n and the size of the support of β ∗ satisfy the following requirements:   r 1 n − , where τB− ≤ 1/2 , (4.8) d0 = O τB 1/2 log m τB + 2C6 rm,m   2000dK 4 60em and n ≥ log , where (4.9) δ2 dδ d = 2d0 + 2d0 amax 16K 2 (2d0 , 3k0 , A1/2 )(3k0 )2 (3k0 + 1) . (4.10) δ2 Let τbB be as defined in defined in (1.5). Let βb be an optimal solution to the Conic b as defined in (1.6). Suppose programming estimator as in (1.8) with input (b γ , Γ) ω  D0 M ρn where βb − β ∗ q 1/2 τeB := 1/2 µ  D00 τeB Kρn , 1/2 τbB (4.11) 1/2 + C6 rm,m . c00 m2 − 2 exp(−δ 2 n/2000K 4 ), r   log m M †/2 0 0 2 1/q ≤ C D0 K d0 τB kβ ∗ k2 + ;(4.12) n K Then with probability at least 1 − for 2 ≥ q ≥ 1, and Under the same assumptions, the predictive risk admits the following bound   2 1 b − β ∗ ) ≤ C 00 (kBk + amax )K 2 d0 log m τ ‡ K 2 kβ ∗ k2 + M 2 , X( β  B 2 2 n n 2 with the same probability as above, where c00 , C 0 , C 00 > 0 are some absolute constants. We give an outline for the proof of Theorem 7 in Section 6.5, and show the actual proof in Section 13. 4.1. Oracle results on the Lasso-type estimator We now discuss the improvement being made in Theorem 6 and Theorem 7. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 25 Rudelson and Zhou/Errors-in-variables The Signal-to-noise ratio. Let us redefine the Signal-to-noise ratio by 2 S/M := K 2 kβ ∗ k2 2 τB+ K 2 kβ ∗ k2 + M2 , where 2 2 := K 2 kβ ∗ k2 and M := M2 + τB+ K 2 kβ ∗ k2 . S +/2 When either the noise level M or the measurement error strength in terms of τB K kβ ∗ k2 increases, we need to increase the penalty parameter λ correspondingly; moreover, when d  M12 lognm , we have A βb − β ∗ kβ ∗ k2 r 2 = OP D00 K 2 M 1 S $(s0 + 1) ! , which eventually becomes a vacuous bound when M  S. 1/2 2 2 . In this setting, I, we have kBk2 = σw and τB = σw Finally, suppose B = σw we recover essentially the same `2 error bound as that in Corollary 1 of [30] in case kβ ∗ k2  1, as we have on event A0 ∩ B0 , 1/2 βb − β ∗ 2 C(σw + amax ) ≤ λmin (A) r q d log m 2 2 kβ ∗ k σ2 + σw 2 n (4.13) where σ2  M2 and K 2  1. However, when kβ ∗ k2 = Ω(1), our statistical precision appears to be sharper as we allow the term kβ ∗ k2 to be removed entirely from the RHS when σw → 0 and hence recover the regular Lasso rate of convergence. The penalization parameter. We focus now on the penalization parameter λ in (1.7). The effective rank condition in (3.2) implies that for n = O(m log m) kBk2 ≤ τB log m ≤ CB τB log m 16c0 K 4 log(3eMA3 /2) + log(m log m) − log n (4.14) 1 where CB = 16c0 K 4 log(3eM given that log(m log m) − log n > 0. This bound is 3 A /2) very crude given that in practice, we focus on cases where n  m log m. Note that under (A1) (A2) and (A3), we have for n = O(m log m), τB+ kAk2 + kBk2 m   1 λmin (A) √ ≤ τB + (κ(A)λmin (A) + CB τB log m)  τB + O . m m  τB + Without knowing τB , we will use τbB as defined in (1.5). Notice that we know neither 2 D00 nor Doracle in the definition of λ, where Doracle  D2 ; Indeed, 2 2D2 ≤ Doracle ≤ 4D2 . imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 26 Rudelson and Zhou/Errors-in-variables However, assuming that we normalize the column norms of the design matrix X to be roughly at the same scale, we have for τB = O(1) and m sufficiently large, √ D00  1 while Doracle / m = o(1) in case kAk2 , kBk2 ≤ M for some large enough constant M . In summary, compared to Theorem 3, in ψ, we 1/2 1/2 replace D2 = 2(kAk2 + kBk2 ) with D00 := kBk2 + amax so that the dependency on kAk2 becomes much weaker. As mentioned in Section 3.2, we may use the plugb 2 in D0 , where B b is the corrected gram matrix 1 XX T − tr(A) Im . in estimate kBk 0 m m Finally, the concentration of measure bound for the estimator τbB as in (1.5) is stated in Lemma 5, which ensures that τbB is indeed a good proxy for τB (cf. Lemma 23). The sparsity parameter. The condition on d (and Dφ ) for the Lasso estimator as defined in (4.3) suggests that as τB → 0, and thus τB+ → 0, the constraint on the sparsity parameter d becomes slightly more stringent when K 2 M2 /b20  1 and much more restrictive when K 2 M2 /b20 = o(1). Moreover, suppose we require 2 M2 = Ω(τB+ K 2 kβ ∗ k2 ), that is, the stochastic error  in the response variable y as in (1.1a) does not converge to 0 as quickly as the measurement error W in (1.1b) does, then the sparsity constraint becomes essentially unchanged as τB+ → 0 as we show now. +/2 Case 1. Suppose τB → 0 and M = Ω(τB K kβ ∗ k2 ). In this case, essentially, we require that  0 00 2 2  c c K M c0 λ2min (A) n ∧1 (4.15) d≤ 2 $ (s0 + 1) log m b20 2 where Dφ  τB+ K 4 kβ ∗ k2 K 2 M2 K 2 M2 + 4 given that τ K φ ≤  B 2 2 b0 b0 b20 kBk +a max 2 where c0 , c0 are absolute constants and c00 := $2 (s  1 where $(s0 +1) = 0 +1) ρmax (s0 + 1, A) + τB . In this case, the sparsity constraint becomes essentially unchanged as τB+ → 0. Case 2. Analogous to (3.4), when M2 ≤ τB+ φK 2 b20 , we could represent the condition on d as follows: n n ≤ CA c0 c00 Dφ d ≤ CA c0 c00 τB+ K 4 φ log m log m which is sufficient for (4.3) to hold for τB → 0; Indeed, by assumption that c0 K 4 ≤ 1 and M2 ≤ τB+ φK 2 b20 , we have 8 > 2c0 K 4 τB+ φ ≥ c0 Dφ  c0 τB+ K 4 φ. Hence, for c0 τB+ K 4 ≤ 1, we have n n  CA c00 (c0 τB+ K 4 φ ∧ 8) log m log m n n 00 0 + 4 00 0 ≤ CA c c τB K φ  CA c c Dφ log m log m d ≤ CA (c0 c00 τB+ K 4 φ ∧ 8) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 27 Rudelson and Zhou/Errors-in-variables This condition, however, seems to be unnecessarily strong, when τB → 0 (and M → 0 simultaneously). We focus on the following Case 2 in the present work. For both cases, it is clear that sample size needs to satisfy   (ρmax (s0 + 1, A) + τB )4 e n = Ω d log m , λmin (A)2 (kBk2 + amax ) (4.16) e where Ω(·) notation hides parameters K, M , φ and b0 , which we treat as absolute constants that do not change as τB → 0. These tradeoffs are somehow different from the behavior of the Conic programming estimator (cf (4.17)). We will provide a more detailed analysis in Sections 6.1 and 6.3. 4.2. Oracle results on the Conic programming estimator b ∗ In order to exploit the oracle bound as stated in Theorem 12 regarding γ b − Γβ ∞ , we need to know the noise level τB := tr(B)/n in W and then we can set µ  Doracle 1/2 )Kρn while retaining ω  D0 M ρn , D00 (τB + √ m r √ √ log m where recall ρn = C0 K and D0 = τB + amax . n This will in turn lead to improved bounds in Theorems 6 and 7. The penalization parameter. Without knowing the parameter τB , we rely on the estimate from τbB as in (1.5), as discussed in Section 3. For a chosen parameter C6  √ +/2 1/2 1/2 1/2 Doracle , we use τbB + C6 rm,m to replace τB := τB + Doracle / m and set r log m 0 2 1/2 1/2 µ  C0 D0 K (b τB + Doracle rm,m ) n b ∗ in view of Corollary 14, where an improved error bound over γ b − Γβ is stated. ∞ Without knowing Doracle , we could replace it with an upper bound; for example, asq n 2 suming that Doracle  kAk2 + kBk2 = O log m , we could set µ 1/2 C0 D00 K 2 (b τB r −1/4 + O(m )) log m . n The sparsity parameter. Roughly speaking, for the Conic programming estimator (1.8), one can think of d0 as being bounded:  r  n ^ n −1/2 d0 = O τB− where τB−  τB (4.17) log m log(m/d0 ) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 28 That is, when τB decreases, we allow larger values of d0 ; however, when τB → 0, the sparsity level of d = O (n/ log(m/d)) starts to dominate, which enables the Conic programming estimator to achieve results similar to the Dantzig Selector when the design matrix X0 is a subgaussian random matrix satisfying the Restricted Eigenvalue conditions; See for example [6, 4, 38]. In particular, when τB → 0, Theorem 7 allows us to recover a rate close to that of the Dantzig selector with an exact recovery if τB = 0 is known a priori; see Section 16. Moreover the constraint (3.8) on the sparsity parameter d0 appearing in Theorem 4 can now be relaxed as in (4.8). In summary, our results in Theorem 7 are stronger than those in [3] (cf. Corollary 1) as their rates as stated therein are at the same order as ours in Theorem 4. We illustrate this dependency on τB in Section 8 with numerical examples, where we clearly show an advantage by taking the noise level into consideration when choosing the penalty parameters for both the Lasso and the Conic programming estimators. 5. Optimization error on the gradient descent algorithm We now present our computational convergence bounds. First we present Lemma 8 regarding the RSC and RSM conditions on the loss function (1.7). Lemma 8 follows from Lemma 15 immediately. Lemma 8. Suppose all conditions as stated in Theorem 3 hold. Suppose event A0 holds. Then (2.8) and (2.9) hold with α` = 85 λmin (A), αu = 11 8 λmax (A) and τ` (Ln ) = τu (Ln ) = τ0 log m , n where τ0  400C 2 $(s0 + 1)2 . λmin (A) (5.1) Theorem 9. Suppose all conditions in Theorem 6 hold and let ψ be defined therein. Let g(β) = λ1 ρλ (β) where ρλ (β) = λ kβk1 . Consider the optimization program (1.10) for a radius R such that β ∗ is feasible and a regularization parameter chosen such that ! r   16Rξ _ log m λ ≥ 12ψ . (5.2) 1−κ n Suppose that the step size parameter ζ ≥ αu  23 λmax (A). Suppose that the sparsity parameter and sample size further satisfy the following relationship:   n λmin (A)2 ^ (α` )2 ¯ d < =: d. (5.3) 512τ0 log m 12λmax (A) 5ζ Then on event A0 ∩ B0 , the conclusions in Theorem 2 hold, where      c3 n Vm log m 4c2 n P (A0 ∩ B0 ) ≥ 1−4 exp − 2 log −2 exp − 2 4 −22/m3 . MA log m n MA K imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 29 Rudelson and Zhou/Errors-in-variables Corollary 10. Suppose all conditions as stated in Theorem 9 hold and event A0 ∩ B0 defined therein holds. Consider for some constant M ≤ 400τ0 and δ̄ 2 as defined in Theorem 2, cε2stat d log m =: δ̄ 2 and δ 2 ≤ M δ̄ 2 ≤ 400τ0 δ̄ 2 . 1−κ n √ Then for all t ≥ T ∗ (δ) as in (2.17) and R = Ω(b0 d),  2 2  2 3 2 α` 2 δ εstat ≤ β t − βb . δ + εstat + O α` 4 b20 2 δ2  Finally, suppose we fix for M+ = R p ¯0 db (5.4) 32C$(s0 +1) λmin (A) , 20M+ b0 p r 6κ(A) n , log m in view of the upper bound d¯ (5.3). Then for all t ≥ T ∗ (δ) as in (2.17), β t − βb 2 ≤ 2 3 2 α` 2 2 δ4 δ + εstat + . 2 α` 4 α` b0 kAk2 (5.5) We prove Theorem 9 and Corollary 10 in Section 14. 5.1. Discussions Throughout this section, we assume ψ (4.2) is as defined in√Theorem 6. Assume that ζ ≥ αu ≥ ᾱ` . In addition, suppose that the radius R  b0 d as we set in (1.7). Let d¯0 ≤ 160M n2 log m be as defined in (4.3), where recall that we require the following + condition on d: d ≤ CA {c0 Cφ ∧ 8} Cφ = n 1 =: d¯0 , where CA = 2, log m 160M+ kBk2 + amax 2 Dφ and b20 ≥ kβ ∗ k2 ≥ φb20 . $(s0 + 1)2 Then by the proof of Lemma 18, r r p 5s0 log m ψ log m ¯ ψ =: , b0 d 0 ≤ 3α n τ n where τ= 3α . 5s0 (5.6) In contrast, under (5.3), the following upper bound holds on d, which is slightly more restrictive in the sense that the maximum level of sparsity allowed on β ∗ has decreased imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 30 Rudelson and Zhou/Errors-in-variables by a factor proportional to κ(A) compared to the upper bound d¯0 (4.3) in Theorem 6; ¯ where for CA = 1 2 , Now we require that |supp(β ∗ )| ≤ d, 160M + 2 nλmin (A) 1 1024C 2 $(s0 + 1)2 log m 2400κ(A)   n λmin (A) 1 ≈ CA  d¯0 . log m 15λmax (A) κ(A) d¯  (5.7) To consider the general cases as stated in Theorem 6, we consider the ideal case when we set 11 λmax (A) ζ = αu = 8 such that 59 5 ζ ≈ αu /( α` )  κ(A), where α` = λmin (A). ᾱ` 60 8 Following the derivation in Remark 14.1, we have 80ζ ξ ≤ 6τ (Ln ) + τ (Ln ) ≈ 200κ(A)τ (Ln ). 1−κ ᾱ` Combining (5.6) and (5.8), it is clear that one can set ! r log m λ = Ω κ(A)ψ n in order to satisfy the condition (5.2) on λ in Theorem 2 when we set ! r p log m ψ R  b0 d¯0 = O τ n ! r log m and hence Rτ κ(A) = O κ(A)ψ . n (5.8) (5.9) (5.10) This choice is potentially too conservative because we are setting R in (5.10) with respect to the upper sparsity level d¯0 chosen to guarantee statistical convergence, leading to a larger than necessary penalty parameter as in (5.9). Similarly, when we choose step size parameter ζ to be too large, we need to increase  the penalty parameter λ Rξ correspondingly given the following lower bound: λ = Ω 1−κ where !! ᾱ` Rξ 5 4ζ + 2% = R 2τ (Ln ) ᾱ` + ᾱ` 1−κ 4ζ − 2% 4ζ − 2% ≥ 40Rτ (Ln ) ζ + 2Rτ (Ln )  Rτ (Ln )κ(A). ᾱ` Suppose we set ζ = 23 λmax (A) and ᾱζ` ≈ 3κ(A) as in Theorem 9. It turns out that the less conservative choice of λ as in (5.11) r  p _  log m λ  b0 κ(A)$(s0 ) ψ (5.11) n imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 31 is sufficient, for example when τB = Ω(1), for which we now set r √ b0 1 n p R  b0 d  20M+ 6κ(A) log m as in Corollary 10. We will discuss the two scenarios as considered in Section 4. See the detailed discussions in Section 14. 6. Proof of theorems b ∗ . b − Γβ In Section 6.1, we develop in Theorem 12 the crucial large deviation bound on γ This entity appears in the constraint set in the Conic programming estimator (1.8), and is directly related to the choice of λ for the corrected Lasso estimator in view of Theorem 16. Its corollaries are stated in Corollary 13 and Corollary 14. In section 6.2, we provide an outline and additional Lemmas 15 and 17 to prove Theorem 3. The full proof of Theorem 3 appears in Section 10. In Section 6.3, we give an outline illustrating the improvement for the Lasso error bounds as stated in Theorem 6. We emphasize the impact of this improvement over sparsity parameter d, which we restate in Lemma 18. In Section 6.4, we provide an outline as well as technical results for Theorem 4. In Section 6.5, we give an outline illuminating the improvement in error bounds for the Conic programming estimator as stated in Theorem 7. 6.1. Stochastic error terms In this section, we first develop stochastic error bounds in Lemma 11, where we also define some events B4 , B5 , B10 . Recall that B6 was defined in Lemma 5. Putting the bounds in Lemma 11 together with that in Lemma 5 yields Theorem 12. 2 2 Lemma 11. Assume that the stable rank of B, kBkF / kBk2 ≥ log m. Let Z, X0 and T W as defined in Theorem 3. Let Z0 , Z1 and Z2 be independent copies of Z. Let q ∼ Y M /K where Y := eT1 Z0T . Denote by B4 the event such that for ρn := C0 K and 1 1 n A 2 Z1T  1 n Z2T B 2  ∞ 1 ∞ log m n , ≤ ρn M a1/2 max √ tr(B) ≤ ρn M τB where τB = . n Then P (B4 ) ≥ 1 − 4/m3 . Moreover, denote by B5 the event such that 1 n (Z T BZ − tr(B)Im )β ∗ ∞ ≤ X0T W β ∗ ∞ ≤ and 1 n kBk ρn K kβ ∗ k2 √ F n √ ∗ ρn K kβ k2 τB a1/2 max . Then P (B5 ) ≥ 1 − 4/m3 . imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 32 Finally, denote by B10 the event such that 1 n (Z T BZ − tr(B)Im ) and 1 n X0T W max ≤ max ≤ kBk ρn K √ F n √ ρn K τB a1/2 max . Then P (B10 ) ≥ 1 − 4/m2 . We prove Lemma 11 in Section C.2. Denote by B0 := B4 ∩ B5 ∩ B6 , which we use throughout this paper. q Theorem 12. Suppose (A1) holds. Let ρn = C0 K lognm . Suppose that 2 2 kBkF / kBk2 ≥ log m where m ≥ 16. √ √ b and γ b be as in (1.6). Let D0 = τB + amax and D00 be as defined in (2.23). Let Γ kAkF kBkF Let D1 = √m + √n . On event B0 , for which P (B0 ) ≥ 1 − 16/m3 ,   2D1 K ∗ 1/2 ∗ 0 ∗ b γ b − Γβ ≤ D0 KτB kβ k2 + √ kβ k∞ + D0 M ρn . (6.1) m ∞ We next state the first Corollary 13 of Theorem 12, which we use in proving Theob ∗ rems 3 and 4. Here we state a somewhat simplified bound on γ b − Γβ for the sake ∞ of reducing the number of unknown parameters involved with a slight worsening of the statistical error bounds when τB  1. On the other hand, the bound in (6.1) provides a significant improvement over the error bound in Corollary 13 in case τB = o(1). b and γ Corollary 13. Suppose all conditions in Theorem 12 hold. Let Γ b be as in (1.6). On event B0 , we have for D2 = 2(kAk2 + kBk2 ) and some absolute constant C0 r log m ∗ b , where ψ = C0 D2 K (K kβ ∗ k2 + M ) γ b − Γβ ≤ψ n ∞ is as defined in Theorem 3. In particular, Corollary 13 ensures that for the corrected Lasso estimator, (6.7) holds with high probability for λ chosen as in (3.6). We prove Corollary 13 in Section D. p √ 1/2 1/2 What happens when τB → 0? Recall D0 = τB + amax and D00 := kBk2 + amax . When τB → 0, we have by Theorem 12  r  log m 1 ∗ ∗ b γ b − Γβ = O D1 K √ kβ k∞ + D0 KM K n m ∞ 1/2 kAk kBk 1/2 where D0 → amax and D1 = √mF + √nF → kAk2 under (A1), given that √ 1/2 1/2 kBkF / n ≤ τB kBk2 → 0. In this case, the error term involving kβ ∗ k2 in (4.2) vanishes, and we only need to set (cf. Theorem 16) r log m 1/2 2 ∗ 1/2 , (6.2) λ ≥ 2ψ for ψ  a1/2 max KM + kAk2 K kβ k∞ /m n imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 33 Rudelson and Zhou/Errors-in-variables where the second term in ψ defined immediately above comes from the estimation error in Lemma 5; this term vanishes if we were to assume that (1) tr(B) is also qknown or 1/2 (2) kβ ∗ k∞ = o(M m1/2 /K). For both cases, by setting λ  4amax KM can recover the regular Lasso rate of βb − β ∗ q = Op (λd1/q ), log m n , we for q = 1, 2, when the design matrix X is almost free of measurement errors. Finally, we state a second Corollary 14 of Theorem 12. Corollary 14 is essentially a restatement of the bound in (6.1). Corollary 14. Suppose all conditions in Theorem 12 hold. Let D0 , D00 , Doracle , and +/2 1/2 oracle τB := τB + D√ be as defined in (2.23) and (4.1). On event B0 , m r b ∗ γ b − Γβ ≤ ψ ∞ log m , n where   +/2 ψ := C0 K D00 τB K kβ ∗ k2 + D0 M . (6.3) Then P (B0 ) ≥ 1 − 16/m3 . We mention in passing that Corollaries 13 and 14 are crucial in proving Theorems 3, 4, 6 and 7. 6.2. Outline for proof of Theorem 3 In this section, we state Theorem 16, and two Lemmas 15 and 17. Theorem 3 follows from Theorem 16 in view of Corollary 13, Lemmas 15 and 17. In more details, Lemma 15 checks the Lower and the Upper RE conditions on the modified gram matrix, b A := Γ 1 T n (X X b − tr(B)I m ), (6.4) while Lemma 17 checks condition (6.6) as stated in Theorem 16 for curvature α and tolerance τ regarding the lower RE condition as derived in Lemma 15. First, we replace (A3) with (A3’) which reveals some additional information regarding the constant hidden inside the O(·) notation. (A3’) Suppose (A3) holds; moreover, mn ≥ 4096C02 D22 K 4 log m/λ2min (A) for D2 = 2(kAk2 + kBk2 ), or equivalently, r λmin (A) log m > CK for some large enough contant CK . kAk2 + kBk2 mn Lemma 15. (Lower and Upper-RE conditions) Suppose (A1), (A2) and (A3’) hold. Denote by V := 3eMA3 /2, where MA is as defined in (2.7). Let s0 ≥ 32 be as defined imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 34 Rudelson and Zhou/Errors-in-variables b as in (2.6). Recall that we denote by A0 the event that the modified gram matrix Γ defined in (1.6) satisfies the Lower as well as Upper RE conditions with curvature and tolerance 11 5 λmin (A), smoothness α e= λmax (A) 8 8 384C 2 $(s0 )2 log m λmin (A) − α 396C 2 $2 (s0 + 1) log m ≤ τ := ≤ λmin (A) n s0 λmin (A) n α= for α, α e and τ as defined in Definitions 2.2 and 2.3, and C, s0 , $(s0 ) in (2.6). Suppose that for some c0 > 0 and c0 K 4 < 1,   3em s0 1 tr(B) ≥ c0 K 4 2 log where ε = . (6.5) kBk2 ε s0 ε 2MA      Vm log m 4c2 n n log − 2 exp − − 6/m3 . Then P (A0 ) ≥ 1 − 4 exp − M 2c3log n m M 2 K4 A A The main focus of the current section is then to apply Theorem 16 to show Theorem 3. Theorem 16 follows from Theorem 1 by [30]. b Theorem 16. Consider the regression model in (1.1a) and (1.1b). Let d ≤ n/2. Let γ b, Γ b be as constructed in (1.6). Suppose that the matrix Γ satisfies the Lower-RE condition with curvature α > 0 and tolerance τ > 0,   √ α λ √ , , (6.6) dτ ≤ min 32 d 4b0 where d, b0 and λ are as defined in (1.7). Then for any d-sparse vectors β ∗ ∈ Rm , such that kβ ∗ k2 ≤ b0 and b ∗ γ b − Γβ ∞ ≤ 1 λ, 2 (6.7) the following bounds hold: βb − β ∗ ≤ 2 20 √ λ d and α βb − β ∗ ≤ 1 80 λd, α (6.8) where βb is an optimal solution to the corrected Lasso estimator as in (1.7). We include the proof of Theorem 16 for the sake of self-containment and defer it to Section G for clarity of presentation. Lemma 17. Let c0 , φ, b0 , M , M+ and K be as defined in Theorem 3, where we assume 2 that b20 ≥ kβ ∗ k2 ≥ φb20 for some 0 < φ ≤ 1. Suppose all conditions in Lemma 15 hold. Suppose that s0 ≥ 32 and n 1 d := |supp(β ∗ )| ≤ CA {c0 Dφ ∧ 2} where CA := 2 (6.9) log m 40M+   M2 and Dφ = K 4 + φ ≥ K 4 φ ≥ φ. K 2 b20 imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 35 Rudelson and Zhou/Errors-in-variables Then the following condition holds  2 α ^ 1 log m ψ , d≤ 32τ τ2 n b0 (6.10) where ψ = C0 D2 K(K kβ ∗ k2 + M ) is as defined in (3.6), α = 5λmin (A)/8, and τ is as defined in Lemma 15. We prove Lemmas 15 and 17 in Sections F and H.1 respectively. Lemma 15 follows immediately from Corollary 25. We prove Lemmas 15 and Corollary 25 in Sections F and L respectively. Remark 6.1. Clearly for d, b0 , φ as bounded in Theorem 3, we have by assumption (3.3) the following upper and lower bound on Dφ :   2 2 M K 4 4 + K φ ≥ K 4 φ. 2K φ ≥ Dφ := b20 In this regime, the conditions on d as in (6.9) can be conveniently expressed as that in (3.4) instead. 6.3. Improved bounds for the corrected Lasso estimator The proof of Theorem 6 follows exactly the same line of arguments as in Theorem 3, b ∗ except that we now use the improved bound on the error term γ b − Γβ given ∞ in Corollary 14, instead of that in Corollary 13. Moreover, we replace Lemma 17 with Lemma 18, the proof of which follows from Lemma 17 with d now being bounded as in (4.3) and ψ being redefined as in (6.3). The proof of Lemma 18 appears in Section H.2. See Section 12 for the proof of Theorem 6. Lemma 18. Let c0 , φ, b0 , M , M+ and K be as defined in Theorem 3. Suppose all conditions in Lemma 15 hold. Suppose that (4.3) holds: 1 n {c0 c00 Dφ ∧ 8} , where CA := 2 , (6.11) log m 160M+  2 D00 K 2 M2 ≤ and Dφ = + τB+ K 4 φ. $(s0 + 1) b20 d := |supp(β ∗ )| ≤ CA c00 := kBk2 + amax $(s0 + 1)2 Then (6.10) holds with ψ as defined in Theorem 6 and α = 58 λmin (A). 6.4. Outline for proof of Theorem 4 We provide an outline and state the technical lemmas needed for proving Theorem 4. Our first goal is to show that the following holds with high probability, b ∗ γ b − Γβ ∞ = 1 T n X (y ∗ b − Xβ ∗ ) + n1 tr(B)β ∞ ≤ µ kβ ∗ k2 + ω, imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 36 where µ, ω are chosen as in (6.12). This forms the basis for proving the `q convergence, where q ∈ [1, 2], for the Conic programming estimator (1.8). This follows immediately from Theorem 12 and Corollary 13. More explicitly, we will state it in Lemma 19. √ √ Lemma 19. Let D0 = τB + amax and D2 = 2(kAk2 + kBk2 ) be as in Theorem 4. Suppose all conditions in Theorem 12 hold. Then on event B0 as defined therein, the pair (β, t) = (β ∗ , kβ ∗ k2 ) belongs to the feasible set of the minimization problem (1.8) with r log m . (6.12) µ  2D2 Kρn and ω  D0 M ρn , where ρn := C0 K n Before we proceed, we first need to introduce some notation and definitions. Let X0 = Z1 A1/2 be defined as in (1.4). Let k0 = 1 + λ. First we need to define the `q -sensitivity parameter for Ψ := n1 X0T X0 following [3]: κq (d0 , k0 ) = ConeJ (k0 ) = kΨ∆k∞ , where k∆kq (6.13) {x ∈ Rm | s.t. kxJ c k1 ≤ k0 kxJ k1 } . (6.14) min min J:|J|≤d0 ∆∈ConeJ (k0 ) bb See also [21]. Let (β, t) be the optimal solution to (1.8) and denote by v = βb − β ∗ . We will state the following auxiliary lemmas, the first of which is deterministic in nature. The two lemmas reflect the two geometrical constraints on the optimal solution to (1.8). The optimal solution βb satisfies: 1. The vector v obeys the following cone constraint: kvS c k1 ≤ k0 kvS k1 , and b t≤ 1 ∗ λ kvk1 + kβ k2 . 2. kΨvk∞ is upper bounded by a quantity at the order of O (µ(kβ ∗ k2 + kvk1 ) + ω). Lemma 20. Let µ, ω > 0 be set. Suppose that the pair (β, t) = (β ∗ , kβ ∗ k2 ) belongs bb to the feasible set of the minimization problem (1.8), for which (β, t) is an optimal ∗ b solution. Denote by v = β − β . Then kvS c k1 ≤ 1 (1 + λ) kvS k1 and b t ≤ kvk1 + kβ ∗ k2 . λ Lemma 21. On event B0 ∩ B10 , kΨvk∞ ≤ µ1 kβ ∗ k2 + µ2 kvk1 + ω 0 , where µ1 = 2µ, µ2 = µ( λ1 + 1) and ω 0 = 2ω for µ, ω as defined in (6.12). Now combining Lemma 6 of [3] and an earlier result of the two authors (cf. Theorem 27 [38]), we can show that the RE(2d0 , 3(1 + λ), A1/2 ) condition and the sample requirement as in (4.9) are enough to ensure that the `q -sensitivity parameter satisfies the following lower bound for all 1 ≤ q ≤ 2: for some contant c, κq (d0 , k0 ) ≥ −1/q cd0 , imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 37 Rudelson and Zhou/Errors-in-variables which ensures that for v = βb − β ∗ and Ψ = kΨvk∞ 1 T n X0 X0 , −1/q ≥ κq (d0 , k0 )kvkq ≥ cd0 kvkq . (6.15) Combining (6.15) with Lemmas 19, 20 and 21 gives us both the lower and upper bounds on kΨvk∞ , with the lower bound being κq (d0 , k0 ) kvkq and the upper bound as specified in Lemma 21. Following some algebraic manipulation, this yields the bound on the kvkq for all 1 ≤ q ≤ 2. We prove Theorem 4 in Section 11 and Lemmas 19, 20 and 21 in Section I. The proof of Lemma 20 follows the same line of arguments in [3] in view of Lemma 19. 6.5. Improved bounds for the DS-type estimator Lemma 22 follows directly from Corollary 14. √ √ Lemma 22. Suppose all conditions in Corollary 14 hold. Let D0 = τB + amax  1 under (A1). Then on event B0 , the pair (β, t) = (β ∗ , kβ ∗ k2 ) belongs to the feasible set Υ of the minimization problem (1.8) with +/2 µ ≥ D00 τB Kρn and ω ≥ D0 M ρn , +/2 where τB 1/2 := τB + D√ oracle m is as defined in (4.1). 1/2 Lemma 23. On event B6 andq (A1), the choice of τeB where recall rm,m = 2C0 K 2 +/2 τB τeB (6.16) log m mn , 1/2 1/2 := τbB + C6 rm,m as in (4.11), satisfies for m ≥ 16 and C0 ≥ 1, 3 1/2 †/2 1/2 ≤ τB + C6 rm,m =: τB , 2 1/2 ≤ 2τB + 3C62 rm,m  τB‡ , and moreover τeB τB− ≤ 1. 1/2 ≤ τeB (6.17) (6.18) We next state an updated result in Lemma 24. Lemma 24. On event B0 ∩ B10 , the solution βb to (1.8) with µ, ω as in (4.11) satisfies for v := βb − β ∗ 1 T n X0 X0 v ∞ where µ1 = 2µ, µ2 = 2µ(1 + ≤ µ1 kβ ∗ k2 + µ2 kvk1 + ω 0 , 1 2λ ) and ω 0 = 2ω. 7. Lower and Upper RE conditions The goal of this section is to show that for ∆ defined in (7.4), the presumption in Lemmas 37 and 39 as restated in (7.1) holds with high probability (cf Theorem 26). We first state a deterministic result showing that the Lower and Upper RE conditions b A under condition (7.1) in Corollary 25. This allows us to prove Lemma 15 in hold for Γ Section F. See Sections K and L, where we show that Corollary 25 follows immediately from the geometric analysis result as stated in Lemma 39. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 38 Rudelson and Zhou/Errors-in-variables Corollary 25. Let 1/8 > δ > 0. Let 1 ≤ k < m/2. Let Am×m be a symmetric b A be an m × m symmetric matrix and positive semidefinite covariance matrice. Let Γ b ∆ = ΓA − A. Let E = ∪|J|≤k EJ , where EJ = span{ej : j ∈ J}. Suppose that ∀u, v ∈ E ∩ S m−1 uT ∆v ≤ δ ≤ 3 λmin (A). 32 (7.1) Then the Lower and Upper RE conditions hold: for all υ ∈ Rm , and bA υ υT Γ ≥ bA υ υT Γ ≤ 3λmin (A) 5 2 2 λmin (A) kυk2 − kυk1 8 8k 11 3λmin (A) 2 2 λmax (A) kυk2 + kυk1 . 8 8k (7.2) (7.3) Theorem 26. Let Am×m , Bn×n be symmetric positive definite covariance matrices. Let E = ∪|J|≤k EJ for 1 ≤ k < m/2. Let Z, X be n × m random matrices defined as in Theorem 3. Let τbB be defined as in (1.5). Let b A − A := ∆ := Γ 1 T nX X − τbB Im − A. (7.4) Suppose that for some absolute constant c0 > 0 and 0 < ε ≤ C1 ,    _ 3em tr(B) 0 4 k ≥ c K 2 log log m, (7.5) kBk2 ε kε √ where C = C0 / c0 for C0 as chosen to satisfy (H.6).    Then with probability at least 1 − 4 exp −c2 ε2 Ktr(B) − 2 exp −c2 ε2 Kn4 − 6/m3 4 kBk 2 for c2 ≥ 2, we have for all u, v ∈ E ∩ S m−1 , r T u ∆v ≤ 8C$(k)ε + 4C0 D1 K where $(k) = τB + ρmax (k, A), and D1 ≤ kAkF √ m 2 + log m , mn kBkF √ n , We prove Theorem 26 in Section M. 8. Numerical results In this section, we present results from numerical simulations designed to validate the theoretical predictions as presented in previous sections. We implemented the composite gradient descent algorithm as described in [1, 30, 31] for solving the corrected Lasso b γ objective function (1.7) with (Γ, b) as defined in (1.6). For the Conic programming estimator, we use the implementation provided by the authors [3] with the same input b γ (Γ, b) (1.6). Throughout our experiments, A is a correlation matrix with amax = 1. We √ 1/2 set the following as our default parameters: D00 = kBk2 + 1, D0 = τB + 1 and imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 39 √ R = kβ ∗ k2 d, where d is the sparsity parameter, the number of non-zero entries in β ∗ . In one set of simulations, we also vary R. In our simulations, we look at three different models from which A and B will be chosen. Let Ω = A−1 = (ωij ) and Π = B −1 = (πij ). Let E denote edges in Ω, and F denote edges in Π. We choose A from one of these two models: • AR(1) model. In this model, the covariance matrix is of the form A = {ρ|i−j| }i,j . The graph corresponding to the precision matrix A−1 is a chain. • Star-Block model. In this model the covariance matrix is block-diagonal with equal-sized blocks whose inverses correspond to star structured graphs, where Aii = 1, for all i. We have 32 subgraphs, where in each subgraph, 16 nodes are connected to a central hub node with no other connections. The rest of the nodes in the graph are singletons. The covariance matrix for each block S in A is generated by setting Sij = ρA if (i, j) ∈ E, and Sij = ρ2A otherwise. We choose B from one of the following models. Recall that τB = tr(B)/n. • For B and B ∗ = B/τB = ρ(B), we consider the AR(1) model with two parameters. First we choose the AR(1) parameter ρB ∗ ∈ {0.3, 0.7} for the correlation matrix B ∗ . We then set B = τB B ∗ , where τB ∈ {0.3, 0.7, 0.9} depending on the experimental setup. • We also consider a second model based on Π = B −1 , where we use the random concentration matrix model in [57]. The graph is generated according to a type of Erdős–Rényi random graph model. Initially, we set Π = cIn×n , and c is a constant. Then we randomly select n log n edges and update Π as follows: for each new edge (i, j), a weight w > 0 is chosen uniformly at random from [wmin , wmax ] where wmax > wmin > 0; we subtract w from πij and πji , and increase πii and πjj by w. This keeps Π positive definite. We then rescale B to have a certain desired trace parameter τB . For a given β ∗ , we first generate matrices A and B, where A is m × m and B is n × n. For the given covariance matrices A and B, we repeat the following steps to estimate β ∗ in the errors-in-variables model as in (1.1a) and (1.1b), 1. We first generate random matrices X0 ∼ Nf,m (0, A ⊗ I) and W ∼ Nf,m (0, I ⊗ B) independently from the matrix variate normal distribution as follows. Let Z ∈ Rn×m be a Gaussian random ensemble with independent entries Zij satisfying 2 EZij = 0, EZij = 1. Let Z1 , Z2 be independent copies of Z. Let X0 = Z1 A1/2 and W = B 1/2 Z2 , where A1/2 and B 1/2 are the unique square root of the positive definite matrix A and B = τB B ∗ respectively. 2. We then generate X = X0 + W and y = X0 β ∗ + , where i i.i.d. ∼ N (0, 1). b according to (1.5) and (1.6) using X, y, where by (1.5), We compute τbB , γ b and Γ  2 1 b = mn kXkF − ntr(A) + . τbB := n1 tr(B) 3. Finally, we feed X and y to the Composite Gradient Descent algorithm as described in [1, 30] to solve the Lasso program (1.7) to recover β ∗ , where we set imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 40 Rudelson and Zhou/Errors-in-variables b the estithe step size parameter to be ζ. The output of this step is denoted by β, ∗ ∗ ∗ b b mated β . We then compute the relative error of β: kβ − β k/kβ k, where k·k denotes either the `1 or the `2 norm. The final relative error is the average of 100 runs for each set of tuning and step-size parameters; for the Conic programming estimator, we solve (1.8) instead of (1.7) to recover β ∗ . 8.1. Relative error In the first experiment, A and B are generated using the AR(1) model with parameters ρA , ρB ∗ ∈ {0.3, 0.7} and trace parameter τB ∈ {0.3, 0.7, 0.9}. We see in Figures 1 and 2 that a larger sample size is required when ρA , ρB ∗ or τB increases. To explain these results, we first recall the following definition of the Signal-to-noise ratio, where we take K = Mε  1 2 S/M kβ ∗ k2  2 τB kβ ∗ k2 + 2 kβ ∗ k2 and S := 1 = 1 2 τB + (1/ kβ ∗ k2 ) , where 2 M := 1 + τB kβ ∗ k2 , 2 which clearly increases as kβ ∗ k2 increases or as the measurement error metric τB decreases. We keep kβ ∗ k2 = 5 throughout our simulations. The corrected Lasso recovery problem thus becomes more difficult as τB increases. Indeed, we observe that a larger sample size n is needed when τB increases from 0.3 to 0.9 in order to control the relative `2 error to stay at the same level. Moreover, in view of Theorem 6, we can express the relative error as follows: for α  λmin (A) and K  1, βb − β ∗ kβ ∗ k2 1/2 2 = OP (kBk2 + 1) λmin (A) r M S r d log m n ! . Note that when kβ ∗ k2 is large enough and τB = Ω(1), the factor preceding on the RHS of (8.1) is proportional to √ 1/2 (kBk2 +1) τB λmin (A) (8.1) q d log m n . When we plot the relative `2 error kβb − β ∗ k2 /kβ ∗ k2 versus the rescaled sample size n d log m under the same S/M ratio, the two sets of curves corresponding to ρA = 0.3 and ρA = 0.7 indeed line up in Figure 1(b), as predicted by (8.1). We observe in Figure 1(b), the rescaled curves overlap well for different values of (m, d) for each ρA when we keep (ρB ∗ , τB ) and the length kβ ∗ k2 = 5 invariant. Moreover, the upper bound on the relative `2 error (8.1) characterizes the relative positions of these two sets of curves in that the ratio between the `2 error corresponding to ρA = 0.7 and that for ρA = 0.3 along the y-axis roughly falls within the interval (2, 3) for each n, while λmin (AR(1), 0.3)/λmin (AR(1), 0.7) = 3. These results are consistent with the theoretical predictions in Theorems 3 and 6. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 41 Rudelson and Zhou/Errors-in-variables 0.8 ρB*=0.3 τB=0.3 0.8 ρB*=0.3 τB=0.3 0.5 0.6 0.7 ρA=0.3 m = 256 ρA=0.3 m = 512 ρA=0.3 m = 1024 ρA=0.7 m = 256 ρA=0.7 m = 512 ρA=0.7 m = 1024 0.1 0.2 0.3 0.4 relative l2 error 0.5 0.4 0.1 0.2 0.3 relative l2 error 0.6 0.7 ρA=0.3 m = 256 ρA=0.3 m = 512 ρA=0.3 m = 1024 ρA=0.7 m = 256 ρA=0.7 m = 512 ρA=0.7 m = 1024 500 1000 1500 2000 2500 2 4 n 6 (a) 0.8 0.6 relative l2 error 0.2 0.4 0.2 τB=0.3 m = 256 τB=0.3 m = 512 τB=0.3 m = 1024 τB=0.7 m = 256 τB=0.7 m = 512 τB=0.7 m = 1024 τB=0.9 m = 256 τB=0.9 m = 512 τB=0.9 m = 1024 0.4 0.8 12 ρA=0.3 ρB* = 0.3 τB=0.3 m = 256 τB=0.3 m = 512 τB=0.3 m = 1024 τB=0.7 m = 256 τB=0.7 m = 512 τB=0.7 m = 1024 τB=0.9 m = 256 τB=0.9 m = 512 τB=0.9 m = 1024 0.6 10 (b) ρA=0.3 ρB* = 0.3 relative l2 error 8 n / d log(m) 500 1000 1500 n / d log(m) (c) 2000 2500 2 4 6 8 10 12 n / d log(m) (d) F IG 1. Plots of the relative `2 error after running composite gradient descent √ algorithm on recovering β ∗ using the corrected Lasso objective function with sparsity parameter d = b mc, where we vary m ∈ {256, 512, 1024}. We generate A and B using the AR(1) model with ρA , ρB ∗ ∈ {0.3, 0.7} and τB = {0.3, 0.7, 0.9}. In the left and right column, we plot the relative `2 error with respect to sample size n as well as the rescaled sample size n/(d log m). As n increases, we see that the statistical error decreases. In the top row, we vary the AR(1) parameter ρA ∈ {0.3, 0.7}, while holding (τB , ρ∗B ) and kβ ∗ k2 invariant. Plot (a) shows the relative `2 error versus n for m = 256, 512, 1024. In Plots (c) and (d), we vary the trace parameter τB ∈ {0.3, 0.7, 0.9}, while fixing the AR(1) parameters ρA , ρ∗B = 0.3. Plot (b) and (d) show the relative `2 error versus the rescaled sample size n/(d log m). The curves now align for different values of m in the rescaled plots, consistent with the theoretical prediction in Theorem 6. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 42 Rudelson and Zhou/Errors-in-variables 0.8 τB= 0.3 ρB*=0.3 ρB*=0.3 ρB*=0.3 ρB*=0.7 ρB*=0.7 ρB*=0.7 0.6 m=256 m=512 m=1024 m=256 m=512 m=1024 τB= 0.7 ρB*=0.3 ρB*=0.3 ρB*=0.3 ρB*=0.7 ρB*=0.7 ρB*=0.7 0.2 relative l2 error τB= 0.7 ρB*=0.3 ρB*=0.3 ρB*=0.3 ρB*=0.7 ρB*=0.7 ρB*=0.7 0.4 τB= 0.3 ρB*=0.3 ρB*=0.3 ρB*=0.3 ρB*=0.7 ρB*=0.7 ρB*=0.7 0.4 0.6 m=256 m=512 m=1024 m=256 m=512 m=1024 ρA = 0.3 0.2 relative l2 error 0.8 ρA = 0.3 500 1000 1500 n (a) 2000 2500 2 4 6 8 10 12 n / d log(m) (b) F IG 2. Plots of the relative `2 error after running composite gradient descent √ algorithm on recovering β ∗ using the corrected Lasso objective function with sparsity parameter d = b mc, where we vary m ∈ {256, 512, 1024}. We generate A and B using the AR(1) model with ρA = 0.3 and ρ∗B ∈ {0.3, 0.7}. We set B = τB B ∗ and vary the trace parameter τB ∈ {0.3, 0.7} for each value of ρB ∗ . The parameters 1/2 1/2 1/2 τB and ρ∗B affect the rate of convergence through D00 = kBk2 + amax and τB . Plot (b) shows the relative `2 error versus the rescaled sample size n/(d log m). We observe that as τB increases from 0.3 to 0.7, the two sets of curves corresponding to ρB ∗ = 0.3, 0.7 become visibly more separated. As n increases, all curves converge to 0. In Figure 1(c) and (d), we also show the effect of τB when τB is chosen from {0.3, 0.7, 0.9}, while fixing the AR(1) parameters ρA = 0.3 and ρB ∗ = 0.3. As predicted by our theory, as the measurement error magnitude τB increases, M increases, resulting in a larger relative `2 error for a fixed sample size n. While the effect of ρA as shown in (8.1) through the minimal eigenvalue of A is directly visible in Figure 1(b), the effect of ρB ∗ is more subtle, as it is modulated by τB as shown in Figure 2(a) and (b). When τB is fixed, our theory predicts that kBk2 plays a role in determining the `p error, p = 1, 2, through the penalty parameter λ in view 1/2 1/2 of (8.1). The effect of ρB ∗ , which goes into the parameter D00 = kBk2 +amax  1, is not changing the sample requirement or the rate of convergence as significantly as that of ρA when τB = 0.3. This is shown in the bottom set of curves in Figure 2(a) and (b). On the other hand, the trace parameter τB plays a dominating role in determining the sample size as well as the `p error for p = 1, 2, especially when the length of the signal β ∗ is large: kβ ∗ k2 = Ω(1). In particular, the separation between the two sets of curves in Figure 2(b), which correspond to the two choices of ρB ∗ , is clearly modulated by τB and becomes more visible when τB = 0.7. These findings are also consistent with our theoretical prediction that in order to guarantee statistical and computational convergence, the sample size needs to grow according to the following relationship to be specified in (8.2). We will show in the proof of Theorem 9 that the condition on sparsity d as stated in (5.3) implies that as ρA , or τB , imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 43 or the step size parameter ζ increases, we need to increase the sample size in order to guarantee computational convergence for the composite gradient descent algorithm given the following lower bound:      ζ λmax (A) _ , where (8.2) n = Ω dτ0 log m λmin (A)2 (ᾱ` )2 (ρmax (s0 , A) + τB )2 τ0  . λmin (A) We illustrate the effect of the penalty and step size parameters in Section 8.2. 8.2. Corrected Lasso via GD versus Conic programming estimator In the second experiment, both A and B are generated using the AR(1) model with parameters ρA = 0.3, ρB ∗ = 0.3, and τB ∈ {0.3, 0.7}. We set m = 1024, d = 10 and kβ ∗ k2 = 5. We then compare the performance of the corrected Lasso estimator (1.7) using the composite gradient descent algorithmic with the Conic programming estimator, which is a convex program designed and implemented by authors of [3]. We consider three choices for the step size parameter for the composite gradient descent algorithm: ζ1 = λmax (A) + 12 λmin (A), ζ2 = 32 λmax (A) and ζ3 = 2λmax (A). We observe that the gradient descent algorithm consistently produces an output such that its statistical error in `2 norm is lower than the best solution produced by the Conic programming estimator, √ when both methods are subject to optimal tuning after we fix upon the radius R = d kβ ∗ k2 for (1.10) and (ω, λ) in (1.8) as follows. As illustrated in our theory, one can think of the parameter λ in (1.7) and parameters µ, ω in (1.8) satisfying λ  µ kβ ∗ k2 + ω, q where we set ω = 0.1D0 lognm , where the factor 0.1 is chosen without loss of generality, as we will sweep over f ∈ (0, 0.8] to run through a sufficiently large range of values of the tuning parameters: q 1/2 • For the corrected Lasso estimator, we set λ = f D00 τbB kβ ∗ k2 lognm + ω; q 1/2 log m • For the Conic programming estimator, we use µ = f D00 τbB n . We set λ = 1 in (1.8), which is independent of the Lasso penalty. The factor f is chosen to reflect the fact that in practice, we do not know the exact value of kβ ∗ k2 or kβ ∗ k1 , D0 or D00 , or other parameters related to the spectrum properties of A, B; moreover, in practice, we wish to understand the whole-path behavior for both estimators. In Figures 3 and 4, we plot the relative error in `1 and `2 norm as n increases from 100 to 2500, while sweeping over penalty factor f ∈ [0.05, 0.8] for τB = 0.3 and imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 44 τB = 0.7 respectively. For both estimators, the relative `2 and `1 error versus the scaled sample size n/(d log m) are also plotted. In these figures, green dashed lines are for the corrected Lasso estimator via gradient descent algorithm, and blue dotted lines are for the Conic programming estimator. These plots allow us to observe the behaviors of the two estimators across a set of tuning parameters. Overall, we see that both methods are able to achieve low relative error `p , p = 1, 2 norm when λ and µ are chosen from a suitable range. For the corrected Lasso estimator, we display results where the step size parameter ζ is set to ζ2 = 23 λmax (A) and ζ3 = 2λmax (A) in the left and right column respectively. We mention in passing that the algorithm starts to converge even when we set ζ = ζ1 = λmax (A) + 21 λmin (A) as we observe quantitively similar behavior as the displayed cases. For both estimators, we observe that we need a larger sample size n in case τB = 0.7 in order to control the error at the same level as in case τB = 0.3. In Figure 5, we plot the `2 and `1 error versus the penalty factor f ∈ [0.05, 0.8] for sample size n ∈ {300, 600, 1200}. We plot results for τB = 0.3 and τB = 0.7 in the left and right column respectively. For these plots, we focus on cases when n > dκ(A) log m, by choosing n ∈ {300, 600, 1200}; Otherwise, the gradient descent algorithm does not yet reach the sample requirement (8.2) that guarantees computational convergence. In Figure 5, we observe that the Conic programming estimator is relatively stable over the choices of µ once f ≥ 0.2. The composite gradient algorithm favors smaller penalties such as f ∈ [0.05, 0.2], leading to smaller relative error in the `1 and `2 norm, consistent with our theoretical predictions. These results also confirm our theoretical prediction that the Lasso and Conic programming penalty parameters λ and µ need to be adaptively chosen based on the noise level τB , because a larger than necessary amount of penalty will cause larger relative error in both `1 and `2 norm. 8.3. Sensitivity to tuning parameters ∗ ∗ ∗ In the third experiment, √ we change the `1 -ball radius R ∈ {R , 5R , 9R } in (1.10), ∗ ∗ where R = kβ k2 d, while running through different penalties for the composite gradient descent algorithm. In the left column in Figure 6, A and B are generated using the AR(1) model with ρA = 0.3, ρB ∗ = 0.3 and τB = 0.7. In the right column, we set τB = 0.3, while keeping other parameters invariant. As predicted by our theory, a larger radius demands correspondingly larger penalty to ensure consistent estimation using the composite gradient descent algorithm; this in q turn will increase the relative error when R is too large, for example, when R = e e notation hides parameters involving τB and κ(A). This is Ω( lognm ), where the Ω(·) observed in Figure 6. When n is sufficiently large relative to τB and κ(A), the optimal `1 and q `2 error become less sensitive with regard to the choice of R, so long as R = n e e O( log m ), where O(·) hides parameters involving τB and κ(A), as shown in Figure 6. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 45 Rudelson and Zhou/Errors-in-variables ρA = 0.3 ρB* = 0.3 τB = 0.3 ζ = ζ2 1.2 1.0 0.8 0.6 relative L2 error 0.2 0.2 4 6 8 10 12 2 4 6 8 10 n / d log(m) n / d log(m) ρA = 0.3 ρB* = 0.3 τB = 0.3 ζ = ζ2 ρA = 0.3 ρB* = 0.3 τB = 0.3 ζ = ζ3 12 0.4 0.6 0.8 1.0 1.2 f = 0.05 f = 0.10 f = 0.20 f = 0.30 f = 0.40 f = 0.50 f = 0.60 f = 0.80 0.2 0.2 0.4 0.6 0.8 1.0 1.2 f = 0.05 f = 0.10 f = 0.20 f = 0.30 f = 0.40 f = 0.50 f = 0.60 f = 0.80 relative L1 error 2 relative L1 error f = 0.05 f = 0.10 f = 0.20 f = 0.30 f = 0.40 f = 0.50 f = 0.60 f = 0.80 0.4 0.6 0.8 1.0 1.2 f = 0.05 f = 0.10 f = 0.20 f = 0.30 f = 0.40 f = 0.50 f = 0.60 f = 0.80 0.4 relative L2 error ρA = 0.3 ρB* = 0.3 τB = 0.3 ζ = ζ3 2 4 6 8 n / d log(m) 10 12 2 4 6 8 10 12 n / d log(m) F IG 3. Plots of the relative `1 and `2 error βb − β ∗ / kβ ∗ k for the Conic programming estimator and the corrected Lasso estimator obtained via running the composite gradient descent algorithm on (approximately) recovering β ∗ . Set parameters d = 10 and m = 1024 while varying n. Generate A and B using the AR(1) model with parameters ρA = 0.3, ρB ∗ = 0.3 and τB = 0.3. Set ζ ∈ {ζ1 , ζ2 , ζ3 }. We compare the performance of the corrected Lasso and the Conic programming estimators over choices of λ and µ while sweeping through f ∈ (0, 0.8]. In the top row, we plot the relative `2 error for the Conic programming estimator (blue dotted lines) and the corrected Lasso (green dashed lines) via the composite gradient descent algorithm with step size parameter set to be ζ2 = 32 λmax (A) and ζ3 = 2λmax (A); in the bottom row, we plot the relative `1 error under the same settings. We note that the composite gradient descent algorithm starts to converge even when we set the step size parameter to be ζ1 = λmax (A) + 21 λmin (A). imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 46 Rudelson and Zhou/Errors-in-variables 1.4 ρA = 0.3 ρB* = 0.3 τB = 0.7 ζ = ζ3 1.0 0.8 relative L2 error 0.4 0.2 4 6 8 10 12 2 4 6 8 10 n / d log(m) ρA = 0.3 ρB* = 0.3 τB = 0.7 ζ = ζ2 ρA = 0.3 ρB* = 0.3 τB = 0.7 ζ = ζ3 12 1.4 n / d log(m) f = 0.05 f = 0.10 f = 0.20 f = 0.30 f = 0.40 f = 0.50 f = 0.60 f = 0.80 1.0 0.8 relative L1 error 0.6 0.4 0.2 0.2 0.4 0.6 0.8 1.0 1.2 f = 0.05 f = 0.10 f = 0.20 f = 0.30 f = 0.40 f = 0.50 f = 0.60 f = 0.80 1.2 1.4 2 relative L1 error f = 0.05 f = 0.10 f = 0.20 f = 0.30 f = 0.40 f = 0.50 f = 0.60 f = 0.80 0.6 0.8 0.2 0.4 0.6 relative L2 error 1.0 1.2 f = 0.05 f = 0.10 f = 0.20 f = 0.30 f = 0.40 f = 0.50 f = 0.60 f = 0.80 1.2 1.4 ρA = 0.3 ρB* = 0.3 τB = 0.7 ζ = ζ2 2 4 6 8 n / d log(m) 10 12 2 4 6 8 10 12 n / d log(m) F IG 4. Plots of the relative `1 and `2 error βb − β ∗ / kβ ∗ k after running the Conic programming estimator and composite gradient descent algorithm on recovering β ∗ using the corrected Lasso objective function with sparsity parameter d = 10 and m = 1024 while varying n. Both A and B are generated using the AR(1) model with parameters ρA = 0.3, ρB ∗ = 0.3 and τB = 0.7. We compare the performance of the corrected Lasso (green dashed lines) and the Conic programming estimators (blue dotted lines) over choices of λ and µ while sweeping through f ∈ (0, 0.8]. For the composite gradient descent algorithm, we choose ζ from {ζ1 , ζ2 , ζ3 }. In the top row, we plot the `2 error for the Conic and the corrected Lasso with ζ2 = 23 λmax (A) and ζ3 = 2λmax (A), while in the bottom row, we plot the `1 error corresponding to the two step size parameters. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 47 Rudelson and Zhou/Errors-in-variables 0.8 0.6 0.7 0.4 0.6 0.4 0.3 0.8 0.0 0.2 0.4 0.6 f ρA = 0.3 ρB* = 0.3 τB = 0.3 n = 600 ρA = 0.3 ρB* = 0.3 τB = 0.7 n = 600 0.8 0.9 f 0.5 0.6 0.7 0.8 L2 GD L2 Conic L1 GD L1 Conic 0.3 0.2 0.1 0.2 0.4 0.4 0.5 relative error 0.6 0.7 L2 GD L2 Conic L1 GD L1 Conic 0.3 0.2 0.4 0.6 0.8 0.0 0.2 0.4 0.6 f ρA = 0.3 ρB* = 0.3 τB = 0.3 n = 1200 ρA = 0.3 ρB* = 0.3 τB = 0.7 n = 1200 0.8 0.9 f 0.8 0.0 0.6 0.7 0.8 L2 GD L2 Conic L1 GD L1 Conic 0.4 0.3 0.2 0.1 0.2 0.3 0.4 0.5 relative error 0.6 0.7 L2 GD L2 Conic L1 GD L1 Conic 0.5 relative error L2 GD L2 Conic L1 GD L1 Conic 0.2 0.2 0.1 0.2 0.8 0.0 relative error 0.5 relative error 0.5 0.4 L2 GD L2 Conic L1 GD L1 Conic 0.3 relative error 0.6 0.7 0.9 ρA = 0.3 ρB* = 0.3 τB = 0.7 n = 300 0.8 ρA = 0.3 ρB* = 0.3 τB = 0.3 n = 300 0.0 0.2 0.4 f 0.6 0.8 0.0 0.2 0.4 0.6 f F IG 5. Plot of the relative error in `2 and `1 norm versus the penalty factor f ∈ (0, 0.8] as we change the sample size n. Set m = 1024 and d = 10. Both A and B are generated using the AR(1) model with parameters ρA = 0.3 and ρB ∗ = 0.3. We plot the relative error in `1 and `2 norm versus the penalty parameter factor f ∈ (0, 0.8] for n = 300, 600, 1200 when ζ = 23 λmax (A). In the left column, τB = 0.3. In the right column, we set τB = 0.7. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 0.8 48 Rudelson and Zhou/Errors-in-variables B * = 0.3 B = 0.7 n = 600 ρA = 0.3 ρB * = 0.3 τB = 0.3 n = 600 0.8 0.4 0.6 0.8 0.2 0.4 0.6 ρA = 0.3 ρB * = 0.3 τB = 0.7 n = 1200 ρA = 0.3 ρB * = 0.3 τB = 0.3 n = 1200 0.8 1.0 f 1.0 f 0.6 0.8 R* L2 5R* L2 9R* L2 R* L1 5R* L1 9R* L1 0.2 0.2 0.4 0.6 relative error 0.8 R* L2 5R* L2 9R* L2 R* L1 5R* L1 9R* L1 0.4 0.2 0.4 0.6 0.8 0.2 0.4 0.6 ρA = 0.3 ρB * = 0.3 τB = 0.7 n = 2500 ρA = 0.3 ρB * = 0.3 τB = 0.3 n = 2500 0.8 1.0 f 1.0 f 0.8 R* L2 5R* L2 9R* L2 R* L1 5R* L1 9R* L1 0.4 0.2 0.2 0.4 0.6 relative error 0.8 R* L2 5R* L2 9R* L2 R* L1 5R* L1 9R* L1 0.6 relative error 0.6 relative error 0.2 0.2 0.2 relative error R* L2 5R* L2 9R* L2 R* L1 5R* L1 9R* L1 0.4 0.6 R* L2 5R* L2 9R* L2 R* L1 5R* L1 9R* L1 0.4 relative error 0.8 1.0 = 0.3 1.0 A 0.2 0.4 0.6 f 0.8 0.2 0.4 0.6 f F IG 6. Plot of the relative error in `2 and `1 norm versus the penalty factor f ∈ (0, 0.8] as we change the radius R. Set m = 1024, d = 10 and √ n ∈ {600, 1200, 2500}. We change the `1 -ball radius R ∈ {R∗ , 5R∗ , 9R∗ }, where R∗ = kβ ∗ k2 d, while running through different penalties for the composite gradient descent algorithm. In the left column, A and B are generated using the AR(1) model with ρA = 0.3, ρB ∗ = 0.3 and τB = 0.7. In the right column, we set τB = 0.3, while keeping other parameters invariant. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 0.8 49 Rudelson and Zhou/Errors-in-variables −5 log(L2 error) −5 1 2 3 6 12 25 −15 −15 −10 1 2 3 6 12 25 −10 log(L2 error) 0 ρA = 0.3 ρB * = 0.3 τB = 0.7 f = 0.2 0 ρA = 0.3 ρB * = 0.3 τB = 0.3 f = 0.2 0 20 40 60 80 100 0 Iteration count (a) 20 40 60 80 Iteration count (b) b 2 ) versus F IG 7. Plots of the statistical error log(kβ t − β ∗ k2 ), and the optimization error log(kβ t − βk iteration number t, generated by running the composite gradient descent algorithm on the corrected Lasso objective function. Each curve represents an average over 10 random trials, each with a different initialization point of β 0 . In Plots (a) and (b), B is generated using the AR(1) model with ρB ∗ = 0.3 and A is generated using the AR(1) model with ρA = 0.3. We set τB = 0.3, 0.7 in Plot (a) and (b) respectively. We set n = dρd log me, where we vary ρ ∈ {1, 2, 3, 6, 12, 25}. 8.4. Statistical and optimization error in Gradient Descent In the last set of experiments, we study the statistical error and optimization error for each iteration within the composite gradient descent algorithm. We observe a geometric b 2. convergence of the optimization error kβ t − βk For each experiment, we repeat the following procedure 10 times: we start with a random initialization point β 0 and apply the composite gradient descent algorithm to comb we compute the optimization error log(kβ t − βk b 2 ), which records pute an estimate β; t b b the difference between β and β, where β is the final solution. In all simulations, we b 2 ) between the iterate β t at time t versus the final soluplot the log error log(kβ t − βk b tion β, as well as the statistical error log(kβ t − β ∗ k2 ), which is the difference between β t and β ∗ at time t. Each curve plots the results averaged over ten random instances. In the first experiment, both A and B are generated using the AR(1) model with parameters ρA = 0.3 and ρB ∗ = 0.3. We set m = 1024, d = 10 and τB ∈ {0.3, 0.7}. These results are shown in Figure 7. Within each plot, the red curves show the statistical error and the blue curves show the optimization error. We can see the optimization b 2 decreases exponentially for each iteration, obeying a geometric conerror kβ t − βk vergence. To illuminate the dependence of convergence rate on the sample size n, we b 2 ) when n = dρd log me, where we vary study the optimization error log(kβ t − βk ρ ∈ {1, 2, 3, 6, 12, 25}. When n = d log m, the composite gradient algorithm fails to converge since the sample size is too small for the RSC/RSM conditions to hold, resultimsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 100 50 Rudelson and Zhou/Errors-in-variables ing in the oscillatory behavior of the algorithm for a constant step size. As the factor ρ increases, the lower and upper RE curvature α and smoothness parameter α e become more concentrated around λmin (A) and λmax (A) respectively, and the tolerance parameter τ decreases at the rate of lognm . Hence we observe faster rates of convergence for ρ = 25, 12, 6 compared to ρ = 2, 3. This is well aligned with our theoretical τ0 prediction that once n = Ω(κ(A) λmin (A) d log m) (cf. (8.2)), we expect to observe a b 2. geometric convergence of the computational error kβ t − βk For the statistical error, we first observe the geometric contraction, and then the curves flatten out after a certain number of iterations, confirming the claim that β t converges to β ∗ only up to a neighborhood of radius defined through the statistical error bound ε2stat ; that is, the geometric convergence is not guaranteed to an arbitrary precision, but only to an accuracy related to statistical precision of the problem measured by `2 error: kβb − β ∗ k22 =: ε2stat between the global optimizer βb and the true parameter β ∗ . In the second experiment, A is generated from the Star-Block model, where we have 32 subgraphs and each subgraph has 16 edges; B is generated using the random graph model with n log n edges and adjusted to have τB = 0.3. We set m = 1024, n = 2500 and d = 10. We then choose ρA ∈ {0.3, 0.5, 0.7, 0.9}. The results are shown in Figure 8(b). As we increase ρA , we need larger sample size to control the statistical error. Hence for a fixed n, the statistical error is bigger for ρA = 0.7, compared to cases where ρA = 0.5 or ρA = 0.3, for which we have κ(A) = 42.06 and κ(A) = 10.2 (for ρA = 0.3) respectively; Moreover, the rates of convergence are faster for the latter two compared to ρA = 0.7, where κ(A) = 169.4. When ρA = 0.9, the composite gradient descent algorithm fails to converge as ρ(A) is too large (hence not plotted here) with respect to the sample size we fix upon. In Figure 8(a), we show results of A being generated using the AR(1) model with four choices of ρA ∈ {0.3, 0.5, 0.7, 0.9} and B being generated using the AR(1) model with ρB ∗ = 0.7 and τB = 0.3. We observe quantitively similar behavior as in Figure 8(b). 9. Proof of Lemma 1 Proof of Lemma 1. Part I: Suppose that the Lower-RE condition holds for Γ := AT A. Let x ∈ Cone(s0 , k0 ). Then √ kxk1 ≤ (1 + k0 ) kxT0 k1 ≤ (1 + k0 ) s0 kxT0 k2 . Thus for x ∈ Cone(s0 , k0 ) ∩ S p−1 and τ (1 + k0 )2 s0 ≤ α/2, we have kAxk2 = (xT AT Ax)1/2 ≥  ≥  ≥ 2 2 α kxk2 − τ kxk1 2 1/2 2 α kxk2 − τ (1 + k0 )2 s0 kxT0 k2 r 1/2 α α − τ (1 + k0 )2 s0 ≥ . 2 1/2 imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 51 Rudelson and Zhou/Errors-in-variables ρB * = 0.7 τB = 0.3 n = 2500 0 −5 log(L2 error) −5 ρA= 0.3 ρA= 0.5 ρA= 0.7 ρA= 0.9 −15 −15 −10 ρA= 0.3 ρA= 0.5 ρA= 0.7 ρA= 0.9 −10 log(L2 error) 0 A: Star−Block; B: Random τB = 0.3 n = 2500 0 20 40 60 80 100 0 20 40 Iteration count 60 80 Iteration count (a) (b) F IG 8. Plots of the statistical error log(kβ t − β ∗ k2 ), and the optimization error when we change the topology. In the last experiment, we have m = 1024, d = 10 and n = 2500. In (a), A is generated using the AR(1) model with four choices of ρA ∈ {0.3, 0.5, 0.7, 0.9} and B is generated using AR(1) model with ρB ∗ = 0.7 and τB = 0.3. In (b), A follows the Star-Block model and B follows the random graph model. We show four choices of ρA ∈ {0.3, 0.5, 0.7, 0.9} Thus the RE(s0 , k0 , A) condition holds with 1 K(s0 , k0 , A) kAxk2 := min ≥ x∈Cone(s0 ,k0 ) kxT0 k2 r α 2 where we use the fact that for any J ∈ {1, . . . , p} such that |J| ≤ s0 , kxJ k2 ≤ kxT0 k2 . We now show the other direction. Part II. Assume that RE(4R2 , 2R − 1, A) holds for some integer R > 1. Assume that for some R > 1 kxk1 ≤ R kxk2 . Let (x∗i )pi=1 be non-increasing arrangement of (|xi |)pi=1 . Then  2 1/2 s ∞  X X kxk1  ≤ R  (x∗j )2 + j j=1 j=s+1  kxk1  1/2   1 2 2 1 ≤ R kx∗J k2 + kxk1 ≤ R kx∗J k2 + kxk1 √ s s where J := {1, . . . , s}. Choose s = 4R2 . Then kxk1 ≤ R kx∗J k2 + 1 kxk1 . 2 imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 100 Rudelson and Zhou/Errors-in-variables 52 Thus we have kxk1 kx∗J c k1 ≤ 2R kx∗J k2 ≤ 2R kx∗J k1 and hence (2R − 1) kx∗J k1 . ≤ (9.1) (9.2) Then x ∈ Cone(4R2 , 2R − 1). Then for all x ∈ S p−1 such that kxk1 ≤ R kxk2 , we have for k0 = 2R − 1 and s0 := 4R2 , 2 xT Γx ≥ 2 kxT0 k2 kxk2 2 ≥√ =: α kxk2 K 2 (s0 , k0 , A) s0 K 2 (s0 , k0 , A) 2 2 where we use the fact that (1 + k0 ) kxT0 k2 ≥ kxk2 by Lemma 33 with xT0 as defined therein. Otherwise, suppose that kxk1 ≥ R kxk2 . Then for a given τ > 0, 2 2 α kxk2 − τ kxk1 ≤ ( √ 1 2 − τ R2 ) kxk2 . s0 K 2 (s0 , k0 , A) (9.3) Thus we have by the choice of τ as in (2.2) and (9.3) 2 xT Γx ≥ λmin (Γ) kxk2 ≥ (√ 1 2 − τ R2 ) kxk2 s0 K 2 (s0 , k0 , A) 2 2 ≥ α kxk2 − τ kxk1 . The Lemma thus holds.  10. Proof of Theorem 3 Throughout this proof, we assume that A0 ∩ B0 holds. First we note that it is sufficient to have (3.2) in order for (6.5) to hold. Condition (3.2) guarantees that for V = 3eMA3 /2, r(B) := tr(B) kBk2 n Vm log m log log m n   3emMA3 log m 0 4 n ≥ 16c K log log m 2n ≥ 16c0 K 4 ! 6emMA 1 4 n log = cK 2 2 4 ε MA log m 2 (n/ log m) MA     1 6emMA s0 3em ≥ c0 K 4 2 s0 log = c0 K 4 2 log (10.1) ε s0 ε s0 ε 0 4 1 , and the last inequality holds given that k log(cm/k) on the where ε = 2M1 A ≤ 128C RHS of (10.1) is a monotonically increasing function of k, s0 ≤ 4n 64C(ρmax (s0 , A) + τB ) and MA = ≥ 64C. MA2 log m λmin (A) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 53 Rudelson and Zhou/Errors-in-variables Next we check that the choice of d as in (3.4) ensures that (6.9) holds for Dφ defined there. Indeed, for c0 K 4 ≤ 1, we have d ≤ CA (c0 K 4 ∧ 1) φn n ≤ CA (c0 Dφ ∧ 1) . log m log m b A := 1 (X T X − By Lemma 15, we have on event A0 , the modified gram matrix Γ n b tr(B)I m ) satisfies the Lower RE conditions with α and τ as in (10.2). Theorem 3 follows q from Theorem 16, so long as we can show that condition (6.6) holds for λ ≥ 4ψ log m n , where the parameter ψ is as defined (3.6), curvature α = 5 λmin (A) − α 3α λmin (A) and tolerance τ = = . 8 s0 5s0 (10.2) Combining (10.2) and (6.6), we need to show (6.10) holds. This is precisely the content of Lemma 17. This is the end of the proof for Theorem 3  11. Proof of Theorem 4 For the set ConeJ (k0 ) as in (F.3), κRE (d0 , k0 ) := min ∆T Ψ∆ min J:|J|≤d0 ∆∈ConeJ (k0 ) 2 k∆J k2  = 1 √ K(d0 , k0 , (1/ n)Z1 A1/2 ) 2 . Recall the following Theorem 27 from [38]. Theorem 27. ([38]) Set 0 < δ < 1, k0 > 0, and 0 < d0 < p. Let A1/2 be an m × m matrix satisfying RE(d0 , 3k0 , A1/2 ) condition as in Definition 2.1. Set d = d0 + d0 max A1/2 ej j 2 2 16K 2 (d0 , 3k0 , A1/2 )(3k0 )2 (3k0 + 1) . δ2 Let Ψ be an n × m matrix whose rows are independent isotropic ψ2 random vectors in Rm with constant α. Suppose the sample size satisfies   2000dα4 60em n≥ log . (11.1) δ2 dδ √ Then with probability at least √ 1 − 2 exp(−δ 2 n/2000α4 ), RE(d0 , k0 , (1/ n)ΨA1/2 ) condition holds for matrix (1/ n)ΨA with √ K(d0 , k0 , A1/2 ) 0 < K(d0 , k0 , (1/ n)ΨA1/2 ) ≤ . 1−δ (11.2) Proof of Theorem 4. Suppose RE(2d0 , 3k0 , A1/2 ) holds. Then for d as defined in (3.10) and n = Ω(dK 4 log(m/d)), we have with probability at least 1−2 exp(δ 2 n/2000K 4 ), RE(2d0 , k0 , √1n Z1 A1/2 ) condition holds with  κRE (2d0 , k0 ) = 1 √ K(2d0 , k0 , (1/ n)Z1 A1/2 ) 2  ≥ 1 2K(2d0 , k0 , A1/2 ) 2 imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 54 Rudelson and Zhou/Errors-in-variables by Theorem 27. The rest of the proof follows from [3] Theorem 1 and thus we only provide a sketch. In more details, in view of the lemmas shown in Section 6, we need −1/q κq (d0 , k0 ) ≥ cd0 to hold for some constant c for Ψ := n1 X0T X0 . It is shown in Appendix C in [3] that under the RE(2d0 , k0 , √1n Z1 A1/2 ) condition, for any d0 ≤ m/2 and 1 ≤ q ≤ 2, κ1 (d0 , k0 ) ≥ cd−1 0 κRE (d0 , k0 ) κq (d0 , k0 ) ≥ −1/q c(q)d0 κRE (2d0 , k0 ), and (11.3) where c(q) > 0 depends on k0 and q. The theorem is thus proved following exactly the same line of arguments as in the proof of Theorem 1 in [3] in view of the `q sensitivity condition derived immediately above, in view of Lemmas 19, 20 and 21. Indeed, for v := βb − β ∗ , we have by definition of `q sensitivity as in (6.13), −1/q c(q)d0 κRE (2d0 , k0 ) kvkq ≤ κq (d0 , k0 ) kvkq ≤ 1 T n X0 X0 v ∞ ∗ ≤ µ1 kβ k2 + µ2 kvk1 + ω ≤ µ1 kβ ∗ k2 + µ2 (2 + λ) kvS k1 + ω ≤ µ1 kβ ∗ k2 + µ2 (2 + λ)d0 ≤ µ1 kβ ∗ k2 + µ2 (2 + λ)d0 1−1/q kvS kq + ω 1−1/q kvkq + ω.(11.4) p Thus we have for d0 = c0 n/ log m, where c0 is sufficiently small, −1/q d0 and hence (c(q)κRE (2d0 , k0 ) − µ2 (2 + λ)d0 ) kvkq ≤ µ1 kβ ∗ k2 + ω 1/q kvkq ≤ C(4D2 ρn K kβ ∗ k2 + 2D0 M ρn )d0 1/q ≤ 4CD2 ρn (K kβ ∗ k2 + M )d0 for some constant C = 1/ (c(q)κRE (2d0 , k0 ) − µ2 (2 + λ)d0 ) ≥ 1/ (2c(q)κRE (2d0 , k0 )), where p 1 µ2 (2 + λ)d0 = 2D2 Kρn ( + 1)(2 + λ)c0 n/ log m λ 1 = 2c0 C0 D2 K 2 (2 + λ)( + 1) λ is sufficiently small and thus (3.11) holds. The prediction error bound follows exactly the same line of arguments as in [3] which we omit here. See proof of Theorem 7 in Section 6.5 for details.  12. Proof of Theorem 6 Throughout this proof, we assume that A0 ∩ B0 holds. The proof is also identical to the proof of Theorem 3 up till (10.2), except that we replace the condition on d as in imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 55 the theorem statement by (4.3). Theorem 6 follows from Theorem 16, so long as we as defined in (10.2), and can show that condition (6.6) holds for α and τ = λmins(A)−α 0 q log m λ ≥ 2ψ n , where the parameter ψ is as defined (6.3). Combining (10.2) and (6.6), we need to show (6.10) holds. This is precisely the content of Lemma 18. This is the end of the proof for Theorem 6.  13. Proof of Theorem 7 Throughout this proof, we assume that B0 ∩ B10 holds. The rest of the proof follows that of Theorem 4, except for the last part. Let µ1 , µ2 , ω be as defined in Lemma 21. p 1/2 1 ), where µ = D00 Kρn τeB and d0 = c0 τB− n/ log m, We have for µ2 := 2µ(1 + 2λ µ2 (2 + λ)d0 1 + 1)(2 + λ)c0 τB− (13.1) 2λ 1 1 ≤ 2c0 C0 D00 K 2 (2 + λ)( + 1) ≤ c(q)κRE (2d0 , k0 ), 2λ 2 = 1/2 2C0 D00 K 2 τeB ( 1/2 which holds when c0 is sufficiently small, where τB− τeB µ2 d0 ≤ ≤ 1 by (6.18). Hence c(q)κRE (2d0 , k0 ) . 2(2 + λ) Thus for c0 sufficiently small, µ1 = 2µ, we have by (11.3), (13.1), (11.4) and (6.17), −1/q 1 d0 (c(q)κRE (2d0 , k0 )) kvkq 2 −1/q = d0 (c(q)κRE (2d0 , k0 ) − µ2 (2 + λ)d0 ) kvkq 1−1/q ≤ (κq (d0 , k0 ) − µ2 (2 + λ)d0 ≤ ) kvkq ≤ µ1 kβ ∗ k2 + ω 1/2 1/2 2D00 ρn K 2 ((τB + (3/2)C6 rm,m ) kβ ∗ k2 + M /K) (13.2) and thus (4.12) holds, following the proof in Theorem 4. The prediction error bound follows exactly the same line of arguments as in [3], which we now include for the sake completeness. Following (4.12), we have by (13.2), kvk1 and hence µ2 kvk1 ≤ C11 d0 (µ1 kβ ∗ k2 + ω), where C11 = 2/ (c(q)κRE (2d0 , k0 )) , ≤ C11 µ2 d0 (µ1 kβ ∗ k2 + ω) 1 ≤ C11 (c(q)κRE (2d0 , k0 )) (µ1 kβ ∗ k2 + ω) 2(2 + λ) 1 = (µ1 kβ ∗ k2 + ω). 2+λ imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 56 Rudelson and Zhou/Errors-in-variables Thus we have by (13.2), (6.18) and the bounds immediately above, 1 n X(βb − β ∗ ) 2 ≤ 2 1 T n X0 X0 v ∞ C11 d0 (µ1 kβ ∗ k2 + ω) (µ1 kvk1 kβ ∗ k2 + µ2 kvk1 + 2ω) 1 ) (µ1 kβ ∗ k2 + 2ω) ≤ C11 d0 (µ1 kβ ∗ k2 + ω)(1 + 2+λ  2 log m M 1/2 0 0 2 4 ∗ = C (D0 ) K d0 τeB kβ k2 + n K   log m 2 ≤ C 00 (kBk2 + amax )K 2 d0 (2τB + 3C62 rm,m )K 2 kβ ∗ k2 + M2 , n ≤ where (D00 )2 ≤ 2 kBk2 + 2amax . The theorem is thus proved.  14. Proof of Theorem 9 Suppose that event A0 ∩ B0 holds. The condition on d in (5.3) implies that     4ζ 12λmax (A) _ , where n > 512dτ0 log m λmin (A)2 (ᾱ` )2 400C 2 $(s0 + 1)2 τ0  . λmin (A) (14.1) (14.2) To see this, note that the following holds by the first bound in (5.3): ν` = 64dτ0 log m λmin (A) λmin (A) α` ≤ 64dτ0 log m = ≤ , (14.3) n 256dτ0 log m ∗ 24κ(A) 96κ(A) 60 where α` = 85 λmin (A) by Lemma 8, and hence ᾱ` ≥ ᾱ2 α`2 ≤ `, 5ζ 4ζ 59α` 60 . Thus we have where ζ ≥ αu > λmax (A) ≥ κ(A)ᾱ` . Now, by definition of ν(d, m, n) and the second bound on n in (14.1), 2ν(d, m, n) = 128dτu (Ln ) := 128dτ0 log m (ᾱ` )2 ≤ n 16ζ Then 2% := 4ν(d, m, n) 256dτu (Ln ) ᾱ` = ≤ . ᾱ` ᾱ` 8ζ imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 57 Rudelson and Zhou/Errors-in-variables That is, we actually need to have for 2% ≤ ᾱ8ζ`   ξ 1 ᾱ` 1−% = 2τ (Ln ) + 2% + 5 ᾱ` 1−κ 1−% 4ζ 4ζ − 2%   ᾱ` 1 = 2τ (Ln ) + 2% + 5 ᾱ` 4ζ 4ζ − 2% !   ᾱ` 40ζ 40ζ 4ζ + 2% = 2τ (Ln ) ᾱ` + ≤ 2τ (Ln ) 3 + ᾱ` ᾱ` 4ζ − 2% ≤ 6τ (Ln ) + 80ζ τ (Ln ), ᾱ` where we use the second bound in (14.1), and hence ᾱ` + 2% ≤ 4ζ ᾱ` (1 − κ)(1 − %) = − 2% ≥ 4ζ 3 ᾱ` and 2 4ζ 1 ᾱ` . 2 4ζ Finally, putting all bounds in (2.11), we have 0 < κ < 1. Thus the conclusion of Theorem 2 hold.  14.1. Proof of Corollary 10 Suppose that event A0 ∩ B0 holds. We first show that   δ4 in case δ 2 ≤ M δ̄ 2 . 4νε2stat + 4τ (Ln )2  64τ (Ln ) 4dε2stat + 2 λ Recall that ξ ≥ 10τ` (Ln ) by definition of ξ in (2.12). The condition (5.2) on λ as stated in Theorem 2 indicates that √ √ 160b0 dτ` (Ln ) λ≥ where R  b0 d. (14.4) 1−κ We first show that for the choice of λ and R as in (14.4),    2 δ4 2 bt ∆ δ 2 + 64τ 4dε2stat + 2 ≤ ᾱ` λ 2  2  2 3 2 α` εstat 2 δ M ε2stat ≤ δ + + O . α` 4 α` τ0 400b20 Then (5.4) holds. For the second term on the RHS of (2.16), we have by (14.1), n ≥ 256dτ0 log m 8ζ , ᾱ` ᾱ` where τ0  400C 2 $(s0 + 1)2 . λmin (A) (14.5) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 58 Rudelson and Zhou/Errors-in-variables Thus 4ν` = 256dτ0 log m ᾱ` ≤ ᾱ` n 8ζ 2 ᾱ` 2 α` ε2stat 4νε2stat ≤ εstat ≤ . ᾱ` 4ζ 4ζ and Consider the choice of η̄ = δ 2 , where M δ̄ 2 ≥ η̄ = δ 2 ≥ cε2stat d log m 1−κ n =: δ̄ 2 . Thus we have for (14.4), 2δ 2 λ ≤ and hence  = 4δ 2 λ . √ M cε2stat d M cε2stat d log m 1−κ √ = <R 1−κ n 160b0 dτ` (Ln ) 160b0 τ0 Then for the last term on the RHS of (2.16), we have for τ` (Ln )  τ , = = ≤ = = where δ 2 ≤ 2 2δ 2 ,R λ 4 4 δ δ (1 − κ)2 n 64τ 2 ≤ λ 400b20 τ0 d log m cM ε2stat (1 − κ)2 δ2 1 − κ 400b20 τ0 cδ 2 M ε2stat (1 − κ) τ0 400b20  2  cδ M ε2stat O τ0 400b20  4τ` (Ln )2 16τ` (Ln ) min M cε2stat d log m . 1−κ n Finally, suppose we fix R 20M+ b0 p r 6κ(A) n log m in view of the upper bound d¯ (5.7). Then in order for λ ≥ 16R ξ 1−κ to hold, we need to set λ ≥ because of the following lower bound 640Rτ (Ln )κ(A), ξ 1−κ ≥ 40τ (Ln )κ(A) as shown in (2.22). imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 59 Rudelson and Zhou/Errors-in-variables Then (5.5) holds given that the last term on the RHS of (2.16) is now bounded by 2 4τ` (Ln )2 ᾱ`  2δ 2 ,R λ 2 60 2 64δ 4 59 α` 6402 R2 κ(A)2 τ` (Ln ) √ !2 20M+ 6 b0 = 2 16τ` (Ln ) min ᾱ` ≤ 60 2 δ4 59 α` 6400κ(A)τ0 = 2 60 12 δ 4 M+ 60 3δ 4 2δ 4 1024 ≤ ≤ 2 . 2 2 59 α` 16b0 κ(A)τ0 59 4α` 400b0 kAk2 b0 α` kAk2 ≤  Remark 14.1. First we obtain an upper bound on 59 5 60 8 λmin (A) ≤ ᾱ` ξ 1−κ ξ 1−κ for ζ = αu  3λmax (A) 2 and 80ζ τ (Ln ) ᾱ` 80ζ τ (Ln ) ≤ 6τ (Ln ) + 59 5 60 8 λmin (A) ≈ 200τ (Ln )κ(A). ≤ 6τ (Ln ) + √ Now we obtain an upper bound using R ≤ b0 d for d ≤ d¯ as in (5.7), r √ ξ log m b0 p R ≤ 200κ(A)τ b0 d ≤ 200κ(A)τ0 1−κ n 20M+ 6κ(A) r λmin (A) log m b p0 = 200κ(A)τ0 $(s0 + 1) n 640C 6κ(A) r τ0 p log m √ ≤ 10b0 κ(A) n M+ 6 r p 125b0 log m √ C$(s0 + 1) κ(A) , = n 6 where we use (5.3) and the fact that Mτ0+ = 12.5C$(s0 + 1). We now discuss the implications of this bound on the choice of λ in Section 5.1. We consider two cases. • When τB = Ω(1). It is sufficient to have for kβ ∗ k2 ≤ b0 and τB  1,  λ ≥ 16Cb0  r _ p M log m 1/2 0 50 κ(A)$(s0 + 1) D0 K(KτB + ) b0 n following the discussions in Section 4, where the first and the second term on the RHS are at the same order except that the new lower bound involves the condition number κ(A), while the original bound in Theorem 6 involves only 1/2 1/2 D00 = kBk2 + amax . imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 60 Rudelson and Zhou/Errors-in-variables +/2 • When τB = o(1) and M = Ω(τB K kβ ∗ k2 ). Now d satisfies (4.15) and hence (√ ) r √ n c0 D00 KM 1 b0 d ≤ √ ∧ b0 . $(s0 + 1) 4 5M+ log m Now combining this with the condition on d as in (5.3) implies that it is sufficient to set R such that !r n ξ κ(A)τ b0 ^ D00 KM p R  1−κ M+ $(s + 1) log m κ(A) 0 !r b0 ^ D00 KM log m = κ(A)$(s0 + 1) p $(s0 + 1) n κ(A) r   p log m =: Ū . ≈ b0 $(s0 + 1) κ(A) ∧ κ(A)D00 KM n   +/2 Hence it is sufficient to have for ψ  D00 K M + KτB kβ ∗ k2 as in (4.2), r ≥ λ Ū ∨ ψ  log m . n 15. Proof of Theorem 12 Clearly the condition on the stable rank of B guarantees that n ≥ r(B) = tr(B) kBk2 tr(B) 2 2 = ≥ kBkF / kBk2 ≥ log m. 2 kBk2 kBk2 Thus the conditions in Lemmas 11 and 5 hold. First notice that ( n1 X T X − X0T X0 β ∗ + W T X0 β ∗ + X0T  + W T  γ b = 1 n b tr(B) ∗ n Im )β = 1 T n (X0 X0  + W T X0 + X0T W + W T W − b tr(B) ∗ n Im )β . Thus b ∗ γ b − Γβ ∞ ≤ = ≤ ≤ γ b− 1 n 1 n 1 n 1 n X0T  X0T  X0T   ∗ b X T X − tr(B)I m β ∞  ∗ b + W  − W W + X0T W − tr(B)I m β T T T 1 n 1 n( ∗ +W  ∞ + + WT ∞ + (Z T BZ − ∞ 1 T ∗ n X0 W β ∞ tr(B)Im )β ∗ ∞ ) + n1 X0T W β ∗ ∞ ∗ b (W W − tr(B)I m )β T ∞ + b + n1 tr(B) − tr(B) kβ k∞ =: U1 + U2 + U3 + U4 . By Lemma 11 we have on B4 for D0 := U1 = 1 n X0T  + W T  ∞ = 1 n √ 1 1/2 τB + amax , 1 A 2 Z1T  + Z2T B 2  ∞ ≤ ρn M D0 , imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 61 Rudelson and Zhou/Errors-in-variables and on event B5 for D00 := p 1/2 kBk2 + amax , (Z T BZ − tr(B)Im )β ∗ ∞ + n1 X0T W β ∗ ∞   kBkF √ ∗ 1/2 √ + τB amax ≤ Kρn kβ ∗ k2 τB1/2 D00 , ≤ ρn K kβ k2 n p 1/2 where recall kBkF ≤ tr(B) kBk2 . Denote by B0 := B4 ∩ B5 ∩ B6 . We have on B0 and under (A1), by Lemmas 11 and 5 and D1 defined therein, U2 + U3 = b ∗ γ b − Γβ ∞ 1 n ≤ U1 + U2 + U3 + U4 1/2 ≤ ρn M D0 + D00 τB Kρn kβ ∗ k2 + 1 n b tr(B) − tr(B) kβ ∗ k∞ 1/2 ≤ D0 M ρn + D00 KτB kβ ∗ k2 ρn + D1 kβ ∗ k∞ rm,m 1 1/2 ≤ D0 M ρn + D00 KτB kβ ∗ k2 ρn + 2D1 K √ ρn . m Finally, we have by the union bound, P (B0 ) ≥ 1 − 16/m3 . This is the end of the proof of Theorem 12.  16. Conclusion In this paper, we provide a unified analysis on the rates of convergence for both the corrected Lasso estimator (1.7) and the Conic programming estimator (1.8). As n increases or as the measurement error metric τB decreases, we see performance gains over the entire paths for both `1 and `2 error for both estimators as expected. When we focus on the lowest `2 error along the paths as we vary the penalty factor f ∈ [0.05, 0.8], the corrected Lasso via the composite gradient descent algorithm performs slightly better than the Conic programming estimator as shown in Figure 5. For the Lasso estimator, when we require that the stochastic error  in the response variable y as in (1.1a) does not approach 0 as quickly as the measurement error W in (1.1b) does, then the sparsity constraint becomes essentially unchanged as τB → 0. These tradeoffs are somehow different from the behavior of the Conic programming estimator versus the Lasso estimator; however, we believe the differences are minor. Eventually, as τB → 0, the relaxation on d as in (4.17) enables the Conic programming estimator to achieve bounds which are essentially identical to the Dantzig Selector when the design matrix X0 is a subgaussian random matrix satisfying the Restricted Eigenvalue conditions; See for example [6, 4, 38]. When τB → 0 and M = Ω(τB+ K kβ ∗ k2 ), we set r log m λ ≥ 2ψ , where ψ := 4C0 D00 KM , n (16.1) so as to recover the regular lasso bounds in `q loss for q = 1, 2 in (4.5) in Theorem 6. Moreover, suppose that tr(B) is given, then one can drop the second term in ψ as in (4.2) involving kβ ∗ k2 entirely and hence recover the lasso bound as well. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 62 Finally, we note that the bounds corresponding to the Upper RE condition as stated in Corollary 25, Theorem 26 and Lemma 15 are not needed for Theorems 3 and 6. They are useful to ensure algorithmic convergence and to bound the optimization error for the gradient descent-type of algorithms as considered in [1, 30], when one is interested in approximately solving the nonconvex optimization function (1.7). Our Theorem 9 illustrates this result. Our theory in Theorem 9 predicts the dependencies of the computational and statistical rates of convergence for the corrected Lasso via gradient descent algorithm on the condition number κ(A), the trace parameter τB and the radius R as λ R log m (ρmax (s0 , A) + τB )2 Rξ  τ0 κ(A) , where τ0  1−κ n λmin (A) depends on τB , sparse and minimal eigenvalues of A. Therefore, we need to increase the penalty when we increase the `1 -ball radius R in (1.10) in order to ensure algorithmic and statistical convergence as predicted in Theorem 9. This is well-aligned with the observation in Figure 6. Our numerical results validate such algorithmic and statistical convergence properties. Acknowledgements The authors thank the Editor, the Associate editor and two referees for their constructive comments. We thank Rob Kass, Po-Ling Loh, Seyoung Park, Kerby Shedden and Martin Wainwright for helpful discussions. We thank Professor Alexander Belloni for providing us the code implementing the Conic programming estimator. Appendix A: Outline We prove Theorem 2 in Section B. In Sections C, we present variations of the HansonWright inequality as recently derived in [37] (cf. Lemma 32). We prove Lemma 11 in Section C.2. In Sections H and I, we prove the technical lemmas for Theorems 3 and 4 respectively. In Section J, we prove the Lemmas needed for Proof of Theorem 7. In order to prove Corollary 25, we need to first state some geometric analysis results Section K. We prove Corollary 25 in Section L and Theorem 26 in Section M. Appendix B: Proof of Theorem 2 Let us first define the following shorthand notation bt ∆ = b β t − βb and δ t = φ(β t ) − φ(β). The proof of the theorem requires two technical Lemmas 28 and 30. Both are stated under assumption (B.1), which is stated in terms of a given tolerance η̄ > 0 and integer T > 0 such that b ≤ η̄, ∀t ≥ T, φ(β t ) − φ(β) (B.1) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 63 where the distance between β t and the global optimizer βb is measured in terms of the b objective function φ, namely, δ t = φ(β t ) − φ(β). b t := β t − βb satisfies a certain We first show Lemma 28, which ensures that the vector ∆ cone-type condition. The proof is omitted, as it is a shortened proof of Lemma 1 of [31]. Lemma 28. (Iterated Cone Bound) Under the conditions of Theorem 2, suppose there exists a pair (η̄, T ) such that (B.1) holds. Then for any iteration t ≥ T , we have   √ √ 2η̄ β t − βb ≤ 4 d β t − βb + 8 d βb − β ∗ + 2 · min ,R . λ 2 1 2 We next state the following auxiliary result on the loss function. We use Lemma 29 in the proof of Lemma 28 and Corollary 10. √ Lemma 29. Denote by τ` (Ln ) := τ0 lognm and ν` = 64dτ` (Ln ). Let ¯stat = 8 dεstat ,  where εstat = βb − β ∗ and  = 2·min 2η̄ , R . Under the assumptions of Lemma 28, λ 2 b t := β t − βb and t > T , we have for ∆ b βt) ≥ T (β, b ≥ φ(β t ) − φ(β) α` − ν` b t 2 ∆ − 2τ` (Ln )(¯ stat + )2 and (B.2) 2 2 2 b ≥ α` − ν` ∆ b t − 2τ` (Ln )(¯ stat + )2 . (B.3) T (β t , β) 2 2 Lemma 30. (Lemma 3 of Loh-Wainwright (2015)) Suppose the RSC and RSM conditions as stated in (2.8) and (2.9) hold with parameters (α` , τ` (Ln )) and (αu , τu (Ln )) respectively. Under the conditions of Theorem 2, suppose there exists a pair (η̄, T ) such that (B.1) holds. Then for any iteration t ≥ T , we have for 0 < κ < 1, ξ (¯ 2 + 2 ) for 1 − κ stat   2η̄ ,R , and  = 2 · min λ b φ(β t ) − φ(β) ≤ b + κt−T (φ(β T ) − φ(β)) ¯stat := √ 8 dεstat where the quantities κ and ψ are as defined in Theorem 2 (cf. (2.11) and (2.12)). Proof of Theorem 2. We are now ready to put together the final argument for the theorem. First notice that (2.16) follows from (2.15) directlyin viewof (B.3) and √ 2 Lemma 28, where we set η̄ = δ 2 , ¯stat = 8 dεstat and  = 2 min 2δλ , R . Following (B.3), we have for ν` = 64dτ` (Ln ), α` − ν` b t ∆ 2 2 2 b + 2τ` (Ln )(¯ ≤ φ(β t ) − φ(β) stat + )2 , imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 64 Rudelson and Zhou/Errors-in-variables and thus bt ∆ 2 ≤ 2 ≤ ≤ ≤ 2 b + 4 τ` (Ln )(¯ (φ(β t ) − φ(β) stat + )2 ᾱ` ᾱ`  2 2 δ + 2τ` (Ln )(2¯ 2stat + 22 ) ᾱ`  2 2 δ + 2τ` (Ln )(128dε2stat + 22 ) ᾱ`  2 2 δ + 4ν` ε2stat + 4τ` (Ln )2 . ᾱ` (B.4) The remainder of the proof follows an argument in [1]. We first prove the following inequality: b ≤ δ2 , φ(β t ) − φ(β) ∀t ≥ T ∗ (δ). We divide the iterations t ≥ 0 into a series of epochs [T` , T`+1 ] and defend the tolerances η̄0 > η̄1 > . . . such that b ≤ η̄` , φ(β t ) − φ(β) ∀t ≥ T` . b to obtain In the first iteration, we apply Lemma 30 with η̄0 := φ(β 0 ) − φ(β) b ≤ κt (φ(β 0 ) − φ(β)) b + φ(β t ) − φ(β) ξ (¯ 2 + 4R2 ) 1 − κ stat for any iteration t ≥ 0. Set 2ξ η̄1 := (¯ 2 + 4R2 ) and 1 − κ stat   log(2η̄0 /η̄1 ) T1 := . log(1/κ) Then we have for any iteration t ≥ T1 b ≤ η̄1 := φ(β t ) − φ(β)  4ξ max ¯2stat , 4R2 . 1−κ The same argument can be now be applied in a recursive manner. Suppose that for some ` ≥ 1, we are given a pair (η̄` , T` ) such that b ≤ η̄` , ∀t ≥ T` . φ(β t ) − φ(β) (B.5) We now define η̄`+1 := 2ξ (¯ 2 + 2` ) and 1 − κ stat  T`+1 :=  log(2η̄` /η̄`+1 ) + T` . log(1/κ) We can apply Lemma 30 to obtain for any iteration t ≥ T` and ε` := 2 min{ η̄λ` , R}, b ≤ κt−T` (φ(β T` ) − φ(β)) b + φ(β t ) − φ(β) ξ (¯ 2 + ε2` ), 1 − κ stat imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 65 which implies that for all t ≥ T`+1 , b ≤ η̄`+1 ≤ φ(β t ) − φ(β) 4ξ max{¯ 2stat , ε2` } 1−κ by our choice of {η` , T` }`≥1 . Finally, we use the recursion η̄`+1 ≤ log(2` η̄0 /η̄` ) log(1/κ) (B.6) η̄`+1 R ≤ 2` ∀` = 1, 2, . . . . λ 4 (B.7) 4ξ max(¯ 2stat , ε2` ) and 1−κ T` ≤ ` + to establish the recursion that η̄`+1 ≤ η̄` 2 4 `−1 and ε`+1 := Taking these statements as given, we need to have η̄` ≤ δ 2 . It is sufficient to establish that λR ≤ δ2 . 42`−1 Thus we find that the error drops below δ 2 after at most  `δ ≥ log log(Rλ/δ 2 )/ log(4) / log 2 + 1 = log log(Rλ/δ 2 ) epochs. Combining the above bound on `δ with the recursion (B.6) T` ≤ ` + log(2` η̄0 /η̄` ) , log(1/κ) we conclude that b ≤ δ2 φ(β t ) − φ(β) is guaranteed to hold for all iterations   log 2 log(η̄0 /δ 2 ) t > `δ 1 + + . log(1/κ) log(1/κ) √ To√establish (B.7), we start with ` = 0 and establish that for ¯stat = 8 dstat = o( d) = o(R) η̄1 λ := and thus ε1 := 4ξ 16Rξ R max(¯ 2stat , 4R2 ) = R≤ (1 − κ)λ (1 − κ)λ 4 η̄1 2 min{ , R} = R/2 ≤ ε0 = R. λ (B.8) (B.9) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 66 Rudelson and Zhou/Errors-in-variables Assume that ¯stat ≤ ε1 (otherwise, we are done at the first iteration). First, we obtain for ` = 1,  2 4ξ 4ξ 2 4ξ 2η̄1 2 2 η̄2 ≤ max(¯ stat , ε1 ) = ε = 1−κ 1−κ 1 1−κ λ 2 16ξR η̄1 η̄1 16ξ η̄1 ≤ ≤ , ≤ 1 − κ λ2 1 − κ 4λ 4 η̄2 η̄1 R and ≤ ≤ , λ 4λ 16 where in the last three steps, we use the fact that λ ≥ for ` = 1. 16Rξ (1−κ) and (B.8). Thus (B.6) holds Now assume that (B.7) holds for d ≤ `. In the induction step, we again use the assumption that ε` := 2 η̄λ` ≥ ¯stat and (B.6) to obtain η̄`+1 ≤ ≤ ≤ 4ξ 16ξ η̄`2 max(¯ 2stat , ε2` ) = 1−κ 1 − κ λ2 16ξ R η̄` 16Rξ 1 η̄` = 1 − κ 42(`−1) λ 1 − κ λ 42(`−1) η̄` . 42(`−1) Finally, by the induction assumption R η̄` ≤ 2`−1 , λ 4 we use the bound immediately above to obtain η̄`+1 λ ≤ η̄` (`−1) 2 4 1 R 1 R ≤ 2`−1 2(`−1) ≤ 2` . λ 4 4 4 The rest of the proof follows from that of Corollary 10. This is the end of the proof for Theorem 2.  It remains to prove Lemma 29. Proof of Lemma 29. Using the RSC condition, we have for τ` (Ln ) := τ0 lognm and ν` = 64dτ` (Ln ) ≤ α48` , b βt) ≥ T (β, ≥ ≥ 2 α` b t 2 bt ∆ − τ` (Ln ) ∆ 2 2 1  α` b t 2 bt ∆ − τ` (Ln ) 2 ∗ 16d ∆ 2 2 2 1 b t − 2τ` (Ln )(¯ ᾱ` ∆ stat + )2 2 2 (B.10) 2 2 + 2(¯ stat + )2  imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 67 Rudelson and Zhou/Errors-in-variables and by Lemma 28, for any iteration t ≥ T , b t − βb ∆ 1 √ ≤ 4 d β t − βb √ bt 4 d ∆ ≤ 2 √ + 8 d βb − β ∗  + 2 · min 2 2η̄ ,R λ  + (¯ stat + ). 2 By convexity of function g, we have b − h ∇g(β), b β t − βb i ≥ 0. g(β t ) − g(β) (B.11) Thus b − h ∇φ(β), b β t − βb i φ(β t ) − φ(β) b − h ∇Ln (β), b β t − βb i + λ(g(β t ) − g(β) b − h ∇g(β), b β t − βb i ). = Ln (β t ) − Ln (β) b we have for all feasible β t ∈ Ω Moreover, by the first order optimality condition for β, b β t − βb i ≥ 0, h ∇φ(β), and thus b ≥ φ(β t ) − φ(β) b − h ∇Ln (β), b β t − βb i = T (β t , β), b Ln (β t ) − Ln (β) where similar to (B.10), we have b ≥ T (β t , β) ≥ = bt α1 ∆ 2 2 bt − τ` (Ln ) ∆ bt (α1 − 32dτ` (Ln )) ∆ 1 bt ᾱ` ∆ 2 2 2 2 2 2 1 − 2τ` (Ln )(¯ stat + )2 − 2τ` (Ln )(¯ stat + )2 , and by Lemma 28, bt ∆ 2 ≤ 1 bt 32d ∆ bt ≤ 32d ∆   2 √ 2η̄ + 2 8 dεstat + 2 · min ,R λ 2 2 2 2 + 2(¯ stat + )2 .  Appendix C: Some auxiliary results We first need to state the following form of the Hanson-Wright inequality as recently derived in Rudelson and Vershynin [37], and an auxiliary result in Lemma 32 which may be of independent interests. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 68 Rudelson and Zhou/Errors-in-variables Theorem 31. Let X = (X1 , . . . , Xm ) ∈ Rm be a random vector with independent components Xi which satisfy E (Xi ) = 0 and kXi kψ2 ≤ K. Let A be an m × m matrix. Then, for every t > 0, " !#   t2 t T T P X AX − E X AX > t ≤ 2 exp −c min . 2 , K 4 kAkF K 2 kAk2 We note that following the proof of Theorem 31, it is clear that the following holds: Let X = (X1 , . . . , Xm ) ∈ Rm be a random vector as defined in Theorem 31. Let Y, Y 0 be independent copies of X. Let A be an m × m matrix. Then, for every t > 0, !# "  t t2 T 0 . (C.1) P Y AY > t ≤ 2 exp −c min 2 , K 4 kAkF K 2 kAk2 We next need to state Lemma 32, which we prove in Section N. Lemma 32. Let u, w ∈ S n−1 . Let A  0 be an m × m symmetric positive definite matrix. Let Z be an n × m random matrix with independent entries Zij satisfying EZij = 0 and kZij kψ2 ≤ K. Let Z1 , Z2 be independent copies of Z. Then for every t > 0, !!   t2 t T 1/2 T P u Z1 A Z2 w > t ≤ 2 exp −c min , , K 4 tr(A) K 2 kAk1/2 2 !!  t t2 T T T T , P u ZAZ w − Eu ZAZ w > t ≤ 2 exp −c min 2 , K 4 kAkF K 2 kAk2 where c is the same constant as defined in Theorem 31. C.1. Proof of Lemma 5 First we write XX T − tr(A)In = = = ˇ Thus we have for tr(B) := Z1 A1/2 + B 1/2 Z2 ) Z1 A1/2 + B 1/2 Z2 1/2 Z1 A + B Z2 ) Z2T B 1/2 + A1/2 Z1T Z1 A1/2 Z2T B 1/2 + B 1/2 Z2 Z2T B 1/2 +B 1/2 Z2 A1/2 Z1T + Z1 AZ1T − tr(A)In . 1 m 1/2 T  − tr(A)In − tr(A)In  2 kXkF − ntr(A) ,  2 1 − tr(B)) := mn kXkF − ntr(A) − mtr(B) 1 (tr(XX T ) − ntr(A) − mtr(B)) mn   2 tr(B 1/2 Z2 Z2T B 1/2 ) tr(B) tr(Z1 A1/2 Z2T B 1/2 ) + − mn mn n 1 ˇ n (tr(B) = = + tr(Z1 AZ1T ) tr(A) − . mn m imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 69 Rudelson and Zhou/Errors-in-variables By constructing a new matrix An = In ⊗ A, which is block diagonal with n identical submatrices A along √ its diagonal, we prove the following large deviation bound: for t1 = C0 K 2 kAkF n log m and n > log m,    T P tr(Z1 AZ1T ) − ntr(A) ≥ t1 = P vec { Z1 } (I ⊗ A)vec { Z1 } − ntr(A) ≥ t1 !! t21 t1 ≤ exp −c min 2 , K 4 kAn kF K 2 kAn k2 !! √ √ (C0 K 2 n log m kAkF )2 C0 K 2 n log m kAkF ≤ 2 exp −c min , 2 K 2 kAk2 nK 4 kAkF ≤ 2 exp (−4 log m) , where the first inequality holds by Theorem 31 and the second inequality holds given 2 2 that kAn kF = n kAkF and kAn k2 = kAk2 . Similarly, by constructing a new matrix Bm = Im ⊗ B, which is block diagonal with m identical submatrices B along √ its diagonal, we prove the following large deviation bound: for t2 = C0 K 2 kBkF m log m and m ≥ 2,    T P tr(Z2T BZ2 ) − mtr(B) ≥ t2 = P vec { Z2 } (Im ⊗ B)vec { Z2 } − mtr(B) ≥ t2 !! t22 t2 ≤ exp −c min 2 , K 4 m kBkF K 2 kBk2 !! √ √ (C0 K 2 m log m kBkF )2 C0 K 2 m log m kBkF ≤ 2 exp −c min , 2 K 2 kBk2 K 4 m kBkF ≤ 2 exp (−4 log m) . p Finally, we have by (C.1) for t0 = C0 K 2 tr(A)tr(B) log m,   T P vec { Z1 } B1/2 ⊗ A1/2 vec { Z2 } > t0 ≤ 2 exp −c min = 2 exp −c min t20 2 , K 4 B 1/2 ⊗ A1/2 F K 2 p (C0 tr(A)tr(B) log m)2 , tr(A)tr(B) !! t0 B 1/2 ⊗ A1/2 2 !! p C0 tr(A)tr(B) log m 1/2 kBk2 1/2 kAk2 ≤ 2 exp(−4 log m), where we use the fact that r(A)r(B) ≥ log m, B 1/2 ⊗ A1/2 and B 1/2 ⊗ A1/2 2 = 1/2 2 = kBk2 1/2 kAk2 tr((B 1/2 ⊗ A1/2 )(B 1/2 ⊗ A1/2 )) = tr(B ⊗ A) = tr(A)tr(B). F imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 70 Rudelson and Zhou/Errors-in-variables Thus we have with probability 1 − 6/m4 , 1 n 1 ˇ tr(XX T ) − f tr(A) − mtr(B) tr(B) − tr(B) = mn 2 T vec { Z1 } (B1/2 ⊗ A1/2 )vec { Z2 } ≤ mn tr(Z1 AZ1T ) tr(A) tr(Z2T BZ2 ) tr(B) + + − − mn n mn m √   √ kBkF kAkF 1 log m 2 √ ≤ (2t0 + t1 + t2 ) = √ C0 K + 2 τA τB + √ mn mn m n √ log m 2 ≤ 2C0 √ K D1 =: D1 rm,m , mn where recall rm,m = 2C0 K 2 √ √log m , mn kAkF √ m D1 = + kBkF √ n , and √ kAk kBk 2 τA τB ≤ τA + τB ≤ √ F + √ F . m n To see this, recall mτA = nτB = m X i=1 n X λi (A) ≤ λi (B) ≤ √ m( √ n( i=1 m X i=1 n X λ2i (A))1/2 = λ2i (B))1/2 = √ √ m kAkF and (C.2) n kBkF i=1 where λi (A), i = 1, . . . , m and λi (B), i = 1, . . . , n denote the eigenvalues of positive semidefinite covariance matrices A and B respectively. Denote by B6 the following event 1 ˇ n tr(B) − tr(B) ≤ D1 rm,m . b ˇ b Clearly tr(B) := (tr(B)) = + by definition (1.5). As a consequence, on B6 , tr(B) ˇ tr(B) > 0 when τB > D1 rm,m ; hence 1 n b tr(B) − tr(B) = 1 n ˇ tr(B) − tr(B) ≤ D1 rm,m . ˇ Otherwise, it is possible that tr(B) < 0. However, suppose we set τbB := 1 b n tr(B) := 1 ˇ n (tr(B) ∨ 0), then we can also guarantee that |b τB − τB | = |τB | ≤ D1 rm,m in case τB ≤ D1 rm,m . The lemma is thus proved.  imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 71 Rudelson and Zhou/Errors-in-variables C.2. Proof of Lemma 11 Following Lemma 32, we have for all t > 0, B  0 being an n × n symmetric positive definite matrix, and v, w ∈ Rm " !#   t2 t T T 1/2 , P v Z1 B Z2 w > t ≤ 2 exp −c min (C.3) K 4 tr(B) K 2 kBk1/2 2 and T T T t2 t , 2 2 K 4 kBkF K kBk2 T  P v Z BZw − Ev Z BZw > t ≤ 2 exp −c min !! Proof of Lemma 11. Let e1 , . . . , em ∈ Rm be the canonical basis spanning R . Let x1 , . . . , xm , x01 , . . . , x0m ∈ Rn be the column vectors Z1 , Z2 respectively. Let 1/2 Y ∼ eT1 Z0T . Let wi = AA1/2 eei for all i. Clearly the condition on the stable rank of k ik 2 B guarantees that m tr(B) kBk2 tr(B) 2 2 = ≥ kBkF / kBk2 ≥ log m. 2 kBk2 kBk2 p By (C.1), we obtain for t0 = C0 M K tr(B) log m   P ∃j, T B 1/2 Z2 ej > t0 =   p 1 M T T 1/2 2 P ∃j, e Z B Z2 ej > C0 M K log mtr(B) K 1 0   p 1 ≤ exp(log m)P Y T B 1/2 x0j > C0 K 2 log mtr(B) 2 ≤ 2/m3 n ≥ r(B) = where the last inequality holds by the union bound, given that √ for all j and t = C0 K 2 log mtr(B)1/2 ,  P Y T B 1/2 x0j  >t ≤ 2 exp −c min tr(B) kBk2 ≥ log m; Similarly, t2 t , 4 K tr(B) K 2 kBk1/2 !! , 2 ≤ ≤ 2 exp −c min C02 log m, C0 log1/2 m !! p tr(B) 1/2 kBk2  2 2 exp −c min(C0 , C0 ) log m ≤ 2 exp (−4 log m) . imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 .(C.4) 72 Rudelson and Zhou/Errors-in-variables √ Let v, w ∈ S m−1 . Thus we have by Lemma 32, for t0 = C0 M K n log m, τ = 1/2 √ A e C0 K 2 n log m, wj = A1/2 e j and n ≥ log m, k jk 2   p  M T T P ∃j,  Z1 wj > t0 ≤ P ∃j, Y Z1 wj > C0 M K n log m K   p ≤ mP Y T Z1 wj > C0 K 2 n log m    2  τ τ , =: V = exp(log m)P eT1 Z0T Z1 wj > τ ≤ 2 exp −c min nK 4 K 2 where ≤ V ≤ ≤ √ √     (C0 K 2 n log m)2 C0 K 2 n log m 2 exp −c min + log m nK 4 K2    √ 2m exp −c min C02 log m, C0 log1/2 m n  2m exp −c min(C02 , C0 ) log m ≤ 2 exp (−3 log m) . Therefore we have with probability at least 1 − 4/m3 , 1 Z2T B 2  ∞ 1 A 2 Z1T  ∞ := := ≤ ≤ max h T B 1/2 Z2 , ej i ≤ t0 = C0 M K p j=1,...,m tr(B) log m max h A1/2 ej , Z1T  i j=1,...,m max h wj , Z1T  i p 1/2 n log m. a1/2 max t0 = amax C0 M K max j=1,...,m A1/2 ej 2 j=1,...,m The “moreover” part follows exactly the same arguments as above. Denote by β̄ ∗ := β ∗ / kβ ∗ k2 ∈ E ∩ S m−1 and wi := A1/2 ei / A1/2 ei 2 . By (C.3)   p P ∃i, h wi , Z1T B 1/2 Z2 β̄ ∗ i ≥ C0 K 2 log mtr(B)1/2 ≤ m   X p P h wi , Z1T B 1/2 Z2 β̄ ∗ i ≥ C0 K 2 log mtr(B) i=1   ≤ 2 exp −c min C02 log m, C0 log m + log m ≤ 2/m3 . √ √ Now for t = C0 K 2 log m kBkF and kBkF / kBk2 ≥ log m,   p P ∃ei : h ei , (Z T BZ − tr(B)Im )β̄ ∗ i ≥ C0 K 2 log m kBkF " !# t t2 ≤ 2m exp −c min ≤ 2/m3 . 2 , K 4 kBkF K 2 kBk2 imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 73 Rudelson and Zhou/Errors-in-variables By the two inequalities immediately above, we have with probability at least 1 − 4/m3 , = A1/2 Z1T B 1/2 Z2 β ∗ ∞   sup h wi , Z1T B 1/2 Z2 β̄ ∗ i ≤ kβ ∗ k2 max A1/2 ei ei 2 wi p p 2 ∗ 1/2 ≤ C0 K kβ k2 log mamax tr(B) X0T W β ∗ ∞ and (Z T BZ − tr(B)Im )β ∗ ∞ = (Z T BZ − tr(B)Im )β̄ ∗   ∗ T ∗ = kβ k2 sup h ei , (Z BZ − tr(B)Im )β̄ i ei p 2 ∗ ≤ C0 K kβ k2 log m kBkF . ∞ kβ ∗ k2 The last two bounds follow exactly the same arguments as above, except that we replace β ∗ with ej , j = 1, . . . , m and apply the union bounds to m2 instead of m events, and thus P (B10 ) ≥ 1 − 4/m2 .  Appendix D: Proof of Corollary 13 Now following (6.1), we have on event B0 ,    3 1 b ∗ γ b − Γβ ≤ ρn D2 + D2 √ K kβ ∗ k2 + D0 M 4 m ∞ where 2D1 ≤ 2 kAk2 + 2 kBk2 = D2 , and for (D00 )2 ≤ 2 kBk2 + 2amax , q 2(kBk2 + amax ) ≤ 2(amax + kBk2 ) = D2 , D0 ≤ D00 ≤ 1/2 and D00 τB 1/2 ≤ (kBk2 1/2 + a1/2 max )τB 3 1 ≤ τB + (kBk2 + amax ) ≤ D2 2 4 1/2 given that under (A1) : τA = 1, kAk2 ≥ amax ≥ amax ≥ 1. Hence the lemma holds for m ≥ 16 and ψ = C0 D2 K (K kβ ∗ k2 + M ).  Appendix E: Proof of Corollary 14 1/2 1/2 Suppose that event B0 holds. Recall D00 = kBk2 + amax . Denote by ρn := q kAk kBk 1/2 C0 K lognm . By (6.1) and the fact that 2D1 := 2( √mF + √nF ) ≤ 2(kAk2 + √ √ 1/2 kBk2 )( τA + τB ) ≤ Doracle D00 , b ∗ γ b − Γβ ∞ 1 1/2 ≤ D00 KτB kβ ∗ k2 ρn + 2D1 K √ kβ ∗ k∞ ρn + D0 M ρn m   D oracle 1/2 0 ∗ ≤ D0 K kβ k2 ρn τB + √ + D0 M ρn m imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 74 Rudelson and Zhou/Errors-in-variables The corollary is thus proved.  Appendix F: Proof of Lemma 15 In view of Remark F.1, Condition (6.5) implies that (7.5) in Theorem 26 holds for k = s0 and ε = 2M1 A . Now, by Theorem 26, we have ∀u, v ∈ E ∩ S m−1 , under (A1) and (A3), condition (7.1) holds under event A0 , and so long as mn ≥ 4096C02 D22 K 4 log m/λmin (A)2 , r log m T 2 =: δ with u ∆v ≤ 8C$(s0 )ε + 2C0 D2 K mn λmin (A) λmin (A) 3 1 δ ≤ + = λmin (A) ≤ , 16 32 32 8 which holds for all 1 1 1 λmin (A) := ≤ 2 64C$(s0 ) 2MA 128C    with P (A0 ) ≥ 1 − 4 exp −c2 ε2 Ktr(B) − 2 exp −c2 ε2 Kn4 − 6/m3 . 4 kBk ε≤ 2 Hence, by Corollary 25, ∀θ ∈ Rm , 2 2 b A θ ≥ α kθk − τ kθk θT Γ 2 1 where α = 85 λmin (A) and α e= 2 2 bA θ ≤ α and θT Γ e kθk2 + τ kθk1 , 11 8 λmax (A) and τ = 3 λmin (A) . 8 s0 Now for s0 ≥ 32 as defined in (2.6), we have and s0 ≤ s0 + 1 ≥ λ2min (A) n log m 1024C 2 $(s0 )2 n λ2min (A) log m 1024C 2 $2 (s0 + 1) (F.1) (F.2) given that τB + ρmax (s0 + 1, A) = O(λmax (A)) in view of (2.5) and (A3). Thus 384C 2 $(s0 )2 log m ≤τ λmin (A) n = ≤ ≤ 3 λmin (A) 8 s0 33 3 λmin (A) 32(s0 + 1) 8 s0 396C 2 $2 (s0 + 1) log m . λmin (A) n The lemma is thus proved in view of Remark F.1.  imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 75 Rudelson and Zhou/Errors-in-variables Remark F.1. Clearly the condition on tr(B)/ kBk2 as stated in Lemma 15 ensures , that we have for ε = 2M1 A and s0  M 2 4n log m A ε2 tr(B) K 4 kBk2 and hence   2 tr(B) exp −c2 ε 4 ≤ K kBk2   3em ε2 0 4 s0 c log K K4 ε2 s0 ε   6emM A ≥ c0 s0 log , s0 ≥   6emMA exp −c c2 s0 log s0    4n 3eMA3 m log m  exp −c3 2 log . MA log m 2n  0 F.1. Comparing the two type of RE conditions in Theorems 3 and 4 We define Cone(d0 , k0 ), where 0 < d0 < m and k0 is a positive number, as the set of vectors in Rm which satisfy the following cone constraint: Cone(d0 , k0 ) = {x ∈ Rm | ∃I ∈ {1, . . . , m}, |I| = d0 s.t. kxI c k1 ≤ k0 kxI k1 } . For each vector x ∈ Rm , let T0 denote the locations of the d0 largest coefficients of x in absolute values. The following elementary estimate [38] will be used in conjunction with the RE condition. Lemma 33. For each vector x ∈ Cone(d0 , k0 ), let T0 denotes the locations of the d0 largest coefficients of x in absolute values. Then kxk kxT0 k2 ≥ √ 2 . 1 + k0 (F.3) Lemma 34. Suppose all conditions in Lemma 15 hold. Let k0 := 1 + λ. Suppose that  d0 = o s0 /64(1 + 3λ/4)2 . Now suppose that τ (1 + 3k0 )2 2d0 = 2τ (4 + 3λ)2 d0 ≤ α/2. b A ) condition holds on Γ b A in the sense that Then on event A0 , we have RE2 (2d0 , 3k0 , Γ min bA x xT Γ 2 x∈Cone(2d0 ,3k0 ) kxT k 0 2 ≥ α . 2 (F.4) Under (A2) and (A3), we could set d0 such that for some large enough constant CA ,  2  n λmin (A) n d0 ≤ =O (F.5) CA κ(A)2 log m $2 (s0 + 1) log m where κ(A) := λmax (A) λmin (A) , so that d0 = O(s0 ) and (F.4) holds. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 76 Rudelson and Zhou/Errors-in-variables Proof. Now following the proof Lemma 1, Part I. We have on A0 , the Lower-RE condition holds for ΓA . Thus for x ∈ Cone(2d0 , 3k0 ) ∩ S m−1 and τ (1 + 3k0 )2 2d0 ≤ α/2, 2 2 2 kxk1 ≤ (1 + 3k0 )2 kxT0 k1 ≤ (1 + 3k0 )2 2d0 kxT0 k2 . Thus bA x xT Γ ≥  ≥  ≥ 2 2 α kxk2 − τ kxk1   2 2 α kxk2 − τ (1 + 3k0 )2 2d0 kxT0 k2  α 2 2 α − τ (1 + 3k0 )2 2d0 kxT0 k2 ≥ kxT0 k2 . 2 Thus (F.4) holds. Now (F.5) follows from (F.1), which holds by definition of s0 as in (2.6), where s0 is tightly bounded in the sense that both (F.1) and (F.2) need to hold.  Remark F.2. We note that (F.4) can be understood topbe the RE(2d0 , 3k0 ) condition b A . In view of Lemma 15, it is clear that for d0  n/ log m, it holds that on Γ 4d0 (4 + 3λ)2 = o(s0 ) given that τ s0 = O(α) on event A0 ; indeed, we have by Lemma 15 the Lower-RE b A := AT A − tr(B)I b condition holds for Γ m , with α, τ > 0 such that curvature α = 3 λmin (A) 5 λmin (A) and tolerance τ := , 8 8 s0 where recall s0 ≥ 32 is as defined in (2.6); moreover, we replaced the parameter 0 ,A)+τB MA  ρmaxλ(s with κ(A) in view of (2.5) and (A3). min (A) Appendix G: Proof of Theorem 16 Denote by β = β ∗ . Let S := supp β, d = |S| and υ = βb − β, where βb is as defined in (1.7). We first show Lemma 35, followed by the proof of Theorem 16. Lemma 35. [4, 30] Suppose that (6.7) holds. Suppose that there exists a parameter ψ such that r r √ ψ log m log m dτ ≤ and λ ≥ 4ψ , b0 n n where b0 , λ are as defined in (1.7). Then kυS c k1 ≤ 3 kυS k1 . imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 77 Rudelson and Zhou/Errors-in-variables b we have Proof. By the optimality of β, λ kβk1 − λ βb ≥ 1 = = Hence, we have for λ ≥ 4ψ 1 b υ Γυ 2 ≤ ≤ q 1 bb b β Γβ − 2 1 b υ Γυ + 2 1 b υ Γυ − 2 1 b β Γβ − h γ b, v i 2 b i − h υ, γ h υ, Γβ bi b i. h υ, γ b − Γβ log m n ,   b i + λ kβk − βb h υ, γ b − Γβ 1 1   b kυk1 . b − Γβ + γ λ kβk1 − βb (G.1) ∞ 1 Hence b υ Γυ  ≤ λ 2 kβk1 − 2 βb  ≤ λ 2 kβk1 − 2 βb  r + 2ψ 1 log m kυk1 n  (G.2) 1 kυk1 2 + 1 1 ≤ λ (5 kυS k1 − 3 kυS c k1 ) , 2 (G.3) where by the triangle inequality, and βS c = 0, we have 2 kβk1 − 2 βb + 1 1 kυk1 2 = ≤ ≤ 1 1 kυS k1 + kυS c k1 2 2 1 1 1 2 kυS k1 − 2 kυS c k1 + kυS k1 + kυS c k1 2 2 1 (5 kυS k1 − 3 kυS c k1 ) . (G.4) 2 2 kβS k1 − 2 βbS − 2 kυS c k1 + We now give a lower bound on the LHS of (G.1), applying the lower-RE condition as in Definition 2.2, b υ T Γυ Tb and hence − υ Γυ 2 2 2 ≥ α kυk2 − τ kυk1 ≥ −τ kυk1 √ 2 ≤ kυk1 τ ≤ kυk1 2b0 dτ r r ψ log m log m ≤ kυk1 2b0 = kυk1 2ψ b0 n n 1 ≤ λ(kυS k1 + kυS c k1 ), 2 where we use the assumption that r √ ψ log m dτ ≤ and kυk1 ≤ βb b0 n 1 (G.5) √ + kβk1 ≤ 2b0 d, imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 78 Rudelson and Zhou/Errors-in-variables which holds by the triangle inequality and the fact that both βb and β have `1 norm √ being bounded by b0 d. Hence by (G.3) and (G.5) 0 ≤ ≤ ≤ b + 5 λ kυS k − 3 λ kυS c k −υ Γυ 1 1 2 2 1 3 1 5 λ kυS k1 + λ kυS c k1 + λ kυS k1 − λ kυS c k1 2 2 2 2 3λ kυS k1 − λ kυS c k1 . (G.6) (G.7) Thus we have kυS c k1 ≤ 3 kυS k1 , and the lemma holds.  Proof of Theorem 16. Following the conclusion of Lemma 35, we have √ kυk1 ≤ 4 kυS k1 ≤ 4 d kυk2 . (G.8) Moreover, we have by the lower-RE condition as in Definition 2.2 b υ T Γυ 2 2 1 2 α kυk2 , 2 2 ≥ α kυk2 − τ kυk1 ≥ (α − 16dτ ) kυk2 ≥ (G.9) where the last inequality follows from the assumption that 16dτ ≤ α/2. Combining the bounds in (G.9), (G.8) and (G.2), we have 1 2 α kυk2 2 Tb  ≤ υ Γυ ≤ λ 2 kβk1 − 2 βb  r + 2ψ 1 √ 5 λ kυS k1 ≤ 10λ d kυk2 . 2 √ And thus we have kυk2 ≤ 20λ d. The theorem is thus proved. log m kυk1 n ≤  Appendix H: Proofs for the Lasso-type estimator Let M+ = 32C$(s0 + 1) and $(s0 + 1) = ρmax (s0 + 1, A) + τB =: D. λmin (A) By definition of s0 , we have s0 MA2 ≤ (s0 + 1) ≥ given that √ 4n log m and n 2 log m M+ s0 + 1$(s0 + 1) ≥ λmin (A) 32C r n . log m (H.1) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 79 Rudelson and Zhou/Errors-in-variables To prove the first inequality in (6.6) and (6.10), we need to show that d≤ α α s0 5s0 = = . 32τ 32 λmin (A) − α 96 The first inequality in (6.6) holds so long as n 1 1 s0 + 1 5(s0 + 1) 5s0 ≤ ≤ , 2 log m ≤ 20 M+ 20 100 96 d ≤ (H.2) where the last inequality holds so long as s0 ≥ 24. To prove the second inequality in (6.10), we need to show that  2 1 log m ψ 3α 5 , where τ = for α = λmin (A), d≤ 2 τ n b0 5 s0 8 which in turn ensures that the second inequality in (6.6) holds for λ ≥ 4ψ, for ψ appropriately chosen. We use the following inequality in the proof of Lemma 17 and Lemma 18:  2 s0 + 1 64 1 8 1 n n ≥ ≥ 2 2 2 α 25λmin (A) M+ log m 5 32C$(s0 + 1) log m   2 2 1 1 n n = ≥ , (H.3) 20CD log m 10CD2 log m where we use the fact that D = $(s0 +1) = ρmax (s0 +1, A)+τB ≤ kAk2 +kBk2 := D2 /2. H.1. Proof of Lemma 17 1 2 . The first inequality in (6.10) holds in view of (H.2). Recall that 40M+ √ ∗ 2 2 kβ k2 ≥ φb0 by definition of 0 < φ ≤ 1. Let C = C0 / c0 . By (6.9) and (H.3), Let CA = b20 ≥  2 1 C0 D2 n n ≤ Dφ 2 log m 40M+ CD2 log m  2 25 32 32 n 1 C02 D22 Dφ 2 log m 9 33 33 M+ 10CD2  2 25 32 32(s0 + 1) (s0 + 1) log m ψ 9 33 33 α2 n b0   2 25 (s0 )2 log m ψ , 9 α2 n b0 d ≤ CA c0 Dφ ≤ ≤ ≤ where C02 D22 Dφ = C02 D22 ≤  K 2 M2 + K 4φ b20 K2 C02 D22 2 (M b0 ∗  2 + K kβ k2 ) =  ψ b0 2 , (H.4) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 80 Rudelson and Zhou/Errors-in-variables for ψ = C0 D2 K(K kβ ∗ k2 +M ) as defined in (3.6). We have shown that (6.10) indeed holds, and the lemma is thus proved.  H.2. Proof of Lemma 18 5s0 α 1 Let CA = 160M 2 . The proof for d ≤ 32τ = 96 follows from (H.2). In order to + show the second inequality, we follow the same line of arguments except that we need to replace one inequality (H.4) with (H.5). By definition of D00 , we have kBk2 +amax ≤ (D00 )2 ≤ 2(kBk2 + amax ). Let D = $(s0 + 1).  0 2 D By (6.11), (H.1) and (H.3), we have for c00 ≤ D0 ,  2 n 1 n C0 D00 d ≤ CA c c Dφ ≤ Dφ 2 log m log m 160M+ CD 2   n 1 25 322 C02 (D00 )2 Dφ ≤ 2 log m 2 9 33 20CD M+  2  2 25 322 (s0 + 1)2 log m ψ 25 (s0 )2 log m ψ ≤ ≤ , 9 332 α2 n b0 9 α2 n b0 0 00 where assuming that s0 ≥ 32, we have the following inequality by definition of s0 and α = 58 λmin (A), s0 + 1 log m α2 n  ≥ 8 1 5 32C$(s0 + 1) 2  ≥ 1 20CD 2 . We now replace (H.4) with C02 (D00 )2 Dφ = ≤ where Dφ := C02 (D00 )2 K4 b20  M2 + τB+ φb20 K2  2  ψ  2 2  +/2 ∗ 2 0 2K C0 (D0 ) 2 M + τB K kβ k2 ≤ b0 b0  2  4 K 2 M2 K M  + 4 + ∗ 2 + τ K φ ≤ + τ kβ k B B 2 b20 b20 K2 , (H.5)   +/2 and ψ = C0 D00 K KτB kβ ∗ k2 + M K is now as defined in (4.2). The lemma is thus proved.  Remark H.1. Throughout this paper, we assume that C0 is a large enough constant such that for c as defined in Theorem 31, c min{C02 , C0 } ≥ 4. (H.6) imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 81 Rudelson and Zhou/Errors-in-variables By definition of s0 , we have for $2 (s0 ) ≥ 1, c0 λ2min (A) n , and hence 1024C02 log m λ2 (A) n c0 λ2min (A) n ≤ min 2 =: š0 . s0 ≤ 2 1024C0 log m 1024C0 log m √ Remark H.2. The proof shows that one can take C = C0 / c0 , and take s0 $2 (s0 ) ≤ V = 3eMA3 /2 = 3e643 C 3 $3 (s0 ) 3e643 C03 $3 (š0 ) . ≤ 2λ3min (A) 2(c0 )3/2 λ3min (A) Hence a sufficient condition on r(B) is:   n 64C0 $(š0 ) 3em log m r(B) ≥ 16c0 K 4 3 log √ + log . log m 2n c0 λmin (A) (H.7) Appendix I: Proofs for the Conic Programming estimator We next provide proof for Lemmas 19 to 21 in this section. I.1. Proof of Lemma 19 Suppose event B0 holds. Then by the proof of Corollary 13, 1 T n X (y ∗ b − Xβ ∗ ) + n1 tr(B)β ∞ b ∗ γ b − Γβ = ∞ r ≤ 2 ∗ 2C0 D2 K kβ k2 log m + C0 D0 KM n r log m n =: µ kβ ∗ k2 + ω. The lemma follows immediately for the chosen µ, ω as in (6.12) given that (β ∗ , kβ ∗ k2 ) ∈ Υ.  I.2. Proof of Lemma 20 bb By optimality of (β, t), we have βb 1 + λ βb 2 ≤ βb 1 + λb t ≤ kβ ∗ k1 + λ kβ ∗ k2 . Thus we have for S := supp(β ∗ ), βb 1 = βbS c 1 + βbS ≤ 1 kβ ∗ k1 + λ(kβ ∗ k2 − βb ). 2 imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 82 Rudelson and Zhou/Errors-in-variables Now by the triangle inequality, βbS c 1 = kvS c k1 ≤ kβS∗ k1 − βbS 1 + λ(kβ ∗ k2 − βb ) 2 ∗ ≤ kvS k1 + λ(kβ k2 − βb ) ≤ kvS k1 + λ(kβ ∗ k2 − βbS 2 = ) 2 kvS k1 + λ kvS k2 ≤ (1 + λ) kvS k1 . The lemma thus holds given b t ≤ 1 1 (kβ ∗ k1 − βb ) + kβ ∗ k2 ≤ kvk1 + kβ ∗ k2 . λ λ 1  I.3. Proof of Lemma 21 Recall the following shorthand notation: √ √ D0 = ( τB + amax ) and D2 = 2(kAk2 + kBk2 ). b = tr(B), b First we rewrite an upper bound for v = βb − β ∗ , D = tr(B) and D X0T X0 v ∞ = (X − W )T X0 (βb − β ∗ ) ≤ b βb X T (X βb − y) − D + b − D)βb (D ∞ ∞ ∞ ≤ X T X0 (βb − β ∗ ) + XT  + W T X0 v ∞ + W T X0 v + (X T W − D)βb ∞ ∞ , ∞ where X T X0 (βb − β ∗ ) ∞ ≤ X T (X0 βb − y + ) ∞ T = X ((X − W )βb − y) ≤ b βb X T (X βb − y) − D T + (X W − D)βb ∞ ∞ ∞ + XT  + XT  ∞ ∞ b − D)βb + (D ∞ . On event B0 , we have by Lemma 20 and the fact that βb ∈ Υ, b βb I := γ b−Γ ∞ = 1 T n X (y b + 1D bb − X β) n β ∞ ≤ µb t+ω 1 ≤ µ( kvk1 + kβ ∗ k2 ) + ω λ 1 = 2D2 Kρn ( kvk1 + kβ ∗ k2 ) + D0 ρn M ; λ imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 ∞ 83 Rudelson and Zhou/Errors-in-variables and on event B4 , II 1 n := XT  ∞ 1/2 ρn M (amax ≤ ≤ + 1 n( √ X0T  ∞ + WT ∞ ) τB ) = D0 ρn M . Thus on event B0 , we have 1 1 I + II ≤ 2D2 Kρn ( kvk1 + kβ ∗ k2 ) + 2D0 ρn M = µ( kvk1 + kβ ∗ k2 ) + 2ω. λ λ Now on event B6 , we have for 2D1 ≤ D2 b − D)βb IV := (D ≤ ∞ b −D D βb ∞ 1 ≤ 2D1 K √ ρn (kβ ∗ k∞ + kvk∞ ) m 1 ≤ D2 K √ ρn (kβ ∗ k2 + kvk1 ). m On event B5 ∩ B10 , we have III := 1 n (X T W − D)βb ∞ ≤ 1 n (X T W − D)β ∗ ≤ 1 n 1 n X0T W β ∗ ∞ T 1 n W T X0 v ∞ + 1 n T (X T W − D)v (W W − D)β ∞ ∗ ∞  (Z BZ − tr(B)Im ) max + X0T W max kvk1   kBkF √ 1/2 √ + τB amax (kvk1 + kβ ∗ k2 ), ≤ ρn K n √ 1/2 ≤ n1 W T X0 max kvk1 ≤ ρn K τB amax kvk1 . + and V = + 1 n ∞ Thus we have on B0 ∩ B10 , III + IV + V   2 ≤ ρn K kBk2 + τB + amax + √ (kAk2 + kBk2 ) (kvk1 + kβ ∗ k2 ) m ≤ ρn K (4 kBk2 + 3 kAk2 ) (kvk1 + kβ ∗ k2 ) ≤ 2D2 Kρn (kvk1 + kβ ∗ k2 ) ≤ µ(kvk1 + kβ ∗ k2 ), where D0 ≤ D2 and τA = 1, and 1 T n X0 X0 v ∞ ≤ I + II + III + IV + V 1 µ( kvk1 + kβ ∗ k2 ) + 2D0 M ρn + µ(kvk1 + kβ ∗ k2 ) λ 1 2µ kβ ∗ k2 + µ( + 1) kvk1 + 2ω. λ ≤ ≤ The lemma thus holds.  Appendix J: Proof for Theorem 7 We prove Lemmas 22 to 24 in this section. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 84 Rudelson and Zhou/Errors-in-variables J.1. Proof of Lemma 22 Suppose event B0 holds. Then by the proof of Corollary 14, we have for D00 = 1/2 1/2 kBk2 + amax , b ∗ γ b − Γβ ≤ ∞ +/2 D00 τB Kρn kβ ∗ k2 + D0 M ρn , √ +/2 1/2 1/2 oracle where τB = τB + D√ and Doracle = 2(kBk2 + kAk2 ). The lemma follows m immediately for µ, ω as chosen in (6.16).  J.2. Proof of Lemma 23 Suppose event B6 holds. We first show (6.17) and (6.18). Recall rm,m := 2C0 K 2 1/2 2C0 K 2 log m m q log m mn . By Lemma 5, we have on event B6 , |b τB − τB | ≤ D1 rm,m . Moreover, we have under (A1), 1 = τA ≤ D1 := kBk kAkF Doracle 2 + 1/2F ≤ kAk2 + kBk2 ≤ ( ) , 2 m1/2 n in view of (C.2). Hence p D1 ≤ Doracle 1/2 1/2 = kBk2 + kAk2 . 2 By definition and construction, we have τB , τbB ≥ 0, 1/2 1/2 τbB − τB and 1/2 1/2 ≤ 2 τbB − τB ≤ 1/2 1/2 τbB + τB , 1/2 1/2 1/2 1/2 (b τB + τB )(b τB − τB ) = |b τB − τB | . Thus, 1/2 1/2 τbB − τB ≤ p p Doracle 1/2 1/2 |b τB − τB | ≤ D1 rm,m ≤ rm,m 2 √ 1/2 1/2 and for C6 ≥ Doracle ≥ 2 D1 and Doracle = 2(kAk2 + kBk2 ), 1/2 τbB − Doracle 1/2 Doracle 1/2 1/2 1/2 rm,m ≤ τB ≤ τbB + rm,m . 2 2 +/2 Thus we have for τB 1/2 rm,m ≥ p (J.1) as defined in (4.1), (J.1) and the fact that 2C0 K √ (log m)1/4 √ ≥ 2/ m for m ≥ 16 and C0 ≥ 1, m imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 ≥ 85 Rudelson and Zhou/Errors-in-variables the following inequalities hold: for K ≥ 1, +/2 1/2 := τB + Doracle m−1/2 Doracle 1/2 Doracle 1/2 1/2 ≤ τbB + rm,m + rm,m 2 2 1/2 1/2 1/2 ≤ τbB + Doracle rm,m ≤ τeB , τB 1/2 1/2 1/2 1/2 1/2 ≥ τbB +Doracle rm,m as in (4.11). where the last inequality holds by the choice of τeB Moreover, by (J.1), τeB (J.2) 1/2 1/2 := τbB + C6 rm,m ≤ τB + Doracle 1/2 1/2 rm,m + C6 rm,m 2 3 1/2 1/2 , τB + C6 rm,m 2 1/2 1/2 2 := (b τB + C6 rm,m ) ≤ 2b τB + 2C62 rm,m ≤ and τeB ≤ 2τB + 2D1 rm,m + 2C62 rm,m ≤ 2τB + 2 Doracle rm,m + 2C62 rm,m ≤ 2τB + 3C62 rm,m . 2 2 Thus (6.17) and (6.18) hold given that 2D1 ≤ Doracle /2 ≤ C62 /2. Finally, we have for τB− as defined in (4.8), 1/2 1/2 τ + 3 C6 rm,m 3 1/2 1/2 1/2 )τB− ≤ B1/2 2 ≤ 1. τeB τB− ≤ (τB + C6 rm,m 1/2 2 τB + 2C6 rm,m  Remark J.1. The set Υ in our setting is equivalent to the following: for µ, ω as defined in (4.11) and β ∈ Rm ,  b Υ = (β, t) : n1 X T (y − Xβ) + n1 tr(B)β ≤ µt + ω, kβk2 ≤ t . (J.3) ∞ J.3. Proof of Lemma 24 For the rest of the proof, we will follow the notation in the proof for Lemma 21. Notice that the bounds as stated in Lemma 20 remain true with ω, µ chosen as in (6.16), so long as (β ∗ , kβ ∗ k2 ) ∈ Υ. This indeed holds by Lemma 22: for ω and µ (4.11) as chosen in Theorem 7, we have by (J.2), 1/2 +/2 +/2 µ  D00 τeB Kρn ≥ D00 Kρn τB , where τB √ Doracle = ( τB + √ ), m which ensures that (β ∗ , kβ ∗ k2 ) ∈ Υ by Lemma 22. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 86 Rudelson and Zhou/Errors-in-variables On event B0 , we have by Lemma 20 and the fact that βb ∈ Υ as in (J.3) I + II 1 n XT  := b βb γ b−Γ ∞ ≤ 1 T n X (y b + 1D bb − X β) n β ≤ + ∞ ∞ + ω ≤ µb t + 2ω 1 µ( kvk1 + kβ ∗ k2 ) + 2ω, λ for ω, µ as chosen in (4.11). Now on event B6 , we have under (A1), b − D)βb IV := (D ∞ ≤ b −D D βb 1 ≤ 2D1 K √ ρn (kβ ∗ k∞ + kvk∞ ) m ∞ Doracle ≤ D00 √ Kρn (kβ ∗ k2 + kvk1 ), m 1/2 where 2D1  ≤ Doracle D00 for 1 ≤ D00 := kBk2 1/2 1/2 Doracle = 2 kBk2 + kAk2 . Hence 1/2 + amax , for amax ≥ τA = 1 and  √  1/2 ∗ III + IV + V ≤ ρn K τB kBk2 + a1/2 max (kvk1 + kβ k2 ) ≤ ≤ ≤ ≤ √ 1 +2D1 K √ ρn (kβ ∗ k2 + kvk1 ) + ρn K τB a1/2 max kvk1 m √ √ Doracle D00 Kρn (kvk1 + kβ ∗ k2 )( τB + √ ) + ρn K τB a1/2 max kvk1 m √ +/2 D00 Kρn τB (kvk1 + kβ ∗ k2 ) + D00 Kρn τB kvk1 r log m 1/2 Doracle C0 D00 K 2 )(2 kvk1 + kβ ∗ k2 ) (τB + √ n m µ(2 kvk1 + kβ ∗ k2 ), for µ as defined in (4.11) in view of (J.2). Thus we have I + II + III + IV + V 1 ≤ µ( kvk1 + kβ ∗ k2 ) + 2ω + µ(2 kvk1 + kβ ∗ k2 ) λ 1 = 2µ((1 + ) kvk1 + kβ ∗ k2 ) + 2ω, 2λ and the improved bound as stated in the Lemma thus holds.  Appendix K: Some geometric analysis results Let us define the following set of vectors in Rm : Cone(s) := {υ : kυk1 ≤ √ s kυk2 } imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 87 Rudelson and Zhou/Errors-in-variables For each vector x ∈ Rm , let T0 denote the locations of the s largest coefficients of x in absolute values. Any vector x ∈ S m−1 satisfies: xT0c ∞ ≤ kxT0 k1 /s ≤ kxT0 k2 √ . s (K.1) We need to state the following result from [33]. Let S m−1 be the unit sphere in Rm , for 1 ≤ s ≤ m, Us := {x ∈ Rm : | supp(x)| ≤ s}. (K.2) The sets Us is an union of the s-sparse vectors. The following three lemmas are wellknown and mostly standard; See [33] and [30]. Lemma 36. For every 1 ≤ s ≤ m and every I ⊂ {1, . . . , m} with |I| ≤ s,   [ p |I|B1m ∩ S m−1 ⊂ 2 conv(Us ∩ S m−1 ) =: 2 conv  EJ ∩ S m−1  |J|≤s and moreover, for ρ ∈ (0, 1],  p |I|B1m ∩ ρB2m ⊂ (1 + ρ) conv(Us ∩ B2m ) =: (1 + ρ) conv   [ EJ ∩ S m−1  . |J|≤s Proof. Fix x ∈ Rm . Let xT0 denote the subvector of x confined to the locations of its s largest coefficients in absolute values; moreover, we use it to represent its 0-extended version x0 ∈ Rm such that x0T c = 0 and x0T0 = xT0 . Throughout this proof, T0 is understood to be the locations of the s largest coefficients in absolute values in x. m Moreover, let (x∗i )m i=1 be non-increasing rearrangement of (|xi |)i=1 . Denote by √ m L = sB1 ∩ ρB2m and   [  R = 2 conv  EJ ∩ B2m  = 2 conv E ∩ B2m . |J|≤s Any vector x ∈ Rm satisfies: xT0c ∞ ≤ kxT0 k1 /s ≤ kxT0 k2 √ . s (K.3) It follows that for any ρ > 0, s ≥√1 and for all z ∈ L, we have the ith largest coordinate in absolute value in z is at most s/i, and sup h x, z i ≤ z∈L max h xT0 , z i + max√ h xT0c , z i kzk2 ≤ρ ≤ ρ kxT0 k2 + xT0c ≤ kxT0 k2 (ρ + 1) , kzk1 ≤ s √ ∞ s imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 88 Rudelson and Zhou/Errors-in-variables where clearly maxkzk2 ≤ρ h xT0 , z i = ρ EJ , sup h x, z i Ps ∗2 1/2 . And denote by S J i=1 (xi ) = (1 + ρ) max max h x, z i = (1 + ρ) kxT0 k2 , := S m−1 ∩ J:|J|≤s z∈S J z∈R given that for a convex function h x, z i , the maximum happens at an extreme point; x and in this case, it happens for z such that z is supported on T0 , such that zT0 = x T0 k T0 k 2 and zT0c = 0.  Lemma 37. Let 1/5 > δ > 0. Let E = ∪|J|≤s EJ for 0 < s < m/2 and k0 > 0. Let ∆ be a m × m matrix such that uT ∆v ≤ δ,  √ m Then for all v ∈ sB1 ∩ B2m , ∀u, v ∈ E ∩ S m−1 υ T ∆υ (K.4) ≤ 4δ. (K.5) Proof. First notice that max υ∈ √ sB1m ∩B2m T  υ ∆υ ≤ max w,u∈ √ sB1m ∩B2m T  w ∆u . (K.6) Now that we have decoupled u and w on the RHS of (K.6), we first fix u. T Then for any fixed u ∈ S m−1 and matrix ∆ ∈ Rm×m , f (w) S= w ∆u is a convex   √ m m−1 function of w, and hence for w ∈ sB1 ∩ B2m ⊂ 2 conv E ∩ S , J |J|≤s max w∈ √ sB1m ∩B2m T  w ∆u ≤ 2 = 2 max w∈conv (E∩S m−1 ) max w∈E∩S m−1 wT ∆u wT ∆u , where the maximum occurs at an extreme point of the set conv(E ∩ S m−1 ) because of the convexity of the function f (w). Clearly the RHS of (K.6) is bounded by max u,w∈ √ sB1m ∩B2m T  w ∆u = max u∈ √ ≤ 2 2 u∈ where the function g of u ∈ √  max u∈ = sB1m ∩B2m √ max  √ m w∈ sB1 ∩B2m max sB1m ∩B2m  max  g(u), √ sB1m ∩B2m w∈ E∩S m−1 wT ∆u T  w ∆u  sB1m ∩ B2m is defined as g(u) = max w∈ E∩S m−1 T  w ∆u ; imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 89 Rudelson and Zhou/Errors-in-variables g(u) is convex since it is the maximum of a function fw (u) := wT ∆u which is convex in u for each w ∈ (E ∩ S m−1 ). S   √ m−1 =: 2 conv E ∩ S m−1 , Thus we have for u ∈ ( sB1m ∩B2m ) ⊂ 2 conv |J|≤s EJ ∩ S max u∈  √ m sB1 ∩B2m g(u) ≤ 2 = 2 = 2 max u∈conv (E∩S m−1 ) max u∈E∩S m−1 g(u) g(u) max (K.7) max u∈E∩S m−1 w∈E∩S m−1 wT ∆u ≤ 4δ, (K.8) where (K.7) holds given that the maximum occurs at an extreme point of the set conv(E ∩ B2m ), because of the convexity of the function g(u).  Corollary 38. Suppose all conditions in Lemma 37 hold. Then ∀υ ∈ Cone(s), υ T ∆υ ≤ 2 4δ kυk2 . (K.9) Proof. It is sufficient to show that ∀υ ∈ Cone(s) ∩ S m−1 , υ T ∆υ ≤ 4δ. Denote by Cone := Cone(s). Clearly this set of vectors satisfy:  √ m sB1 ∩ B2m . Cone ∩ S m−1 ⊂ Thus (K.9) follows from (K.5).  Remark K.1. Suppose we relax the definition of Cone(s) to be: √ Cone(s) := {υ : kυk1 ≤ 2 s kυk2 }. Clearly, Cone(s, 1) ⊂ Cone(s). given that ∀u ∈ Cone(s, 1), we have √ √ kuk1 ≤ 2 kuT0 k1 ≤ 2 s kuT0 k2 ≤ 2 s kuk2 . Lemma 39. Suppose all conditions in Lemma 37 hold. Then for all υ ∈ Rm , 2 υ T ∆υ ≤ 4δ(kυk2 + 1 2 kυk1 ). s (K.10) Proof. The lemma follows given that ∀υ ∈ Rm , one of the following must hold: if υ ∈ Cone(s) υ T ∆υ ≤ otherwise υ T ∆υ ≤ 2 4δ kυk2 ; 4δ 2 kυk1 , s (K.11) (K.12) leading to the same conclusion in (K.10). imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 90 We have shown (K.11) in Lemma 37. Let Cone(s)c be the complement set of Cone(s) in Rm . That is, we focus now on the set of vectors such that √ Cone(s)c := {υ : kυk1 ≥ s kυk2 } √ v , and show that for u = s kvk 1 v T ∆v 2 kvk1 := 1 1 T u ∆u ≤ δ. s s Now, the last inequality holds by Lemma 37 given that   [ √ m u ∈ ( sB1 ∩ B2m ) ⊂ 2 conv  EJ ∩ B2m  |J|≤s and thus v T ∆v ≤ 2 kvk1 1 1 uT ∆u ≤ 4δ. sup s u∈√sB1m ∩B2m s  Appendix L: Proof of Corollary 25 First we show that for all υ ∈ Rm , (L.1) holds. It is sufficient to check that the condition (K.4) in Lemma 37 holds. Then, (L.1) follows from Lemma 39: for υ ∈ Rm , 2 υ T ∆υ ≤ 4δ(kυk2 + 1 3 1 2 2 2 kυk1 ) ≤ λmin (A)(kυk2 + kυk1 ). k 8 k (L.1) The Lower and Upper RE conditions thus immediately follow. The Corollary is thus proved.  Appendix M: Proof of Theorem 26 We first state the following preliminary results in Lemmas 40 and √ 41; their proofs appear in Section O. Throughout this section, the choice of C = C0 / c0 satisfies the conditions on C in Lemmas 40 and 41, where recall min{C0 , C02 } ≥ 4/c for c as defined in Theorem 31. For a set J ⊂ {1, . . . , m}, denote FJ = A1/2 EJ , where recall EJ = span{ej : j ∈ J}. Let Z be an n × m random matrix with independent entries 2 Zij satisfying EZij = 0, 1 = EZij ≤ kZij kψ2 ≤ K. Let Z1 , Z2 be independent copies of Z. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 91 Rudelson and Zhou/Errors-in-variables Lemma 40. Suppose all conditions in Theorem 26 hold. Let [ E= EJ ∩ S m−1 . |J|=k Suppose that for some c0 > 0 and ε ≤ r(B) := tr(B) kBk2 1 C, √ where C = C0 / c0 , ≥ c0 kK 4 log(3em/kε) . ε2 (M.1)   Then for all vectors u, v ∈ E∩S m−1 , on event B1 , where P (B1 ) ≥ 1−2 exp −c2 ε2 Ktr(B) 4 kBk 2 for c2 ≥ 2, uT Z T BZv − EuT Z T BZv ≤ 4Cεtr(B). Lemma 41. Suppose that ε ≤ 1/C, where C is as defined in Lemma 40. Suppose that (M.1) holds. Let [ [ E= EJ and F = FJ . (M.2) |J|=k |J|=k   Then on event B2 , where P (B2 ) ≥ 1 − 2 exp −c2 ε2 Ktr(B) for c2 ≥ 2, we have for 4 kBk 2 all vectors u ∈ E ∩ S m−1 and w ∈ F ∩ S m−1 , wT Z1T B 1/2 Z2 u Cεtr(B) ≤ 1/2 1/2 (1 − ε)2 kBk2 ≤ 4Cεtr(B)/kBk2 . In fact, the same conclusion holds for all y, w ∈ F ∩ S m−1 ; and in particular, for B = I, we have the following. Corollary 42. Suppose all conditions in Lemma 40 hold. Suppose that F = A1/2 E for E as defined in Lemma 40. Let n ≥ c0 kK 4 log(3em/kε) . ε2 (M.3)  Then on event B3 , where P (B3 ) ≥ 1 − 2 exp −c2 ε2 n K14 , we have for all vectors w, y ∈ F ∩ S m−1 and ε ≤ 1/C for C is as defined in Lemma 40, y T ( n1 Z T Z − I)w ≤ 4Cε. (M.4) We prove Lemmas 40 and 41 and Corollary 42 in Section O. We are now ready to prove Theorem 26. Proof of Theorem 26. b A − A := ∆ := Γ = Let 1 T nX X ( n1 X0T X0 − A) + b − n1 tr(B)I m−A 1 n  W T X0 + X0T W + 1 n  b W T W − tr(B)I m , imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 92 Rudelson and Zhou/Errors-in-variables where recall X0 = Z1 A1/2 . Notice that b A − A)υ = uT (X T X − tr(B)I b uT (Γ m − A)υ ≤ uT ( n1 X0T X0 − A)υ + uT n1 (W T X0 + X0T W )υ + uT ( n1 W T W − ≤ uT A1/2 n1 Z1T Z1 A1/2 υ − uT Aυ + uT n1 (W T X0 + X0T W )υ + uT ( n1 Z2T BZ2 − τB Im )υ + 1 n b tr(B) − tr(B) uT υ =: I + II + III + IV. A1/2 u For u ∈ E ∩ S m−1 , define h(u) := b tr(B) f Im )υ kA1/2 uk2 . The conditions in (M.1) and (M.3) hold for k. We first bound the middle term as follows. Fix u, υ ∈ E ∩ S m−1 . Then on event B2 , for Υ = Z1T B 1/2 Z2 , uT (W T X0 + X0T W )υ = uT Z2T B 1/2 Z1 A1/2 υ + uT A1/2 Z1T B 1/2 Z2 υ ≤ uT ΥT h(v) A1/2 v + h(u)T Υυ A1/2 u 2 ≤ 2 2 T max w Υυ  1/2 w∈F ∩S m−1 ,υ∈E∩S m−1 ≤ 8Cεtr(B) ρmax (k, A) kBk2 ρ1/2 max (k, A) . We now use Lemma 40 to bound both I and III. We have for C as defined in Lemma 40, on event B1 ∩ B3 , uT (Z2T BZ2 − tr(B)Im )υ ≤ 4Cεtr(B). Moreover, by Corollary 42, we have on event B3 , for all u, v ∈ E ∩ S m−1 , uT ( n1 X0T X0 − A)υ = uT A1/2 Z T ZA1/2 υ − uT Aυ = h(u)T ( n1 Z T Z − I)h(υ) ≤ 1 n A1/2 u A1/2 υ 2 2 maxw,y∈F ∩S m−1 wT (Z T Z − I)y ρmax (k, A) ≤ 4Cερmax (k, A). Thus we have on event B1 ∩ B2 ∩ B3 and for τB := tr(B)/n, ! 1/2  ρmax (k, A) I + II + III ≤ 4Cε ρmax (k, A) + 2τB + τB kBk2 ≤ 8Cε (τB + ρmax (k, A)) . On event B6 , we have for D1 as defined in Lemma 5, r IV ≤ |b τB − τB | ≤ 2C0 D1 K 2 The theorem thus holds by the union bound. log m . mn  imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 93 Rudelson and Zhou/Errors-in-variables Appendix N: Proof of Lemma 32 Lemma 43 is a well-known fact. Lemma 43. Let Auw := (u ⊗ w) ⊗ A, where u, w ∈ Sm−1 for m ≥ 2. Then kAuw k2 ≤ kAk2 and kAuw kF ≤ kAkF . Proof of Lemma 32. Let z1 , . . . , zn , z10 , . . . , zn0 ∈ Rm be the row vectors Z1 , Z2 respectively. Notice that we can write the quadratic form as follows: X uT Z1 A1/2 Z2T w = ui wj zi A1/2 zj0 i,j=1,m  vec ZT 1  T =: vec Z1  = vec ZT  =: vec ZT = uT ZAZ T w T   (u ⊗ w) ⊗ A1/2 vec ZT 2  T T 1/2 Auw vec Z2 ,   T (u ⊗ w) ⊗ A vec ZT  T Auw vec ZT where clearly by independence of Z1 , Z2 ,  Evec ZT 1 T   (u ⊗ w) ⊗ A1/2 vec ZT 2  T Evec { Z } (u ⊗ u) ⊗ A vec { Z } = 0, and =  tr (u ⊗ u) ⊗ A = tr(A). Thus we invoke (C.1) and Lemma 43 to show the concentration bounds on event { uT Z1 A1/2 Z2T w > t}:      2 t t    P uT Z1 A1/2 Z2T w > t ≤ 2 exp − min   2 , 1/2 1/2 2 K Auw K 4 Auw 2 F !! 2 t t ≤ 2 exp − min , . K 4 tr(A) K 2 A1/2 2 Similarly, we have by Theorem 31 and Lemma 43,  P uT ZAZ T w − EuT ZAZ T w > t ≤ 2 exp −c min ≤ 2 exp −c min The Lemma thus holds. t2 t 2 , K 2 kA 4 uw k2 K kAuw kF !! t2 t . 2 , K 4 kAkF K 2 kAk2 !!  imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 94 Rudelson and Zhou/Errors-in-variables Appendix O: Proof of Lemmas 40 and 41 and Corollary 42 tr(B) kBk2 . Let ε ≤ C1 where C is √ large enough so that cc0 C 2 ≥ 4, and hence the choice of C = C0 / c0 satisfies our need. Throughout the following proof, we denote by r(B) = Proof of Lemma 40. First we prove concentration bounds for all pairs of u, v ∈ Π0 , where Π0 ⊂ Sm−1 is an ε-net of E. Let t = CK 2 εtr(B). We have by Lemma 32, and the union bound,  P ∃u, v ∈ Π0 , uT Z T BZv − EuT Z T BZv > t " !# t t2 0 2 ≤ 2 |Π | exp −c min 2 , K 4 kBkF K 2 kBk2     CK 2 ε2 r(B) 2 ≤ 2 |Π0 | exp −c min C 2 , ε K4  ≤ 2 exp −c2 ε2 r(B)/K 4 , 2 where we use the fact that kBkF ≤ kBk2 tr(B) and   m 0 |Π | ≤ (3/ε)k ≤ exp(k log(3em/kε)), k while   CK 2 r(B) c min C 2 , ε2 4 ε K tr(B) kBk2 K 4 3em  3em  ≥ cC02 k log ≥ 4k log . kε kε = cC 2 ε2 Denote by B2 the event such that for Λ := sup v T Λu u,v∈Π0 1 T tr(B) (Z BZ ≤ − I), 0 Cε =: rk,n holds. A standard approximation argument shows that under B2 and for ε ≤ 1/2, y T Λx ≤ sup x,y∈Sm−1 ∩E The lemma is thus proved. Proof of Lemma 41. 0 rk,n ≤ 4Cε. (1 − ε)2 (O.1)  1/2 By Lemma 32, we have for t = Cεtr(B)/ kBk2 for imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 95 Rudelson and Zhou/Errors-in-variables √ C = C0 / c0 ,  2 2 C 2 tr(B) ε Cεtr(B) kBk2  ≤ exp −c min  , K 4 tr(B) K 2 kBk2    2 2 C ε rB CεrB , ≤ 2 exp −c min K4 K2     2 2 CK 2 4 ≤ 2 exp −c min C , ε rB /K . ε   P  wT Z1T B 1/2 Z2 u > t  Choose an ε-net Π0 ⊂ S m−1 such that [ Π0 = Π0J where Π0J ⊂ EJ ∩ S m−1 (O.2) |J|=k is an ε-net for EJ ∩ S m−1 and   m |Π0 | ≤ (3/ε)k ≤ exp(k log(3em/kε)). k Similarly, choose ε-net Π of F ∩ S m−1 of size at most exp(k log(3em/kε)). By the union bound and Lemma 32, and for K 2 ≥ 1,   1/2 P ∃w ∈ Π, u ∈ Π0 s.t. wT Z1T B 1/2 Z2 u ≥ Cεtr(B)/kBk2   ≤ |Π0 | |Π| 2 exp −c min CK 2 /ε, C 2 ε2 rB /K 4  ≤ exp (2k log(3em/kε)) 2 exp −cC 2 ε2 rB /K 4  ≤ 2 exp −c2 ε2 rB /K 4 , where C is large enough such that cc0 C 2 := C 0 > 4 and for ε ≤ 1 C,  tr(B) c min CK 2 /ε, C 2 ε2 ≥ C 0 k log(3em/kε) ≥ 4k log(3em/kε). kBk2 K 4 Denote by Υ := Z1T B 1/2 Z2 . A standard approximation argument shows that if wT Υu ≤ Cε sup w∈Π,u∈Π0 tr(B) 1/2 kBk2 =: rk,n , an event which we denote by B2 , then for all u ∈ E and w ∈ F , rk,n wT Z1T B 1/2 Z2 u ≤ . (1 − ε)2 The lemma thus holds for c2 ≥ C 0 /2 ≥ 2. (O.3)  Proof of Corollary 42. Clearly (M.4) implies that (M.1) holds for B = I. Clearly (M.3) holds following the analysis of Lemma 40 by setting B = I, while replacing event B1 with B3 , which denotes an event such that sup u,v∈Π 1 n v T (Z T Z − I)u ≤ Cε. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 96 The rest of the proof follows by replacing E with F everywhere. The corollary thus holds.  References [1] AGARWAL , A., N EGAHBAN , S. and WAINWRIGHT, M. (2012). Fast global convergence of gradient methods for high-dimensional statistical recovery. Annals of Statistics 40. [2] A LLEN , G. and T IBSHIRANI , R. (2010). Transposable regularized covariance models with an application to missing data imputation. Annals of Applied Statistics 4 764-790. [3] B ELLONI , A., ROSENBAUM , M. and T SYBAKOV, A. (2014). Linear and Conic Programming Estimators in High-Dimensional Errors-in-variables Models. arXiv:1408.0241. [4] B ICKEL , P., R ITOV, Y. and T SYBAKOV, A. (2009). Simultaneous Analysis of Lasso and Dantzig Selector. The Annals of Statistics 37 1705–1732. [5] B ONILLA , E., C HAI , K. M. and W ILLIAMS , C. (2008). Multi-task Gaussian process prediction. In In Advances in Neural Information Processing Systems 20 (NIPS 2010). [6] C AND ÈS , E. and TAO , T. (2007). The Dantzig selector: statistical estimation when p is much larger than n. Annals of Statistics 35 2313-2351. [7] C ARROLL , R. J., G AIL , M. H. and L UBIN , J. H. (1993). Case-control studies with errors in predictors. Journal of American Statistical Association 88 177 – 191. [8] C ARROLL , R. J., G ALLO , P. P. and G LESER , L. J. (1985). Comparison of least squares and errors-in-variables regression with special reference to randomized analysis of covariance. Journal of American Statistical Association 80 929 – 932. [9] C ARROLL , R. and WAND , M. (1991). Semiparametric estimation in logistic measurement error models. J. R. Statist. Soc. B 53 573-585. [10] C ARROLL , R. J., RUPPERT, D., S TEFANSKI , L. A. and C RAINICEANU , C. M. (2006). Measurement Error in Nonlinear Models (Second Edition). Chapman & Hall. [11] C HEN , Y. and C ARAMANIS , C. (2013). Noisy and Missing Data Regression: Distribution-Oblivious Support Recovery. In Proceedings of The 30th International Conference on Machine Learning ICML-13. [12] C HEN , S., D ONOHO , D. and S AUNDERS , M. (1998). Atomic decomposition by basis pursuit. SIAM Journal on Scientific and Statistical Computing 20 33–61. [13] C OHEN , M. R. and KOHN , A. K. (2011). Measuring and interpreting neuronal correlations. Nature Neuroscience 14 809-811. [14] C OOK , J. R. and S TEFANSKI , L. A. (1994). Simulation-extrapolation estimation in parametric measurement error models. Journal of the American Statistical Association 89 1314–1328. [15] DAWID , A. P. (1981). Some Matrix-Variate Distribution Theory: Notational Considerations and a Bayesian Application. Biometrika 68 265–274. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 97 [16] D EMPSTER , A., L AIRD , N. and RUBIN , D. (1977). Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, Series B 39 1-38. [17] D UTILLEUL , P. (1999). The MLE Algorithm for the matrix normal distribution. Journal of Statistical Computation and Simulation 64 105–123. [18] E FRON , B. (2009). Are a set of microarrays independent of each other? Ann. App. Statist. 3 922–942. [19] FAN , J. and L I , R. (2001). Variable selection via nonconcave penalized likelihood and its oracle properties. Journal of American Statistical Association 96 1348– 1360. [20] F ULLER , W. A. (1987). Measurement error models. John Wiley and Sons. [21] G AUTIER , E. and T SYBAKOV, A. (2011). High-dimensional instrumental variables regression and confidence sets. arXiv:1105.2454. [22] G UPTA , A. and VARGA , T. (1992). Characterization of Matrix Variate Normal Distributions. Journal of Multivariate Analysis 41 80-88. [23] H ALL , P. and M A , Y. (2007). Semiparametric estimators of functional measurement error models with unknown error. Journal of the Royal Statistical Society B 69 429-446. [24] H WANG , J. T. (1986). Multiplicative Errors-in-Variables Models with Applications to Recent Data Released by the U.S. Department of Energy. Journal of American Statistical Association 81 680–688. [25] I TURRIA , S. J., C ARROLL , R. J. and F IRTH , D. (1999). Polynomial regression and estimating functions in the presence of multiplicative measurement error. Journal of the Royal Statistical Society, Series B, Methodological 61 547-561. [26] K ALAITZIS , A., L AFFERTY, J., L AWRENCE , N. and Z HOU , S. (2013). The Bigraphical Lasso. In Proceedings of The 30th International Conference on Machine Learning ICML-13 1229-1237. [27] K ASS , R., V ENTURA , V. and B ROWN , E. (2005). Statistical Issues in the Analysis of Neuronal Data. J Neurophysiol 94 8–25. [28] L IANG , H., H ÄRDLE , W. and C ARROLL , R. J. (1999). Estimation in a semiparametric partially linear errors-in-variables model. Ann. Statist. 27 1519-1535. [29] L IANG , H. and L I , R. (2009). Variable selection for partially linear models with measurement Errors. Journal of the American Statistical Association 104 234248. [30] L OH , P. and WAINWRIGHT, M. (2012). High-dimensional regression with noisy and missing data: Provable guarantees with nonconvexity. The Annals of Statistics 40 1637–1664. [31] L OH , P. and WAINWRIGHT, M. (2015). Regularized M-estimators with nonconvexity: Statistical and algorithmic theory for local optima. Journal of Machine Learning Research 16 559–616. [32] M A , Y. and L I , R. (2010). Variable selection in measurement error models. Bernoulli 16 274-300. [33] M ENDELSON , S., PAJOR , A. and T OMCZAK -JAEGERMANN , N. (2008). Uniform uncertainty principle for Bernoulli and subgaussian ensembles. Constructive Approximation 28 277–289. [34] N ESTEROV, Y. (2007). Gradient methods for minimizing composite objective imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] 98 function. CORE DISCUSSION PAPER 2007/76, Center for Operations Research and Econometrics (CORE), Catholic University of Louvain (UCL) 1-30. ROSENBAUM , M. and T SYBAKOV, A. (2010). Sparse recovery under matrix uncertainty. The Annals of Statistics 38 2620-2651. ROSENBAUM , M. and T SYBAKOV, A. (2013). Improved matrix uncertainty selector. IMS Collections 9 276-290. RUDELSON , M. and V ERSHYNIN , R. (2013). Hanson-Wright inequality and subgaussian concentration. Electronic Communications in Probability 18 1–9. RUDELSON , M. and Z HOU , S. (2013). Reconstruction from anisotropic random measurements. IEEE Transactions on Information Theory 59 3434-3447. RUDELSON , M. and Z HOU , S. (2015). High dimensional errors-in-variables models with dependent measurements. arXiv:1502.02355. RUFF , D. A. and C OHEN , M. R. (2014). Attention can either increase or decrease spike count correlations in visual cortex. Nature Neuroscience 17 1591-7. S ØRESEN , Ø., F RIGENSSI , A. and T HORESEN , M. (2014a). Measurement Error in Lasso: Impact and Likelihood Bias Correction. Statistical Sinica Preprint. S ØRESEN , Ø., F RIGENSSI , A. and T HORESEN , M. (2014b). Covariate Selection in High-Dimensional Generalized Linear Models with Measurement Error. arXiv:1407.1070. S T ÄDLER , N., S TEKHOVEN , D. J. and B ÜHLMANN , P. (2014). Pattern Alternating Maximization Algorithm for Missing Data in High-Dimensional Problems. Journal of Machine Learning Research 15 1903-1928. S TEFANSKI , L. A. (1985). The effects of measurement error on parameter estimation. Biometrika 72 583–592. S TEFANSKI , L. A. (1990). Rates of convergence of some estimators in a class of deconvolution problems. Statistics and Probability Letters 9 229–235. S TEFANSKI , L. A. and C OOK , J. R. (1995). Simulation-extrapolation: The measurement error jackknife. Journal of the American Statistical Association 90 1247–1256. S TRIMMER , K. (2003). Modeling gene expression measurement error: a quasilikelihood approach. BMC Bioinformatics 4. T IBSHIRANI , R. (1996). Regression shrinkage and selection via the Lasso. J. Roy. Statist. Soc. Ser. B 58 267-288. T ROPP, J. A. (2004). Greed is good: Algorithmic results for sparse approximation. IEEE Trans. Inform. Theory 50 2231–2241. T ROPP, J. and G ILBERT, A. (2007). Signal recovery from random measurements via orthogonal matching pur- suit. IEEE Trans. Inform. Theory 53 4655-4666. V IAL , J. P. (1982). Strong convexity of sets and functions. Journal of Mathematical Economics 9 187–205. W ERNER , K., JANSSON , M. and S TOICA , P. (2008). On Estimation of Covariance Matrices With Kronecker Product Structure. IEEE Transactions on Signal Processing 56 478 – 491. X U , Q. and YOU , J. (2007). Covariate Selection for Linear Errors-in-Variables Regression Models. Communications in Statistics – Theory and Methods 36. Y U , K., L AFFERTY, J., Z HU , S. and G ONG , Y. (2009). Large-scale collaborative prediction using a nonparametric random effects model. Proceedings of the 26th imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017 Rudelson and Zhou/Errors-in-variables 99 International Conference on Machine Learning. [55] Z HANG , C. H. (2010). Nearly unbiased variable selection under minimax concave penalty. Ann. Statist. 38 894-942. [56] Z HOU , S. (2014). Gemini: Graph estimation with matrix variate normal instances. Annals of Statistics 42 532–562. [57] Z HOU , S., L AFFERTY, J. and WASSERMAN , L. (2010). Time Varying Undirected Graphs. Machine Learning 80 295-319. imsart-ejs ver. 2014/10/16 file: eiv-rz.tex date: April 4, 2017
10math.ST
PSIque: Next Sequence Prediction of Satellite Images using a Convolutional Sequence-to-Sequence Network Seungkyun Hong ∗,1,2 Seongchan Kim 2 Minsu Joh 1,2 Sa-kwang Song †,1,2 Korea University of Science and Technology 2 Korea Institute of Science and Technology Information {xo,sckim,msjoh,esmallj}@kisti.re.kr arXiv:1711.10644v2 [cs.CV] 30 Nov 2017 1 Abstract Predicting unseen weather phenomena is an important issue for disaster management. In this paper, we suggest a model for a convolutional sequence-to-sequence autoencoder for predicting undiscovered weather situations from previous satellite images. We also propose a symmetric skip connection between encoder and decoder modules to produce more comprehensive image predictions. To examine our model performance, we conducted experiments for each suggested model to predict future satellite images from historical satellite images. A specific combination of skip connection and sequence-to-sequence autoencoder was able to generate closest prediction from the ground truth image. 1 Introduction Destruction caused by extreme weather events, such as cyclones and wildfires, has garnered increasing attention in recent decades, and the need to predict such events has required more descriptive nowcasting technologies. Currently, numerical weather prediction (NWP) models are performed to forecast future weather situations; still, these simulations require intensive computation and long-term cumulative datasets. Further, although NWP have advantages of accuracy and widespread simulation performance, additional effort is required to fit these models to a responsive nowcasting system. Recent improvements in earth observation systems have allowed us to observe the changes in global weather on an hourly basis via remote sensing imageries. Since massive earth observation data with long durations are now available, several works have surveyed the effectiveness of weather events considering prediction tasks. However, occasionally, there is a possibility of data loss from remote sensory systems. For example, a geostationary satellite may fail to produce broad observation data owing to several issues such as image merging, satellite repositioning on the designated orbit, special missions such as solar or lunar eclipse, and so on. These operational failures can result in satellite stations facing critical data loss. However, there could be possible sudden emergency situations wherein weather events prediction without sufficient data sources or even on nonexistent moments may be required. Given this background, it is unclear how event detection systems will forecast unseen or missed situations. In this paper, we suggest an approach for predicting a visually unobserved situation by generating a plausible image by referencing historical time-series visual clues. We found that specific information propagation leads to better, reasonable prediction results. The remainder of this paper is organized as followed. In the next section, we first discuss the recent research milestones in future image prediction techniques. Next, we present our proposed model structure for future weather situation prediction, and we conclude with comparison results and the conclusions. † Corresponding Author Workshop on Deep Learning for Physical Sciences (DLPS 2017), NIPS 2017, Long Beach, CA, USA. 2 Related works A prediction task of future weather conditions is a joint task comprising two separate meteorological processes: (1) understanding visual clues for weather transition from spatiotemporal weather observations, and (2) image restoration from low-dimensional encoded information into high-dimensional visual situations through time. Recently, several studies focused on weather events prediction using either observation or simulation data. Shi et al. [1] and Kim et al. [2] predicted future precipitation from historical multichannel radar reflectivity images with a convolutional long short-term memory (ConvLSTM) network [3] based on recurrent neural network (RNN) [4] and convolutional neural networks (CNNs). Racah et al. [5] suggested an 3D convolutional autoencoder (AE) model for extreme weather events detection using 27-years CAM-5 simulation model results. Hong et al. [6] surveyed multiple CNNs for predicting the coordinates of a typhoon eye from a single satellite image. Kim et al. [7] suggested a tropical cyclone detection system based on GCM reanalysis data using 5-layer CNNs. These works depend on historical visual datasets for predicting weather events. However, it is not confirmed if unseen weather events can be predicted for specific occasions without observation data such as an observation failure and future events prediction. For the issue of missing/lost data, several studies on deep neural memory networks have been conducted for predicting undiscovered data. [3, 4] Based on the LSTM-RNN, Srivastava et al. [8] surveyed an unsupervised video representation on a fully-connected LSTM (fcLSTM) network with flatten data. Accordingly, Patraucean et al. [9] used intermediate differentiable memory on a temporal video auto-encoder network, and trained extensive optical flow transition differences through time between encoding and decoding steps. Chen et al. [10] considered a 3D biomedical image as the spatial data continuum and adopted a bi-directional LSTM structure for understanding 3D contexts beyond correlated 2D slices. With the advantages of a memory network, several research studies also discovered the effectiveness of structural separation into discrete encoder and decoder units for both sequenced input and output. Cho et al. [11] suggested an RNN encoder–decoder architecture associated with two separated RNNs as an encoder and divaricated decoder parts. Accordingly, Sutskever et al. [12] employed the structure of [11] and an adopting LSTM cell [3] on the overall topology, entitled sequence-to-sequence (Seq2Seq). Next, Chorowski et al. [13] introduced an external memory in Seq2Seq called attention memory, as well as which is similar to a differentiable memory, which was used in a convolutional attention-based Seq2Seq [14]. For image restoration issues, Mao et al. [15] introduced the residual connectivity of the results of convolutional processes into the deconvolutional step for maximizing plausible image reconstruction. Enriched with abundant visual clues from deep convolutional filters, symmetric skip connections (SkipConx) helped achieve high performance as a denoising application, and as a conventional image autoencoder. In conclusion, few surveys have been conducted on image reconstruction for remote sensing imagery, particularly on a satellite image dataset. Therefore, we studied the initial structure of learning weather changes through time, with minimal available parameters. In other words, we studied how changes in weather can be represented as fundamental structures of a memory network. 3 3.1 Methodology Model Architecture In this section, we discuss the architecture for predicting next one-hour satellite images using historical observation datasets. To predict undiscovered situations, we used a basic Seq2Seq architecture that consists of two RNNs using an encoder-decoder framework. In the encoder section, existing weather situation data are plotted and encoded as reduced information through time. Next, the decoder receives outputs and network states from the encoder, and uses this information to predict future situations one-by-one. Both the encoder and the decoder use a five-layer convolution operation to extract rich features or restore encoded information during deconvolution operations. As convolutional filter weights of the encoder and the decoder could be repeatedly utilized, the encoder and the decoder must be able to save and restore their parameters within a scope of Seq2Seq memory networks because the model is not restricted to a specific number of input and output sequences. The suggested model can therefore 2 Figure 1: Model topology for Seq2Seq Autoencoder with Selective Skip Connection (SkipConx) be used for flexible input/output configurations. However, a fixed time gap between each data instance (e.g., 1 hour gap per input) is suggested to achieve better prediction results. As the basic LSTM network uses dense 1D information, we flattened the 2D image data into 1D tensors to fit LSTM cells. To achieve better feature extraction from the spatial data space, we introduce convolutional LSTM cells into both the encoder and the decoder. Further, we implement an auxiliary link in the image regeneration step—a symmetric skip connection from the convolutional encoder into the deconvolutional decoder—for better image restoration. 3.2 Dataset We used four-channel infrared images observed from the COMS-1 satellite meteorological imager (MI) for weather situation prediction. This dataset contains data from April 2011 to June 2017, and it consists of only a partial subset owing to data collection issues. The pixel dimension of the image dataset was resized to 256 × 256 × 4 for fast model training. Further, we designed a data sequencer gateway for the Seq2Seq autoencoder, which receives four-step information to interpret weather changes and produces two-step weather transitions. Meanwhile, a single instance of the data sequencer for training Seq2Seq autoencoder requires six iterations of satellite observation, i.e., one hour per image, for a total time of 6 h. Based on those sequence settings and the status of data collection, we constructed about 26,490 instances to train several Seq2Seq autoencoders and split the set with a ratio of 0.81:0.09:0.1 (for the training, validation, and test configurations). 4 Evaluation Figure 2: Model loss of each model configuration. Lower scores show better prediction results. To evaluate the performance of the convolutional Seq2Seq model, we conducted multiple experiments to identify the best image prediction setting. A basic LSTM cell was used for image restoration (C2L2D), and a convolutional LSTM cell was also used (C2CL2D) for comparison. Next, a multiple skip connection was designed between the encoder and the decoder in the C2CL2D model (C2CL2DSkipConx) to discover the optimal topology for plausible image restoration. Since our model uses five convolutional layers, we created several combinations of layers for selective symmetric skip connections: L5, L3/5, L2/3/5, and L1/3/5. The accuracy of weather situation prediction models is defined as (1), where P is a set of pixels that consists of width × height and the longitude of the ground truth, and P̂ is a set of pixels from the prediction result. N 2 1 X M SEP ixels = (P − P̂ ) (1) N n=1 Each testing model was trained for 50 epochs and used an exponential linear unit (Elu) as an activation function for increasing nonlinearity. Further, the Adam optimizer [16] is used for gradient 3 optimization with an initial learning rate 1e-3 to deal with large pixel values. All our models use the toolkit TensorFlow [17] release 1.4 as the numerical computation framework with GPU acceleration support from the CUDA/cuDNN framework. For model training and inference acceleration, we used dual NVIDIA® Tesla® P100 GPU accelerators for boosting mini-batch training. Table 1: MSE (Test) result of each model configuration after 50 epochs. Model Configuration MSE C2L2D (vanilla) C2CL2D (vanilla) C2CL2D (SkipConx) C2CL2D (SkipConx) C2CL2D (SkipConx) C2CL2D (SkipConx) fcLSTM ConvLSTM ConvLSTM, L5 ConvLSTM, L3/5 ConvLSTM, L2/3/5 ConvLSTM, L1/3/5 7537.908 [baseline] 215.039 206.413 208.698 214.000 197.222 Fig. 2 and Table. 1 shows the result of test errors for each situation prediction model. All test models converged at some point. Compared to the C2L2D model, other C2CL2D models almost converged around MSE 200. Unfortunately, the C2L2D model was trained too slowly and weakly, and the last test error among 50 epoch trainings was almost MSE 7538, which is almost 35 times larger than the other C2CL2D model configurations. Figure 3: Ground truth (actual observation) vs. Prediction through time on Seq2Seq Fig. 3 shows an example of qualitative prediction results from all model configurations, compared with original observation data (201403131600 UTC, ch1-IR1). The prediction results of the C2L2D model are almost unusable to figure out the weather situation, which show a lack of learning capability. In contrast, the C2CL2D model shows more comprehensive weather predictions than the C2L2D result. The C2CL2D model with the skip connection on Layer 1/3/5 achieved the lowest test error among all models, and it presented the most reliable weather prediction result. 5 Conclusion In this work, we studied how a Seq2Seq-based convolutional autoencoder can predict unseen weather situations by referencing historical weather observation datasets. Further, we found that adding symmetric skip connection from the convolutional encoder to the deconvolutional decoder in the Seq2Seq autoencoder provides more reliable image prediction compared to bare LSTM or primitive convolutional LSTM connectivity. Meanwhile, our proposed model still needs improvement in terms of image resolution for more comprehensive weather situation prediction. We have planned several optimizations, such as differentiable memory and usage of adversarial networks, to improve our work. 6 Acknowledgement This work formed part of research projects carried out at the Korea Institute of Science and Technology Information (KISTI). (Project No. K-17-L03-C03: Construction of HPC-based Service Infrastructure Responding to National Scale Disaster; Project No. K-17-L05-C08: Research for Typhoon Track Prediction using an End-to-End Deep Learning Technique) We also gratefully acknowledge the support of NVIDIA Corporation with the donation of multiple GPUs used for this research. 4 References [1] X. Shi, Z. Chen, H. Wang, D.-Y. Yeung, W.-k. Wong, and W.-c. Woo, “Convolutional lstm network: A machine learning approach for precipitation nowcasting,” in Advances in Neural Information Processing Systems, pp. 802–810, 2015. [2] S. Kim, S. Hong, M. Joh, and S.-k. Song, “Deeprain: A predictive convlstm network for precipitation using multi-channel radar data,” in Proceedings of the 7th International Workshop on Climate Informatics: CI 2017., 2017. [3] S. Hochreiter and J. Urgen Schmidhuber, “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997. [4] J. L. Elman, “Finding structure in time,” Cognitive Science, vol. 14, no. 2, pp. 179–211, 1990. [5] E. Racah, C. Beckham, T. Maharaj, Prabhat, and C. Pal, “Semi-supervised detection of extreme weather events in large climate datasets,” arXiv preprint arXiv:1612.02095, 2016. [6] S. Hong, S. Kim, M. Joh, and S.-k. Song, “Globenet: Convolutional neural networks for typhoon eye tracking from remote sensing imagery,” Proceedings of the 7th International Workshop on Climate Informatics: CI 2017., Aug. 2017. [7] S. K. Kim, S. Ames, J. Lee, C. Zhang, A. Wilson C., and D. Williams, “Massive Scale Deep Learning for Detecting Extreme Climate Events,” in Proceedings of the 7th International Workshop on Climate Informatics: CI 2017., 2017. [8] N. Srivastava, E. Mansimov, and R. Salakhutdinov, “Unsupervised learning of video representations using lstms,” in International Conference on Machine Learning, pp. 843–852, 2015. [9] V. Patraucean, A. Handa, and R. Cipolla, “Spatio-temporal video autoencoder with differentiable memory,” arXiv preprint arXiv:1511.06309, 2015. [10] J. Chen, L. Yang, Y. Zhang, M. Alber, and D. Z. Chen, “Combining fully convolutional and recurrent neural networks for 3d biomedical image segmentation,” Advances in Neural Information Processing Systems, pp. 3036–3044, 2016. [11] K. Cho, B. van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning phrase representations using rnn encoder-decoder for statistical machine translation,” in Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1724–1734, 2014. [12] I. Sutskever, O. Vinyals, and Q. V. Le, “Sequence to sequence learning with neural networks,” in Advances in Neural Information Processing Systems, pp. 3104–3112, 2014. [13] J. Chorowski, D. Bahdanau, D. Serdyuk, K. Cho, and Y. Bengio, “Attention-based models for speech recognition,” in Advances in Neural Information Processing Systems, pp. 577–585, 2015. [14] D. Lim, “Convolutional attention-based seq2seq neural network for end-to-end asr,” mathesis, Korea University, 2017. [15] X.-J. Mao, C. Shen, and Y.-B. Yang, “Image restoration using very deep convolutional encoderdecoder networks with symmetric skip connections,” in Advances in Neural Information Processing Systems, 2016. [16] D. P. Kingma and J. L. Ba, “Adam: a Method for Stochastic Optimization,” International Conference on Learning Representations 2015, pp. 1–15, 2015. [17] M. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis, J. Dean, M. Devin, S. Ghemawat, G. Irving, M. Isard, M. Kudlur, J. Levenberg, R. Monga, S. Moore, D. G. Murray, B. Steiner, P. Tucker, V. Vasudevan, P. Warden, M. Wicke, Y. Yu, X. Zheng, and G. Brain, “TensorFlow: A System for Large-Scale Machine Learning TensorFlow: A system for large-scale machine learning,” in 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI ’16), pp. 265–284, 2016. 5
9cs.NE
SecSens: Secure State Estimation with Application to Localization and Time Synchronization Amr Alanwar Bernhard Etzlinger Henrique Ferraz University of California, Los Angeles [email protected] Johannes Kepler University [email protected] University of California, Santa Barbara [email protected] João Hespanha Mani Srivastava arXiv:1801.07132v1 [cs.CR] 22 Jan 2018 University of California, Santa Barbara University of California, Los Angeles [email protected] [email protected] Abstract—Research evidence in Cyber-Physical Systems (CPS) shows that the introduced tight coupling of information technology with physical sensing and actuation leads to more vulnerability and security weaknesses. But, the traditional security protection mechanisms of CPS focus on data encryption while neglecting the sensors which are vulnerable to attacks in the physical domain. Accordingly, researchers attach utmost importance to the problem of state estimation in the presence of sensor attacks. In this work, we present SecSens, a novel approach for secure nonlinear state estimation in the presence of modeling and measurement noise. SecSens consists of two independent algorithms, namely, SecEKF and SecOPT, which are based on Extended Kalman Filter and Maximum Likelihood Estimation, respectively. We adopt a holistic approach to introduce security awareness among state estimation algorithms without requiring specialized hardware, or cryptographic techniques. We apply SecSens to securely localize and time synchronize networked mobile devices. SecSens provides good performance at run-time several order of magnitude faster than the state of art solutions under the presence of powerful attacks. Our algorithms are evaluated on a testbed with static nodes and a mobile quadrotor, all equipped with commercial ultra-wide band wireless devices. Index Terms—Security, state estimation, Kalman filter, optimization, localization, time synchronization I. I NTRODUCTION Last decades have witnessed a proliferation in CyberPhysical Systems (CPS) for observing a variety of physical phenomena and provide appreciate control actions. Consider, for instance, a wireless sensor network which offers many advantages and services in emergency rescue, homeland security, military operations, habitat monitoring, and home automation services. Such a network typically consists of spatially distributed sensor nodes to monitor the state of network [1]. Furthermore, modern vehicles are another example for CPS which present a heterogeneous system for sensing dynamics and providing the required control actions [2]. The new trend in vehicle design is to move from typical isolated control systems to more open automotive architectures that would introduce new services such as remote diagnostics and code updates, and vehicle-to-vehicle communication in order to improved quality and reliability of such systems [3]. To use these systems securely and efficiently, we need a paradigm shift in algorithmic design. For instance, focusing Fig. 1: Time dispersion of measurements. At time ti of step i a measurement is taken on one link in the network, where all the links are under time varying attacks. only on the use of data encryption is the wrong approach to assure CPS security. An interdisciplinary approach is needed that brings a diverse set of disciplines to bear on the secure design process of CPS algorithms. Such an approach for CPS should take care of security vulnerabilities that are easily exploitable in life-critical applications and lead to catastrophic consequences. These security vulnerabilities target sensing software, hardware, and physical signals due to the new interaction between information technology and physical world [4]. Such security vulnerabilities result from the dramatic increase in the set of sensors functionalities and system design complexity. Attacks launched in the cyber domain led to calamitous consensuses during the past decades [5]. For instance, one popular attack is the StuxNet attack on Supervisory Control and Data Acquisition (SCADA) controllers system which is used in industrial processes control [6], [7]. Other security issues on SCADA networks are shown in [8]. Examples of wireless network attacks are shown in [9]. Furthermore, the fragility of the underlying system structure of today’s vehicles are exploited to a reasonable extent in [10], [11], which target Electronic Control Units (ECU). They showed that today’s vehicles are not resilient against attacks mounted on its internal components. Thus, an attacker can easily disrupt the operation of critical functions of a vehicle. This problem is, even more, emerging with the rise of self-driving cars [12]. Also, attacks on analog sensors which have increasingly become an indispensable part of many modern systems are shown in [13]. Similarly, attacks on CPS could affect the underlying infrastructure as shown in the Maroochy Water breach [14]. Moreover, the vulnerability of drones is a very dangerous threat if attackers can take control of these deadly weapons [15], [16]. Also, consider the case of generating a fake GPS signal that appears identical to those sent out by the real GPS [17] to take over some unmanned aircraft [18]. While considerable research has explored CPS security using cryptographical techniques, it is not sufficient to ensure for securing CPS. Such cyber-security techniques cannot protect against compromised physical environment around a sensor node, which may inject a corrupted signal. Therefore, there is an emerging need for secure systems [19] while considering new techniques. Thus, researchers came up with techniques that address the problem of secure state estimation and intrusion detection under the sensor, actuators, and communication network attacks. Secure state estimation enables to estimate the state of the CPS from corrupted/attacked measurements, while intrusion detection aims to detect the presence of sensor attacks. CPS offer critical services which would require meeting stringent timing and maintaining some guarantees on the accuracy of the state estimation during operating hours. However, CPS have power consumption constraints [20], limitations in terms of bandwidth [21], computation limitations [22], and generally limited resources. Thus, we envision a new paradigm in the designing and evaluating secure estimation algorithms. Such paradigm requires meeting the real-time requirements and the resource constraints of CPS. Extensive computation and high computational overhead to provide secure estimate estimation are not accepted in our paradigm. To realize this vision, we propose algorithms for secure state estimation in the presence of measurement noise and modeling errors. We show that our algorithms secure the system against physical attacks manifested by additive disruptions on the measurements while keeping in mind the practicality of our proposed algorithms. Up to our knowledge, SecSens is the first solution that meets the real time requirements of CPS in our considered scenarios. An entirely representative application for secure state estimation is the localization and time synchronization problem. With the growing prevalence of wireless devices, it is important to coordinate timing among IoT and to provide contextual information, such as location. Also, position estimation is necessary for different fields such as military [23], indoor and outdoor localization [24], security surveillance, and wildlife habitat monitoring. Also, maintaining a shared notion of time is critical to the performance of many CPS, Big Science [25], swarm robotics [26], high-frequency trading [27], and global-scale databases [28]. Localization and time synchronization involves a significant amount of collaboration between individual sensors to perform complex signal processing algorithms. This introduces a considerable amount of vulnerability to the network estimation process. Also, the problem is challenging due to its nonlinearity, and due to the high process and measurement noises. When we deal with time; we are expecting a high effect of modeling errors and measurement noises. Therefore, we picked localization and time synchronization as the application driver to illustrate our proposed secure state algorithm. In this work, we revisit the secure estimation problem from a modern viewpoint of sensor networks, to aid in the design of more efficient algorithms with reduced overheads. Inspired by the above discussion, we made the following key contributions in this paper: • Proposing SecSens which consists of two secure state estimation algorithms suitable for applications in wireless networks with nonlinear time evolution and measurement model. Our solutions are applicable to networks with pairwise measurements. • Showing that our algorithm is resilient against attacks on the sensor measurements while meeting the real-time requirements of CPS. • Applying the proposed strategy in the problem of simultaneous localization and synchronization of spatially distributed nodes in an ad-hoc network. • The proposed algorithms are evaluated on a real testbed using ultra-wideband wireless devices and a quadrotor, representing a network of both static and mobile nodes. The rest of the paper is organized as follows: Section II gives an overview of the relevant work in the domain. Section III defines the secure state estimation problem and the threat model under our study. We define the core concept behind SecSens in IV. We then go through our proposed algorithms in Sections VI-A and VI-B. Section VII illustrates the experimental setup and evaluates the proposed algorithm on static and mobile network of nodes. Finally, Section VIII lists some concluding and discussion remarks. II. R ELATED W ORK In this section, we present the related work on secure state estimation and its application to simultaneous localization and synchronization. A. Secure State Estimation Several recent works have studied the problem of secure state estimation against sensor attacks in dynamical systems. We categorize the work to the following subcategories: 1) Secure Estimation for Noiseless Systems: Graphtheoretic conditions for the detectability of attacks for a noiseless system are shown in [29]. Fawzi et al. show the impossibility of accurately reconstructing the state of a system if more than half the sensors are attacked [30]. Pasqualetti et al. [31] propose a fully decentralized solution for attack Identification. 2) Secure Estimation with Bounded non-stochastic Noise: Satisfiability-Modulo-Theory (SMT) approach is proposed for bounded noise in [32]. Another kind of work was based on brute force search which is not applicable for large-scale systems [33]. A practical solution is proposed in [34] that considers real-time issues and synchronization errors. 3) Secure state estimation with Gaussian noise: Observing and recording sensor readings for an amount of time, then repeat them afterward while carrying out an attack is commonly defined as replay attack. Such kind of attack is considered in [35] where all the existing sensors were attacked. The attacker does not know model knowledge, but he can access and corrupt the sensor data. Another work considered stochastic game anachronism for detecting replay attacks [36]. Also, denial of service attacks solution under Gaussian noise is proposed in [37]. Furthermore, false data injection is solved by proposing an ellipsoidal algorithm where attacker’s strategy is formulated as a constrained control problem [38]. All the previous work assume linear state space model. Thus, it can not be used with nonlinear state space. Recently, Weber et al. [39] proposed Gordian SMT especially for secure localization which is a non-linear state space. However, they did not propose as a general solution for non-linear secure state estimation of networks with pairwise measurements. Also, during their evaluation, they only considered four links under attack, which is very small number compared to the total number of links. Furthermore, they required about 11 minutes to be able to provide a secure state estimation which is a huge overhead to recover a network state. Finally, they considered a 2D localization problem only. On the other hand, SecSens considers the non-linear state space model of networks with pairwise measurements, while taking into consideration the real-time requirements for CPS and assumes powerful attacks comparing to the related work. B. Secure Localization and Time Synchronization Researchers attach great importance for secure localization from a long time. For instance, SeRLoc [40] proposed a localization scheme based on a two-tier network architecture. Another type of work was based on partial homomorphic encryption to achieve private and resilient localization [41]. For more details on secure localization, we refer the reader to [42], [43]. On the other hand, secure time synchronization alone got a lot of attention. TinySeRSync [44], for example, proposes secure single-hop pairwise time synchronization using authenticated timestamping. Moreover, authors in [45] analyze attacks on different time synchronization protocols and propose a secure time synchronization toolbox to counter these attacks. In [46] a holistic approach to maintain secure time synchronization in a wireless network is proposed, and in [47] pairwise secure synchronization concept is proposed tailored to real-time applications in smart grids. For more details on secure synchronization, we refer the reader to [48], [49]. Although these two problems, namely secure time synchronization and secure localization, share many aspects in common, they are traditionally treated separately. That results in a lower performance, inefficient use of resources, and nonscalable algorithms. Secnav [50] is the only work that covers simultaneous secure localization and time synchronization up to our knowledge at the time of writing. However, Secnav assumes that sensor nodes cannot be compromised by an adversary, and cares only about the attacked communication channel. In contrast, SecSens considers attacks which compromise sensor nodes and links. III. S ECURE S TATE E STIMATION P ROBLEM In what follows, we discuss our threat model and the utility measures. Then, provide a mathematical formulation of the state estimation problem. A. Threat Model In the context of attack-resilient state estimation, we have the following entities: • Estimation Server: It attempts to securely, efficiently and accurately estimate the state of a network of distributed sensors given that we have measurements and modeling noises. Also, sensors and links are compromised. • Sensor Nodes: Entities that make some required sensing in order to help in estimating the network state. The adversary could compromise nodes. • Adversary: He modifies the framework with the goal of causing the server to misestimate the state of the network. He can compromise sensor/links to corrupt measurements. Denial of service attack is out of the scope of our paper. Therefore, the receiver will still receive the message from the sender, superimposed by the attacker’s messages. Also, we can look into the problem as compromised messages where man-in-the-middle attack (MITM) is presented to corrupt the delivered messages to the server. B. Resilience Metric The accuracy of state estimation algorithm is the key for its use in mission-critical systems. Besides, the CPS are often resource-constrained and has to meet some time requirements. To accommodate the above practical constraints while still maintaining the desired resilience level we define the following utility metrics: • Estimation Error: The difference between the actual network state (ground truth) and the estimated state. • Execution Time: The time needed by the server to estimate the network state based on the measurements. C. System and Attack Model Consider the following nonlinear time-varying system x̃ki+1 = f˜(x̃ki ) + ñki yik,j = h̃j (x̃ki , x̃ji ) + ṽik + ak,j i , (1) where xki is the state of node k at time i. yik,j is the measurement sent to node k from the neighborhood node j ∈ Nk . The process and measurement noise are assumed to be uncorrelated and zero mean white Gaussian noise. They are denoted by nki and vik , respectively. Qi and Ri are the process covariance and the measurement noise matrix at time i, respectively. The attack vector ak,j is a vector which models how an attacker i changes the sensor measurements between node k and node j at time i. A non-zero elements in the vector a corresponds to the attacked values on the corresponding sensor; otherwise the measurement is not attacked. Thereby, the additive attack vector ak,j can account for both, a malicious node k and i a corrupted link (k, j). Moreover, the attack values can be constant or time-varying. SecSens considers secure state estimation problem over a network of N nodes indexed by k ∈ {0, . . . , N − 1}. The nodes are spatially distributed over some region in space. We say that two nodes are connected if they can communicate directly with each other. The neighborhood of a given node k is denoted by the set Nk . IV. S EC S ENS C ORE I DEA Most of the related work on secure state estimation mitigates the influence of attacks as described in Section II by identifying the attacked links and excluding them from the estimation process. This is a highly complex combinatorial problem, and even the convex relaxation techniques are not suitable for realtime applications. So, let’s go through SecSens core idea that helps us to solve the problem while considering the practical requirements. To understand the idea behind SecSens, let’s consider the following toy example which is representative of the core idea behind our solution. Consider a network of N nodes, where each node has a link with its neighbor. Now, let’s consider Figure 1, node1 will communicate with node2 at t1 . Then node1 will communicate with node2 and node3 at time t2 and t3 , respectively. Now, let’s go back to the general model of the secure state estimation which is shown in Equation 1. According to that model, we have three attacks which are 4,1 a12,1 , a3,1 on the three links. Related work tried to 2 , and a3 solve at each time instant t the secure state estimation problem while considering the number of possible attacks (unknowns) equals the number of links. It ends up in a very complicated problem with the number of unknowns equals the number of connections. In contrast, we look into the problem from a different perspective inspired by the real-life application’s constraints. At each time instant, t each node can only communicate with one neighbor and this is the practical scenario in any CPS. For instance, measuring the distance using time of the flight of two or three messages between two nodes is a type of communication [51]. Thus, at time t1 in Figure 1, why should we care about estimating a3,1 1 ?. What about renaming the three attacks on the figure to a11 , a12 , and a13 as the couple time instant ti and the node index k uniquely defines the neighbor j because node k can only communicate with one node at time ti . Thus, SecSens looks into the attack that is related to node1 as a1t and deals with it as time-varying value. With this paradigm shift, we are able to have the number of attack at each time instant equals to the number of nodes, instead of the number of links. Therefore, SecSens drastically reduces the computational complexity. We will show the performance of SecSens while attacking all the links with time-varying attacks. State estimation while attacking all the links is a hard problem and could not be solved in any of the related work up to our knowledge. We now utilize this idea to change the general model in (1). We include the attack value of this time step to the state of the node initiating the measurement. Following this procedure, the state of node k would be extended to xki = [x̃ki T , aki T ]T . This yields a modified system model with xki+1 = f (xki ) + nki and yik = hj (xki , xji ) + vik . In this way, we decrease the number of unknowns at each time step. Instead of being proportional to the number of links, they are now only proportional to the number of nodes. We should emphasize that this is just a modeling trick and all the links can be under attack with different values. A valid question would be how to model the time-evolution in the state-space model for unpredictable static or timevarying attacks. We choose to have aki = aki+1 , and the variance of the attack entries of the modeling noise nki would account for the time-varying aspect of the attack. We would like to define two important concepts associated with measurement values: • • Outliers: These measurement values lie outside the main expected range. For example, it would be the measured distance between two nodes that is much larger than diagonal of the localization area. Also, if the measured speed of moving node is higher than the hardware capabilities of the nodes, then this speed value would be considered an outlier. These Outliers can be easily detected and rejected by setting some thresholds on the accepted values. Attacks: the Smart attacker would corrupt the sensor reading with new values that make sense. Thus, attacks are values that can’t be removed by outliers’ detectors. Attacked speed value, for example, would be within the capabilities of the node motors. SecSens makes use of this concept to simplify the complexity of secure state estimation algorithms. We care about designing secure state estimation algorithm which would be combined with outliers rejectors. Thus, attacks can only be in a limited interval which can be represented by the modeling variance. We used this concept in our previous work [51], [52] where we use stationary model for process update function for tracking a flying quadrotor. As long as the quadrotor moves in the range of the modeling noise, D-SLATS would be able perfectly to localize it. At the end of the day; the speed of the quadrotor is limited by the hardware capabilities which are public information. So why we do not make use of this information to simplify the estimation algorithm? In what follows, this approach will be applied to simultaneous localization and synchronization. It will be seen that the system performance is greatly improved by this approach while the computational complexity is significantly reduced compared to the related work. V. S EC S ENS IN R EAL L IFE A PPLICATION VI. S EC S ENS ATTACK R ESILIENT S TATE E STIMATORS Without loss of generality, we choose to apply SecSens on simultaneous localization and time synchronization estimation problem while some nodes/links are under attack. It a quite representative example of secure state estimation problem where we have modeling noise of the clocks and the dynamics of moving nodes in conjunction with measurements noise. Our sensors are able to get the time difference and the distance between two each other. More specifically, we consider three types of measurements which are distinguished by the number of messages exchanged between a pair of nodes. The measurement vector at node k, from node j ∈ Nk has the following form  k dk,j i + aoi  rk,j + adk  , i i Rik,j + adki  yik,j = (2) where dk,j represents the counter difference at time i denoted i by dk,j which is the measurement of the difference between i the clocks of each node. rik,j , on the other hand, represents a noisy measurement due to frequency bias discrepancies between k and j which is formally represented by singlesided two-way range. Finally, Rik,j is another distance measurement between nodes k and j based on a trio of messages between the nodes at time i. This is a more accurate estimate than rik,j due to mitigation of frequency bias errors from the additional message. It is formally called doublesided two-way range. For more details about the three types of measurements, we encourage the reader to check [51]. However, these measurements are corrupted by some attacks on counter difference and distance, namely, aoki and adki , respectively. We would like to note that subset of these measurements may be used rather than the full set, i.e., we can have experiments involving just rik,j , Rik,j , dk,j or any i combinations. Also, we do not put any limitation on the way of calculating these measurements. So, no special requirements on the used hardware. Thus, we are concerned with a state vector which consists of three dimensional position vector pki , clock time offset oki , and clock frequency bias bki for every node. We adopt a convention where both oki and bki are described with respect to the global time clock which is usually the clock of master node, which can be any node. Also, there are attacks on the distance measurements, which is denoted by adki , and the attack on offset measurement values aoki which are added by an attacked node. In summary our state vector is as following: h iT xki = pki T oki bki aoki adki (3) We define the full network state xi at master time as the concatenation of all states from the N participating devices at time step i:   −1 T T (4) xi = x0i T x1i T .. xN i A. SecEKF Algorithm The core idea behind SecEKF is to make use of Extended Kalman filter (EKF) in order to estimate the network state beside the introduced attacks. We periodically apply corrections when new measurements are received. We assume the clock parameters evolve according to the first-order affine approximation of the following dynamics oki+1 = oki + bki δt and bki+1 = bki , where δt := tM (i + 1) − tM (i) given that tM is the root node time which is the global time. The process update is responsible for evolving the state estimates for all N devices—clock offsets, frequency biases, and device position. Therefore, we can write the process update function as following:   pki oki + bki δt    k k  (5) f (xi ) =   bi k   aoi  adki Note that this simple process model can still be used to capture node state dynamics and changing attack values simply by setting the covariance of the corresponding state value adequately high to account for high change rate. We will show that our module can work with high rate changing attack and moving nodes as well. On the other hand, The measurement update step relates the state variables xki to a measurement vector yik,j between two devices. Each of our measurements depends on the of local clock values, distances between two devices and the amount of the introduced attack on time and distance. For any given node k in the network, the nodespecific measurement model with respect to a second node j is given as:     oji − oki + aoki     j hj (xki , xji ) =  (1 + bki ) pi − pki + adki  (6) 2   j k (1 + bki ) pi − pki + adi 2 The time synchronization and localization problem aims to estimate the clock parameters and the 3D position using the available measurements and the model of the system. We denote by x̂i the estimate of xi where we seek to minimize the mean-square error Ekxi − x̂i k2 . Given this, we design an EKF to get a secure state estimate over time, periodically applying corrections when new timing and range measurements are received. Our EKF only updates upon arrival of a new measurement (message) exchanged between two or more nodes. The EKF steps are: • Receive a new measurement: The server obtains a new measurement at filter step i which is generated by a message exchange between devices k and j. By convention, communication is always defined to terminate at device j. One of the nodes maybe under attack and corrupt the sent measurement. • • Calculate δt : The server maintains an estimate of master time tM (i) as well as time offset and frequency bias estimates for every node. This gives the capability to calculate the time elapsed between measurements in the master time reference. Time update: Update the current secure estimates for the location and time of each node while taking the attack effect out of the measurement. B. SecOPT Algorithm j,k i0 ∈{i−L,i} where a time window comprising L measurements is used for minimization. The L1-norm on the attack values is added to quadratic minimization criteria for more robust attack estimation. The resulting method is summarized in Algorithm 1. The algorithm is centralized in the sense that all the exchanged messages are transmitted to a centralized server where the computation and optimization are solved. While the minimization is initialized for i = 0 with the state xinit = 0 for numerical optimization, run repeat the it multiple times by setting xinit to the previously estimated state. Algorithm 1 SecOPT Set i = 0, and x̂0 = xinit . At the centralized server: Step 1: Collect enough measurements between nodes according to the window size. Step 2: Solve the centralized optimization problem with solver initial condition set to x̂i : h i X k,j ôji+1 p̂ji+1 ao ˆ ji+1 = argmin (di − (oki − oji ) oji ,pji ,aoji j∈Nk h p̂ji+1 We demonstrate SecSens state estimation algorithms in simultaneous localization and time synchronization of wireless sensor nodes under attack while keeping on minds the resilience metrics as defined in Subsection III-B. This attack can be on the communication link or/and the whole sensor node. We are going to evaluate our proposed algorithms under different attack cases for static and mobile nodes. C. Case Study: Static Nodes The second algorithm for secure state estimation is based on the Maximum Likelihood Estimator (MLE). By using the model of the system and the knowledge of how the unknown attack signal affects the measurements, we formulate an optimization problem as  X  2 k khj (xki0 , xji0 ) − yik,j , arg min 0 k − λkai0 k1 k xk i ,ai ∀k,j B. Experiments − pki − pji /c − aoji )2 + λkaoji k1 2 i X k,j j ˆ adi+1 = argmin (Ri − pki − pji bji ,pji ,adji j∈Nk − adji )2 + λkadji k1 2 Step 3: Increment i by 1 and go back to Step 1 VII. E VALUATION A. Experimental Setup We evaluated the performance of the proposed secure state estimation algorithms in a custom ultra-wideband RF testbed based. The overall setup is described in details in the Appendix and shown in Figure 6. Nodes are placed in 8 distinct locations around the 10 × 9 m2 area, roughly in the positions indicated by Figure 6. The goal of our algorithm is to accurately and securely estimate the positions of all network devices relative to each other, as well as, the relative clock offsets. This relative localization (graph realization), is a well-researched field. Local minima, high computational complexity, and restrictions on graph rigidity are the main challenges in graph realization problems [53], [54]. SecSens does not put restrictions on the connectivity of the graph as we will show. An original extended Kalman filter (OrigEKF) is implemented as a baseline for comparison to show the criticality of estimating the attacks values in CPS. 1) Secure Position Estimation: We would like to start with defining the attacker strategy to corrupt the network state estimation. The common way in secure estimation field is to consider a uniform random number or constant values as attacks value without putting constraints on the rate of change of the attacks values. Neglecting the convergence time of the algorithm has catastrophic consensuses. Unlike the previous work, we consider three types of attacks generator statistics. Also, we consider the attacker switch between different parameters during an attack session. Function 1 in the Appendix shows a Pseudocode for our attacker function. We consider Uniform, Normal and Pareto Distributions as type 1, 2, and 3 attacks, respectively. Note that generating the attack values according to Function 1 simulates time-varying attack values that are different for all links. Also, we should highlight the following points: • Every new measurement gets different attack value, i.e, the Function getDistanceAttackValue is called every time instance for every new measurements. • All the measurements under attack. • The attacker changes the parameters of each type from period to period as shown in the Pseudocode. Such an attack is stronger than using fixed statistics random generator. • The attacks values must results in a location within the localization area, as a smart attacker strategy. Otherwise, the attack can be easily detected with a simple threshold mechanism. The proposed secure algorithms find relative positions. Therefore, we first superimpose the estimated positions onto the true positions of each node by use of a Procrustes transformation [55]. Specifically, the estimated network topology as a whole is rotated and translated without scaling, until it most closely matches the true node positions. Once transformed, the error of a given node’s position is defined as the `2 norm of the transformed position minus the true position. Figure 2 shows a twenty seconds snapshot of the performance after running the three types of attacks. We can notice the jump in the OrigEKF behaviors due changing the attack statistics. However, SecSens is resilient against such type of attacks. Table I summarizes the localization error for every node using the three algorithm. SecEKF outperforms SecOPT in the three types of attacks. 2) Secure Time Synchronization: We considered two attacker strategies in order to corrupt the network state estimation in term of time, for the space constraint. We define Type 4 attack where each node adds a constant value in order ∼ 100µ seconds to measurement di j. While, Type 5 attack considers adding uniform random values in order ∼ 100µ seconds to measurement di j. The reason behind choosing these types of attacks is discussed in the Appendix. We should highlight that different attacked nodes add different attack values for both Type 4 and Type 5. As mentioned before, we choose node 0 to be the reference node, i.e, b0i := 0 and o0i := 0 ∀i. Table II shows the synchronization errors for all nodes with respect to node 0. We also assume that the reference node is free of attack which is not the same assumption in the secure localization scenario. In order to test the secure time synchronization with minimum uncertainty in our testing mechanism, we follow the testing strategy in [56], and [57]. SecEKF comes with the best performance, then SecOPT for both attack types. We should note that the synchronization errors in Table II are reported for a fully connected network. SecEKF algorithm achieved 0.03 and 0.25 µ seconds for Type 4 and Type 5 attack, respectively. On the other hand, SecOPT algorithm achieved 0.34 and 9.10 µ seconds for Type 4 and Type 5 attacks, respectively. Neglecting the secure estimation techniques leads to catastrophic consequences as shown for OrigEKF performance against Type 4 and Type 5 attacks. The synchronization error is in order of attacks values, namely, 121 and 132 µ seconds for Type 4 and Type 5 attack, respectively. D. Case Study: Mobile Nodes We have shown that our proposed algorithms can be used to localize and synchronize a network of static nodes under three types of attacks. We now present the case of a heterogeneous network containing both static and mobile nodes. We add one mobile node in the form of a CrazyFlie quadrotor to the eight anchor nodes topology used in Section VII-C, as shown in Figure 6. We analyzed the results of running SecEKF, SecOPT and OrigEKF to localize the mobile node flying in our lab. Again, all the links are under attacks. For space limit, we will show the results under attack 1 scenario only. Some experiments were performed with quadrotors traveling with variable velocities. Figure 3 show the results of localizing the traveling quadrotors using SecEKF, SecOPT and OrigEKF algorithms. SecEKF achieved the best secure localization estimation with a mean of 1.38 m and standard deviation of 0.72 m. On the other hand, SecOPT reported 1.82m mean error and standard deviation of 0.78 m. If the normal estimation does not consider attacks estimation, it will suffer from 7.03m mean error and 3.54m standard deviation. We repeated the experiments for the network topology where every node is only connected to four neighbors instead of eight nodes in the fully connected scenario, which means we are dropping about 27 links out of 72 links. The performance degraded as expected. As shown in Fig 4, SecEKF, SecOPT and OrigEKF algorithms reported 3.48m, 3.36m, and 10.07m mean localization error, respectively. E. Case Study: Execution Time Previous work [39] could achieve secure state estimation in case of localization in about 11 minutes. They only consider 2D localization and only four links under attack. Eleven minutes overhead is a very high one especially for the moving nodes. We are going during this case study to analyze the required execution time for the proposed secure estimation algorithms to localize the CrazyFlie quadrotor, where all the links are under Type 1 attack. The execution of SecOPT depends on the number of considered measurements during one run of the algorithms which we called the window size. Figure 5 summarizes the 3D localization error for each window size. For a window size of 300 measurements, we could achieve a mean error of 1.59m at the cost of 4.6 seconds of execution time. When we decreased the window size to 50 measurements, we get 4.7m localization error at the cost of 1.1 seconds of execution time. On the other hand, we can see the SecEKF could achieve a mean error of 1.28m with a cost of 0.004 seconds. SecEKF considers only a window size of one measurement as it depends on EKF. VIII. C ONCLUSION This work has investigated the security aware-aspect of the estimation algorithms for the multi-sensor system. More specifically, we proposed SecEKF and SecOPT secure estimation algorithms for the wireless network where state evolution and measurement models can follow nonlinear functions. Then, we picked simultaneous localization and synchronization as a representative application for our secure estimation problem. Several experiments in a network with static nodes and a mobile quadrotor, all equipped with commercial ultrawideband wireless radios, were conducted. Our empirical results indicate that SecSens offers reliable performance and efficient computational procedures for the secure state estimation. Our proposed algorithm made it possible by stateof-the-art advances in commercial ultra-wideband radios to securely estimate the state in asynchronous networks. Future directions will deal with testing over a large-scale system and more sophisticated attack scenarios. R EFERENCES [1] J. Yick, B. Mukherjee, and D. Ghosal, “Wireless sensor network survey,” Computer networks, vol. 52, no. 12, pp. 2292–2330, 2008. [2] U. Kiencke and L. Nielsen, “Automotive control systems: for engine, driveline, and vehicle,” 2000. (a) SecEKF (b) SecOPT (c) OrigEKF (d) SecEKF (e) SecOPT (f) OrigEKF (g) SecEKF (h) SecOPT (i) OrigEKF Type 3 Type 2 Type 1 Fig. 2: Localization error for the eight nodes where all the measurements are under attack with different values. Sub-figures (a), (b) and (c) correspond to Type 1 attack which is time varying uniform random number. Sub-figures (d), (e) and (f) correspond to Type 2 attack is time varying normal distribution. Sub-figures (g), (h) and (i) correspond to Type 3 attack which is following time varying Pareto Distribution. Function getDistanceAttackValue shows the attacker behavior for corrupting the measurements Ri j and ri j. Algorithm SecEKF SecOPT OrigEKF SecEKF SecOPT OrigEKF SecEKF SecOPT OrigEKF node 0 0.655 0.607 4.744 1.343 0.874 2.546 1.107 1.631 3.206 node 1 0.177 0.668 6.588 0.921 0.973 4.134 0.960 1.692 5.332 node 2 0.720 0.650 4.251 1.016 0.767 0.718 0.849 1.210 2.450 node 3 0.572 0.606 5.787 0.864 0.832 4.579 1.596 1.635 5.901 node 4 0.154 0.424 1.665 0.390 0.767 1.213 0.444 1.053 2.856 node 5 0.229 0.553 3.106 0.675 0.984 2.531 1.314 1.769 2.649 node 6 0.134 0.400 3.048 0.323 0.675 3.479 0.633 1.476 2.825 node 7 0.387 0.713 5.711 0.942 1.288 4.465 0.627 1.267 5.409 mean 0.378 0.578 4.362 0.809 0.895 2.958 0.941 1.467 3.829 std 0.240 0.113 1.671 0.336 0.190 1.462 0.386 0.260 1.448 TABLE I: Localization error for the eight nodes where all the measurements are under Type 1, 2, and 3 attack with different values. Function getDistanceAttackValue shows the attacker behavior for corrupting the measurements. The three algorithms are running in parallel on the same set of attacks values to have a fair comparison. Type 5 Type 4 Algorithm SecEKF SecOPT OrigEKF SecEKF SecOPT OrigEKF node 1 0.028 0.232 98.424 0.025 4.95 162.368 node 2 0.082 0.633 198.207 0.865 1.07 104.922 node 3 0.014 0.230 297.957 0.133 22.55 136.901 node 4 0.003 0.265 97.891 0.197 2.65 186.414 node 5 0.027 0.065 97.811 0.318 22.02 156.470 node 6 0.097 0.535 97.781 0.381 1.93 149.342 node 7 0.0507 0.791 82.600 0.1123 17.63 167.329 mean 0.038 0.344 121.334 0.254 9.101 132.968 std 0.035 0.279 89.050 0.279 9.842 58.803 TABLE II: Synchronization error (µ seconds) of different nodes with respect to node 0. Type 4 attack considers adding constant values of order ∼ 100µ seconds to measurement di j. Type 5 attack considers adding uniform random values of order ∼ 100µ seconds to measurement di j. The three algorithms are running in parallel on the same set of attacks values to have a fair comparison. Fig. 3: The localization error of the CrazyFlie quadrotor where all the measurements are under Type 1 attack with different values in a Fully connected network. Function getDistanceAttackValue shows the attacker behavior for corrupting the measurements Ri j and ri j. The three algorithms are running in parallel on the same set of attacks values to have a fair comparison. [3] H. Heinecke, K.-P. Schnelle, H. Fennel, J. Bortolazzi, L. Lundh, J. Leflour, J.-L. Maté, K. Nishikawa, and T. Scharnhorst, “Automotive open system architecture-an industry-wide initiative to manage the complexity of emerging automotive e/e-architectures,” Convergence, pp. 325–332, 2004. [4] A. A. Cárdenas, S. Amin, and S. Sastry, “Research challenges for the security of control systems.” in HotSec, 2008. [5] M. Uma and G. Padmavathi, “A survey on various cyber attacks and their classification.” IJ Network Security, vol. 15, no. 5, pp. 390–396, 2013. [6] D. Kushner, “The real story of stuxnet,” IEEE Spectrum, vol. 50, no. 3, pp. 48–53, 2013. [7] R. Langner, “Stuxnet: Dissecting a cyberwarfare weapon,” IEEE Security & Privacy, vol. 9, no. 3, pp. 49–51, 2011. [8] V. M. Igure, S. A. Laughter, and R. D. Williams, “Security issues in scada networks,” Computers & Security, vol. 25, no. 7, pp. 498–506, 2006. [9] D. Martins and H. Guyennet, “Wireless sensor network attacks and security mechanisms: A short survey,” in Network-Based Information Systems (NBiS), 2010 13th International Conference on. IEEE, 2010, pp. 313–320. Fig. 4: The localization error of the CrazyFlie quadrotor where all the measurements are under Type 1 attack with different values in a partial connected network where every node has five neighbors only. Function getDistanceAttackValue shows the attacker behavior for corrupting the measurements Ri j and ri j. The three algorithms are running in parallel on the same set of attacks values to have a fair comparison. [10] S. Checkoway, D. McCoy, B. Kantor, D. Anderson, H. Shacham, S. Savage, K. Koscher, A. Czeskis, F. Roesner, T. Kohno et al., “Comprehensive experimental analyses of automotive attack surfaces.” in USENIX Security Symposium. San Francisco, 2011. [11] K. Koscher, A. Czeskis, F. Roesner, S. Patel, T. Kohno, S. Checkoway, D. McCoy, B. Kantor, D. Anderson, H. Shacham et al., “Experimental security analysis of a modern automobile,” in Security and Privacy (SP), 2010 IEEE Symposium on. IEEE, 2010, pp. 447–462. [12] J.-P. Hubaux, S. Capkun, and J. Luo, “The security and privacy of smart vehicles,” IEEE Security & Privacy, vol. 2, no. 3, pp. 49–55, 2004. [13] D. F. Kune, J. Backes, S. S. Clark, D. Kramer, M. Reynolds, K. Fu, Y. Kim, and W. Xu, “Ghost talk: Mitigating emi signal injection attacks against analog sensors,” in Security and Privacy (SP), 2013 IEEE Symposium on. IEEE, 2013, pp. 145–159. [14] J. Slay and M. Miller, “Lessons learned from the maroochy water breach,” Critical infrastructure protection, pp. 73–82, 2007. [15] M. Mohan, “Cybersecurity in drones,” Ph.D. dissertation, Utica College, 2016. [16] N. Shachtman, “Computer virus hits us drone fleet,” CNN. com, 2011. [17] A. H. Rutkin, “spoofers use fake gps signals to knock a yacht off course,” MIT Technology Review, 2013. [18] A. J. Kerns, D. P. Shepard, J. A. Bhatti, and T. E. Humphreys, “Unmanned aircraft capture and control via gps spoofing,” Journal of Fig. 5: The execution time and its corresponding localization error of the CrazyFlie quadrotor with different window size of measurements, where all the measurements are under Type 1 attack with different values in a Fully connected network. Function getDistanceAttackValue shows the attacker behavior for corrupting the measurements Ri j and ri j. Field Robotics, vol. 31, no. 4, pp. 617–636, 2014. [19] C. Hartung, J. Balasalle, and R. Han, “Node compromise in sensor networks: The need for secure systems,” Department of Computer Science University of Colorado at Boulder, 2005. [20] A. J. Goldsmith and S. B. Wicker, “Design challenges for energyconstrained ad hoc wireless networks,” IEEE wireless communications, vol. 9, no. 4, pp. 8–27, 2002. [21] G. J. Pottie and W. J. Kaiser, “Wireless integrated network sensors,” Communications of the ACM, vol. 43, no. 5, pp. 51–58, 2000. [22] K. Kumar, J. Liu, Y.-H. Lu, and B. Bhargava, “A survey of computation offloading for mobile systems,” Mobile Networks and Applications, vol. 18, no. 1, pp. 129–140, 2013. [23] J. R. Lowell, “Military applications of localization, tracking, and targeting,” IEEE Wireless Communications, vol. 2, no. 18, pp. 60–65, 2011. [24] K. Lingemann, H. Surmann, A. Nuchter, and J. Hertzberg, “Indoor and outdoor localization for fast mobile robots,” in Intelligent Robots and Systems, 2004.(IROS 2004). Proceedings. 2004 IEEE/RSJ International Conference on, vol. 3. IEEE, 2004, pp. 2185–2190. [25] M. Lipiński, T. Włostowski, J. Serrano, and P. Alvarez, “White rabbit: A ptp application for robust sub-nanosecond synchronization,” in Precision Clock Synchronization for Measurement Control and Communication (ISPCS), 2011 International IEEE Symposium on. IEEE, 2011, pp. 25–30. [26] G. Regula and B. Lantos, “Formation control of a large group of uavs with safe path planning,” in Control & Automation (MED), 2013 21st Mediterranean Conference on. IEEE, 2013, pp. 987–993. [27] P. V. Estrela and L. Bonebakker, “Challenges deploying ptpv2 in a global financial company,” in 2012 IEEE International Symposium on Precision Clock Synchronization for Measurement, Control and Communication Proceedings. IEEE, 2012, pp. 1–6. [28] J. C. Corbett, J. Dean, M. Epstein, A. Fikes, C. Frost, J. J. Furman, S. Ghemawat, A. Gubarev, C. Heiser, P. Hochschild et al., “Spanner: Google’s globally distributed database,” ACM Transactions on Computer Systems (TOCS), vol. 31, no. 3, p. 8, 2013. [29] F. Pasqualetti, F. Dorfler, and F. Bullo, “Control-theoretic methods for cyberphysical security: Geometric principles for optimal cross-layer resilient control systems,” IEEE Control Systems, vol. 35, no. 1, pp. 110–127, 2015. [30] H. Fawzi, P. Tabuada, and S. Diggavi, “Secure estimation and control for cyber-physical systems under adversarial attacks,” IEEE Transactions on Automatic Control, vol. 59, no. 6, pp. 1454–1467, 2014. [31] F. Pasqualetti, F. Dörfler, and F. Bullo, “A divide-and-conquer approach to distributed attack identification,” in Decision and Control (CDC), 2015 IEEE 54th Annual Conference on. IEEE, 2015, pp. 5801–5807. [32] Y. Shoukry, P. Nuzzo, A. Puggelli, A. L. Sangiovanni-Vincentelli, S. A. Seshia, and P. Tabuada, “Secure state estimation for cyber physical systems under sensor attacks: a satisfiability modulo theory approach,” IEEE Transactions on Automatic Control, 2017. [33] M. S. Chong, M. Wakaiki, and J. P. Hespanha, “Observability of linear systems under adversarial attacks,” in American Control Conference (ACC), 2015. IEEE, 2015, pp. 2439–2444. [34] M. Pajic, J. Weimer, N. Bezzo, P. Tabuada, O. Sokolsky, I. Lee, and G. J. Pappas, “Robustness of attack-resilient state estimators,” in ICCPS’14: ACM/IEEE 5th International Conference on Cyber-Physical Systems (with CPS Week 2014). IEEE Computer Society, 2014, pp. 163–174. [35] Y. Mo and B. Sinopoli, “Secure control against replay attacks,” in Communication, Control, and Computing, 2009. Allerton 2009. 47th Annual Allerton Conference on. IEEE, 2009, pp. 911–918. [36] F. Miao, M. Pajic, and G. J. Pappas, “Stochastic game approach for replay attack detection,” in Decision and control (CDC), 2013 IEEE 52nd annual conference on. IEEE, 2013, pp. 1854–1859. [37] S. Amin, A. A. Cárdenas, and S. Sastry, “Safe and secure networked control systems under denial-of-service attacks.” in HSCC, vol. 5469. Springer, 2009, pp. 31–45. [38] Y. Mo, E. Garone, A. Casavola, and B. Sinopoli, “False data injection attacks against state estimation in wireless sensor networks,” in Decision and Control (CDC), 2010 49th IEEE Conference on. IEEE, 2010, pp. 5967–5972. [39] M. Weber, B. Jin, G. Lederman, Y. Shoukry, E. A. Lee, S. A. Seshia, and A. L. Sangiovanni-Vincentelli, “Gordian smt: Untangling ranging attacks in noisy sensor networks for secure localization,” 2017. [40] L. Lazos and R. Poovendran, “Serloc: Robust localization for wireless sensor networks,” ACM Transactions on Sensor Networks (TOSN), vol. 1, no. 1, pp. 73–100, 2005. [41] A. Alanwar, Y. Shoukry, S. Chakraborty, P. Martin, P. Tabuada, and M. Srivastava, “Proloc: Resilient localization with private observers using partial homomorphic encryption,” in Proceedings of the 16th ACM/IEEE International Conference on Information Processing in Sensor Networks, ser. IPSN ’17. New York, NY, USA: ACM, 2017, pp. 41–52. [42] A. Srinivasan and J. Wu, “A survey on secure localization in wireless sensor networks,” Encyclopedia of Wireless and Mobile communications, p. 126, 2007. [43] A. Boukerche, H. A. Oliveira, E. F. Nakamura, and A. A. Loureiro, “Secure localization algorithms for wireless sensor networks,” IEEE Communications Magazine, vol. 46, no. 4, 2008. [44] K. Sun, P. Ning, and C. Wang, “Tinysersync: Secure and resilient time synchronization in wireless sensor networks,” in Proceedings of the 13th ACM Conference on Computer and Communications Security, ser. CCS ’06. New York, NY, USA: ACM, 2006, pp. 264–277. [45] S. Ganeriwal, C. Pöpper, S. Čapkun, and M. B. Srivastava, “Secure time synchronization in sensor networks,” ACM Transactions on Information and System Security (TISSEC), vol. 11, no. 4, p. 23, 2008. [46] J. Ponniah, Y. Hu, and P. R. Kumar, “A clean slate design for secure wireless ad-hoc networks - part 2: Open unsynchronized networks,” in Int. Symp. Modeling and Optimization in Mobile, Ad Hoc, and Wireless Networks (WiOpt), Mumbai, India, May 2015, pp. 183–190. [47] A. Aichhorn, B. Etzlinger, S. Hutterer, and R. Mayrhofer, “Secure communication interface for line current differential protection over ethernet-based networks,” in IEEE Manchester PowerTech, Jun. 2017. [48] H. Yih-Chun and A. Perrig, “A survey of secure wireless ad hoc routing,” IEEE Security & Privacy, vol. 2, no. 3, pp. 28–39, 2004. [49] A. Boukerche and D. Turgut, “Secure time synchronization protocols for wireless sensor networks,” IEEE Wireless Communications, vol. 14, no. 5, 2007. [50] K. B. Rasmussen, S. Capkun, and M. Cagalj, “Secnav: secure broadcast localization and time synchronization in wireless networks,” in Pro- [51] [52] [53] [54] [55] [56] [57] [58] [59] Function 1: Attack Generator Pseudocode ceedings of the 13th annual ACM international conference on Mobile computing and networking. ACM, 2007, pp. 310–313. A. Alanwar, H. Ferraz, K. Hsieh, P. Martin, J. Hespanha, and M. Srivastava, “D-slats: Distributed simultaneous localization and time synchronization,” Proceedings of the 18th ACM International Symposium on Mobile Ad Hoc Networking and Computing, 2017. H. Ferraz, A. Alanwar, M. Srivastava, and J. P. Hespanha, “Node localization based on distributed constrained optimization using jacobi’s method,” 2017. J. Aspnes, D. Goldenberg, and Y. R. Yang, “On the computational complexity of sensor network localization,” in Algorithmic aspects of wireless sensor networks. Springer, 2004, pp. 32–44. B. Jackson and T. Jordán, “Connected rigidity matroids and unique realizations of graphs,” Journal of Combinatorial Theory, Series B, vol. 94, no. 1, pp. 1–29, 2005. P. Zhang and Q. Wang, “On using the relative configuration to explore cooperative localization,” IEEE Transactions on Signal Processing, vol. 62, no. 4, pp. 968–980, Feb 2014. A. Alanwar, F. Anwar, J. P. Hespanha, and M. Srivastava, “Realizing uncertainty-aware timing stack in embedded operating system,” in Proc. of the Embedded Operating Systems Workshop, Oct. 2016. R. W. C Lenzen, P Sommer, “PulseSync: An Efficient and Scalable Clock Synchronization Protocol,” in IEEE/ACM TRANSACTIONS ON NETWORKING. M. Quigley, K. Conley, B. P. Gerkey, J. Faust, T. Foote, J. Leibs, R. Wheeler, and A. Y. Ng, “Ros: an open-source robot operating system,” in ICRA Workshop on Open Source Software, 2009. “Bitcraze crazyflie 2.0,” https://www.bitcraze.io/, accessed: 2017-10-01. float getDistanceAttackValue ( type , currentT , totalT ) { if ( currentT < totalT /3) { Shift = 2; paretoScale = 3; } else if ( currentT > totalT /3 && currentT <2* totalT /3) { Shift = 6; paretoScale = 6.5; } else { Shift = 1; paretoScale = 2; } paretoShape = 3; if ( type ==1) // Uniform Distribution attack = 2*( rand () + Shift ); A PPENDIX else if ( type ==2) A. Experimental Setup The main components of our testbed can be summarized in the following points: • Motion capture system capable of 3D rigid body position measurement with less than 0.5 mm accuracy. The system consists of an eight-camera which are deployed in order to provide accurate ground truth position measurements. The results presented in this work treat the motion capture estimate as a true position, though we qualify here that all results are accurate to within the motion capture accuracy. The ground truth position estimates from the motion capture cameras are sent to a centralized server which uses the Robot Operating System (ROS) [58] with a custom package. We adopt a right-handed coordinate system where y is the vertical axis, and x and z make up the horizontal plane. • The Fixed nodes used in the following experiments consist of custom-built circuit boards equipped with ARM Cortex M4 processors t 196 MHz powered over Ethernet and communicating to Decawave DW1000 ultrawideband radios as shown in Figure 7 and Figure 8. Each node performs a single and double-sided two-way range with its neighbors. The used Decawave radio is equipped with a temperature-compensated crystal oscillator with frequency equals 38.4 MHz and a stated frequency stability of ±2 ppm. We installed eight UWB nodes in different positions in a 10×9 m2 lab. More specifically, six nodes are placed on the ceiling at about 2.5m high, and two were placed at waist height at about 1 m in order to better disambiguate positions on the vertical axis. Each node is fully controllable over a TCP/IP command structure from the central server. These nodes are placed so as to remain // Normal Distribution attack = 2* randn () + Shift ; else if ( type ==3) // Pareto Distribution attack = randp ( paretoShape , paretoScale ); return attack ; } • • mostly free from obstructions, maximizing line-of-sight barring pedestrian interference. The Mobile Node used in the experiments are batterypowered mobile nodes also with ARM Cortex M4 processors based on the CrazyFlie 2.0 helicopter [59] and equipped with the very same DW1000 radio as shown in Figure 9. This allows for compatibility in the single and double sided ranging technique used. The server is a MacBook Pro laptop with Intel(R) Core i7-4870HQ CPUs @2:5GHz, which is a normal PC. B. Attacks on Distances Function getDistanceAttackValue shows the attacker behavior for corrupting the measurements. We considered, as a proof of concept, three types of attacks using Uniform, Normal and Pareto Distributions. We gave them names as type 1, 2, and 3 attacks, respectively. rand(), randn() and randp() are considered APIs to get the required distribution. currentT is the current system time and totalT is the total execution time. We considered Pareto Distribution as an example of heavytailed distributions. The Pareto distribution is characterized by a scale parameter paretoScale and a shape parameter Fig. 6: Experimental setup overview, including, UWB nodes, motion capture cameras, and mobile quadrotor UWB nodes Fig. 7: Custom anchor node with ARM Cortex M4 processor and UWB expansion. Fig. 8: Ceiling-mounted anchor with DW1000 UWB radio in 3D-printed enclosure. paretoShape. We picked the parameters of the distributions to be logical attack values resulting in an acceptable position in the localization area. Otherwise, the attack would be easily detected. Note that generating the attack values according to Function 1 simulates time-varying attack values that are different for all links. The trend in the evaluation of the related work is to use a uniform random number generator to define attack which can look like some bias in the sensor reading from a practical point of view. Thus, we used such time-varying parameters that can evaluate the algorithm in a better way. C. Attacks on Time We would like to open a discussion in the types of the time attacks, as they are tricky ones. Simple monitoring for evolving time of every node can help in detecting many attacks. For example, the time should not go backward; thus any reported time value in the past can be flagged as an attack. Also, the time can’t go faster than the specification of the crystal, which is public information. However, we did not consider this type of smart checkers in SecSens, we just let the secure algorithms deal with that, but it can be a possible future work. One popular attack in the time domain to provide a constant delay to pretend, as if the time is shifted, that is why we considered adding constant time attacks to the measurements while evaluating SecSens. Fig. 9: CrazyFlie 2.0 quadrotor helicopter with DW1000 UWB expansion. D. Measurements Correlations Many sensors in CPS reported correlated measurements. For instance, some distance measurements could be based on the time of flight calculations which is tightly coupled with time measurements. Such tight coupling could be investigated to detect attacks. We should note that SecSens does not at this stage consider the measurements correlation and dealt with the measurements as uncorrelated measurements. Many other practical considerations could be investigated to enhance the secure estimation algorithms. E. CPS Physics Understanding the underlying physics governing the CPS itself would offer significant support to the secure estimation algorithms using preprocessing phase which would help in filtering the measurements. If a sensor observes a signal that appears to violate the physics governing the CPS dynamics, an attack flag can be easily raised to enhance the CPS security.
3cs.SY
Beyond the Pearson correlation: heavy-tailed risks, weighted Gini correlations, and a Gini-type weighted insurance pricing model Edward Furman1 Department of Mathematics and Statistics, York University, arXiv:1607.02623v1 [math.ST] 9 Jul 2016 Toronto, Ontario M3J 1P3, Canada Ričardas Zitikis Department of Statistical and Actuarial Sciences, University of Western Ontario, London, Ontario N6A 5B7, Canada Abstract. Gini-type correlation coefficients have become increasingly important in a variety of research areas, including economics, insurance and finance, where modelling with heavy-tailed distributions is of pivotal importance. In such situations, naturally, the classical Pearson correlation coefficient is of little use. On the other hand, it has been observed that when light-tailed situations are of interest, and hence when both the Gini-type and Pearson correlation coefficients are well-defined and finite, then these coefficients are related and sometimes even coincide. In general, understanding how the correlation coefficients above are related has been an illusive task. In this paper we put forward arguments that establish such a connection via certain regressiontype equations. This, in turn, allows us to introduce a Gini-type Weighted Insurance Pricing Model that works in heavy-tailed situation and thus provides a natural alternative to the classical Capital Asset Pricing Model. We illustrate our theoretical considerations using several bivariate distributions, such as elliptical and those with heavy-tailed Pareto margins. Key words and phrases: Pearson correlation, weighted Gini correlation, capital asset pricing model, weighted insurance pricing model, bivariate distributions. JEL classification codes: IM10, IM30, IE43, G32. 1 Corresponding author. Email: [email protected] 1 1 Introduction The topic of measuring association has been of profound interest in many theoretical and applied research areas. The Pearson correlation coefficient, ρ := ρ[X, Y ] for two random variables (r.v.’s) X and Y has arguably been one of the most popular members of every researcher’s toolbox, notwithstanding its known shortcomings, and especially the requirement of finite second moments. The latter requirement can be a real impediment because modelling in economics, finance, and insurance frequently requires heavy-tailed distributions. Furthermore, the coefficient ρ can turn out to be very small, and even zero, when the r.v.’s X and Y are strongly dependent. This should not, of course, be surprising because ρ aggregates, in the form of an integral, the values FX,Y (x, y) − FX (x)FY (y) over all real x and y, where FX,Y denotes the joint cumulative distribution function (c.d.f.) of X and Y , and FX and FY are the respective marginal c.d.f.’s. The desire to avoid some of these, and other, limitations of the Pearson correlation coefficient has naturally grown into a strong impetus for seeking alternatives (cf., e.g., Schechtman and Yitzhaki, 2013). The monograph by Schechtman and Yitzhaki (2013) makes a number of convincing arguments, supported by illustrative examples, in favour of the extended Gini correlation coefficient Γγ [X, Y ] = Cov[X, (1 − FY (Y ))γ ] , Cov[X, (1 − FX (X))γ ] (1.1) indexed by parameter γ > 0. When γ = 1, then the extended Gini correlation coefficient reduces to the classical Gini correlation coefficient, succinctly Γ[X, Y ] = Cov[X, FY (Y )] . Cov[X, FX (X)] Various properties of Γγ [X, Y ] have been documented and discussed in the aforementioned monograph (see also Samanthi et al., 2016). For example, we learn that when the pair (X, Y ) follows the bivariate normal distribution, then Γγ [X, Y ] coincides with the Pearson correlation coefficient ρ[X, Y ] irrespectively of the value of γ > 0. This property, obviously, does not hold in general, which gives rise to a natural question as to when the two coefficients are equal, but when they are not, then how much they differ. These are among the problems that we tackle in this paper. On a different note, the power weight function w(t) = tγ that transforms the decumulative distribution functions (d.d.f.’s) F X (x) := 1 − FX (x) and F Y (y) := 1 − FY (y) in the definition of Γγ [X, Y ] might not be sufficiently flexible to adequately emphasize (or de-emphasize) certain portions of the ranks of X and Y . For example, in prospect theory (e.g., Tversky and Kahneman, 1992; Sriboonchita at al., 2009; Wakker, 2010; and references therein) we find arguments in favour of sigmoidal and more complexly-shaped 2 weight functions. To accommodate various weighing designs, we therefore suggest using the weighted Gini correlation coefficient Cw [X, Y ] = Cov[X, w(1 − FY (Y ))] , Cov[X, w(1 − FX (X))] (1.2) where the weight function w : [0, 1] → [0, 1] can be any non-decreasing function for which the numerator and the denominator are well-defined and finite. The methodology that we develop in this paper can successfully tackle this correlation coefficient for large classes of weight functions and bivariate distributions. We have organized the rest of this paper as follows. In Section 2 we present and discuss general properties of the weighted Gini correlation coefficient, as well as its relationships to the Capital Asset Pricing Model (CAPM) and Weighted Insurance Pricing Model (WIPM). In Section 3, we present a technique that relates the weighted Gini correlation coefficient to that of Pearson. Since the latter is closely linked to the bivariate normal distribution, in the same section we discuss the aforementioned link in the case of bivariate normal and, more generally, elliptical distributions. In Sections 4, 5 and 6 we deal, in increasing complexity, with three bivariate Pareto-type distributions that model pairs (X, Y ) with i) exchangeable margins and linear regression, ii) non-exchangeable margins and linear regression, and iii) non-exchangeable margins and non-linear regression. Proofs are relegated to Appendix A. To somewhat simplify the presentation, throughout the paper we use W to denote the class of non-decreasing (weight) functions w : [0, 1] → [0, 1]. 2 Properties of weighted Gini correlations We have already noted several drawbacks of the Pearson correlation coefficient ρ[X, Y ] when dealing with financial and insurance data, especially when the underlying r.v.’s do not have finite second moments. Some other well-known drawbacks of relevance to our present work are: • The infinum and supremum of ρ[X, Y ] over all copulas governing the dependence between X and Y generally depend on the marginal c.d.f.’s FX and FY (Shih and Huang, 1992). Specifically, given an arbitrary pair of marginal c.d.f.’s, we cannot claim that there is a pair (X, Y ) whose Pearson correlation coefficient is +1, but there is such a pair (with its dependence described by the co-monotonic copula) in the case of the Gini correlation coefficient. • The Pearson correlation coefficient ρ[X, Y ] is not invariant under increasing and non-linear transformations of the r.v.’s X and Y (Kendall and Stuart, 1979). In the 3 case of the Gini correlation coefficient we have that Γ[X, h(Y )] = Γ[X, Y ] for any increasing function h. Among the advantages of the Pearson correlation coefficient are its intuitive appeal and computing easiness. The coefficient manifests naturally and plays a pivotal role in a myriad of situations. For example, it is a parameter of the bivariate normal distribution, and it measures the non-diversifiable risk in the Capital Asset Pricing Model (CAPM) (Sharpe, 1964; Lintner, 1965; Black, 1972) and in its insurance counterpart (Furman and Zitikis, 2009) called the Weighted Insurance Pricing Model (WIPM). We next discuss properties of the weighted Gini correlation coefficient and in this way highlight its superiority (at least in insurance and financial contexts) when compared to the Pearson correlation coefficient. Theorem 2.1 (Normalization). Let the c.d.f.’s FX and FY be continuous functions. Then −λw [X] ≤ Cw [X, Y ] ≤ 1 (2.1) for every w ∈ W, where λw [X] = Cov[X, w(FX (X))] Cov[X, w ∗ (FX (X))] with w ∗ (t) = 1 − w(1 − t). Furthermore, (a) the upper bound is achieved with Y = X, in which case we have Cw [X, X] = 1; (b) the lower bound is achieved with Y = −X, in which case Cw [X, −X] = −λw [X]; (c) when w(t) = t (the classical Gini correlation case), then λw [X] = 1. Theorem 2.2 (Sign). For every w ∈ W, we have (a) Cw [X, Y ] = 0 when X and Y are independent; (b) Cw [X, Y ] ≥ 0 when X and Y are positively quadrant dependent (PQD); (c) Cw [X, Y ] ≤ 0 when X and Y are negatively quadrant dependent (NQD). Theorem 2.3 (Symmetry). Suppose there are real constants a, c ∈ R and positive constants b, d > 0, such that the random variables Xa,b = a + bX and Yc,d = c + dY are interchangeable, that is, the distribution of (Xa,b , Yc,d) is equal to that of (Yc,d, Xa,b ). Then for every w ∈ W we have Cw [X, Y ] = Cw [Y, X]. 4 (2.2) Theorem 2.4 (Invariance under incrreasing transformations). Let a ∈ R and b > 0 be some constants, and let h : [0, 1] → R be an increasing function. Then for every w ∈ W we have Cw [a + bX, h(Y )] = Cw [X, Y ]. (2.3) Hence, in particular, Cw [a + bX, c + dY ] = Cw [X, Y ] for all real constants a, c ∈ R and all positive constants b, d > 0. Before stating our next theorem, we recall that for the set X of insurance risks X and non-decreasing weight functions v : [0, ∞) → [0, ∞), the functional Πv : X × X → [0, ∞] defined by the equation E[Xv(Y )] E[v(Y )] Πv [X, Y ] = (2.4) is called the economic weighted premium calculation principle (p.c.p.), whereas the equation (Furman and Zitikis, 2009) s Πv [X, Y ] = E[X] + ρ[X, Y ] Var[X] (πv [Y ] − E[Y ]) , Var[Y ] (2.5) which holds with πv [Y ] := Πv [Y, Y ] under certain assumptions on the joint c.d.f. of (X, Y ), is referred to as the Weighted Insurance Pricing Model (WIPM). For example, two natural choices of the r.v. Y would be i) leverage risk, which is of interest to the pricing actuary, and ii) the aggregate risk S = X + Y . In the latter case, the WIPM equation can be employed as an economic capital allocation rule, and we refer to Furman and Zitikis (2009) for details on this topic. An obvious disadvantage of the WIPM – akin to the CAPM – is its reliance on the assumption that the variances of underlying r.v.’s are finite. Consequently, the WIPM cannot be applied to a multitude of risks. To circumvent the problem, in definition (2.4) we set v(y) = w ◦ (1 − FY (y)), which gives rise to the following Gini economic p.c.p. ΠG,w [X, Y ] = E[Xw(1 − FY (Y ))] . E[w(1 − FY (Y ))] (2.6) Theorem 2.5 (Connection to WIPM). Let (X, Y ) be a pair of r.v.’s in X . When there exist constants α, β ∈ R such that E[X| Y ] = α + βY , then the Gini WIPM counterpart to equation (2.5) is ΠG,w [X, Y ] = E[X] + Cw [X, Y ] Cov[X, w(1 − FX (X))] (πG,w [Y ] − E[Y ]) , Cov[Y, w(1 − FY (Y ))] where πG,w [Y ] := ΠG,w [Y, Y ]. 5 (2.7) Unlike the WIPM equation (2.5), Gini WIPM equation (2.7) does not need finiteness of the second moments of X and Y , and as such it can be used for pricing/measuring risks with infinite variances. Also, Theorem 2.5 shows that while the Pearson correlation coefficient arises in the context of the CAPM, the weighted Gini correlation coefficient Cw [X, Y ] manifests in the context of the Gini variant of WIPM. Finally, Theorem 2.5 provides yet another justification for the exploration of computational tractability of the class of Gini correlations, with which we deal throughout the rest of this paper. 3 The Gini and Pearson correlations connected At first sight, the weighted Gini correlation coefficient Cw [X, Y ] and the Pearson correlation coefficient ρ[X, Y ] seem to be quite different: the former aggregates the value of X with the ranks of Y , and also with the ranks of X, whereas the Pearson correlation coefficient couples the values of X and Y and does not rely on the ranks of any of them. Nevertheless, the two coefficients are related as the following theorem shows. Theorem 3.1. When there exist constants α, β ∈ R such that E[X| Y ] = α + βY , then the equation Cov[Y, w(1 − FY (Y ))] (3.1) Cov[X, w(1 − FX (X))] holds for every w ∈ W. The converse is also true, assuming continuity of the c.d.f. FY . Cw [X, Y ] = β The most important part of Theorem 3.1 is of course the fact that having a linear regression function allows us to decompose the weighted (and thus extended and classical) Gini correlation coefficient into i) covariance-type functionals based on the marginal c.d.f.’s FX and FY , and ii) the slope β of the regression line whose immense role in the classical Capital Asset Pricing Model (CAPM) has been well explored and documented (e.g., Levy, 2011; and references therein). The main purpose of the converse of the theorem, which we establish under an additional but very mild condition, is to show that the main part cannot be improved in general, that is, the linearity of the regression function is pivotal for the form of Cw [X, Y ] spelled out on the right-hand side of equation (3.1). We now illustrate Theorem 3.1 when the pair (X, Y ) follows the bivariate normal distribution N2 (µ, Σ) with the vector µ = (µX , µY ) of the marginal expectations and 2 the symmetric matrix Σ whose main diagonal is made up of the variances σX = Var[X] and σY2 = Var[Y ], and the two off-diagonal entries are equal to the covariance σX,Y = Cov[X, Y ]. It is well known that the equation E[X| Y ] = α + βY holds with the intercept α = µX − βµY and the slope β = σX,Y /σY2 . Hence, an application of Theorem 3.1 establishes the equation Cw [X, Y ] = ρ[X, Y ] 6 (3.2) for every w ∈ W. This equation implies the well-known fact (e.g., Schechtman and Yitzhaki, 2013) that the Pearson and the extended Gini correlation coefficients are equal in the bivariate normal case. Hence, if the random pair (X, Y ) follows the bivariate normal distribution, then the Gini-type WIPM equation reduces to s Var[X] (πG,w [Y ] − E[Y ]) . ΠG,w [X, Y ] = E[X] + ρ[X, Y ] Var[Y ] (3.3) More generally, let the pair (X, Y ) follow the bivariate elliptical distribution E2 (µ, Σ) with the vector µ = (µX , µY ) of marginal expectations and the positive-definite matrix Σ 2 whose diagonal entries are σX and σY2 and the two identical off-diagonal entries are σX,Y . We note that, unlike in the bivariate normal case, the just introduced σ’s may or may not be the variances and covariances of X and Y . Nevertheless, we have (e.g., Fang et al., 1990) the equation E[X| Y ] = α + βY with the intercept α = µX − βµY and the slope β = σX,Y /σY2 , and so Theorem 3.1 applies and gives the equation σX,Y Cw [X, Y ] = (3.4) σX σY for every w ∈ W. Consequently, just like in the bivariate normal case, the Pearson and extended Gini correlation coefficients coincide whenever the former exists. When it does not exist, which says that we are dealing with heavy-tailed random variables, then Γγ [X, Y ] and likewise Cw [X, Y ] can be viewed as extensions of the Pearson correlation coefficient to those pairs of X and Y that are outside the domain of definition of ρ[X, Y ]. Finally, the Gini-type WIPM equation is given in this case by ΠG,w [X, Y ] = E[X] + 4 σX,Y (πG,w [Y ] − E[Y ]) . σY2 (3.5) Exchangeable linearly-regressed margins The elliptical distribution is a natural extension of the normal one and has served as an adequate model in many financial problems. Its role in Economics has not been particularly pronounced, where the classical Pareto distribution with its numerous extensions and variations have dominated the scene. Many insurance risk models have also relied on extensions and generalizations of the Pareto distribution (e.g., Brazauskas and Serfling, 2003; Goovaerts et al., 2005). Because of this reason, and to emphasize that Theorem 3.1 does not hinge on the symmetry of the joint distribution of X and Y , we devote the rest of this paper to several bivariate Pareto-type distributions in the context of Theorem 3.1. We begin with the univariate Pareto distribution of the 2nd kind, whose d.d.f. is  −δ x−µ F (x) = 1 + σ 7 for all x > µ, where µ ∈ R and σ > 0 are location and scale parameters, respectively, and δ > 0 is tail index. The distribution has been a classical example of heavy-tailness: when δ ∈ (1, 2], then the variance does not exist, and when δ ∈ (0, 1], then even the expectation does not exist. When it comes to bivariate extensions of this distribution, there are many of them to consider. In this section we concentrate on the bivariate Pareto distribution of the 2nd type (Arnold, 1983) whose joint d.d.f. is −δ  x − µX y − µY + F X,Y (x, y) = 1 + σX σY (4.1) for all x > µX and y > µY , where µX , µY ∈ R are location parameters, σX , σY > 0 are scale parameters, and δ > 0 is tail index. (Despite notational similarities, the two µ’s are not the means, and the two σ’s are not the standard deviations of X and Y .) In Figure 4.1 we depict this joint d.d.f. when µX = µY = 0, σX = σY = 1, and δ ≈ 5.87. 1 0.8 F (x, y) 0.6 0.4 0.2 0 -0.2 1.5 1.5 1 1 0.5 y 0.5 0 0 x Figure 4.1: De-cumulative distribution function (4.1). Consequently, ρ[X, Y ] ≈ 0.17. The distribution is symmetric, because X and Y are identically distributed, and quite light-tailed, because δ ≈ 5.87 is a fairly large tail-index value. The pair (X, Y ) with joint d.d.f. (4.1) enjoys a number of attractive properties, which have arguably been a reason for the popularity of this distribution. Among the properties is the stochastic representation   EY EX , , µY + σY (X, Y ) =d µX + σX G G 8 (4.2) where “=d ” denotes equality in distribution, EX and EY are independent exponential r.v.’s with unit rates, and G is an independent gamma-distributed r.v. with shape parameter δ > 0 and unit scale. Succinctly, we write EX ∼ Exp(1), EY ∼ Exp(1) and G ∼ Ga(δ, 1). Note 4.1. The two exponential random variables EX and EY can be viewed as models of idiosyncratic risks, and the third random variable G as the model for a background, or underlying, risk. Naturally, one may need to deal with more than two dimensions and with other distributions than the exponential and gamma, and all this is indeed possible (cf., e.g., Asimit et al., 2016; and references therein). A very important for us property of this bivariate distribution is that its regression function is linear, that is, the equation E[X| Y ] = α + βY holds, and the parameters are   µY σX σX 1− and β = . α = µX + δ σY δσY Consequently, Theorem 3.1 allows us to calculate the weighted Gini correlation coefficient at a stroke: Cw [X, Y ] = σX Cov[Y, w(1 − FY (Y ))] 1 = , δσY Cov[X, w(1 − FX (X))] δ (4.3) where the right-most equation holds because the ratio of the covariances is equal to σY /σX , which is a simple consequence of the fact that (X − µX )/σX and (Y − µY )/σY are identically distributed. Note 4.2. For the covariances in equation (4.3) to be finite, the means E[X] and E[Y ] have to be finite, and this is true whenever δ > 1, which we assume. On the other hand, the Pearson correlation coefficient ρ[X, Y ] exists and is equal to 1/δ only when δ > 2. Consequently, we can say that the weighted Gini correlation coefficient Cw [X, Y ] is an extension of the Pearson correlation coefficient to a wider class of random pairs (X, Y ), and in particular to those following d.d.f. (4.1) with the tail-index δ ∈ (1, ∞). This extension is useful because tail-index values δ ∈ (1, 2] have manifested in numerous real-life data sets: insurance, financial, and those related to income inequality (cf., e.g., Greselin et al., 2014; and references therein). 5 Non-exchangeable linearly-regressed margins In some situations, exchangeability might be a drawback because identical tail indices of the margins X and Y might contradict empirical evidence. This suggests that the two idiosyncratic r.v.’s EX and EY in stochastic representation (4.2) might be affected differently by the background r.v. G. To rectify this situation, we can proceed by 9 introducing an auxiliary ‘background’ random variable GY ∼ Ga(δY , 1) with parameter δY > 0, and require it to be independent of all the other random variables. That is, we let the pair (X, Y ) admit the stochastic representation   EY EX . , µY + σY (X, Y ) =d µX + σX G GY + G (5.1) with location parameters µX , µY ∈ R and scale parameters σX , σY > 0. The corresponding d.d.f. is (Su and Furman, 2016) −δ  −δY  y − µY x − µX y − µY + 1+ F X,Y (x, y) = 1 + σX σY σY (5.2) for all x > µX and y > µY , where δ > 0 and δY > 0 are tail indices. Obviously, (X − µX )/σX is Pareto of the 2nd kind with the tail index δ, and (Y − µY )/σY is Pareto of the 2nd kind with the tail index δY∗ = δ + δY . In Figure 5.1 we depict this joint d.d.f. 1 0.8 F (x, y) 0.6 0.4 0.2 0 -0.2 1.5 1.5 1 1 0.5 y 0.5 0 0 x Figure 5.1: De-cumulative distribution function (5.2). when µX = µY = 0, σX = σY = 1, δ = 2.1 and δY∗ = 2.6254. As a result of these choices, we have ρ[X, Y ] ≈ 0.17, which is an approximately the same Pearson correlation value as in the previous section. Since the tail indices are different, the joint distribution is not symmetric. Note also that the current distribution is more heavy-tailed than that depicted in Figure 4.1. Remarkably, despite being an asymmetric distribution, it nevertheless has a linear regression function (Su and Furman, 2016, Theorem 2.3). Indeed, the equation E[X| Y ] = 10 α + βY holds with the parameters α= σX (δY∗ − 1) δY∗ (δ − 1) and β = σX (δY∗ − 1) . σY δY∗ (δ − 1) (5.3) Hence, only with a slightly more complex stochastic representation than that in equation (4.2), we have succeeded in departing from the symmetry of margins X and Y but preserved the linearity of their regression function. Consequently, we can still enjoy the computational tractability of the weighted Gini correlation coefficient. Namely, Theorem 3.1 implies the equation Cw [X, Y ] = σX (δY∗ − 1) Cov[Y, w(1 − FY (Y ))] , σY δY∗ (δ − 1) Cov[X, w(1 − FX (X))] (5.4) and so we only need to calculate the two covariances on the right-hand side of equation (5.4). We note at the outset that, unlike in the previous section, we are now dealing with the case when the standardized covariances do not cancel out, because (X − µX )/σX and (Y − µY )/σY have different tail indices. Hence, some additional effort is required. To illustrate, let w(t) = tγ , in which case Cw [X, Y ] reduces to the extended Gini correlation coefficient Γγ [X, Y ]. With technicalities relegated to Appendix A, we have the formula Γγ [X, Y ] = δ(γ + 1) − 1 1 × ∗ δ δY (γ + 1) − 1 (5.5) whenever δ > 1 and δY > 0. For comparison, the Pearson correlation coefficient is (Su and Furman, 2016, Proposition 2.2 and Corollary 3.2) s δ−2 ρ[X, Y ] = ∗ δδY (δY∗ − 2) (5.6) whenever δ > 2 and δY > 0. Thus, in general, Γγ [X, Y ] and ρ[X, Y ] do not coincide. We see from equations (5.5) and (5.6) that the extended Gini correlation coefficient is a decreasing function of δ, whereas the Pearson correlation coefficient is not. We also see this phenomenon in Figure 5.2, where µX = µY = 0, σX = σY = 1, and δY = 0.5254. Our next illustration of Theorem 3.1 concerns the possibly S-shaped weight function w(t) = wa,b (t), where 1 wa,b (t) = B(a, b) Z t sa−1 (1 − s)b−1 ds 0 for all t ∈ (0, 1), with parameters a > 0 and b > 0, whose values determine whether the weight function is convex, concave, or S-shaped. Obviously, when b = 1, then wa,b (t) reduces to the power function ta that leads to the extended Gini correlation coefficient Γγ [X, Y ] with γ = a. (Certainly, the function wa,b is known in Calculus as the regularized incomplete beta function, whereas in Statistics it is known as the beta c.d.f.) 11 0.5 0.45 0.4 0.35 Correlation 0.3 0.25 0.2 0.15 0.1 0.05 0 1 2 3 4 5 6 7 8 9 10 δ Figure 5.2: Extended Gini (blue curve, decreasing) and Pearson (red curve, nonmonotonic) correlation coefficients as functions of δ. Just like in the (convex or concave) case w(t) = tγ considered earlier, we can now equally successfully employ Theorem 3.1 and concentrate on calculating the two covariances on the right-hand side of equation (5.4) with w(t) = wa,b (t). With the technical details relegated to Appendix A, we obtain the equation b B (a + 1 − 1/δY∗ , b) − 1 B(a, b) a+b Cwa,b [X, Y ] = × . B (a + 1 − 1/δ, b) b δ 1− − B(a, b) a+b 1− (5.7) When b = 1, then the right-hand side of equation (5.7) reduces to that of equation (5.5), which is natural because wa,b (t) is the power function ta when b = 1. Note 5.1. One may naturally wonder whether formulas like (5.5)–(5.7) are of practical value, given theoretical challenges when deriving them. The answer is definitely in affirmative because parametric statistical inference crucially hinges on such formulas. 6 Non-exchangeable nonlinearly-regressed margins Here we discuss yet another useful Pareto-type bivariate distribution. We note at the outset that it does not have a linear regression function and thus Theorem 3.1 cannot be 12 applied. Namely, let the pair (X, Y ) admit the stochastic representation   EY EX , , µY + σY (X, Y ) =d µX + σX GX + G GY + G (6.1) where EX and EY are two independent exponential r.v.’s with unit scales, and G ∼ Ga(δ, 1), GX ∼ Ga(δX , 1) and GY ∼ Ga(δY , 1) are three independent gamma r.v.’s, which are also independent of EX and EY . Hence, µX and µY ∈ R are location parameters, σX and σY > 0 are scale parameters, and δ, δX and δY > 0 are tail indices. The joint d.d.f. of the random pair (X, Y ) is (Su and Furman, 2016)  −δ  −δX  −δY x − µX y − µY y − µY x − µX F X,Y (x, y) = 1 + 1+ + 1+ σX σY σX σY (6.2) for all x > µX and y > µY . We see from the d.d.f. that (X − µX )/σX is Pareto of the ∗ 2nd kind with the tail index δX = δ + δX , and (Y − µY )/σY is Pareto of the 2nd kind with the tail index δY∗ = δ + δY . In Figure 6.1 we depict this joint d.d.f. when µX = µY = 0, 1 0.8 F (x, y) 0.6 0.4 0.2 0 -0.2 1.5 1.5 1 1 0.5 y 0.5 0 0 x Figure 6.1: De-cumulative distribution function (6.2). ∗ σX = σY = 1, δX = 3 and δY∗ = 2.5. Again, we have chosen the parameters so that ρ[X, Y ] ≈ 0.17, which is an approximately the same Pearson correlation value as in the previous sections. The joint distribution is not symmetric due to the different values of ∗ δX and δY∗ , and it is more heavily-tailed than that depicted in Figure 4.1. Unlike in the previous sections, the current bivariate Pareto distribution does not have a linear regression function (Su and Furman, 2016, Theorem 3.3), and so we cannot rely 13 on Theorem 3.1 to easily calculate Gini-type correlation coefficients. Nevertheless, we can still compute them directly and get closed-form formulas, but the task is considerably more involved. As an example, consider the extended Gini correlation coefficient Γγ [X, Y ]. We need the (q + 1) × q hypergeometric function (Gradshteyn and Ryzhik, 2007) q+1 Fq (a1 , . . . , aq+1 ; b1 , . . . , bq ; z) := ∞ X (a1 )k , . . . , (aq+1 )k z k k=0 (b1 )k , . . . , (bq )k k! , (6.3) where q ≥ 0 is a non-negative integer and (a)k is the Pochhammer symbol. When a1 , . . . , aq+1 are positive, and this is the case upon which we rely, then the radius of convergence of the series is the open disk |z| < 1 of the complex plane. On the boundary |z| = 1 of the disc, the series converges absolutely when h := b1 + · · · + bq − a1 − · · · − aq+1 > 0, and converges except at z = 1 when −1 < h ≤ 0. Let i = (i1 , i2 , i3 ) be a non-negative integer-valued triplet such that i1 + i2 + i3 = 2, and let I denote the set of all such triplets. We prove (details in Appendix A) that for ∗ ∗ γ > 0, δX,1,3 = δX + i1 + i3 , and appropriately defined constants di , the extended Gini correlation coefficient is ∗ δX (γ + 1) + 1 ∗ δX γ ∗ ∗ ∗ (γ + 1) − 1)3 F2 (δ + i3 , 2, 1; δX,1,3 , (γ + 1)δY∗ + i2 + i3 ; 1) 1 X (δX − 1)(γ + 1)(δX di − ∗ . ∗ ∗ δX γ i∈I (δX,1,3 − 2)(δX,1,3 − 1)((γ + 1)δY∗ + i2 + i3 − 1) Γγ [X, Y ] = (6.4) We admit that it is a cumbersome formula, but it is a natural one because it contains, as special cases, earlier derived formulas (4.3) and (5.5). To demonstrate, consider first d.d.f. (4.1), in which case we let δX ↓ 0 and δY ↓ 0, then set ( 1 when i = (0, 0, 2), di = 0 otherwise, and finally use equation (6.3) to obtain 3 F2 (δ ∗ + i3 , 2, 1; δX,1,3 , (γ + 1)δY∗ + i2 + i3 ; 1) = 2 F1 (2, 1; (γ + 1)δ + 2; 1) = δ(γ + 1) + 1 . δ(γ + 1) − 1 With these facts, formula (4.3) follows easily. In a similar fashion, consider d.d.f. (5.2), in which case we let δX ↓ 0, then set ( 1 when i = (0, 0, 2) or (0, 1, 1), di = 0 otherwise, and arrive at formula (5.5). 14 Note 6.1. Reflecting upon the bivariate distribution considered in this section, we see that the extended and, more generally, weighted Gini correlations can be calculated in cases that do not have linear regression functions. Indeed, a careful analysis of the proof of Theorem 3.1 shows that it is possible to accommodate non-linear regression functions as well, but the right-hand side of equation (3.1) changes, which is of course natural. Acknowledgements This work is a part of our research under the grant “The Capital Asset Pricing Model: an Insurance Variant” awarded by the Casualty Actuarial Society (CAS). A Appendix: proofs Recall the notation w ∗ (t) = 1 − w(1 − t), which we use throughout the appendix. Proof of Theorem 2.1. First, we rewrite the weighted correlation coefficient as follows: Cw [X, Y ] = Cov[X, w ∗ (V )] , Cov[X, w ∗ (U)] (A.1) where V = FY (Y ), and U = FX (X). Using Cuadras’s (2002) generalization of Hoeffding’s covariance representation, we have ZZ   ∗ Cov[X, w (V )] = P[X ≤ x, V ≤ t] − FX (x)t dxdw ∗ (t) (A.2) because FV (t) = t due to the fact that V is distributed uniformly on the interval [0, 1]. The upper Fréchet bound for the joint probability P[X ≤ x, V ≤ t] is min{FX (x), t}, which is equal to P[X ≤ x, U ≤ t] because U = FX (X). Thus P[X ≤ x, V ≤ t] − FX (x)t ≤ P[X ≤ x, U ≤ t] − FX (x)FU (t) because FU (t) = t due to the fact that U is distributed uniformly on the interval [0, 1]. Consequently, Cov[X, w ∗ (V )] ≤ Cov[X, w ∗ (U)], which proves Cw [X, Y ] ≤ 1. To prove Cw [X, Y ] ≥ −λw [X], we again start with equation (A.2) but this time use the lower Fréchet bound for P[X ≤ x, V ≤ t], which is max{FX (x) + t − 1, 0}. Note that max{FX (x)+t−1, 0}−FX (x)t = −(min{FX (x), 1−t}−FX (x)(1−t)). Since U = FX (X), we thus have   P[X ≤ x, V ≤ t] − FX (x)t ≥ − P[X ≤ x, U ≤ 1 − t] − FX (x)(1 − t) = P[X ≤ x, 1 − U ≤ t] − FX (x)t = P[X ≤ x, 1 − U ≤ t] − FX (x)F1−U (t). 15 Consequently, Cov[X, w ∗ (V )] ≥ Cov[X, w ∗ (1 − U)], which proves the bound Cw [X, Y ] ≥ Cov[X, w ∗ (1 − U)] Cov[X, w ∗ (U)] whose right-hand side is equal to −λw [X]. This completes the proof of Theorem 2.1. Proof of Theorem 2.2. Part (a) is obvious. To prove part (b), we rewrite the weighted correlation coefficient as follows: Cw [X, Y ] = Cov[X, w ∗ ◦ FY (Y )] . Cov[X, w ∗ ◦ FX (X)] (A.3) Since the function w ∗ ◦FX is non-decreasing, we know from Lehmann (1966) that Cov[X, w ∗ ◦ FX (X)] ≥ 0, and so we only need to show that Cov[X, w ∗ ◦FY (Y )] ≥ 0 whenever X and Y are PQD. Using Cuadras’s (2002) generalization of Hoeffding’s covariance representation, we have ∗ Cov[X, w ◦ FY (Y )] = ZZ   P[X ≤ x, Y ≤ y] − FX (x)FY (y) dxdw ∗ ◦ FY (y). (A.4) Since the function w ∗ ◦ FY is non-decreasing, the integral is non-negative whenever the integrand is non-negative, which is so whenever X and Y are PQD, that is, P[X ≤ x, Y ≤ y] ≥ FX (x)FY (y) for all x and y. This proves part (b). The proof of part (c) is analogous. This concludes the proof of Theorem 2.2. Proof of Theorem 2.3. We start with the elementary observation that Cw [X, Y ] = Cw [Xa,b , Yc,d]. (A.5) Next we rewrite the right-hand side of equation (A.5) in the form of a ratio analogous to that on the right-hand side of equation (A.3). Then, for both the numerator and the denominator, we apply Cuadras’s (2002) generalization of Hoeffding’s covariance representation, analogously to equation (A.4). In this way, we express Cw [Xa,b , Yc,d] in terms of the bivariate cdf of (Xa,b , Yc,d) and the marginal c.d.f.’s of Xa,b and Yc,d. The interchangeability assumption implies that the latter three c.d.f.’s are equal to those of (Yc,d, Xa,b ), Yc,d, and Xa,b , respectively, thus proving that Cw [Xa,b , Yc,d] is equal to Cw [Yc,d , Xa,b ], which is obviously equal to Cw [Y, X]. This concludes the proof of Theorem 2.3. Proof of Theorem 2.4. Since Cw [a + bX, h(Y )] = Cw [X, h(Y )], we only need to show that Cw [X, h(Y )] = Cw [X, Y ], which follows from the fact that Fh(Y ) (h(y)) = FY (y). This concludes the proof of Theorem 2.4. Proofs of Theorems 2.5 and 3.1 rely on the following lemma. 16 Lemma A.1. When there are constants α, β ∈ R such that E[X | Y ] = α + βY , then the equation Cov[X, w(1 − FY (Y ))] = βCov[Y, w(1 − FY (Y ))]. (A.6) holds for every w ∈ W. Proof. We have Cov[X, w(1 − FY (Y ))] = E[E[X | Y ]w(1 − FY (Y ))] − E[X]E[w(1 − FY (Y ))] = βE[Y w(1 − FY (Y ))] + (α − E[X])E[w(1 − FY (Y ))] = βE[Y w(1 − FY (Y ))] − βE[Y ]E[w(1 − FY (Y ))] = βCov[Y, w(1 − FY (Y ))], which establishes equation (A.6). Proof of Theorem 2.5. We start with the equations ΠG,w [X, Y ] − E[X] = α − E[X] + βE[Y ] + β (πG,w [Y ] − E[Y ]) = β (πG,w [Y ] − E[Y ]) , (A.7) that follow from the definitions of ΠG,w [X, Y ] and πG,w [Y ] combined with simple algebra, and the elementary equation E[X] = α + βE[Y ]. It now suffices to note that, in view of equation (A.6), we have Cov[X, w(1 − FY (Y ))] Cov[Y, w(1 − FY (Y ))] Cov[X, w(1 − FX (X))] = Cw [X, Y ] Cov[Y, w(1 − FY (Y ))] β= which establishes equation (2.7) and concludes the proof of Theorem 2.5. Proof of Theorem 3.1. Equations (3.1) and (A.6) are equivalent, and thus the equation E[X| Y ] = α + βY holds. To prove the second (i.e., converse) part of Theorem 3.1, we start with the assumption that equation (A.6) holds for every w ∈ W. With the notation Z = X − βY , equation (A.6) becomes equivalent to   E (Z − E[Z])w(1 − FY (Y )) = 0, (A.8) which by assumption must hold for all the weight functions w ∈ W, and in particular for those that safisfy w(t) > 0 for all t ∈ (0, 1). What remains to be shown, therefore, is that the validity of equation (A.8) for all w ∈ W implies the validity of Z − E[Z] = 0 almost surely. 17 (A.9) Indeed, statement (A.9) is equivalent to X − βY − E[X] + βE[Y ] = 0, and the latter equation obviously implies E[X| Y ] = α + βY with α = E[X] − βE[Y ], thus concluding the proof of the converse of Theorem 3.1. To verify that statement (A.9) holds, we proceed by contradiction, that is, we assume that statement (A.9) does not hold. Then there is a subset A of the underlying sample space Ω such that P(A) > 0 and Z(ω) − E[Z] 6= 0 for all ω ∈ A. We can refine this statement by decomposing A = A− ∪ A+ with either A− or A+ or both having (strictly) positive probabilities and such that Z(ω)−E[Z] < 0 for all ω ∈ A− and Z(ω)−E[Z] > 0 for all ω ∈ A+ . Assume for concreteness that P(A+ ) > 0, with the case P(A− ) > 0 analyzed analogously. We arrive at the required contradiction if w(1 − FY (Y (ω))) > 0 for P-almost all ω ∈ A+ . The latter holds if FY (Y (ω)) ∈ (0, 1) because we deal with the subclass of weight functions such that w(t) > 0 for all t ∈ (0, 1). Statement FY (Y (ω)) ∈ (0, 1) holds for P-almost all ω ∈ Ω because the c.d.f. FY is continuous by assumption. This concludes the proof of Theorem 3.1. Proof of equation (5.5). We need to calculate the two covariances on the right-hand side of equation (3.1). We start with the denominator and have Z ∞ γ E[(X − µX )(1 − FX (X)) ] = σX x(1 + x)δγ δ(1 + x)−(δ+1) dx 0 = σX . (γ + 1)(δ(γ + 1) − 1) Setting γ = 0, we have E[X−µX ] = σX /(δ−1). Furthermore, E[(1−FX (X))γ ] = 1/(γ+1). From these formulas, we obtain Cov[X, (1 − FX (X))γ ] = − γ δ σX . γ + 1 (δ − 1)(δ(γ + 1) − 1) (A.10) To calculate the covariance Cov[Y, (1 − FY (Y ))γ ], we recall that (Y − µY )/σY is Pareto of the 2nd kind with the tail index δY∗ = δ + δY . Hence, by changing α into α + αY and also σX into σY on the right-hand side of equation (A.10), we arrive at Cov[Y, (1 − FY (Y ))γ ] = − δY∗ γ σY ∗ . γ + 1 (δY − 1)((δY∗ )(γ + 1) − 1) (A.11) Using equations (A.10) and (A.11) on the right-hand side of equation (3.1), we obtain equation (5.5). Proof of equation (5.7). With the notation Z = (X −µX )/σX and the fact that FZ−1 (u) = 18 (1 − u)−1/δ − 1, we have E[(X − µX )wa,b (1 − FX (X))] = σX E[FZ−1(FZ (Z))wa,b (1 − FZ (Z))] Z 1 = σX (u−1/δ − 1)wa,b (u)du  0Z 1 b −1/δ . = σX u wa,b (u)du − a+b 0 Furthermore, Z 1 u −1/δ 0 1 u a−1 (1 − t)b−1 wa,b (u)du = dtdu u B(a, b) 0 0 Z 1 a−1  t (1 − t)b−1 δ 1 − t(δ−1)/δ dt = δ−1 0 B(a, b)   δ B (a + (δ − 1)/δ, b) = 1− . δ−1 B(a, b) Z −1/δ Z t Hence, with the formulas E[X − µX ] = σX /(δ − 1) and E[wa,b (1 − FX (X))] = b/(a + b), we obtain σX δ Cov[X, wa,b (1 − FX (X))] = δ−1   B (a + 1 − 1/δ, b) b 1− . − B(a, b) a+b (A.12) (Note that when b = 1, then equation (A.12) reduces to equation (A.10).) Changing δ into δ + δY and σX into σY on the right-hand side of equation (A.12), we arrive at   B (a + 1 − 1/(δ + δY ), b) b σY (δ + δY ) 1− . (A.13) − Cov[Y, wa,b (1−FY (Y ))] = δ + δY − 1 B(a, b) a+b Using covariance formulas (A.12) and (A.13) on the right-hand side of equation (5.4), we obtain equation (5.7). Proof of equation (6.4). The bivariate p.d.f. of (X − µX )/σX and (Y − µY )/σY is given by p(x, y; δX , δY , δ) = X di (1 + x)−(δX +i1 ) (1 + y)−(δY +i2 ) (1 + x + y)−(δ+i3 ) , (A.14) i∈I where I is the set of all non-negative and integer-valued triplets i = (i1 , i2 , i3 ) such that i1 + i2 + i3 = 2. We have 1 E[(X − µX )(1 − FY (Y ))γ ] σX X Z ∞Z ∞ ∗ = di x(1 + y)δY γ (1 + x)−(δX +i1 ) (1 + y)−(δY +i2 ) (1 + x + y)−(δ+i3 ) dxdy 0 i∈I = X i∈I di Z 0 ∞ (1 + y) 0 −((γ+1)(δY +δ)+i2 +i3 ) Z ∞ x(1 + x) 0 19 −(δX +i1 )  x 1+ 1+y −(δ+i3 ) dxdy. We continue with the help of the hypergeometric function noted in Section 6 and have 1 E[(X − µX )(1 − FY (Y ))γ ] σX X Z ∞ (1 + y)−((γ+1)(δY +δ)+i2 +i3 ) ∗ = di 2 F1 (δ + i3 , 2; δX,1,3 ; y/(1 + y))dy ∗ ∗ (δ − 2)(δ − 1) 0 X,1,3 X,1,3 i∈I Z 1 ((γ+1)(δ +δ)+i X 2 +i3 −2) Y (1 − x) ∗ = di 2 F1 (δ + i3 , 2; δX,1,3 ; x)dx ∗ ∗ (δX,1,3 − 2)(δX,1,3 − 1) 0 i∈I = X di i∈I ∗ ∗ 3 F2 (δ + i3 , 2, 1; δX,1,3 , (γ + 1)δY ∗ ∗ (δX,1,3 − 2)(δX,1,3 − 1)((γ + 1)δY∗ + i2 + i3 ; 1) . + i2 + i3 − 1) ∗ Since E[X − µX ] = σX /(δX − 1) and E[(1 − FX (X))γ ] = 1/(γ + 1), equation (6.4) follows. References Arnold, B.C. (1983) Pareto Distributions. International Cooperative Publishing House, Fairland, MD. Asimit, A.V., Vernic, R. and Zitikis, R. (2016). Background risk models and stepwise portfolio construction. Methodology and Computing in Applied Probability (in press). Black, F. (1972). Capital market equilibrium with restricted borrowing, Journal of Business, 45, 444–455. Brazauskas, V. and Serfling, R. (2003). Favourable estimators for fitting Pareto models: a study using goodness-of-fit measures with actual data. ASTIN Bulletin: The Journal of the International Actuarial Association, 33, 365–381. Cuadras, C.M. (2002). On the covariance between functions. Journal of Multivariate Analysis, 81, 19–27. Fang, K.T., Kotz, S. and Ng, K.W. (1990). Symmetric Multivariate and Related Distributions. Chapman & Hall, London. Furman, E. and Zitikis, R. (2009). Weighted pricing functionals with application to insurance: An overview. North American Actuarial Journal, 13, 483–496. Goovaerts, M. J., Kaas, R., Laeven, R. J. A., Tang, Q. and Vernic, R. (2005). The tail probability of discounted sums of Pareto-like losses in insurance. Scandinavian Actuarial Journal, 6, 446–461. Gradshteyn, I.S. and Ryzhik, I.M. (2007). Table of Integrals, Series and Products (7th edition). Academic Press, New York. Greselin, F., Pasquazzi, L. and Zitikis, R. (2014). Heavy tailed capital incomes: Zenga index, statistical inference, and ECHP data analysis. Extremes, 17, 127–155. 20 Kendall, M. and Stuart, A. (1979). The Advanced Theory of Statistics. Charles Griffin, London. Levy, H. (2011). The Capital Asset Pricing Model in the 21st Century: Analytical, Empirical, and Behavioral Perspectives. Cambridge University Press, Cambridge. Lintner, J. (1965). Security prices, risk, and maximal gains from diversification, Journal of Finance, 20, 587–615. Samanthi, R.G.M., Wei, W. and Brazauskas, V. (2016). Ordering Gini indexes of multivariate elliptical risks. Insurance: Mathematics and Economics, 68, 84–91. Schechtman, E. and Yitzhaki, S. (2013). The Gini Methodology: A Primer on a Statistical Methodology. Springer, New York. Sharpe, W.F. (1964). Capital asset prices: A theory of market equilibrium under conditions of risk. Journal of Finance, 19, 425–442. Shih, W.J. and Huang, W.M. (1992). Evaluating correlations with proper bounds. Biometrics, 48, 1207–1213. Sriboonchita, S., Wong, W.K., Dhompongsa, D., Nguyen, H.T. (2009). Stochastic Dominance and Applications to Finance, Risk and Economics. Chapman and Hall, Boca Raton, FL. Su, J. and Furman, E. (2016). A form of multivariate Pareto distribution with applications to financial risk measurement. ASTIN Bulletin: The Journal of the International Actuarial Association (in press). Tversky, A. and Kahneman, D. (1992). Advances in prospect theory: cumulative representation of uncertainty. Journal of Risk and Uncertainty, 5, 297–323. Wakker, P.P. (2010). Prospect Theory: For Risk and Ambiguity. Cambridge University Press, Cambridge. 21
10math.ST
SUBMITTED TO IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 1 Improving Dermoscopic Image Segmentation with Enhanced Convolutional-Deconvolutional Networks arXiv:1709.09780v1 [cs.CV] 28 Sep 2017 Yading Yuan* and Yeh-Chi Lo Abstract—Automatic skin lesion segmentation on dermoscopic images is an essential step in computer-aided diagnosis of melanoma. However, this task is challenging due to significant variations of lesion appearances across different patients. This challenge is further exacerbated when dealing with a large amount of image data. In this paper, we extended our previous work by developing a deeper network architecture with smaller kernels to enhance its discriminant capacity. In addition, we explicitly included color information from multiple color spaces to facilitate network training and thus to further improve the segmentation performance. We extensively evaluated our method on the ISBI 2017 skin lesion segmentation challenge. By training with the 2000 challenge training images, our method achieved an average Jaccard Index (JA) of 0.765 on the 600 challenge testing images, which ranked itself in the first place in the challenge. Index Terms—Dermoscopic images, deep learning, fully convolutional neural networks, image segmentation, jaccard distance, melanoma I. I NTRODUCTION ALIGNANT melanoma is among the most rapidly growing cancers in the world [1] and dermoscopy is the most commonly used in vivo imaging modality that provides a better visualization of subsurface structures of pigmented skin lesions [2]. While this technique allows dermatologists to detect early stage melanoma that are not visible by human eyes, visual interpretation alone is a time-consuming procedure and prone to inter- and intra-observer variabilities. Therefore, automated and accurate analysis of melanoma has become highly desirable in assisting dermatologists for improving their efficiency and objectivity when interpreting dermoscopic images in clinical practice [3]. Automatic skin lesion segmentation is an essential component in computer-aided diagnosis (CAD) of melanoma [4] [5]. However, this is a very challenging task due to significant variations in location, shape, size, color and texture across different patients. In addition, some dermoscopic images have low contrast between lesion and surrounding skin, and suffer from artifacts and intrinsic features such as hairs, frames, blood vessels and air bubbles. Existing lesion segmentation methods based on clustering, thresholding, region growing, or deformable models have shown limited success in solving this difficult problem when applying to a large amount of image data [3], [6], [7]. Recent development of deep learning has revolutionized the field of machine learning and computer vision. Deep learning M Y. Yuan and Y-C Lo are with the Department of Radiation Oncology, Icahn School of Medicine at Mount Sinai, New York, NY, USA, e-mail: [email protected], [email protected]. techniques, especially deep convolutional neural networks [8], have been rapidly adopted in various medical image analysis problems, including body recognition [9], lesion detection [10], image registration [11], segmentation [12] and classification [13]. In particular, Yu et al. [14] introduced a deep residual network with more than 50 layers for automatic skin lesion segmentation, in which several residual blocks [15] were stacked together to increase the representative capability of their model. In [16], Bi et al. proposed a multi-stage approach to combine the outputs from multiple cascaded fully convolutional networks (FCNs) to achieve a final skin lesion segmentation. In our recent study [17], we developed a fully automatic method for skin lesion segmentation by leveraging a 19-layer deep FCN that is trained end-to-end and does not rely on prior knowledge of the data. Furthermore, we designed a novel loss function based on Jaccard distance that is directly related to image segmentation task and eliminates the need of sample re-weighting. Experimental results showed that our method outperformed other state-of-the-art algorithms on two benchmark datasets - one is from ISBI 2016 challenge titled as skin lesion analysis towards melanoma detection [18], and the other is the PH2 dataset [19]. In this paper, we present a major extension of our previous work to further enhance our model in automatic skin lesion segmentation. Specifically, 1) we investigate the potential of using a deeper network architecture with smaller convolutional kernels such that the new model has increased discriminative capacity to handle a larger variety of image acquisition conditions; 2) besides Red-Green-Blue (RGB) channels, we also investigate the use of channels in other color spaces, such as Hue-Saturation-Value (HSV) and CIELAB [20], as additional inputs to our network that aim for a more efficient training while controlling over-fitting; 3) we evaluate the proposed framework on ISBI 2017 Skin Lesion Analysis T owards M elanoma Detection challenge1 datasets. Experimental results demonstrated a significant performance gain as compared to our previous model, ranking itself as the first place among 21 final submissions. II. DATASET AND P RE - PROCESSING We solely used ISBI 2017 challenge datasets for training and validating the proposed deep learning model named as convolutional-deconvolutional neural network (CDNN). As compared to ISBI 2016 challenge, the image database in 2017 is doubled in size and includes a larger variety of tumor appearance on dermoscopic images, which makes the automatic 1 https://challenge.kitware.com/#challenge/583f126bcad3a51cc66c8d9a SUBMITTED TO IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS Fig. 1. The appearance of a dermoscopic image with color manipulation. The left image in the first row shows the original image, and the rest are the adjusted images by normalizing the contrast of each channel to [5, 95] percentile window, respectively. lesion segmentation much more challenging. Specifically, the 2017 database includes a training dataset with 2000 annotated dermoscopic images (374 melanomas), and a blind held-out testing dataset with 600 images (117 melanomas). In order to facilitate model validation, a small independent dataset with 150 images (30 melanomas) is publicly available for challenge participants to fine tune the hyper-parameters before submitting the final results on the testing dataset. The image size ranges from 540 × 722 to 4499 × 6748. By observing most of the images in the training set have a height to width ratio of 3 : 4, we resized all the images to 192 × 256 using bi-linear interpolation to keep balance between segmentation performance and computation cost. While RGB is the most popular space to represent color information of natural images, its usage in image segmentation is however restricted by the fact that the RGB channels are not independent to each other. Thus, when applying image augmentation onto each channel during network training, the resultant image may have unrealistic appearance that makes the training less efficient. In order to address this issue and to use color information more effectively, we added the three channels from HSV color space and the lightness channel (L) from CIELAB color space, which separate luma (image intensity) from chroma (color information) to allow independent process on these two types of information. Figure 1 shows how a dermoscopic image can be adjusted by normalizing the contrast of each channel to [5, 95] percentile window. No other pre-processing was performed, so the input dimension to our CDNN model is 192 × 256 × 7. III. M ETHODS The CDNN model we proposed belongs to FCNs category, which allows an entire image segmentation in a single pass instead of classifying the central pixel of a small image patch each time. Using an entire image as input not only makes model training and inference more efficient , but also includes much richer contextual information as compared to small patches, which usually leads to more robust and accurate segmentation. 2 model consists of two pathways, in which the convolutional path resembles a traditional CNN that extracts a hierarchy of image features from low to high complexity, and the deconvolutional path transforms the aggregated features and reconstructs the segmentation map from coarse to fine resolution. In this way, CDNN can take both global information and fine details into account for tumor segmentation. In order to improve the discriminative power of CDNN to handle a much larger variety of image acquisition conditions, we extend the previous model in the following two aspects. Firstly, we employ small 3 × 3 kernels in nearly all the convolutional and de-convolutional layers and maintain the same effective receptive field size of larger kernels by adding additional layers. This deeper architecture reduces the number of weights while allowing more non-linear transformations on the data. Then we increase the number of features in each layer in order to boost the capacity of the CDNN model. All convolutional and de-convolutional layers use Rectified Linear Units (ReLUs) as the nonlinear activation function [21], and batch normalization [22] is applied to reduce the internal covariate shift for each training mini-batch . The batch size was set as 18 in this study. Eventually the network contains 29 layers with 5, 042, 589 trainable parameters. The filter size and number of channels of the output feature maps are shown in Table I. TABLE I A RCHITECTURAL DETAILS OF THE PROPOSED CDNN MODEL (A BBREVATIONS : CONV: CONVOLUTIONAL LAYER ; POOL : MAX - POOLING LAYER ; DECV: DECONVOLUTIONAL LAYER , UPS : UPSAMPLING LAYER ). Conv Filter Features Deconv Filter Features conv-1-1 conv-1-2 pool-1 conv-2-1 conv-2-2 pool-2 conv-3-1 conv-3-2 pool-3 conv-4-1 conv-4-2 pool-4 conv-5 3×3 3×3 2×2 3×3 3×3 2×2 3×3 4×4 2×2 3×3 3×3 2×2 3×3 16 32 32 64 64 64 128 128 128 256 256 256 512 decv-1 ups-1 decv-2-1 decv-2-2 ups-2 decv-3-1 decv-3-2 ups-3 decv-4-1 decv-4-2 ups-4 decv-5-1 output 3×3 2×2 3×3 3×3 2×2 4×4 3×3 2×2 3×3 3×3 2×2 3×3 3×3 256 256 256 128 128 128 128 128 64 32 32 16 1 The CDNN model represents an end-to-end mapping from the input image to a segmentation map, where each element is the probability that the corresponding input pixel belongs to the tumor. Those trainable parameters are learned from training data by minimizing a loss function. We use a loss function based on Jaccard distance [17]: P (tij pij ) i,j P P P , (1) LdJ = 1 − t2ij + p2ij − (tij pij ) i,j A. CDNN model In our previous work [17], we proposed a CDNN model containing 19 layer with 290, 129 trainable parameters. This i,j i,j where tij and pij are target and the output of pixel (i, j), respectively. As compared to the conventionally used crossentropy, the proposed loss function is directly related to image SUBMITTED TO IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS segmentation task because Jaccard index is a common metric to assess medical image segmentation accuracy, especially in this ISBI 2017 challenge. Meanwhile, this loss function is well adapted to the problems with high imbalance between foreground and background classes as it doesn’t require any class re-balancing. Given a new test dermoscopic image, it is firstly rescaled to 192 × 256 with 7 color channels and the CDNN model is applied to yield a segmentation map. A dual-thresholds method is then developed to generate a binary tumor mask from the CDNN output. In this method, a relatively high threshold (thH = 0.8) is firstly applied to determine the tumor center, which is calculated as the centroid of the region that has the largest mass among the candidates from thresholding. Then a lower threshold, thL = 0.5, is applied to the segmentation map. After filling small holes with morphological dilation, the final tumor mask is determined as the region that embraces the tumor center. B. Implementation details Our CDNN model is implemented with Python using publicly available Theano [23] and Lasagne 2 packages. The model was trained from scratch using Adam stochastic optimization method [24] that adaptively adjusts the learning rate based on the first and the second-order moments of the gradient at each iteration. The initial learning rate α was set as 0.003. In order to reduce overfitting, we add two dropout layers with p = 0.5 before conv-4-1 and decv-5-1 in Table I. In addition, we implement two types of image augmentation to further improve the robustness of the proposed model under a wide variety of image acquisition conditions. One consists of a series of geometric transformations, including randomly flipping, shifting, rotating as well as scaling. The other type focuses on randomly normalizing the contrast of each channels in the training images. Note that these augmentations only require little extra computation, so the transformed images are generated from the original images for every mini-batch with each iteration. We used five-fold cross validation to evaluate the performance of our model on the challenge training dataset, in which a few hype-parameters were also experimentally determined via grid search. The total number of iterations was set as 600 for each fold. When applying the trained models onto the testing dataset, a bagging-type ensemble strategy was implemented to average the outputs of the six models to further improve the segmentation performance. One iteration in model training took about 60 seconds using a single NVIDIA Geforce GTX 1060 GPU with 1280 cores and 6GB memory. Applying the entire segmentation framework on a new test image was, however, very efficient, taking about 0.2 second for a typical 768 × 1024 image. 2 http://github.com/Lasagne/Lasagne 3 TABLE II C OMPARISON OF DIFFERENT ARCHITECTURES ON VALIDATION DATASET Image size CDNN-19 CDNN-29 AC 0.945 0.953 DI 0.839 0.865 JA 0.749 0.783 SE 0.854 0.879 SP 0.982 0.979 TABLE III C OMPARISON OF Image size CDNN-19 CDNN-29 DIFFERENT ARCHITECTURES ON TESTING DATASET AC 0.921 0.934 DI 0.824 0.849 IV. E XPERIMENTS JA 0.736 0.765 SE 0.796 0.825 SP 0.979 0.975 AND RESULTS A. Evaluation metrics We applied the challenge evaluation metrics to evaluate the performance of our method by comparing the computergenerated lesion masks with the ground truths created by human experts. The evaluation metrics include pixel-wise accuracy (AC), sensitivity (SE), specificity (SP), dice coefficient (DI), and Jaccard index (JA): • AC = (T P + T N )/(T P + F P + T N + F N ) • DI = 2 · T P/(2 · T P + F N + F P ) • JA = T P/(T P + F N + F P ) • SE = T P/(T P + F N ) • SP = T N/(T N + F P ), where T P , T N , F P , F N refer to the number of true positives, true negatives, false positives, and false negatives respectively. The final rank was based on JA for this challenge. B. Experiments on network architectures In order to investigate if the increase of network depth with smaller kernel size can improve the discriminative capability of CDNN and thus yield a better segmentation performance, we compared the performance of the proposed deep CDNN, which we denoted as CDNN-29, with the one proposed in our previous work, which we denoted as CDNN-19. Since only the results on the validation dataset could be obtained during the challenge, this comparison was initially conducted on the validation dataset, as shown in Table II. The ground truth of testing dataset was held out by the organizer for final performance evaluation during the challenge, and later released to the public to encourage further investigations. So we extended this comparison to the testing dataset in this experiment, as shown in Table III. It is clear to see that the new CDNN model achieved better segmentation performance in most of the metrics on both validation and testing datasets. These results demonstrate that increasing network depth while maintaining equivalent receptive field by reducing filter size can effectively improve the discriminative capability of CDNN. C. Experiments on input channels Using CDNN-29 model, we evaluated how the additional HSV and L channels affect skin lesion segmentation performance. Figure 2 shows how the loss function is minimized as SUBMITTED TO IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 4 TABLE V C OMPARISON OF DIFFERENT INPUT CHANNELS ON TESTING DATASET Image size RGB RGB+HSV+L AC 0.931 0.934 DI 0.840 0.849 JA 0.754 0.765 SE 0.813 0.825 SP 0.976 0.975 TABLE VI R ESULTS OF 2017 ISBI CHALLENGE ON SKIN LESION SEGMENTATION Fig. 2. Comparison of network inputs with and without the additional HSV+L color channels for training and validating of the proposed model. TABLE IV C OMPARISON OF DIFFERENT INPUT CHANNELS ON VALIDATION DATASET Image size RGB RGB+HSV+L AC 0.951 0.953 DI 0.848 0.865 JA 0.765 0.783 SE 0.868 0.879 SP 0.976 0.979 network training evolves. The black lines represent the model training and validation using RGB channels, and the red lines add additional four channels as model input. It is clear to see that the gap between training and validation errors was effectively narrowed down when including the additional four color channels as network input. Meanwhile, the validation error with additional color channels was consistently lower than that of RGB alone, yielding improved performance on the new testing images. As shown in Table IV and V, the additional four input channels improved the Jaccard index by 2.4% and 1.5% on validation and testing datasets, respectively. D. Comparison with other methods in the challenge During the 2017 ISBI challenge on skin lesion segmentation, 39 teams evaluated their algorithms during validation phase, but only 21 teams were able to participate the final official challenge by submitting their results on the 600 testing images. Table VI lists the results from the top ten teams. Because the previous studies have shown the advantage of using CNNs in skin lesion segmentation over other traditional methods [14], [17], most of the top teams in this challenge included various deep neural network models in their segmentation methods, with the exception that the NedMos team employed active contour on the saliency map [25]. While each team was allowed for multiple submissions, only the most recent one would be considered to determine the team’s final score. Our method achieved an average Jaccard Index (JA) of 0.765, ranking as the first place in this challenge. Figure 3 shows a few challenging examples of automatic skin lesion segmentation with our CDNN model, demonstrating the robustness of the proposed model under various imaging acquisition conditions. V. D ISCUSSIONS While deep convolutional neural networks have shown remarkable success in various medical image segmentation Team MtSinai (ours) NLP LOGIX USYD (Bi) USYD (Ann) RECOD Jer NedMos INESC Shenzhen U (Lee) GAMMA AC 0.934 0.932 0.934 0.934 0.931 0.930 0.930 0.922 0.922 0.915 DI 0.849 0.847 0.844 0.842 0.839 0.837 0.839 0.824 0.810 0.797 JA 0.765 0.762 0.760 0.758 0.754 0.752 0.749 0.735 0.718 0.715 SE 0.825 0.820 0.802 0.801 0.817 0.813 0.810 0.813 0.789 0.774 SP 0.975 0.978 0.985 0.984 0.970 0.976 0.981 0.968 0.975 0.970 tasks, it is still a challenging task to extend those models into a scaled-up study where a large amount of image data are involved. In this study, we investigated if a deeper CDNN model coupled with additional input information is capable of handling the increased complexity introduced from the much dynamic appearance of the targeting objects. It should be noted that deep neural networks have a very flexible architecture and different network design certainly matters. However, there is no clear guideline about what the optimal network architecture would be for a given application and available data. While it is infeasible to explore all the possible options in our study due to the long training time, we participated the ISBI 2017 challenge on skin lesion segmentation, which not only provides a large database to evaluate the performance of our model, but also allows researchers to compare different designs using the same benchmark data. All of the top five teams employed deep learning in their segmentation methods, demonstrating the popularity and effectiveness of FCN-based methods in medical image segmentation. These methods cover a large spectrum of FCN models and training strategies. For example, Berseth from NLP LOGIX [26] employed a U-Net architecture [27] and tried to include a conditional random field (CRF) [28] as post-processing in their method. Besides the 2000 training images provided by the challenge organizers, Bi and Ann from USYD [29] trained their deep residual networks with additional ∼ 8000 images from ISIC archive. We attribute the superior performance of our CDNN model to the following three aspects: 1) A deeper architecture with small kernel allowed more non-linear transformations on the data while reducing the number of trainable parameters as compared to its shallower counterpart, yielding significantly improved discriminant capability; 2) Additional input features made network training more efficient and robust by explicitly including complementary but useful information from other color spaces; 3) The loss function based on Jaccard distance enabled the network training to naturally focus more on lesion pixels over background, which further improved the segmentation performance by lifting sensitivity (SE), as demonstrated in SUBMITTED TO IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS 5 Fig. 3. Examples of automatic segmentation on the ISBI 2017 challenge testing dataset, including four nevus lesions in the top row, four seborrheic keratosis lesions in the middle rows and four melanoma lesions in the bottom row. In each figure, the red dash line indicates the outline contoured by dermatologist and the yellow solid line is the result of automatic segmentation. Table VI. The segmentation performance on some cases is still rather low, as shown in two examples in Figure 4. Thus, further improvement is certainly needed. In additional to better network architecture and more effective training strategies, one possible way is to combine the deep learning models with the conventional image segmentation methods, such as active contour. For example, we found the correlation between the outputs of our model and MedMos (active contour model) was 0.759, while it was 0.873 with NLP LOGIX (another deep FCN model). The scatter plots are shown as Figure 5. Since the active contour is less correlated with our model, it may provide more complementary information when ensembling multiple models for further segmentation. Another option is to integrate other post-processing techniques, such as CRF, into our CDNN model. We actually attempted to employ this technique in this challenge, but ultimately discard it due to the inferior performance. One possible reason is that the parameters to determine the unary and pariwise potentials were pre-set and thus lack of flexibility to handle the large variations of the data. A more dynamic mechanism, such as plugging CRF in as a part of FCN by modeling it as recurrent neural networks (RNNs) [30], may resolve this issue and thus improve the segmentation performance. These are all interesting research topics and worthy of further investigations. Fig. 4. Cases where our model failed due to mis-segmentation to the wrong sites. The red dash and yellow solid contours indicate the ground truth and the segmentation results, respectively. Fig. 5. Scatter plots of our model vesus NedMos (left), and NLP LOGIX (right) . VI. C ONCLUSION In this paper, we present a major extension of our previously proposed CDNN model in automatic skin lesion segmentation on dermoscopic images. Our new model leverages the increased discriminant capability of deeper network structures with smaller convolutional kernels to segment skin lesions in a much larger variety of image acquisition conditions. The segmentation performance was further boosted by combining information from multiple color spaces. Our approach excelled other state-of-the-art methods when evaluating on ISBI 2017 challenge of skin lesion segmentation. Our network architectures and training strategies are inherently general and can be easily extended to other applications. SUBMITTED TO IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS VII. ACKNOWLEDGMENT The authors are grateful to the organizers of 2017 International Symposium on Biomedical Imaging (ISBI 2017) challenge of Skin Lesion Analysis T owards M elanoma Detection for organizing such an inspiring challenge. R EFERENCES [1] R. L. Siegel, K. D. Miller, and A. Jemal, “Cancer statistics, 2016,” CA Cancer J Clin., vol. 66, pp. 7–30, 2016. [2] M. Vestergaard, P. Macaskill, P. Holt, and S. Menzies, “Dermoscopy compared with naked eye examination for the diagnosis of primary melanoma: a meta-analysis of studies performed in a clinical setting,” Br. J. Dermatol., vol. 159, no. 3, pp. 669–676, 2008. [3] K. Korotkov and R. Garcia, “Computerized analysis of pigmented skin lesions: a review,” Artif. intell. Med., vol. 56, no. 2, pp. 69–90, 2012. [4] H. Ganster, P. Pinz, R. Rohrer, E. Wildling, M. Binder, and H. Kittler, “Automated melanoma recognition,” IEEE Trans. Med. Imag., vol. 20, no. 3, pp. 233–239, 2001. [5] M. E. Celebi, H. A. Kingravi, B. Uddin, H. Iyatomi, Y. A. Aslandogan, W. V. Stoecker, and R. H. Moss, “A methodological approach to the classification of dermoscopy images,” Comput. Med. Imag. Graph., vol. 31, no. 6, pp. 362–373, 2007. [6] M. Silveira, J. C. Nascimento, J. S. Marques, A. R. Marçal, T. Mendonça, S. Yamauchi, J. Maeda, and J. Rozeira, “Comparison of segmentation methods for melanoma diagnosis in dermoscopy images,” IEEE J. Sel. Top. Signal Process., vol. 3, no. 1, pp. 35–45, 2009. [7] M. E. Celebi, H. Iyatomi, G. Schaefer, and W. V. Stoecker, “Lesion border detection in dermoscopy images,” Comput. Med. Imag. Graph., vol. 33, no. 2, pp. 148–153, 2009. [8] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998. [9] Z. Yan, Y. Zhan, Z. Peng, S. Liao, Y. Shinagawa, S. Zhang, D. N. Metaxas, and X. S. Zhou, “Multi-instance deep learning: Discover discriminative local anatomies for bodypart recognition,” IEEE Trans. Med. Imag., vol. 35, no. 5, pp. 1332–1343, 2016. [10] D. C. Cireşan, A. Giusti, L. M. Gambardella, and J. Schmidhuber, “Mitosis detection in breast cancer histology images with deep neural networks,” in Proc. MICCAI 2013. Springer, 2013, pp. 411–418. [11] S. Miao, Z. J. Wang, and R. Liao, “A CNN Regression Approach for Real-Time 2D/3D Registration,” IEEE Trans. Med. imag., vol. 35, no. 5, pp. 1352–1363, 2016. [12] K. H. Cha, L. Hadjiiski, R. K. Samala, H.-P. Chan, E. M. Caoili, and R. H. Cohan, “Urinary bladder segmentation in CT urography using deep-learning convolutional neural network and level sets,” Med. Phys., vol. 43, no. 4, pp. 1882–1896, 2016. [13] A. Esteva, B. Kuprel, R. A. Novoa, J. Ko, S. M. Swetter, H. M. Blau, and S. Thrun, “Dermatologist-level classification of skin cancer with deep neural networks,” Nature, vol. 542, no. 7639, pp. 115–118, 2017. [14] L. Yu, H. Chen, Q. Dou, J. Qin, and P. A. Heng, “Automated melanoma recognition in dermoscopy images via very deep residual networks,” IEEE Trans. Med. Imag., vol. 36, no. 4, pp. 994–1004, 2017. [15] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in CVPR 2016. IEEE, 2016, pp. 770–778. [16] L. Bi, J. Kim, E. Ahn, A. Kumar, and D. Feng, “Dermoscopic image segmentation via multistage fully convolutional networks,” IEEE Trans. Biomed. Eng., vol. 64, no. 9, pp. 2065–2074, 2017. [17] Y. Yuan, M. Chao, and Y.-C. Lo, “Automatic skin lesion segmentation using deep fully convolutional networks with jaccard distance,” IEEE Trans. Med. Imaging, vol. 36, no. 9, pp. 1876–1886, 2017. [18] D. Gutman, N. C. Codella, E. Celebi, B. Helba, M. Marchetti, N. Mishra, and A. Halpern, “Skin Lesion Analysis toward Melanoma Detection: A Challenge at the International Symposium on Biomedical Imaging (ISBI) 2016, hosted by the International Skin Imaging Collaboration (ISIC),” arXiv preprint arXiv:1605.01397, 2016. [19] T. Mendonça, P. M. Ferreira, J. S. Marques, A. R. Marcal, and J. Rozeira, “PH 2-A dermoscopic image database for research and benchmarking,” in Proc. EMBC 2013. IEEE, 2013, pp. 5437–5440. [20] K. Plataniotis and A. N. Venetsanopoulos, Color image processing and applications. Springer Science & Business Media, 2013. [21] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Adv. Neural Inf. Process. Sys., 2012, pp. 1097–1105. 6 [22] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” arXiv preprint arXiv:1502.03167, 2015. [23] T. T. D. Team, R. Al-Rfou, G. Alain, A. Almahairi, C. Angermueller, D. Bahdanau, N. Ballas, F. Bastien, J. Bayer, A. Belikov et al., “Theano: A python framework for fast computation of mathematical expressions,” arXiv preprint arXiv:1605.02688, 2016. [24] D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014. [25] M. Jahanifar, N. Z. Tajeddin, A. Goodya, and B. M. Asl, “Segmentation of lesions in dermoscopy images using saliency map and contour propagation,” arXiv preprint arXiv:1703.00087, 2017. [26] M. Berseth, “ISIC 2017 - Skin lesion analysis towards melanoma detection,” arXiv preprint arXiv:1703.00523, 2017. [27] O. Ronneberger, P. Fischer, and T. Brox, “U-net: Convolutional networks for biomedical image segmentation,” in Proc. MICCAI 2015. Springer, 2015, pp. 234–241. [28] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille, “Semantic image segmentation with deep convolutional nets and fully connected CRFs,” arXiv preprint arXiv:1412.7062, 2014. [29] L. Bi, K. Kim, E. Ann, and D. Feng, “Automatic skin lesion analysis using large-scale dermoscopy images and deep residual networks,” arXiv preprint arXiv:1703.04197, 2017. [30] S. Zheng, S. Jayasumana, B. Romera-Paredes, V. Vineet, Z. Su, D. Du, C. Huang, and P. Torr, “Conditional random fields as recurrent neural networks,” in ICCV, 2015, pp. 1529–1537.
1cs.CV
The interplay between system identification and machine learning Gianluigi Pillonetto a arXiv:1612.09158v1 [cs.SY] 29 Dec 2016 a Department of Information Engineering, University of Padova, Padova, Italy (e-mail: [email protected]) Abstract Learning from examples is one of the key problems in science and engineering. It deals with function reconstruction from a finite set of direct and noisy samples. Regularization in reproducing kernel Hilbert spaces (RKHSs) is widely used to solve this task and includes powerful estimators such as regularization networks. Recent achievements include the proof of the statistical consistency of these kernelbased approaches. Parallel to this, many different system identification techniques have been developed but the interaction with machine learning does not appear so strong yet. One reason is that the RKHSs usually employed in machine learning do not embed the information available on dynamic systems, e.g. BIBO stability. In addition, in system identification the independent data assumptions routinely adopted in machine learning are never satisfied in practice. This paper provides new results which strengthen the connection between system identification and machine learning. Our starting point is the introduction of RKHSs of dynamic systems. They contain functionals over spaces defined by system inputs and allow to interpret system identification as learning from examples. In both linear and nonlinear settings, it is shown that this perspective permits to derive in a relatively simple way conditions on RKHS stability (i.e. the property of containing only BIBO stable systems or predictors), also facilitating the design of new kernels for system identification. Furthermore, we prove the convergence of the regularized estimator to the optimal predictor under conditions typical of dynamic systems. Key words: learning from examples; system identification; reproducing kernel Hilbert spaces of dynamic systems; kernel-based regularization; BIBO stability; regularization networks; generalization and consistency; 1 Introduction Learning from examples is key in science and engineering, considered at the core of intelligence’s understanding [56]. In mathematical terms, it can be described as follows. We are given a finite set of training data (xi , yi ), where xi is the so called input location while yi is the corresponding output measurement. The goal is then the reconstruction of a function with good prediction capability on future data. This means that, for a new pair (x, y), the prediction g(x) should be close to y. To solve this task, nonparametric techniques have been extensively used in the last years. Within this paradigm, instead of assigning to the unknown function a specific parametric structure, g is searched over a possibly infinite-dimensional functional space. The modern approach uses Tikhonov regularization theory [74,13] in conjunction with Reproducing Kernel Hilbert Spaces (RKHSs) [8,12]. RKHSs possess many important properties, being in one to one corre1 This research has been partially supported by the MIUR FIRB project RBFR12M3AC-Learning meets time: a new computational approach to learning in dynamic systems and by the Progetto di Ateneo CPDA147754/14-New statistical learning approach for multi-agents adaptive estimation and coverage control. This paper was not presented at any IFAC meeting. Corresponding author Gianluigi Pillonetto Ph. +390498277607. Preprint submitted to Automatica spondence with the class of positive definite kernels. Their connection with Gaussian processes is also described in [35,42,11,5]. While applications of RKHSs in statistics, approximation theory and computer vision trace back to [14,76,54], these spaces were introduced to the machine learning community in [29]. RKHSs permit to treat in an unified way many different regularization methods. The so called kernel-based methods [25,62] include smoothing splines [76], regularization networks [54], Gaussian regression [57], and support vector machines [23,75]. In particular, a regularization network (RN) has the structure (yi − f (xi ))2 + γ k f k2H ∑ N i=1 N ĝ = arg min f ∈H RN (1) where H denotes a RKHS with norm k · kH . Thus, the function estimate minimizes an objective sum of two contrasting terms. The first one is a quadratic loss which measures the adherence to experimental data. The second term is the regularizer (the RKHS squared norm) which restores the well-posedness and makes the solution depend continuously on the data. Finally, the positive scalar γ is the regularization parameter which has to suitably trade off these two components. The use of (1) has significant advantages. The choice of 30 December 2016 identification and machine learning stems also from the (apparently) different contexts these disciplines are applied to. In machine learning one typically assumes that data (xi , yi ) are i.i.d. random vectors assuming values on a bounded subset of the Euclidean space. But in system identification, even when the system input is white noise, the input locations are not mutually independent. Already in the classical Gaussian noise setting, the outputs are not even bounded, i.e. there is no compact set containing them with probability one. Remarkably, this implies that none of the aforementioned consistency results developed for kernel-based methods can be applied. Some extensions to the case of correlated samples can be found in [78,32,68] but still under conditions far from the system identification setting. an appropriate RKHS, often obtained just including function smoothness information [62], and a careful tuning of γ , e.g. by the empirical Bayes approach [43,3,4], can well balance bias and variance. One can thus obtain favorable mean squared error properties. Furthermore, even if H is infinite-dimensional, the solution ĝ is always unique, belongs to a finite-dimensional subspace and is available in closed-form. This result comes from the representer theorem [34,61,7,6]. Building upon the work [77], many new results have been also recently obtained on the statistical consistency of (1). In particular, the property of ĝ to converge to the optimal predictor as the data set size grows to infinity is discussed e.g. in [66,81,80,46,55]. This point is also related to Vapnik’s concepts of generalization and consistency [75], see [25] for connections among regularization in RKHS, statistical learning theory and the concept of Vγ dimension as a measure of function class complexity [2,24]. The link between consistency and well-posedness is instead discussed in [15,46,55]. In this paper we provide some new insights on the interplay between system identification and machine learning in a RKHS setting. Our starting point is the introduction of what we call RKHSs of dynamic systems which contain functionals over input spaces X induced by system inputs u. More specifically, each input location x ∈ X contains a piece of the trajectory of u so that any g ∈ H can be associated to a dynamic system. When u is a stationary stochastic process, its distribution then defines the probability measure on X from which the input locations are drawn. Again, we stress that this framework has been (at least implicitly) used in previous works on nonlinear system identification, see e.g. [64,51,73,38,63]. However, it has never been cast and studied in its full generality under a RKHS perspective. Parallel to this, many system identification techniques have been developed in the last decades. In linear contexts, the first regularized approaches trace back to [60,1,36], see also [30,41] where model error is described via a nonparametric structure. More recent approaches, also inspired by nuclear and atomic norms [17], can instead be found in [39,31,45,58,48]. In the last years, many nonparametric techniques have been proposed also for nonlinear system identification. They exploit e.g. neural networks [38,63], Volterra theory [26], kernel-type estimators [37,51,82] which include also weights optimization to control the mean squared error [59,9,10]. Important connections between kernel-based regularization and nonlinear system identification have been also obtained by the least squares support vector machines [72,71] and using Gaussian regression for state space models [27,28]. Most of these approaches are inspired by machine learning, a fact not surprising since predictor estimation is at the core of the machine learning philosophy. Indeed, a black-box relationship can be obtained through (1) using past inputs and outputs to define the input locations (regressors). However, the kernels currently used for system identification are those conceived by the machine learning community for the reconstruction of static maps. RKHSs suited to linear system identification, e.g. induced by stable spline kernels which embed information on impulse response regularity and stability, have been proposed only recently [52,50,18]. Furthermore, while stability of a RKHS (i.e. its property of containing only stable systems or predictors) is treated in [16,53,22], the nonlinear scenario still appears unexplored. Beyond stability, we also notice that the most used kernels for nonlinear regression, like the Gaussian and the Laplacian [62], do not include other important information on dynamic systems like the fact that output energy is expected to increase if input energy augments. At first sight, our approach could appear cumbersome. In fact, the space X can turn out complex and unbounded just when the system input is Gaussian. Also, X could be a function space itself (as e.g. happens in continuous-time). It will be instead shown that this perspective is key to obtain the following achievements: • linear and nonlinear system identification can be treated in an unified way in both discrete- and continuous-time. Thus, the estimator (1) can be used in many different contexts, relevant for the control community, just changing the RKHS. This is important for the development of a general theory which links regularization in RKHS and system identification; • system input’s role in determining the nature of the RKHS is made explicit. This will be also described in more detail in the linear system context, illustrating the distinction between the concept of RKHSs H of dynamic systems and that of RKHSs I of impulse responses; • for linear systems we provide a new and simple derivation of the necessary and sufficient condition for RKHS stability [16,53,22] that relies just on basic RKHS theory; • in the nonlinear scenario, we obtain a sufficient condition for RKHS stability which has wide applicability. We also derive a new stable kernel for nonlinear system identification; • consistency of the RN (1) is proved under assumptions suited to system identification, revealing the link between Another aspect that weakens the interaction between system 2 Definition 2 (Positive definite kernel and kernel section) A symmetric function K : X × X → R is called positive definite kernel if, for any integer p, it holds consistency and RKHS stability. The paper is organized as follows. In Section 2 we provide a brief overview on RKHSs. In Section 3, the concept of RKHSs of dynamic systems is defined by introducing input spaces X induced by system inputs. The case of linear dynamic systems is then detailed via its relationship with linear kernels. The difference between the concepts of RKHSs of dynamic systems and RKHSs of impulse responses is also elucidated. Section 4 discusses the concept of stable RKHS. We provide a new simple characterization of RKHS stability in the linear setting. Then, a sufficient condition for RKHS stability is worked out in the nonlinear scenario. We also introduce a new kernel for nonlinear system identification, testing its effectiveness on a benchmark problem. In Section 5, we first review the connection between the machine learning concept of regression function and that of optimal predictor encountered in system identification. Then, the consistency of the RN (1) is proved in the general framework of RKHSs of dynamic systems. Conclusions end the paper while proofs of the consistency results are gathered in Appendix. p p ∑ ∑ ci c j K (xi , x j ) ≥ 0, ∀(xk , ck ) ∈ (X , R) , i=1 j=1 k = 1, . . . , p. The kernel section Kx centered at x is the function from X to R defined by Kx (a) = K (a, x) ∀a ∈ X . The following theorem provides the one-to-one correspondence between RKHSs and positive definite kernels. Theorem 3 (Moore-Aronszajn and reproducing property) To every RKHS H there corresponds a unique positive definite kernel K such that the so called reproducing property holds, i.e. hKx , gi = g(x) ∀(x, g) ∈ (X , H ) In what follows, the analysis is always restricted to causal systems and, to simplify the exposition, the input locations contain only past inputs so that output error models are considered. If an autoregressive part is included, the consistency analysis in Section 5 remains unchanged while the conditions developed in Section 4 guarantee predictor (in place of system) stability. Conversely, given a positive definite kernel K , there exists a unique RKHS of real-valued functions defined over X where (3) holds. Theorem 3 shows that a RKHS H is completely defined by a kernel K , also called the reproducing kernel of H . More specifically, it can be proved that any RKHS is generated by the kernel sections in the following manner. Let S denote the subspace spanned by {Kx }x∈X and for any g ∈ S, say p g = ∑i=1 ci Kxi , define the norm 2 Brief overview on RKHSs p We use X to indicate a function domain. This is a nonempty set often referred to as the input space in machine learning. Its generic element is the input location, denoted by x or a in the sequel. All the functions are assumed real valued, so that g : X → R. In function estimation problems, the goal is to estimate maps to make predictions over the whole X . Thus, a basic requirement is to use an hypothesis space H with functions well defined pointwise for any x ∈ X . In particular, assume that all the pointwise evaluators g → g(x) are linear and bounded over H , i.e. ∀x ∈ X there exists Cx < ∞ such that |g(x)| ≤ Cx kgkH , ∀g ∈ H . (3) p kgk2H = ∑ ∑ ci c j K (xi , x j ). (4) i=1 j=1 Then, one has that H is the union of S and all the limits w.r.t. k · kH of the Cauchy sequences contained in S. A consequence of this construction is that any g ∈ H inherits kernel properties, e.g. continuity of K implies that all the g ∈ H are continuous [19][p. 35]. The kernel sections play a key role also in providing the closed-form solution of the RN (1), as illustrated in the famous representer theorem. (2) Theorem 4 (Representer theorem) The solution of (1) is unique and given by This property already leads to the spaces of interest. N ĝ = ∑ ĉi Kxi , Definition 1 (RKHS) A reproducing kernel Hilbert space (RKHS) H over X is a Hilbert space containing functions g : X → R where (2) holds. (5) i=1 where the scalars ĉi are the components of the vector RKHSs are connected to the concept of positive definite kernel, a particular function defined over X × X . ĉ = (K + γ NIN )−1 Y, 3 (6) Y is the column vector with i-th element yi , IN is the N × N identity matrix and the (i, j) entry of K is K (xi , x j ). t ∈ Z . Different cases arise depending on the postulated system model. For example, one can have Another RKHS characterization useful in what follows is obtained when the kernel can be diagonalized as follows xt = [ut ut−1 . . . ut−m+1 ]T , where m is the system memory. This construction is connected to FIR or NFIR models and makes X a subset of the classical Euclidean space Rm . Another scenario is ∞ K (a, x) = ∑ ζi ρi (a)ρi (x), ζi > 0 ∀i. (11) (7) i=1 The RKHS is then separable and the following result holds, e.g. see [25][p. 15] and [19][p. 36]. xt = [ut ut−1 ut−2 . . .]T , Theorem 5 (Spectral representation of a RKHS) Let (7) hold and assume that the ρi form a set of linearly independent functions on X . Then, one has where any input location is a sequence (an infinitedimensional column vector) and the input space X becomes a subset of R∞ . The definition (12) is related to infinite memory systems, e.g. IIR models in linear settings. H = and ( ) c2i g | g(x) = ∑ ci ρi (x) s.t. ∑ < ∞ , i=1 i=1 ζi ∞ ∞ b i ci , i=1 ζi h f , giH = ∑ ∞ ∞ k f k2H = ∑ ∞ where f = ∑∞ i=1 bi ρi and g = ∑i=1 ci ρi . i=1 b2i ζi , (8) Continuous-time The continuous-time input is the map u : R → R. In this case, the input location xt becomes the function xt : R+ → R defined by (9) xt (τ ) = u(t − τ ), X K (·, x)ρi (x)d µx (x) = ζi ρi (·), τ ≥ 0, (13) i.e. xt contains the input’s past up to the instant t. In many circumstances, one can assume X ⊂ P c , where P c contains piecewise continuous functions on R+ . When the input is causal, and ut is smooth for t ≥ 0, the xt is indeed piecewise continuous. Note that (13) is the continuous-time counterpart of (12) while that of (11) can be obtained just zeroing part of the input location, i.e. The expansion (7) can e.g. be obtained by the Mercer theorem [44,33]. In particular, let µx be a nondegenerate σ -finite measure on X . Then, under somewhat general conditions [70], the ρi and ζi in (7) can be set to the eigenfunctions and eigenvalues of the integral operator induced by K , i.e. Z (12) 0 < ζ1 ≤ ζ2 ≤ . . . (10) In addition, the ρi form a complete orthonormal basis in the µ classical Lebesgue space L2 x of functions square integrable under µx . 1 xt (τ ) = u(t − τ )ξT (τ ), τ ≥ 0, (14) where ξT is the indicator function of the interval [0, T ]. In linear systems, (14) arises when the impulse response support is compact. 3 RKHSs of dynamic systems and the linear system scenario RKHSs H of functions over domains X , induced by system inputs u as illustrated above, are hereby called RKHSs of dynamic systems. Thus, if g ∈ H , the scalar g(xt ) is the noiseless output at t of the system fed with the input trajectory contained in xt . Note that g in general is a functional: in the cases (12-14) the arguments xt entering g(·) are infinitedimensional objects. 3.1 RKHSs of dynamic systems The definition of RKHSs of dynamic systems given below relies on simple constructions of input spaces X induced by system inputs u. 3.2 The linear system scenario Discrete-time First, the discrete-time setting is considered. Assume we are given a system input u : Z → R. Then, we think of any input location in X indexed by the time RKHSs of linear dynamic systems are now introduced also discussing the structure of the resulting RN. Linear system identification was faced In [52] and [53][Part III] by introducing RKHSs of impulse responses. These are spaces I induced by kernels K defined over subsets of R+ × R+ . They thus contain causal functions, each of them 1 Thus, the representation (8) is not unique since spectral maps are not unique. Eigendecompositions depend on the measure µx but lead to the same RKHS. 4 representing an impulse response θ . The RN which returns the impulse response estimate was (yi − (θ ⊗ u)ti )2 + γ kθ k2I , θ̂ = arg min ∑ θ ∈I i=1 N row equal to xTi , where yi := yti , xi := xti N (15) and ti is the time instant where the i-th output is measured. Then, after plugging the representation g(x) = θ T x in (1), one obtains ĝ(x) = θ̂ T x with where (θ ⊗ u)ti is the convolution between the impulse response and the input evaluated at ti . The RKHSs of linear dynamic systems here introduced are instead associated to (output) linear kernels K defined on X × X through convolutions of K with system inputs. In particular, if xt and xτ are as in (11-14), one has 2 θ̂ = arg min kY − Φθ k2 + γθ T K −1 θ θ ∈Rm T = (Φ Φ + γ P−1)−1 ΦT Y. which e.g. in continuous-time becomes K (xt , xτ ) = 0 u(t − α ) Z 0 +∞ IIR models Consider now the input locations defined by (12). The input space contains sequences and X ⊆ R∞ . Interpreting any input location as an infinitedimensional column, we can use ordinary algebra’s notation to handle infinite-dimensional objects. For example, if (a, x) ∈ (X , X ) then aT x = ha, xi2 , where h·, ·i2 is the inner-product in the classical space ℓ2 of squared summable sequences. Let K be symmetric and positive semidefinite infinitedimensional matrix K (the nature of K is discussed also in Section 3.3). Then, the function  u(τ − β )K(α , β )d β d α . (16) These kernels lead to the RN (1) which corresponds to (15) after the “reparametrization” g(xt ) = (θ ⊗ u)t so that, in place of the impulse response θ , the optimization variable becomes the functional g(·). The kernels K arising in discrete- and continuous-time are described below in (17,19) and (22). The distinction between the RKHSs induced by K and K will be further discussed in Section 3.3. K (x, a) = xT Ka, FIR models We start assuming that the input location is defined by (11) so that any xt is an m-dimensional (column) vector and X ⊆ Rm . If K ∈ Rm×m is a symmetric and positive semidefinite matrix, a linear kernel is defined as follows K (a, x) = aT Kx, (a, x) ∈ Rm × Rm . (18b) The nature of the input locations (11) shows that θ̂ is the impulse response estimate. Thus, (18) corresponds to regularized FIR estimation as e.g. discussed in [18]. K (xt , xτ ) = (u ⊗ (K ⊗ u)τ )t Z +∞ (18a) (x, a) ∈ R∞ × R∞ (19) defines a linear kernel on X × X . Following arguments similar to those developed in the FIR case, one can see that the RKHS associated to such K contains linear functions of the form g(x) = aT Kx with a ∈ R∞ . Note that each g ∈ H is a functional defined by the sequence aT K which represents an impulse response. In fact, one can deduce from (12) that g(xt ) is the discrete-time convolution, evaluated at t, between u and aT K. The RN with H induced by (19) now implements regularized IIR estimation. Roughly speaking, (1) becomes the limit of (18) for m → ∞. The exact solution can be obtained by the representer theorem (5) and turns out (17) All the kernel sections are linear functions. Their span defines a finite-dimensional (closed) subspace that, in view of the discussion following Theorem 3, coincides with the whole H . Hence, H is a space of linear functions: for any g ∈ H , there exists a ∈ Rm such that g(x) = aT Kx = Ka (x). N ĝ(x) = ∑ ĉi Kxi (x) = θ̂ T x, (20) i=1 If K is full rank, it holds that where the ĉi are the components of (6) while the infinitedimensional column vector ||g||2H = ||Ka ||2H = hKa , Ka iH = K (a, a) = aT Ka = θ T K −1 θ with θ := Ka. N θ̂ := ∑ ĉi Kxi (21) i=1 Let us use the H associated to (17) as hypothesis space for the RN in (1). Let Y = [y1 . . . yN ]T and Φ ∈ RN×m with i-th contains the impulse response coefficients estimates. Continuous-time The continuous-time scenario arises considering the input locations defined by (13) or (14). The input space X now contains causal functions. Considering 2 Translated in a stochastic setting, the (output) kernel K can be seen as the covariance of a causal random process of covariance K filtered by u. 5 (13), given a positive-definite kernel K : R+ × R+ → R, the linear kernel K is K (x, a) = Z spaces are isometrically isomorphic since ∞ R+ ×R+ K(t, τ )x(t)a(τ )dtd τ c2i = kθ k2I . ζ i i=1 kgk2H = ∑ (22) which coincides with (16) when x = xt and a = xτ . Each kernel section Kx (·) is a continuous-time linear system with R impulse response θ (·) = R+ K(·,t)x(t)dt. Thus, the corresponding RKHS contains linear functionals and (1) now implements regularized system identification in continuoustime. Using the representer theorem, the solution of (1) is N ĝ(x) = ∑ ĉi Kxi (x) = i=1 This result holds also in continuous-time where I is now the RKHS associated to the kernel K : R+ × R+ → R. Letting ψi be real-valued functions on R+ , this comes from the same arguments adopted in discrete-time but now applied to the expansions ∞ K(t, τ ) = ∑ ζi ψi (t)ψi (τ ), i=1 Z R+ θ̂ (τ )x(τ )d τ (23) and N θ̂ (τ ) := ∑ ĉi i=1 Z R+ K(τ ,t)xi (t)dt. Z K(t, τ )x(t)a(τ )dtd τ  Z  = ∑ ζi ψi (t)x(t)dt ψi (τ )a(τ )d τ . R i=1 | R+ {z } | + {z } where ĉ is still defined by (6) while θ̂ is the impulse response estimate given by K (x, a) = (24) R+ ×R+ Z ∞ ρi (x) ρi (a) Remark 6 The functionals ρi could turn out linearly dependent even if the ψi composing K are linearly independent. This depends on the nature of the input space. For instance, let X contain only the input locations induced by ut = sin(ω t). Then, if ψi is a rational transfer function with zeros ± jω , the functional ρi associated to ψi vanishes over X . In these cases, there is no isometry between H and I : the same dynamic system g could be defined by different impulse responses θ i ∈ I . In particular, results on RKHSs induced by sums of kernels reported in [8][Section 6 on p. 352] allow us to conclude that kgkH = mini kθ i kI . Thus, among all the possible equivalent representations in I of the dynamic system g ∈ H , the complexity of g is quantified by that of minimum norm. This is illustrated through the following simple continuous-time example. Assume that 3.3 Relationship between RKHSs of impulse responses and RKHSs of dynamic systems In (19), the infinite-dimensional matrix K represents a kernel over N × N. Then, let I be the corresponding RKHS which contains infinite-dimensional column vectors θ = [θ1 θ2 . . .]T . We will now see that I is the RKHS of impulse responses associated to H , i.e. each θ ∈ I is the impulse response of a linear system g ∈ H . In particular, let K admit the following expansion in terms of linearly independent infinite-dimensional (column) vectors ψi : ∞ K = ∑ ζi ψi ψiT . i=1 K(t, τ ) = ζ1 ψ1 (t)ψ1 (τ ) + ζ2 ψ2 (t)ψ2 (τ ), According to Theorem 5, the span of the ψi provides all the ∞ 2 θ ∈ I . Moreover, if θ = ∑∞ i=1 ci ψi , then kθ kI = ∑i=1 The equality T K (a, x) = a Kx = a T ∞ ∑ ζi ψi ψiT i=1 ∞   = ∑ ζi aT ψi ψiT x , i=1 | {z } | {z } ρi (a) ! c2i ζi . where the Laplace transforms of ψ1 and ψ2 are given, respectively, by the rational transfer functions 2s √ , W1 (s) = s+1+ 2 x √ s+1− 2 W2 (s) = , s+1 √ √ which satisfy W1 ( −1) = W2 ( −1). Let the input space contain only the input locations induced by ut = sin(t). Then, the functionals (ρ1 , ρ2 ) associated, respectively, to (ψ1 , ψ2 ) coincide over the entire X . Thus, the two impulse responses ψ1 and ψ2 induce the same system g ∈ H . Using Theorem 5, one has ρi (x) also provides the expansion of K in terms of functionals ρi (·) defined by ρi (x) := ψiT x. Assuming that such functionals are linearly independent, it comes from Theorem 5 that each dynamic system g ∈ H has the representation g(·) = ∑∞ i=1 ci ρi (·). It is now obvious that such system is associated to the impulse response θ = ∑∞ i=1 ci ψi and the two kψ1 k2I = 6 1 , ζ1 kψ2 k2I = 1 , ζ2 which implies 4.1 The linear system scenario kgk2H = min  1 1 , ζ1 ζ2  We start studying the stability of RKHSs of linear dynamic systems. Obviously, all the FIR kernels (17) induce stable RKHSs. As for the IIR and continuous-time kernels in (19) and (22), first it is useful to recall the classical result linking BIBO stability and impulse response summability. . 4 Stable RKHSs Proposition 9 (BIBO stability and impulse response summability) Let θ be the impulse response of a linear system. Then, the system is BIBO stable iff θ ∈ ℓ1 in discrete-time or θ ∈ L1 in continuous-time. BIBO stability of a dynamic system is a familiar notion in control. In the RKHS context, we have the following definition. Definition 7 (stable dynamic system) Let u be any bounded input, i.e. satisfying |ut | < Mu < ∞ ∀t. Then, the dynamic system g ∈ H is said to be (BIBO) stable if there exits a constant My < ∞ such that |g(xt )| < My for any t and any input location xt induced by u. The next proposition provides the necessary and sufficient condition for RKHS stability in the linear scenario. Proposition 10 (RKHS stability in the linear case) Let H be the RKHS of dynamic systems g : X → R induced by the IIR kernel (19). Then, the following statements are equivalent Note that, for g ∈ H to be stable, the above definition implicitly requires the input space of H to contain any xt induced by any bounded input. Definition 8 (stable RKHS) Let H be a RKHS of dynamic systems induced by the kernel K . Then, H and K are said to be stable if each g ∈ H is stable. (1) H is stable; (2) The input space X contains ℓ∞ so that g(a) < ∞ for any (g, a) ∈ (H , ℓ∞ ); To derive stability conditions on the kernel, let us first introduce some useful Banach spaces. The first two regard the discrete-time setting: ∞ (3) ∑∞ i=1 ∑ j=1 K(i, j)a j < ∞ for any a ∈ ℓ∞ . • the space ℓ1 of absolutely summable real sequences a = [a1 a2 . . .], i.e. such that ∑∞ i=1 |ai | < ∞, equipped with the norm Let instead H be the RKHS induced by the continuous-time kernel (22). The following statements are then equivalent ∞ kak1 = ∑ |ai |; (1) H is stable; (2) The input space X contains L∞ so that i=1 • the space ℓ∞ of bounded real sequences a = [a1 a2 . . .], i.e. such that supi |ai | < ∞, equipped with the norm g(a) < ∞ for any (g, a) ∈ (H , L∞ ); kak∞ = sup |ai |. (3) i The other two are concerned with continuous-time: Z R+ R+ R R+ K(t, τ )a(τ )d τ dt < +∞ for any a ∈ L∞ . Proof: The proof is developed in discrete-time. The continuous-time case follows exactly by the same arguments with minor modifications. (1) → (2) Recalling Definition 7 and subsequent discussion, this is a direct consequence of the BIBO stability assumption of any g ∈ H . (2) → (1) Given any g ∈ H , let θ = [θ1 θ2 . . .]T its associated impulse response and define • the Lebesgue space L1 of functions a : R+ → R absoR lutely integrable, i.e. such that R+ |a(t)|dt < ∞, equipped with the norm kak1 = R |a(t)|dt; xt = [sign(θ1 ) sign(θ2 ) . . .]T . • the Lebesgue space L∞ of functions a : R+ → R essentially bounded, i.e. for any a there exists Ma such that (27) The assumption g(xt ) = θ T xt = kθ k1 < ∞ implies that θ ∈ ℓ1 and the implication follows by Proposition 9. (2) → (3) By assumption, the kernel is well defined over the entire ℓ∞ × ℓ∞ . Hence, any kernel section Ka centred on a ∈ ℓ∞ is a well defined element in H and corresponds to a dynamic system with associated impulse response θ = Ka. |a(t)| ≤ Ma almost everywhere in R+ , equipped with the norm kak∞ = inf {M s.t. |a(t)| ≤ M a.e.} . 7 With xt still defined by (27), one has Ka (xt ) = kθ k1 < ∞ which implies Ka ∈ ℓ1 and proves (3). (3) → (2) By assumption, any impulse response associated to any kernel section centred on a ∈ ℓ∞ belongs to ℓ1 . This implies that the kernel K associated to H is well defined over the entire ℓ∞ × ℓ∞ . Recalling Definition 1 and eq. (2), RKHS theory then ensures that any g ∈ H is well defined pointwise on ℓ∞ and g(a) < ∞ ∀a ∈ ℓ∞ . Proof: Let the system input u ∈ ℓ∞ in discrete-time or u ∈ L∞ in continuous-time. Then, we can find a closed ball Br∞ containing, for any t, all the input locations xt induced by u as defined in (11-14). For any g ∈ H and xt ∈ Br∞ , exploiting the reproducing property and the Cauchy-Schwartz inequality, one obtains |g(xt )| = |hg, Kxt iH | ≤ kgkH kKxt kH p p = kgkH K (xt , xt ) ≤ kgkH Cr ,  hence proving the stability of H . Point (3) contained in Proposition 10 was also cited in [53,22] as a particularization of a quite involved and abstract result reported in [16]. The stability proof reported below turns instead out surprisingly simple. The reason is that, with the notation adopted in (19) and (22), the outcomes in [16] were obtained starting from spaces I of impulse responses induced by K. Our starting point is instead the RKHSs H of dynamic systems induced by K (in turn defined by K). This different perspective permits to greatly simplify the analysis: kernel stability can be characterized just combining basic RKHS theory and Proposition 9.  The following result will be also useful later on. It derives from the fact that kernels products (sums) induce RKHSs of functions which are products (sums) of the functions induced by the single kernels [8][p. 353 and 361]. Proposition 12 (RKHS stability with kernels sum and product) Let K1 and K2 be stable kernels. Then, the RKHSs induced by K1 × K2 and K1 + K2 are both stable. The two propositions above allow to easily prove the stability of a very large class of kernels, as discussed in discrete-time in the remaining part of this section. Proposition 10 shows that RKHS stability is implied by the absolute integrability of K, i.e. by ∞ ∞ ∑ ∑ |K(i, j)| < ∞ or i=1 j=1 Z R+ ×R+ |K(t, τ )|dtd τ < ∞ (28) Radial basis kernels First, consider the input locations (11) contained in X ⊆ Rm . As already mentioned in Section 4.1, radial basis kernels K (x, a) = h(|x− a|), with |·| now to indicate the Euclidean norm, are widely adopted in machine learning. Important examples are the Gaussian kernel in discrete- and continuous-time, respectively. The condition (28) is also necessary for nonnegative-valued kernels [53][Section 13]. Then, considering e.g. the continuous-time setting, the popular Gaussian and Laplacian kernels, which belong to the class of radial basis kernels K(t, s) = h(|s − t|) for t, s ≥ 0, are all unstable. Stability instead holds for the stable spline kernel [49] given by: K(t, s) = e−β max(t,s) t, s ≥ 0   |x − a|2 K (x, a) = exp − , η η >0 (31) η > 0. (32) and the Laplacian kernel (29)   |x − a| , K (x, a) = exp − η where β > 0 is related to the impulse response’s dominant pole. From Proposition 11 one immediately sees that both these kernels are stable. More in general, all the radial basis kernels are stable 3 since they are constant along their diagonal (K (x, x) = h(0)). However, despite their stability, some drawbacks affect the use of (31,32) in system identification. First, the fact that K (x, x) is constant implies that these models do not include the information that output energy is likely to increase if 4.2 The nonlinear system scenario Let us now consider RKHSs of nonlinear dynamic systems with input locations (11-14). A very simple sufficient condition for RKHS stability is reported below. Proposition 11 (RKHS stability in the nonlinear case) Let H be a RKHS of dynamic systems induced by the kernel K . Let Br∞ denote the closed ball of radius r induced by k · k∞ , contained in ℓ∞ or Rm in discrete-time, or in L∞ in continuous-time. Assume that, for any r, there exists Cr such that K (x, x) < Cr < ∞, ∀x ∈ Br∞ . Then, the RKHS H is stable. 3 This statement should not be confused with the result discussed in Section 4.1 in the linear system scenario. There, we have seen that radial basis kernels lead to unstable linear kernels K when used to define K in the IIR (19) and continuous-time (22) case. Here, the Gaussian and Laplace kernels are instead used to define directly K in the nonlinear system scenario. 8 where all the ut and et are independent Gaussian noises of variance 4. Note that (S2) contains the sum of a linear time invariant system (details on the impulse response θ are given below) and the nonlinear FIR in (S1). Our aim is to identify the two systems from 1000 input-output pairs (xt , yt ) via (1). The performance will be measured by the percentage fit on a test set of 1000 noiseless system outputs contained in the vector ytest , i.e. input energy augments. Second, they measure the similarity among input locations without using the information that ut−τ is expected to have less influence on the prediction of yt as the positive lag τ augments. Such limitation is also in some sense hidden by the finite-dimensional context. In fact, if the input locations are now defined by (12), i.e. the system memory is infinite, the Gaussian kernel becomes   kx − ak2 . K (x, a) = exp − η (33)   |ytest − ŷtest | , 100% 1 − test |y − ȳtest | This model is not reasonable: it is not continuous around the origin of R∞ and, out of the diagonal, is null for many input locations. This reveals the importance of finding an appropriate metric to measure the distance between different input trajectories. where ȳtest is the mean of the components of ytest while ŷtest is the prediction from an estimated model. We will display MATLAB boxplots of the 100 fits achieved by (1) after a Monte Carlo of 100 runs, using different kernels. At any run, independent noises are drawn to form new identification and test data. The impulse response h in (S2) also varies. It is a 10-th order rational transfer function with ℓ2 norm equal to 10 (this makes similar the contribution to the output variance of the linear and nonlinear system components) and poles inside the complex circle of radius 0.95, randomly generated as detailed in [48][section 7.4]. First, we use the Gaussian kernel (31) over an m-dimensional input space. Plugged in (1), it defines the hyperparameter vector [m η γ ]. For tuning the Gaussian kernel hyperparameters, the regressor vector dimension m is chosen by an oracle not implementable in practice. Specifically, at any run, for each m ∈ {1, . . . , 50} the pair (η , γ ) is determined via marginal likelihood optimization [20] using only the identification data. Multiple starting points have been adopted to mitigate the effect of local minima. The oracle has then access to the test set to select, among the 50 couples, that maximizing the prediction fit (35). The two left boxplots in Fig. 1 report the prediction fits achieved by this procedure applied to identify the first (top) and the second (bottom) system. Even if the Gaussian kernel is equipped with the oracle, its performance is satisfactory only in the (S1) scenario while the capability of predicting outputs in the (S2) case is poor during many runs. In place of the marginal likelihood, a cross-validation strategy has been also used for tuning (η , γ ), obtaining results similar to those here displayed. During the Monte Carlo, even when the number of impulse response coefficients θk different from zero is quite large, we have noticed that a relatively small value for m is frequently chosen, i.e. the oracle tends to use few past input values (ut−1 , ut−2 , . . .) to predict yt . This indicates that the Gaussian kernel structure induces the oracle to introduce a significant bias to guard the estimator’s variance. Now, we show that in this example model complexity can be better controlled avoiding the difficult and computationally expensive choice of discrete orders. In particular, we set m = ∞ and use the new NSS kernel (34). For tuning the NSS hyperparameter vector (α , η , γ ), no oracle having access to the test set is employed but just a single continuous optimization of the marginal likelihood that uses only the identification data. The fits achieved by NSS after the two Monte Carlo studies are in the right boxplots of the two fig- New kernel for nonlinear system identification We now show how stable spline kernels, which embed exponential stability of linear systems [52], can be useful also to define nonlinear models. Specifically, let Kα be a stable spline kernel, e.g. diagonal with Kα (i, i) = α max(i, j) or given by Kα (i, j) = α max(i, j) for any integer i and j. Then, define the nonlinear stable spline (NSS) kernel as   (a − x)T Kα (a − x) K (a, x) = a Kα x × exp − η T NSS, (34) which corresponds to the product between a linear kernel and a modified version of (31). Such kernel defines a new infinite-dimensional RKHS suited for identification of nonlinear output error models. Being no more constant along the diagonal, it embeds the information that output energy augments if input energy increases, preserving BIBO stability (as one can easily deduce from Propositions 11 and 12). Note also that, letting the dimensionality m of the regression space go to infinity, the difficult selection of the discrete dimension of the regressors x has been eliminated. In fact, input locations similarity is regulated by the hyperparameter α that includes the information that the influence of ut−τ on yt goes to zero as the time lag τ increases. 4.3 Numerical experiment The following nonlinear system is taken from [67]: 2 f (xt ) = ut + 0.6ut−1 + 0.35 (ut.2 + ut−4 ) − 0.25ut−3 3 + 0.2(ut−5 + ut−6 ) + 0.9ut−3 + 0.25ut ut−1 + 0.75ut−2  − ut−1 ut−2 + 0.5 ut2 + ut ut−2 + ut−1ut−3 Then, consider the identification of the following two systems, called (S1) and (S2): ∞ yt = f (xt )+ et (S1), yt = ∑ θk ut−k + f (xt )+ et (35) (S2), k=1 9 Fits - S1 The following result is well known and characterizes the minimizer of (36) which goes under the name of regression function in machine learning. 95 90 Theorem 13 (The regression function) We have fρ = arg min E (y − f (x))2 , 85 f 80 where fρ is the regression function defined for any x ∈ X by Gaussian+Oracle NSS+MargLik 100 80 R y d µy|x (y|x). (37) In our system identification context, fρ is the dynamic system associated to the optimal predictor that minimizes the expected quadratic loss on a new output drawn from µyx . 60 5.2 Consistency of regularization networks for system identification 40 20 Z fρ (x) = Fits - S2 Gaussian+Oracle Consider a scenario where µy|x (and possibly also µx ) is unknown and only N samples {xi , yi }Ni=1 from µyx are available. We study the convergence of the RN in (1) to the optimal predictor fρ as N → ∞ under the input-induced norm NSS+MargLik Fig. 1. Boxplots of the 100 test set fits achieved in the two scenaria by (1) equipped with the Gaussian kernel (31) relying on the oracle to select the regressors space dimension (left boxplots) and by the new kernel NSS (34) with all the hyperparameters tuned via marginal likelihood optimization (right boxplots). k f k2x = ures above: in both the cases the new estimator behaves very nicely. Z X f 2 (x)d µx (x). µ This is the norm in the classical Lebesgue space L2 x already introduced at the end of Section 2. We assume that the reproducing kernel of H admits the expansion 5 Consistency of regularization networks for system identification ∞ K (x, a) = ∑ ζi ρi (x)ρi (a), ζi > 0 ∀i, 5.1 The regression function i=1 In what follows, the system input u is a stationary stochastic process over Z in discrete-time or R in continuous-time. The distribution of u induces on X the (Borel non degenerate) probability measure µx , from which the input locations xi are drawn. In view of their dependence on u, the xi are in general correlated each other and unbounded, e.g. for Gaussian u no bounded set contains xi with probability one. Such peculiarities, inherited by the system identification setting, already violate the data generation assumptions routinely adopted in machine learning. The identification data {xi , yi }∞ i=1 are assumed to be a stationary stochastic process. In particular, each couple (x, y) has joint probability measure µyx (y, x) = µy|x (y|x)µx (x) where µy|x is the probability measure of the output y conditional on a particular input location x. Given a function (dynamic system) f , the least squares error associated to f is E (y − f (x))2 = Z X ×R (y − f (x))2 d µyx (y, x). with ζi and ρi defined via (10) and the probability measure µx . Exploiting the regression function, the measurements process can be written as yi = fρ (xi ) + ei, (38) where the errors ei are zero-mean and identically distributed. They can be correlated each other and also with the input locations xi . Given any f ∈ H and the ℓ-th kernel eigenfunction ρℓ , we define the random variables {vℓi }i∈Z by combining f , ρℓ and the errors ei defined by (38) as follows vℓi = ( f (xi ) + ei ) ρℓ (xi ). (39) Let H be stable so that the {vℓi } form a stationary process. In particular, note that each vℓi is the product of the outputs from two stable systems: the first one, f (xi )+ ei , is corrupted by noise while the second one, ρℓ (xi ), is noiseless. (36) 10 Now, by summing up over ℓ the cross covariances of lag k using kernel eigenvalues ζℓ as weights one obtains 4 ∞ ck := ∑ ζℓCov vℓi , vℓ,i+k ℓ=1  The relevance and usefulness of (42) further emerges if more specific experimental conditions are considered. An example is given below by specializing Proposition 14 to the continuous-time linear setting. Here, the aim is to reconstruct the continuous-time impulse response of a linear system fed with a stationary input process from a sampled and noisy version of the output. Below, one can e.g. think of the sampling instants as ti = i∆ + δi where δi are identically distributed random variables with support on [0, ∆]. Then, it is shown that, for Gaussian u, a weak condition on the input covariance’s decay rate already guarantees consistency. This outcome can also be seen as a non trivial extension to the dynamic context of studies on functional linear regression like e.g. that illustrated in [81] under independent data assumptions. (40) where Cov(·, ·) is the covariance operator. The next proposition shows that summability of the ck is key for consistency. Proposition 14 (RN consistency in system identification) Let H be the RKHS with kernel ∞ K (x, a) = ∑ ζi ρi (x)ρi (a), ζi > 0 ∀i, (41) i=1 where (ζi , ρi ) are the eigenvalues/eigenfunctions pairs defined by (10) under the probability measure µx . Assume that, for any r > 0 and f s.t. k f kH ≤ r, there exists a constant Cr such that ∞ ∑ k=0 |ck | < Cr < ∞, Proposition 15 (RN consistency in continuous-time linear system identification) Let H be the RKHS with kernel K defined by the continuous-time stable spline kernel K(t, s) = e−β max(t,s) with support restricted to any compact set of R+ × R+. Assume that (42) • the regression function fρ is a continuous-time and timeinvariant linear system with impulse response θ satisfying R 2 θ̇ (t)dt < ∞; • the system input u is a stationary Gaussian process with Cov(u(t + τ ), u(t)) decaying to zero as 1/τ 1+δ for δ > 0; • the errors ei in (38) are white, independent of the system input. with ck defined in (40). Let also γ∝ 1 , Nα (43) where α is any scalar in (0, 21 ). Then, if fρ ∈ H and ĝN is the RN in (1), as N → ∞ one has kĝN − fρ kx −→ p 0, Then, letting γ satisfy (43), the RN in (1) is consistent, i.e. (44) kĝN − fρ kx −→ p 0. where −→ p denotes convergence in probability. The fact that ∑∞ ℓ=1 |ζℓ | < ∞ is already an indication that (42) is not so hard to be satisfied. Indeed, to the best of our knowledge, (42) is the weakest RKHS condition currently available which guarantees RN consistency. In fact, previous works, like [83,69], beyond considering only noises with densities of compact support use mixing conditions (which rule out infinite memory systems) with fast mixing coefficients decay. These assumptions largely imply (42) as it can e.g. be deduced by Lemma 2.2 in [21]. (45) Remark 16 (Convergence to the true impulse response) The optimal predictor fρ is a dynamic system, unique as map X → R. However, considering e.g. the linear scenario in Proposition 15, such functional can be associated to different impulse responses (as illustrated in Section 3.3 by discussing the relationship between the space H of linear dynamic systems and the space I of impulse responses). Convergence to θ can be guaranteed under persistently exciting conditions related to u and the sampling instants ti [40]. One can then wonder which kind of impulse response estimate is obtained if such conditions are not satisfied. The answer is obtained by [53][Theorem 3 on p. 371] which reveals that the impulse response estimate (24) associated to ĝN coincides with (15). Thus, among all the possible impulse responses defining the optimal predictor fρ , the estimator (24) will asymptotically privilege that of minimum norm in I . From (40) one can see that (42) essentially reduces to studying summability of the covariances of the vℓi = ( f (xi ) + ei ) ρℓ (xi ). In particular, the covariance of such product sequences depends on the first four moments of the component sequences, see eq. 3.1 in [79]. The stability of H is thus crucial to ensure the existence of the moments of the vℓi . This is e.g. connected with the use of kernels like (19,22,34) where the influence of past input locations on the output decays exponentially to zero as time progresses. 6 Conclusions We have introduced a new look at system identification in a RKHS framework. Our approach uses RKHSs whose elements are functionals associated to dynamic systems. This 4 As shown in Appendix, the ck in (40) are invariant w.r.t. the particular spectral decomposition used to obtain the pairs (ζi , ρi ). 11 Lemma 18 Let r = 2k fρ kH . Then, for any γ > 0 one has perspective establishes a solid link between system identification and machine learning, with focus on the problem of learning from examples. Such framework has led to simple derivations of RKHSs stability conditions in both linear and nonlinear scenarios. It has been also shown that stable spline kernels can be used as basic building blocks to define other models for nonlinear system identification. In the last part of the paper, RN convergence to the optimal predictor has been proved under assumptions tailored to system identification, also pointing out the link between consistency and RKHS stability. This general treatment will hopefully pave the way for an even more fruitful interplay between RKHS theory and regularized system identification. 1 E kĝN − fˆkx ≤ γ Then, we have   Sx∗ Sx + γ I ĝN N  Sx∗  = K (K + N γ IN )−1 + N γ (K + N γ IN )−1 Y N Sx∗ = Y. N Hence, one has We start reporting three useful lemmas instrumental to the main proof. First, define and ĝN − fˆ = (46) =   ηi (·) = yi − fˆ(xi ) K (xi , ·). (47) → RN N ∀ c ∈ RN . i=1   Sx∗ Sx + γI N Sx∗ Sx + γI N −1  −1  Sx∗Y Sx∗ Sx fˆ ˆ − −γ f N N 1 N ∑ (ηi − E [ηi ]) , N i=1 where we used the equality Sx∗Y − Sx∗Sx fˆ = ∑Ni=1 ηi and (49). Using (50) in Lemma 17, we then obtain In addition, the notation Sx : H is the sampling operator defined by Sx f = [ f (x1 ) . . . f (xn )] while Sx∗ is its adjoint given by Sx∗ c = ∑ ci Kxi (51) ĝN = Sx∗ (K + N γ IN )−1 Y. Proof of Proposition 14 f ∈H  r 2Cr . max 1, max ζi i N Proof: It comes from the representer theorem and (48) that Appendix fˆ = arg min k f − fρ k2x + γ k f k2H s 1 1 N kĝN − fˆkH ≤ ∑ (ηi − E [ηi ]) γ N i=1 (48) . (52) H The first lemma below involves the definitions of ηi , fˆ, Sx and Sx∗ given above. It is derived from [66] and Proposition 1 in [65]. Now, let f := fρ − fˆ. With the ei defined in (38), we can write Lemma 17 It holds that ηi (·) − E ηi (·) = [ f (xi ) + ei ] K (xi , ·) − E [ f (xi ) + ei ] K (xi , ·) E ηi = γ fˆ. ∞ (49) = ℓ=1 ∞ Furthermore, if v ∈ H and f satisfies  Sx∗ Sx + γI N  = ∑ ζℓ [vℓi − mℓ] ρℓ(·) ℓ=1 f = v, where vℓi = ( f (xi ) + ei ) ρℓ (xi ) and mℓ = E vℓi . Now, the structure of the RKHS norm outlined in (9) allows us to write where I denotes the identity operator, one has 1 k f kH ≤ kvkH . γ ∑ ζℓ [( f (xi ) + ei)ρℓ (xi ) − E ( f (xi ) + ei)ρℓ (xi )] ρℓ (·) hηi (·) − E ηi , η j (·) − E η j iH (50) ∞ ∞  = h ∑ ζℓ (vℓi − mℓ ) ρℓ (·), ∑ ζℓ vℓ j − mℓ ρℓ (·)iH ℓ=1 ∞ The second lemma states a bound between the expected RKHS distance between ĝN and fˆ. = ∑ ζℓ (vℓi − mℓ) ℓ=1 12 ℓ=1  v ℓ j − mℓ . γ r fˆ − fρ = − ∑∞ i=1 ζi +γ ζi di ρi and the same manipulations contained in the proof of Theorem 4 in [65][p. 295] lead to the following result. So, using definition (40) E hηi − E ηi , η j − E η j iH ∞  = ∑ ζℓCov vℓi , vℓ, j Lemma 19 For any 0 < r ≤ 1/2, one has ℓ=1 = c|i− j| . k fˆ − fρ kx ≤ γ r kL−r K f ρ kx Comparing the values of the objective in (46) at the optimum fˆ and at fρ , one finds k fˆkH ≤ k fρ kH so that Combining (51) and (53), for any 0 < r ≤ 1/2 it holds that k fρ − fˆkH = k f kH ≤ 2k fρ kH . ∞ k=0 |ck | < Cr < ∞, Hence, we obtain  1 N E ∑ (ηi − E [ηi ]) N i=1 N N 2 H r r = 2k fρ kH .  1 kL−r K f ρ kx + γ Proof of Proposition 15  Let I be the space of impulse responses with compact support e.g. on [0, T ] induced by the stable spline kernel R K. Then, it comes from [49] that kθ k2I ∝ 0T θ̇ 2 (t)eβ t dt. So, finite energy of the first derivative of θ ensures that the optimal predictor fρ belongs the RKHS H defined by the linear kernel K induced by K. Now, we have just to prove that condition (42) holds. Recall that the ck are invariant w.r.t. the particular kernel expansion of K adopted. For the stable spline kernel K we choose the expansion K(t, τ ) = ∑∞ ℓ=1 ζℓ ψℓ (t)ψℓ (τ ) derived in [49] where 2Cr 1 . ≤ 2 ∑ ∑ |c|i− j| | ≤ N i=1 j=1 N ∞ 2 Now, recall that, if f = ∑∞ i=1 ai ρi , then k f kH = ∑i=1 2 while k f k2x = ∑∞ i=1 ai . Thus, for any f ∈ H , one has a2i ζi   k f k2x ≤ max 1, max ζi k f k2H . i The use of Jensen’s inequality and (52) then completes the proof. √ ψℓ (t) = 2 sin  LK [ρi ] := X e− β s p ζℓ ! , ζℓ = 1 . (ℓπ − π /2)2 The eigenfunctions thus satify Now, we need to set up some additional notation. Following [65,66], given the integral operator Z s  r 2Cr E kĝN − fρ kx ≤ γ max 1, max ζi . i N (54) Hence, when γ is chosen according to (43), E kĝN − fρ kx converges to zero as N grows to ∞. Using the Markov inequality, (44) is finally obtained. This, combined with (42), implies that for any γ > 0 ∑ (53) |ψℓ (t)| < K (·, u)ρi (u)d µx (u) = ζi ρi , √ 2 ∀(ℓ,t). (55) Now, let f be any dynamic system satisfying k f kH ≤ r and let θ be the associated impulse response of minimum norm living in I . 5 From the arguments discussed in section 3.3 one then has kθ kI ≤ r. It then holds that for r > 0 we define ∞ ci r ρi . ζ i=1 i L−r K [f] = ∑ |θ (t)| = |hθ , Kt iI | ≤ r p K(t,t) =⇒ max |θ (t)| ≤ Ar < ∞ t∈[0,T ] (56) with Ar independent of the particular f chosen inside the ball of radius r of H . The third lemma reported below contains the inequality (53) which was also derived in [65] assuming a compact input space. However, the bound holds just assuming the validity of the kernel expansion (41). To see this, recalling µx Theorem 5, first note that L−r K f ρ ∈ L2 for any 0 ≤ r ≤ µx 1/2. So, there exists g ∈ L2 , say g = ∑∞ i=1 di ρi , such that r d ρ . After simple computations, one obtains fρ = ∑∞ ζ i i i=1 i 5 The minimum norm impulse response is chosen without loss of generality since any other θ associated with f would induce the same input-output relationship. 13 Without loss of generality, the input u is now assumed zeromean so that the f (xi ) and ρℓ (xi ) become zero-mean Gaussian processes. Using eq. 3.2 in [79], for k > 1 one obtains [15] O. Bousquet and A. Elisseeff. Stability and generalization. J. Mach. Learn. Res., 2:499–526, 2002. [16] C. Carmeli, E. De Vito, and A. Toigo. Vector valued reproducing kernel Hilbert spaces of integrable functions and Mercer theorem. Analysis and Applications, 4:377–408, 2006.  Cov vℓi , vℓ,i+k = Cov ( f (xi )ρℓ (xi ), f (xi+k )ρℓ (xi+k )) = Cov ( f (xi ), f (xi+k ))Cov (ρℓ (xi ), ρℓ (xi+k )) + Cov ( f (xi ), ρℓ (xi+k ))Cov ( f (xi ), ρℓ (xi−k )) . (57) [17] V. Chandrasekaran, B. Recht, P.A. Parrilo, and A.S. Willsky. The convex geometry of linear inverse problems. Foundations of Computational Mathematics, 12(6):805–849, 2012. [18] T. Chen, H. Ohlsson, and L. Ljung. On the estimation of transfer functions, regularizations and Gaussian processes - revisited. Automatica, 48(8):1525–1535, 2012. Now, let h be any of the four covariances in the r.h.s. of (57). Combining (55,56) and classical integral formulas for covariances computations, as e.g. reported in [47][p. 308313], it is easy to obtain a constant Br independent of ℓ such that |h(k)| ≤ Br /k1+ε . Condition (42) thus holds true and this completes the proof. [19] F. Cucker and S. Smale. On the mathematical foundations of learning. Bulletin of the American mathematical society, 39:1–49, 2001. [20] G. De Nicolao, G. Sparacino, and C. Cobelli. Nonparametric input estimation in physiological systems: problems, methods and case studies. Automatica, 33:851–870, 1997. [21] H. Dehling and W. Philipp. Almost sure invariance principles for weakly dependent vector-valued random variables. The Annals of Probability, 10(3):689–701, 1982. References [22] F. Dinuzzo. Kernels for linear time invariant system identification. SIAM Journal on Control and Optimization, 53(5):3299–3317, 2015. [1] H. Akaike. Smoothness priors and the distributed lag estimator. Technical report, Department of Statistics, Stanford University, 1979. [23] H. Drucker, C.J.C. Burges, L. Kaufman, A. Smola, and V. Vapnik. Support vector regression machines. In Advances in Neural Information Processing Systems, 1997. [2] N. Alon, S. Ben-David, N. Cesa-Bianchi, and D. Haussler. Scalesensitive dimensions, uniform convergence, and learnability. J. ACM, 44(4):615–631, 1997. [24] T. Evgeniou and M. Pontil. On the Vγ dimension for regression in reproducing kernel Hilbert spaces. In Algorithmic Learning Theory, 10th International Conference, ALT ’99, Tokyo, Japan, December 1999, Proceedings, volume 1720 of Lecture Notes in Artificial Intelligence, pages 106–117. Springer, 1999. [3] A. Aravkin, J.V. Burke, A. Chiuso, and G. Pillonetto. On the estimation of hyperparameters for empirical bayes estimators: Maximum marginal likelihood vs minimum mse. IFAC Proceedings Volumes, 45(16):125 – 130, 2012. [25] T. Evgeniou, M. Pontil, and T. Poggio. Regularization networks and support vector machines. Advances in Computational Mathematics, 13:1–50, 2000. [4] A. Aravkin, J.V. Burke, A. Chiuso, and G. Pillonetto. Convex vs non-convex estimators for regression and sparse estimation: the mean squared error properties of ard and glasso. Journal of Machine Learning Research, 15:217–252, 2014. [26] M.O. Franz and B. Schölkopf. A unifying view of Wiener and volterra theory and polynomial kernel regression. Neural Computation, 18:3097–3118, 2006. [5] A.Y. Aravkin, B.M. Bell, J.V. Burke, and G. Pillonetto. The connection between Bayesian estimation of a Gaussian random field and RKHS. Neural Networks and Learning Systems, IEEE Transactions on, 26(7):1518–1524, 2015. [27] R. Frigola, F. Lindsten, T.B. Schon, and C.E. Rasmussen. Bayesian inference and learning in Gaussian process state-space models with particle mcmc. In Advances in Neural Information Processing Systems (NIPS), 2013. [6] A. Argyriou and F. Dinuzzo. A unifying view of representer theorems. In Proceedings of the 31th International Conference on Machine Learning, volume 32, pages 748–756, 2014. [28] R. Frigola and C.E. Rasmussen. Integrated pre-processing for Bayesian nonlinear system identification with Gaussian processes. In Proceedings of the 52nd Annual Conference on Decision and Control (CDC), 2013. [7] A. Argyriou, C.A. Micchelli, and M. Pontil. When is there a representer theorem? vector versus matrix regularizers. J. Mach. Learn. Res., 10:2507–2529, 2009. [29] F. Girosi. An equivalence between sparse approximation and support vector machines. Technical report, Cambridge, MA, USA, 1997. [8] N. Aronszajn. Theory of reproducing kernels. Trans. of the American Mathematical Society, 68:337–404, 1950. [30] G.C. Goodwin, M. Gevers, and B. Ninness. Quantifying the error in estimated transfer functions with application to model order selection. IEEE Trans. on Automatic Control, 37(7):913–928, 1992. [9] E. Bai and Y. Liu. Recursive direct weight optimization in nonlinear system identification: a minimal probability approach. IEEE Trans. Automat. Contr., 52(7):1218–1231, 2007. [10] E. W. Bai. Non-parametric nonlinear system identification: An asymptotic minimum mean squared error estimator. IEEE Transactions on Automatic Control, 55(7):1615–1626, 2010. [31] C. Grossmann, C.N. Jones, and M. Morari. System identification via nuclear norm regularization for simulated moving bed processes from incomplete data sets. In Proceedings of the 48th IEEE Conference on Decision and Control (CDC), pages 4692–4697, 2009. [11] B.M. Bell and G. Pillonetto. Estimating parameters and stochastic functions of one variable using nonlinear measurement models. Inverse Problems, 20(3):627, 2004. [32] Z.C. Guo and D.X. Zhou. Concentration estimates for learning with unbounded sampling. Adv. Comput. Math., 38(1):207–223, 2013. [12] S. Bergman. The Kernel Function and Conformal Mapping. Mathematical Surveys and Monographs, AMS, 1950. [34] G. Kimeldorf and G. Wahba. A correspondence between bayesian estimation on stochastic processes and smoothing by splines. The Annals of Mathematical Statistics, 41(2):495–502, 1970. [33] H. Hochstadt. Integral equations. John Wiley and Sons, 1973. [13] M. Bertero. Linear inverse and ill-posed problems. Advances in Electronics and Electron Physics, 75:1–120, 1989. [35] G. Kimeldorf and G. Wahba. A correspondence between Bayesan estimation of stochastic processes and smoothing by splines. Ann. Math. Statist., 41(2):495–502, 1971. [14] M. Bertero, T. Poggio, and V. Torre. Ill-posed problems in early vision. In Proceedings of the IEEE, pages 869–889, 1988. 14 [58] C.R. Rojas, R. Toth, and H. Hjalmarsson. Sparse estimation of polynomial and rational dynamical models. IEEE Transactions on Automatic Control, 59(11):2962–2977, 2014. [36] G. Kitagawa and W. Gersch. Smoothness priors analysis of time series. Springer, 1996. [37] W. E. Leithead, E. Solak, and D. J. Leith. Direct identification of nonlinear structure using Gaussian process prior models. In Proceedings of European Control Conference (ECC 2003), 2003. [59] J. Roll, A. Nazin, and L. Ljung. Nonlinear system identification via direct weight optimization. Automatica, 41(3):475–490, 2005. [38] T. Lin, B.G. Horne, P. Tino, and C.L. Giles. Learning long-term dependencies in NARX recurrent neural networks. IEEE Trans. on Neural Networks, 7:1329 – 1338, 1996. [60] R.J. Schiller. A distributed lag estimator derived from smoothness priors. Economics Letters, 2(3):219 – 223, 1979. [61] B. Schölkopf, R. Herbrich, and A. J. Smola. A generalized representer theorem. Neural Networks and Computational Learning Theory, 81:416–426, 2001. [39] Z. Liu and L. Vandenberghe. Interior-point method for nuclear norm approximation with application to system identification. SIAM Journal on Matrix Analysis and Applications, 31(3):1235–1256, 2009. [62] B. Schölkopf and A. J. Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond. (Adaptive Computation and Machine Learning). MIT Press, 2001. [40] L. Ljung. System Identification - Theory for the User. Prentice-Hall, Upper Saddle River, N.J., 2nd edition, 1999. [63] S. Shun-Feng and F.Y.P. Yang. On the dynamical modeling with neural fuzzy networks. IEEE Transactions on Neural Networks, 13:1548 – 1553, 2002. [41] L. Ljung, G.C. Goodwin, and J. C. Agero. Stochastic embedding revisited: A modern interpretation. In 53rd IEEE Conference on Decision and Control, pages 3340–3345, 2014. [42] M.N. Lukic and J.H. Beder. Stochastic processes with sample paths in reproducing kernel Hilbert spaces. Trans. Amer. Math. Soc., 353:3945–3969, 2001. [64] J. Sjöberg, Q. Zhang, L. Ljung, B. Delyon A. Benveniste, P. Glorennec, H. Hjalmarsson, and A. Juditsky. Nonlinear black-box modeling in system identification: A unified overview. Automatica, 31(12):1691–1724, December 1995. [43] J. S. Maritz and T. Lwin. Empirical Bayes Method. Chapman and Hall, 1989. [65] S. Smale and D.X. Zhou. Shannon sampling II: connections to learning theory. Appl. Comput. Harmon. Anal., 19:285–302, 2005. [44] J. Mercer. Functions of positive and negative type and their connection with the theory of integral equations. Philos. Trans. Roy. Soc. London, 209(3):415–446, 1909. [66] S. Smale and D.X. Zhou. Learning theory estimates via integral operators and their approximations. Constructive Approximation, 26:153–172, 2007. [45] K. Mohan and M. Fazel. Reweighted nuclear norm minimization with application to system identification. In American Control Conference (ACC), pages 2953–2959, 2010. [67] W. Spinelli, L. Piroddi, and M. Lovera. On the role of prefiltering in nonlinear system identification. IEEE Transactions on Automatic Control, 50(10):1597–1602, 2005. [46] S. Mukherjee, P. Niyogi, T. Poggio, and R. Rifkin. Learning theory: stability is sufficient for generalization and necessary and sufficient for consistency of empirical risk minimization. Advances in Computational Mathematics, 25(1):161–193, 2006. [68] I. Steinwart, D. Hush, and C. Scovel. Learning from dependent observations. Journal of Multivariate Analysis, 100(1):175 – 194, 2009. [47] A. Papoulis. Probability, Random Variables and Stochastic Processes. Mc Graw-Hill, 1991. [69] H. Sun and Q. Wu. Regularized least square regression with dependent samples. Advances in computational mathematics, 32(2):175 – 189, 2010. [48] G. Pillonetto, T. Chen, A. Chiuso, G. De Nicolao, and L. Ljung. Regularized linear system identification using atomic, nuclear and kernel-based norms: The role of the stability constraint. Automatica, 69:137 – 149, 2016. [70] Hongwei Sun. Mercer theorem for RKHS on noncompact sets. J. Complexity, 21(3):337–349, 2005. [71] J.A.K. Suykens, C. Alzate, and K. Pelckmans. Primal and dual model representations in kernel-based learning. Statist. Surv., 4:148–183, 2010. [49] G. Pillonetto, A. Chiuso, and G. De Nicolao. Regularized estimation of sums of exponentials in spaces generated by stable spline kernels. In Proceedings of the IEEE American Cont. Conf., Baltimora, USA, 2010. [72] J.A.K. Suykens, T. Van Gestel, J. De Brabanter, B. De Moor, and J. Vandewalle. Least Squares Support Vector Machines. World Scientific, Singapore, 2002. [50] G. Pillonetto, A. Chiuso, and G. De Nicolao. Prediction error identification of linear systems: a nonparametric Gaussian regression approach. Automatica, 47(2):291–305, 2011. [73] J.A.K. Suykens, T. Van Gestel, J. De Brabanter, B. De Moor, and J. Vandewalle. Least Squares Support Vector Machines. World Scientific, Singapore, 2002. [51] G. Pillonetto, A. Chiuso, and Minh Ha Quang. A new kernelbased approach for nonlinear system identification. IEEE Trans. on Automatic Control, 56(12):2825–2840, 2011. [74] A.N. Tikhonov and V.Y. Arsenin. Solutions of Ill-Posed Problems. Washington, D.C.: Winston/Wiley, 1977. [52] G. Pillonetto and G. De Nicolao. A new kernel-based approach for linear system identification. Automatica, 46(1):81–93, 2010. [75] V. Vapnik. Statistical Learning Theory. Wiley, New York, NY, USA, 1998. [53] G. Pillonetto, F. Dinuzzo, T. Chen, G. De Nicolao, and L. Ljung. Kernel methods in system identification, machine learning and function estimation: a survey. Automatica, 50(3):657–682, 2014. [76] G. Wahba. Spline models for observational data. SIAM, Philadelphia, 1990. [77] Grace Wahba. Practical approximate solutions to linear operator equations when the data are noisy. SIAM Journal on Numerical Analysis, 14(4):651–667, 1977. [54] T. Poggio and F. Girosi. Networks for approximation and learning. In Proceedings of the IEEE, volume 78, pages 1481–1497, 1990. [55] T. Poggio, R. Rifkin, S. Mukherjee, and P. Niyogi. General conditions for predictivity in learning theory. Nature, 428(6981):419–422, 2004. [78] C. Wang and D.X. Zhou. Optimal learning rates for least squares regularized regression with unbounded sampling. Journal of Complexity, 27(1):55 – 67, 2011. [56] Tomaso Poggio and Christian R. Shelton. Machine learning, machine vision, and the brain. AI Magazine, 20(3):37–55, 1999. [79] W.E. Wecker. A note on the time series which is the product of two stationary time series. Stochastic Processes and their Applications, 8(2):153 – 157, 1978. [57] C.E. Rasmussen and C.K.I. Williams. Gaussian Processes for Machine Learning. The MIT Press, 2006. 15 [80] Q. Wu, Y Ying, and D.X. Zhou. Learning rates of least-square regularized regression. Foundations of Computational Mathematics, 6:171–192, 2006. [81] M. Yuan and T. Tony Cai. A reproducing kernel Hilbert space approach to functional linear regression. Annals of Statistics, 38:3412–3444, 2010. [82] W. Zhao, H.F. Chen, E. Bai, and K. Li. Kernel-based local order estimation of nonlinear nonparametric systems. Automatica, 51:243– 254, 2015. [83] B. Zou, L. Li, and Z. Xu. The generalization performance of erm algorithm with strongly mixing observations. Machine Learning, 75:275–295, 2009. 16
3cs.SY
Under consideration for publication in Theory and Practice of Logic Programming 1 arXiv:cs/0406012v1 [cs.PL] 7 Jun 2004 Secure Prolog Based Mobile Code SENG WAI LOKE∗ DSTC, Monash University, Caulfield, Victoria 3145, Australia (e-mail: [email protected]) ANDREW DAVISON Dept. of Computer Engineering Prince of Songkla University, Hat Yai, Songkhla 90112, Thailand (e-mail: [email protected]) Abstract LogicWeb mobile code consists of Prolog-like rules embedded in Web pages, thereby adding logic programming behaviour to those pages. Since LogicWeb programs are downloaded from foreign hosts and executed locally, there is a need to protect the client from buggy or malicious code. A security model is crucial for making LogicWeb mobile code safe to execute. This paper presents such a model, which supports programs of varying trust levels by using different resource access policies. The implementation of the model derives from an extended operational semantics for the LogicWeb language, which provides a precise meaning of safety. 1 Introduction A significant development of the World Wide Web, which has attracted considerable interest in recent years, is the addition of mobile code to Web pages; Java applets and JavaScript are popular examples. Code of this kind adds sophisticated interactive behaviour to Web documents, allowing more useful tasks to be performed. However, a key issue is security, since mobile code is downloaded from foreign hosts and executed locally. Malicious or buggy code can attack a local host in three main ways (Brown 1996; Ousterhout et al. 1997): • integrity attacks: attempts to delete or modify information in the local environment in unauthorised ways. For example, a program issues an operating system command to delete local files. • privacy attacks: attempts to steal or leak information to unauthorised parties. For example, a program reads a file and transmits the contents to another host. ∗ This author is grateful to Leon Sterling who (with Andrew Davison) co-supervised the work on which this paper is based. 2 S.W. Loke and A. Davison • denial of service attacks: attempts to occupy resources to an extent which interferes with the normal operation of the host. An example is a program executing an infinite loop, resulting in CPU cycles wasted and a depleted heap space. These attacks are only possible if a foreign program has unregulated access to local system resources such as the file system, network services (e.g., socket connections), CPU cycles, internal memory, input/output devices, the program environment (e.g., environment variables), and operating system commands. At the other extreme, a foreign program which is denied access to all resources cannot do any damage, but is unlikely to be able to do much useful work. There is no one applicable policy for all foreign code: some code should be more trusted than others, and hence should be given more privileges. Providing a security model that provides the right level of functionality with the appropriate degree of security at the right time is a challenge. Indeed, security for mobile code is an active research area (Vitek and Tschudin 1997; Brown 1996; Cugola et al. 1997; Thorn 1997). An emerging trend is the use of formal language semantics to reason with mobile code and prove security properties. For example, Leroy and Rouaix (1998) have developed formal techniques for validating a typed functional language with assignments, ensuring that memory locations always contain appropriate values. The use of a rewriting logic is advocated in (Meseguer and Talcott 1997) as the basis for a mobile code programming language where security properties can be formally verified. Volpano (1997) argues for the development of provably-secure programming languages which can be remotely evaluated, and whose semantics permit the formal proof of security properties. As reported in (Dean et al. 1996), a number of security loopholes have been discovered with Java applets, and this seems related to its lack of a formal semantics. Recently, this weakness has been addressed by giving semantics to subsets of Java (Drossopoulou and Eisenbach 1998; Jensen et al. 1998). Declarative languages come with simple and elegant semantics, providing a convenient basis for reasoning about program execution and for introducing security mechanisms. This paper examines a security extension for a Prolog-based mobile code language called the LogicWeb language (Loke and Davison 1998a). Underpinning the language is a view of the Web as a collection of logic programs called LogicWeb programs. LogicWeb clauses embedded within Web pages add logic programming behaviour to those pages. A LogicWeb program can retrieve and manipulate other Web pages (which may optionally contain embedded LogicWeb code themselves) using compositional logic programming techniques. Applications of LogicWeb include Web-based distributed deductive databases, and extending the semantics of Web links (Loke et al. 1996b; Loke et al. 1996a; Loke and Davison 1997). In this paper, we present a security model for LogicWeb which provides for the safe (i.e., host-protecting) execution of programs without overly restricting their capabilities. The key features of the model are: • flexible: it supports varying degrees of trust and access to resources. More trusted programs can be given more privileges to achieve greater function- Secure Prolog Based Mobile Code 3 ality. Policies determine what resources are available to whom, and how the resources must be used. • formally specified: the model provides a precise meaning of safety. • implemented based on the model’s specification: the implementation takes the form of a meta-interpreter which is closely allied to the underlying operational semantics. The security model is specified as an extension of the operational semantics of the LogicWeb language, and so permits a straightforward proof that the model protects the host according to specified policies. We describe how meta-programming provides the necessary control over execution behaviour for a flexible yet safe execution environment, including control over resource usage and looping. We also show how security policies can support different trust levels, and how policies can be combined to control the execution of an application composed from programs with different trust levels. The security model is implemented as an extension of the system described in (Loke and Davison 1998b). The rest of this paper is organised as follows. §2 provides background on LogicWeb, §3 gives an overview of the security model, §4 describes how we utilise digital signatures, and §5 examines how security policies are specified. The need to combine security policies during goal evaluation is explained in §6. §7 describes how policies are enforced by policy programs. An implementation of the security model is given in §8. Control of resource usage using meta-interpreters is illustrated in §9. §10 reviews related work, and §11 concludes. 2 Preliminaries This section gives an overview of LogicWeb programs, the language, and the architecture of the client-side LogicWeb system. 2.1 LogicWeb Programs LogicWeb programs are constructed from the data returned by HEAD, GET or POST HTTP requests. When successful, a HEAD request returns meta-information about a page, whereas GET and POST requests return meta-information and Web pages. The LogicWeb program derived from a HEAD response consists of two types of facts for holding the page’s meta-information and URL: • about(FieldName, Value). about/2 facts store the page’s meta-information as supplied by the server (e.g., the content length). • actual url(URL). This holds the URL of the page whose meta-information was retrieved from the server. The actual URL would be different from the URL used in the original HTTP request if the request was redirected by the server. The program corresponding to a HEAD response uses the identifier lw(head, 4 S.W. Loke and A. Davison URL). Programs corresponding to GET and POST responses use lw(get, URL) and lw(post(Data), URL) respectively. A GET or POST response is translated into five types of facts based on the meta-information returned by the page’s server and the HTML text in the page. Additional LogicWeb clauses may also be included within the page. The facts include about/2 and actual url/1 described above, and the following: • my id(Type, URL). Type stores the type of the program, which is either the term get or post(Data). Data is the information posted to the CGI script at URL. • h text(HTMLText). This contains the HTML text of the page (apart from any additional LogicWeb clauses). • link(Label, URL). This stores a page’s link information. For instance, the anchor: ...<A HREF="http://www.cs.mu.oz.au/">Melb. U</A>... becomes: link("Melb. U", "http://www.cs.mu.oz.au/"). Additional facts can be readily extracted from the text of the page, as described in (Loke and Davison 1998b). Clauses are included within a page between the tags “<LW CODE>” and “</LW CODE>”. Typically, the code appears inside a verbatim container “<PRE>...</PRE>” or a comment container “<!--...-->” so that it is uninterpreted by the browser. Figure 1 shows a page holding LogicWeb clauses about research interests. interested in/1 defines the author’s interests using Prolog-style facts and rules. The LogicWeb operator “#>” evaluates the interested in/1 goal against the program identified by lw(get, URL). Assuming that the page shown in Figure 1 was retrieved from http://www.cs.mu.oz.au/~swl/ using the GET method, then the resulting LogicWeb program contains: 1. 2. 3. 4. Several about/2 facts concerning the page’s meta-information. actual url("http://www.cs.mu.oz.au/~swl/"). my id(get,"http://www.cs.mu.oz.au/~swl/"). h text("<HTML>...</HTML>"). This fact stores all the HTML text from the page except the clauses between the “<LW CODE>” and “</LW CODE>” tags. 5. Two link/2 facts: link("Department of Computer Science", "http://www.cs.mu.oz.au/"). link("University of Melbourne", "http://www.unimelb.edu.au/"). 6. The clauses between the “<LW CODE>” and “</LW CODE>” tags. A LogicWeb application comprises a set of LogicWeb programs, with one singled out (by the programmer) as the main program. Each application has an identity which is the program identifier of the main program, and a visible interface with Secure Prolog Based Mobile Code 5 <HTML> <HEAD> <TITLE>Seng Wai Loke’s Home Page</TITLE> </HEAD> <BODY><H1>Seng Wai Loke’s Home Page</H1> I’m from the<A HREF="http://www.cs.mu.oz.au/"> Department of Computer Science</A> at the <A HREF="http://www.unimelb.edu.au/"> University of Melbourne</A>. <!-<LW_CODE> interests(["Logic Programming", "AI", "Web", "Agents"]). friend_page("http://www.cs.mu.oz.au/~f1/"). friend_page("http://www.cs.mu.oz.au/~f2"). interested_in(X) :- interests(Is), member(X, Is). interested_in(X) :friend_page(URL), lw(get, URL)#>interested_in(X). </LW_CODE> --> </BODY> </HTML> Fig. 1. A page with clauses describing research interests. which the user interacts. A typical interface consists of a HTML form and/or Web links. Clauses in the main program define the forms interface and the mapping of link selections to goals. 2.2 The LogicWeb Language The LogicWeb language utilises Prolog and special LogicWeb operators. We will assume that the reader is familiar with Prolog, and concentrate instead on the operators. 2.2.1 LogicWeb Operators A LogicWeb goal is formed using the operator “#>”, which is known as context switching. For example, the LogicWeb goal lw(get, URL)#>Goal applies Goal to the program specified by the lw(get, URL) identifier. If the program is not already present on the client-side, then its page will be downloaded and translated into a LogicWeb program before the query is evaluated. However, if the program is present, then the goal is executed immediately. Thus, the “#>” operator permits the programmer to think of Web computation as goals applied to programs, with no need for explicit Web page retrieval, parsing, or storage. The current context of a LogicWeb goal, i.e. the program (or composition of programs) where the goal is located, is ignored when “#>” is evaluated. 6 S.W. Loke and A. Davison LogicWeb programs can be manipulated using five LW-composition operators. Four are based on Brogi’s algebraic program composition framework (Brogi 1993), and the fifth on reduce from functional programming. The operators are: LW-union (“+”), LW-intersection (“*”), LW-restriction (“/”), LW-encapsulation (“@”), and LW-reduce (“<>”). An expression formed with LW-composition operators is called a program expression. LogicWeb programs are composed together after they have been retrieved from the Web, which means that the semantics of the operators can be viewed as a variant of Brogi’s definitions, extended to address issues related to page downloading and the translation of pages to programs. The operational semantics are specified in §2.2.3. The sixth operator, the context operator, denoted by “(#)”, represents the current context in a program expression. For instance: ?- lw(get, "URL0")#>(((#) + lw(get, "URL1"))#>interested_in(X)). “(#)” is instantiated to lw(get, "URL0") when the goal is evaluated. “(#)” can be used in place of a program identifier in any expression, which provides very useful expressive power. For instance, it can readily model other composition formalisms (Loke and Davison 1998a). 2.2.2 EBNF Syntax A pure LogicWeb program is a finite set of clauses of the form [∀x](A :- G) where G is defined recursively as: G ::= A | E #> G | (G, G) E defines LogicWeb program expressions: E ::= P | E+E | E*E | E/P | @E | (/)<>(E,L(P)) | (⊕)<>L(E) P ::= lw(head, U RL) | lw(get, U RL) | lw(post(L(F ) ), U RL) | (#) F ::= field(N ame,V alue) L(I) ::= [] | [I|L(I) ] ⊕ ::= + | * L(I) defines a Prolog list of items, each of which is described by a nonterminal I. U RL is a URL, and F a query attribute submitted to a CGI script. N ame is the name of a query attribute, and V alue is the value submitted to the server for the corresponding attribute. The context operator “(#)” can appear anywhere a program identifier can, but must be instantiated to a program identifier when used as the right-hand argument of LW-restriction. 2.2.3 Operational Semantics The operational semantics of the LogicWeb language is detailed in (Loke and Davison 1998a), but so that this paper is self-contained, the semantics are summarised here. In particular, we do not consider LW-restriction and LW-reduce. Secure Prolog Based Mobile Code 7 An oracle function is defined to model the accessing of LogicWeb programs. Definition 2.1 (oracle function) The oracle function download : LW P rogramIDs → LW P rograms ∪ {⊥} takes a LogicWeb program identifier P (of the form defined by P), and returns the program DP if it is successfully created. Failure to obtain a program is represented by returning the symbol ⊥.    DP if the program denoted by identifier P is download(P ) = successfully created,   ⊥ otherwise. download attempts to download a HTTP response object and translate it into a LogicWeb program in the way specified in §2.1. The set of downloaded programs is extended by calling the function add programs, which takes the set of existing LogicWeb programs and maps it to a new set using download. Definition 2.2 (addition of LogicWeb programs) Let ℘ denote powerset. The function add programs : ℘(LW P rograms) × ℘(LW P rogramIDs) → ℘(LW P rograms) takes a set S of programs and a set I of program identifiers and returns a new set add programs(S, I) consisting of S augmented with newly created programs mentioned in I but previously not in S: add programs(S, I) = S ∪ {DP | P ∈ (I \ ids(S)), DP = download(P ), DP 6= ⊥} where ids is a function that takes a set of programs and returns the identifiers of the programs in the set, i.e. ids(S) is the set of identifiers of the programs in S. A derivation relation involving the set of downloaded LogicWeb programs specifies the computation model involving interactions with the Web. Definition 2.3 (derivation relation) ′ For any goal formula G and program expression E, we denote by S, E ⊢Sθ G the fact that there exists a top-down derivation of G in E starting with the set S of existing LogicWeb programs and ending with computed answer substitution θ and created program set S ′ . A top-down derivation or proof of G in E starting with S and ending with S ′ and θ is a finite tree such that: ′ 1. the root node (bottom node) is labelled by the string “S, E ⊢Sθ G”; 2. the internal nodes are derived according to the set of inference rules given below; and 3. all the leaves of the tree are either empty or labelled by a string not containing the symbol “⊢” (e.g., the label “(A :- G) ∈ P ”). 8 S.W. Loke and A. Davison ⊢Sθ is defined to be the smallest relation satisfying the inference rules below. If ′ S, E ⊢Sθ G, then the goal G succeeded when evaluated in E using S. Otherwise, the goal G f ailed when evaluated in E using S. ′ Given a top-down derivation S, E ⊢Sθ G, if the derivation does not involve interactions with the Web or if no programs are downloaded, then S ′ is the same as S (i.e., S ′ = S). If programs are downloaded, then S is extended to S ′ (⊇ S). The difference S ′ \ S represents the effect of Web interactions during the derivation. A context is defined for each node in a top-down derivation whose label is of the ′ form “S, E ⊢Sθ G”. Definition 2.4 (context of a goal) ′ Given the node label “S, E ⊢θS G”, E is the context (of G). In the rules, P denotes single program identifiers of the form P, and E and F denote program expressions of the form E as defined in §2.2.2. L(I) denotes a list of the form LI . ǫ denotes the empty (identity) substitution. The following rules define derivation in pure Prolog taking into account the creation of LogicWeb programs: True. (1) S, E ⊢Sǫ true true is always derivable in any program expression E without any change to the set of created programs. Conjunction. ′ ′′ S, E ⊢Sθ G1 ∧ S ′ , E ⊢Sγ G2 θ ′′ S, E ⊢Sθγ G1 , G2 (2) S ′ , which may or may not be the same as S, is the result of Web interactions from G1 ’s derivation. The result of these interactions are propagated to G2 by starting the derivation of G2 θ with S ′ . Since G2 θ started with S ′ , S ′′ is the result of Web interactions during the derivation of the conjunction. Atomic formula. ′ S, E ⊢Sθ (H :- G) ∧ γ = mgu(A, Hθ) ′′ S, E ⊢Sθγδ A ∧ ′′ S ′ , E ⊢Sδ Gθγ (3) Obtaining clauses from E can involve the creation of new programs due to LW-encapsulation (see rule (8)), and so, S is changed to S ′ . The proof of the body starts with the computed program set S ′ and returns the new set S ′′ and the answer substitution δ. Obtaining clauses from a single program. (A :- G) ∈ P S, P ⊢Sǫ (A :- G) (4) Secure Prolog Based Mobile Code 9 The answer substitution is ǫ, and there is no change to S. Below, we present the rules for choosing clauses from LW-union, LW-intersection, LW-encapsulation, and context switching. LW-union. ′ S, E ⊢Sθ (A :- G) ′ S, E+F ⊢Sθ (A :- G) (5) ′ S, F ⊢Sθ (A :- G) ′ S, E+F ⊢Sθ (A :- G) (6) A clause is chosen from a LW-union E+F by choosing a clause from either E or F . LW-intersection. ′ S, E ⊢Sθ1 (H1 :- G1 ) ′′ ∧ S ′ , F ⊢Sθ2 (H2 :- G2 ) ∧ γ = mgu(H1 θ1 , H2 θ2 ) (7) ′′ S, E*F ⊢Sθ1 θ2 γ (H1 :- G1 , G2 ) A clause H:-G is obtained from the LW-intersection E*F if there exists a clause H1 :-G1 in E and a clause H2 :-G2 in F such that H unifies with H1 and H2 , and G = (G1 , G2 ). This rule utilises a left-to-right ordering in choosing clauses from E*F . Rules are first chosen from E returning S ′ , and then, S ′ is used when selecting clauses from F ending up with S ′′ . LW-encapsulation. ′ S, E ⊢Sθ A ′ S, @E ⊢Sθ A :- true (8) A clause A:- true is obtained from the encapsulation of E, @E, if A is provable in E. LogicWeb programs can be created in the proof of A, i.e. a new program set S ′ is computed starting with S. Context Switching. We first define the function expids : P rogramExpressions → ℘(LW P rogramIDs) 10 S.W. Loke and A. Davison to refer to the program identifiers within a program expression. expids is defined recursively based on the syntax of program expressions: expids(P ) = {P } expids(E1 + E2 ) = expids(E1 ) ∪ expids(E2 ) expids(E1 * E2 ) = expids(E1 ) ∪ expids(E2 ) expids(E / P ) = expids(E) ∪ expids(P ) expids(@E) = expids(E) expids((/)<>(E,L(P))) = expids(E) ∪ expids(L(P) ) expids((⊕)<>L(E)) = expids(L(E) ) [ expids(L(E) ) = expids(E) E∈L(E) In the above, we have used ∈ to represent list membership, and a L(P) is a L(E) from the EBNF definition in §2.2.2. We also define the function: insertCC : P rogramExpressions×P rogramExpressions → P rogramExpressions which substitutes every occurrence of the operator (#) in a program expression (the first argument) with the current context (the second argument): insertCC((#), C) = C insertCC(P, C) = P insertCC(E1 + E2 , C) = insertCC(E1 , C) + insertCC(E2 , C) insertCC(E1 * E2 , C) = insertCC(E1 , C) * insertCC(E2 , C) insertCC(E / P, C) = insertCC(E, C) / insertCC(P, C) insertCC(@E, C) = @insertCC(E, C) insertCC((/)<>(E,L(P)), C) = (/)<>(insertCC(E, C),insertCC(L(P), C)) insertCC((⊕)<>L(E), C) = (⊕)<>insertCC(L(E), C) insertCC(L(E) , C) = [insertCC(E, C) | E ∈ L(E) ] The rule defining context switching is the following: ′′ I ⊆ ids(S ′ ) ∧ S ′ , F ′ ⊢Sθ G ′′ S, E ⊢Sθ F #> G (9) where F ′ = insertCC(F, E), I = expids(F ), and S ′ = add programs(S, I). The rule states that the goal F #> G is provable in E starting with the program set S if the goal G is provable in F ′ starting with the updated program set S ′ which contains all the programs mentioned in I (and hence, in F ). 2.3 The LogicWeb System Architecture The architecture of the LogicWeb system (its components and data-flows) is shown in Figure 2. Secure Prolog Based Mobile Code useractions User displayed result LogicWeb System Graphical User Interface (Web browser) query 11 result Prolog Engine Query Processing Engine program Program Store program request program Page Loader and Translator Client-side page request page Web Servers Fig. 2. Architecture of the LogicWeb system. The main components are: • • • • a graphical user interface (GUI); an engine for processing user queries; a page loader and (page to program) translator; and a store of LogicWeb programs. The Prolog engine consists of three components: the query processing engine, the program store, and the page loader and translator. The query processing engine consists of the LogicWeb program interpreter (see §8.1) and predicates to translate user actions into the evaluation of specific goals in LogicWeb programs. Downloaded LogicWeb programs are stored inside the program store (actually as facts in a SWI-Prolog database). The page loader and translator consist of predicates which download and parse HTML documents to extract the clauses making up LogicWeb programs. The system converts a user action (i.e., link selection or form submission) into a query. It computes the result of the query with respect to a program by invoking the LogicWeb interpreter. Processing of the query may result in other pages being downloaded and translated into LogicWeb programs. When query processing ends, the system formats the result and shows it to the user via the browser. The above architecture has been implemented using the NCSA Mosaic browser and SWI-Prolog (for the Prolog engine). The two are integrated with Mosaic’s Com- 12 S.W. Loke and A. Davison mon Client Interface (CCI) API (Loke and Davison 1998b). This implementation is extended in §8. 3 Overview of the Security Model The LogicWeb security model assumes the following about the downloading and execution of programs: • Program source is downloaded. Since the local host receives the source rather than a compiled form (e.g., binaries or bytecode), each goal is visible at the interpreter level. Also, if the source is unencrypted then it is open to tampering – it may be intercepted during transmission and modified. • Downloaded programs are executed by an interpreter based on the operational semantics presented earlier. Such an interpreter is described in (Loke and Davison 1998b), and is extended in §8. • A LogicWeb program can invoke goals in other programs. Therefore, the model must handle communication between programs possessing different levels of trust. A less trusted program should not be able to use the privileges of a more trusted program. We have adopted a sandbox model, where each program is executed in a controlled space, limiting its access to resources and controlling the resources used. A sandbox for a LogicWeb program consists of its interpreter and a security policy, or policy for short, which controls the program’s utilisation of system resources. A less trusted LogicWeb program is assigned a policy which restricts resource usage, while a more trusted program is granted a more liberal policy. Security policies are defined by each user of the LogicWeb system. A LogicWeb program accesses the local environment and system resources via system calls, which are SWI-Prolog and LogicWeb built-in predicates. LogicWeb built-ins include predicates for displaying pages, constructing and parsing HTML documents, fast string matching, checking if a particular program exists in the program store, and deleting programs from the program store. A policy specifies what system calls are permitted, and the ways they can be used. This information is encoded as a set of predicates in a policy program created by the LogicWeb system user. A policy program also states what programs can be utilised via context switching. Policy programs may be stored at remote sites or locally as long as they are protected from tampering. They can be integrated into the system using the same downloading mechanism as the rest of the LogicWeb system, including the use of composition to combine policies. Assignment of policies to LogicWeb programs is owner-based. The choice of policy program assigned to a LogicWeb program is determined by how much the LogicWeb program is trusted which, in turn, depends on the owner of the program. The owner is identified by a mechanism external to the LogicWeb language, by authenticating the LogicWeb program using a PGP (Pretty Good Privacy) digital signature (Garfinkel 1995). Secure Prolog Based Mobile Code 13 Policy programs restrict the use of system calls, thereby preventing integrity and privacy attacks. Denial-of-service attacks are addressed by controlling the use of resources using policy programs (as shown in §9.1) and meta-interpreters (discussed in §9.2). 4 Digital Signatures for LogicWeb Programs Information can be encrypted in PGP using a secret private key, and decrypted using a corresponding public key which is distributed publically. PGP keys are used for authentication in the following way. Suppose A encrypts a message and sends it to B. B wants to ensure that the encrypted message is really from A, and that the message has not been tampered with. To do this, B attempts to decrypt the message using A’s public key. If the decryption succeeds, it means that the message was encrypted using A’s private key and that it has not been modified. Also, since the key is only known to A, the message must have come from A. If the decryption fails, B cannot conclude that A encrypted the message. PGP keys can also be used to sign documents or programs. Figure 3 shows the use of a digital signature when downloading a program from A to B, and the process of assigning a policy program. A PGP digital signature is created by first mapping the program to a string (actually, a single large number) using the MD5 algorithm (Garfinkel 1995), which almost uniquely identifies the message.1 The MD5 string is then encrypted using the sender’s private key, and this encrypted MD5 string becomes the digital signature. The receiver of a signed program (the program and its signature) uses the sender’s public key to decrypt the signature, producing the original MD5 string and the PGP ID. The receiver then checks that the program corresponds to the MD5 string, i.e. the program has not been modified in any way, and assigns a policy to the program by consulting a database maintained in the system which maps PGP IDs to policy program IDs. Note that the system uses three kinds of IDs: PGP IDs, policy program IDs and IDs of an application’s LogicWeb programs, and that since policy programs are LogicWeb programs, policy program IDs are LogicWeb program IDs. Unsigned programs, or programs where authentication failed, should not be trusted, and are given restricted access to system resources. The system stores the downloaded program, and records the policy assignment for later use in query evaluation. Policy programs not already present in the system are downloaded during query evaluation. §8 provides details on policy assignment and use. A digital signature proves who sent the program, and that the program was not altered either by error or design. The signature also provides non-repudiation, which means that the sender cannot easily disavow his signature on the program. One reason for using an MD5 string is that it is faster to encrypt and decrypt than the entire program. Also, since the program is not encrypted, the program source is 1 In theory, two different messages could map to the same MD5 string, although this has never been known to occur (Garfinkel 1995). A B program to send received program program to send received program S.W. Loke and A. Davison transmission MD5 algorithm MD5 string received digital signature digital signature to send decrypt with A’s public key MD5 string encrypt with A’s private key used in query PGP ID to policy program query ID database result PGP ID for A A’s policy program ID used by used by Fig. 3. Downloading a program from A to B, and the subsequent assignment of a policy program. 14 check correspondence LogicWeb program interpreter Secure Prolog Based Mobile Code 15 available even if authentication fails, and so can still be executed (though with limited privileges). However, if program confidentiality is required during transmission, the code can be encrypted. We utilise PGP since it is difficult to break, equipped with public and private keys generation, widely available, supported on a range of operating system platforms, and one of the most popular encryption techniques. PGP public keys can be obtained either through personal communication between the LogicWeb system user and program owners, or via the Web: PGP public keys are increasingly being placed on homepages, where they can be readily retrieved by the LogicWeb system. The distribution of PGP keys is discussed further in §11. 5 Specifying Security Policies A LogicWeb program accesses system resources via system calls and context switching. The resources used via context switching are socket connections for downloading pages and local storage for programs. A policy program defines three predicates for controlling the system calls and context switching of its designated LogicWeb programs. The predicates are: • valid program(Type, URL): this predicate specifies the LogicWeb programs which can be used via context switching. For example, restricting programs to those from the domain www.cs.mu.oz.au is given by: valid_program(get, URL) :- contains(URL, "http://www.cs.mu.oz.au/"). The following query will fail when using that policy since the goal refers to an invalid domain: ?- lw(get, "http://www.cs.rmit.edu.au/")#>h_text(Src). • valid systemCall(Call): this predicate defines the set of system calls a program is allowed to invoke. Call is a term representing the form the system call may take. • call system(Call): this predicate is a wrapper for the allowed predicates defined by valid systemCall/1. Call is a term representing the goal which is to be invoked in a special way. Typically, call system/1 is used to implement more restrictive versions of system calls. The difference between valid systemCall/1 and call system/1 is execution. Call patterns specified in valid systemCall/1 are used to test system calls, rejecting ones which do not match the necessary requirements. call system/1 is used to execute system calls in novel (usually restricted) ways. A policy program could be written with the body code of valid systemCall/1 implemented in call system/1, doing away with the need for the valid systemCall/1 predicate. However, the distinction between testing and execution would then be much less clear. The following policy program permits the retrieval (using the GET method) of all URLs except http://www.cs.mu.oz.au/~swloke/private.html. It disallows all calls to system/1 and open/3, except when open/3 reads dump.txt: 16 S.W. Loke and A. Davison valid_program(get, URL) :URL \== "http://www.cs.mu.oz.au/~swloke/private.html". valid_systemCall(open(’/home/pgrad/swloke/lws/dump.txt’, read, S)). valid_systemCall(Call) :Call \= open(_, _, _), Call \= system(_). call_system(Call) :built_ins:call_builtin(Call). call builtin/1 is a system predicate which carries out type checking on a call before executing it. For example, the call builtin/1 clause for open/3 is: call_builtin(open(FileName, Mode, Stream)) :atom(FileName), ( Mode = read ; Mode = write ), var(Stream), open(FileName, Mode, Stream). FileName must be an atom, Mode either read or write, and Stream a variable. Type checking increases the robustness of the system by preventing instantiation faults when the arguments are the wrong type. We briefly consider two examples that show the flexibility of security policies. 5.1 A Historical Policy State information can be used to implement a history-based policy. For example, the following policy lets a program carry out context switching (i.e. execute goals such as lw(get, URL)#>Goal) until a file is accessed. A file access is detected by having call system/1 monitor open/3 calls. file_accessed(no). % state information: no file has been accessed valid_program(_, _) :file_accessed(no). % only context switch when no % files have been accessed call_system(Call) :Call \= open(_, _, _), built_ins:call_builtin(Call). call_system(open(F, R, S)) :built_ins:call_builtin(open(F, (file_accessed(no) -> retract(file_accessed(no)), assert(file_accessed(yes)) ; true ). % process non-open/3 calls % process open/3 call R, S)), % record file access Once open/3 has been called, file accessed/1 will be changed to hold the value yes. This will cause subsequent calls to valid program/2 to fail, disabling context switching for the program. Secure Prolog Based Mobile Code 17 5.2 Levels of Trust It is straightforward to build policies with varying levels of trust for different programs. In the following example we use three levels: dangerous, ok, and safe. A ‘dangerous’ program cannot download any programs, or execute any system calls. An ‘ok’ program can download programs but it can only write to the directory /tmp and cannot use system/1 to delete files. A ‘safe’ program has no restrictions placed upon it, except that a message is printed out when a file deletion succeeds. Each level of trust is represented by a separate policy program. The policy program for ‘dangerous’: valid_program(_, _) :- fail. valid_systemCall(_) :- fail. call_system(_) :- fail. Any call that uses system resources will fail. The policy program for ‘ok’ is given as: valid_program(_, _). % no restrictions on downloads valid_systemCall(open(Path, write, _)) :!, append("/tmp/", _, Path). % only write to /tmp valid_systemCall(system(Cmd)) :append("rm ", _, Cmd), !, fail. % disallow file deletions valid_systemCall(_). % everything else allowed call_system(Call) :built_ins:call_builtin(Call). % no restrictions on execution The policy program for ‘safe’: valid_program(_, _). % no restrictions on downloads valid_systemCall(_). % all system calls permitted call_system(Cmd) :built_ins:call_builtin(Cmd), (append("rm ", _, Cmd) -> report_deletion(Cmd) ; true ). % report deletions when executed We could call report deletion/1 in valid systemCall/1 but reporting a file deletion has nothing to do with testing the validity of a system call; it is a diagnostic associated with execution. 6 Combining Security Policies A LogicWeb program must not be allowed to perform an illegal system operation by invoking a goal in a more privileged program. Hence, the security model must ensure the following: 18 S.W. Loke and A. Davison A B#>read_file(Contents) For B#>read_file(Contents), consult the policy of A. B ... read_file(Contents)... For read_file(Contents), consult the policy of A and that of B. Fig. 4. The invocation of B#>read file(Contents) in A. 1. Context switching must not transfer privileges between programs. The system has to ensure that an untrusted program does not illegally access resources by invoking a goal in a trusted program. For example, assume that a program P is not allowed to read a file (as determined by its policy) while another program Q can (as determined by Q’s policy). This means that P should not be able to call a goal like Q#>read file(Contents) to read a file. Clearly, it is too simplistic to validate a call to read file/1 in Q using only the policy of Q; the policy of P must also be considered. In a similar manner, a LogicWeb goal cannot be allowed to perform an illegal system operation because it is invoked in a trusted program. For example, if A can read a file which B can not, then the goal B#>read file(Contents) invoked in A should fail. This means that although A uses B, A should not pass its privileges to B, since the system trusts A but not B. Hence, the policies of both A and B must be consulted to determine if a read file/1 call should be allowed, as Figure 4 illustrates. When more than two programs are involved, a similar but slightly more complex situation arises. For example, consider a goal B#>(C#>G) invoked in the program A, where G is a system call. If G is allowed by the policies of A and C, but B does not permit G, then B is performing an illegal system operation through C. Essentially, disregarding any one of the policies potentially allows an illegal system operation. This means that to determine if G should be allowed, all the policy programs used by the code must be considered. Figure 5 shows the changes in goal evaluation contexts starting from the goal B#>(C#>G) in program A and ending with goal G in C. The policies of all the programs involved in the evaluation of the goal starting from the first program (i.e., A) are required. Hence, the proof rules for the security model must incorporate a notion of the current set of policy programs which grows as goal evaluation progresses. Secure Prolog Based Mobile Code 19 A ... B#>(C#>G) ... For B#>(C#>G), consult the policy of A. B C ... C#>G ... ... G ... For C#>G, consult the policy of A and that of B. For G, consult the policy of A, and that of B and of C. Fig. 5. The evaluation B#>(C#>G) in program A. 2. LW-compositions must not transfer privileges between programs. A LogicWeb program can invoke the clauses of another program in a LW-composition. For example, consider a goal G evaluated in the LW-composition of programs S and T: (S + T)#>G. G’s evaluation may utilise some clauses from S and some from T, so in general G must be allowed by both the policies for S and T. The observations made above can be made more formal by restating them using the LW-encapsulation and LW-intersection operators (@ and *). Namely, given a set of policies (e.g., {P,Q}), the allowable set of system calls and downloads are those permitted by the composition @P * @Q. LW-encapsulation is used to express that each policy must separately validate the system calls and downloads. LW-intersection is used to represent that a given system call or download must be permitted by every policy program. For example, an open/3 call is permitted by both P and Q when the following goal succeeds: ?- (@P * @Q)#>valid_systemCall(open(_,_,_)). 7 Enforcing Security Policies This section defines a new derivation relation, extending the operational semantics in §2.2.3 to use policy programs. Previously, a goal was evaluated in the current context, with the current set of created programs. In the new derivation relation, we also consider the current set of policy programs. The derivation relation is extended as follows: For any goal formula G and program expression E, ′ Σ, S, E ⊢S θ G denotes the fact that there exists a top-down derivation of G in E starting with the set S of existing LogicWeb programs and the ordered set of policy programs Σ, and ending with the computed answer substitution θ and created program set S ′ . 20 S.W. Loke and A. Davison The proof rules which define this new relation are an extension of the rules in §2.2.3. Rules (1) to (8) are modified to form corresponding rules for the new derivation relation by using the following syntactic mapping: Replace every occurrence of an expression involving the derivation relation: ′ S, E ⊢S θ G with the corresponding expression: ′ Σ, S, E ⊢S θ G For instance, the following rule is obtained by applying this mapping to rule (2) (conjunction): ′ ′′ Σ, S, E ⊢Sθ G1 ∧ Σ, S ′ , E ⊢Sγ G2 θ ′′ Σ, S, E ⊢Sθγ G1 , G2 The same set of policy programs Σ is used for each of the conjuncts since they occur in the same rule (and hence, in the same program). 7.1 Mapping from Programs to Policies To aid the discussion which follows, two functions are defined: one maps a LogicWeb program to its policy program, and the other relates a set of LogicWeb programs to their policy programs. Φ denotes the set of all policy programs used by the system. A policy program is permitted free access to system resources, and is not itself assigned a policy program. Definition 7.1 (policy program assignment) The function pol : (LW P rogramIDs \ ids(Φ)) → Φ takes a program identifier (which is not that of a policy program) and returns a policy program for that program from Φ. pol is not defined on policy programs, and the empty program ξ is not assigned a policy program. Definition 7.2 (policies for a set of programs) The function pols : ℘(LW P rogramIDs \ ids(Φ)) → ℘(Φ) takes a set of (non-policy) program identifiers I and returns the set of policy programs assigned to the programs in I. pols is defined by: pols(I) = {pol(i) | i ∈ I} 7.2 Context Switching Revisited *Σ@ denotes the LW-intersection of the LW-encapsulation of the policy programs in Σ (i.e., if Σ = {P1 , ..., Pn } then *Σ@ = @P1 *...* @Pn ), and G denotes a goal. Secure Prolog Based Mobile Code 21 Evaluating a goal against *Σ@ has the effect of evaluating the goal against each program in Σ separately. The new definition of the context switching rule (9) is: Σ 6= ∅ ∧  W here each lw(Typei, URLi) ∈ expids(F ′ ) \ ids(Φ), ′ ∅, S, ξ ⊢Sγ *Σ@ #>(valid program(Type1, URL1), . . . ,valid program(TypeN, URLN)) I ⊆ ids(S ′ ) ∧  ∧ ′′ (pols(I \ ids(Φ)) ∪ Σ), S ′ , F ′ ⊢Sθ G ′′ Σ, S, E ⊢Sθ F #> G (9’a) The new rule has been augmented with: i. A test to determine if each non-policy program to be used in the new context is allowed by the current set of policy programs Σ. The test is done by invoking the predicate valid program/2 in *Σ@ for each such non-policy program identified by lw(Typei, URLi) using a goal of the form: ′ ∅, S, ξ ⊢Sγ *Σ@ #>(valid program(Type1, URL1), . . . , valid program(TypeN, URLN)) N is the number of program identifiers in expids(F ′ ) \ ids(Φ). A LogicWeb goal is used when evaluating the valid program/2 goals in order to download the policy programs. Note that goal evaluation fails if not all the policy programs are downloaded. Also, a policy program can invoke non-policy programs in its rules, and the evaluation of the valid program/2 goals begins with an empty policy program set. The rule for the case where Σ is empty is given below. Note that we test all the programs in F ′ = insertCC(F, E) instead of F , which means that we test the programs in the current context as well. ii. An extension of Σ with new policy programs. New policy programs are added to the front (left) of the ordered set Σ: pols(I \ ids(Φ)) ∪ Σ The last (rightmost) program in the ordered set is, chronologically, the first policy program, and its significance is explained below. The following variant of the context switching rule caters for when Σ is empty. In that case, no policy programs are employed, no checks are made: I ⊆ ids(S ′ ) ∧ ′′ pols(I \ ids(Φ)), S ′ , F ′ ⊢Sθ G ′′ ∅, S, E ⊢Sθ F #> G (9’b) In (i), we applied valid program/2 to all the programs used in the goal’s program expression and all the programs in the current context. We illustrate why by considering an example: 22 S.W. Loke and A. Davison valid_program(get, ’A’). valid_program(get, ’B’). valid_program(get, ’C’) :- fail. % may be omitted but added for clarity If the goal ((A+B)*C)#>G is used in A then we would expect it to fail since A is not permitted to use B in context switching. Suppose instead that the goal was ((#)*C)#>G and the current context (as represnted by #) was A+B. The goal is equivalent to the earlier one; should it be permitted or not? If the goal is analysed by testing only C and ignoring the current context, then A would be allowed to use B in context switching, so violating A’s policy. However, this behaviour appears harmless since B must already have been retrieved if it is in the current context, and so its utilisation will require no additional resources. This would not be the case if the semantics of add programs in Definition 2.2 were different. Suppose that A’s use of B did result in the retrieval of a new version of B, then resources would be used. Or suppose that programs are only retrieved when their clauses are actually needed, and so B may not have been retrieved at the time of G’s evaluation. By conservatively testing the current context, we stay faithful to A’s policy: A cannot use B via context switching, regardless of whether B is downloaded. This design is more general since it makes the security model more tolerant of changes in the system’s download and storage mechanisms. Also, the intention of A’s policy is arguably to unconditionally bar A from using B via context switching. We could easily implement the less conservative view: namely that A cannot use B via context switching, unless B is already downloaded (or in the current context). A’s policy program would become: valid_program(get, ’A’). valid_program(get, ’B’). valid_program(get, ’C’) :- program_exists(’B’). program exists/1 is a LogicWeb built-in which succeeds if the specified program is in the local cache. 7.3 System Call Rules Two new rules called system call rules are added to specify how policy programs are utilised with system calls. The first rule specifies a test to determine if a goal is a valid system call. It invokes call system/1 in the last policy program in Σ, which is the policy for the main program of the application. This means that any state changes carried out by call system/1 (for instance, see the example in §5.1) will be done in the main program’s policy program. Σ 6= ∅ ∧ ′ ∅, S, ξ ⊢Sγ *Σ@ #>valid systemCall(G) ∧ Σ = Σ′ ∪ Pn ∧ ′′ ∅, S ′ , ξ ⊢Sθ Pn #>call system(G) ′′ Σ, S, E ⊢Sθ G (10’a) Secure Prolog Based Mobile Code 23 Substitutions resulting from calling valid systemCall/1 are discarded. Instead, the substitutions computed from call system/1 are kept. As before, proofs occurring in policy programs proceed with an empty policy program set. For the case where Σ = ∅, the rule is ′ ∅, S, E ⊢S γ built ins:builtin(G) ∧ ∅, S ′ , E ⊢S θ ∅, S, E ⊢S θ ′′ ′′ built ins:call builtin(G) G (10’b) A call to a built-in predicate in the module built ins is represented by: G succeeds with θ ∅, S, E ⊢Sθ built ins:(G) (11) The evaluation of the goal is outside the scope of the inference rules, but θ is assumed to be the computed answer substitution. 7.4 Properties of the Inference Rules We show how the inference rules disallow illegal system operations. First, context sequence and illegal system operation are defined. Goal derivation involving LogicWeb goals may result in several sequences of context switches, each represented by a sequence of contexts. For example, the sequence of contexts in Figure 5 is: A, B, C Note that the only operational semantic rules which change the context are the context switching rules (i.e. 9’a and 9’b). Definition 7.3 (context sequence) Given a sequence of applications of inference rules in a top-down derivation, suppose that there are n − 1 applications of the context switching rules. Further suppose that the ith application of these rules causes the context to switch from Ei to Ei+1 , where 1 ≤ i ≤ n − 1. The context sequence is the sequence of contexts E1 , . . . , En . Informally, given a context sequence E1 , . . . , En , an illegal system operation is performed in the context Ei if a system call, or the use of a program in context switching, is disallowed by the policy of some program in Ei , but is attempted in Ei or some later context. Definition 7.4 (illegal system operation) Given a context sequence E1 , . . . , En , for some Ei , P ∈ pols(expids(Ei ) \ ids(Φ)), i ≤ j ≤ n, and system call G, an illegal system operation is performed in Ei if the goal call system(G) is invoked when the context of G is Ej but ′ ∅, S, P ⊢Sθ valid systemCall(G) does not hold for any S, S ′ , and θ, or the oracle function is called on the identifier lw(Type, URL) when the current context is Ej ′ but ∅, S, P ⊢Sθ valid program(Type, URL) does not hold for any S, S ′ , and θ. The context switching rules guarantee that all policy programs which must be consulted during a derivation are present. 24 S.W. Loke and A. Davison Lemma 7.1 Given the context sequence E1 , . . . , En for a top-down derivation, for any i ∈ {1, . . . , n}, at the node with context Ei , the current set of policy programs Σ contains the policy programs of all the non-policy programs occurring in E1 , . . . , Ei . Proof The proof is by induction on i. For i = 1, the goal evaluation starts in the empty program ξ with Σ = ∅. For i ≥ 2, (by the inductive hypothesis) when the goal is evaluated in Ei−1 , Σ contains the policy programs of all the non-policy programs occurring in E1 , . . . , Ei−1 . Ei−1 changes to Ei using one of the context switching rules. This rule updates Σ (say, to Σ′ ) by adding to Σ the policy programs of the nonpolicy programs occurring in Ei . Hence, the goal evaluation continues in Ei with Σ′ containing all the policy programs for the non-policy programs in E1 , . . . , Ei . The theorem below implies soundness of the security model: all goals which have a successful derivation have the desired security property of not performing an illegal system operation. Theorem 7.1 (safety property) No illegal system operation is performed in any context during a top-down derivation using the above rules. Proof Given the context sequence E1 , . . . , En , for any i ∈ {1, . . . , n}, suppose that an illegal system operation was performed in Ei , say when the current context was Ej , where i ≤ j ≤ n, the set of policy programs was Σ, and the set of created programs was S. To perform this operation either (1) the system call rule for Σ 6= ∅ or (2) the new context switching rule for Σ 6= ∅ must have been used. In case (1), according to the definition of the system call rule used, since call system(G) was invoked, the goal: ′ ∅, S ∪ Σ, *Σ@ ⊢Sγ valid systemCall(G) must have succeeded. In case (2), suppose that the LogicWeb goal was F #>G and F ′ = insertCC(F, Ej ), and the oracle function was called on the identifier lw(Type, URL) ∈ expids(F ′ ) \ ids(Φ), then according to the definition of the context switching rule used, the goal: ′ ∅, S ∪ Σ, *Σ@ ⊢Sγ valid program(Type, URL) must have succeeded. But by the definition of an illegal system opera′ tion, for some P ∈ pols(expids(Ei ) \ ids(Φ)), in case (1), ∅, T, P ⊢Tθ valid systemCall(G) does not hold for any T , T ′ , and θ, and in case (2), ′ ∅, T, P ⊢Tθ valid program(Type, URL) does not hold for any T , T ′ , and θ. In either case, it must have been that P 6∈ Σ. By the above lemma, Σ contains the policy programs of all the non-policy programs occurring in E1 , . . . , Ej , namely, Σ ⊇ pols(expids(Ei ) \ ids(Φ)). This means P ∈ Σ, and hence there is a contradiction. Secure Prolog Based Mobile Code 25 8 Implementation 8.1 Interpreter with Security Mechanisms The inference rules presented above provide the basis for an interpreter for evaluating goals in the presence of policy programs. Program 1 shows this interpreter, which is an extension of the one described in (Loke and Davison 1998b). % demo/3 with LogicWeb goal demo(PL, E, F#>G) :establish_context(PL, F, E, PL, NPL, F1), demo(NPL, F1, G). demo(PL, E, G) :allowed_systemCall(PL, G), invoke_systemCall(PL, G). demo(_PL, P, built_ins:G) :pgpID_to_policyID(_, P), call(built_ins:G). demo(_PL, _E, true). demo(PL, E, (A, B)) :- demo(PL, E, A), demo(PL, E, B). demo(PL, E, A) :- select_clause(PL, E, (A :- B)), demo(PL, E, B). % establish a context establish_context(OPL, E + F, C, PL, PL2, E1 + F1) :establish_context(OPL, E, C, PL, PL1, E1), establish_context(OPL, F, C, PL1, PL2, F1). establish_context(OPL, E * F, C, PL, PL2, E1 * F1) :establish_context(OPL, E, C, PL, PL1, E1), establish_context(OPL, F, C, PL1, PL2, F1). establish_context(OPL, E / P, C, PL, PL2, E1 / P1) :establish_context(OPL, E, C, PL, PL1, E1), establish_context(OPL, P, C, PL1, PL2, P1). establish_context(OPL, @E, C, PL, PL1, @E1) :establish_context(OPL, E, C, PL, PL1, E1). establish_context(OPL, (/)<>(E, L), C, PL, PL2, (/)<>(E1, L1)) :establish_context(OPL, E, C, PL, PL1, E1), establish_contextL(OPL, L, C, PL1, PL2, L1). establish_context(OPL, Op<>L, C, PL, PL1, Op<>L1) :establish_contextL(OPL, L, C, PL, PL1, L1). establish_context(OPL, lw(T, U), _C, PL, NPL, lw(T, U)):allowed_program(OPL, lw(T, U)), download(T, U), add_policyID(lw(T, U), PL, NPL). establish_context(OPL, (#), C, PL, PL, C) :allowed_programs(OPL, C). establish_contextL(_OPL, [], _C, PL, PL, []). establish_contextL(OPL, [E|Es], C, PL, PL2, [E1|Es1]) :establish_context(OPL, E, C, PL, PL1, E1), establish_contextL(OPL, Es, C, PL1, PL2, Es1). % predicate to ensure that only allowed system calls are invoked allowed_systemCall([], G) :built_ins:builtin(G). allowed_systemCall([Pol|Pols], G) :demo([], empty, Pol#>valid_systemCall(G)), allowed_systemCall(Pols, G). Program 1. The interpreter for pure LogicWeb programs which use policy programs. 26 S.W. Loke and A. Davison % predicate to invoke system calls invoke_systemCall([], G) :built_ins:call_builtin(G). invoke_systemCall(PL, G) :last(P, PL), demo([], empty, P#>call_system(G)). % add a policy program ID to list of IDs add_policyID(Id, PL, PL) :pgpID_to_policyID(_, Id), !.% no policy program for policy programs add_policyID(Id, PL, NPL) :policyID(Id, NewPolicyId), (member(NewPolicyId, PL) -> NPL = PL ; NPL = [NewPolicyId|PL] ). % predicate to ensure that only allowed programs are downloaded allowed_program([], _Id). allowed_program([Pol|Pols], lw(Type, URL)) :demo([], empty, Pol#>valid_program(Type, URL)), allowed_program(Pols, lw(Type, URL)). % select a clause from the program store select_clause(_PL, lw(Type, URL), A :- B) :lw(Type, URL)::(A :- B). select_clause(PL, E + _F, A :- B) :select_clause(PL, E, A :- B). select_clause(PL, _E + F, A :- B) :select_clause(PL, F, A :- B). select_clause(PL, E * F, A :- (B,C)) :select_clause(PL, E, A :- B), select_clause(PL, F, A :- C). select_clause(PL, E / P, A :- B) :select_clause(PL, E, A :- B), not defined(A, P). select_clause(PL, @E, A :- true) :- demo(PL, E, A). select_clause(PL, (/)<>(E, []), A :- B) :select_clause(PL, E, A :- B). select_clause(PL, (/)<>(E, [P|Ps]), A :- B) :select_clause(PL, (/)<>[(E / P)|Ps], A :- B). select_clause(PL, _Op<>[E], A :- B) :select_clause(PL, E, A :- B). select_clause(PL, Op<>[E1,E2|Es], A :- B) :C =.. [Op, E1, E2], select_clause(PL, Op<>[C|Es], A :- B). defined(A, P) :functor(A, Functor, Arity), functor(H, Functor, Arity), P::(H :- _B). Program 1. (Continued) demo/3 is derived from a standard vanilla Prolog meta-interpreter (Sterling and Beer 1989; Sterling and Shapiro 1994), and executes a goal (the third argument of demo/3) against its program context (the second argument). The first argument of demo/3 stores the IDs of downloaded policy programs. In the first clause of demo/3, establish context/6 returns the new policy program identifiers for the programs in the new context. Secure Prolog Based Mobile Code 27 The second clause checks for and invokes an allowed system call. In allowed systemCall/2, valid systemCall/1 is invoked in each policy program. Policy programs known to the system are recorded in pgpID to policyID/2, which is described below. invoke systemCall/2 invokes the system call in the last program mentioned in the list of policy program identifiers (PL). This is the policy program for the main program, as mentioned earlier. The third clause of demo/3 allows policy programs to invoke goals in the Prolog module built ins. The last three clauses of demo/3 implement the basic meta-interpreter. select clause/3 in the final clause evaluates the goal A by looking for a suitable clause (A :- B) from the programs defined by the program expression E. The clauses of downloaded programs are held in the program store (see Figure 2) in the format lw(Type,URL)::(Clause). The interpreter is called using a goal such as: ?- demo([], empty, lw(get, "http://main.program")#>query). Goal derivation begins with the empty context without any policy programs and a goal where lw(get, "http://main.program") is the main program of an application. establish context/6 carries out several tasks. One of these is to expand the program expression F (which was part of a context switching goal F #>G), so that any context operators (#) in F are replaced by the current context. This results in a new program expression F1. Note that two copies of the original list of policy programs is passed into establish context/6 initially. The fourth and fifth arguments of establish context/6 represent the current extended list and the newly extended list respectively. Because the current extended list may not be the original and the security tests are done using the original, the extra copy is supplied. The last two clauses of establish context/6 relate to the security model. The penultimate clause checks a new program ID against the existing policies, and may download a new policy for that program, which causes the list of policies IDs (PL) to be extended. allowed program/2 checks a program ID (lw(T,U)) against the existing policies by calling valid program/2 against each policy in turn. This mimics the LWintersection of LW-encapsulated policies described earlier. add policyID/3 attempts to retrieve a policy ID for the specified program ID (lw(T,U)), and add it to the policy IDs list. This process is complicated by the possibility that the program ID may actually be a policy ID, which is ascertained by checking it against pgpID to policyID/2. However, if lw(T,U) is an ordinary LogicWeb program ID, then policyID/2 will contain a mapping from the program ID to its matching policy ID. How this is achieved will be explained shortly. The final clause of establish context/6 checks all the programs in the current context against the existing policies. This check is required only once, but for simplicity, we have permitted the code to perform this check every time a context operator (#) is encountered in a program expression. 28 S.W. Loke and A. Davison 8.2 Installing Programs The predicate for downloading a page and installing its corresponding LogicWeb program is given below. Its operation parallels the stages shown in Figure 3. download(Type, URL) :created(Type, URL), !. download(Type, URL) :retrieve(Type, URL, Contents), create_program(Type, URL, Contents), assign_policyID(Type, URL, Contents). % % % % % program already exists program does not exist retrieve from the Web create the program assign a policy program If the program stored at URL is not already present in the program store then its page is retrieved from the Web, converted to a program, and assigned a policy. The policy mechanism is located in assign policyID/3, which is defined as: assign_policyID(Type, URL, Contents) :(pgpID_to_policyID(_, lw(Type, URL)) -> % if policy program true % lw(Type, URL) is not assigned a policy program ; determine_policyID(URL, Contents, PolicyID), record_policyID(Type, URL, PolicyID) ). determine_policyID(URL, Contents, PolicyID) :(pgp_signed(URL) -> % if digitally signed authenticate(Contents, PGPID), % try authentication pgpID_to_policyID(PGPID, PolicyID) ; pgpID_to_policyID(unknown, PolicyID) ). record_policyID(Type, URL, PolicyID) :assert(policyID(lw(Type, URL), PolicyID)). assign policyID/3 tries to obtain a security policy for a downloaded (nonpolicy) LogicWeb program by calling determine policyID/3. It bases its search on the result of calling pgp signed/1 which checks if the contents of the downloaded page are digitally signed. It does this by inspecting the URL for the extension “.lwpgp.html”, which denotes a digitally signed LogicWeb program. If the program is signed then the signature is authenticated with authenticate/2. It invokes PGP’s authentication procedure on Contents, which contains the HTML text and its digital signature. This stage is depicted in Figure 3 in box B. PGP extracts the digital signature from Contents, and attempts to decrypt it to obtain an MD5 string by employing its collection of public keys. These keys must have been previously added to PGP by the LogicWeb administrator. On successful decryption, PGP checks the HTML text from Contents against the MD5 string, and returns the PGP ID labelling the key that decrypted the signature as PGPID. On authentication failure (i.e., if the signature is not decrypted or if the MD5 string does not match the HTML text), PGPID is instantiated to unknown. The signature ID returned by authenticate/2 is utilised by pgpID to policyID/2 to lookup a policy ID. A typical pgpID to policyID/2 fact: Secure Prolog Based Mobile Code 29 pgpID_to_policyID(’Seng W. Loke <[email protected]>’, lw(get, "http://www.cs.mu.oz.au/~swloke/my_policy.html"). The first argument is Seng Wai Loke’s PGP ID, and the second a policy program identifier. If the downloaded LogicWeb program is not signed then determine policyID/3 makes use of the default policy ID associated with the ‘unknown’ signature ID: pgpID_to_policyID(unknown, lw(get, "http://www.cs.mu.oz.au/~swloke/default_policy.html"). Back in assign policyID/3, the policy ID returned by determine policyID/3 is passed to record policyID/3. It asserts a policyID/2 fact which has as its first argument the LogicWeb program ID and its second is the matching policy ID. This fact can be used subsequently to map from a program ID to its policy. The fact is not asserted into the LogicWeb program itself since it must be impossible for a rogue program to redefine policyID/2. 9 Control of Resource Usage This section considers denial-of-service attacks by showing how it is possible to control an operation or resource with policy programs and meta-interpreters. 9.1 Resource Control Using Policy Programs Resource usage can be monitored by keeping contextual or state information within a policy program, allowing decisions about the utilisation of resources to be based on the execution history. For example, a limit can be imposed on the frequency of system calls. The following definition of call system/1 permits up to ten files to be opened at a time, thereby limiting the number of allocated file descriptors. 30 S.W. Loke and A. Davison call_system(P) :P \= open(_, _, _), P \= close(_), built_ins:call_builtin(P). call_system(open(F, R, S)) :open_count(N), N < 10, increment_open_count, built_ins:call_builtin(open(F, R, call_system(close(S)) :open_count(N), N > 0, decrement_open_count, built_ins:call_builtin(close(S)). % for non- open/3, close/1 calls % open a file % increment count of open files S)). % close a file % decrement count of open files increment open count/0 and decrement open count/0 update the value stored in open count/1. 9.2 Resource Control Using Meta-interpreters As pointed out in (Ousterhout et al. 1997), denial-of-service attacks are not as severe as other kinds of attack since the user can always hit the “kill key” and exit the system. However, the graceful termination of goal evaluation is preferable so that the system and application can at least continue running. Execution control can be readily incorporated into the system by using metainterpreters (Sterling and Beer 1989; Sterling and Shapiro 1994). Their use for loop checking and detecting resource limits is described below. 9.2.1 Loop Checking Our approach to loop checking uses two meta-interpreters. solve ad/2 evaluates a goal and also stores information about ancestor goals and the recursion depth. Program 2 shows a simplified version of solve ad/2 for pure Prolog. solve_ad(_Depth_Ancs, true). % evaluate true solve_ad(Depth-Ancs, (G1, G2)) :% evaluate conjunction solve_ad(Depth-Ancs, G1), solve_ad(Depth-Ancs, G2). solve_ad(Depth-Ancs, Goal) :% evaluate goal copy_term(Goal, CopyGoal), % make a copy of the goal clause(Goal, Body), % select a matching clause spy_point(Depth-Ancs, Goal), % insert a spy_point Depth1 is Depth + 1, % increment recursion depth solve_ad(Depth1-[CopyGoal|Ancs], Body). Program 2. A meta-interpreter for pure Prolog with an argument carrying the recursion depth and a list of ancestor goals. The purpose of the spy point/2 call will be explained shortly. The solve t/2 meta-interpreter terminates goal evaluation whenever some predefined termination condition becomes true. Such conditions are specified as Secure Prolog Based Mobile Code 31 terminate/1 clauses. solve t/2 also sets a termination flag to ‘terminated’ when a termination condition becomes true. Program 3 shows a simplified version of solve t/2 for pure Prolog. solve_t(true, _). % evaluate true solve_t(Goal, T) :terminate(Goal), !, % check termination conditions T = terminated. solve_t((G1, G2), T) :% evaluate conjunction solve_t(G1, T), (T == terminated -> true ; solve_t(G2, T) ). solve_t(Goal, T) :% evaluate goal clause(Goal, Body), solve_t(Body, T), (T == terminated, ! ; true). Program 3. A meta-interpreter for pure Prolog which checks for termination conditions. The next step is to combine these meta-interpreters with the LogicWeb demo/3 interpreter described in the previous section. Instead of invoking demo/3 directly, as in: ?- demo([], empty, LogicW ebGoal). it will be called nested inside the two meta-interpreters: ?- solve_t( solve_ad(0-[], demo([], empty, LogicW ebGoal)), _T ). solve ad/2 will record ancestor goals and recursion depth information about demo/3. solve t/2 can check for termination conditions by looking for suitable patterns in the spy point/2 calls in solve ad/2. For example: terminate(spy_point(Depth-Ancs, demo(_, E, G))) :( member(demo(_, E1, G1), Ancs), E = E1, % the goals are in the same context variant(G, G1), % and they are variants of each other write(’loop found’) ; Depth > 40, % recursion depth too large write(’maximum recursion depth exceeded’) ). demo( , E, G) is the current LogicWeb interpreter goal, Depth is the current recursion depth, and Ancs is the list of ancestor goals. Note that the condition E = E1 will not detect loops where the context grows indefinitely. To detect such loops, the size of the context can be compared against a preset limit. The essential utility of this approach is the relative ease of combining distinct 32 S.W. Loke and A. Davison meta-interpreters which monitor/control different aspects of the computation. Other loop checking techniques are studied in (Bol 1991). 9.2.2 Resource Limits The techniques from the last section can be easily utilised to monitor resource limits. We will measure two resources: the number of LogicWeb programs downloaded, and the number of clause applications. The first count will persist across different solve t/2 invocations, the second will be reset at each invocation of solve t/2. The necessary terminate/1 clauses for these measures are: terminate(invoked_builtin(download(_,_))) :program_count(N), N > 100, % permit up to 100 program downloads write(’maximum LogicWeb program count exceeded’). terminate(invoked_builtin(clause(_,_))) :retract(clause_count(N)), N1 is N + 1, assert(clause_count(N1)), (N > 500 -> % permit up to 500 clause applications writef(’maximum clause count exceeded’) ; !, fail ). This code assumes that solve ad/2 can deal with built-in predicates, which would require a minor extension to Program 2. The first terminate/1 clause monitors program downloads by looking for calls to the download/2 built-in. When there is such a call, program count/1 is checked to see if the number of programs downloaded exceeds 100. If it does then execution is terminated. The use of program count/1 would require a change to create program/3 (called by download/2) which translates a page into a program; it would also have to increment program count/1 each time a new program was created. The second terminate/1 clause restricts the number of clause applications by monitoring calls to the clause/2 built-in. The terminate/1 clause increments the number stored in clause count/1 until it exceeds 500. An oft-stated problem with nested meta-interpreters is the penalty incurred upon execution speed. In fact, the termination checks described here could be implemented more efficiently by directly modifying demo/3. However, multiple metainterpreters are less complex to understand than a single, monolithic piece of code. Also, they permit a compositional approach to implementing execution control: functionality is separately implemented and introduced. We also believe that the speed costs are relatively unimportant if the application carries out frequent Web requests, and hence spends most of its wall-clock execution time interacting with the Web. Moreover, partial reduction techniques for translating meta- Secure Prolog Based Mobile Code 33 interpreters into specialised forms can be explored to remove the levels of interpretation (Sterling and Shapiro 1994). 10 Comparisons with Security Models in Other Mobile Code Systems We review security models which share certain common features with LogicWeb. First, we consider security approaches in some interpreted languages, and then examine systems which utilise policy modules and authentication. 10.1 Security Models in Two Interpreted Languages 10.1.1 Safe-Tcl Tcl is an interpreted imperative language, and access to system resources is via permitted commands of the interpreter. In the Safe-Tcl security model (Ousterhout et al. 1997), security is enforced by making dangerous commands unavailable to scripts running in the safe interpreter. Potentially dangerous operations, such as opening sockets, can be carried out via wrappers or aliases. The wrappers ensure that the commands are used in a controlled manner (e.g., only socket connections to some hosts are permitted). The security model in LogicWeb is partly motivated by the Safe-Tcl approach: LogicWeb’s valid system calls correspond to Safe-Tcl commands, and call system/1 corresponds to wrappers for those commands. A safe interpreter in Safe-Tcl corresponds to the LogicWeb program interpreter with appropriate policy programs. However, the Safe-Tcl security model has no notion of authentication. Safe-Tcl allows programs running in different interpreters (each with its own security policy) to communicate. Such communication effectively composes the security policies of the programs, i.e. a program can use the privileges of other programs. The dangers of this are highlighted in (Ousterhout et al. 1997), but not solved in a structured way. In LogicWeb, the composition of policies do not violate safety criteria. 10.1.2 Java Applets A Java applet is transmitted in bytecode format, and then executed by an interpreter on the local host. This contrasts with Safe-Tcl and LogicWeb where source code is transferred. The LogicWeb system does not support concurrency or sophisticated GUI programming, and so its security model does not need to deal with multi-threading or screen resources (e.g., windows). The Java language enforces type safety by having the compiler ensure that class methods do not access memory in ways that are inappropriate for their type (Sun Microsystems, Inc 1997). LogicWeb programs are not explicitly typed and there is no class abstraction. However, type conversions (e.g., strings to atoms) are done via system calls, and so the dangers of type conversion are avoided at call time. There are two trust levels for classes in the current 34 S.W. Loke and A. Davison Java security model: trusted classes are local and part of the Java system, while untrusted classes are ones that are downloaded. Multiple levels of trust are possible with signed LogicWeb programs. Security for Java applets, as implemented in Microsoft’s Internet Explorer 3.0 and Netscape Navigator 3.0, disallows applets from reading from or writing to local files, or establishing network connections except to the originating host. However, there are ways around these problems, including the use of server-side databases and proxy servers. The digital signing of JAR (Java ARchive) files, as supported in JDK 1.1.52 , bundles Java code and related files together into one file (Sun Microsystems, Inc 1997). In a similar way, a collection of programs making up a LogicWeb application can be bundled, signed, and transported as one archive file. Microsoft Internet Explorer 4.0 now allows finer grained control over the capabilities granted to Java code, such as access rights to local files and network connections (Microsoft Corporation 1999a; Microsoft Corporation 1999b). This is done by including a list of capabilities requested by the applet in the applet’s signature. Approval for the capabilities are either pre-set or given via user dialog. The implementation prevents transfer of privileges between classes in a similar way to our model: if a class has not been directly granted a capability, it cannot obtain that capability regardless of its caller’s capabilities. A class without a capability cannot gain that capability by invoking a more privileged class. 10.2 Security Policy Modules in Two Mobile Code Systems 10.2.1 SERC’s Safer Erlang (SSErl) The security mechanism in LogicWeb was motivated by the policy modules used in SSErl, a functional declarative language for programming concurrent and distributed systems (Brown 1997a; Brown 1997b). In the SSErl framework, a policy module is not associated with a particular program as in LogicWeb, but with a SSErl node, a platform where multiple processes may run concurrently. System operations are performed via built-in functions. A policy module specifies the allowable built-in functions for all the processes running at a node. In contrast to SSErl, execution of LogicWeb programs is single-threaded, although the thread of execution can proceed from one program to another. At any one time, at most one LogicWeb application is running. The overall policy for the running application is represented by the current set of policy programs, and is determined dynamically since it is generally not possible to determine a priori which programs an application will use. 10.2.2 Java Aglets The Aglet workbench (Karjoth et al. 1997) allows Java programs (called aglets) to be transferred between hosts as mobile agents. A specialised language for writ2 JDK 1.1.5 (final version) is available at http://java.sun.com/products/jdk/1.1/. Secure Prolog Based Mobile Code 35 ing aglet security policy modules has been proposed which makes use of specific roles such as the aglet’s manufacturer, owner, execution platform (e.g., the URL of the host), and domain. In the LogicWeb implementation, the assignment of policy programs is currently based solely on a program’s signature (as implemented by determine policyID/3 in §8.2). 10.3 Authentication in Two Mobile Code Systems 10.3.1 Agent Tcl Programs are authenticated with PGP in Agent Tcl (Gray 1996). PGP is invoked externally in the same way as in LogicWeb, thereby keeping the Agent Tcl system simpler and more flexible (the encryption mechanism can be easily replaced). Depending on the identity of the agent’s owner, an Agent Tcl program is assigned resources such as CPU time, windows, the file system, external programs, and network connections. 10.3.2 ActiveX ActiveX controls (Ernst 1996) are programs (in native x86 code) that can be executed on the client-side in Web pages. A digital signature is attached to each ActiveX control which identifies the control’s author. The advantage of a signature is that since the author is known, an ActiveX control is permitted more freedom to access resources. Unlike a LogicWeb program, which is sandboxed by policy programs and metainterpreters, a trusted ActiveX control is not restricted in any way and has access to all operating system services. Since an ActiveX control is native code, a suitable sandbox mechanism may be more difficult to implement (Object Management Group 1999). 11 Summary and Future Work Security is a major concern for any system that executes downloaded code. This paper has described a security model for LogicWeb which protects the client host from integrity, privacy, and denial-of-service attacks. The security model is specified using proof rules in the operational semantics of the language. This specification permits a straightforward proof of the soundness of the model with respect to illegal system operations. Resource control of predicates invoked at the application level is carried out using policy programs. Resource control of programs using resource counts and loop checking is performed by meta-interpreters. Authentication provides varying trust levels, and different policy programs define resource access for the different trust levels. The security model dynamically extends the LogicWeb system with selected policy programs. Since policy programs are separate from the system (and integrated only on-demand) they are a convenient means for imposing consistent security restrictions on multiple hosts. For example, similar Intranet-wide security restrictions 36 S.W. Loke and A. Davison can be imposed on a group of hosts by having them download the same policy programs (which, if needed, can be specialised by being composed with host-specific policies). As noted in (Ousterhout et al. 1997), it may be difficult to distinguish between legitimate behavior and denial-of-service attacks. For instance, it is easy to introduce resource bounds but difficult to state appropriate values for those bounds. If a value is too low, a useful task may be terminated prematurely; if too high, resource wastage occurs. A possible solution to this dilemma is to involve the user’s judgment by providing query-the-user facilities via a meta-interpreter. The user could also utilise trace information supplied by the meta-interpreter to detect unwanted behavior, such as the movement of data between sites using the host’s resources. Some Prolog systems, such as SICStus Prolog, have a time-out facility for goal evaluation – the goal is terminated if its evaluation exceeds a given duration (Intelligent Systems Laboratory, Swedis This can be incorporated as a hard limit after other checks in our meta-interpreters: ?- time_out(solve_t(solve_ad(0-[], demo([], empty, LogicW ebGoal)), _T), Time, Result). time out/3 terminates the execution of solve t/2 after Time milliseconds, with Result being set to timeout or success. Policy programs could be allocated based on the more general idea of credentials instead of digital signatures alone. For instance, a program might be allowed certain privileges not only because of its signature, but because it had sufficient advocates. Recent work by Seamons et al (1997) on using Prolog to encode digital credential acceptance policies and their verification logic could be exploited. Policy programs simplify the administration of privileges to applications. Our policy assignment depends solely on the digital signature of the LogicWeb program. A more flexible method would involve multiple roles such as the program’s manufacturer, owner, execution platform, or domain. For instance, suppose we trust particular domains (or URLs) and assume that data transfer is not intercepted and modified. We can assign policies based on the domains or URLs of the LogicWeb programs, regardless of whether they are signed. We modify determine policyID/3 of §8.2 as follows: safe("http://www.cs.mu.oz.au/~swl"). safe("http://www.cs.ait.ac.th/~ad"). % trusted URLs determine_policyID(URL, _Contents, PolicyID) :- % safe URLs get a standard policy safe(URL), !, PolicyID = lw(get, "http://www.policyforthetrusted.com"). determine_policyID(URL, Contents, PolicyID) :- % check signature for everything else (pgp_signed(URL) -> authenticate(Contents, PGPID), pgpID_to_policyID(PGPID, PolicyID) ; pgpID_to_policyID(unknown, PolicyID) ). Domain or zone-based policy assignment can be implemented this way. Secure Prolog Based Mobile Code 37 LW-composition operators could be used to create policies from dynamically composed programs. For instance, assume that the program at http://www.usedownloadedpgms.com stores the clause: valid program(X) :- program_exists(X). determine policyID/3 can be modified to always combine this policy with the one being downloaded: determine_policyID(URL, Contents, Policy) :(pgp_signed(URL) -> authenticate(Contents, PGPID), pgpID_to_policyID(PGPID, PolicyID) ; pgpID_to_policyID(unknown, PolicyID) ), Policy = lw(get,"http://www.usedownloadedpgms.com")+PolicyID. % combine policies We have only considered policy programs created by the user of the LogicWeb system. If policies could be created by other parties, authentication would then become necessary for policy programs in addition to ordinary LogicWeb programs. A limitation of our model is that the system must contain all the public keys required for the authentication of incoming programs. An automatic distribution mechanism for PGP public keys is needed. For example, the LogicWeb system could extract required public keys from homepages given their URLs, or could query Internet PGP public key servers3 (Garfinkel 1995). But this requires that the information be trusted, has not been tampered with, and is reliable. The use of credentials, i.e. certification by other authorities, would be required. The LogicWeb security model is conservative in that a trusted program is not allowed to transfer its privileges to an untrusted program it is using. Besides resource usage privileges, another kind of privilege could be introduced: the right to transfer privileges. This would be useful when the system did not know the signatories of all the programs that a trusted program utilised. The policy program would have to specify which privileges were transferable, and whether the right to transfer privileges was itself transferable. References Bol, R. 1991. Loop Checking in Logic Programming. Ph.D. thesis, CWI, Amsterdam, The Netherlands. Brogi, A. 1993. Program Construction in Computational Logic. Ph.D. thesis, Universita di Pisa-Genova-Udine. Brown, L. 1996. Mobile Code Security. Tech. rep., Australian Defence Force Academy, Canberra, Australia. TR - CS07/96. September. Presented to AUUG96, Melbourne, Australia and available at <http://www.adfa.oz.au/~lpb/TR/mcode96.html>. Brown, L. 1997a. Custom Security Policies in SSErl (DRAFT). Available at <http://www.adfa.oz.au/~lpb/TR/ssp97/sserl pol97.html>. 3 A PGP public key server is located at http://www-swiss.ai.mit.edu/~bal/keyserver.html. 38 S.W. Loke and A. Davison Brown, L. 1997b. Introducing SERCs Safer Erlang (DRAFT). <http://www.adfa.oz.au/~lpb/TR/ssp97/sserl97a.html>. Available at Cugola, G., Ghezzi, C., Picco, G., and Vigna, G. 1997. Analyzing Mobile Code Languages. In Mobile Object Systems: Towards the Programmable Internet (Lecture Notes in Computer Science No. 1222). Springer-Verlag, 93–110. Dean, D., Felten, E., and Wallach, D. 1996. Java Security: From HotJava to Netscape and Beyond. In Proceedings of the 1996 IEEE Symposium on Security and Privacy. Oakland, California, U.S.A., 190 – 200. Available at <http://www.cs.princeton.edu/sip/pub/secure96.html>. Drossopoulou, S. and Eisenbach, S. 1998. Towards an Operations Semantics and Proof of Type Soundness for Java. Available at <http://outoften.doc.ic.ac.uk/projects/slurp/pubs/LNCSJavaSem.ps.Z>. Ernst, W. 1996. Presenting ActiveX. Sams.net. Garfinkel, S. 1995. PGP: Pretty Good Privacy. O’ Reilly and Associates, Inc. Gray, R. 1996. Agent Tcl: A Flexible and Secure Mobile-agent System. In Proceedings of the 4th Annual Tcl/Tk Workshop (TCL 96), M. Diekhans and M. Roseman, Eds. Monterey, California, U.S.A. Available at <http://www.cs.dartmouth.edu/~agent/papers/tcl96.ps.Z>. Intelligent Systems Laboratory, Swedish Institute puter Science. 1996. SICStus Prolog User’s Manual. <ftp://ftp.sics.se/archive/sicstus3/sicstus.ps.gz>. of ComAvailable at Jensen, T., Mtayer, D. L., and Thorn, T. 1998. Security and Dynamic Class Loading in Java: A Formalisation. In Proceedings of the IEEE International Conference on Computer Languages. Illinois, U.S.A. Available at <ftp://ftp.irisa.fr/local/lande/tjdlmtt-iccl98.ps.gz>. Karjoth, G., Lange, D., and Oshima, M. 1997. A Security Model for Aglets. IEEE Internet Computing 1, 4 (July/August). Available at <http://www.computer.org/internet/ic1997/w4toc.htm>. Leroy, X. and Rouaix, F. 1998. Security Properties of Typed Applets. In Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. San Diego, California, U.S.A. Loke, S. and Davison, A. 1997. A Two-level World Wide Web Model with Logic Programming Links. In Proceedings of the 2nd Workshop on Logic Programming Tools for Internet Applications (in conjunction with the 14th International Conference on Logic Programming), K. De Bosschere, M. Hermenegildo, and P. Tarau, Eds. 41 – 54. Available at <http://clement.info.umoncton.ca/~lpnet/proceedings97/loke.ps>. Loke, S. and Davison, A. 1998a. LogicWeb: Enhancing the Web with Logic Programming. Journal of Logic Programming 36, 3 (September), 195 – 240. Loke, S. and Davison, A. 1998b. The Implementation of a System for Declarative Mobile Code and Web Querying. In Proceedings of the 11th International Conference on Applications of Prolog. 197 – 204. Loke, S., Davison, A., and Sterling, L. 1996a. Lightweight Deductive Databases on the World Wide Web. In Proceedings of the 1st Workshop on Logic Programming Tools for Internet Applications (in conjunction with the Joint International Conference and Symposium on Logic Programming), P. Tarau, A. Davison, K. De Bosschere, and M. Hermenegildo, Eds. Bonn, Germany, 91 – 106. Available at <http://clement.info.umoncton.ca/~lpnet/lp-internet/lwddbs/lwddbs.html>. Loke, S., Davison, A., and Sterling, L. 1996b. CiFi: An Intelligent Agent for Citation Finding on the World Wide Web. In Topics in Artificial Intelligence, Proceedings of Secure Prolog Based Mobile Code 39 the 4th Pacific Rim International Conference on Artificial Intelligence (Lecture Notes in Artificial Intelligence No. 1114). 580 – 592. Meseguer, J. and Talcott, C. 1997. Rewriting Logic and Secure Mobility. In Proceedings of Foundations for Secure Mobile Code Workshop. Available at <http://www.cs.nps.navy.mil/research/languages/statements/meseguer.ps>. Microsoft Corporation. 1999a. Microsoft Security Management Architecture White Paper. Available at <http://microsoft.com/ie/security/?/ie/security/ie4security.htm>. Microsoft Corporation. 1999b. Trust-Based Security for Java. Available at <http://www.microsoft.com/java/security/jsecwp.htm>. Object Management Group. 1999. Comparing ActiveX and CORBA/IIOP. Available at <http://www.omg.org/library/activex.html>. Ousterhout, J., Levy, J., and Welch, B. 1997. The Safe-Tcl Security Model. Tech. rep., Sun Microsystems Research Lab. March. Available at <http://www.sun.com/research/techrep/1997/smli tr-97-60.pdf>. Seamons, K., Winsborough, W., and Winslett, M. 1997. Internet Credential Acceptance Policies. In Proceedings of the 2nd Workshop on Logic Programming Tools for Internet Applications (in conjunction with the 14th International Conference on Logic Programming), K. De Bosschere, M. Hermenegildo, and P. Tarau, Eds. 13 – 27. Available at <http://clement.info.umoncton.ca/~lpnet/proceedings97/winsborough.ps>. Sterling, L. and Beer, R. 1989. Metainterpreters for Expert System Construction. Journal of Logic Programming 6, 1 & 2 (January/March), 163–178. Sterling, L. and Shapiro, E. 1994. The Art of Prolog. MIT Press. Sun Microsystems, Inc. 1997. Secure Computing with Java: Now and the Future (Executive Summary). Available at <http://www.javasoft.com/marketing/collateral/security.html>. Thorn, T. 1997. Programming Languages for Mobile Code. ACM Computing Surveys, 213 – 239. Vitek, J. and Tschudin, C., Eds. 1997. Mobile Object Systems: Towards the Programmable Internet (Lecture Notes in Computer Science No. 1222). Springer-Verlag. Volpano, D. 1997. Provably-Secure Programming Languages for Remote Evaluation. In Proceedings of Foundations for Secure Mobile Code Workshop. Available at <http://www.cs.nps.navy.mil/research/languages/statements/necula.ps>.
6cs.PL
Controllability Gramian Spectra of Random Networks arXiv:1609.04727v1 [cs.SY] 15 Sep 2016 Victor M. Preciado∗ & M. Amin Rahimian Abstract—We propose a theoretical framework to study the eigenvalue spectra of the controllability Gramian of systems with random state matrices, such as networked systems with a random graph structure. Using random matrix theory, we provide expressions for the moments of the eigenvalue distribution of the controllability Gramian. These moments can then be used to derive useful properties of the eigenvalue distribution of the Gramian (in some cases, even closed-form expressions for the distribution). We illustrate this framework by considering system matrices derived from common random graph and matrix ensembles, such as the Wigner ensemble, the Gaussian Orthogonal Ensemble (GOE), and random regular graphs. Subsequently, we illustrate how the eigenvalue distribution of the Gramian can be used to draw conclusions about the energy required to control random system. Index Terms—Controllability; Gramian spectrum; Complex Networks; Random graphs; Random matrix theory. I. I NTRODUCTION Controllability is a classical tool in systems theory, as developed by Kalman et al. [1]. More recently, controllability of complex networked systems has attracted much attention, beginning with the study of leader-follower multi-agent systems in [2], [3], [4], [5], [6], followed by several works considering the network controllability problem in special topologies such as paths [7], circulant networks [8], grids [9], distance regular graphs [10], and networks-of-networks [11], as well as works which employ the concept of structural controllability in networked settings such as [12], [13], [14]. The concept of controllability is closely related to the minimum energy needed to steer a linear system through its state space [1], [15], [16]. In particular, the minimum input energy needed to drive the system from an initial to a desired state can be expressed in terms of the inverse of the controllability Gramian matrix, which we denote by W [17], [16]. This relationship has motivated several Gramianbased metrics to quantify the energy required to steer a system, such as the trace of the Gramian inverse tr(W −1 ), the inverse of the minimum eigenvalue 1/λmin (W ), or − log(det(W )), [16]. These measures have found recent applications in the analysis and design of networked control systems [18], [19], [20]. These energy control metrics are closely related to the Gramian eigenvalue spectrum, which is the central topic of our work. In this paper, we focus our attention on the eigenvalue spectrum of the controllability Gramian of systems with random state matrices. In this case, the controllability Gramian is also a random (symmetric) matrix with random (real) eigenvalues following a probability distribution, called the Gramian spectral distribution. The study of the eigenvalues ∗ The authors are with the Department of Electrical and Systems Engineering, University of Pennsylvania, Philadelphia, PA 19104-6228 USA. (email: [email protected]). This work was supported by the National Science Foundation under grants CNS-1302222 and IIS-1447470. of random matrices started in the pioneering work of Wigner [21], [22], Mehta and Gaudin [23], and Dyson [24], and has attracted a great deal of attention since then. Over the last decades, random matrix theory has become a mature field and found applications in a wide variety of disciplines [25], [26]. A particularly relevant application of random matrix theory can be found in the study of the eigenvalues of random graph models [27], [28], [29], [30]. In this direction, many graphrelated matrices—such as the adjacency, the Laplacian, and the normalized Laplacian—have been widely studied in the literature. In contrast, theoretical results about the eigenvalues of the controllability/observability Gramians of random graphs and matrices are very scarce. The are only a few works that attempt to address some aspects of this problem [31], [32], [33]. The author in [31] introduces a stochastic notion of controllability for jump systems, where the state and input matrices vary between N designated matrix pairs and the variations follow a Markov process. Accordingly, the linear jump system is controllable if transitions between any two states occur with positive probability and in an almost surely finite length of time; variations of this definition when the transitions occur with probability one and the required time-span has finite expectation are also considered, and an algebraic criterion for stochastic controllability is expressed as a rank condition on the N state and input matrix pairs. Parallel results are derived in [32], but for the case where the state matrix is given by the Laplacian of a random graph process. In [33] the authors address related observability problems by investigating the recovery of sparse initial states using independent and randomly populated measurement matrices and under certain conditions on the state transition matrix. In this paper, we study the Gramian spectral distribution of random systems, paying special attention to the Gramian spectral moments (defined as the moments of the eigenvalue distribution). In particular, we establish a connection between the spectral moments of the (random) state matrix of a system and the spectral moments of its (random) controllability Gramian. We then exploit this connection to derive closedform expressions for the Gramian spectral distribution of important random matrices, such as Wigner matrices, the Gaussian Orthogonal Ensemble (GOE), or random regular graphs. From the Gramian spectral distribution, we then draw conclusions about the energy required to steer a random system and study how this energy is affected by the system parameters and the dimension of the state space. The paper is organized as follows. Notation and preliminary results are provided in Section II. Our main results are stated in Section III and proofs are included in Appendix A. Illustrative examples and additional discussions are presented in Section IV and the paper is concluded in Section V. II. N OTATION & P RELIMINARY R ESULTS Notation.: Throughout the paper, R is the set of real numbers, boldface letters denote random variables, E{·} is the expectation operator, vectors are denoted by a bar over their respective lower-case letters, matrices are denoted by upper case letters, T denotes matrix transpose and In is the n × n identity matrix. We use ∼ to indicate asymptotic equivalence (n) = 1. as n → ∞, i.e., f (n) ∼ g(n) indicates that limn→∞ fg(n) A. The Method of Moments Let us consider a random system characterized by the matrix pair (An , Bn ), where An is a random n × n state matrix and Bn is an input matrix. We investigate the limiting distribution of the eigenvalues of the controllability Gramian associated with the matrix pair (An , Bn ) as n → ∞. It is noted in [34], [35] that the required control energy can increase unbounded with the growing network size, unless Bn = In ; hence, we restrict attention to the case Bn = In . We also assume that An is symmetric1 . Given an n × n symmetric random matrix C, let λ1 (C) ≤ λ2 (C) ≤ . . . ≤ λn (C) be n random variables representing the n real eigenvalues of An . We Pn consider the random probability measure LC {·} = n1 i=1 δλi (C) {·}, δλi (C) being Dirac’s delta function centered at λi (C), as the random probability measure on the real line that assigns mass uniformly to each of the n eigenvalues of the random matrix C. The corresponding distribution Fn (x) = LC {(−∞, x]} = n1 |{i ∈ [n] : λi (C) ≤ x}|, is a random variable for each x ∈ R and is referred to as the empirical spectral distribution (ESD) for the random matrix C. The k-th spectral moments of a random matrix C is the k-th moment of its spectral These moments can be written as mk (C) := Pn density. 1 k λ (C) [25]. In our derivations, we also make use i=1 i n of the centralized Pn spectral moments, which are defined as m e k (C) := n1 i=1 (λi (C) − m1 (C))k . In this paper, we will use the method of moments to derive the limiting spectral distributions of the controllability Gramians herein considered. According to this method, when dealing with compactly supported distributions (as will be the case for us), one can show that a sequence of empirical spectral distributions Fn (·) converges in probability to some limiting distribution F (·) by showing that R +∞thek sequence of expected moments for Fn (·), given by { 0 x dFn (x), k ∈ N}, converges point-wise (for every k) to the corresponding moments R +∞ of F (·), given by { 0 xk dF (x), k ∈ N} [26, Theorem 2.2.9 and Section 2.4.2]. In the following subsections, we describe two particular random matrices that will be useful to illustrate our results. B. Random Wigner Matrices: Semicircle Law A Wigner matrix An is a random matrix where the entries above the main diagonal are i.i.d. zero-mean with identical variance σ 2 . In his seminal papers [21], [22], Eugene Wigner 1 More general input and state matrices, such as random input matrices and non-symmetric state matrices, are considered in an upcoming extended version of this paper. √ proved that the empirical spectral distribution of (1/ n)An converges (in probability) to the semicircular density given by 1 p 2 4σ − x2 , (1) fSC (x) = 2πσ 2 for x ∈ [−2σ, 2σ] and fSC (x) = 0, otherwise. The even-order moment of the semi-circular distribution are given by mSC 2j =  σ 2j 2j ; odd-order moments are zero. In fact, for this result to j+1 j hold we do not need the variables to be identically distributed and the result continues to hold for independent zero-mean entires with common variance σ 2 [36], under certain mild conditions on higher-order moments. An important special case of Wigner’s random matrix is the Gaussian Orthogonal Ensemble (GOE), in which the off-diagonal entries are real Gaussian variables with mean zero and variance σ 2 . The diagonal entries are real Gaussian variables with mean zero and variance σ 2 /2. We will use this particular ensemble to illustrate our results in Section IV. C. Random Regular Graphs: McKay Law Consider a random graph drawn uniformly over the space of all undirected d-regular graphs on n vertices, where we assume d > 2. As n → ∞, the empirical spectral distribution of the adjacency matrix of a random d-regular graph converges in probability to the McKay law [37], whose density is given by p d 4 (d − 1) − x2 , fM K (x) = 2π (d2 − x2 ) √ for |x| ≤ 2 d − 1, and fM K (x) = 0, otherwise. The moments of the McKay distribution are given by k/2   X k k − 2r + 1 r MK (d − 1) , (2) mk = k − r + 1 r r=1 for k even, and 0 for k odd. In our derivations, we shall also make use of the centralized spectral moments of the Laplacian matrix. Let Cn be the (random) adjacency matrix of the graph (i.e., [Cn ]ij = 1 if nodes i and j are connected, and 0 otherwise). For a random d-regular graph, the Laplacian matrix can be written as Ln = dIn −Cn . One can easily prove that the centralized spectral moments of the Laplacian satisfy K E{m e k (Ln )} ∼ mM as n → ∞, in the case of random dk regular graphs. This fact will be useful in future derivations. III. M OMENT-BASED C HARACTERIZATION OF THE G RAMIAN S PECTRUM Consider a discrete-time (DT) linear time-invariant system x [t + 1] = An x[t] + Bn u[t], where Bn = In , An is an n × n random symmetric matrix, and u[t] ∈ Rn . Assuming An is Schur stable and symmetric, the discrete-time controllability Gramian is an n × n symmetric random matrix given by Wd = ∞ X τ =0 Aτn (ATn )τ = (In − A2n )−1 . Similarly, for a continuous-time (CT) linear time-invariant d system described by dt x(t) = An x(t) + u(t), when An is an n × n Hurwitz stable, symmetric random matrix the continuous-time controllability Gramian Wc is given by Z ∞ Z ∞ T e2An τ dτ eAn τ eAn τ dτ = Wc = 0 0 n Z ∞ exp (2λi (An ) τ )dτ VT , (3) = Vdiag 0 i=1 where in last equality we use the fact that An is symmetric and, therefore, orthogonally diagonalizable. In the following subsections, for both random discretetime and continuous-time systems, we first provide theorems to relate the spectral moments of the state matrix An to the spectral moments of the controllability matrix. Since the spectral moments of An are well-understood for a number of random matrix ensembles, our result allows us to calculate the spectral moments of the controllability Gramian. Finally, using the method of moments, we will characterize and completely determine the limiting spectral distribution of the Gramian matrix for a number of well-known random matrix ensembles. A. Gramian of Random Discrete-Time Systems In the following lemma, we provide a useful relationship between the moments of the state matrix An and the moments of the associated controllability gramian Wd for random discrete-time systems. Lemma 1 (Spectral Moments of DT Gramian). Let An be an n × n symmetric, Schur-stable state matrix with spectral moments given by mk := mk (An ) for k ∈ N. Then, the spectral moments of the controllability Gramian of the discrete-time system (An , In ) are given by  ∞  X j+k−1 m2j . (4) mk (Wd ) = k−1 j=0 We will prove the above lemma in Appendix A. Lemma 1 can be used to, for example, characterize the Gramian spectrum when the state matrix √ An is a Wigner random matrix. In particular, let An = (1/ n)Hn where Hn is a Wigner random matrix with the second moment satisfying σ < 1/2. Then, explicit expressions for the spectral moments of the Gramian and the Gramian spectrum are given in the following theorem: Theorem 1 (The Wigner Ensemble). Consider a DT system with state matrix An = √1n Hn , where Hn is a Wigner random matrix with independent zero-mean entries and common variance σ 2 < 1/4, and the identity input matrix, Bn = In . Then, the expected spectral moments of the controllability Gramian Wd are asymptotically given by 1 mk (Wd ) ∼ 2 F1 ( , k; 2, 4σ 2 ), 2 (5) where 2 F1 (a, b; c; z) is the hyper-geometric function2 . Furthermore, the limiting spectral distribution of Wd is characterized by the following density function ( q 1 1 4σ 2 x−x+1 , if x ∈ [1, 1−4σ 2 x2 2 ]. 2πσ x−1 (6) fW (x) = 0, otherwise. While proving Theorem 1 in Appendix B, we provide a series of tools that can be directly applied to many other random matrix ensembles, as soon as they are Hurwitz stable. In the particular case treated in Theorem 1, the assumption σ 2 < 1/4 guarantees the matrix ensemble An to be Hurwitz stable. We now develop parallel results for random systems in the continuous-time case. B. Gramian of Random Continuous-Time Systems Similarly to Subsection III-A, we first provide a lemma (proved in Appendix C) that allows us to calculate the asymptotic spectral moments of the Gramian from those of the state matrix An . We then apply this result to study the Gramian of a system whose state matrix is related to the Laplacian of a random regular graph. Lemma 2 (Spectral Moments of the CT Gramian). Let An be an n × n symmetric, Schur-stable state matrix with spectral moments given by mk := mk (An ) and centralized e k := m spectral moments given by m e k (An ) for k ∈ N. Then, the spectral moments of the continuous-time controllability Gramian Wc are given by:  ∞  ej 1 X −k m mk (Wc ) = . (7) (−2)k j=0 j (m1 )k+j In what follows, we illustrate the usage of Lemma 2 by considering the Laplacian matrix of a random d-regular graph, described in Subsection II-C. Since the Laplacian matrix is marginally stable (has an eigenvalue at zero), the Gramian of the continuous-time system (−Ln , In ) is illdefined. To overcome this issue, we use a stabilized version of the Laplacian dynamics, where the state matrix is given e n := −Ln − d 11T . Notice that this matrix by An = −L n is not singular for connected graphs; thus, the Gramian of e n , In ) is well-defined and satisfies (3). The the system (−L following theorem, proved in Appendix D, provides explicit expressions for the spectral moments of the Gramian and the Gramian spectrum. Theorem 2 (Random Regular Graphs). Consider a CT system e n , where with input matrix In and state matrix An = −L e Ln is the stabilized Laplacian matrix of a random d-regular graph with n nodes and d ≥ 3. Then, the asymptotic expected spectral moments of the controllability Gramian Wc are given 2 The 2 F1 hyper-geometric function is defined for |z| < 1 by the power series P (q)j (b)j z j (q, b; c; z) = ∞ , where (q)j = q(q + 1) . . . (q + j − 1). j=0 (c) j! j by  ∞  1 X 2j + k − 1 −2j M K mk (Wc ) ∼ d m2j , (2d)k j=0 2j (8) K where mM are the spectral moments of the McKay law, 2j defined in (2). Furthermore, the limiting spectral density of Wc is given by q  1 2 d 4 (d − 1) − d − 2x 1 , (9) fL (x) =  1 2 4πx2 d2 − d − 2x h i for x ∈ 2d+41√d−1 , 2d−41√d−1 , and fL (x) = 0, otherwise. IV. E XAMPLES To illustrate the applicability of our results we consider two special cases where the state matrices are given by well-known random matrix and graph models. Example 1. Gaussian-weighted Erdős-Rényi Ensemble To illustrate our results, we consider a state matrix with the sparsity structure of an Erdős-Rényi random graph with edge probability pn . Additionally, we assume that the weights of the edges in the random graph are also random. In particular, we assume the edge weights are Gaussian variables with 2 zero mean and variance σn2 = 4pαn n for any 0 < α < 1.3 We call this random matrix ensemble the Gaussian-weighted Erdős-Rényi Ensemble (GER) with parameters (n, pn , σn2 ). Let An be an instance from this ensemble. The variance of the entries of An are pn σn2 = α2 /4n, and they have zero mean. According to the semicircle law, as n → ∞ the eigenvalue distribution is supported in the range [−α, α]; thus, An is Schur stable. The limiting spectral density of GER (n,√pn , σn2 ) can be derived from (1) as fGER (x) = (2/πα2 ) α2 − x2 , for x ∈ [−α, α] and 0 otherwise. Fig. 1 shows the histogram of eigenvalues of An from a Gaussianweighted Erdős-Rényi Ensemble with parameters n = 1000, pn = 2 log n/n = 0.006, and α = 0.5. Similarly, the limiting moments of GER are  spectral 2k 1 GER = ( α2 )2k k+1 mGER = 0 for j odd. The 2k k , and mj −1 trace of the Gramian inverse, tr(Wd ), is a Gramian-based control energy metric that quantifies the average steering energy along all directions in the state space. Accordingly, for the controllability Gramian of a random DT system with a state matrix drawn from the GER (n, pn , σn2 ), we have that asymptotically E{tr(Wd−1 )} ∼ limn→∞ E{tr(In − A2n )} = limn→∞ (n − nE {m2 (An )}). For the particular case of GER, we have that E{m2 (An )} ∼ mGER = α2 /4 so that 2 −1 2 E{tr(Wd )} ∼ n(1 − α /4), and the average control energy increases linearly with the increasing size n. Notice that the control energy decreases as α, which is related to the variance of the edge weights, increases. Fig. 2 shows the histogram of eigenvalues of controllability Gramian for An using the same parameters as in Fig. 1. 3 In fact, we can use any distribution (not necessarily the normal density) 2. that has zero mean, with variance σn Fig. 1. Eigenvalue Histogram of a Gaussian-weighted Erdős-Rényi ensemble √ with parameters n = 1000, pn = 2 log n/ n, and α = 0.5 is given by a semi-circular density that is supported over [−0.5, 0.5]. Fig. 2. Eigenvalue Histogram of the Gramian of a discrete-time system with the state-matrix An given by a Gaussian-weighted Erdős-Rényi ensemble with the same parameters as in Fig. 1. The Gramian spectrum in this case follows the limiting spectral density fW given in Theorem 1. Example 2. Random Regular Graph Laplacian Dynamics As a second example, consider the stabilized Laplacian dynamics on a random d-regular graph considered in Theorem 2. In Fig. 3 we have plotted the histogram of the eigenvalues of the stabilized Laplacian L̃n with d = 3 and n = 1000. The eigenvalue spectrum of the associated controllability Gramian is plotted in Fig. 4. Here, we use 1/λmin (Wc ) as a measure of the worst-case minimum required control energy for making a unit transfer in the state space. √ Applying Theorem 2 we get that 1/λmin (Wc ) ∼ 2d + 4 d − 1; hence, the minimum required energy increases with the increasing degree. about the energy required to control a random system. A PPENDIX P ROOFS OF THE M AIN R ESULTS A. Proof of Lemma 1 e n := Ln + d 11T Fig. 3. Eigenvalue Histogram of the stabilized Laplacian L n with d = 3 and n = 1000. The limiting spectral distribution in this case is given by the McKay law (Subsection II-C), shifted so that the eigenvalue spectrum is centered around d = 3. Given the input matrix Bn = In and a symmetric state T matrix n with spectral moments given by mk := Pn An = A 1 k λ (A ) = n1 tr(Akn ), we P can write the spectral i n i=1 n ∞ moments of the DT Gramian Wd := τ =0 A2τ n , as follows:  !k  ∞ X 1 1  mk (Wd ) := tr(Wdk ) = tr  A2τ n n n τ =0 =  1  tr (I − A2n )−k . n  2j P∞ From the Taylor expansion (I −A2n )−k = j=0 j+k−1 k−1 An , we have that:    ∞  1 X j + k − 1  mk (Wd ) = tr A2j n n k − 1 j=0  ∞  X j+k−1 1 tr(A2j = n ) n k − 1 j=0  ∞  X j+k−1 = m2j , k−1 j=0 as stated in Lemma 1. B. Proof of Theorem 1 Fig. 4. Eigenvalue Histogram of the Gramian of the stabilized Laplacian dynamics on a random d-regular graph with d = 3 and n = 1000. The limiting spectral distribution of the Gramian in this case has the density function fL given in Theorem 2. V. C ONCLUSIONS In this paper, we have introduced a theoretical framework to study the eigenvalue spectra of the controllability Gramian of systems with random state matrices. Using tools from random matrix theory, such as the method of moments, we have derived expressions for the spectral moments of the controllability Gramian for both continuous- and discrete-time systems. We have used these moments to derive closed-form expressions for the spectral distribution of the Gramian of random systems derived from popular random matrix and graph ensembles. Finally, we have illustrated how the eigenvalue distribution of the Gramian can be used to draw conclusions We begin by showing that the spectral moments of the Gramian are asymptotically given by (5). Starting form (4) and replacing the moments mk of the Wigner ensemble, we obtain    ∞  X 1  j + k − 1 2j 1 2j k E tr[Wd ] = σ n k−1 j+1 j j=0   ∞ X j+k−1 2−2j (2j)! = (4σ 2 )j . (10) k−1 j!(j + 1)! j=0 Next, we can write (2j)! = (2j )(j!)(3 × 5 × 7 × . . . (2j − 1)) so that 2−2j (2j)! 2−j (3 × 5 × 7 × . . . (2j − 1)) = j!(j + 1)! (j + 1)! (1/2)(1/2 + 1)(1/2 + 2)(1/2 + 3) . . . (1/2 + j − 1) = 2(2 + 1)(3 + 1) . . . (2 + j − 1) (1/2)j = , (11) (2)j where (q)j = q(q + 1) . . . (q + j − 1). Replacing (11) in (10) yields  ∞  X j + k − 1 (1/2)j 1  k E tr[W ] = (4σ 2 )j n (2) k − 1 j j=0 = ∞ X (k)j (1/2)j j=0 (j!)(2)j (4σ 2 )j 1 = 2 F1 ( , k; 2, 4σ 2 ), 2 when 4σ 2 < 1, as we wanted to prove. We now proceed to determine the limiting spectral density of the Gramian when An is a random matrix from the Wigner ensemble. We begin by noting two identities, which hold true for hyper-geometric functions 3 4σ 2 1 2 2 −k ), (12) 2 F1 (k, ; 2, 2 F1 ( , k; 2, 4σ ) = (1−4σ ) 2 2 4σ 2 − 1 Z 1 b−1 x (1 − x)c−b−1 −1 dx, 2 F1 (a, b; c; z) = B(b, c − b) (1 − zx)a 0 (13) for c > b > 0 and |z| < 1, where B(·, ·) is the Beta function.4 The first formula follows from Kummer solutions to Gaussian hyper-geometric differential equation, after a proper change of variables [38, Section 3.7]. The second one is an integral representation of hyper-geometric functions known as Euler formula [38, Section 3.6]. We can use (13) to rewrite the lefthand side of (12) as follows 1 2 2 F1 ( , k; 2, 4σ ) 2 Z −k 2 1 1 1 4σ 2 = 1 − 4σ 2 x 2 (1 − x)− 2 (1 − 2 x)−k dx π 0 4σ − 1 Z  1 2 1 1 = x 2 (1 − x)− 2 1 − 4σ 2 + 4σ 2 x −k dx π 0 s s Z1 1 4yσ 2 − y + 1 4yσ 2 k dy =− y 2πσ 2 4yσ 2 y − 1 y2 1/(1−4σ 2 ) = = 2 1/(1−4σ ) Z Z R 1 2πσ 2 y 2 1 s 4yσ 2 − y + 1 k y dy y−1 y k fW (y) dy, where we have used the fact that B( 32 , 12 ) = π/2, together with 2 −y+1 , the change of variables y −1 = 1−4σ 2 +4σ 2 x, x = 4yσ4yσ 2 d y and dx = − for the integration. Hence, the moments of 4σ 2 y 2 the spectral distribution in (6) are indeed given by the spectral moments in (5). Therefore, the claim in our theorem follows from the method of moments. 4 The Beta function is defined in terms of the Gamma function as B(x, y) = Γ(c) . Γ(b)Γ(c−b) C. Proof of Lemma 2 Since the CT Gramian Wc satisfy (3), its spectral moments are given by "Z k # ∞ 1 2An τ e dτ mk (Wc ) = tr n 0 k n Z ∞ 1X e2λi (An )τ dτ , = n i=1 0 R∞ Since 0 e2λi (An )τ dτ = −1/(2λi (An )), we have that, mk (Wc ) = n X 1 (λi (An ))−k . n(−2)k i=1 (14) The Taylor expansion of x−k around m1 is given by  ∞  X −k x−k = (m1 )−k−j (x − m1 )j j j=0 We can now replace for (λi (An ))−k in (14) to get  n X ∞  j X 1 −k (λi (An ) − m1 ) mk (Wc ) = n(−2)k i=1 j=0 j (m1 )k+j  Pn ∞  j 1 X −k i=1 (λi (An ) − m1 ) = k k+j (−2) j=0 j n(m1 )   ∞ ej m 1 X −k = , (−2)k j=0 j (m1 )k+j as claimed in Lemma 2. D. Proof of Theorem 2 e n , we can replace for the moGiven that An = −L ments of An in (7). Hence, using the asymptotic moments K e n ) ∼ −d and m e j = mM m1 = n1 Tr(−L j , as discussed in Subsection II-C, (7) becomes  ∞  1 X −k −k−j K E{mk (Wc )} ∼ (−d) mM j k j (−2) j=0  ∞  1 X 2j + k − 1 1 M K = m k 2j d2j 2j (2d) j=0   where in the last equality, we have used j+k−1 (−1)j = −k j j K and substituted j by 2j to account for the fact that mM =0 j for j odd. This proves the expression claimed in (8) for the asymptotic spectral moments of the CT Gramian. Once we have a closed-form expression for the expected spectral moments of the Gramian, we need to prove that these moments correspond to those of the density in (9). We begin by calculating the moments of (9) as follows Z xk fL (x)dx R = = √ 1/(2d−4 Z d−1) xk d  1 2 2x  dx 1 2 2x ) 4 (d − 1) − d − 4πx2 d2 − (d − √ 1/(2d+4 d−1) √ 2 Zd−1 √ −2 d−1 q p d 4 (d − 1) − u2 du, (d − u)k (2π)2k (d2 − u2 ) (15) where in the last equality we have used the change of variables u = d − (1/2x). We now use the Taylor expansion of −k (d − u) around d, which is given by  ∞  X j + k − 1 uj −k . (d − u) = dk+j j j=0 Using this expansion in (15), we get that  Z ∞  1 X j + k − 1 −k−j k x fL (x)dx = k d × ... 2 j=0 j R √ 2 Zd−1 p uj d 4 (d − 1) − u2 du 2π(d2 − u2 ) √ −2 d−1 ∞  X  2j + k − 1 −k−2j M K d m2j 2j j=0  ∞  1 X 2j + k − 1 −2j = d × ... k 2j (2d) j=0 j   X 2j 2j − 2r + 1 r (d − 1) r 2j − r + 1 r=1 a 1 = k 2 = E{mk (Wc )}, a K where in (=) we have used the fact that mM = 0 for j. j Having thus shown that the moments of fL (·) coincides with those of the Gramian spectrum the proof follows from the method of moments, described in Section II. R EFERENCES [1] R. Kalman, Y. C. Ho, and K. S. Narendra, “Controllability of linear dynamical systems,” Contrib. Differential Equations, vol. 1, pp. 189– 213, 1962. [2] H. Tanner, “On the controllability of nearest neighbor interconnections,” in Proceedings of the 43rd IEEE Conference on Decision and Control, Dec. 2004, pp. 2467–2472. [3] A. Rahmani, M. Ji, M. Mesbahi, and M. Egerstedt, “Controllability of multi-agent systems from a graph-theoretic perspective,” SIAM Journal on Control and Optimization, vol. 48, no. 1, pp. 162–186, 2009. [4] S. Martini, M. Egerstedt, and A. Bicchi, “Controllability analysis of multi-agent systems using relaxed equitable partitions,” Int. J. Systems, Control and Communications, vol. 2, no. 1,2,3, pp. 100–121, 2010. [5] Z. Ji, Z. Wang, H. Lin, and Z. Wang, “Interconnection topologies for multi-agent coordination under leaderfollower framework,” Automatica, vol. 45, no. 12, pp. 2857–2863, 2009. [6] B. Liu, T. Chu, L. Wang, and G. Xie, “Controllability of a leaderfollower dynamic network with switching topology,” IEEE Transactions on Automatic Control, vol. 53, no. 4, pp. 1009–1013, 2008. [7] G. Parlangeli and G. Notarstefano, “On the reachability and observability of path and cycle graphs,” IEEE Transactions on Automatic Control, vol. 57, no. 3, pp. 743–748, 2012. [8] M. Nabi-Abdolyousefi and M. Mesbahi, “On the controllability properties of circulant networks,” IEEE Transactions on Automatic Control, vol. 58, no. 12, pp. 3179–3184, 2013. [9] G. Notarstefano and G. Parlangeli, “Controllability and observability of grid graphs via reduction and symmetries,” IEEE Transactions on Automatic Control, vol. 58, no. 7, pp. 1719–1731, 2013. [10] S. Zhang, M. K. Camlibel, and M. Cao, “Controllability of diffusivelycoupled multi-agent systems with general and distance regular coupling topologies,” in 50th IEEE Conference on Decision and Control and European Control Conference (CDC-ECC), 2011, pp. 759–764. [11] A. Chapman, M. Nabi-Abdolyousefi, and M. Mesbahi, “Controllability and observability of network-of-networks via cartesian products,” Automatic Control, IEEE Transactions on, vol. 59, no. 10, pp. 2668–2679, Oct 2014. [12] Y.-Y. Liu, J.-J. Slotine, and A.-L. Barabási, “Controllability of complex networks,” Nature, vol. 473, no. 7346, pp. 167–173, 2011. [13] M. A. Rahimian and A. G. Aghdam, “Structural controllability of multiagent networks: Robustness against simultaneous failures,” Automatica, vol. 49, no. 11, pp. 3149–3157, 2013. [14] A. Chapman and M. Mesbahi, “On strong structural controllability of networked systems: a constrained matching approach,” in American Control Conference (ACC), 2013, pp. 6126–6131. [15] C. Johnson, “Optimization of a certain quality of complete controllability and observability for linear dynamical systems,” Journal of Fluids Engineering, vol. 91, no. 2, pp. 228–237, 1969. [16] P. Muller and H. Weber, “Analysis and optimization of certain qualities of controllability and observability for linear dynamical systems,” Automatica, vol. 8, no. 3, pp. 237 – 246, 1972. [17] W. Rugh, Linear System Theory. Prentice Hall, 1993. [18] T. H. Summers, F. L. Cortesi, and J. Lygeros, “On submodularity and controllability in complex dynamical networks,” ArXiv e-prints, Apr. 2014. [19] F. Pasqualetti, S. Zampieri, and F. Bullo, “Controllability metrics, limitations and algorithms for complex networks,” Control of Network Systems, IEEE Transactions on, vol. 1, no. 1, pp. 40–52, March 2014. [20] V. Tzoumas, M. A. Rahimian, G. J. Pappas, and A. Jadbabaie, “Minimal actuator placement with bounds on control effort,” IEEE Transactions on Control of Network Systems, 2015, in press. [21] E. Wigner, “Characteristic vectors of bordered matrices with infinite dimensions,” Ann. of Math., vol. 62, pp. 548–564, 1955. [22] ——, “On the distribution of the roots of certain symmetric matrices,” Annals of Mathematics, vol. 67, no. 2, pp. pp. 325–327, 1958. [23] M. Mehta and M. Gaudin, “On the density of eigenvalues of a random matrix,” Nuclear Physics, vol. 18, pp. 420–427, 1960. [24] F. J. Dyson, “A brownian-motion model for the eigenvalues of a random matrix,” Journal of Mathematical Physics, vol. 3, no. 6, pp. 1191–1198, 1962. [25] G. Anderson, A. Guionnet, and O. Zeitouni, An Introduction to Random Matrices, 1st ed. Cambridge: Cambridge University Press, 2009. [26] T. Tao, Topics in random matrix theory. Graduate Studies in Mathematics, American Mathematical Society, 2012. [27] F. Chung, L. Lu, and V. Vu, “Spectra of random graphs with given expected degrees,” Proceedings of the National Academy of Sciences, vol. 100, no. 11, pp. 6313–6318, 2003. [28] F. Chung and M. Radcliffe, “On the spectra of general random graphs,” the Electronic Journal of Combinatorics, vol. 18, no. 1, p. P215, 2011. [29] R. R. Nadakuditi and M. E. Newman, “Spectra of random graphs with arbitrary expected degrees,” Physical Review E, vol. 87, no. 1, p. 012803, 2013. [30] L. Erdős, A. Knowles, H.-T. Yau, and J. Yin, “Spectral statistics of Erdős–Rényi graphs I: Local semicircle law,” The Annals of Probability, vol. 41, no. 3B, pp. 2279–2375, 2013. [31] M. Mariton, “Stochastic controllability of linear systems with markovian jumps,” Automatica, vol. 23, no. 6, pp. 783–785, 1987. [32] M. Nabi-Abdolyousefi and M. Mesbahi, “System theory over random consensus networks: controllability and optimality properties,” in IEEE Conference on Decision and Control and European Control Conference (CDC-ECC), 2011, pp. 2323–2328. [33] B. M. Sanandaji, M. B. Wakin, and T. L. Vincent, “Observability with random observations,” IEEE Transactions on Automatic Control, vol. 59, no. 11, pp. 3002–3007, 2014. [34] C. Enyioha, M. A. Rahimian, G. J. Pappas, and A. Jadbabaie, “Controllability and fraction of leaders in infinite networks,” in IEEE 53rd Annual Conference on Decision and Control (CDC), Dec 2014, pp. 1359–1364. [35] G. Yan, G. Tsekenis, B. Barzel, J.-J. Slotine, Y.-Y. Liu, and A.-L. Barabasi, “Spectrum of controlling and observing complex networks,” Nature Physics, vol. 11, no. 9, pp. 779–786, Oct 2014. [36] T. Tao and V. Vu, “Random matrices: The universality phenomenon for wigner ensembles,” arXiv preprint, 2012. [37] B. D. McKay, “The expected eigenvalue distribution of a large regular graph,” Linear Algebra and its Applications, vol. 40, pp. 203–216, 1981. [38] Y. L. Luke, The special functions and their approximations. Academic press, 1969.
3cs.SY
1 arXiv:1711.03910v1 [cs.IT] 10 Nov 2017 LDPC-Based Code Hopping for Gaussian Wiretap Channel With Limited Feedback Zhao Chen1,3, Liuguo Yin2,3 , and Jianhua Lu1 State Key Laboratory on Microwave and Digital Communications Tsinghua National Laboratory for Information Science and Technology 1 Department of Electronic Engineering, Tsinghua University 2 School of Aerospace, Tsinghua University 3 EDA Lab, Research Institute of Tsinghua University in Shenzhen Email: [email protected]; {yinlg, lhh-dee}@tsinghua.edu.cn Abstract—This paper presents a scheme named code hopping (CodeHop) for gaussian wiretap channels based on nonsystematic low-density parity-check (LDPC) codes. Different from traditional communications, in the CodeHop scheme, the legitimate receiver (Bob) rapidly switches the parity-check matrix upon each correctly received source message block. Given an authenticated public feedback channel, the transmitter’s (Alice) paritycheck matrix can also be synchronized with the receiver’s. As a result, once an eavesdropper (Eve) erroneously decodes a message block, she may not be able to follow the update of subsequent parity-check matrices. Thus, the average BER of Eve will be very close to 0.5 if the transmitted number of message blocks is large enough. Focused on the measure of security gap defined as the difference of channel quality between Bob and Eve, numerical results show that the CodeHop scheme outperforms other solutions by sufficiently reducing the security gap without sacrificing the error-correcting performance of Bob. I. I NTRODUCTION Traditionally, security of data transmissions has been handled at upper protocol layers, which presents wiretappers (Eve) by cryptographic algorithms with a secret key privately shared between a transmitter (Alice) and legitimate receivers (Bob). This notion of security relies on the assumption that Eve has limited resources. Thus, perfect secrecy was introduced by Shannon [1], which proved that if the secret key rate is lager or equal to the transmission rate, information-theoretical security can be achieved such that the encrypted message reveals no information of the source message. Owing to the stochastic nature of communication channels, the work of Shannon was extended to the model of wiretap channel by Wyner [2], where information-theoretically secure communication is possible when Eve’s channel condition is worse than Bob’s, and secrecy capacity is measured as the highest transmission rate that can be achieved by Bob without any information leaked to Eve. Hereafter, Wyner’s work was refined by Csiszar and Korner in [3], and then generalized to gaussian wiretap channel in [4]. Note that the equivocation rate at Eve can also be a metric for security, which is defined as the conditional entropy of the source message with given Eve’s noisy observation. More recently, scenarios including fading channels [5], MIMO channels [6] and multi-user channels [7] have also been investigated in the literature. Recently, coding techniques attract much research interests to achieve better security performance. In [8], for binary erasure channel (BEC) and binary symmetric channel (BSC), low-density parity-check (LDPC)-based wiretap codes are constructed. For gaussian wiretap channels, lattice codes are also developed in [9]. Moreover, with the emerging polar codes techniques, a nested code structure is established for binary-input symmetric-output (BISO) channels in [10]. All the designs above are for asymptotically large block lengths, which may be difficult to implement in practical systems. To this end, an LDPC code design for BPSK-constrained gaussian wiretap channel was shown in [11]. A joint error correction and encryption using LDPC codes is also studied in [12]. Recently, in order to construct practical codes, the bit error rate (BER) of message bits is measured for physical layer security [13]. Specifically, if Eve’s BER is ensured to be close to 0.5 and the error bits are i.i.d. distributed, she would be unable to recover any information from the decoded messages. Then, security gap was introduced by Klinc [14], which is defined as the difference of the channel quality between Bob and Eve, requiring Eve’s BER to be sufficiently secure, while keeping Bob’s BER low enough to reliably receive messages. In [15], Baldi reduced the security gap by implementing nonsystematic LDPC codes using scrambling matrices, where security is enhanced by considering automatic repeat-request (ARQ). Also, a feedback-aided secure transmission scheme using stopping sets of LDPC codes can be found in [16]. In this paper, the gaussian wiretap channel enhanced with an authenticated feedback channel is considered, where an LDPC-based code hopping (CodeHop) scheme is proposed to improve physical layer security by reducing the security gap. Using a structured-random LDPC code generator, the parity-check matrix of CodeHop will be rapidly updated upon a correctly received message block by Bob, which is then notified to Alice with one bit feedback. Once Eve encounters a decoding error, she may not be able to decode any more message block without knowing the parity-check matrix in the following transmission and then her average BER will be close to 0.5. Thus, the security gap can be significantly reduced. The rest of the paper is organized as follows. In Section II, system model of the CodeHop scheme is introduced. Then, the construction of the structured-random LDPC codes is shown 2 fi mi−1 Feedback Channel mi Encoder xi Main Channel yi Decoder Transmitter (Alice) ˆi m z −1 Receiver (Bob) Wiretap Channel zi Decoder Parity-Check Matrix Generator mi f i −1 Hi xi LDPC Encoder mi (a) Encoder. Eavesdropper (Eve) Fig. 1. System model of the gaussian wiretap channel with limited feedback. fi Integrity Check z −1 in Section III. In Section IV, the security gap performance is analyzed. Finally, we conclude this paper in Section V. f i −1 II. T HE LDPC-BASED C ODE H OPPING S CHEME In this section, system model of the gaussian wiretap channel with limited feedback will be introduced, along with the design of the encoder and the decoder. ˆ i−1 m Parity-Check Matrix Generator z −1 Hi yi LDPC Decoder ˆi m (b) Decoder. A. System Model As depicted in Fig. 1, for i = 1, 2, . . ., the secret source to be transmitted is divided into k-bit message blocks mi , which are encoded into n-bit codewords xi by the encoder at Alice and then transmitted over an AWGN channel to Bob. In the meantime, codewords are also perceived by Eve over a noisier and independent AWGN channel. For Bob and Eve, the received codewords are denoted by yi and zi , which are recovered by the decoders as m̂i and m̄i , respectively. Additionally, in our model, legitimate receivers are always given a public feedback channel, which can be used to inform Alice whether the current codeword is correctly decoded with just one bit feedback fi . Let PeB and PeE define the receiving BERs of Bob and Eve, respectively. To guarantee both information reliability and security, it is desired to constrain PeB to be lower than a fixed B threshold Pe,max (≈ 0) and PeE to be greater than a threshold E Pe,min (≈ 0.5). If the receiving SNRs at Bob and Eve are denoted by SNRB and SNRE , it must hold that ( B SNRB ≥ SNRB,min = p−1 (Pe,max ), (1) E SNRE ≤ SNRE,max = p−1 (Pe,min ), (2) where p(·) denotes the BER as a function of the SNR, and the inverse p−1 (·) gives the target SNR for a given BER threshold. Then, the security gap is defined as Sg = SNRB,min − SNRE,max , (3) where the SNRs are expressed in decibels (dB). If both (1) and (2) are satisfied, the secrecy rate Rs can be defined as the efficient transmission rate k Rs ≈ R = , (4) n where in fact Rs is slightly less than R due to some overhead bits in mi for integrity check. Note that the security gap Sg measures the minimum required difference between Bob and Eve’s SNR in dB for secure communication, and our target is to reduce the security gap as small as possible. Fig. 2. Block diagrams of the encoder and the decoder. Note that the z −1 block denotes a delay unit. B. Encoder and Decoder Design In order to minimize the security gap of gaussian wiretap channel, the CodeHop scheme is implemented such that each source message block mi will be encoded by a rapidly hopping parity-check matrix of LDPC codes Hi . That is, Hi is not fixed for all codewords. On the contrary, Hi will be generated in real time according to the past correctly received source message block mi−1 by a parity-check matrix generator. Block diagrams of the encoder and the decoder are both illustrated in Fig. 2. In the encoder of Alice, starting from a public agreed paritycheck matrix H0 and feedback f0 = 0, the LDPC parity-check matrix Hi is generated by ( H(hash(mi−1 )), if fi−1 = 1; Hi = (5) Hi−1 , if fi−1 = 0; where hash(·) is a hash function, and H(·) is the mapping of structured-random LDPC codes described in Section III. Thus, the parity-check matrix Hi will be updated when the past source message mi−1 is successfully recovered by Bob, i.e. fi−1 = 1. Otherwise, Hi will be kept the same as Hi−1 . In the decoder of Bob, the public feedback fi is the result of integrity check for m̂i . Although the correctness of mi can be determined by the syndrome of the decoded codeword in most cases, it is still possible that there exist some undetected errors in m̂i when the decoded codeword converges to another valid codeword of Hi . Thus, integrity check, e.g. cyclic redundancy check (CRC), is still needed to avoid such undetected errors, and some overhead bits are required in mi to store the integrity check value. As for the parity-check matrix Hi , it will be generated as in the encoder of Alice. 3 c2 c4 v2 v6 v4 v1 v5 c1 v3 c3 Fig. 3. Protograph P optimized for the rate-1/2 nonsystematic LDPC code. III. S TRUCTURED -R ANDOM LDPC C ODES In this section, we will show how to generate nonsystematic LDPC codes in real time via structured-random protograph expanding. As presented by Thorpe in [17], protograph can be regarded as the minimal base Tanner graph to describe an LDPC code. Using protograph, our target is to puncture all of the k information bits and transmit only the n parity bits in the original (n + k)-bit codeword. In order to avoid stopping sets which make the iterative decoding of nonsystematic codes difficult to converge, the code doping method [18] is adopted. As for a rate-1/2 nonsystematic LDPC code, the result of an optimized protograph P = (V, C, E) is given in Fig. 3, which is equivalent to a 4 × 6 base parity-check matrix HB,0 as shown below,   1 1 0 0 1 0  1 1 0 0 0 1   HB,0 =  (6)  3 1 1 1 0 0 . 0 1 1 2 0 0 In the figure, there are a variable node set V = {v1 , v2 , ..., v6 }, a check node set C = {c1 , c2 , ..., c4 } and an edge set E = {e1 , e2 , ..., e16 } in the protograph P . Among all variable nodes, the information nodes denoted by v1 and v2 will be punctured. Thus, according to the requirement of code doping, the check node c4 is designated to be connected to only one punctured variable node v2 to trigger the convergence of the iterative decoding. Starting with the protograph P , a larger tanner graph can be obtained by copy-and-permute operation. Let each edge e ∈ E stand for a unique edge type. If expanded with a factor of T , the copy-and-permute operation firstly replicates the protograph P for T times and forms a set of T edge copies for each edge type, whose endpoints are then permuted among the variable and check nodes in the set. Thus the T copies of the protograph are all interconnected in the derived graph, which defines the Tanner graph for the derived code. Note that the operation of edge expanding is equivalent to matrix expanding for each element in the base matrix HB,0 . Each element of value w will be expanded to a T × T matrix with w ones in each row or column, and thus the equivalent parity-check matrix can be of size 4T × 6T . Instead of using random permutations on the set of each edge type, permutations defined by algebraic structures such as cyclic shift are preferred for the ease of description and efficient implementation. That is to say, the protograph can be expanded by choosing appropriate T ×T circulant permutation matrices IT (t) for each edge type, and the derived parity-check matrix will become a T -circulant matrix. Note that each row in IT (t) can be obtained by one bit cyclic right shifting its previous row, and thus IT (t) is defined by its first row uT (t), where uT (t) = (0, . . . , 0, 1, 0, . . . , 0) and the shift value t ∈ J0, T −1K 1 denotes the position of the unique one in the vector. Therefore, given the protograph P , the derived LDPC code can be described by shift values of all the circulant permutations. Usually searching for only one good code is satisfactory for channel coding. However, now it is far more challenging to construct a large amount of highly efficient LDPC codes for the CodeHop scheme. Thus, expanding with just one single stage is not enough. A multi-stage expanding scheme is developed, which we referred to as a structured-random protograph expanding technique. Specifically, the protograph P will be expanded via L > 1 stages such that the total expanding factor T = T1 T2 · · · TL , where Tl is the expanding factor of the lth stage for l ∈ J1, LK and the equivalent expanded parity-check matrix is denoted by HB,l . • Structured expanding: In the first L − 1 stages, the protograph is carefully expanded to avoid short loops, lowweight codewords or parallel edges, which can restrict the general structure of the code. After L − 1 stages, all the non-zero elements in HB,L−1 will equal 1. • Random expanding: In the Lth stage, all of the edges in the tanner graph will be randomly expanded, or equivalently, all the non-zero elements in HB,L−1 will be expanded to circulant permutations according to the hash value of the past correctly decoded message mi−1 . After expanding the protograph P in Fig. 3, each paritycheck matrix Hi is a TL -circulant matrix with a size of n × (n + k), which can be written as Hi = [A, B] such that   1 A11 A112 A121 A122    ,  A = Aw (7) αβ 2×4 = A3 A132  31 0 A142   0 0 B113 0  0   0 0 B124  .  B = Bw (8) 1 αβ 4×4 = B1 0 0  31 B32 1 2 B41 B42 0 0 Note that n = 4T , k = 2T , and the first k = 2T nodes are punctured as information nodes among all the n + k = 6T variable nodes. There are totally J = |E|T /TL non-zero elements in HB,L−1 , each of which will be then replaced by a TL × TL circulant permutation matrix ITL (t). Meanwhile, all the zero elements in HB,L−1 will be replaced by a TL × TL zero matrix 0TL ×TL . Now, we rewrite the hash value hash(mi+1 ) as a binary vector ri = hash(mi−1 ) = (ri,0 , ri,1 , . . . , ri,j , . . . , ri,J−1 ), (9) where each number ri,j ∈ J0, TL −1K is represented by log2 TL bits in the vector ri . Therefore, all the random shift values in the Lth stage will be controlled by the vector ri , whose length is required to be h = J log2 TL bits. If the bit length of hash(mi−1 ) is smaller than h, ri can be filled up by using hash(mi−1 ) repeatedly. As for the parameters selected in the first L−1 stages, i.e. all the expanding factors and shift values, they are constant and will be publicly sent to Bob in advance. 1 Note that Ja, bK := {a, a + 1, . . . , b}, which denotes the set of integers between a and b. 4 the feedback fi . As a result, an event which we referred to as synchronization error may happen. That is, there exists an index iTH ∈ N, such that ziTH is not correctly decoded by Eve, but yiTH is successfully recovered by Bob. Thus, Eve will be not able to follow the update of the parity-check matrix Hi for i ≥ iTH , and the subsequent source message blocks mi cannot be decoded by Eve without any knowledge of Hi . Let SNRB and SNRE denote the receiving SNRs of Bob and Eve, respectively. The BER of Bob is given by 0 10 −1 10 −2 10 −3 BER 10 −4 10 −5 10 CCSDS (Systematic) BER: CodeHop FER: CodeHop Uncoded −6 10 PeB = Pe (SNRB ), −7 10 0.5 1 1.5 E /N (dB) b 2 2.5 o Fig. 4. For (2048, 1024) LDPC codes, the average BER and FER of the nonsystematic LDPC codes in CodeHop is compared with the BER of the systematic code specified in CCSDS. A. An example With the structured-random expanding technique, a hopping sequence of parity-check matrices for (2048, 1024) nonsystematic LDPC codes is generated. From the protograph P in Fig. 3, each parity-check matrix Hi will be constructed by a total expanding factor T = T1 T2 T3 = 4 × 4 × 32 = 512 via L = 3 stages. In the first two stages, the protograph P is expanded twice by factors of T1 = T2 = 4, which is intended to separate all the parallel edges and guarantees the girth is larger than 4 in the derived Tanner graph. In the third stage, totally there are |E|T /T3 = 256 edges to be randomly expanded by a factor of T3 = 32, which is described by a vector ri with length of h = J log2 TL = 1280 bits. If SHA-256 is adopted as the hash(·), the 256-bit hash value hash(mi−1 ) will be repeated by four times to represent ri . Thus, a large set of parity-check matrices H = {H(r) : r ∈ J0, 2256 − 1K} is available to be randomly generated in the hopping sequence of CodeHop. To evaluate the error correcting performance of CodeHop, it is different from the evaluation of a fixed LDPC paritycheck matrix. The BER of one hopping sequence will be evaluated as how the CodeHop scheme works, that is, by performing numerical simulations with rapidly switching paritycheck matrices. For the average performance of CodeHop, random initial H0 will be tested to generate different hopping sequences, whose BERs and FERs are averaged as the final result. As shown in Fig. 4, the average BER and FER of the structured-random nonsystematic (2048, 1024) LDPC codes are plotted. The number of iterations is restricted by 63. It can be seen that the average BER of nonsystematic LDPC codes is slightly degraded by no more than 0.2 dB in Eb /N0 , compared with the systematic codes specified in CCSDS. IV. S ECURITY G AP A NALYSIS In this section, the analysis of security gap using CodeHop for gaussian wiretap channel with limited feedback will be presented. Owing to the public feedback fi , the parity-check matrix Hi will be always perfectly synchronized between Alice and Bob. However, Eve is restricted to passively receive (10) where Pe (SNR) is the BER of the CodeHop scheme with perfect synchronization that can be obtained from Fig. 4. As for Eve’s BER, firstly the event of synchronization error needs to be investigated. Assume that the total number of source message blocks is N . Given Pf (SNR) as the frame error probability (FER) of the CodeHop scheme with perfect synchronization, the index iTH of the first erroneously synchronized message block follows a geometric distribution. Thus, for 1 ≤ i0 ≤ N , the probability of the event iTH = i0 can be derived by  i0 −1 Pr(iTH = i0 ) = 1 − (1 − PfB )PfE (1 − PfB )PfE , (11) where we define PfB = Pf (SNRB ) and PfE = Pf (SNRE ). If synchronization error never happens, the probability is denoted by Pr(iTH ≥ N + 1) = [1 − (1 − PfB )PfE ]N . (12) Then, for a fixed index iTH , Eve’s erroneously received source message blocks can be divided into two categories. The first category involves the blocks mi for 1 ≤ i ≤ iTH − 1, which are erroneously decoded with knowing the parity-check matrix Hi . Actually, the number of block errors in the first category follows a binomial distribution and can be estimated by the mean value NER (iTH ) = (iTH − 1)PfB PfE 1 − (1 − PfB )PfE , (13) where the averaged number of bit errors in such an erroneous message block is given by kER = Pe (SNRE ) · k . Pf (SNRE ) (14) The second category includes all the unknown message blocks for iTH ≤ i ≤ N , which is caused by synchronization error and cannot be decoded without knowing Hi . That is, all of the message bits in mi are randomly decoded and half of them will be error bits. Finally, the BER of Eve can be obtained by PeE = N X kER · NER (i) + 0.5k · (N − i + 1) · Pr(iTH = i) k·N i=1 kER · NER (N + 1) · Pr(iTH ≥ N + 1). (15) k·N From (10) and (15), we can characterize the security gap of the CodeHop scheme for gaussian wiretap channel. As shown in Fig. 5 and Fig. 6, the BER curves for different security gaps Sg and different number of transmitted message block N using (2048, 1024) nonsystematic LDPC codes are illustrated. + 5 N = 1000 0 10 −1 10 −2 10 −3 BER 10 −4 10 Bob Eve (Sg = 0 dB) −5 10 Eve (Sg = 0.2 dB) −6 10 Eve (Sg = 0.5 dB) −7 10 0.8 1 1.2 1.4 1.6 Eb/N0 (Bob) 1.8 2 2.2 Fig. 5. BER of the CodeHop scheme for gaussian wiretap channel using (2048, 1024) nonsystematic LDPC codes for different security gaps when N = 1000 message blocks are transmitted. N = 10000 0 10 −2 10 −3 BER 10 −4 10 Bob Eve (Sg = 0 dB) −5 10 Eve (Sg = 0.2 dB) −6 10 Eve (S = 0.5 dB) g −7 0.8 ACKNOWLEDGMENT This work was supported in part by the Natural Science Foundation of China (61101072, 61132002) and the new strategic industries development projects of Shenzhen city (ZDSY20120616141333842). R EFERENCES −1 10 10 on the most recent successfully recovered message block at Bob. Enhanced by an authenticated public feedback channel, Alice can be notified of the decoding state of Bob and synchronize to the updated parity-check matrix with Bob. However, Eve is restricted to passively follow the update of the parity-check matrix. Once the event of synchronization error occurs, she would be unable to decode the rest of the message blocks. In the CodeHop scheme, security gap is considered as a metric for physical layer security. It is verified with numerical simulations that the security gap can be highly reduced with finite length LDPC codes. In the future, more scenarios such as fading channels will also be studied by applying the CodeHop scheme. 1 1.2 1.4 1.6 Eb/N0 (Bob) 1.8 2 2.2 Fig. 6. BER of the CodeHop scheme for gaussian wiretap channel using (2048, 1024) nonsystematic LDPC codes for different security gaps when N = 10000 message blocks are transmitted. E If the BER threshold of Eve is set to be Pe,min = 0.49, for N = 1000, we can see in Fig. 5 that Sg = 0.5dB is achievable B B < 10−5 . If Pe,max is for the BER threshold of Bob Pe,max −3 relaxed to be less than 10 , Sg = 0dB can be also achieved. It can be inferred that with the help of public feedback fi and rapidly hopping of the parity-check matrix Hi , the security gap can be significantly reduced. Moreover, if N = 10000, i.e. more source message blocks are transmitted, the security B gap performance can be further improved. E.g., for Pe,max < −5 10 , the security gap Sg can be reduced to 0.2dB. This is owed to the fact that all message blocks mi after iTH cannot be decoded by Eve. Thus, more source message blocks to be transmitted makes Eve suffer from more random decoded blocks. It is worth noting that to make the error distributed uniformly in the decoded message bits of Eve, interleaving is needed for all the N transmitted source message blocks. V. C ONCLUSIONS Design of practical coding techniques for gaussian wiretap channel is investigated in this paper. Based on nonsystematic LDPC codes, we propose the CodeHop scheme in which the LDPC parity-check matrix will be rapidly switched depending [1] C. E. Shannon, “Communication theory of secrecy systems,” Bell system technical journal, vol. 28, no. 4, pp. 656–715, 1949. [2] A. D. Wyner, “The wire-tap channel,” Bell system technical journal, vol. 54, pp. 1355–1387, 1975. [3] I. Csiszár and J. Korner, “Broadcast channels with confidential messages,” IEEE Trans. Inf. Theory, vol. 24, no. 3, pp. 339–348, 1978. [4] S. Leung-Yan-Cheong and M. Hellman, “The gaussian wire-tap channel,” IEEE Trans. Inf. Theory, vol. 24, no. 4, pp. 451–456, 1978. [5] P. K. Gopala, L. Lai, and H. El Gamal, “On the secrecy capacity of fading channels,” IEEE Trans. Inf. Theory, vol. 54, no. 10, pp. 4687– 4698, 2008. [6] F. Oggier and B. Hassibi, “The secrecy capacity of the mimo wiretap channel,” IEEE Trans. Inf. Theory, vol. 57, no. 8, pp. 4961–4972, 2011. [7] E. Ekrem and S. Ulukus, “The secrecy capacity region of the gaussian mimo multi-receiver wiretap channel,” IEEE Trans. Inf. Theory, vol. 57, no. 4, pp. 2083–2114, 2011. [8] A. Thangaraj, S. Dihidar, A. R. Calderbank, S. W. McLaughlin, and J.M. Merolla, “Applications of ldpc codes to the wiretap channel,” IEEE Trans. Inf. Theory, vol. 53, no. 8, pp. 2933–2945, 2007. [9] F. Oggier, P. Solé, and J.-C. Belfiore, “Lattice codes for the wiretap gaussian channel: Construction and analysis,” arXiv preprint arXiv:1103.4086, 2011. [10] O. O. Koyluoglu and H. El Gamal, “Polar coding for secure transmission and key agreement,” IEEE Trans. Inf. Forensics Security, vol. 7, no. 5, pp. 1472–1483, 2012. [11] C. W. Wong, T. F. Wong, and J. M. Shea, “LDPC code design for the bpsk-constrained gaussian wiretap channel,” in IEEE GLOBECOM Workshops, 2011, pp. 898–902. [12] Z. Chen, L. Yin, Y. Pei, and J. Lu, “Codehop: physical layer error correction and encryption with ldpc-based code hopping,” Science China Information Sciences, vol. 59, no. 10, p. 102309, 2016. [13] Z. Chen, L. Yin, and J. Lu, “Hamming distortion based secrecy systems: To foil the eavesdropper with finite shared key,” IEEE Communications Letters, vol. 19, no. 5, pp. 711–714, 2015. [14] D. Klinc, J. Ha, S. W. McLaughlin, J. Barros, and B.-J. Kwak, “LDPC codes for physical layer security,” in IEEE Global Telecommunications Conference (GLOBECOM), 2009, pp. 5765–5770. [15] M. Baldi, M. Bianchi, and F. Chiaraluce, “Coding with scrambling, concatenation, and harq for the awgn wire-tap channel: A security gap analysis,” IEEE Trans. Inf. Forensics Security, vol. 7, no. 3, pp. 883–894, 2012. [16] W. K. Harrison, J. Almeida, S. W. McLaughlin, and J. Barros, “Coding for cryptographic security enhancement using stopping sets,” IEEE Trans. Inf. Forensics Security, vol. 6, no. 3, pp. 575–584, 2011. [17] J. Thorpe, “Low-density parity-check (LDPC) codes constructed from protographs,” IPN progress report, vol. 42, no. 154, pp. 42–154, 2003. [18] S. ten Brink and G. Kramer, “Design of repeat-accumulate codes for iterative detection and decoding,” IEEE Transactions on Signal Processing, vol. 51, no. 11, pp. 2764–2772, 2003.
7cs.IT
МАТЕМАТИЧЕСКИЙ И ПРОГРАММНЫЙ АППАРАТ АВТОМАТИЗИРОВАННОГО ПРОЕКТИРОВАНИЯ АКСОНОМЕТРИЧЕСКИХ СХЕМ ТРУБОПРОВОДНЫХ СИСТЕМ В.В. Мигунов Рассматривается применение модульной технологии разработки проблемно-ориентированных расширений систем автоматизированного проектирования [1] к задаче автоматизации подготовки аксонометрических схем трубопроводных систем (АСТС). В [2] выявлено единство состава схем для специальных технологических трубопроводов, систем водопровода и канализации, отопления, теплоснабжения, вентиляции, кондиционирования воздуха и приведено структурированное параметрическое представление схем, включая свойства объектов и их связи, общие установки и установки по умолчанию. В [3] описаны особенности реализации типовых операций, состав и реализация специальных операций проектирования. Реализация плоских схем трехмерных каркасных объектов (принято присваивать таким моделям размерность 2,5) ввиду относительно большого объема вычислений требует специализированного модельного, методического и математического подходов, в общем случае отсутствующих в двумерных графических редакторах САПР. Эти подходы, реализованные в САПР TechnoCAD GlassX, излагаются ниже. Системы координат Во всех системах координат единицей измерения являются миллиметры. В самом чертеже имеются системы координат Натура (Re) и Бумага (Pr), отличающиеся масштабом всего чертежа, указываемом в основной надписи. У экранной системы координат Sc ось X идет вправо, Y - вниз, единица измерения - пиксел. Специально для АСТС вводятся дополнительные декартовы системы координат. ReIn - правая трехмерная. Соответствует представлению концов труб в реальном трехмерном пространстве. Начало координат задается точкой привязки АСТС в чертеже. Единица измерения - мм Натуры. ReVi - видимая трехмерная. Соответствует представлению концов труб и всех других элементов АСТС в трехмерном пространстве после всех смещений. Во всем совпадает с ReIn, но расстояния в ней не соответствуют реальным длинам, если действуют смещения. Смещения в АСТС с условным изображением длины труб разрешены соответствующими ГОСТами. Общие смещения действуют на полупространства, местные - на ветки труб, идущие от одной или нескольких параллельных труб. Li - библиотечная, двумерная. Соответствует представлению блоков (условных графических обозначений трубопроводной арматуры и элементов трубопроводов) в графической библиотеке АСТС. Начало координат является точкой привязки блока, ее координата вдоль трубы задается при привязке блока к трубе. Ось X является осью привязки блока к трубопроводу, совпадает с осью трубы после привязки. Вдоль этой оси задается отрезок, вырезаемый блоком на трубе при установке на нее. Единица измерения - мм Бумаги. Типы данных Используются четырехбайтные вещественные числа (Float), что продиктовано требованием компактности хранения АСТС. Вводятся типы данных: V2, V3 - векторы из 2 и 3 компонентов Float; M22, M32, M23, M33 - матрицы с соответствующим числом строк и столбцов из элементов Float. В терминах таких типов задаются направленные отрезки (V2, V2) в Li, Re, Pr, Sc и (V3, V3) в ReIn, ReVi; ориентированная плоскость в ReIn (V3, Float) - орт нормали в положительном направлении и координата плоскости на этом направлении; оператор проецирования (V2, M23) из ReIn и ReVi в Re, Pr, Li, Sc - линейное преобразование и сдвиг; аналогичные операторы размещения блока (V3, M32) из Li в ReIn и оператор перехода (V2, M22) из Li в Re, Pr, Sc. Общие принципы реализации операций над данными Состав и реализация операций над такими данными подчинены требованиями компактности и наглядности использующего их программного кода, а также быстродействия. Во всех случаях передача аргументов длиной более 4 байтов осуществляется по ссылке, а не по значению. Для использования одних и тех же процедур для векторов и строк/столбцов матриц в описании интерфейса аргументы указываются как нетипированные переменные. Состав основных операций Чтение и запись значений Float, расположенных в элементе массива с заданным номером. Проверки с заданной погрешностью равенства нулю и единице чисел Float, покомпонентного равенства векторов V2, V3. Обнуление, смена знака, сложение и вычитание векторов V2 и V3. Умножение векторов V2 и V3 на скаляр, умножение на скаляр заданного числа идущих подряд элементов Float. Скалярные произведения векторов V2 и V3. Скалярное произведение X: V2 на нормаль к Y: V2, получаемую путем поворота Y на 90° против часовой стрелки. Модуль этого произведения равен расстоянию от конца X до линии, продолжающей Y, если Y - орт. Вычисление длин и ортов векторов V2 и V3, расстояний между точками V2 и V3 и ортов направлений от одной к другой. Векторное умножение векторов V3. Определение скаляра k в формуле Y = k * X для коллинеарных X, Y: V3 с заданной погрешностью. Определение с заданной погрешностью индекса оси (1 - +X, 2 - +Y, 3 - +Z, -1 - -X, -2 - -Y, -3 - -Z), в направлении которой идет вектор V3. Обратная операция - вычисление орта оси по ее индексу и орта трубы по ее номеру в списке. Эта довольно необычная операция нужна для выяснения ориентации труб при нанесении цепных размеров в ReVi, и соответственно, при установке блоков на трубы. Дело в том, что выносные линии должны находиться в плоскости блока и одновременно идти вдоль одной из осей координат. Допустимый набор ориентации плоскостей блоков и размеров зависит от взаимного расположения трубы и осей координат ReIn. Умножение векторов на матрицы: M22*V2, M23*V3, M32*V2, M33*V3, M22*V2. Умножение матриц M23*M32 => M22. Вычисление определителя матрицы M22. Пересчеты координат точек V3 при переходах между системами координат ReIn и ReVi с учетом общих, местных и всех смещений. Пересчет координат точек V3 из ReVi в систему координат Бумага чертежа. Проверка того, что матрица M23 проецирования из ReVi в Pr превращает плоскость, образуемую двумя непараллельными ненулевыми векторами M3Rec, в прямую линию. Приведенные сведения могут быть полезны при разработке программных средств, оперирующих в пространстве размерности 2,5. Литература 1. Мигунов В.В. Модульная технология разработки проблемноориентированных расширений САПР реконструкции предприятия / Материалы Второй международной электронной научно-технической конференции "Технологическая системотехника" (ТСТ'2003), г.Тула, 01.09.2003-30.10.2003 [Электронный ресурс] / Тульский государственный университет. – Режим доступа: http://www.tsu.tula.ru/aim/, свободный. – Загл. с экрана. – Яз. рус., англ. 2. Мигунов В.В., Кафиятуллов Р.Р., Сафин И.Т. Модульная технология разработки расширений САПР. Аксонометрические схемы трубопроводов. Параметрическое представление / Там же. 3. Сафин И.Т., Мигунов В.В., Кафиятуллов Р.Р. Модульная технология разработки расширений САПР. Аксонометрические схемы трубопроводов. Типовые и специальные операции / Там же. Мигунов Владимир Владимирович; к.т.н.; ст. науч. сотр.; член-корр. Международной академии информатизации; нач. отдела инф-х технологий Центра экономических и социальных исследований Республики Татарстан; 420088 Казань, Губкина, д.50; (8432) 73-37-14; [email protected].
5cs.CE
Karlsruhe October 03 2012 Revised: March 03 2017 The field Q(2 cos π n  ), its Galois group, and length ratios in the regular n-gon arXiv:1210.1018v2 [math.GR] 7 Mar 2017 Wolfdieter L a n g 1 Abstract π  The normal field extension Q(ρ(n)), with the algebraic number ρ(n) := 2 cos , for n ∈ N, n is related to ratios of the lengths between diagonals and the side of a regular n−gon. This has been considered in a paper by P. Steinbach. These ratios, numbered k = 1, ..., n−1, are given by Chebyshev polynomials S(k − 1, x = ρ(n)). The product formula for these ratios was found by Steinbach and is re-derived here from a known formula for the product of Chebyshev S−polynomials. It is shown that it follows also from the S−polynomial recurrence and certain rules following from the trigonometric nature of the argument x = ρ(n). The minimal integer polynomial C(n, x) for ρ(n) is presented, and its simple zeros are expressed in the power-basis of Q(ρ(n)). Also the positive zeros of the Chebyshev polynomial S(k − 1, ρ(n)) are rewritten in this basis. The number of positive and negative zeros of C(n, x) is determined. The coefficient C(n, 0) is computed for special classes of n values. Theorems on C(n, x) in terms of monic integer Chebyshev polynomials of the first kind (called here t̂) are given. These polynomials can be factorized in terms of the minimal C-polynomials. A conjecture on the discriminant of these polynomials is made. The Galois group is either Zδ(n) , the cyclic group of the order given by the degree δ(n) of C(n, x), or it is a direct product of certain cyclic groups. In order to determine the cycle structure a novel modular multiplication, called Modd n is introduced. On the reduced odd residue system Modd n this furnishes a group which is isomorphic to this Galois group. 1 Introduction and Summary Length ratios between diagonals and the side of a regular n−gon (called diagonal/side ratios, abbreviated DSRs) have been considered by Steinbach [29]. He gave a product formula for these ratios (called by him diagonal product formula (DPF)), and for √ the pentagon and heptagon details were given. In the pentagon case the quadratic number field Q( 5) with the basis < 1, ϕ > for integers of this field turns up. Here ϕ, the golden section, is identified with ρ(5) which is the length ratio between any of the two diagonals and the pentagon side. For the heptagon there are two different diagonal length and the two ratios between them and the side length have been called ρ := ρ(7) and σ. The DPF allowed to reduce all products and quotients of ρ and σ to Q-vectors with the basis < 1, ρ, σ > . For example, ρ2 = 1 + σ, and one can use instead the power basis < 1, ρ, ρ2 > of the algebraic number field Q(ρ(7)) (the use of the same acute bracket notation for different bases should not lead to a confusion). The minimal polynomial of ρ(7), in the present work called C(7,x), is x3 − x2 − 2 x + 1, and this was also given in [29]. Therefore, [Q(ρ(7)) : Q] = 3, which is the degree of this field extension. For odd n, n = 2 k + 1, Steinbach gave a polynomial with one of its roots ρ(2 k + 1). In the present work the minimal   polynomial for ρ(n), 2π called C(n,x), for every n ∈ N, is given in terms of the known one for cos , called Ψ(N, x), with N N = 2 n. The connection between Ψ(N, x) and divisor product representations of N , and to Chebyshev T −polynomials has been worked out earlier by the author. See the links under OEIS [27] A181875 and A007955 (in the sequel OEIS Anumbers will appear without repeating this reference). C(n, x) turns out 1 [email protected], http://https://www.itp.kit.edu/~ wl 1 to be an integer polynomials of degree δ(n) = A055034(n). All its zeros are known, and they are simple. Q(ρ(n)) is the splitting field for the minimal polynomial C(n, x) of ρ(n). It is a normal extension of the rational field. These C-polynomial zeros are written in the power basis of Q(ρ(n)) with the help of certain scaled Cheyshev T −polynomials (called here t̂ with their integer coefficient array A128672). This array can also be used to rewrite the positive zeros of the Chebyshev S(n − 1, x) polynomial, related to the DSRs, in this power basis. The use of S−polynomial technology allows also for a re-derivation of the product formulae (DPF) for the length ratios between the regular n−gon diagonals and side. In section 2 S(k − 1, ρ(n)) is shown to yield the DSRs of the regular n-gon. The DPF is also re-derived there, and the independent products are extracted. This is called reduced algebra over Q. In section 3 the minimal polynomial C(n, x) is presented, and its zeros are related to the power basis of the algebraic number field Q(ρ(n)). In section 4 the Q-automorphisms of this field, the Galois group G(Q(ρ(n))/Q), is treated. It is the cyclic group Zδ(n) , except for infinitely many n-values where it is the direct product of cyclic groups, hence non-cyclic. For n from 1..100 there are 30 non-cyclic groups. A novel modular multiplication on the odd numbers, called Modd n, is introduced which serves to determine the cycle graph structure of this Galois group. The multiplicative group Modd n is isomorphic to this Galois group. On the reduced odd residue system Modd n this multiplicative group is isomorphic to the Galois group. 2 Regular polygon diagonals/side ratios (DSRs) Motivated by a paper of Steinbach [29] we consider the diagonals and the side in the regular n−gon (n) (inscribed in the unit circle). The vertices on the unit circle are called Vk , k = 0, ...., n − 1, n= 2, 3, ...; π (n) . The V0 has coordinates (1, 0); the side length (with the radius’ length 1 unit) is s(n) = 2 sin n   πk (n) (n) (n) length of V0 Vk is dk = 2 sin , for k = 1, ..., n − 1, hence d1 = s(n). We only need one side n and the diagonals in the upper half plane, i.e. it suffices to consider k ∈ {1, ..., ⌊n/2⌋}. For even n, the n largest diagonal (k = ), of length 2, lies on the negative real axis. See Fig. 1, and Fig. 2, for the case 2 n = 10 (decagon), and for n = 11 (hendecagon), respectively. The length ratios of interest, the DSRs, (n) d (n) are Rk = k(n) for the given k−values. Here Chebyshev S−polynomials in their trigonometric form d1 enter the stage (see A049310 for their coefficients): (n) Rk = S(k − 1, ρ(n)), (1) (n) where we use the second ratio (for the smallest diagonal) ρ(n) := R2 π  . Remember that n S(n, x) := U (n, x/2) with Cheyshev U −polynomial  (second kind). It is well known that the zeros of the    kπ (n−1) , for k = 1, ..., n−1 polynomials S(n − 1, x) are xk,± = ±2 cos . Note that in the even n case 2 n the zero x = 0 appears twice from ±0. The S−polynomials are orthogonal polynomials defined on the real interval [−2, +2]. Hence their zeros are guaranteed to be simple. They belong to the Jacobi class. Due to (anti)symmetry it is sufficient to consider only the positive zeros (we disregard x = 0 in the even n case). Now also Chebyshev T −polynomials (first kind; see the coefficient table A053120) enter, which are written in terms of S−polynomials. (The T −polynomials appear as trace polynomials in a 2 × 2 transfer matrix when one solves the three term recurrences of these classical orthogonal polynomials.) (n−1) xk (n−1) ≡ xk,+ = = = 2 cos 2 T (k, ρ(n)/2) =: t̂k (ρ(n)) ≡ t̂(k, ρ(n))   n−1 . S(k, ρ(n)) − S(k − 2, ρ(n)) , k = 1, ..., 2 2 (2) (3) Note that these positive zeros decrease with k, and that t̂k is an integer polynomial of degree k because the S−polynomials are integer. The coefficient array for these monic t̂-polynomials is A127672. In [1] these polynomials are called Chebyshev C-polynomials, but we use the letter C for the minimal polynomials of ρ(n). The zeros can be replaced by DSRs from the above given eq. (1). Positive zeros of S(n − 1, x) from DSRs: (n−1) xk Figure 1: Decagon n = 10 (n) (n) = Rk+1 − Rk−1 . (4) Figure 2: Hendecagon (n=11) As an aside we give the factorization of S(n − 1, x) in terms of the polynomial   k  Y lπ P (k, x) := with positive zeros. x − 2 cos 2k + 1 l=1 S(n − 1, x) = xΘ(n−1) P       n−1 n−1 n−1 , x (−1)⌊ 2 ⌋ P , −x , 2 2 (5) where θ(n − 1) := 0 if n is odd, and 1 if n is even. This factorization is also considered in [4] for the U (n, x) polynomials for even and odd n separately. For example, for the heptagon n = 7 one finds the factorization of S(6, x) with the following real polynomial P (3, x). P (3, x) = x3 − (2 σ(7) − 1) x2 + 2 ρ(7) x − 1 , (7) (7) (6) with ρ(7) = R2 and σ(7) := R3 (see also the introduction). The three positive zeros are, written in terms of the DSRs, ρ(7), σ(7) − 1 and σ(7) − ρ(7). Here we used the general translation formulae eq. (4) to rewrite the positive zeros of S(n − 1, x) in terms of DSRs. One should also write this in terms of powers of  the  help of eq. (1) (see eq. (7) below). ρ(7) with   n−1 + 1)-term recurrence , x can be considered as characteristic polynomial for a ( n−1 Each P 2 2 ∞ sequence {fk }k=0 in the integral domain of Q(ρ(n)) (represented by a δ(n)-tuple of ordinary (rational) integers (A1,k , A2,k , ..., Aδ(n),k ). Here δ(n) is the degree of the minimal polynomial of ρ(n) which will be   such δ(n)-tuple sequences corresponding to the independent discussed in sect. 3. In fact, one has n−1 2 inputs. As a simple example take the n = 5 pair (δ(5) = 2) of sequences corresponding √ to P (2, x) = 5) = A1,k 1 + x2 − (2 ϕ − 1) x + 1, with√ the golden section ϕ := ρ(5) and the simplest input. This is S(k, √ k A2,k ϕ with input S(−1, 5) = 0, S(0, 5) = 1. See A005013(k + 1) (−1) , and 2 A147600(k − 1), for A1,k and A2,k , respectively. 3 For later it is also useful to give a dictionary between the positive zeros of S(n − 1, x), i.e. those  n−1purposes  of P ( 2 , x), and powers of ρ(n). One direction follows from the above given formula, eq. (2), for (n−1) xk in terms of the monic integer polynomials t̂(k, ρ) = 2 T (k, ρ/2). The dependence on n has here been omitted. k ⌊X   2⌋ (n−1) l k−l (−1) = Positive zeros of S(n − 1, x) from ρ(n)-powers: xk ρ(n)k−2l . (7) l l=0 The coefficients are given in the triangle A127672. E.g., x5 = 5 ρ − 5 ρ3 + ρ5 (omitting n). For the heptagon this shows that the three positive zeros of S(6, x) are ρ(7), σ(7) − 1 = ρ2 (7) − 2 and σ(7) − ρ(7) = ρ(7)2 − ρ(7) − 1 . In this case these three zeros could be used as a Q-vector space basis. Note that the n dependence is via the t̂-polynomial variable ρ(n) (which satisfies C(n, ρ(n)) = 0 by definition of the minimal polynomial C). For example, it is true for all n that the second largest positive (n−1) (n) zero of S(n − 1, x), namely x2 , is always ρ(n)2 − 2. Hence, from above, R3 − 1 = ρ(n)2 − 2; or (n) if one calls R3 =: σ(n) then ρ(n)2 = σ(n) + 1. This has been noted for n = 7 above but is holds in general, showing that σ(n) is algebraically dependent on ρ(n). This fact has been observed already in [29] where it appeared as a special product formula (see the later DPF eq. (13), m = k = 2, or eq. (11) with k = 2). The inverse formulae (DSRs in terms of ρ-powers) have already been given above in eq. (1). Here one (n) uses the S-triangle A049310 for the translation. E.g., R4 = −2 ρ(n) + ρ3 (n) = ρ(n) (ρ(n)2 − 2) (n) = ρ(n) (σ(n) − 1) . Of course, R4 is interesting only for n ≥ 9 because only then the corresponding diagonal lies in the upper half-plane (including the negative real axis).     , is less or equal to n2 , the number Note that the number of positive zeros of S(n − 1, x), i.e., n−1 2 of DSRs for diagonals in the upper half plane including the negative real axis. The zero x = 1 never appears. As can be seen in the n = 7 case these zeros can nevertheless be used as Q-vector space basis (in sect. 3 it will become clear that the degree δ(7) is also 3). In the case n = 9 the two numbers are both 4, but the degree δ(9) is 3, hence only three of the zeros and three of the DSRs are rationally independent. (8) (8) (8) (9) (9) (9) To wit: x(8) = −5 x3 + 3 x1 − 4 x2 and R4 = R1 + R2 = 1 + ρ(9). Because of symmetry k DSRs for diagonals of the upper half plane (including the negative real axis), j nonly } , are of interest. The reduction for other k values, also negative ones, is i.e., k ∈ {0, 1, ..., 2 accomplished by the rules jnk (n) (n) (n) (n) (n) (n) o) Rn+k = −Rk , i) R−|k| = −R|k| , ii) for k ∈ { + 1, ..., n} : Rk = Rn−k . (8) 2 These rules follow from eq. (1) with the trigonometric definition (with the specific value of ρ(n)) of the S-polynomials, and therefore also negative values for the DSRs show up (the interesting DSRs are, of course, positive). i) follows also from S(−|n|, x) = −S(|n| − 2, x) which derives from a backward use of the recurrence (given later in eq. (12)). This rule does therefore not depend on the special choice of the variable x, in contrast to the rules o) and ii). With negative k one counts the diagonals in the clockwise direction. ii) is used to translate from the lower to the upper half-plane. The product formula for Chebyshev S-polynomials of different degree, but with the same argument, is well known. See e.g., [1], p.782, 22.7.25, for the U -polynomials, and replace the T -polynomials by the S-polynomials via the trace formula given in eqs (2) and (3). S(m − 1, x) S(n − 1, x) = 1 4 (( x2 )2 − 1) [S(n + m, x) − S(n + m − 2, x) − S(n − m, x) + S(n − m − 2, x) ] n ≥ m . 4 (9) (n) For our purpose x = ρ(n) = R2 6= ±2 but its special form is for this formula not of interest . It is in fact symmetric under exchange of n with m if the rules for negative indices on the S-polynomials, stated above, are employed. Here we restrict to n ≥ m in order to have non-negative indices. Thus the product formula for the DSRs, now with x = ρ(n), but without using its specific value, is (n) (n) (n) (4 − (R2 )2 ) Rm Rk (n) (n) (n) (n) = Rk−m+1 − Rk−m−1 − Rk+m+1 + Rk+m−1 , k ≥ m > 0 . (10) For m = 0 this becomes trivial. This is not yet the DPF given by Steinbach in [29] which linearizes (n) (n) the product of Rm Rk . In order to eliminate the pre-factor (4 − ρ(n)2 ) one can use the three term recurrence relation of the orthogonal S-polynomials, written for the DSRs by eq. (1) as a special product formula (n) (n) (n) (n) (11) [Rec, k](n) : R2 Rk = Rk+1 + Rk−1 , k ≥ 0 . From now on we also use the specific form of ρ(n). Thus also rules o) and ii) of eq. (8) will be (n) (n) applicable. For k = 0 one uses (see ii)) R−1 = − R1 = −1, and it becomes trivial. For k = 2 (n) it shows that ρ(n)2 = σ(n) + 1 for all n, if one uses σ(n) := R3 . This recurrence can now be (n) (n) (n) used twice as R2 (R2 Rk ) in eq. (10) to produce the following recurrence for two step differences of (n,m) (n) (n) Rm Rk =: pk ≡ pk (pk+2 − pk ) − (pk − pk−2 ) = ck − ck−2 , (n,m) (12) (n) (n) := Rk+m+1 − Rk−m+1 . This shows that pk+2 − pk − ck where we used the abbreviation ck ≡ ck is k independent. From the inputs p2 − p0 − c0 = 0, due to the recurrence relation eq. (11), and p1 − p−1 − c−1 = 0 with the help of the rule i) from eq. (8), this leads to the recurrence pk+2 − pk = ck , (n) with the inputs p0 = 0 and p1 = −p1 = Rm . The solution for pk is found for even and odd k separately, where again the rules for negative indices are employed. Both solutions can then be combined as (n) DPF [m, k] (n) (n) Rm Rk : = k−1 X j=0 (n) Rm+k−(2j+1) , 1 ≤ m ≤ k . (13) This is finally the DPF found by Steinbach in [29] and gives a linearization of the DSR products. We need only to consider m ≥ 2 (m = 1 becomes trivial), and due to the symmetry of this formula  n  under the transformation k → n − k (using the rules of eq. (8)) is suffices to consider k ∈ {1, 2, ... 2 }. Hence  n    2 one has only to consider the products for 2 ≤ m ≤ k ≤ n2 . 2 The DPF formula looks un-symmetric with respect to m ↔ k, but it is, in fact, symmetric because m−1 X (n) Rk+m−(2j+1) for k < m reduces, due to cancellations after using the rule i) from eq (8), to the j=0 expected sum with only k terms. One can see this for even and odd m > k separately, remembering (n) that R0 = 0 in the former case. The idea is to work out, for a  given  n ≥ 4, all DPFs of interest, using the rules from eq. (8), especially n 2 products as linear combinations of the DSRs. 2 Example 1: n = 7 heptagon, treated in detail in reference [29]. Here we recapitulate and link to OEIS [27] sequences (the analoga of Fibonacci numbers in the pentagon case). Superscripts and arguments 7 are suppressed. [2, 2]: ρ2 = σ + 1. [2, 3]: ρ σ = σ + ρ + 0. [3, 3]: σ 2 = ρ + σ + 1. Here, R5 = R2 was used. This shows that the Q-vector space basis is at most < 1, ρ, σ >. It will be shown to be indeed the heptagon basis in sect. 4, where the power basis will be used instead. With these DPFs one can compute all powers of interest in the heptagon basis < 1, ρ, σ > (this has already been done explicitely for σ in [29], p. 28). i) and ii) in order to write all 5 ρk = A052547(k − 2) 1 + A052547(k − 1) ρ + A006053(k) σ, k ≥ 0, ρ−k = A077998(k) 1 + A077998(k − 1) ρ − A006054(k + 1) σ, k ≥ 0 , σ k = A106803(k − 1) 1 + A006054(k − 1) ρ + A106803(k) σ, k ≥ 0, σ −k = (σ − ρ)k = A052547(k) 1 − A006053(k + 1) ρ − A052547(k − 1) σ, k ≥ 0, (ρ σ)k = (ρ + σ)k = A120757(k) 1 + —A006054(k − 1)| ρ + 4 A181879(k) σ, k ≥ 0, (ρ σ)−k = (ρ + σ)−k = A085810(k) 1 + (−1)k A181880(k − 2) ρ + (−1)k+1 A116423(k + 1) σ, k ≥ 0. 1 = A 1 + B ρ + σ and find with N (a, b, c) = a3 − b3 − c3 − One can also compute a1 + bρ + cρ 2 a b2 − a b c + a2 b + b2 c + 2 a2 c − a c2 + 2 b c2 A = C = 1 1 (a2 − b2 + a b + 2 a c − b c) , B = (b2 − c2 + a b) , N (a, b, c) N (a, b, c) 1 (c2 − b2 + a c − b c). N (a, b, c) (9) (9) (14) (15) (9) Example 2: n = 9 (Enneagon), where we use ρ = R2 , σ = R3 , τ = R4 . [2, 2] : ρ2 = 1 + σ, [2, 3] : ρσ = ρ + τ , [2, 4] : ρτ = σ + τ , [3, 3] : σ 2 = 1 + τ + σ, [3, 4] : σ τ = ρ + σ + τ , (n) [4, 4] : τ 2 = 1 + ρ + σ + τ . This DSR-algebra (over Q) shows that not all ratios (including R1 = 1) are linear independent: τ (ρ − 1) = σ = ρ2 − 1 = (ρ + 1) (ρ − 1), i.e., τ = ρ + 1. Therefore, ρ3 = ρ (σ + 1) = 2 ρ + τ + 2 = 3 ρ + 1 . In sect. 3 we will see that the algebraic number ρ(9) has degree 3, and its minimal polynomial is indeed C(9, x) = x3 − 3 x − 1. The enneagon basis is thus < 1, ρ, σ > which can be related to the power basis < 1, ρ, ρ2 > (remember that we use the same notation for different bases). The reduced DSR-algebra (the algebra modulo C(9, ρ) = 0 ) is ρ2 = 1 + σ, ρ σ = 1 + 2 ρ, and σ 2 = 2 + ρ + σ. (n) (n) Remark 1: [2, 2] in eq. (13) becomes (R2 )2 = R3 + 1, showing that for all interesting values n ≥ 4 (n) one has σ(n) := R3 = ρ(n)2 − 1 . This is known already from eq (1) for k = 3, and it will be used in (n) sect. 3 as R3 rewritten in terms of the power basis of Q(ρ(n)). (n) Remark 2: For n = 4 and n = 5 the second diagonal (defining R3 ) is not of interest because it is (5) (5) in the lower half plane. According to eq. (8), ii) R2 = R3 , hence σ(5) = ρ(5) and the general relation [2, 2] from eq.√(13) between σ(n) and ρ(n) leads to ρ(5) = ρ(5)2 − 1, the golden section formula 5)/2. In sect. 2 it will be seen that the minimal polynomial for ρ(5) is indeed ρ(5) = ϕ := (1 + 2 C(5, x) = x − x − 1. Instead of deriving the DPF from the product formula for S-polynomials and the rules of eq. (8) one can prove it directly by induction from the S−recurrence including negative indices in accordance with these rules. Proposition 1: The DPFs [m, k](n) , eq. (13) but now for all 2 ≤ m, 2 ≤ k, follow from the recurrence, eq. (11), and the rules i) and ii) from eq. (8). Proof: This is shown by double induction. First one shows this for given m ≥ 2 for all k ≥ 2 by induction over k. Then by induction over m for all k ≥ 2. The k-induction uses as starter [2, 2](n) which is the recurrence. Assume that [2, k′ ](n) is true for all k′ = 2, 3, ..., k − 1. Now (we omit the superscripts) R2 Rk = R2 (R2 Rk−1 − Rk−2 ) from the recurrence. Then use for both terms the induction hypothesis. Note that one obtains for the first term k − 1, and for the second one k − 2 terms. However, due to rule ii) only two terms survive in each case. (The same type of cancellation was at work when we remarked above on the symmetry of the DPF formula in m and k.) Therefore, one obtains R2 (Rk − Rk−2 + 0) − (Rk−1 − Rk−3 + 0) which becomes, after use of the recurrence applied twice, Rk+1 + Rk−1 . This is indeed the desired result for [2, k] if one uses again rule ii) to get a truncation of the sum after two terms. 6 The m-induction uses as starter [2, k] for all k ≥ 2, which has just been established. Then assume that [m′ , k] is true for all m′ = 2, 3, ..., m − 1. Rm Rk = R2 Rm−1 Rk − Rm−2 Rk from the recurrence. Assume the induction hypothesis for each term, obtaining, after use of the recurrence for the first sum, k−1 k−1 X X (Rm−2+k−(2j+1) which is indeed the assertion after cancellation (Rm+k−(2j+1) + Rm+k−2−(2j+1) ) − j=0 j=0 of the last two sums.  As mentioned in the example 2 the DSR-algebra turns sometimes out to be reducible because some DSRs can be expressed as rational linear combinations of other ones. Later it will become clear that this  n happens precisely whenever 2 − δ(n) > 0, and this is the number of linear dependent DSRs. See Table 1 for details for n = 3, ..., 12. We shall see in sects. 3 and 4 that it is simpler to use the power basis of Q(ρ(n)) and the minimal C(n, x)polynomials of the algebraic number ρ(n) instead of the DSR-algebra. Then one obtains automatically the reduced algebra. 3 Minimal polynomial of ρ(n), its zeros, absolute term and factorization The minimal polynomial of an algebraic number α of degree dα is the monic, minimal degree rational polynomial which has as root, or as one of its roots, α. This degree dα is 1 iff α is rational, and the minimal polynomial in this case is p(x) = x − α. For the notion ‘minimal polynomial of an algebraic number’ see, e.g., [22], p. 28 or [25] p. 13. π  ϕ(2 n) For the algebraic number ρ(n) := 2 cos , for n ∈ N, the degree is δ(1) = 1, and δ(n) = n 2 for n ≥ 2 , with Euler’s totient function ϕ(n) = A000010(n). This is the sequence A055034(n). The sequence of allowed δ values is given in A207333. The array with the indices of the polynomials for given allowed δ values is shown in A207334. Of course, δ is not multiplicative,  e.g., 2 = δ(6) 6= δ(3) δ(3) = 2π 1 · 1 = 1. These polynomials can be obtained from the ones of cos which are found, e.g., under n A181875/ A181876, and they have been called there Ψ(n, x). See also [17], and [22],Theorem 3.9, p. 37,  π  2π for the degree d(n) of these polynomials. From the trivial identity cos = cos one finds the n 2n π , called here C(n, x), from minimal polynomial of 2 cos n  x C(n, x) = 2δ(n) Ψ 2 n, . (16) 2 Therefore the above formula for δ(n) derives from d(2 n). These polynomials are given for n = 1, ..., 30 in Table 2, and the first 15 rows of their coefficient array are shown in Table 3. Concerning the parity of the degree δ one has the following lemma. Lemma 1: Parity of the degree δ δ(n) is odd iff n = 1, 2, and pe , with an odd prime p of the form 4 k + 3, k ∈ N0 , and e ≥ 1. Proof: The case n = 1 is clear by definition. For n = 2 one uses the prime number factorization n = N Y Q e −1 ej β−1 (pj − 1) pj j . 2β N p , with β ≥ 0 and e = 1. It follows from the definition that δ(n) = 2 j j=1 j j=1 For β ≥ 2 this is always even. For β = 0 one needs N = 1, otherwise this will be even. For N = 1 one p−1 needs to be odd, i.e., p = 4 k + 3 with k ∈ N0 . If β = 1 one needs N = 0 in order to have an 2 odd value. Thus n = 2.  7 In order to relate to sect. 2 we are interested here in n ≥ 4. It turns out that these polynomials are in fact integer (not only rational) polynomials. The proof will use the following lemma based on our divisor product representation paper [14]. Lemma 2: Minimal polynomial C(n, x) written as a rational function. C(n, x) = p(dp (n), x) , q(dq (n), x) (17) with monic integer polynomials p and q with a certain degree dp (n) and dq (n) = δp (n) − δ(n), respectively.  Proof: Ψ 2 n, x2 is obtained from the unique divisor product representation dpr(2 n) defined in [14] by replacing each a(k) in the numerator, as well as in the denominator, by t(k, x2 ) which is given as a difference of monic integer polynomials t̂ which have been defined already in eq. (2), multiplied with a certain prefactor.   1 k k t̂( + 1, x) − t̂( − 1, x) if k is even ,  k +1 2 2  22 x t(k, ) = (18)   2 k+1 1 k−1  k−1 t̂( , x) − t̂( , x) if k is odd . 2 2 +1 2 2 The monic Ψ(2 n, x) polynomials have degree d(2 n) (see e.g., [13]) which implies that all the prefactors in this replacement of the a(k)s in dpr(2 n) have to become 1/2d(2 n) . (This could be formulated as a a(1) 18+1 separate lemma). E.g., n = 34 with dpr(34) = a(34) a(17) a(2) has from the numerator the factor 1/2 and from the denominator 29+2 , fitting with 1/2d(34) because d(34) = 8. Therefore, one may in the calculation of C(n, x), found above from Ψ(2 n, x2 ), forget about these prefactors in the replacements altogether. Thus the numerator, resp. denominator, is a product of monic integer polynomials t̂ leading to the monic integer polynomials p, resp. q, of a certain degree dp (n), resp. dq (n). (One could give more details on these degrees but this is not important here. Trivially, dp (n) − dq (n) = d(2 n). For the given example n = 34: (18 + 1) − (9 + 2) = 8 from the degrees of the t̂ polynomials.) Because C(n,x) is a minimal polynomial this rational function allows polynomial division without remainder.  Proposition 2: C ∈ Z[x] π , is an integer monic polynomial. n Proof: From lemma 2 we have q(dq (n), x) C(n, x) = p(dp (n), x) which leads by induction to the result that the integer coefficients of the monic polynomials p and integer coefficients for the PN q imply PM l , C(M, x) := monic polynomial C. Call these monic polynomials q(N, x) := q x c xk and l k l=0 k=0 PN +M p(N + M, x) := pl xl with qN = 1, cM = 1 and pN +M = 1. Collecting terms for xN +M −j , for j = l=0 (0), 1, 2, ..., M , one obtains the formula for the C-coefficient cM −j in terms of lower indexed ones: cM −j = j X pN +M −j − cM −j−k qN −k . With this the inductive proof on j, using the integer coefficients of q, p and C(n, x), the minimal polynomial of ρ(n) = 2 cos k=1 the integer higher C-coefficients due to the induction hypothesis becomes obvious. The starting point is the trivial j = 0 case. Next we give all the zeros of C(n, x). This follows directly from the knowledge of all zeros of Ψ(2 n, x2 ) (see, e.g., [13], from p. 473 of [30]) Proposition 3: All zeros of C C(n, x) = n−1 Y k=1 gcd(k,2 n)=1  x − 2 cos 8  πk n  , n ∈ N. (19)  In the product the index k starts with 1 because gcd(0, 2 n) = 2n, and it stops at n − 1 for all n ≥ 2 because gcd(n, 2 n) = n. One has to omit the even k values > 0 which leads to (for n = 1 one takes only l = 0 in the following product) C(n, x) = ⌊ n−2 2 ⌋ Y l=0 gcd(2 l+1,n)=1  x − 2 cos  π (2 l + 1) n  . (20) Proof: This is a simple consequence of the mentioned known results for Ψ(2 n, x2 ). It implies, en passant, a formula for the known degree δ(n) (see A055034) in terms of the number of factors of this product.  The following proposition lists the nonnegative and negative zeros of C for prime n. A vanishing zero (which will be counted later as positive) appears only for n = 2. Proposition 4: Non-negative and negative zeros of C(p, x) i) If n = 2 then C(2, 0) = 0 , and this is the only case with a vanishing zero. ii) If n is an odd prime 1 (mod 4) then the number  of positive and negative zeros coincides, and this k+1 2 cos π k , with k values 1, 2, ..., n−1 = δ(n). . These zeros are (−1) number is n−1 4 n 2 iii) If n is an odd prime 3 (mod 4) then the number of positive zeros exceeds the number  of negative k+1 2 cos π k with k values ones by one, and the number of negative ones is n−3 . These zeros are (−1) 4 n n−1 1, 2, ..., n−3 2 , and an extra positive zero appears for k = 2 = δ(n) . Proof: i) Vanishing zeros require n ≡ 2 (mod 4) from nk = 12 and k odd in eq. (20). A vanishing zero appears for n = 2. For other such n values, n = 4 K + 2, K ≥ 1, the odd k = n2 > 1 divides n, hence it does not appear in the product of eq. (20). p−1 For odd primes n = p = 2 q + 1 the product in eq. (20) is unrestricted, and there are (q−1) + 1 = 2 ϕ(2 p) factors, in accordance with the degree δ(p) = . The cos function will produce negative zeros for 2 1 2l + 1 > , i.e., for 2 l ≥ q. p 2 ii) n = p = 4 K + 1 means that l = 0, 1, ..., K − 1 lead to positive zeros, and l = K, K + 1, ..., 2K − 1 n−1 to negative ones. In both cases there are K = such zeros. For the l values leading to negative 4     π π (2 l + 1) = − cos (p − (2 l + 1)) . In this way even multiples zeros one can use the formula cos p p π of appear, and one produces, counted backwards, beginning with the largest l value, the new values p 2, 4, ..., 2 K. This proves ii). As a test consider n = 13, K = 3: the 2 l + 1 values for the positive zeros are 1, 3, 5, and the ones for the negative ones are 7, 9, 11. The latter become (we use underlining to indicate that they come with a minus sign in the final formula) 6, 4, 2. Rearranged these values are 1, 2, 3, 4, 5, 6, as given in ii). iii) For n = p = 4 K + 3 a similar analysis leads to l = 0, 1, ..., K, and l = K + 1, ..., 2 K for positive, p− 3 , and the and negative zeros, respectively. This shows that the number of negative zeros is K = 4 number of positive ones exceeds the one for negative zeros by one. Again, the odd values leading to negative zeros are transformed to even ones 2, 4, ..., 2 K with a minus sign in front of 2 cos. Take, e.g., n = 19, K = 4, with the new k values of iii) 1, 2, 3, 4, 5, 6, 7, 8, 9.  For general values n one can also find the number of positive and negative zeros of C(n, x). In the non-prime or non-power-of-2 case the gcd restriction in the product excludes certain l values. Therefore one has to eliminate from the unrestricted 2 l + 1 values in the product of eq. (20) all odd multiples 9 for each odd prime dividing n. Multiples of 2 are irrelevant for even n , therefore only the odd primes dividing n are of interest. This shows that the prime factors of the squarefree kernel of n, denoted here by sqf k(n), i.e., the largest squarefree number dividing n (see A007947) will be of interest. This squarefree kernel is also known as radical of n, denoted by rad(n). We will denote the set of primes of this kernel by sqf kset(n), E.g., sqf kset(23 · 32 · 11) = {2, 3, 11}, sqf k(23 · 32 · 11) = 66 (strip off all exponents in the prime number factorization of n). Because one may encounter multiple counting (e.g., 15 is hit by the multiples of 3 as well as 5 for any n which has in its squarefree kernel set the primes 3 and 5, and which is larger than 16) one can employ PIE, the principle of inclusion-exclusion, e.g., [5], p. 134, to get a correct counting. Proposition 5: Number of positive and negative zeros of C(n, x) i) If n = 2m , m ≥ 1, one has for m = 1 a vanishing zero (see proposition 4 i)). For m ≥ 2 the number n of positive zeros, which is , coincides with the one for negative ones. This is in accordance with the 4 π  n n m m−1 degree δ(2 ) = 2 = . These zeros lie symmetric: ± 2 cos (2 l + 1) , l = 0, 1, ..., − 1. 2 n 4 ii) If n = 1 then there is only the negative zero −2. If n ≥ 3 is not a power of 2 then the number of positive zeros, called δ+ (n), is M (n) δ+ (n) = K(n) + X X r (−1) r=1 <i1 ,i2 ,...,ir >  1 2   L(n) − 1 , p i1 · · · p ir (21) where M (n) (sometimes called ω(n)) is in the odd n case the number of elements (cardinality) of the set sqf kset(n), denoted by |sqf kset(n)|, (see A001221). M (n) is for even n the number of odd primes in sqf kset(n), i.e., |sqf kset(n)|  − 1.  This is because multiples of 2 are irrelevant here. The sum M < i1 , i2 , ..., ir > extends over the combinations 1 ≤ i1 < i2 < ... < ir ≤ M . Only the odd r primes from the set sqf kset(n) enter. The values K(n) and L(n) depend on the parity of n and they are given by   n−2 α) n even : K(n) = , L(n) = 2 K(n) + 1 , (22) 4 n−3 n−5 , L(n) = 2 K(n) + 1 = , (23) β1) n odd, 1(mod 4) : K(n) = 4 2 n−1 n−3 , L(n) = 2 K(n) + 1 = . (24) β2) n odd, 3(mod 4) : K(n) = 4 2 Note that also negative values for the floor function may appear. In this way the pure prime case from proposition 4 is also included. iii) If n ≥ 3 is not a power of 2 then the number of negative zeros, called δ− (n), is M (n) δ− (n) = N (n) + X r=1 r (−1) X <i1 ,i2 ,...,ir >  1 2      1 P (n) L(n) − 1 − − 1 , (25) p i1 · · · p ir 2 p i1 · · · p ir where M (n) and L(n) are as above, and n−2 − α) n even : N (n) = 2 n−1 , β1) n odd, 1(mod 4) : N (n) = 4 β2) n odd, 3(mod 4) : N (n) = K(n) = 10  n−2 4  , P (n) = n − 1 , P (n) = n − 2, n−3 , 4 P (n) = n − 2. (26) (27) (28) Proof:   n−2 i) All l = 0, .., = 2m−1 − 1 values contribute to the product of eq. (20), compatible with the 2 n ϕ(2m ) = 2m−1 = . The negative zeros appear for 2 l + 1 = 2 2m−2 + 1, ..., n − 1, hence degree δ(2m ) = 2 2 there are n4 of them. With the cos formula given in the proof of proposition 4 ii) with p → n, they can be rewritten in the notation, also used in the above context, when read backwards, as 1, 3, ..., 2m−1 − 1. Therefore one obtains the same cos arguments like for the n4 positive zeros, only the overall sign is different. ii) For n ≥ 3, not a power of 2, one uses PIE to count the positive zeros. For this consider the odd multiples of some odd number a, say (2 k + 1) a, (only such multiples come up as 2 l + 1 values in the product (20)) up to kmax such that all positive zeros are reached.If the largest 2 l + 1 value in the  1  n̄ − 1 , and there are kmax + 1 of these product which leads to a positive zero is n̄, then kmax = 2 a odd multiples of a. In the following application of PIE a will be taken as any odd prime or product of odd primes from the set sqf kset(n). α) Case even n, not a power of 2: The counting of the positive  starts at level r = 0 with all  zeros n−2 + 1 of them (the l values are positive ones in the unrestricted product eq. (20). There are 4   n−2 0, 1, ..., ). In the next step, r = 1, all odd multiples of every odd prime pi1 in sqf kset(n) not 4  n−2 + 1 are discarded (there are M (n) such primes, where M (n) := |sqf kset(n)| − 1). exceeding 2 4  M (n)   X 1 L(n) − 1 + 1 with L(n) given in the proposition This leads to a subtraction of the form − 2 p i1 i1 =1 ii) α). Now double subtractions may have appeared and one adds, at step r = 2, all odd multiples of the product of two odd primes from sqf kset(n), call them pi1 pi2 with i1 < i2 (because no problem  of  X L(n) 1 − 1 + 1. over-subtraction appeared for i1 = i2 ). This leads to the term + 2 p i1 p i2 1 ≤ i1 <i2 ≤ M (n) Now one has to correct for triple products in the step r = 3 , etc., up to level r = M (n). This leads  to the formula given in part ii) α) if one observes that the +1 term in each r-sum becomes a M (n) r term because of the number of terms of this sum. Then, because the alternating sum over row M (n) in M (n) = 0), all these terms add up to −1 (the missing Pascal’s triangle (see A007318) vanishes ((1 − 1)  n−2 r = 0 term). Therefore the formula starts with , the K(n) value given in ii) α), and only the 4 floor term remains for each r-sum . β1) The counting of the positive zeros in the odd n case distinguishes the two cases 1 (mod 4) and 3 (mod 4). Here we discuss the former one. The procedure is the same as the one given for case α). One has just to determine the boundary values for the lmax value leading still to a positive zero. This is n−5 . Hence there are lmax + 1 such l values to start with at level lmax = K − 1, if n = 4 K + 1, i.e., 4  r = 0. Again the extra +1 can later be taken as r = 0 term M 0(n) for the vanishing alternating sum over row No. M (n) in Pascal’s triangle. Here M (n) := |sqf kset(n)|. Therefore the PIE formula starts n−5 n−3 with the K(n) given in β1) of the proposition. The L(n) of the PIE sum is now 2 + 1 = , 4 2 the largest 2 l + 1 value leading to a positive zero. β2) In the case M (n) := |sqf kset(n)|, n = 4 K + 3 the maximal 2 l + 1 value leading to a positive n−1 zero, the L(n) in the formula, is 2 K + 1 = , coming from the largest l value which is K. This K 2 is the K(n) in the formula claimed for this case β2). 11 iii) For the number of negative zeros the counting is done by finding all the odd multiples of odd primes, or products of them, which cover the 2 l + 1 range for the negative zeros. This is the difference of the number of such multiples for the whole range and the range for the positive zeros. α) If n is even, not a power of 2, the whole range is determined by lmax + 1 = n − 1. From the above ii) α) case one knows the corresponding   upper bound for the positive zeros, therefore the PIE formula n−2 n−2 has N (n) = ( + 1) − ( + 1), the number of factors in the unrestricted product which 2 4 lead to negative zeros,  which is the value claimed in the proposition iii) α). Accordingly, P (n) = n − 1 n−2 + 1 as given in eq. (26). and L(n) = 2 4 β1) In this n ≡ 1 (mod 4) case the maximal number 2 l + 1 in the product is n − 2, determining n−3 . There are P (n). The corresponding number L(n) for the positive zeros is taken from above as 2     n−3 n−5 n−1 N (n) = + 1 − + 1 = unrestricted factors in the product with negative 2 4 4 zeros. β2) In this n ≡ 3 (mod 4) case one has also P (n) = n − 2 like  for any odd  n. L(n) is taken  from the n−3 n−3 n−3 n−1 , and N (n) is obtained from + 1 − + 1 = . corresponding ii) case as 2 2 4 4  We give the first entries of the δ+ (n) and δ− (n) sequences. Remember that the vanishing zero for n = 2 is here counted as positive. The A-numbers given for δ− (2 k) and δ− (2 k) are conjectured. n even: δ+ (2 k), k = 1, 2, ...; A055034 : [1, 1, 1, 2, 2, 2, 3, 4, 3, 4, 5, 4, 6, 6, 4, 8, 8, 6, 9, 8, 6, 10, ...], δ− (2 k), k = 1, 2, ...; A055034 with first entry 0 : [0, 1, 1, 2, 2, 2, 3, 4, 3, 4, 5, 4, 6, 6, 4, 8, 8, 6, 9, 8, 6, 10, ...], n odd, 1(mod 4): δ+ (4 k + 1), k = 0, 1, ...; [1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, ...], δ− (4 k + 1), k = 0, 1, ...; [1, 1, 2, 3, 4, 4, 5, 7, 6, 9, 10, 6, 11, 13, 10, 15, 12, 12, 18, 16, 14, ...], n odd, 3(mod 4): δ+ (4 k + 3), k = 0, 1, ...; [1, 2, 3, 2, 5, 6, 5, 8, 6, 6, 11, 12, 8, 10, 15, 10, 17, 18, 10, 20, ...], δ− (4 k + 3), k = 0, 1, ...; [0, 1, 2, 2, 4, 5, 4, 7, 6, 6, 10, 11, 8, 10, 14, 8, 16, 17, 10, 19, 20, ...]. The start of the sequences for odd n is therefore δ+ (2 k + 1), k = 0, 1, ...; [0, 1, 1, 2, 1, 3, 3, 2, 4, 5, 2, 6, 5, 5, 7, 8, 4, 6, 9, 6, 10, 11, ...], δ− (2 k + 1), k = 0, 1, ...; [1, 0, 1, 1, 2, 2, 3, 2, 4, 4, 4, 5, 5, 4, 7, 7, 6, 6, 9, 6, 10, 10, 6, 11, ...]. Finally, combining for all n: δ+ (n), n = 1, 2, ...; A193376 : [0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 3, 2, 3, 3, 2, 4, 4, 3, 5, 4, 2, 5, 6, 4, 5, ...], δ− (n), n = 1, 2, ...; A193377 : [1, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 2, 4, 4, 3, 4, 4, 4, 5, 5, 4, 5, 6, ...]. On can check that δ(n) − (δ+ (n) + δ− (n)) vanishes in each case. Observe that from these examples it seems that δ+ (2 k) = δ− (2 k) = A055034(k) = δ(k) for k ≥ 2. ϕ(4 k) = 2 ϕ(2 k) for these k values. The latter eq., which This is compatible with δ(2 k) = 2 δ(k), i.e., 2 holds also for k = 1, can be checked by considering the two cases k = 2e(1) · (odd number) and k odd. ϕ(2) ). Recall that δ(2) = δ(1) = 1, because δ(1) was special (it is not 2 Zeros of C(n, x) in the power basis < ρ(n)0 = 1, ρ(n)1 , ..., ρ(n)δ(n)−1 > As will be explained in the next section, the minimal polynomial C(n, x) with degree δ(n) leads to the splitting field Q(ρ(n)) which is a simple field extension of the rational field Q, and the degree of Q(ρ(n)) 12 over Q, the dimension of Q(ρ(n)), considered as a vector space over Q, is just the degree of C. In standard notation [Q(ρ(n)) : Q] = δ(n). Therefore it is interesting to write the zeros of C  in the powerbasis π (n) (2 l + 1) , l ∈ for this Q-vector space. This task is accomplished by using for the zeros ξ̃l = cos n   n−2 (n) {0, 1, ..., } with gcd(2 l + 1, n) = 1 (see eq. (20)),the formula ξ̃l = t̂(2 l + 1, ρ(n)) = 2 T (2 l + 2 ρ(n) ) (compare with eq. (2)). Remember that the integer coefficient array for these t̂-polynomials is 1, 2 shown in A127672. Of course, one has to reduce this integer polynomials using C(n, ρ(n)) = 0, i.e., one has to replace ρ(n)δ(n) (and higher powers) by an integer polynomial of lower degree. This can be done on a computer and Table 4 has been found with the help of Maple13 [18]. For example, the zeros of C(15, x) (15) (15) (15) (15) are ξ̃1 = ρ(15), ξ̃2 = −2 + 3 ρ(15) + ρ(15)2 − ρ(15)3 , ξ˜3 = −1 − 4 ρ(15) + ρ(15)3 , ξ̃4 = 2 4 3 2 2 − ρ(15) . Here the reduction has been performed with ρ(15) → −ρ(15) + 4 ρ(15) + 4 ρ(15) − 1. One can check these zeros which have approximate values 1.956295201, 0.209056928, −1.338261216 and −1.827090913, respectively. We will call the zeros with increasing value ξ1 , ξ2 , ..., ξδ(n) . Our next objective is to compute C(n, 0) (the sign and the number multiplying x0 , also called the absolute term) and relate it first to the cyclotomic polynomial cy(n, x) (the minimal polynomial of the complex 2πi algebraic number e n , see e.g., [30] or [9], p. 149, Exercise 50 a and b), evaluated at x = −1, which is n−1 Y ϕ(n) cy(n, −1) = (−1) k (1 + e2π i n ) , n = 2, 3, ... (29) k=1 gcd(k,n)=1 We used the fact that the product in the definition of cy(n, x) has ϕ(n) factors (the degree as minimal polynomial). For n = 1 one has cy(1, −1) = −2, which fits this formula if one defines ϕ(1) := 1 and πi takes the undefined product as 1. One may rewrite this for n ≥ 2 by extracting e n , using for the sum of the ϕ(n) terms the formula 2 n2 n−1 X k = k=1 gcd(k,n)=1 ϕ(n) , n = 2, 3, ... n (30) This is a formula listed by R. Zumkeller under A023022 which is found in[2], p. 48, exercises 15 and 16, written such that both sides depend only on the distinct primes in the prime number factorization of n.  M (n)  Y X 1 n ϕ(n) 1− = = µ(d) , if n For the r.h.s. there is the well known formula [2], p. 27, n pj d j=1 d|n has the distinct prime factors pj , j = 1, 2, ..., M (n) = A001221(n) = |sqf kset(n)| (see above for the notion ‘squarefree kernel’). The Möbius function µ entered here (see A008683). The PIE proof of eq. (30), given in the appendix A, uses this form of ϕ(n). If one uses also ei π = −1 the rewritten eq. (29) becomes   n−1 Y ϕ(n) k 2 , n = 2, 3, .... (31) 2 cos π cy(n, −1) = (−1) n k=1 gcd(k,n)=1 This can also be related to a special Sylvester sequence. In general the complex cyclotomic Sylvesternumbers Sy(a, b; n) are related to the sequence with three term recurrence fn = √a fn−1 + b fn−2 , 2 2 which has characteristic √ polynomial x − a x − b with zeros α ≡ α(a, b) = (a + a + 4 b)/2 and β ≡ β(a, b) = (a − a2 + 4 b)/2. The definition is (see e.g., [19]) Sy(a, b; n) := n−1 Y k=1 gcd(k,n)=1 k (α − β e2π i n ) , n = 2, 3, ... 13 (32) For n = 1 one takes Sy(a, b; 1) = α − β. For our purpose the values are (a, b) = (0, −1), i.e., (α, β) = (i, −i), and Sy(0, −1; n) := (−1) n−1 Y ϕ(n) 2 k (1 + e2π i n ) , n = 2, 3, ..., (33) k=1 gcd(k,n)=1 with Sy(0, −1; 1) = 2 i. This can be rewritten, using again eq. (30) and ei π = −1, as ϕ(n) Sy(0, −1; n) = (−1) n−1 Y k=1 gcd(k,n)=1 Therefore Sy(0, −1; n) := (−1) ϕ(n) 2  k 2 cos π n  cy(n, −1) , n = 2, 3, .... One could also include the n = 1 case, with ϕ(1) := 1 if one takes After these preliminaries back to the number C(n, 0). Proposition 6: C(2 m, 0), m ∈ N C(2 m, 0) = (−1) ϕ(4 m) 2 + ϕ(2 m) , n = 2, 3, .... Sy(0, −1; 2 m) = (−1) ϕ(4 m) 2 + 1 iϕ(n) ϕ(2 m) 2 (34) (35) instead of the prefactor. cy(2 m, −1) , m ∈ N . (36) ϕ(4 m) , the degree 2 δ(2 m). Note that the restriction in the Sy(0, −1; 2 m) product is gcd(k, 2 m) = 1, while in the C(2 m, 0) product it is gcd(k, 4 m) = 1, but this just says that only odd ks can contribute in both cases, and those odd numbers ≤ 2 m − 1 dividing 4 m or 2 m have to be omitted. Both restrictions exclude the same odd numbers. Corollary 1: C(2 p, 0), p an odd a prime Proof: Use eqs. (19) and (35). The number of factors in eq. (19) with n = 2 m is For odd prime p : C(2 p, 0) = (−1) p−1 2 p.  (37) Proof: This follows immediately from eqs. (19) and (31) if one uses the known formulae cy(2 p, x) = cy(p, −x), cy(p, Y 1) = p, nand evaluates the ϕ functions to obtain the sign. This formula follows from cy(n, x) = (xd − 1)µ( d ) where the multiplicative Möbius function (with µ(p) = −1) enters (see, e.g., [9], exercise d|n 50 b., solution p.506). Proposition 7: C(2m , x), m ∈ N0 C(2m , x) = t̂(2m−1 , x) , m ∈ N, (38) with the integer polynomials t̂ defined in eqs. (2) and (3) in terms of Chebyshev T - or S−polynomials. Proof:  Use eq. (16) to the link [13], where it was shown in eq. (8) that  and the  Notexadded  m+1 x 2m−1 m−1 Ψ 2 , 2 = 2T 2 , =: t̂(2m−1 , x), for m = 1, 2, ... . It is clear that C(1, x) = x + 2. 2 2 This proposition will later be generalized in theorem 1A. Corollary 2: C(2m , 0), m ∈ N0 From the proposition 7 and the known fact that T (2 n, 0) = (−1)n follows that C(1, 0) = +2, C(2, 0) = 0, C(22 , 0) = −2, C(2m , 0) = +2, m ≥ 3 . (39) Note that a standard formula for the cyclotomic polynomials cy(2m , x) which involves divisors (see e.g., [9], p. 149, Exercise 50 b, with Ψm (x) ≡ cy(m, x)) leads to undetermined expressions for cy(2m , −1) if m ≥ 1. 14  For the following theorem 1A on a formula for C(n, x) for even n, based on the divisor product representation (dpr) of numbers [14], we need two lemmata. Lemma 3: Pairing in dpr(2 m) In the divisor product representation of an even number 2 m, m ∈ N, for each a-factor in the numerator (resp. denominator) one finds exactly one a-factor in the denominator (resp. numerator) with argument ratio either 1 : 2 or 2 : 1. Proof: Due to the ∗-multiplication property of dprs (see the theorem in [14]) it is sufficient to prove this lemma for dpr(2 p1 · · · pN ) with odd primes p1 , ..., pN . Indeed, if the prime factorization of 2 m is 2k+1 pe11 · · · peNN , with k ∈ N0 and odd primes pj and positive exponents ej , for j = 1, ..., N , then dpr(2 m) = (2k pe11 −1 · · · peNN −1 ) ∗ dpr(2 p1 · · · pN ) and the pairing property of the latter dpr will be preserved after multiplication of each argument. Now the proof of the pairing property for dpr(2 p1 · · · pN ) becomes elementary, once one splits the products in eq. (7) of [14] (note that N in this reference is now N + 1) into those a-factors which are even (i.e., contain the even prime 2) and those which are odd (i.e., those composed of only odd primes). Indicate a-factors with odd arguments, being the product of k odd primes, by ao (.(k).). Then any a-factor in the numerator (resp. denominator) with some even argument 2 n is found in the denominator (resp. numerator) exactly once with the argument   n. This is because for N }, say, a(2 pi1 · · · piN−2 j ), each factor in the numerator product Π a(2 .(N − 2 j).), with j ∈ {1, ..., 2 there is exactly one factor in the denominator product Π ao (.(N − 2 j).), namely the one which uses the same N − 2 j odd primes a(pi1 · · · piN−2 j ). Similarly, for each a-factor in the denominator product   N −1 Π a(2 .(N − (2 j + 1)).), with j ∈ {0, ..., }, there is exactly one factor in the numerator product 2 Π ao (.(N − (2 j + 1)).). The first factor in the numerator, a(2 p1 · · · pN ) (j = 0) is paired with the single odd argument a-factor of the first product in the denominator Π ao (.(N ).) = a(p1 · · · pN ) . Note, that the example for the primorial A002110(5) = 2310, given in [14], table 2 shows that the pairing occurs in general not between numerator and denominator factors at the same position, given the ordering prescription indicated by O (falling arguments) in eq. (7) in [14]. See the fifth position in the N = 5 case there. Recall also, for later purposes, that because dpr(2 m) has the same number of factors in the numerator and in the denominator, viz 2N ( this balance holds true for all dpr(n), n ≥ 2, due to proposition 5 in [14]), after the split into even and odd arguments the number of pairs with even argument in the numerator matches the one with even argument in the denominator. This will later lead to a balanced formula for C(2 m, x) in terms of t̂-polynomials (the same number of t̂s in the numerator and in the denominator, viz 2N −1 ). Lemma 4: n  n x S( n2 + 1, x) t̂( n2 + 1, x) − t̂( n2 − 1, x) = = t̂ , , x , for n ≡ 0 (mod 4) . = 2 T S( n4 − 1, x) 4 2 4 t̂( n4 + 1, x) − t̂( n4 − 1, x) (40) This identity involves the integer polynomials t̂ introduced earlier in eqs. (2) and (3). Proof: Use the known identity for Chebyshev polynomials, [20], p. 261, first line, specialized, T (m + 1, x) − x x T (m − 1, x) = 2 (x2 − 1) U (m − 1, x), written for x replaced by , with S(m − 1, x) = U (m − 1, ) 2 2 and the definition of the t̂-polynomials from eq. (2). For n ≡ 0 (mod 4) this identity can be used x in the numerator as well as in the denominator. The n−independent factor ( )2 − 1 drops out if 2 x 6= ±2. However, the lemma holds also for these x−values as can be seen after applying l’Hôpital’s rule, using the well known identity T ′ (x, n) = n U (n − 1, x). In the second to last step the well known 15   x S(m − 1, x) = S(2 m − 1, x) has been employed. identity, [20] p. 260, last line, written as 2 T m, 2  Theorem 1A: C(2 m, x), m ≥ 1, in terms of t̂-polynomials With the prime number factorization of 2 m = 2k pe11 · · · peNN with k ∈ N, odd primes pj and positive exponents ej , j = 1, ..., N , one has C(2 m, x) = t̂(2k−1 pe11 · · · peNN , x) Π t̂(2k−1 ∗ (N − 2)., x) Π tˆ(2k−1 ∗ (N − 4)., x) · · · . Π t̂(2k−1 ∗ (N − 1)., x) Π t̂(2k−1 ∗ (N − 3)., x) · · · (41) with t̂(2k−1 ∗ (0)., x) = t̂(2k−1 pe11 −1 pe22 −1 · · · peNN −1 , x), and the products Π t̂(2k−1 ∗ (K)., x) are over the N  factors with K primes from the set {p , p , ..., p } multiplied by pe1 −1 pe2 −1 · · · peN −1 , i.e., K1 2 N 1 2 N K eN −1 products of the form t̂(2k−1 pe11 −1 pe22 −1 · · · pN pi1 pi2 · · · piK , x). We used ∗ (k). instead of .(k). for the indices of the t̂ polynomials to remind one of the extra factor (without the powers of 2 because the even prime has been extracted everywhere) due to the ∗-multiplication. Before we give the proof an example will illustrate this theorem. Example 3: k = 1, N = 2 C(1350, x) = C(2 · 33 52 , x) = t̂(33 52 , x) t̂(32 5, x) t̂(675, x) tˆ(45, x) = . t̂(33 5, x) t̂(32 52 , x) t̂(135, x) tˆ(225, x) Proof: (42)  This is based on [14] applied for the minimal polynomials Ψ 4 m, x2 (see the definition for C(2 m, x) given in eq. (16)). Let 2k+1 pe11 · · · peNN be the prime number factorization for 4 m. Only the squarefree kernel 2 p1 · · · pN is important due to the theorem in [14] for the divisor product representations (dprs) and the ∗-multiplication. This means that one has to multiply after the computation of Ψ(2 p1 · · · pN ), using proposition 1 of [14], the first argument, the index in conventional notation, of each factor t(ni , x) in the the numerator, and of each t(mi , x) in the denominator (see [14], eq. (1)) with the number 2k pe11 −1 pe22 −1 · · · peNN −1 . Here the pairing lemma 3 is crucial which carries over to the indices of the tfactors in the numerator and denominator of [14], eq. (1). Because there is always at least one factor of 2 in the number which multiplies every t index after the ∗-multiplication, the pairing will occur always between which are 0 (mod 4) and 0 (mod 2). Then only the n even alternative in the definition   xindices from eq. (2) of [14], rewritten here as eq. (18), is relevant. Observe that the prefactors of t n, 2  n n  x x x  are not of interest, provided we take 2 T − T + 1, − 1, in this definition of t n, 2 2 2 2 2 n  n  which is the monic integer polynomial t̂ + 1, x − t̂ − 1, x . See eq. (18), and the discussion in 2 2 connection with lemma C(2m, x)is written here as a rational function of monic integer polynomials.  x2. . n x t (either in the numerator or denominator, depending on where the For each replaced t n, , 2 2 2 n  larger index appears), one can apply lemma 4. This is how for each such t-quotient one obtains t̂ ,x . 4 Here the fact that the larger index of a pair is always equivalent to 0 (mod 4) is important. From the structure of the numerator and denominator of the original dpr(2 m) with the separation of the even and odd a-arguments (which carries over to the t-indices), discussed in the proof of lemma 3, one now finds the numerators and denominators of the theorem. Just search the products for the even t-indices. E.g., Π t̂(2k−1 ∗ (N − 2)., x) in the numerator of the theorem originates from the quotient of products Π t(2 .(N − 2)., x2 ) before the ∗-multiplication has to be applied. This leads, with eq. (18) and lemma Π to (.(N − 2)., x2 )   k+1 2 k e1 −1 pe2 −1 · · · peN −1 , 4, to Π t̂ ∗ (N − 2)., x after multiplying each t̂ index in the product with 2 p1 2 N 4 where the ∗ reminds one to multiply each index with this number divided by 2k . 16 As announced at the end of the proof of lemma 3 the number of t̂ polynomials in the numerator is the same as the one for the denominator, viz 2N −1 , which is due to the sum in the Pascal-triangle A007318 row No. N over even, resp. odd numbered positions. Note that this theorem 1A, evaluated for x = 0 leads in general to undetermined expressions, remembern ing that t̂(n, 0) = 0 if n is odd, and 2 (−1) 2 if n is even. However, a correct evaluation (using l’Hôpital’s rule) has to reproduce the result known from corollary 2. The following factorization of the monic integer t̂-polynomials is related to theorem 1A. Theorem 1B: Factorization of t̂-polynomials in terms of the minimal C-polynomials Y Y t̂(n, x) = C(2 n/d, x) = C(2k+1 d, x) , d|op(n) (43) d|op(n) with op(n) = A000265(n), the odd part of n, and 2k is the largest power of 2 dividing n. The exponents are k = k(n) = A007814(n), k ∈ N0 . Before the proof we give an example. Example 4: n = 10 −2 + 25 x2 − 50 x4 + 35 x6 − 10 x8 + x10 = t̂(10, x) = C(20, x) C(4, x) = (x8 − 8 x6 + 19 x4 − 12 x2 + 1) (x2 − 2) . (44) Proof: This is modeled after a similar proof in [30]. It is clear that both sides are monic integer polynomials. See the definition of t̂ in eqs. (2), (3) and proposition 2. In order to check the degree we consider the even and odd n cases separately. If n = 2k(n) op(n) X X ϕ(2k+2 d) from the known degree δ of the δ(2k+1 d) = with k(n) = A007814(n) ≥ 1 then 2 d|op(n) d|op(n) C-polynomials, here for index > 1. Due to well known properties of the Euler totient function (see e.g., 2k(n)+2 − 2k(n)+1 [2], Theorem 2.5, (a) and (c), p. 28 and Theorem 2.2., p. 26) this leads to op(n) = n, 2 X ϕ(4 d) X the degree of t̂(n, x). In the odd case, if n = op(n) then = d = n, again the degree of 2 d|n d|n t̂(n, x).  π  (n) For the proof one compares the zeros of both sides. The zeros of t̂(n, x) are x̂l = 2 cos (2 l + 1) 2n for l = 0, 1, ..., n − 1. This is known from the zeros of the Chebyshev T -polynomials. The zeros  π for of the C(2k+1 d, x)-polynomials are used in the form given by eq. (20): 2 cos (2 l′ + 1) k+1 2 d l′ = 0, 1, ..., 2k d − 1, where gcd(2 l′ + 1, 2k+1 d) = 1, i.e., gcd(2 l′ + 1, d) = 1. Because the degrees match, it is sufficient to show that each zero of t̂(n, x) occurs on the r.h.s.. For n = 2k (n) op(n), with k(n) = A007814(n), consider gcd(2 l + 1, 2 n) = gcd(2 l + 1, 2k+1 op(n)) = gcd(2 l + 1, op(n)) = g (some 2l + 1 = odd number). Hence 2 l+1 = (2 l′ +1) g, with some l′ and op(n) = d g, i.e., d|op(n). Therefore 2n   ′ 2l + 1 π appears on the r.h.s. as one of the C(2k+1 d, x) zeros. . Thus the t̂(n, x) zero 2 cos (2 l + 1) k+1 2 d 2n . Remark 3: Derivation of Theorem 1A from Theorem 1B Theorem 1B can be used as recurrence for the C-polynomials in terms of the t̂-polynomials. This is 2π (see A181875/A181876 for their similar to the case treated in [30] for the minimal polynomials Ψ of n 17 coefficients). The solution of this recurrence has been given in [14]. Indeed, theorem 1A has been derived above from this solution. Originally we found theorem 1B starting from theorem 1A building up iteratively a formula for t̂(2k−1 pe11 · · · peNN , x) in terms of the C-polynomials. We give this formula as a corollary. Corollary 3: t̂-polynomials in terms of C-polynomials eN e2 e1 Y Y Y ··· C(2k pq11 pq22 · · · pqnN , x) , k = N, N ∈ N0 . t̂(2k−1 pe11 · · · peNN , x) = q1 =0 q2 =0 (45) qN =0 In order to find a simplified expression for C(2 m + 1, x), m ∈ N0 we need the following lemma in order t(even, x2 ) to rewrite the quotient , given the definition eq. (18). t(odd, x2 ) Lemma 5: for n = 2 M + 1, M ∈ N0 one has  x x t 2 n, x2 1 (x2 − 4) S(n − 1, x) M −n t̂(n + 1, 2 ) − t̂(n − 1, 2 )  √ = = 2 2M +1 (x − 2) S(2 M, 2 + x ) t n, x2 t̂(M + 1, x2 ) − t̂(M, x2 ) x + 2 S(n − 1, x) √ . = 2M +1 S(n − 1, 2 + x ) (46) (47) Here new important monic integer polynomials enter the stage: Definition 1: q-polynomials With n ∈ N0 define q(n, x) := S(2 n, x) √ . S(2 n, 2 + x ) (48) That this defines indeed monic integer polynomials of degree n is shown by the next lemma. Lemma 6: q(n, x) = (−1)n S(2 n , √ 2 − x ) = S(n, x) − S(n − 1, x) . (49) Proof: It is known from the o.g.f. of the Chebyshev S-polynomials that the bisection yields S(2 n, y) = S(n, y 2 − √ 2 2) + S(n S(2 n , x + 2 ) = S(n, x) + S(n − 1, x). With x replaced by −x one has √ − 1, y − 2), or n S(2 n, 2 − x ) = (−1) (S(n, x) − S(n − 1, x)) which explains the second equation of the lemma. Therefore one has to prove S(2 n, x) = S(n, x)2 − S(n − 1, x)2 . This identity can, for example, be proved using the o.g.f. for the square of the S-polynomials (for their coefficient table see A181878, also for the paper [15] given there as a link). This computation was based on the Binet-de Moivre 1 1+ z . The o.g.f. formula for the S−polynomials. This o.g.f. was found to be 1 − z 1 + (2 − x2 ) z + z 2 2 2 for {S(2 n, x)}∞ n=0 is (1 + z)/(1 + (2 − x ) z + z ) (from the bisection). Because the o.g.f. for 2 2 S(n, x) − S(n − 1, x) is (1 + z) times the one for S(n, x)2 the completion of the proof is then obvious.  Remark 4 : O.g.f. and coefficient array for the q-polynomials ∞ X q(n, x) z n = (1 − z)/(1 − x z + z 2 ) from the known o.g.f. From lemma 6 the o.g.f. Q(z, x) := n=0 of the S-polynomials. This shows that the q(n, x) coefficients constitute aRiordan-array (infinite lower  1− x x triangular ordinary convolution matrix), which is in standard notation , , meaning 2 2  m 1 + x 1 + x x 1− x . This is the triangle A130777 that the o.g.f. of the column No. m sequence is 2 1+ x 1 + x2 18 where moreinformation can be found. For example, the explicit form for the coefficients is Q(n, m) = n+m  n−m+1 2 (−1) 2 if n ≥ m ≥ 0 and 0 otherwise. m The pairing lemma 3 will also be used in the proof of the following theorem. Theorem 2A: C(n, x), n ≥ 3, odd, in terms of q-polynomials With the prime number factorization of n = pe11 · · · peNN with odd primes p1 , ..., pN and positive exponents ej , j = 1, ..., N , one has  Q   Q n/(pi1 pi2 )−1 n/(pi1 pi2 pi3 pi4 )−1 , x q , x , x ··· q q n−1 i1 <i2 i1 <i2 <i3 <i4 2 2 2  Q   . (50) C(n, x) = Q n/pi1 −1 n/(pi1 pi2 pi3 )−1 q , x , x · · · q i1 i1 <i2 <i3 2 2 Here each index ij of the products runs from 1 to N . Before we give the proof an examples will illustrates this theorem. Example 5: n = 32 · 5 = 45 C(45, x) = C(32 · 5, x) = q(22, x) q(1, x) . q(7, x) q(4, x) (51) This checks. Proof: This is analogous to the proof of theorem 1A. Again the dpr(2 n) representation, from which one derives Ψ(2 n, x), with the prime number factorization for the odd n, is considered. The ∗-multiplication property allows to consider dpr(2 p1 · · · pN ) with a subsequent multiplication of all arguments in the numerator and denominator by pe11 −1 · · · peNN −1 . Because of the paired numerator/denominator structure t(2 k, x2 ) due to lemma 3 one finds, either in the numerator or in the denominator quotients of the type t(k, x2 )   k+1 n−1 , x . Factors of powers of 2 are irrelevant which are up to a factor 2 2 (x + 2) equal to q 2 (they have to cancel) because on both sides of theorem monic polynomials appear. The factors of x − 2 also cancel because the number of q-polynomials in the numerator and denominator have also to match (see the remark at the end of the proof of lemma 3). This number is 2N−1 . The structure of the x polynomials in the numerator of the theorem originates from products with the even indexed t 2k, 2  x numerator after ∗- multiplication. Before this multiplication on has in the numerator t 2 p1 · · · pN , 2 and t−products over all possibilities  xto leave out 2, 4, ... of the odd primes from the set {p1 , ..., pN }. The and t−products over all possibilities to divide n by these 2, 4, ... ∗-multiplication then leads to t n, 2 odd primes. Together with the pairing partners from the denominator this leads to the q-polynomials given in the numerator of the theorem. A similar argument produces the denominator q-polynomials. The number of these q−polynomials in the numerator, viz 2N −1 , matches the one for the denominator.  Theorem 2B: Factorization of q-polynomials in terms of C-polynomials Y q(n, x) = C(d, x) , n ∈ N . (52) 1 < d|(2 n+1) Example 6: n = 17 q(17, x) = C(5, x) C(7, x) C(35, x) . This checks. Proof: 19 (53) This is again modeled after a similar proof in [30]. Compare this with the proof of theorem 1B. X ϕ(d) It is clear that both sides are monic integer polynomials, and the degree fits due to n = − 2 d|(2 n+1) 1 ϕ(1). See the properties of the Euler totient function mentioned above in the proof of theorem 1B. 2   2l + 1 (n) The zeros of q(n, x) are xl = 2 cos π , for l = 0, 1, ..., n − 1. This follows from definition 1 √ 2n + 1 and lemma 6 with the zeros of S(2 n, 2 − x ) which are known from those of Chebyshev S-polynomials. To show each  that  of these zeros appears on the r.h.s. for C(d, x) with some d|(2 n + 1), d 6= 1, i.e., as 2l′ + 1 d−3 2 cos π } and gcd(2l′ + 1, d) = 1 (see eq. 20), let gcd(2l + 1, 2n + for some l′ ∈ {0, 1, ..., q 2 1) = g, with some odd g with 2 n + 1 = d g. Then 2 l + 1 = (2 l′ + 1) g = (2 l′ + 1) 2n+1 d , and for each }.  l ∈ {0, 1, ..., n − 1} there is one l′ ∈ {0, 1, ... , d−3 2 Remark 5: Derivation of Theorem 2A from Theorem 2B Theorem 2B can be used as recurrence for the C-polynomials in terms of the q-polynomials. See the remark 3. We give the solution in the following corollary. Corollary 4: q-polynomials in terms of C-polynomials With the prime number factorization of 2 n + 1 = pe11 · · · peNN , with odd primes, n ∈ N, one has q(n, x) = e1 Y q1 =0 ··· eN Y C(pq11 · · · pqNN , x)/C(1, x) . qN =0 (54) The division by C(1, x) = x + 2 was necessary because not all qj -indices were originally allowed to vanish. These rational representations of C(n, x) do not lend itself to extraction of the value C(n, 0) because 0 undetermined quotients appear. In the following we give the absolute term of C for prime indices. 0 Proposition 8: C(p, 0) For n = p, a prime, one has    0 p−1 (−1) 4 C(p, 0) =  p+1  (−1) 4 if p = 2 , if p ≡ 1 (mod 4) , if p ≡ 3 (mod 4) . (55) Proof: In eq. (31) with n = p there is no gcd-restriction on the product. Therefore, one can use a known formula (see appendix B for a proof) n−1 Y k=1  2 cos π k n  =  n−1  (−1) 2  0 if n is odd, (56) if n is even, to obtain cy(2, −1) = 0 (which is also clear from the definition: cy(2, x) = x + 1), and for odd primes p−1 = +1. Because all k contribute in the product, one can use for even k the formula cy(p,    −1) = (−1) p − 2K 2K = − cos π which shows that one generates again all odd k contributions, howcos π p p p−3   2 2 Y 2l + 1 p−1 ever each with a minus sign. This leads to cy(p, −1) = (−1) = C(p, 0)2 . 2 cos π p l=0 20 Thus C(p, 0) = ±1. The sign of C(p, 0) is (−1)δ+ (p) from eq. (19) for n = p. This number δ+ (p) of p+1 positive zeros has been found in proposition 5 to be p−1 4 if p ≡ 1 (mod 4), and 4 if p ≡ 3 (mod 4). For C(2, 0) = 0, the sign is, of course, irrelevant.  We close this section with a conjecture on the discriminant of the C−polynomials. The discriminant of a monic polynomial p of degree n can be written as the square of the determinant of an n × n Van(n) (n) (n) dermonde matrix Vn (x1 , ..., xn ) with elements (Vn )i,j := (xi )j , = 1, ..., n and j = 0, ..., n − 1 (n) with the zeros xi of p . Here the δ(n) zeros of Cn are given in eq. (20). Another formula for the discriminant (see e.g., [26], Theorem 5.1, p. 218) is in terms of the derivative C ′ (n, x) and the zeδ(n) δ(n) (δ(n)−1) Y (n) 2 ros of C: (−1) C ′ (n, xi ). The result is the sequence Discr(C(n, x)) = A193681(n) = i=1 [1, 1, 1, 8, 5, 12, 49, 2048, 81, 2000, 14641, 2304, 371293, ...] for n ≥ 1. The following conjecture is on the senδ(n) quence q(n) = which is A215041, [1, 2, 3, 2, 5, 3, 7, 2, 9, 5, 11, 9, 13, 7, 45, 2, 17, 27, 19, 25, ...]. Discr(C(n, x)) Conjecture: explicit form of the q-sequence o) q(1) = 1 (clear). ! i) If n = 2k for k ∈ N then q(n) = 2. ! ii) If n = pk for odd prime p and k ∈ N then q(n) = p(p k−1 +1)/2 . kiN ki1 iii) if n = 2k2 p(i1 ) · · · p(iN ) with k2 ∈ N0 , the ij − th odd primes p(ij ), where 2 ≤ i1 < i2 < ... < iN , with N ∈ N if k2 6= 0 and N ≥ 2 if k2 = 0, then q(n) ! = N Y k2 −1 p(ij )2 ki −1 1 p(i1 ) ki −1 N ··· p(iN ) P (N,j) , with P (N, j) = j=1 = Y N Y l=1,l6=j p δ(n) p−1 . (p(il ) − 1) , (57) odd p|n ϕ(2 n) . This last formula does, however, not work in the 2 cases i) and ii). One can compare this formula with the proven one for the discriminant of the cyclotomic 1 polynomials (the minimal polynomials of exp(2 π ) (or any of the primitive n-th root of 1), as given in n [25], eq. (1) p. 297. For this (slightly rewritten) formula see also A004124 and A193679. The last eq. follows from the degree δ(n) = Example 7: 2 +1)/2 ii) p = p(4) = 7, k = 3: q(73 ) = q(343) = 7(7 iii) n = 23 ·32 ·7, q(n) = 2 2 32 ·3·6 72 ·3·2 = 1341068619663964900807. = 4316018525852839090954658176626149564980915348463203041. These values have been checked with the help of Maple13 [18]. Note added: The conversion of the C polynomials in terms of Chebyshev S polynomials (A049310) has been initiated by Ahmet Zahid Küçük and was finished together with the author. See A255237 for the details. 4 Splitting field Q(ρ(n)) for C(n, x), field extension and Galois group π  , n ∈ N, with minimal polynomial C(n, x) over Q of degree n δ(n), has been studied in sect. 3. Each of these polynomials, being minimal, is irreducible. All roots have been given in eq. (19) (or eq. (20)). C(n, x) is also separable because all of its roots are distinct. The algebraic number ρ(n) = 2 cos 21   πk = t̂(k, ρ(n)) (see eq. (2), and the coefficient array A127672), with the monic n integer t̂-polynomials, each zero can be written as integer linear combination in the vector space basis < 1, ρ(n), ρ(n)2 , ..., ρ(n)δ(n)−1 >, called the power basis. One has to reduce in t̂(k, ρ(n)) all powers ρ(n)p , p ≥ δ(n) with the help of the equation C(n, ρ(n)) = 0. See Table 4 for the zeros of C(n, x), n = 1, ..., 30 written in this power basis. Because 2 cos Example 8: n = 8 (octogon) p √ The δ(8)p = 4 zeros of C(8, x) = x4 − 4 x2 + 2 are, with ρ ≡ ρ(8) = 2 + 2, ± ρ and ±( − 3 ρ + √ ρ3 ) = ± 2 − 2. In this case the degree 4 coincides with the number of DSRs in the upper half plane and the negative real axis. This shows that the extension of the rational field Q, called Q(ρ(n)), obtained by adjoining just one algebraic element (called a simple field extension) is the splitting field (Zerfällungskörper in German) for the polynomial C(n, x). Note that even though the polynomial C(n, x) is from the ring Z[x] one Pδ(n)−1 needs Q(ρ(n)) with rational coefficients rj for the general element α = rj ρ(n)j . For example, j=0 1 ρ(8)−1 = 2ρ(8) − ρ(8)3 . Some references for field extensions and Galois Theory are [6], [12], chpts. V 2 and VI, [3], and the on-line lecture notes [16]. The dimension of of Q(ρ(n)) as a vector space over Q is δ(n). This is the degree of the extension, denoted usually by [Q(ρ(n)) : Q], and it coincides with the degree of the minimal polynomial for ρ(n). Of course, it is a proper extension only if δ(n) ≥ 2, i.e., for n ≥ 4. This extension of Q is separable, i.e., the minimal polynomial for the general algebraic number α given above is separable (has only distinct zeros). It is a normal field extension, meaning that every irreducible rational polynomial with one root in Q(ρ(n)) splits completely over Q(ρ(n)). See, e.g., [6], Theorem 5.24, p. 108. We now consider a subgroup of the group of automorphisms of Q(ρ(n)), called Aut(Q(ρ(n)), which consists of those elements σ which leave the subfield Q pointwise invariant (fixed point field Q): σ : Q(ρ(n)) → Q(ρ(n)), α 7→ σ(α), with σ(β) = β for all β ∈ Q. The subgroup of Aut(Q(ρ(n)) of these so-called Q-automorphisms is called the Galois group of Q(ρ(n)) over Q, denoted by Gal(Q(ρ(n))/Q). Occasionally we abbreviate this with Gn . In order to find the elements σ (we omit the label n) of this subgroup it is sufficient to know σ(ρ(n)), because of the usual rules for automorphisms: (i) σ(α + β) = σ(α) + σ(β), (ii) σ(α β) = σ(α) σ(β), and (iii) α 6= 0 ⇒ σ(α) 6= 0. Indeed, because of σ(1) = σ(12 ) = σ(1) σ(1), one has σ(1) = 1, and the images of products of ρ(n) are obtained from products of σ(ρ(n)). Applying σ on the equation C(n, ρ(n)) = 0 (minimal polynomial), leads to C(n, σ(ρ(n))) = 0, because the integer (rational) coefficients and 0 are invariant under the Q-automorphism σ we are looking for. Therefore we have exactly δ(n) distinct Q-automorphisms σj , j = 0, ..., δ(n) − 1, determined from the (n) distinct roots of C(n, σ(ρ(n))), viz σj (ρ(n)) = ξ̃j+1 with the zeros of C(n, x) ordered like in eq. (19) with (n) increasing k values (see the Table 4). By the same token C(n, σ(ξ̃j )) = 0, for j = 1, ..., δ(n) for every σ. Because all roots are distinct (separable C) this leads to an isomorphism between Gal(Q(ρ(n))/Q) and a subgroup of the symmetric group Sδ(n) . The Q-automorphisms σ can therefore be identified with (n) permutations of the roots of C (see e.g., [6] ch. 6.3, pp. 132 ff. One identifies the roots ξ˜j with j, and   1 2 ... δ(n) σj with the permutation ≡ [σj (1) σj (2) ... σj (δ(n))]. This subgroup of Sδ(n) is σj (1) σj (2) ... σj (δ(n)) Abelian because only products of powers of ρ(n) appear and due to the automorphism property of σ this carries over to the Galois group. Example 9: n = 5 (pentagon) Q-automorphisms α = r0 1 + r1 ρ(5) with √ Q(ϕ) is as quadratic number √ ρ(5) = ϕ, the golden section. In this case field usually called Q( 5) with the basis < 1, ϕ > for integers in Q( 5) (see e.g., [10], ch. 14.3, p. 22 207, where τ = (ϕ − 1)). The two (δ(5) = 2) Q-automorphisms are obtained from the solutions 1 σ(ϕ) = ϕ or − = 1 − ϕ of C(5, n) = x2 − x − 1. Hence σ0 = id : σ0 (1) = 1, σ0 (ϕ) = ϕ and ϕ σ1 : σ1 (1) = 1, σ1 (ϕ) = 1 − ϕ. Because σ12 = σ0 , G5 is generated by σ1 , hence the Galois group Gal(Q(ϕ)/Q) is the cyclic group Z2 (also known as additive group Z/2 Z or C2 , but we reserve C for the minimal polynomials). The fixed field for G5 is Q; for the trivial subgroup with element σ0 it is Q(ϕ). Example 10: n = 7 (heptagon) Q-automorphisms (7) (7) (7) The three zeros (δ(7) = 3) of C(7, n) are ξ̃1 = ρ(7), ξ˜2 = −1 − ρ(7) + ρ(7)2 and ξ˜3 = 2 − ρ(7)2 (see Table 4). In the sequel we omit the argument 7. Computing powers of ρ modulo C(7, ρ) = 0 one finds the Q-automorphisms σ0 = id, σ1 (ρ = ξ˜1 ) = ξ̃2 , σ1 (ξ̃2 ) = ξ̃3 , σ1 (ξ̃3 ) = ξ̃1 and σ2 (ρ = ξ̃1 ) = ξ˜3 , . σ2 (ξ̃2 ) = ξ̃1 , σ2 (ξ̃3 ) = ξ˜2 . Therefore, the identification with S3 permutations is σ0 = [1 2 3] = e, . . σ1 = [2 3 1] and σ2 = [3 1 2]. Each σj permutation can be depicted in a circle diagram with vertices labeled 1, 2 and 3 and directed edges, also allowing for loops. The only (Abelian) group of order three is the cyclic Z3 subgroup of S3 . We can also characterize these Galois groups Gn by giving their cycle structure and depict them as cycle graphs. For cycle graphs see, e.g., [31] “Cycle graph” and “List of small groups” with all cycle graphs for groups (also non-Abelian ones) of order 1, ... , 16. In order to manage powers of Galois group elements we first need some fundamental identities of Chebyshev T -polynomials, whence t̂-polynomials. We will need iterations of t̂ polynomials governed by the following well known identity. Lemma 7: Iteration of t̂-polynomials t̂(n, t̂(m, x)) = t̂(n m, x), n, m ∈ N0 . (58) Proof: See [26], Exercise 1.1.6, p. 5, first with the trigonometric definition of Chebyshev T-polynomials which then carries over to the general polynomials defined by their recurrence relation. This identity is then rewritten for t̂-polynomials.  Lemma 8: mod n reduction of t̂-polynomials in the variable ρ(n) k t̂(k, ρ(n)) = (−1)⌊ n ⌋ t̂(k(mod n), ρ(n)), n ∈ N, k ∈ Z . (59)     k (−1)⌊ n ⌋ =: pn (k), the parity of nk , will become important in the following. Sometimes nk is called quotient and denoted also by k\n.  π (l n + r) = Proof: This follows, with k = l n + r, trivially from the trigonometric identity cos n π   π r = (−1)l cos cos π l + r , with r ∈ {0, 1, ..., n−1}.  n n To simplify notation we will use also t̂n (x) for t̂(n, x). From lemmata 7 and 8 we have e.g., t̂3 (t3 (ρ(7))  = π 2 t̂9 (ρ(7)) = −t̂2 (ρ(7)) = −(ρ(7) − 2). This is also +t̂5 (ρ(7)) from the identity cos (n ± l) = n π  − cos l . This proves the following lemma. n Lemma 9: Symmetry relation of t̂ polynomials t̂(n − l, ρ(n)) = −t̂(l, ρ(n)) , n ∈ N, l ∈ {0, 1, ..., n} . (60) Lemma 7 which used the trigonometric ρ(n) definition can be rewritten as a congruence for the t̂polynomials with indeterminate x. This is because all what is needed is that ρ(n) is a zero of C(n, x). Corollary 5: Congruence for t̂ polynomials modulo C-polynomials k t̂(k, x) ≡ (−1)⌊ n ⌋ t̂(k(mod n), x) (mod C(n, x)) , n ∈ N, k ∈ Z . (61) An example will illustrate this before we give an another proof of this corollary based on known T polynomial identities. 23 Example 11: Congruence for n = 7, k = 9 t̂(9, x) = x9 − 9 x7 + 27 x5 − 30 x3 + 9 x and C(7, x) = x3 − x2 − 2 x + 1. Polynomial division shows that t̂(9, x) = (x6 + x5 − 6 x4 − 5 x3 + 9 x2 + 5 x − 2) C(7, x) + (−x2 + 2), hence t̂(9, x) ≡ −t̂(2, x) (mod C(7, x)). The alternative proof of corollary 5 is based on the following   factorization of Chebyshev S-polynomials 2π in terms of the minimal polynomials Ψ(n, x) of cos over Q (for these polynomials see A049310 n and A181875/A181876). Proposition 9: Factorization of S-polynomials in terms of Ψ-polynomials  x Y n−1 ,n ∈ N. Ψ d, S(n − 1, x) = 2 2 (62) 2<d | 2n As usual, the undefined (empty) product is defined to be 1. Proof: Start with the eq. (3) of [30], p. 471, written for n → 2 nand for the t̂-polynomials instead of Y x . Then use the identity [20], p. Ψ d, the T -polynomials. This is t̂(n + 1, x) − t̂(n − 1, x) = 2n+1 2 d|2 n 261, first line, with m → n, n → m and U -polynomials replaced by S−polynomials. This leads to the identity t̂(n + m, x) − t̂(n − m, x) = (x2 − 4) S(n − 1, x) S(m − 1, x) , m ≤ n ∈ N . (63) Here we only need the case m = 1. Then dividing out 2 Ψ(1, x2 ) = x − 2 and 2 Ψ(2, x2 ) = x + 2 leads to the claimed identity.  To end the preparation for an independent proof of corollary 5 we state: Corollary 6: C-polynomial divides some family of S-polynomials C(n, x) | S(l n − 1, x) , n ≥ 2, l ∈ N . (64) This is clear from the definition of C in eq. (16) and the fact that 2 < 2 n | 2 l n, for l ≥ 1. E.g., C(10, x) = x4 − 5 x2 + 5 divides the family {S(9, x), S(19, x), S(29, x), ...} Proof of corollary 5: From the corollary 6 and the identity eq. (63) with n → l n and m → r one sees that t̂(k, x) = t̂(l n + r, x) ≡ t̂(l n − r, x) (mod C(n, x)). Now t̂(l n − r, x) = t̂((l − 1) n + (n − r), x), and one can use l1 := l − 1 and r1 := n − r (remember that r ∈ {0, 1, ..., n − 1}, hence r1 has identical range) as new l and r variables in this congruence, to get t̂(l1 n + r1 , x) ≡ t̂(l1 n − r1 , x) (mod C(n, x)) = t̂((l − 2) n + r, x) (mod C(n, x)). This can be continued until one ends up with t̂(0 n + k(mod n), x) (mod C(n, x)).  Now we are in a position to compute powers of elements of the Galois group Gn . The subset of odd numbers 2 l + 1 < n entering the product in eq. (20) will be denoted by M(n). There are δ(n) (degree of C(n, x)) such odd numbers. Definition 2: The fundamental set M(n)      n−2 M(n) := 2 l + 1 l ∈ 0, ...., and gcd(2 l + 1, n) = 1 = {m1 (n), ..., mδ(n) (n)}, (65) 2 with m1 (n) = 1 and we use the order mi (n) < mj (n) if i < j. For n = 1 one takes M(1) = {1}. Example 12: |M(2)| = δ(2) = 1, M(2) = {1}; |M(14)| = δ(14) = 6 , M(14) = {1, 3, 5, 9, 11, 13}. For M(n) see the row No. n of the array A216319. c For later purpose we define here, for odd n, the extended fundamental set M(n) and its first difference c set △ M(n) c Definition 3: The fundamental extended set M(n) for odd n c For n odd, ≥ 1: M(n) := {0, m1 (n) = 1, ..., mδ(n) (n) = n − 2, n + 2} . 24 c Thus |M(n)| = δ(n) + 2. Note that gcd(n ± 2, n) = 1 for odd n (proof by assuming the contrary: gcd(n + 2, n) = d > 2 because n and n + 2 are odd. Then d | (n + 2) and d | n, hence d | ((n + 2) − n), d | 2, implying d = 2 or d = 1, but d > 2.) The reason for defining this extended set is that for odd n the c first difference set △ M(n) = {1, △m2 (n), ..., △mδ(n) (n), 4} with △mj (n) := mj (n) − mj−1 (n), will become important later on. △m1 (n) = 1 and △mδ(n)+1 (n) = 4 for each odd n. With definition 2 eq. (20) implies, σj (ρ(n)) = π  (n) (n) σj (ξ̃1 ) = ξ˜j+1 = 2 cos mj+1 (n) = n t̂(mj+1 (n), ρ(n)) for j ∈ {0, 1, ..., δ(n) − 1} . (66) E.g., n = 7: δ(7) = 3, M(7) = {1, 3, 5}, σ0 (ρ(7)) = ρ(7), σ1 (ρ(7)) = t̂(3, ρ(7)), and σ2 (ρ(7)) = t̂(5, ρ(7)). Because t̂ is a rational integer polynomial σj2 (ρ(n)) = σj (σj (ρ(n))) = t̂(mj+1 (n), σj (ρ(n))) = t̂(mj+1 (n), t̂(mj+1 , ρ(n))) , (67) and with lemma 6 this becomes σj2 (ρ(n)) = t̂((mj+1 (n))2 , ρ(n)). In general we have σjk (ρ(n)) = t̂((mj+1 (n))k , ρ(n)) , for j ∈ {0, 1, ..., δ(n) − 1} , n, k ∈ N . (68) Instead of powers of σj (ρ(n)) we can therefore consider powers of mj+1 (n). Lemmata 8 and 9 are now employed to prove that a t̂ polynomial with a product of elements from M(n) as its first argument (or index) is again a t̂ polynomial with first argument from M(n). In this way one can build sequences of powers, starting from any element of M(n). Trivially, 1k = 1. Before proving this closure of M(n) under powers, provided the rules for t̂ polynomials are taken into account, we give two examples, and n. then define a new equivalence relation on the integers, called (Modd n), denoted by ∼ Example 13: Cycle structure for n = 12 (dodecagon) δ(12) = 4, M(12) = {1, 5, 7, 11}. 52 = 25 ≡ 1 (mod 12), reflecting lemma 8. The sign pn (25) in eq. (59) is here +. (If later the sign will be − , the mod n result will be underlined.) The first 2-cycle is therefore [5, 1]. Similarly, 72 = 49 ≡ 1 (mod 12) (sign +), whence the second 2-cycle is [7, 1], and finally, 112 = 121 ≡ 1 (mod 12) (sign +), producing the third 2-cycle [11, 1]. This result appears as the n = 12 entry in Table 6. In this example the Galois group is not generated by one element. hence it is non-cyclic. In fact, Gal(Q(ρ(12))/Q) = Z2 × Z2 = Z22 (see first entry in Table 8). The corresponding cycle graph is shown in Figure 4 as the first entry, where the shaded (colored) vertex stands for 1 and the open vertices should here be labeled with 5, 7 and 11. The cycle structure is 23 (three 2-cycles). In this example it was not necessary to employ lemma 9 because the signs were always +. Example 14: Cycle structure for n = 7 (heptagon) δ(7) = 3, M(7) = {1, 3, 5}. 32 ≡ 2 (mod 7), where now the sign − in eq. (59) is remembered by the underlining. 2 ∈ / M(7), and now lemma 9 is used to rewrite this 2 as 7 − 2 = 5. Therefore, 2 7 7 (or M odd 7) is used for the congruence in the new 3 ∼ 5 ∈ M(7) (or 32 ≡ 5 (Modd 7)). The symbol ∼ sense, due to lemmata 8 and 9. Then 3 · 5 = 15 ≡ 1 (mod n) (sign +). The first 3-cycle is therefore [3, 5, 1]. Here 3 generates all the elements of M(7), and Gal(Q(ρ(7))/Q) = Z3 , the cyclic group of order 3 = δ(7). The corresponding cycle graph is a circle with three vertices, one of them, labeled 1, is shaded (colored) and the other two open ones are labeled by 3 and 5. n (or Modd n) over the integers Z. Remember This brings us to the definition of an equivalence relation ∼ that the floor function for negative arguments is defined as ⌊−x⌋ = − ⌊x⌋ if x ∈ N0 , and ⌊−x⌋ = −(⌊x⌋ + 1) if 0 < x ∈ / N. n on Z Definition 4: Equivalence relation ∼ 25 n l ⇔ an (k) = an (l), with the map an : Z → In := {0, 1, ..., n − 1}, k 7→ an (k), For k, l ∈ Z, n ∈ N: k ∼ where  if pn (k) = +1 ,  rn (k) an (k) = (69)  rn (−k) if pn (k) = −1 , where we used the division algorithm to write  k = qn (k) n + rn (k), with the quotient qn (k) ∈ Z and k k the residue rn (k) ∈ In . Note that qn (k) = . The sign pn (k) = (−1)⌊ n ⌋ = (−1)qn (k) corresponding n to the parity of qn (k), appeared already in lemma 8. an (1) = 0 because −1 ≡ 0 (mod 1). n l we also write k ≡ l (Modd n) (this should not to be confused with mod n). Therefore Instead of k ∼ the sequence an could also be called Modd n. The first of these 2 n-periodic sequences an are found in A000007(n + 1), n ≥ 0, (the 0-sequence), A000035, A193680, A193682, A203571, A203572 and A204453, for n = 1, ..., 7, respectively. The smallest non-negative residue system mod n, viz 0, 1, ..., n − 1 is used here. For the residue of k modulo n Maple [18] uses rn (k) = modp(k, n). We also use k(mod n) for rn (k). The reader should n is indeed an equivalence relation satisfying reflexivity, symmetry and transitivity. The verify that ∼ disjoint and exhaustive equivalence classes are given by {[0], [1], .., [n − 1]}, called the smallest nonnegative complete representative classes (or residue classes) Modd n (we omit the index n at the classes: [m] = n [m], written this way in order to distinguish this class from the ordinary one [m]n used in the n m} = {l ∈ Z | an (l) = m}. Because arithmetic mod n). These classes are defined by [m] = {l ∈ Z |l ∼ rn (−k) = 0 if k ≡ 0 (mod n) and rn (−k) = n − rn (k) if k 6≡ 0 (mod n) (later listed as lemma 17) one can characterize these residue classes also in the following way. Lemma 10: Complete residue classes Modd n l ∈ [0] ⇔ l ≡ 0 (mod n). Equivalently, [0] = [0]n , l ∈ [1] ⇔ l ≡ 1 (mod 2 n) or ≡ −1 (mod 2 n). Equivalently, [1] = [1]2 n ∪ [2 n − 1]2 n , .. . l ∈ [n − 1] ⇔ l ≡ n − 1 (mod 2 n) or ≡ −(n − 1) (mod 2 n). Equivalently, [n − 1] = [n − 1]2 n ∪ [n + 1]2 n . (70) For example, take n = 7, then [3] = 7[3] = [3]14 ∪ [14 − 3]14 = {..., −25, −11, 3, 17, ...} ∪ {... − 17, −3, 11, 25, ...} = {..., −25, −17, −11, −3, 3, 11, 17, 25, ...}. If n = 2 one has 2 [0] = [0]2 and 2[1] = [1]2 . The first differences in the class [0] are, of course, n, and in the class [m], for m = 1, 2, ..., n−1, they alternate between △1 = 2 (n − m) and △2 = 2 m, e.g., n = 7, m = 3, △1 = 8, △2 = 6 : 3, 11, 17, 25, 31, .... This difference alternation invalidates certain theorems known for mod n. E.g., Theorem 53 of reference [10], p. 50, is no longer true: take m = 5, n = 7, a = 3, b = 17. a and b belong both to the class 5[3] as well as 7[3] but they do obviously not both belong to the class 35 [3] . The following lemma 11 shows that is is sufficient to know the positive values, and append the negative of these values for each class [m], for m ∈ {0, 1, ..., n − 1}. Lemma 11: Antisymmetry of the classes [m], for m ∈ {0, ..., n − 1} For n ∈ N and every m ∈ {0, ..., n − 1} the elements of the equivalence class [m] are antisymmetric around 0. Proof: This is obvious for the class [0] = {...−2 n, −n, 0, n, 2 n, ...}. For m > 0 the negative of every positive numbers of m (mod 2 n) appears as a negative number of (2 n−m) (mod 2 n), and vice versa: the negative of every positive numbers of [2 n−m]2 n appears as a negative one of [m]2 n . This is true because −(m+ l 2 n) = (2 n − m) − (l + 1) 2 n, for every l ∈ N, and similarly, −((2 n − m) + l 2 n) = m − (l + 1) 2 n, for every l ∈ N.  This leads immediately to the following corollary. 26 Corollary 7: Non-negative elements of the classes [m] For n ∈ N and every m ∈ {0, ..., n − 1} one has [m]≥ = [m]2 n,≥ ∪ [2 n − m]2 n,> , and [m] = [m]≥ ∪ −([m]> ) . (71) Here we used the notations [m]≥ and [ · ]2 n,≥ or [ · ]2 n,> to denote the subset of non-negative numbers of [m] and the non-negative or positive numbers of the ordinary residue classes mod 2n, respectively. Of course 0 appears only in the class [0]. −([m]> ) is obtained from the set [m]> (excluding 0 in the case of class [0]) by taking all elements negative. Note that [−m] is not used here. With g(n, m) := gcd(m, 2 n−m) one has, for m ∈ {1, 2, ..., n−1}, [m]2n,> = g(n, m) [m/g(n, m)]2 n/g(n,m),> and [2 n − m]2n,> = g(n, m) [(2 n − m)/g(n, m)]2 n/g(n,m),> . This is. of course, only of interest if g(n, m) 6= 1. E.g., n = 6, m = 3, g(n, m) = 3: [3]12,> = 3 ∗ [1]4,> and [9]12,> = 3 ∗ [3]4,> , where again k ∗ [p]q,> is the set with all members of the set [p]q,> multiplied with k. This is obvious. The trivial formula for the members of the residue classes [m]≥ , considered as sequences of increasing numbers called {c(n, m; k)}∞ k=1 , is if m = 0 ,  (k − 1) n (72) c(n, m; k) =  k  k 2 2 n + (−1) m if m ∈ {1, 2, ..., n − 1} . The nonnegative members of the complete residue classes (Modd n) for n = 3, 4, 5, 6, and 7 are found in A088520, A203575, A090298, A092260, and A113807. Sometimes 0 has to be added, in order to obtain the class [0]. Of course, these complete residue classes can be recorded as a permutation sequence of the non-negative integers. We now list several lemmata (the trivial lemma 17 has already been used) in order to prepare for the proof of the multiplicative structure of these equivalence classes. Lemma 12: Parity of Modd n residue classes For even n the parity of the members of the residue class n [m], m ∈ {0, 1, ..., n − 1} coincides with the one of m. If n is odd this is also true for the classes with m ∈ {1, 2, ... , n − 1}, and for m = 0 the parity of the elements alternates, starting with + (for even). Proof: The case of the residue class [0] is clear for even or odd n because of its members 0 mod n (see lemma 10). Similarly, for the other m values, because then mod 2n applies. Lemma 13: Periodicity of the parity sequence pn with period length 2 n pn (k) = pn (k + 2 n l) for l ∈ Z, i.e., pn (k) = pn (r2 n (k)) = pn (k (mod 2 n)), for k ∈ Z, n ∈ N. (73) Proof: This is obvious from the definition of pn (k) given in lemma 8, eq. (59), with definition 4, eq. (69). For the second part use k = 2 n q2 n (k) + r2 n (k). Lemma 14: (A)symmetry of sequence pn around k = 0  if k ≡ 0 (mod n)  +pn (k) for n ∈ N, k ∈ N0 : pn (−k) = (74)  −pn (k) , if k 6≡ 0 (mod n) . Proof: This follows immediately from the property of the ⌊−x⌋ function mentioned above before definition 4.  Lemma 15: Product formula for the residue rn For n ∈ N and k, l ∈ Z one has: rn (k l) = rn (k) rn (l) (mod n). Proof: Just multiply k = qn (k) n + rn (k) with l = qn (l) n + rn (l). Lemma 16: Residue r2 n from rn  iff r2 n (k) ∈ {0, 1, ..., n − 1},  rn (k) For n ∈ N and k ∈ Z one has: r2 n (k) =  rn (k) + n iff r2 n (k) ∈ {n, n + 1, ..., 2 n − 1}. Proof: Obvious for r2 n (k) ∈ {0, ..., n−1} as well as ∈ {n, ..., 2 n−1}.  27 Lemma 17: Residue for negative numbers  if k ≡ 0 (mod n) ,  0 For n ∈ N and k ∈ N0 one has: rn (−k) =  n − rn (k) if k 6≡ 0 (mod n) . Proof: Obvious.  Lemma 18: Symmetry of the an (or Modd n) sequence around k = 0 For n ∈ N and k ∈ N0 one has: an (−k) = an (k). Proof: This is proved for the two cases k ≡ 0 (mod n) and k 6≡ 0 (mod n) separately. In the first case rn (k) = 0, as well as rn (−k) = 0 , hence an (k ≡ 0 (mod n)) = 0, which is symmetric around k = 0. In the other case, we employ lemma 13, noting that r2 n (k) 6= 0, n (otherwise k ≡ 0 (mod n)). The two cases r2 n (k) ∈ {1, 2, ..., n − 1} and r2 n (k) ∈ {n + 1, n + 2, ..., 2n − 1} have pn (k) = pn (r2 n (k)) equal +1 or −1, respectively. Then with the second alternative of lemma 14 one finds an (−k) = rn (−k) if pn (−k) = −pn (k) = +1 and an (−k) = rn (k) if pn (−k) = −pn (k) = −1 which coincides with the definition of an (+k).  Now we turn to the arithmetic structure of the Modd n residue classes. It is clear from the following counter-example that addition cannot be done class-wise. Consider n = 6, k = 2 and l = 7. Then 6 2 and 7 ∼ 6 5, but a6 (2 + 7) = 3 but a6 (a6 (2) + a6 (7)) = a6 (2 + 5) = a6 (7) = 5. In other words, 2 ∼ 6 6 n0 2 + 7 = 9 ∼ 3 but (2 + 5) = 7 ∼ 5, and 3 is not equivalent to 5 (Modd 6). Similarly, from (a − 1) ∼ n 1, because for n > 2 in the latter case a can also be of the form −1 + k 2 n does in general not follow a ∼ if it belongs to a class [m] with positive m, whereas in the first case it has to be of the form 1 + k′ n, which can only match for n = 1 and 2. However, it turns out that multiplication can be done class-wise. This is the content of the following proposition. Proposition 10: Modd n residue classes are multiplicative For n ∈ N and k, l ∈ Z one has: n an (k) an (l) , i.e., kl ≡ an (k) an (l) (Modd n) . an (k l) = an (an (k) an (l)) i.e., k l ∼ (75) Before giving the proof, consider the example n = 6, k = 2 and l = 7. Now a6 (2 · 7) = 2 and 6 2∼ 6 2 · 5∼ 6 a6 (2) a6 (7). a6 (a6 (2) · a6 (7)) = a6 (2 · 5) = a6 (10) = 2. Or stated equivalently, 2 · 7 = 14 ∼ Proof: i) Due to the symmetry of an (see lemma 18) it is clear that it is sufficient to consider only non-negative k and l. ii) Consider first the cases k ≡ 0 (mod n) or l ≡ 0 (mod n). If m ≡ 0 (mod n) then an (m) = 0. This follows for both alternatives in eq. (69). Therefore, if k ≡ 0 (mod n), an (k l) = 0 because k l ≡ 0 (mod n) for every l, and an (0 · an (l)) = an (0) = 0, proving the assertion. In the other case, l ≡ 0 (mod n), the proof is done analogously. iii) Now rn (k) and rn (l) are non-vanishing, and k and l are positive. Four cases are distinguished according to the signs of (pn (k), pn (l)), viz (+, +), (−, −), (+, −) and (−, +). (+,+): In this case, due to the 2 n-periodicity of pn (see lemma 13), r2 n (k) and r2 n (l) are both from {1, 2, ..., n − 1}, hence (+, +) : r2 n (k) = rn (k) and r2 n (l) = rn (l) . (76) Also, from eq. (69), one obtains in this case an (k) an (l) = rn (k) rn (l). There is an alternative for an (rn (k) rn (l)), depending on pn (rn (k) rn (l)) being +1 or −1. Both cases are possible as the following examples for n = 6 show: p6 (3 · 4) = p6 (12 (mod 12)) = p6 (0) = +1 and p6 (3 · 7) = p6 (21 (mod 12)) = p6 (9) = −1. First the argument of pn is rewritten with the help of eq. (76). pn (rn (k) rn (l)) = pn (r2 n (k) r2 n (l)). Due to the (2 n)-periodicity (lemma 13) this is pn (r2 n (k) r2 n (l) mod(2 n)) = pn (r2 n (k l)) = 28 p(k l), due to lemma 15 with n → 2 n, and again the (2 n)-periodicity. In the first alternative, the +1 case, an (an (k) an (l)) = rn (k) rn (l) (mod n) = rn (k l), again from lemma 15. This is just a(k l) if pn (k l) = +1, proving the assertion for this alternative. In the other case, pn (k l) = −1, an (rn (k) rn (l)) = −(rn (k) rn (l))(mod n) which is rewritten with mod n-arithmetic and lemma 15 as −rn (k l)(mod n) = −(k l)(mod n) = rn (−k l). This coincides with a(k l) for this alternative, proving the assertion. (-,-): Now we have from lemma 16 (−, −) : r2 n (k) = n + rn (k) and r2 n (l) = n + rn (l) . (77) Here pn ((rn (−k) rn (−l)) is rewritten with lemma 17, eq. (77), the 2 n periodicity, and lemma 15, as follows. pn ((n − rn (k)) (n − rn (l))) = pn ((2 n − r2 n (k)) (2 n − r2 n (l))) = pn (r2 n (k) r2 n (l)) = pn (r2 n (r2 n (k) r2 n (l))) = pn (r2 n (k) r2 n (l) (mod 2 n)). With lemma 15 (with n → 2 n this becomes pn (r2 n (k l)) = pn (k l), again from the (2 n)-periodicity. In the first alternative pn (k l) = +1 and an (rn (−k) rn (−l)) = rn (rn (−k) rn (−l)). With lemma 17 and mod n-arithmetic this is rn ((−rn (k)) (−rn (l))) = rn (rn (k) rn (l)), and with lemma 15 this becomes rn (k l), coinciding with an (k l) for this alternative. For the other alternative, pn (k l) = −1, an (rn (−k) rn (−l)) = −(rn (−k) rn (−l))(mod n). This becomes, with lemma 17, mod n-arithmetic and lemma 15 −(rn (k) rn (l)) (mod n) = −rn (k l)(mod n). This vanishes if rn (k l) = 0 which means k l ≡ 0 (mod n) (which is possible, e.g., n = 6, k = 2, l = 3), and then this coincides with the claim which is for this alternative a(k l) = rn (−(k l)) = 0. If rn (k l) 6= 0 then −rn (k l) (mod n) = n − rn (k l) which also coincides with the claim a(k l) = n − rn (k l) if k l 6≡ 0 (mod n). We skip the proofs of the other two cases, (+, −) and (−, +), which run along the same line. Here one arrives first at pn (−(k l)), and in order to compare it with p(k l) both alternatives in lemma 17 have to be considered like in the just considered second alternative.  For the computation of the cycle structure of the Galois group Gn = Gal(Q(ρ(n))/Q) we are only interested, due to eq. (20), in odd numbers relatively prime to n. Contrary to ordinary mod n-arithmetic where the set of odd numbers O := {2l + 1 | l ∈ Z} is in general not closed under multiplication (e.g., 5 · 5 = 25 ≡ 4 (mod 7)), it will be shown that O is closed under M odd n multiplication. Of interest are the units, the elements which have inverses, in order to see the expected group structure. First consider the reduced set O∗n , given by the odd numbers relatively prime to n. The negative odd numbers in this set are just the negative of the positive odd numbers, therefore it will suffice to consider O∗n,> := {2l + 1 | l ∈ N0 , gcd(2l + 1, n) = 1}. If n is a power of 2 the set O∗2 will be O, with the o.g.f. x (1 + x) for the sequence of positive odd numbers {o∗2,> (k) := 2 k + 1}∞ G(x) = k=0 . For the (1 − x)2 other even numbers n only the odd numbers relatively prime to the squarefree kernel of n, called sqf k(n), (see A007947, encountered already several times), will enter the discussion. Therefore, besides the just considered (trivial) case of the even prime 2, the set O∗n is only relevant for squarefree odd moduli, either prime or composite. We consider first the case of odd primes n = p, and give the o.g.f. of the sequences of numbers from O∗p,> , called o∗p,> (k), as well as an explicit formula in terms of floor functions. These are the positive odd integers without odd multiples of the odd p. Proposition 11: Odd prime moduli, o.g.f. and explicit formula for O∗p,> elements ∞ X With Gp (x) := o∗p,> (k) xk , for odd primes p, one has k=0   p−3 2   X p−1 p−1 x p−1 k 2 ) + 4 2 1 + 2 + x , x (1 + x Gp (x) =  (1 − xp−1 ) (1 − x)  k=1 29 (78) and o∗p,> (k) =  0    if k = 0 ,    2k − 1 + 2  k+ p−3 2 p−1  (79) if k ∈ N . We have used the even number 0 for k = 0 such that the Gp (x) sum can start with k = 0. Proof: This proposition will become a corollary to the later treated general case of odd squarefree moduli n in proposition 13. Example 15: O.g.f.s and formula for reduced odd numbers for modulus p = 7. G7 (x) = o∗7,> (n) =  x 1 + 2 (x + x2 ) + 4 x3 + 2 (x4 + x5 ) + x6 (1 − x6 ) (1 − x)   n+2 2n − 1 + 2 , n ≥ 1. 6 , (80) (81) The instances for p = 3, 5, 7, 11, 13 and 17 are found under A007310, A045572, A162699, A204454, A204457, and A204458, respectively. In order to prepare for the general case of odd squarefree modulus n, we state a proposition on the structure of the reduced odd numbers set O∗n,> . Proposition 12: Mirror symmetry and modular periodicity of O∗n,> for odd n i) Mirror symmetry. For k ∈ {1, 2, ..., δ(n)} one has: o∗n,> (2 δ(n) − (k − 1)) = 2 n − o∗n,> (k), (82) where o∗n,> (k) = mk (n) from M(n), given in definition 2, eq. (65). ii) mod 2 n periodicity: For k ∈ N one has: o∗n,> (k) = o∗n,> (k + 2 δ(n)) (mod 2 n). (83) Written as a relation between neighboring fundamental units, numbered by N ≥ 1, this becomes the following statement. For k ∈ {2 (N − 1) δ(n) + 1, ..., 2 N δ(n)}, with N ∈ {2, 3, 4, ...}, one has: o∗n,> (k) = (N − 1) 2 n + o∗n,> (k − (N − 1) 2 δ(n)) . (84) δ(n) is the degree of the minimal polynomial C(n, x) for the algebraic number ρ(n) introduced in section 2. ω(n) ω(n) Y Y (pj − 1). Note that if n = pj with distinct odd primes p, and ω(n) = A001221(n), then 2 δ(n) = j=1 j=1 L(n) := 2 δ(n) is the length of the fundamental N -units. Before we give the proof consider figure 3 for the case n = 3 · 5 = 15 with δ(n) = 4. The second statement ii) concerns the relation of the numbers of the second fundamental unit (N = 2) to the one in the N = 1 unit. E.g., the odd number 37 for k = 2 · 4 + 2 = 10 is equal to 30 + o∗15,> (10 − 2 · 4) = 30 + o∗15,> (2) = 30 + 7, which checks. The statement i) shows the mirror symmetry within the first (and any other) unit of length L(15) = 2 · 4 = 8. In figure 3 this symmetry is indicated by the brackets below the first unit, and it is a symmetry around the missing number n = 15. Missing numbers have been indicated by a dot. It is the pattern of missing odd numbers which is mirror symmetric, not the one of the actual values of the odd numbers. But the relation between the odd numbers in the second half of a unit and the first one then follows, and is given by the statement of the proposition. In figure 3 P (n) := 2 n = 30 is the shift for the o∗>,n values from the N = 1 to the N = 2 unit (or any of the neighboring units), and p(n) := n + 1 = 16 is the shift for these values from the first half of every unit to the second half. 30 Figure 3: Structure of the sequence of mod n reduced odd numbers, n=15 N=2 N=1 δ (n) k 1 2 3 4 5 6 7 2 δ (n) 3 δ (n) 4 δ (n) 8 9 10 11 12 13 14 15 16 17... o*>,n(k) 1 .. 7 . 11 13 .17 19 . 23 .. 29 31 .. 37 . 41 43 .47 49 . 51 .. 57 61 ... n−2 n+2 +p(n)=n+1=16 + P(n) = 2n = 30 Proof: i) It is clear from the degree of the minimal polynomial and eq. (20) that the number of mod n reduced positive odd numbers smaller than 2 n is δ(2 n) = 2 δ(n) (from the definition of δ(n) in terms of Euler’s ϕ function). We now determine δ(n) reduced odd numbers mod n which lie between n and 2 n, by mirroring the δ(n) elements of M(n) around the position where the missing number n is situated, which is between the position k = δ(n) and the next one. The mirror symmetry refers to the gaps. The number mk (n) from M(n) will be mapped to o∗n,> (2 δ(n) − (k − 1)) at the mirrored position in the second half of the later defined first fundamental unit (N = 1). To find this odd number the first difference c c set △ M(n), introduced in connection with M(n) from the definition 3, becomes important in order to count the gaps in the sequence of odd numbers when they are reduced mod n. o∗n,> (2 δ(n) − (k − 1)) is found by adding to mk (n) twice the value of the sum of the gaps from the position k to the center, the mirror axis. This is 2 (△mk+1 (n) + △mk+2 (n) + ... + △ mδ(n) (n) + 2). The 2 in this sum is half the gap-length from the value n − 2 at the position δ(n) and n + 2 at the next position, the mirror-position δ(n) + 1 of δ(n). This is a telescopic sum which becomes 2 (−mk (n) + mδ(n) (n) + 2). Therefore, the value of o∗n,> (2 δ(n) − (k − 1)) is mk + 2 (−mk (n) + mδ(n) (n) + 2) = 4 + 2 mδ(n) (n) − mk (n) = 2 n − mk (n), because always mδ(n) (n) = n − 2 holds. See figure 3, n = 15 with the values 30 − 1 = 29, 30 − 7 = 23, 30 − 11 = 19 and 30 − 13 = 17 for k = 1, 2, 3 and 4, respectively. Now it is clear that this mirroring leads to the correct number of reduced odd numbers for the second half of the fundamental N = 1 unit, because gcd(mk (n), n) = 1, as member of M(n), implies for the mirror image also gcd(o∗n,> (2 δ(n) − (k − 1)), n) = 1. All positive odd numbers relatively prime to n and not exceeding 2 n − m1 (n) = 2 n − 1 have thus be found. Proof of ii): From above we know that the number at position k = 2 δ(n) + 1 is 2 n + 1 because the one for k = 2 δ(n) has been shown to be 2 n − 1 and gcd(2 n + 1, n) = 1 (indirect proof by assuming the c contrary, using odd n; this is similar to the proof given in connection with definition 3 of M(n)). Now it ∗ is clear that a shift in the on,> numbers with P (n) := 2 n leads from the fundamental unit No. N = 1 to the second one, N = 1, by putting o∗n,> (2 δ(n) + k) = o∗n,> (k) + P (n), for k ∈ {1, 2, ..., δ(n)}. This is obvious because the gcd value 1 is not changed by adding 2 n. This process can be iterated to find the mod 2 n periodicity structure stated in ii). See figure 3, n = 15 with k = 14, N = 2:  o∗15,> (14) = 49 = 2 · 15 + o∗15,> (14 − 1 · 2 · 4) = 30 + o∗15,> (6) = 30 + 19. ∗ The sequences {on,> } for n = 15 and n = 21 are found in A007775 and A206547, respectively. The sequences of the M odd n residues of the numbers o∗n,> (k), for k = 1, 2, ..., for prime moduli n = p = 3, 5, 7, 11, 13, 17, and for the first odd composed ones for n = 15, 21 are found in A000012, A084101, A110551, A206543, A206544, A206545, and A206546, A206548, respectively. 31 For the following formula for the nonnegative odd numbers reduced mod n involving floor functions we c need the following list (increasingly ordered set) F(n) of length L(n) = 2 δ(n) derived from the list △M. Definition 5: List F(n) F(n) = {f (n, 1), ..., f (n, 2 δ(n)} with f (n, j) = f (n, δ(n)) = f (n, 2 δ(n)) = △mj+1 (n) − 2 , for j ∈ {1, 2, ..., δ(n) − 1} 2 1, f (n, δ(n) + j) = f (n, δ(n) − j), for j ∈ {1, 2, ..., δ(n) − 1}, and 0. (85) c Here △mk (n) := mk (n) − mk−1 (n), (the kth element of △M(n)). This list F(n) is obtained from first c enlarging △M by mirroring the first δ(n) entries at the last element 4, to obtain a list of order 2 δ(n) + 1. Then the first and last element of this new list is put to zero and all the other elements are diminished by 2, thus obtaining a set of only even numbers. Then one divides by 2, omits the final 0, and reverses the remaining list. Example 16: F(15) c c n = 15 = 3 · 5, 2 δ(15) = 2 · 4 = 8, M(15) = {1, 7, 11, 13}, M(15) = {0, 1, 7, 11, 13, 17}, △M(15) = {1, 6, 4, 2, 4}, the mirror extension is {1, 6, 4, 2, 4, 2, 4, 6, 1}, the reduction step leads to {0, 4, 2, 0, 2, 0, 2, 4, 0}, and finally, dividing by 2, omitting the last 0 and reverting, leads to F(15) = {2, 1, 0, 1, 0, 1, 2, 0}. Except for the last 0 there is a mirror-symmetry around the fourth entry 1. See the first row of table 5. c For the odd squarefree composite numbers n = A024556(m), m = 1, 2, ... , 17, see table 5 for M(n), c △ M(n) and F(n). Proposition 13: O.g.f. and formula for O∗n,> elements. ∞ X o∗n,> (k) xk , for odd n, one has With Gn (x) := k=1   x Gn (x) = 1+ (1 − x2 δ(n) ) (1 − x)  2 δ(n)−1 X k=1 △o∗n,> (k + 1) xk + x2 δ(n) with the first differences △o∗n,> (j) := o∗n,> (j) − o∗n,> (j − 1) . This generates   2 δ(n) X k + (j − 1) ∗ . on,> (k) = 2 k − 1 + 2 f (n, j) 2 δ(n)   (86)  (87) j=1 Note that the numerator polynomial in Gn (x) needs the first differences of the sequence members of the fundamental N = 1 unit, which due to the mirror symmetry of proposition 12 can be reduced to the first differences of {m2 (n), m3 (n), .., mδ(n) , n + 2} with mδ(n) = n − 2. One could use, like in proposition 11, on,> (0) = 0 and let the sum in Gn (x) start with k = 0. Proof: We start with the periodicity of the sequence due to proposition 12 ii). Taking the difference o∗n,> (k) − o∗n,> (k − 1) = o∗n,> (k − 2 δ(n)) − o∗n,> (k − 1 − 2 δ(n)) leads to the recurrence (we omit all unnecessary indices) o(k) = o(k − 1) + o(k − 2 δ(n)) − o(k − 1 − 2 δ(n)), for k ≥ 2 δ(n) + 1. Here one needs also o∗n,> (0) := −1. For some of these recurrences the o.g.f.s were determined by 2 δ(n) R. J. Mathar in e.g., A045572 and A162699. I general Gn (x) = X k=1 1) x k−1 + x 2 δ(n) ∞ X k=2 δ(n)+1 o(n − 2 δ(n)) − x 2 δ(n)+1 ∞ X k=2 δ(n)+1 32 k o(k) x + x ∞ X k=2 δ(n)+1 o(k − o(n − 2 δ(n) − 1) xn−2 δ(n)−1 , where the recurrence has been used (and the infinite sum has been reordered, not bothering about absolute con2 δ(n) X vergence, in the sense of formal power series). Shifting the indices, one arrives at Gn (x) = o(k) xk + k=1 o n 2 δ(n) 2 δ(n)+1 2 δ(n)−1) +x Gn (x) − x (Gn (x) + (−1)), where x Gn (x) − (o(1) x + .... + o(2 δ(n) − 1) x the −1 resulted from putting o(0) = −1 (see above). This rearranges into (1 − x − x2 δ(n) + x2 δ(n)+1 ) G n (x) = x 1 + △o(2) x + ... + △o(2 δ(n)) x2 δ(n)−1 + x2 δ(n) . Factorizing the bracket on the l.h.s. and division leads to the claimed form for Gn (x). Of course, the denominator factor (1 − x2 δ(n) ) can be factorized into cyclotomic polynomials. For the proof of the second part we use L := 2 δ(n). Given Gn (x) with the L + 1 input coefficients of the numerator polynomial one derives the claimed explicit form for o∗n,> (k), by defining first the sequence with   x k+L−1 (partial sums of the characteristic sequence , generated by entries bL (k) := L L (1 − x ) (1 − x) for multiples of L, then shifted). The numerator polynomial leads for o∗n,> (k) to a sum of L + 1 floor    k−L+L−1 k−0+L−1 , ending with = functions with decreasing arguments, starting with L L   k−1 , and corresponding coefficients. In order to find a standard form for this sum we use the following L floor-identity L−1 X k + j  = k, for L ∈ N, and k ∈ Z , (88) L j=0 which can be seen from L−1 X j=0 (k + j) (mod L) = L (L − 1) , k ∈ Z, which is trivial (just add the L terms 2 which  are 0, 1, ... , L − 1 in a certain cyclic order), and the relation between mod L and the floor function  k 1 (k − k (mod L)). This identity allows us to lower L consecutive coefficients of this sum of = L L L + 1 terms by 1, producing k if one uses the identity for the first L terms because the second to   a term , and the identity is read backwards. If one uses the identity for the last last floor-argument is then k+0 L   L terms one produces a k − 1, because the last term has k−1 L . When we apply this identity twice in the described way we pick up n + (n − 1) = 2 n − 1 and the first and last coefficient, which were originally 1, become 0, and all other coefficients are diminished by 2 because they participate in both applications of the identity. It is guaranteed that all coefficients are now even and ≥ 0, because the coefficients except the first and last one were even and ≥ 2, because these numerator polynomial coefficients resulted from first differences of the sequence of odd numbers. Therefore one  extract a factor 2 and if the  can k (the second to last term in the floor-functions are written with increasing arguments, starting with L original order), one has exactly the coefficients given by the list F(n) of length L of definition 5. This proves the explicit form for o∗n,> (k).  Example 17: O.g.f. G8 (x) (1 + 2 (x + x2 + x3 + x4 + x5 + x6 + x7 ) + x8 1+ x G8 (x) = x = x (1 − x8 ) (1 − x) (1 − x)2 (89) generating, with offset 0, the odd numbers A004273. Before coming to the multiplicative group Modd n we define reduced residue systems Modd n as well as reduced odd residue systems Modd n. See e.g., [2], p. 113 for the mod n case. 33 Definition 6a: Reduced residue system Modd n A reduced residue system Modd n (RRSn) is any set of ϕ(n) pairwise incongruent Modd n numbers, each of which is relatively prime to n. E.g., n = 15, ϕ(15) = 8, {1, 2, 4, 7, 8, 11, 13, 14} or {29, 32, 26, 23, 22, 41, 17, 16}, etc. The first one is the smallest positive one. These systems will not play a rôle later on. Definition 6b: Reduced odd residue system Modd n A reduced odd residue system Modd n (RoddRSn) is any set of δ(n) odd pairwise incongruent Modd n numbers, each of which is relatively prime to n E.g., n = 15, δ(15) = 4, {1, 7, 11, 13} or {29, 27, 19, 17}. The first one coincides with M(15) from eq. (65) and is the smallest positive reduced residue system Modd n. Remember that the parity of the members in each Modd n residue class, not in class [0], is the same (see lemma 12). Later on we will restrict ourselves mostly to the system M(n). We next study the multiplicative group M odd n. The elements are the residue classes [mj ] , for j = 1, 2, ..., δ(n), corresponding to the members of the reduced residue system M(n). In fact, we will take these representatives, multiplying Modd n, as we have done above. In order to see the group structure one first convinces oneself that this set M(n) is closed under Modd n multiplication. This follows from proposition 10 and lemma 12 which showed that these classes have only odd numbers, and every odd numbers appear exactly once because of the definition of these classes. The associativity, commutativity and the identity element 1 are also clear. We do not have a formula how to find the inverse element m−1 j of mj but coming to this Modd n multiplication from the study of automorphisms of the splitting field for the minimal polynomial C(n, x) for the algebraic number ρ(n), it is clear that these inverses have to exist (the invariance property defines a group). We are dealing here with the Galois groups for these polynomials. The cycle structure for n = 1, 2, ..., 40 is given in table 6. Because each group is Abelian one has for every group of prime order a cyclic group, which can be checked for the examples given in table 6. Remark 6: The multiplicative group Modd n is cyclic if δ(n) is prime. This is a corollary on the fundamental theorem on finite Abelian groups (see e.g., [28], p. 49, see also [6], p. 511, Cauchy’s Theorem A.1.5), or use Lagrange’s theorem on the order of subgroups, and the fact that the powers of an element, not the identity, generate a cyclic subgroup, to prove that in fact every group of prime order is cyclic. The values n for which the order δ(n) is prime are given in A215046. This is the sequence [4, 5, 6, 7, 9, 11, 23, 47, 59, 83, 107, 167, 179, 227, 263, 347, 359, ...]. Of course, there are other values n with cyclic Modd n group, like n = 2, 3, 8, 10, .... For n = 1 one has the trivial case with cycle structure [[0]], also a cyclic group, viz Z1 . One can give a more general sequence of n numbers with cyclic Gn ∼ = multiplicative Modd n group, namely A210845. Remark 7: The multiplicative group Modd n is cyclic if δ(n) is squarefree. The squarefree numbers are given in A005117, namely [1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 14, 18, 21, 22, 23, 25, 29, 31, ...]. This remark 7 results from the fact that A000688, giving the number of Abelian groups of order n, is 1 exactly for the squarefree numbers A005117. See the formula, based on the H.-E. Richert reference quoted there. Because for each order there is at least the cyclic group these values lead necessarily to a cyclic group. The above given A215046 values are a proper subset of those from A210845. There are. however, still more values n with a cyclic Modd n group. Missing are e.g., 8, 10, 15, 16, 17, .... All the n values with cyclic Modd n group are in A206551. The complementary sequence is A206552, giving the n values with non-cyclic Modd n group. See Table 8 for all values n ≤ 100. As an aside we remark that special squarefree numbers are the so called cyclic numbers A003277. It is known that if the order of a (finite) group is a cyclic number then there is only one group, the cyclic one. See a comment on A003277. Therefore A000001(n), the number of groups of order n is 1 if n is a cyclic number, in fact, the reverse also holds: if A000001(n) = 1 then n is a cyclic number. This can be taken as an alternative definition for cyclic numbers because then there is only one (non-isomorphic) group of 34 this order which has to be the cyclic group. See also Yimin Ge’s Math Blog [YiminGe], where the ‘only if’ statement in the proposition may be misleading but in the proof the given statement is correct. E.g., for order 6 (not a cyclic number) there are groups other than Z6 . In fact A000001(6) = 2, and there is the (non-Abelian) group D(3) (dihedral group). (It is clear that cyclic numbers are not the numbers n for which the multiplicative group mod n, which is Abelian of order ϕ(n), is cyclic. These numbers are given in A033948). Because we are dealing with Abelian groups the squarefree numbers are more interesting here. Recall the situation for the Galois group for the cyclotomic polynomials (the minimal polynomials for ζ(n), an n-th root of unity) which is isomorphic to the multiplicative (Abelian) group of integers modulo n. See Table 7 were we have listed these non-cyclic groups for n ∈ {1, ... , 100}. See also A282624 for a W. Lang link with a table for n ∈ {1, ... , 130} also with generators. This n−value sequence is known as A033949. (The case n = 15 is an exercise in [7], p. 159, Ex. 9.6. 3)a)). The values n with a cyclic Galois group coincide with the moduli n which possess primitive roots r = r(n), i.e., the order of r modulo n is ϕ: r ϕ(n) ≡ 1 (mod n), and no smaller positive exponent k satisfies this congruence. These moduli n ′ are known to be exactly pe , 2 pe , 1 and 2, with some positive powers e and e′ . See e.g., [23], Theorem 2.41, p. 104. All other n lead to non-cyclic multiplicative groups modulo n . See A033949. For the smallest primitive roots in this case see [1], pp. 864-869, the column called g. We do not know a similar characterization of the non-cyclic numbers n for the Modd n group which are shown in Table 8. However, these numbers have also to appear in A033949. It is clear that we should determine primitive roots r ≡ r(n) for the Modd n multiplication, i.e., find those r from M(n) which have order δ(n): the smallest positive k which satisfies r k ≡ +1 (Modd n) is k = δ(n). See A206550 for these smallest positive primitive roots Modd n, where a 0 entry, except for n = 1, indicates that there exists no such primitive root. This sequence starts, with offset 1, as [0, 1, 1, 3, 3, 5, 3, 3, 5, 3, 3, 0, 7, 5, 7, 3, 3, 5, 3, 0, 11, 3, 3, 0, 3, 7, ...]. In general one does not expect a formula for these primitive roots r = r(n), because also in the multiplication modulo n case there is no one available. Proposition 14: Number of Modd n primitive roots If a primitive root r for the multiplicative group Modd n exists there are ϕ(δ(n)) of them. This is the sequence A216322. For example, n = 13, δ(13) = 6, ϕ(6) = 2 with r1 = 7 and r2 = 11; n = 14, δ(14) = 6, ϕ(6) = 2 with r1 = 5 and r2 = 11. Proof: If a Modd n primitive root exists then the multiplicative group Modd n is cyclic. The order of this group is δ(n), Then the number of pairwise incongruent primitive roots is obtained exactly like in the case of primitive m-roots of unity on the unit circle by the number of relatively prime numbers less than m which is Euler’s ϕ(m). Here m = δ(n).  Now the question whether the multiplicative group Modd p with p a prime is cyclic is answered. Up to p−1 squarefree. now we know from remark 7 the positive answer only for those primes with δ(p) = 2 These are the primes given in A066651. The case p = 2 with δ(2) = 1 is trivially cyclic. For general prime p one wants to show that there exists a primitive root in the multiplicative Modd p group. This is analog to the mod p case, where a proof can be found in [23], Theorem 2.36, p. 99, or in [2], ch. 10.4, pp 206 ff. One has, however, to be careful to use only the multiplicative group structure in the proof. Already in connection with lemma 10 we have given a warning to use theorems valid in the modular arithmetic mod n in our case. Another failure occurs  for the theorem [23],  Theorem 2.3(c), p. 49, e.g., m1 m2 x ≡ y (mod m1 ), x ≡ y (mod m2 ) if and only if x = y mod . For the Modd n case one has gcd(m1 , m2 ) the counterexample 19 = 5 (M odd 3) and 19 = 5 (M odd 7) but 19 is obviously not congruent 5 (Modd 21). Several lemmata, the analoga of mod n facts, are collected before stating proposition 15. Lemma 19: Analogon of the Fermat-Euler Theorem If a is odd and gcd(a, n) = 1 then aδ(n) ≡ +1 (M odd n), with delta(n) = A055034(n) (see the start of section 3). 35 Proof: Analog to e.g., [2], Theorem 5.17, p. 113, with m → n, ϕ → δ, the order of the set (reduced odd residue system) M(n) of eq. (65), and modulo → Modd n (we avoid the term Moddulo). Instead of M(n) one can use any other reduced odd residue system Modd n (see definition 6b), with mj (n), j ∈ {1, 2, ... , δ(n)}, replaced by any member of the residue class [mj (n)]. The cancellation used at the end of the proof in [2] can be done here by multiplying with the existing inverses of the bi s there. We are dealing with the multiplicative group Modd n. Next follows the definition of the order of an element from a reduced odd residue system Modd n. Definition 7: Modd n order of a from a RoddRSn The Modd n order of a positive (odd) integer a from a reduced odd residue system Modd n is the smallest positive integer h such that ah ≡ 1 (Modd n). E.g., n = 10, a = 9, h = 2 because 91 = 9 (Modd 10), and 92 = 1 (Modd 10). See the table A216320 corresponding to the Modd n orders h of the smallest positive RoddRSn members A216319. Lemma 19 guarantees the existence of a Modd n order h ≤ δ(n) for each positive odd number a with gcd(a, n) = 1. Example 18: n = 12, δ(12) = 4, M(12) = {1, 5, 7, 11}, 14 ≡ 1 (Modd 12), 52 ≡ 1 (Modd 12) ⇒ 54 ≡ (Modd 12), similarly for 7 and 11. See the cycle structure for n = 12 in table 6. Lemma 20: The Modd n order divides δ(n) If h is the Modd n order of a then h|δ(n). Moreover, aj ≡ ak (Modd n), w.l.o.g. j > k, if and only if h|(j − k). Proof: The first part is analog to [23], Corollary 2.32, p. 98, with ϕ → δ. It uses lemma 19, the Fermat-Euler analogon. Remember that always gcd(a, n) = 1 from the order definition. The second part, for which one can use the group property, follows from the analog of [23], Lemma 2.31, p. 98. (In the older German version of this book, vol. I, the analog of this lemma 20 appears as Satz 22.3 on p. 63.)  Lemma 21: On the Modd p order of a, p a prime If h is the Modd p order of a, with p a prime, one has (ak )h ≡ 1 (Modd p) for all k, and 1 = a0 , a1 , a2 , ... , ah−1 are pairwise incongruent Modd p. Proof: First part: (ak )h = (ah )k , ah ≡ 1 (Modd p) and Modd p respects multiplication (see proposition 10). Second part: assume the contrary, i.e., ai ≡ aj (Modd p), 1 ≤ j < i ≤ h − 1. Apply lemma 20 for n = p, showing that h|(i − j), but i − j ≤ i ≤ h − 1 leading to a contradiction.  h Lemma 22: X ≡ 1 (Modd p) has at most h incongruent solutions The congruence X h ≡ 1 (Modd p), h a positive integer, has at most h pairwise incongruent solutions Modd p.  h X is even then X h ≡ 1 (mod p). and due to the mod p theorem, e.g., [21], Theorem Proof: If p  h X 42, p. 80, there are at most h incongruent solutions. If is odd then −X h ≡ 1 (mod p), i.e., p X h ≡ (p−1) (mod p) which again has at most h incongruent solutions.  This is a weak statement, but sufficient for the following. One could try to prove that the number of p−1 ) if p is odd. This Modd n incongruent solutions of the congruence X h ≡ 1 (Modd p) is gcd(h, 2 number is trivially 1 for p = 2. Lemma 23: On the Modd n order of ak h If h is the Modd n order of a, then is the Modd n order of ak . gcd(h, k) Proof: This is the analogon of [23] lemma 2.33, p. 98, using the present lemma 20, part 2. Now we are ready for the following proposition. 36  Proposition 15: Existence of Modd p primitive roots For every prime p there exists a primitive root for the multiplicative group Modd p. Proof: One shows that there are precisely ϕ(δ(p)) primitive roots and because this number is always ≥ 1 the claim will then follow. Following the proof of [23], Theorem 2.36, p. 99, we infer from the present lemma 19 (with n → p) that p−1 , every positive odd integer a with gcd(a, p) = 1 has a Modd p order h ≡ hp (a), 1 ≤ h ≤ δ(p) = 2 h k 1 2 h−1 and from lemma 20 h|δ(p). Moreover, (a ) ≡ 1(Modd p) for all k, and 1, a , a ... a are h pairwise incongruent odd numbers Modd p. From lemma 22 these are all the solutions of the congruence X h ≡ 1 (Modd p). Lemma 23 shows that there are ϕ(h) numbers ak , with k ∈ {1, ... h − 1} which have Modd p order h ≡ hp (a) because ϕ(h) is the number of such k with gcd(k, h) = 1. The case h = 1 is covered with ϕ(1) := 1. ) ( With [2], p. 207, we define for each h|δ(p) the set Ap (h) := a a ∈ M(p) and Modd p order of a is h . There are τ (δ(p)) (τ = A000005, the number of divisors) such disjoint sets. This is the sequence [1, 1, 2, 2, 2, 4, 4, 3, 2, 4, 4, 6, ...] = A216326. E.g., p = 7, M(7) = {1, 3, 5}, τ (3) = 2 (see also row No. n = p = 7 of the Modd n order table A21630). Call ψp (h) := |Ap (h)|, the number of elements of this set. We have seen that ψp (h) is 0 or ϕ(h) because for each h|δ(p) the set Ap (h) is either empty (no X a ∈ M(p) has Modd p order h) or this set has ϕ(h) elements. Thus ψp (h) ≤ ϕ(h). It is clear that ψp (h) = δ(p) because each a ∈ M(p) belongs to one of these sets Ap (h). Now a standard result is h|δ(h) X h|δ(h) ϕ(h) = δ(p) (see e.g., [2], Theorem 2.2, p. 26, wit hn → δ(p)), therefore, X h|δ(h) (ϕ(h) − ψp (h)) = 0, but because ϕ(h) − ψp (h) ≥ 0 it follows that ψp (h) = ϕ(h) > 1, not 0, for each h|δ(p). This holds especially for h = δ(p). Hence the number of primitive Modd p roots is ψp (δ(p)) = ϕ(δ(p)) > 1, and the proof is complete.  For the sequence δ(p(n)) n ≥ 1, see A130290. For the smallest positive primitive Modd n roots see the sequence A206550. Here for prime n. Corollary 8: Cyclic Modd p group The multiplicative (Abelian) Modd p group, for p a prime, is the cyclic group Zδ(p) . We now concentrate on those groups Modd n which are cyclic and notice that whenever δ(n) is even there exists a unique smallest positive odd number > 1 which solves the congruence x2 ≡ 1 (Modd n). This is the nontrivial solution of this congruence. The trivial one is x = 1 (standing for the class of solutions 1 (Modd n) which also includes −1). We prove this first for even n. Proposition 16: Nontrivial square-root of 1 (Modd 2 k), k ≥ 2 If n = 2 k, for k ∈ {2, 3, 4, ...}, and if the Galois group Gal(Q(ρ(n))/Q) is cyclic, a unique smallest positive solution r > 1 of the congruence x2 ≡ 1 (Modd 2 k) exists, and it is r = n − 1. Proof: For even n = 2 k, k ≥ 2, the cyclic group is then Zδ(2 k) and δ(2 k) is even because with the Y ej −1 pj standard prime factorization δ(2e pe11 · · · peNN ) = 2e−1 (pj − 1), and if N = 0 then e ≥ 2, and j=1..N if N ≥ 1 then e ≥ 1. In both cases δ is even, because in the second case there is at least one j and pj − 1 is even. Even order δ(2 k) of the cyclic group means that powers of the generator c of the δ-cycle, the smallest positive primitive root (of 1) (Modd 2 k), come in pairs which are mutually inverse, except δ(2 k) for 1 = cδ(2 k) ands := c 2 . This s > 1 is unique and solves of the congruence x2 ≡ 1 (Modd 2 k). (n − 1)2 = n − 2 + 0 is, with even n, even, and in order to compute (n − 1)2 (Modd n) Because n 37 one has to determine (n − 1)2 (mod n) , which is 1. Therefore, the unique s for even n is s = n − 1.  Example 19: Nontrivial square-root of 1 (Modd 8)   49 s(8) = 7: 72 = 49 ≡ 1 (M odd 8), because = 6, hence p8 (49) = +1, and 49 ≡ +1 (mod 8), 8 therefore 49 ≡ +1 (Modd 8). p−1 p−1 Similarly, for n = p, p an odd prime, the cycle length is δ(p) = . In the event that is even, 2 2 i.e., if p is of the form 4 k + 1, i.e., p ≡ 1 (mod 4), (see A002144) a smallest positive nontrivial solution of the quadratic congruence x2 ≡ 1 (Modd n) exists. We will numerate the primes congruent 1 (mod 4) by defining p̂(n) := A002144(n), n ≥ 1. E.g., for n = p̂(2) = 13 one has, besides the trivial solution x = 1 (Modd 13) (this residue class includes −1), x ≡ 5 (Modd 13) as a solution. This means that in the group table the row for the element 5 has a 1 in the diagonal, like in the row for the identity element 1. These elements are self-inverse like the identity element 1. Note that in the ordinary reduced mod n case there is always a 1 in the diagonal for row p − 1, besides the 1 in the row for the identity element, but in that case p − 1 ≡ −1 (mod n), and hence is a trivial solution. See A206549 for these non-trivial solutions in our case. The other inverses in these cyclic groups can be read off the cycle structure. One pairs the first entry, the generator c of the cycle, with the second to last (the one before the 1, the second with the third to last, etc. E.g., for n = 13 one has the inverses 7−1 ≡ 11 (Modd 13), 11−1 ≡ 7 (Modd 13), and 3−1 ≡ 9 (Modd 13) , 9−1 ≡ 3 (Modd 13), and the left over 5 is self-inverse, as mentioned above. This pairing of inverses is clear from the cyclic structure. The next objective is to find some method to compute this uniquely existing smallest positive nontrivial solution s(p) of the congruence x2 ≡ 1 (M odd p) for given prime p = p̂(n) = A002144(n) for the k(n) := p̂(n)4− 1 values given in A005098. This k-sequence starts with [1, 3, 4, 7, 9, 10, 13, 15, 18, ...]. The following l-algorithm will determine all these non-trivial solutions s(p̂(n)) of the congruence x2 ≡ p 1 (M odd p̂(n)). We start with the Ansatz s(p) = (o + 1) p − 1, with some odd number o. This 2 s + 1 means that we are looking for primes of the form , and we are interested only in primes of the o+1 2 form 4 k + 1, i.e., p̂(n). Because s(p̂) = (o + 1) p̂ − 1, s(p̂) is odd, say 2 K + 1. This implies o+1 ˆ p̂, which shows that o+1 2 K (K + 1) + 1 = 2 has to be odd, i.e., o = 4 l + 1. Now we compute 2 p−1 (2 K + 1)2 − (4 ˆl + 1) p̂ the even number 2 k = = = 4 T (K) − 2 ˆl − 2 k (4 ˆl + 1), where 2 2 , given in A000217. This implies that we have introduced the triangular numbers T (K) := K (K+1) 2 2 k (2 ˆl + 1) = 2 T (K) − ˆl . Therefore, ˆl is even, say 2 l, and we have, with inputs k, l and K: p = 4 k + 1, s2 (p̂) = (o + 1) p − 1, o = 8 l + 1 and s(p̂) = 2 K(p̂) + 1 . Because now 2 T (K) = 2 k + 2l (4 k + 1) = 2 l + 2k (4 l + 1), we find the ‘nice equation’ 4 T (K) + 1 = (4 k + 1) (4 l + 1) . (90) For given prime p̂ of the form 4 k + 1, i.e. for k = p −4 1 (see A005098), we determine the minimal l ∈ N0 , such that k (1 + 4 l) + √ l produces a triangular number, namely T (K) . The index of this triangular 8 T (K) + 1 − 1 number is then K = . We have uses Maple [18] to compute these minimal l values. It 2 will be seen from the later proposition 15 that there is always such a minimal l, and not all non-negative values appear. Precisely the entries of A094178 and 0 occur as minimal l values. We will from now on denote this minimal l also by l (hoping to cause no confusion). If l = 0 then k is a triangular number, and conversely. The non-vanishing l values are characterized by having as elements of the squarefree kernel set of 4 l + 1 only distinct primes congruent 1 (mod 4). E.g., l = 2 will not appear because the squarefree kernel of 9 consists of the prime 3 which is not congruent 1 (mod 4). In order to proof that only numbers from A094178 can appear as positive l values, we use the ‘nice equation’ and observe that 38 4 T (K) + 1 = K 2 + (K + 1)2 , i.e., it is the sum to two neighboring squares with gcd(K, K + 1) = 1 (shown by indirect proof, see the remark following definition 3 ). Now a theorem ensures that all prime factors of 4 T (K) + 1 are congruent 1 (mod 4). See the theorem 3.20 on p. 164 of the reference [23]. From the ‘nice equation’ we have either 4 l + 1 = 1, i.e., l = 0, or, if l is non-vanishing, then the squarefree kernel set of 4 l + 1 has only primes congruent 1 (mod 4). Therefore l can be 0 or it is from A094178, i.e., from [0, 1, 3, 4, 6, 7, 9, 10, 13, 15, 16, 18, 21, 22, 24, 25, 27, 28, ...]. The l = 0 value appears for the primes [5, 13, 41, 61, 113, 181, 313, 421, ...], which is the sequence A027862. In this case k = p̂−1 4 is a triangular number. l = 1 for the primes [17, 29, 53, 73, 109, 137, 281, 397, 449, 593, 757, ...] This is the sequence A207337(n), n ≥ 2. These are the primes p̂ such that 5 p̂ = 4 T (K) + 1 for some K = K(p̂). 2 E.g., 5 17 = 85 = 4 21 = 1, thus K(17) = 6. These are also the primes of the form p (m +1)/10. Just use 2 (4 l + 1) p̂ + 1 − 1 T (K) − l , (see eq. (90) and K = . m = m(K) = 2 K + 1. In general, k = 4l + 1 2 E.g., p̂ = 53 belongs to l = 1 and K = 11, and T (K) = 66. This checks with the ‘nice equation’. We do not give here the tables of the sequences l(n) = l(p̂(n)) and K(n) = K(l(n)) (this incorrect renaming of arguments should not lead to confusion) for given p̂(n) because after the next proposition 17 we will find another way to obtain the K(n) numbers directly, hence the corresponding l(n) numbers, and from these the desired s(p̂(n)) solutions from s(p̂(n)) = 2 K(n) + 1. Proposition 17: Congruence 4 T(X) + 1 = X2 + (X + 1)2 ≡ 0 (mod p) There are precisely two incongruent solutions of the congruence f (X) := 2 X 2 + 2 X + 1 ≡ 0 (mod p), provided p = p̂(n) = A002144(n), n ≥ 1. The smallest positive representative will be called K(n), and the next larger incongruent one is then K2(n) := p̂(n) − 1 − K(n). Proof: Because of the degree 2 of f this congruence has at most two incongruent solutions. We shall see that in fact there are two. This congruence is reduced to a problem of quadratic residues, following a standard prescription (see, e.g., [21], pp. 132-3). The discriminant of f is D = 22 − 4 2 1 = −4. Multiplying f by 8 yields (4 X + 2)2 + 4 ≡ 0 (mod 8 p). With Y = 4 X + 2 this is Y 2 = D (mod n), with a composite modulus n = 23 p. This is a quadratic residue problem, but gcd(D, n) is not 1, but 4. Theorem 77 of [21] is applied with d = 4, e = 2, f = 1, a + 1 = −1 and n1 = 2 p Thus the problem is reduced to the quadratic residue problem Z 2 ≡ −1 (mod 2 p). This is solved by studying the congruences for the powers of primes, here just 2 and p, separately (see e.g., [21], sect. 26, pp. 83-5). The congruence modulo 2 has only  thesolution +1 (because −1 ≡ +1 (mod 2)), and modulo p one can consult the p−1 −1 Legendre symbol which is (−1) 2 (see e.g., [23], Theorem 3.2 (1), p. 132). Therefore −1 is a p quadratic residue modulo p if and only if this symbol is +1, demanding that p ≡ 1 (mod 4), i.e., p = p̂ from A002144. Call the smallest positive solution x0 , then p̂ − x0 is also an incongruent solution modulo p̂, and two is the maximal number of solutions because of the degree 2 of this congruence. This implies that there are 1 · 2 = 2 incongruent solutions of this congruence modulo 2 p (see e.g., [21], Theorem 46, p. 84). Returning to the original problem this proves that there are also two incongruent solutions. If the smallest positive solution for p̂(n) = A207337(n) is called K(n), then the next larger incongruent solution of 4 T (X) + 1 = X 2 + (X + 1)2 ) ≡ 0 (mod p̂(n)) is K2(n) := p̂(n) − 1 − K(n), which is obvious.  The pair of sequences of all positive solutions modulo 5, 13, and 17 are given in A047219, A212160 and A212161, respectively, where in each case the even indexed members are the positive solutions congruent to K(n) and the odd indexed ones are the positive solutions congruent to K2(n), i.e., a(2 k) = k p̂(n) + K(n) and a(2 k + 1) = k p̂(n) + K2(n), k ≥ 0. For the three given examples n = 1, 2, 3 respectively. The companions (K(n), K2(n)) have been computed with Maple [18] and they can be found as A212353 and A212354. The first entries are for K: [1, 2, 6, 8, 15, 4, 11, 5, 13, 27, 37, 45, 16, 7, 18, 52, 64, ...] and for K2: [3, 10, 10, 20, 21, 36, 41, 55, 59, 61, 59, 55, 92, 105, 118, 96, 92, 126, ...] corresponding to the primes p̂: [5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, ...]. Note that proposition 17 yields directly the searched for nontrivial solution of s(p̂(n))2 ≡ +1 (Modd p̂(n)) via s(p̂(n)) = 2 K(n) + 1. Compare this with the s values given in A206549 with first entries [3, 5, 13, 17, 31, 9, 23, 11, 27, 55, 75, 91, 33, 15, 37, 10 39 p̂ − 3 b iff s2(n) := K2(n) + 1 ≥ p̂(n) Because ŝ(n) := s(p̂(n)) = 2 K(n) + 1 ≤ p̂(n) − 2 , i.e., K(n) ≤ 2 b and ŝ(n) ≤ s2(n), n ≥ 1. Thus only ŝ(n) ∈ M(p̂), the restricted odd residue class Modd p̂, and the b solution s2(n) is discarded. This proposition and the ‘nice equation’ eq. (90) show that the l−algorithm pro  from above will indeed 4 T (K(n)) + 1 − 1 /4. The duce a solution l, related to the existing K(n) for given p̂(n), via l(n) = p̂(n) smallest positive non-trivial solution s(p̂(n)) of the congruence x2 ≡ +1 (M odd  p̂(n)) is then  2 K(n) + 1. 4 120, + 1 See K(n) = A212353(n), n ≥ 1. E.g., n = 5, p̂(5) = 37, K(5) = 15, l = − 1)/4 = 3, 37  2 31 ŝ(n) = 31, with = 25 = o and 312 = 961 = −1 (mod 37) = 36. 37 Q As a application involving s(p̂(n)) we derive the analog of Wilson’s theorem R(p) = (p − 1)! ≡ (p − 1) (mod p) ≡ −1 (mod p), for each prime p (see e.g., [2], Theorem 5.24, p. 116, or [10], Theorem 80, p. 68), where R(n)is the set of the representatives of the smallest positive reduced residue system mod n for n ≥ 2 which is of order ϕ(n). In the Modd p case we have to replace the set R(n) by the set M(n) of eq. (65) with order δ(n). Proposition 18: Analog of Wilson’s theorem for Modd p  is odd if p−1  1 Y 2 (Modd p) , M(p) = (p − 2)!! ≡  p−1 ŝ(n) if 2 is even, p = p̂(n), n ∈ N (91) where ŝ(n) = s(p̂(n)), p̂(n) = A002144(n), stands for the above treated nontrivial root Modd n, i.e., the solution of the congruence x2 ≡ 1 (Modd n) which is not 1, if it exists. Note that −1 ≡ +1 (Modd n), n ≥ 2 (see lemma 10). For the double factorials (p − 2)!! see A207332. Proof: The multiplicative group group M odd p, p a prime, is the cyclic group Zδ(p) from proposition 14. The order δ(p) of this group is even if and only if p = p̂, i.e., a prime 1 (mod 4). In this case we know from above that the non-trivial ŝ(n) = s(p̂(n)) exists, and an Q algorithm for finding it has been given. Besides the unit element 1 and this ŝ(n) all other factors in M(p̂) can be paired such that their product is 1 (Modd p̂) (see the discussion after proposition 16), leaving only s(p̂). In the other case, when p ≡ 3 (mod p), the group order is odd. Then all numbers besides 1 can be paired in the product to produce 1 (Modd p), and the result is therefore 1.  For the cyclic Galois groups belonging to C(n, x) the list of the smallest positive primitive roots r(n) (i.e., the smallest element from M(n) which generate these cyclic groups) are found under A206550. As mentioned above, we do not have a formula for those n > 3 values whose cycle does not start with 3 as smallest positive primitive root, like for n = [6, 9, 13, 14, 15, 18, 21, 26, 27, 33, 37, 38, 39, ...]. Open problems: • Proof of the conjecture on the q−sequence related to the discriminant of the minimal C(n, x) polynomials; or find a counterexample. • Characterization of the values n for which the Galois group Gn is non-cyclic. • Characterization of the values n for which the cycle of the cyclic multiplicative group Modd n ∼ = Gn is generated by 3. • More theorems on multiplicative Modd n arithmetic. 40 Appendix A The proof of eq. (30), with ϕ(n) replaced by the product-formula given there a bit later, is a (nice) n application of PIE (the principle of inclusion and exclusion. See e.g., [5], Theorem 4.2, pp. 134 ff). As mentioned above, this formula uses only the distinct prime factors of n, the elements of the set sqf kset(n), the set of primes of the squarefree kernel of n. The product formula for ϕ(n) n can be read as the generating function for the elementary symmetric functions (here polynomials) in the variables 1 pj , j = 1, 2, ..., M (n). M (n), also called ω(n), is given in [27] as A001221(n).    M (n)  M (n) Y X ϕ(n) 1 1 1 r = , ..., , = (−1) σr 1− n pj p1 pM (n) r=0 (92) j=1 with σ0 = 1, and symbolically σr = X r 1 , where the sum extends over the p. · · · p.  M r  terms with r with increasing indices. E.g., M = 3 with σ2 = p11p2 + p11p3 + p21p3 . n−1 X k one starts, at the zeroth step (r = 0), with the unrestricted sum which is To calculate factors 1 p. n 2 (n−1), k=1 gcd(k,n)=1 and subtracts, in the next step (r = 1), the sum of all multiples of each prime dividing n which are n − 1 pj   X n n − 1 , for j = 1, 2, ..., M (n). This k = ≤ (n − 1). For the pj -multiples this sum is pj 2 pj k=1   n X n leads, in step r = 1 to the subtraction of − 1 . Now in this subtraction all multiples of the 2 pj j product of two different pj s appeared twice, therefore one has, in the next step (r = 2), to add them n − 1 pi pj   X X n X n k = once. This is done by +1 pi pj − 1 . In step r = 3 one concentrates 2 p. p. i<j i<j k=1 on products of three different primes pi1 pi2 pi3 with i1 < i2 < i3 . Now such a 3−product appeared once in step r = 0 ( in the unrestricted sum), −3 times in step r = 1, originating from the multiples (pi1 pi2 ) · pi3 , (pi1 pi3 ) · pi2 and (pi2 pi3 ) · pi1 , and +3 times in step r = 2, from the multiples pi1 · ( pi2 pi3 ), pi2 · ( pi1 pi3 ), and pi3 · ( pi1 pi2 ). Therefore, up to this stage, each such 3−product appeared once too much, and it is subtracted in this step r = 3 when all these 3−products terms are summed. Now the pattern starts to become clear. Up to, and including, step r = 3 one has for each 4−product the counting 1 − 4 + 6 − 4 = −1. Hence in step r = 4 one adds once the sum over all multiples of each such 4−product. In general, in step r this counting will produce (−1)r+1 (from the alternating row r = 4 in the Pascal triangle A007318), and one will therefore add (−1)r times the sum over all multiples of each such r−product. This yields "   n−1 X X n X  n n k = (n − 1) − − 1 + − 1 ... − + 2 p i1 p i1 p i2 k=1 i1 gcd(k,n)=1 ... (−1)M (n) i1 <i2 X i1 <...<iM (n)  n p1 p2 · · · pM (n)   − 1  . (93)  Now the ±1 terms all cancel if one takes into account the number of terms of each r− sum, which is M r . This is due to the vanishing alternating sum over Pascal triangle’s row M . Thus the result becomes the alternating sum over the elementary symmetric polynomials with the reciprocal distinct prime factors of 41 n as variables. n−1 X k=1 gcd(k,n)=1   M (n) n2 X 1 1 r k = (−1) σr , ..., . 2 p1 pM (n) (94) r=0 As mentioned above this is written as the generating function of these polynomials and the final result is with the second part of eq. (92) n−1 X k = n−1 X k is indeed k=1 gcd(k,n)=1 (95) j=0 k=1 gcd(k,n)=1 2 This shows that s(n) := 2 n  M (n)  1 n2 Y 1− . 2 pj ϕ(n) , which appears in [27] as A076512(n)/A109395(n). n s(n) is identical for all n with the same distinct prime factors, independent of their multiplicity, i.e., it depends only on the elements of sqf set(n). From the multiplicativity of ϕ one sees that this scaled sum s(n) is also multiplicative. E.g., s(12) = s(6) = s(2) s(3). Appendix B For the proof of eq. (56) we follow [24], p.33, and consider the rewritten version  n−1  1 if n is odd ,  Y  k 1 − e2 π i n =  k=1 0 if n is even . (96) k In order to see that this is identical to eq. (56), just extract eπ i n , leading to the (2 cos) factors under n−1 1 the product, and in front summing in the exponent leads to the factor e 2 π i (n−1) = in−1 = (−1) 2 . The l.h.s. of eq. (96) is then computed using (for the last step see e.g., [9], Exercise 50, p. 149) 2 1 + z + z + ... + z n−1 n−1 Y k zn − 1 (z − e2 π i n ) , = = z − 1 (97) k=1 where one specializes to z = −1. (By putting z = +1 one finds the result with 1 for n = 1.) 42 n−1 Y k=1  k 2 sin π n  = n , n ≥ 2, References [1] Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, Tenth Printing, reprinted as Dover publication, seventh printing 1968, New York, 1972 [2] T. Apostol, Introduction to Analytic Number Theory, Springer, 1986 [3] E. Artin, with a section by N. A, Milgram, Galoissche Theorie, 3. Auflage, Harri Deutsch, 1988. English version: Galois theory. Lectures delivered at the University of Notre Dame, 1966 [4] Chan-Lye Lee and K. B. Wong, On Chebyshev’s polynomials and certain combinatorial identities, 2009, Bull. Malaysian Sciences Soc. http://www.emis.de/journals/BMMSS/accepted_papers.htm. [5] Ch. A. Charalambides, Enumerative Combinatorics, Chapman &Hall/CRC, 2002 [6] D. A. Cox, Galois Theory, Wiley, 2004 [7] J.-P. Escofier, Galois Theory, Springer, 2001 [8] Yimin Ge’s Math Blog, 2009, http://yiminge.wordpress.com/2009/01/22/all-groups-of-order-n-are-cyclic-iff/ [9] R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Weseley, Reading, Massachusetts, 1991 [10] G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, fifth ed,. Oxford Science publications, 2003 [11] The On-Line Encyclopedia of Integer SequencesT M http://oeis.org, 2011 (OEIS), published electronically at [12] S. Lang, Algebra, revised third ed., Springer, 2002   2π , a link under [27] A181875. [13] W. Lang, Minimal Polynomials for cos n [14] W. Lang, Divisor Product Representation for Natural Numbers, a link under [27] A007955. [15] W. Lang, A181878, Coefficient array for square of Chebyshev S-polynomials, a link under [27] A181878. [16] A. Lazarev, Galois Theory, lecture notes with problems and solutions, University of Leicester, http://www2.le.ac.uk/departments/mathematics/extranet/staff-material/staff-profiles/al179 [17] D. H. Lehmer, A Note on Trigonometric Algebraic Numbers, Am. Math. Monthly 40,8 (1933) 165-6. [18] MapleT M , http://www.maplesoft.com/ [19] Wolfram Mathworld, http://mathworld.wolfram.com/SylvesterCyclotomicNumber.html, Sylvester Cyclotomic Number. [20] W. Magnus, F. Oberhettinger, R. P. Soni, Formulas and theorems for the special functions of mathematical physics. 3rd enlarged ed., 1966, Springer, Berlin. [21] T. Nagell, Introduction to Number Theory, Chelsea Pub. Comp., N.Y., 2nd ed., 1964. 43 [22] I. Niven, Irrational Numbers, The Math. Assoc. of America, second printing, distributed by John Wiley and Sons, 1963. [23] I. Niven, H. S. Zuckerman and H. L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY, 1991. [24] R. Remmert, Funktionentheorie 2, Springer, 1991 [25] P. Ribenboim, Classical Theory of Algebraic Numbers, Springer, 2001. [26] Th. J. Rivlin, Chebyshev Polynomials. From Approximation Theory to Algebra and Number Theory, second edition, Wiley-Interscience, 1990. [27] The On-Line Encyclopedia http://oeis.org. of Integer Sequences (2010), published electronically at [28] A. Speiser, Die Theorie der Gruppen endlicher Ordnung, Vierte Auflage, 1956, Birkhäuser, Basel [29] P. Steinbach, Golden Fields: A Case for the Heptagon, Mathematics Magazine, 70,1 (1997) 22-31, http://www.jstor.org/pss/2691048. [30] W. Watkins and J. Zeitlin, The Minimal Polynomial of cos(2π/n), Am. Math. Monthly 100,5 (1993) 471-4, http://www.jstor.org/pss/2324301. [31] Wikipedia, Cycle graph (algebra) http://en.wikipedia.org/wiki/Cycle_graph_(algebra) and List of small groups http://en.wikipedia.org/wiki/List_of_small_groups. Keywords: regular n-gons, algebraic number, minimal polynomial, zeros, factorization, congruences, Galois theory, cycle graphs. AMS MSC numbers: 11R32, 11R04, 08B10, 13F20, 12D10, 13P05 OEIS A-numbers: A000001, A000005, A000007, A000010, A000012, A000035, A000265, A000668, A000688, A001221, A002110, A002144, A003277, A004124, A005013, A005098, A005117, A006053, A006054, A007310, A007318, A007775, A007814, A007947, A007955, A008683, A023022, A024556, A027862, A033949, A045572, A049310, A0503384, A052547, A047219, A053120, A055034, A066651, A076512, A077998, A084101, A085810, A088520, A090298, A092260, A094178, A106803, A109395, A110551, A113807, A116423, A120757, A127672, A128672, A130290, A130777, A147600, A162699, A181875, A181876, A181878, A181879, A181880, A193376, A193377, A193679, A193680, A193681, A193682, A203571, A203572, A203575, A204453, A204454, A204457, A204458, A206543, A206544, A206545, A206546, A206547, A206548, A206549, A206550, A206551, A206552, A207333, A207334, A207337, A210845, A212160, A212161, A212353, A212354, A215041, A215046, A216319, A216320, A216322, A216326, A255237. A282624. 44 Table 1: Reduced DSR-algebras (over Q), n = 3, ..., 12. n ρ ≡ ρ(n) 3 1 4 √ 5 ϕ = 6 √ 7 2 cos 8 p 9 2 cos 10 ϕ 11 2 cos 12 p .. . reduced DSR-algebra 2 √ 1 (1 + 5) 2 3 2+ √ π 7  √ π 9 2  3− ϕ 2+ π 11  √ 3 δ(n) DSR − basis ρ2 = 1 1 <1> ρ2 = 2 2 < 1, ρ > ρ2 = ρ + 1 2 < 1, ρ > ρ2 = 3, [σ = ρ2 − 1 = 2] 2 < 1, ρ > ρ2 = 1 + σ, σ 2 = 1 + ρ + σ, ρ σ = ρ + σ 3 < 1, ρ, σ > ρ2 = 1 + σ, σ 2 = 2 σ + 1, τ 2 = 2 (1 + σ), ρσ = ρ + √ τ, ρ τ = √ 2 σ, σ τ = 2 ρ + τ , (σ = 1 + 2, τ = 2 ρ) 4 < 1, ρ, σ, τ > ρ2 = 1 + σ, σ 2 = 2 + ρ + σ, ρ σ = 2 ρ + 1, (σ = ρ2 − 1), [τ = ρ (σ − 1) = 1 + ρ] 3 < 1, ρ, σ > ρ2 = 1 + σ, σ 2 = −1 + 3 σ, τ 2 = −1 + 4 σ, ρ σ = ρ + τ, ρ τ = 3 σ − 2, σ τ = ρ + 2 τ , (σ = ρ2 − 1 = 1 + ϕ, τ = ρ (σ − 1), √ = (1 + ϕ) 3 − ϕ) [ω = 2 (−1 + σ) = 2 ϕ] 4 < 1, ρ, σ, τ > ρ2 = 1 + σ, σ 2 = 1 + σ + ω, τ 2 = 1 + σ + τ + ω, ω 2 = 1 + ρ + σ + τ + ω, ρ σ = ρ + τ, ρ τ = σ + ω, ρ ω = τ + ω, σ τ = ρ + τ + ω, σ ω = σ + τ + ω, τ ω = ρ + σ + τ + ω, (σ = ρ2 − 1, τ = ρ (σ − 1), ω = σ (σ − 1) − 1) 5 < 1, ρ, σ, τ, ω > ρ2 = 1 + σ, σ 2 = 2 (1 + τ ), τ 2 = 3 (1 + σ), ρ σ = ρ + τ, ρ τ = 1 + 2 σ, σ τ = 3 ρ + τ , [ω = 1 + σ, χ = 2 ρ], √ √ √ 2 2 (σ = ρ − 1 = 1 + 3, τ = (3 + 3 )) 2 4 < 1, ρ, σ, τ > π  jnk = S(k − 1, ρ(n)), k = 1, ..., , n 2 R1 = 1, R2 ≡ ρ, R3 ≡ σ, R4 ≡ τ, R5 ≡ ω, R6 ≡ χ (dependence on n suppressed). ρ(n) := 2 cos (n) , Rk In round brackets the values for the basis elements are given in terms of ρ. In square brackets the linear dependent DSRs are given. Boxed n-numbers indicate linear dependent DSRs. 45 Table 2: Minimal polynomials of 2 cos n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 .. . π  n for n = 1, 2, ..., 30. C(n, x) x+2 x x−1 x2 − 2 x2 − x − 1 x2 − 3 x3 − x2 − 2 x + 1 x4 − 4 x2 + 2 x3 − 3x − 1 x4 − 5 x2 + 5 x5 − x4 − 4 x3 + 3 x2 + 3 x − 1 x4 − 4 x2 + 1 x6 − x5 − 5 x4 + 4 x3 + 6 x2 − 3 x − 1 x6 − 7 x4 + 14 x2 − 7 x4 + x3 − 4 x2 − 4 x + 1 x8 − 8 x6 + 20 x4 − 16 x2 + 2 x8 − x7 − 7 x6 + 6 x5 + 15 x4 − 10 x3 − 10 x2 + 4 x + 1 x6 − 6 x4 + 9 x2 − 3 x9 − x8 − 8 x7 + 7 x6 + 21 x5 − 15 x4 − 20 x3 + 10 x2 + 5 x − 1 x8 − 8 x6 + 19 x4 − 12 x2 + 1 x6 + x5 − 6 x4 − 6 x3 + 8 x2 + 8 x + 1 x10 − 11 x8 + 44 x6 − 77 x4 + 55 x2 − 11 x11 − x10 − 10 x9 + 9 x8 + 36 x7 − 28 x6 − 56 x5 + 35 x4 + 35 x3 − 15 x2 − 6 x + 1, x8 − 8 x6 + 20 x4 − 16 x2 + 1 x10 − 10 x8 + 35 x6 − x5 − 50 x4 + 5 x3 + 25 x2 − 5 x − 1 x12 − 13 x10 + 65 x8 − 156 x6 + 182 x4 − 91 x2 + 13 x9 − 9 x7 + 27 x5 − 30 x3 + 9 x − 1 x12 − 12 x10 + 53 x8 − 104 x6 + 86 x4 − 24 x2 + 1 x14 − x13 − 13 x12 + 12 x11 + 66 x10 − 55 x9 − 165 x8 + 120 x7 + 210 x6 − 126 x5 − 126 x4 + 56 x3 + 28 x2 − 7 x − 1 x8 − 7 x6 + 14 x4 − 8 x2 + 1 46 Table 3: A187360(n, m) coefficient array of π  minimal polynomials of 2 cos , rising powers n n/m 0 1 2 3 1 2 1 2 0 1 3 -1 1 4 -2 0 1 5 -1 -1 1 6 -3 0 1 7 1 -2 -1 1 8 2 0 -4 0 9 -1 -3 0 1 10 5 0 -5 0 1 11 -1 3 3 -4 -1 12 1 0 -4 0 1 13 -1 -3 6 4 -5 -1 1 14 -7 0 14 0 -7 0 1 15 .. . 1 -4 -4 1 1 47 4 5 6 1 1 ... Table 4: Zeros of C(n, x) in power basis (rising powers of ρ(n)) for n = 1, 2, ..., 30. n 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 .. . coefficients of C-zeros in power basis < ρ0 , ..., ρδ(n)−1 > [[−2]] [[0]] [[1]] [[0, 1], [0, −1]] [[0, 1], [1, −1]] [[0, 1], [0, −1]] [[0, 1], [−1, −1, 1], [2, 0, −1]] [[0, 1], [0, −3, 0, 1], [0, 3, 0, −1], [0, −1]] [[0, 1], [−2, −1, 1], [2, 0, −1]] [[0, 1], [0, −3, 0, 1], [0, 3, 0, −1], [0, −1]] [[0, 1], [0, −3, 0, 1], [1, 2, −3, −1, 1], [−2, 0, 4, 0, −1], [2, 0, −1]] [[0, 1], [0, 4, 0, −1], [0, −4, 0, 1], [0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [1, −3, −3, 4, 1, −1], [−2, 0, 4, 0, −1], [2, 0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, −5, 0, 5, 0, −1], [0, 3, 0, −1], [0, −1]] [[0, 1], [−2, 3, 1, −1], [−1, −4, 0, 1], [2, 0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, 7, 0, −14, 0, 7, 0, −1], [0, −5, 0, 5, 0, −1], [0, 3, 0, −1], [0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [−1, 4, 6, −10, −5, 6, 1, −1], [2, 0, −9, 0, 6, 0, −1], [−2, 0, 4, 0, −1], [2, 0, −1]] [[0, 1], [0, 5, 0, −5, 0, 1], [0, −4, 0, 5, 0, −1], [0, 4, 0, −5, 0, 1], [0, −5, 0, 5, 0, −1], [0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [1, 4, −10, −10, 15, 6, −7, −1, 1], [−2, 0, 16, 0, −20, 0, 8, 0, −1], [2, 0, −9, 0, 6, 0, −1], [−2, 0, 4, 0, −1], [2, 0, −1]] [[0, 1], [0, −3, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, 8, 0, −18, 0, 8, 0, −1], [0, −8, 0, 18, 0, −8, 0, 1], [0, 7, 0, −14, 0, 7, 0, −1], [0, 3, 0, −1], [0, −1]] [[0, 1], [0, 5, 0, −5, 0, 1], [2, 3, −4, −1, 1], [−3, −9, 1, 6, 0, −1], [−2, 0, 4, 0, −1], [2, 0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, 9, 0, −30, 0, 27, 0, −9, 0, 1], [0, −9, 0, 30, 0, −27, 0, 9, 0, −1], [0, 7, 0, −14, 0, 7, 0, −1], [0, −5, 0, 5, 0, −1], [0, 3, 0, −1], [0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, 9, 0, −30, 0, 27, 0, −9, 0, 1], [−1, −5, 15, 20, −35, −21, 28, 8, −9, −1, 1], [2, 0, −25, 0, 50, 0, −35, 0, 10, 0, −1], [−2, 0, 16, 0, −20, 0, 8, 0, −1], [2, 0, −9, 0, 6, 0, −1], [−2, 0, 4, 0, −1], [2, 0, −1]] [[0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, −8, 0, 6, 0, −1], [0, 8, 0, −6, 0, 1], [0, 7, 0, −14, 0, 7, 0, −1], [0, −5, 0, 5, 0, −1], [0, −1]] [[0, 1], [0, −3, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, 9, 0, −30, 0, 27, 0, −9, 0, 1], [0, −10, 5, 30, −5, −27, 1, 9, 0, −1], [0, 10, −15, −15, 20, 7, −8, −1, 1], [−2, 0, 16, 0, −20, 0, 8, 0, −1], [2, 0, −9, 0, 6, 0, −1], [−2, 0, 4, 0, −1], [2, 0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, 9, 0, −30, 0, 27, 0, −9, 0, 1], [0, −11, 0, 55, 0, −77, 0, 44, 0, −11, 0, 1], [0, 11, 0, −55, 0, 77, 0, −44, 0, 11, 0, −1], [0, −9, 0, 30, 0, −27, 0, 9, 0, −1], [0, 7, 0, −14, 0, 7, 0, −1], [0, −5, 0, 5, 0, −1], [0, 3, 0, −1], [0, −1]] [[0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [−2, 7, 1, −14, 0, 7, 0, −1], [2, −5, −4, 5, 1, −1], [2, −1, −16, 0, 20, 0, −8, 0, 1], [−2, 0, 16, 0, −20, 0, 8, 0, −1], [−2, 0, 4, 0, −1], [2, 0, −1]] continued on next page Note: the higher power coefficients not shown are all zero. Example: n = 27: the first zero of C(27, x) is ρ(27), the second zero is 5 ρ(27) − 5 ρ(27)3 − 1 ρ(27)5 , etc. 48 Table 4 continued: Zeros of C(n, x) in power basis (rising powers of ρ(n)) for n = 28, ..., 30. n 28 29 30 .. . power basis coefficients for < ρ0 , ..., ρδ(n)−1 > [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, 9, 0, −30, 0, 27, 0, −9, 0, 1], [0, −11, 0, 55, 0, −77, 0, 44, 0, −11, 0, 1], [0, 12, 0, −67, 0, 96, 0, −52, 0, 12, 0, −1], [0, −12, 0, 67, 0, −96, 0, 52, 0, −12, 0, 1], [0, 11, 0, −55, 0, 77, 0, −44, 0, 11, 0, −1], [0, −9, 0, 30, 0, −27, 0, 9, 0, −1], [0, −5, 0, 5, 0, −1], [0, 3, 0, −1], [0, −1]] [[0, 1], [0, −3, 0, 1], [0, 5, 0, −5, 0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, 9, 0, −30, 0, 27, 0, −9, 0, 1], [0, −11, 0, 55, 0, −77, 0, 44, 0, −11, 0, 1], [0, 13, 0, −91, 0, 182, 0, −156, 0, 65, 0, −13, 0, 1], [1, −7, −21, 56, 70, −126, −84, 120, 45, −55, −11, 12, 1, −1], [−2, 0, 36, 0, −105, 0, 112, 0, −54, 0, 12, 0, −1], [2, 0, −25, 0, 50, 0, −35, 0, 10, 0, −1], [−2, 0, 16, 0, −20, 0, 8, 0, −1], [2, 0, −9, 0, 6, 0, −1], [−2, 0, 4, 0, −1], [2, 0, −1]] [[0, 1], [0, −7, 0, 14, 0, −7, 0, 1], [0, −7, 0, 22, 0, −13, 0, 2], [0, 4, 0, −13, 0, 7, 0, −1], [0, −4, 0, 13, 0, −7, 0, 1], [0, 7, 0, −22, 0, 13, 0, −2], [0, 7, 0, −14, 0, 7, 0, −1], [0, −1]] 49 c c Table 5: Extended set M(n), first differences △ M(n), and floor-pattern F(n) for composed odd squarefree modulus n. c △ M(n) n(m) 1 2 3 15 21 33 8 12 20 [0, 1, 7, 11, 13, 17] [0, 1, 5, 11, 13, 17, 19, 23] [0, 1, 5, 7, 13, 17, 19, 23, 25, 29, 31, 35] [1, 6, 4, 2, 4] [1, 4, 6, 2, 4, 2, 4] [1, 4, 2, 6, 4, 2, 4, 2, 4, 2, 4] 4 35 5·7 39 3 · 13 51 3 · 17 55 5 · 11 24 [0, 1, 3, 9, 11, 13, 17, 19, 23, 27, 29, 31, 33, 37] [1, 2, 6, 2, 2, 4, 2, 4, 4, 2, 2, 2, 4] 24 [0, 1, 5, 7, 11, 17, 19, 23, 25, 29, 31, 35, 37, 41] [1, 4, 2, 4, 6, 2, 4, 2, 4, 2, 4, 2, 4] 32 [0, 1, 5, 7, 11, 13, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53] [0, 1, 3, 7, 9, 13, 17, 19, 21, 23, 27, 29, 29, 31, 37, 39, 41, 43, 47, 49, 51, 53, 57] [1, 4, 2, 4, 2, 6, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4] 8 57 3 · 19 36 [0, 1, 5, 7, 11, 13, 17, 23, 25, 29, 31, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59] [1, 4, 2, 4, 2, 4, 6, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4] 9 65 5 · 13 48 [0, 1, 3, 7, 9, 11, 17, 19, 21, 23, 27, 29, 31, 33, 33, 37, 41, 43, 47, 49, 51, 53, 57, 59, 61, 63, 67] [1, 2, 4, 2, 2, 6, 2, 2, 2, 4, 2, 2, 2, 4, 4, 2, 4, 2, 2, 2, 4, 2, 2, 2, 4] 10 69 3 · 23 44 [0, 1, 5, 7, 11, 13, 17, 19, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71] [1, 4, 2, 4, 2, 4, 2, 6, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4] 11 77 7 · 11 60 [0, 1, 3, 5, 9, 13, 15, 17, 19, 23, 25, 27, 29, 31, 37, 39, 41, 43, 45, 47, 51, 53, 57, 59, 61, 65, 67, 69, 71, 73, 75, 79] [1, 2, 2, 4, 4, 2, 2, 2, 4, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 4, 2, 2, 2, 2, 2, 4] 5 6 50 7 continued 2 δ(n) c M(n) m 40 [1, 2, 4, 2, 4, 4, 2, 2, 2, 4, 2, 2, 6, 2, 2, 2, 4, 2, 2, 2, 4] F(n) [2, 1, 0, 1, 0, 1, 2, 0] [1, 2, 0, 1, 0, 1, 0, 1, 0, 2, 1, 0] [1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0] [0, 2, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 2, 0, 0] [1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0] [1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0] [0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0] [1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0] [0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0] [1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 0] [0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0] c c Table 5 ctnd.: Extended set M(n), first differences △ M(n), and floor-pattern F(n) for composed odd squarefree modulus n. c M(n) c △ M(n) 51 m n(m) 2 δ(n) 12 85 5 · 17 64 [0, 1, 3, 7, 9, 11, 13, 19, 21, 23, 27, 29, 31, 33, 37, 39, 41, 43, 47, 49, 53, 57, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 87] [1, 2, 4, 2, 2, 2, 6, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 4, 2, 4, 4, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 4] 13 87 3 · 29 56 [0, 1, 5, 7, 11, 13, 17, 19, 23, 25, 31 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89] [1, 4, 2, 4, 2, 4, 2, 4, 2, 6, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4] 14 91 7 · 13 72 [1, 2, 2, 4, 2, 4, 2, 2, 4, 2, 2, 2, 2, 2, 4, 4, 2, 2, 2, 4, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4] 15 93 3 · 31 60 [0, 1, 3, 5, 9, 11, 15, 17, 19, 23, 25, 27, 29, 31, 33, 37, 41, 43, 45, 47, 51, 53, 55, 57, 59, 61, 67, 69, 71, 73, 75, 79, 81, 83, 85, 87, 89, 93] [0, 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95] 16 95 5 · 19 72 [0, 1, 3, 7, 9, 11, 13, 17, 21, 23, 27, 29, 31, 33, 37, 39, 41, 43, 47, 49, 51, 53, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 87, 89, 91, 93, 97] [1, 2, 4, 2, 2, 2, 4, 4, 2, 4, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 6, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 4] 17 105 3·5·7 48 [0, 1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107] [1, 10, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4] .. . [1, 4, 2, 4, 2, 4, 2, 4, 2, 4, 6, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4] F(n) [0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0] [1, 0, 1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0] [0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0] [1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0] [0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0] [4, 0, 1, 0, 1, 2, 0, 2, 1, 0, 1, 2, 2, 0, 2, 1, 0, 2, 1, 2, 3, 1, 0, 1, 0, 1, 3, 2, 1, 2, 0, 1, 2, 0, 2, 2, 1, 0, 1, 2, 0, 2, 1, 0, 1, 0, 4, 0] Table 6: Cycle structure of Gal (Q(ρ(n))/Q) for n = 1, 2, ..., 40. n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 .. . cycles [[0]] = [[1]] [[1]] [[1]] [[3, 1]] [[3, 1]] [[5, 1]] [[3, 5, 1]] [[3, 7, 5, 1]] [[5, 7, 1]] [[3, 9, 7, 1]] [[3, 9, 5, 7, 1]] [[5, 1], [7, 1], [11, 1]] [[7, 3, 5, 9, 11, 1]] [[5, 3, 13, 9, 11, 1]] [[7, 11, 13, 1]] [[3, 9, 5, 15, 13, 7, 11, 1]] [[3, 9, 7, 13, 5, 15, 11, 1]] [[5, 11, 17, 13, 7, 1]] [[3, 9, 11, 5, 15, 7, 17, 13, 1]] [[3, 9, 13, 1], [7, 9, 17, 1], [11, 1], [19, 1]] [[11, 5, 13, 17, 19, 1]] [[3, 9, 17, 7, 21, 19, 13, 5, 15, 1]] [[3, 9, 19, 11, 13, 7, 21, 17, 5, 15, 1]] [[5, 23, 19, 1], [7, 1], [11, 23, 13, 1], [17, 1]] [[3, 9, 23, 19, 7, 21, 13, 11, 17, 1]] [[7, 3, 21, 9, 11, 25, 19, 23, 5, 17, 15, 1]] [[5, 25, 17, 23, 7, 19, 13, 11, 1]] [[3, 9, 27, 25, 19, 1], [5, 25, 13, 9, 11, 1], [17, 9, 15, 25, 23, 1]] [[3, 9, 27, 23, 11, 25, 17, 7, 21, 5, 15, 13, 19, 1]] [[7, 11, 17, 1], [13, 11, 23, 1], [19, 1], [29, 1]] [[3, 9, 27, 19, 5, 15, 17, 11, 29, 25, 13, 23, 7, 21, 1]] [[3, 9, 27, 17, 13, 25, 11, 31, 29, 23, 5, 15, 19, 7, 21, 1]] [[5, 25, 7, 31, 23, 17, 19, 29, 13, 1]] [[3, 9, 27, 13, 29, 19, 11, 33, 31, 25, 7, 21, 5, 15, 23, 1]] [[3, 9, 27, 11, 33, 29, 17, 19, 13, 31, 23, 1]] [[5, 25, 19, 23, 29, 1], [7, 23, 17, 25, 31, 1], [11, 23, 35, 25, 13, 1]] [[5, 25, 23, 33, 17, 11, 19, 21, 31, 7, 35, 27, 13, 9, 29, 3, 15, 1]] [[13, 17, 7, 15, 33, 27, 29, 3, 37, 25, 21, 31, 23, 5, 11, 9, 35, 1]] [[7, 29, 31, 17, 37, 25, 19, 23, 5, 35, 11, 1]] [[3, 9, 27, 1], [7, 31, 23, 1], [11, 39, 29, 1], [13, 9, 37, 1], [17, 31, 33, 1], [19, 39, 21, 1]] Boxed and colored n-numbers indicate non-cyclic Galois groups. See Table 8. Boldface numbers are nontrivial square roots Modd n, denoted by s in the text. 52 Table 7: Non-cyclic Galois groups Gal (Q(ζ(n))/Q) , n ≤ 100 n ϕ(n) cycle structure no. of cycles 8 12 15 16 20 21 24 28 30 32 33 35 36 39 40 42 44 45 48 51 52 55 56 57 60 63 64 65 66 68 69 70 72 75 76 77 78 80 4 4 8 8 8 12 8 12 8 16 20 24 12 24 16 12 20 24 16 32 24 40 24 36 16 36 32 48 20 32 44 24 24 40 36 60 24 32 23 23 42 22 42 22 42 22 63 27 63 42 22 82 41 22 103 122 62 63 122 62 44 26 63 103 122 62 44 26 162 81 41 22 122 62 202 102 67 183 44 26 612 162 81 41 22 126 103 162 81 41 22 223 122 62 67 202 102 183 303 122 62 412 24 3 3 4 4 4 3 7 3 4 5 3 4 3 4 10 3 3 4 10 6 4 4 7 3 10 12 6 6 3 6 3 4 7 4 3 3 4 16 Continued on the next page. 53 Galois group Z2 Z2 Z4 Z4 Z4 Z3 × Z2 × Z2 × Z2 × Z2 × Z2 × Z22 Z23 Z3 × Z22 Z4 × Z2 Z8 × Z2 Z5 × Z22 Z4 × Z3 × Z2 Z3 × Z22 Z4 × Z3 × Z2 Z4 × Z22 Z3 × Z22 Z5 × Z22 Z4 × Z3 × Z2 Z4 × Z22 Z16 × Z2 Z4 × Z3 × Z2 Z5 × Z4 × Z2 Z3 × Z23 Z9 × Z22 Z4 × Z22 Z32 × Z22 Z16 × Z2 Z42 × Z3 Z5 × Z22 Z16 × Z2 Z11 × Z22 Z4 × Z3 × Z2 Z3 × Z23 Z5 × Z4 × Z2 Z9 × Z22 Z5 × Z3 × Z22 Z4 × Z3 × Z2 Z42 × Z2 Table 7 continued: Non-cyclic Galois groups Gal (Q(ζ(n))/Q) , n ≤ 100 n ϕ(n) cycle structure no. of cycles Galoisgroup 84 85 87 88 90 91 92 93 95 96 99 100 .. . 24 64 56 40 24 72 44 60 72 32 60 40 67 164 82 44 282 142 107 122 62 128 68 223 303 362 182 84 43 26 303 202 102 7 10 4 7 4 16 3 3 4 13 3 4 Z3 × Z23 Z16 × Z4 Z7 × Z4 × Z2 Z5 × Z23 Z4 × Z3 × Z2 Z4 × Z32 × Z2 Z11 × Z22 Z5 × Z3 × Z22 Z9 × Z4 × Z2 Z8 × Z22 Z5 × Z3 × Z22 Z5 × Z4 × Z2 The cyclic group of order m is denoted by Zm . For all other values n ≤ 100 the Galois group is the cyclic group Zϕ(n) . Only independent cycles are counted, i.e., cycles which appear as sub-cycles of the given ones have been omitted. The notation, e.g., 162 81 41 22 , means that there are 2 cycles of order (length) 16, one cycle of order 8, one cycle of order 4 and two cycles of order 2. Direct products of identical cyclic groups are sometimes written in exponent form, e.g., Z22 stands for Z2 × Z2 . Boxed and colored n-numbers indicate where some non-cyclic Galois group appears for the first time. Some of the cycle graphs are shown in Fig. 4. 54 Table 8: Non-cyclic Galois groups Gal (Q(ρ(n))/Q) , n ≤ 100 n δ(n) cycle structure no. of cycles Galoisgroup 12 20 24 28 30 36 40 42 44 48 52 56 60 63 65 66 68 70 72 76 78 80 84 85 88 90 91 92 96 100 .. . 4 8 8 12 8 12 16 12 20 16 24 24 16 18 24 20 32 24 24 36 24 32 24 32 40 24 36 44 32 40 23 42 22 42 22 63 42 22 63 46 63 103 82 41 22 122 62 122 62 44 26 64 122 62 103 162 81 41 22 122 62 122 62 183 122 62 84 44 67 162 81 41 22 202 102 122 62 124 223 162 81 41 22 202 102 3 4 4 3 4 3 6 3 3 5 4 4 10 4 4 3 6 4 4 3 4 8 7 6 4 4 4 3 6 4 Z2 × Z2 Z4 × Z2 Z4 × Z2 Z3 × Z22 Z4 × Z2 Z3 × Z22 Z4 × Z4 Z3 × Z22 Z5 × Z22 Z8 × Z2 Z4 × Z3 × Z2 Z4 × Z3 × Z2 Z4 × Z22 Z32 × Z2 Z4 × Z3 × Z2 Z5 × Z22 Z16 × Z2 Z4 × Z3 × Z2 Z4 × Z3 × Z2 Z9 × Z22 Z4 × Z3 × Z2 Z8 × Z4 Z3 × Z23 Z16 × Z2 Z5 × Z4 × Z2 Z4 × Z3 × Z2 Z4 × Z32 Z11 × Z22 Z16 × Z2 Z5 × Z4 × Z2 The cyclic group of order m is denoted by Zm . For all other n ≤ 100 cases the Galois group is the cyclic group Zδ(n) . The n values are given in A206552. Only independent cycles are counted, i.e., cycles which appear as sub-cycles of the given ones have been omitted. The notation, e.g., 162 81 41 22 , means that there are 2 cycles of order (length) 16, one cycle of order 8, one cycle of order 4 and two cycles of order 2. Direct products of identical cyclic groups are sometimes written in exponent form, e.g., Z22 stands for Z2 × Z2 . Boxed and colored n-numbers indicate where some non-cyclic Galois group appears for the first time. For the cycle graphs see Fig. 4. 55 δ=4: Z_2 x Z_2 δ=8: Z_4 x Z_2 δ=12: Z_3 x Z_2 x Z_2 δ=16: Z_4 x Z_4 δ=20: Z_5 x Z_2 x Z_2 δ=16: Z_8 x Z_2 δ=24: Z_4 x Z_3 x Z_2 δ=16: Z_4 x Z_2 x Z_2 δ=18: Z_3 x Z_3 x Z_2 δ=32: Z_16 x Z_2 δ=36: Z_9 x Z_2 x Z_2 Figure 4: Cycle graphs for non-cyclic Galois groups Gal (Q(ρ(n))/Q) appearing for n = 1..100. δ is the degree of C(n, x), the maximal polynomial of ρ(n), hence the order of the Galois group. See Table 8. Continued on next page. 56 δ=32: Z_8 x Z_4 δ=24: Z_3 x Z_2 x Z_2 x Z_2 δ=40: Z_5 x Z_4 x Z_2 δ=36: Z_4 x Z_3 x Z_3 Figure 4 continued: Cycle graphs for non-cyclic Galois groups Gal (Q(ρ(n))/Q) appearing for n = 1..100. See Table 8. 57
4math.GR
Guided Grammar Convergence Vadim Zaytsev, [email protected] arXiv:1503.08476v1 [cs.SE] 29 Mar 2015 SWAT/CWI and IvI/UvA, Amsterdam, The Netherlands Abstract. Relating formal grammars is a hard problem that balances between language equivalence (which is known to be undecidable) and grammar identity (which is trivial). In this paper, we investigate several milestones between those two extremes and propose a methodology for inconsistency management in grammar engineering. While conventional grammar convergence is a practical approach relying on human experts to encode differences as transformation steps, guided grammar convergence is a more narrowly applicable technique that infers such transformation steps automatically by normalising the grammars and establishing a structural equivalence relation between them. This allows us to perform a case study with automatically inferring bidirectional transformations between 11 grammars (in a broad sense) of the same artificial functional language: parser specifications with different combinator libraries, definite clause grammars, concrete syntax definitions, algebraic data types, metamodels, XML schemata, object models. 1 Introduction Modern grammar theory has shifted its focus from general purpose programming languages to a broader scope of software languages that comprise programming languages, domain specific languages, markup languages, API libraries, interaction protocols, etc [12]. Such software languages are specified by grammars in a broad sense that still rely on the familiar infrastructure of terminals, nonterminals and production rules, but specify general commitment to grammatical structure found in software systems. In that sense, a type safe program commits to a particular type system; a program that uses a library, commits to using its exposed interface; an XML document commits to the structure defined by its schema — failure to commit in any of these cases would mean errors in interpretation of the language entity. These, and many other, scenarios can be expressed and resolved in terms of grammar technology, but not all structural commitments profit from grammatical approach (as the most remarkably problematic ones we can note indentation policies and naming conventions). One of the problems of multiple implementations of the same language, which is known for many years, is having an abstract syntax definition and a concrete syntax definition [25]. Basically, the abstract syntax defines the kind of entities that inhabit the language and must be handled by semantics specification. A concrete syntax shows how to write down language entities and how to read them back. It is not uncommon for a programming language to have several possible concrete syntaxes: for example, any binary operation may use prefix, infix or postfix notation, without any changes to the language semantics. Indeed, we have seen infix dialects of postfix Forth (Forthwrite, InfixForth) and prefix dialects of infix REBOL (Boron). For software languages, the problem is broader: we can speak of one intended language specification and a variety of abstract and concrete syntaxes, data models, class dictionaries, metamodels, ontologies and similar contracts that conform to it. Our definition of the intended language relies on bidirectional transformations [1,17,22,28] and in particular on their notation by Meertens [17], which we redefine here for the sake of completeness and clarity: Definition 1. For a relation R ⊆ S × T , a semi-maintainer is a function ⊲ : S × T → T , such that ∀x ∈ S, ∀y ∈ T, hx, x ⊲ yi ∈ R, and ∀x ∈ S, ∀y ∈ T, hx, yi ∈ R ⇒ x ⊲ y = y. The first property is called correctness and ensures that the update caused by the semi-maintainer restores the relation. The second property is hippocraticness and states that an update has no effect (“does no harm”), if the original pair is already in the relation [22]. Other properties of bidirectional transformations such as undoability are often unachievable. A maintainer is a pair of semi-maintainers ⊲ and ⊳. A bidirectional mapping is a relation and its maintainer. Definition 2. A grammar G conforms to the language intended by the master grammar M , if there exists a bidirectional mapping between instances of their G |= L(M ) ⇐⇒ ∃R ⊆ L(G) × L(M ) languages. ∃⊲ : L(G) × L(M ) → L(M ) ∃⊳ : L(G) × L(M ) → L(G) Naturally, for any grammar holds G |= L(G). For example, consider a concrete syntax Gc of a programming language used by programmers and an abstract syntax M = Ga used by a software reengineering tool. We would need ⊲ to produce abstract syntax trees from parse trees and ⊳ to propagate changes done by a reengineering tool, back to parse trees. If those can be constructed — examples of algorithms have been seen [10,23,25], — then Gc conforms to the language intended by Ga . As another example, consider an object model used in a tool that stores its objects in an external database (XML or relational): the existence of a bidirectional mapping between entries (trees or tables) in the database and the objects in memory, means that they represent the same intended language, even though they use very different ways to describe it and one may be a superlanguage of the other. For a more detailed formalisation and discussion of bidirectional mappings and grammars, a reader is redirected elsewhere [29,31]. Roadmap. In the following sections, we will briefly present the following milestones of relationships between languages: §2. Grammar identity: structural equality of grammars §3. Nominal equivalence: name-based equivalence of grammars §4. Structural equivalence: name-agnostic footprint-matching equivalence §5. Abstract normalisation: structural equivalence of normalised grammars Then, §6 summarises the proposed method and discusses its evaluation. Finally, §7 concludes the paper by establishing context and contributions. 2 Grammar identity Let us assume that grammars are traditionally defined as quadruples G = hN , T , P, Si where their elements are respectively the sets of nonterminal symbols, terminal symbols, production rules and starting nonterminal symbols. Definition 3. Grammars G and G′ are identical, if and only if all their components are identical: G = G′ ⇐⇒ N = N ′ ∧ T = T ′ ∧ P = P ′ ∧ S = S ′ . The definition is trivial, and in practice is commonly weakened somehow. For example, many metalanguages allow the right hand sides of rules from P to contain disjunction (inner choice), which is known to be commutative, so it is natural to disregard the order of disjunctive clauses when comparing grammars: gdt, the “grammar diff tool” used in convergence case studies [15,32] implements that. However, many grammar manipulation technologies such as PEG [8] or TXL [2], use ordered choices, so this optimisation can be perceived as premature. For this reason, we will explicitly abandon disjunction in later sections. 3 Nominal equivalence Since identity can be seen as a trivial bijection, a disciplined weakening of Def. 3 that works across all grammars in a broad sense, is this: Definition 4. Grammars G and G′ are nominally equivalent, if there is a bijection β between their production rules: G ≅ G′ ⇐⇒ N = N ′ ∧ T = T ′ ∧ S = S ′ ∧ ∃β : P → P ′ , ∀q ∈ P ′ , ∃p ∈ P, q = β(p); ∀p1 , p2 ∈ P, β(p1 ) = β(p2 ) ⇒ p1 = p2 Algorithms that are used to construct β can be different. For example, in Popart the metalanguage is designed in such a way that it contains enough information to generate both abstract and concrete syntaxes [25]. In TIF-grammars, a concrete syntax specification is annotated with directions on which nodes need to be folded/unfolded or removed when constructing an abstract syntax tree (AST) [10]. In Rascal, the implode function that maps parse trees to ASTs uses names of nonterminals and subexpressions to direct the automatic construction of β: for example, an optional nonterminal occurrence can be mapped to a string, a list or a Boolean; a Kleene star can be imploded to either a list or a set, etc [13]. Similar techniques can be spotted in OOP [4], in MDE [6], in data binding frameworks [7], etc. Once the bijective β is agreed on the level of grammars, we need to construct a coupled maintainer on the language instance level. If it cannot be constructed, then β is useless for us. However, there are many cases when the maintainer can be constructed to be bidirectional (R from Def. 2 can be partial and ⊲ and/or ⊳ can be only injective but not surjective). An example of that is matching different representations of lists/sets: “one or more” and “zero or more” Kleene repetitions are commonly used in syntactic notations, but one can always be bidirectionally matched to the other. In our prototype implementation, we disregard unreachable nonterminals, treat built-in and user-defined nonterminals equally, allow sequence element permutations and desugar metasyntactic constructs like “separator lists”, as well as match different kinds of lists/sets. Such strategy set was chosen to be valid for nominal matching techniques, but also useful for the following sections. 4 Structural equivalence In order to reuse the methods from the nominal equivalence approach in the case when nonterminal names do not match, we need to construct an additional mapping between the nonterminals, and use that instead of nominal identity. We shall refer to this mapping as nominal resolution. To construct it, we generalise permutations and construct signatures that express general structure of a production rule. Such signatures depend heavily on the expressiveness of the chosen metalanguage (in particular, when the formal grammar is defined with just terminals and nonterminals, their use is severely limited), but most common metalanguages contain enough functionality to allow signatures to work. Definition 5. A footprint πn (x) of a nonterminal n in an expression x is defined as a multiset of presence indicadef tors. πn (x) = Definition 6. Two footprints are equivalent, if they are equal modulo repetition kinds: π ≈ ξ ⇐⇒ π = ξ ∨ π ′ = ξ ′ , where ζ ′ is ζ with all + elements replaced by ∗ elements.   {1}      {?}      {+}  {∗}    πn (y)      πn (e1 ) ∪ πn (e2 )    ∅ if x = n if x = n? if x = n+ if x = n∗ if x = name: y if x = e1 e2 otherwise Note how disjunction is missing from the definition of a footprint. We will see later how it can be removed from any grammar by factoring and folding. The identity of footprints follows the standard definition of identity of multisets (which naturally subsumes abstraction over permutations). We also define equivalence of them that generalises the treatment of lists discussed in the previous section. Footprints together form a signature. Definition 7. A prodsig, or a signature of a production rule p = (m ::= x) is defined as a set of tuples with nonterminals used in its right hand side and their footprints: σ(m ::= x) = {hn, πn (x)i | n ∈ N , πn (x) 6= ∅}. For example, the prodsig of a production rule P ::= F + is {hF, {+}i} and the prodsig of F ::= SS ∗ E is {hE, {1}i, hS, {1, ∗}i}. Definition 8. Two production rules are prodsig-equivalent, if and only if there is an equivalent match between tuple ranges of their signatures: p ≎ q ⇐⇒ ∀hn, πi ∈ σ(p), ∃hm, ξi ∈ σ(q), π ≈ ξ Consider a simple case of exactly one production rule taken from each of the grammars: pm from the master grammar and ps from the servant grammar. Suppose that the left hand sides of them are assumed to match, and we want to see if the right hand sides are matched nominally as well, and whether they deliver any new information with respect to nominal resolution. When prodsigs σ(em ) and σ(es ) are constructed, we have effectively built relations that bind nonterminal names to their occurrences. By subsequently matching the ranges of them with either strong or weak prodsig-equivalence, we can infer nominal matching of the nonterminals by matching the domains of the relations. Definition 9. For any two prodsig-equivalent production rules p and q, p ≎ q, there is (at least one) nominal resolution relationship p ⋄ q that satisfies: ∀ha, bi ∈ p ⋄ q : a = ω ∨ b = ω ∨ ∃π, ∃ξ, π ≈ ξ, ha, πi ∈ σ(p), hb, ξi ∈ σ(q) ∀hc, di ∈ p ⋄ q : a = c 6= ω ⇒ b = d, where ω denotes unmatched nonterminals. For two arbitrarily provided grammars (presumably of the same intended software language, but not necessarily admitting any kind of equivalence), we cannot claim the existence of only one nominal resolution that works across all their production rules, but we can attempt to construct a minimum possible one: Definition 10. Given two grammars G1 and G2 , a nominal resolution between them is a relation between their nonterminals ♦ ∈ N1 × N2 such that ∀pi ∈ P1 , if ∃qj ∈ P2 , pi ≎ qj , then ∃⋄ij ⊂ ♦, such that pi ⋄ij qj . In our case study, we have used various definitions of the same toy functional language FL taken from [15]. For instance, some grammars were extracted from object models by analysing Java code. Since the Java implementation of FL used List<Expr> to represent lists, the production rules for function declaration and function call assumed zero or more arguments, while the master grammar assumed one or more. Hence, production rules F1 ::= S1 S1∗ E1 and E1 ::= S1 E1∗ were matched with their prodsig-equivalent counterparts F2 ::= S2 S2+ E2 and E2 ::= S2 E2+ . All the various grammars of FL, their prodsigs and nominal matching reports are exposed for inspection in the full report on the case study [27]. 5 Abstract normalisation In order to apply the methodology based on nonterminal footprints, production signatures and their equivalence relations, we need the input grammars to comply with some assumptions that have been left informal so far. In particular, we can foresee possible problems with names/labels for production rules and subexpressions, terminal symbols (often not a part of the abstract syntax), disjunction (inner choices, also non-factored), separator lists and other metasyntactic sugar, non-connected nonterminal call graph, inconsistent style of production rules, etc. If by Pn ⊂ P we denote the subset of production rules concerning one particular nonterminal: Pn = {p ∈ P | p = n ::= α, α ∈ (N ∪ T )∗ }, then we can define the Abstract Normal Form as follows: Definition 11. A grammar G = hN , T , P, Si, where T = ∅ and S = {s}, is said to be in Abstract Normal Form, if and only if: • N is decomposable to disjoint sets, such that N = N+ ∪ N− ∪ N⊥ • One of them is not empty and includes the root: s ∈ N+ ∪ N− • Nonterminals from one subset are undefined: n ∈ N⊥ ⇒ Pn = ∅ • Nonterminals from one other subset are defined with exactly one rule: n ∈ N− ⇒ |Pn | = 1, Pn = {n ::= α}, α ∈ N + • Nonterminals from the other subset are defined with chain rules: n ∈ N+ ⇒ ∀p ∈ Pn , p = (n ::= x), x ∈ N In fact, any grammar can be rewritten to assume this form: in our prototype implementation, this is done by programming a grammar mutation [28,30]. (A grammar mutation is a general intentional grammar change that cannot be expressed independently of the grammar to which it will be applied. Thus, if “rename” is a parametric grammar transformation operator, then “rename A to B” is a transformation, but “rename all nonterminals to uppercase” is a mutation that is equivalent to transformations like “rename a to A” and “rename b to B” depending on the input grammar). Our prototype, normal::ANF, is a metaprogram in Rascal [13] that is available for inspection as open source [32]. It is in fact a superposition of mutations that address the items from the definition individually: remove labels, desugar separator lists, fold/unfold chain production rules, etc. All the rewritings performed by transforming a grammar to its ANF, are assumed to be monadic in the sense of not only normalising the grammar, but also yielding a bidirectional grammar transformation chain which execution would normalise the grammar. (In our implementation, these steps are specified in the ΞBGF language, primarily because no other bidirectional grammar transformation operator suite exists [30]). The bidirectional grammar transformation chain can then be coupled to the bidirectional mapping between language instances from Def. 2, with the methodology described by [28]. This is required for traceability: the conversion to ANF is one of the steps to achieve automated convergence, not a one-way preprocessing. 6 Discussion To summarise, grammar convergence is a technique of relating different grammars in a broad sense of the same intended software language [15]. It relies on the transformations being programmed by an experienced grammar engineer: even beside the required expertise, the process is not incremental — the transformation steps need to be considered carefully and constructed for each new grammar added to the mix. With the definitions from previous sections, we have described the process of guided grammar convergence, where the master grammar of the intended language is constructed once, and the transformations are inferred for any directly available grammars as well for the ones possibly added in the future. The process works as follows. • • • • Extract pure grammatical knowledge from the grammar source. Use grammar mutations to preprocess your grammars, if necessary. Normalise the grammar by removing all problematic/ambiguous constructs. Start by matching the roots of the connected normalised grammar. • Match multiple production rules by prodsig-equivalence; infer new nominal matches by matching equivalent prodsigs. Repeat for all nonterminals. • If several matches are possible, explore all and fallback in case of failure. If global nominal resolution scheme was impossible to infer, fail. • Resolve structural differences in the production rules that matched nominally. To evaluate the method of guided grammar convergence, we have applied it to a case study of 11 different grammars of the same intended functional language that was defined and used earlier in order to demonstrate the original grammar convergence method that converged 5 of these grammars. The following grammar sources were used (all of them are available in the repository of SLPS [32] together with their evolution history and authorship attribution): adt: an algebraic data type1 in Rascal [13]; antlr: a parser description in the input language of ANTLR [19], with semantic actions (in Java) intertwined with EBNF-like productions; dcg: a logic program written in the style of definite clause grammars [20]; emf: an Ecore model, automatically generated by Eclipse [5] from the XML Schema of the xsd source; jaxb: an object model obtained by a data binding framework, generated automatically by JAXB [7] from the XML schema for FL; om: a hand-crafted object model (Java classes) for the abstract syntax of FL; python: a parser specification in a scripting language, using the PyParsing library [16]; rascal: a concrete syntax specification in the metaprogramming language of Rascal language workbench [13]; sdf: a concrete syntax definition in the notation of SDF [11] with scannerless generalized LR parsing as parsing model. txl: a concrete syntax definition in the notation of TXL (Turing eXtender Language) transformational framework [2], which, unlike SDF, uses a combination of pattern matching and term rewriting). xsd: an XML schema [9] for the abstract syntax of FL. The complete case study is too big to be presented here, interested readers are redirected to a 40+ page long report [27], containing all production rules, signatures, matchings and transformations. The case study was successful: on average ANF was achieved after 20–30 transformation steps, nominal resolution took up to 9 (proportional to the number of nonterminals) and structural resolution needed 0–5 more steps, after which all 11 grammars were converged. ANTLR, DCG and PyParsing used layered definitions and therefore were the only three grammars to require mutation (another 2–6 steps). The case study is available for investigation and replication both in the form of Rascal metaprograms at http://github.com/grammarware/slps [32] (the main algorithm is located in the converge::Guided module which can be observed and modified 1 http://tutor.rascal-mpl.org/Rascal/Declarations/AlgebraicDataType/AlgebraicDataType.html. at shared/rascal/src/converge/Guided.rsc) and as a PDF report with all grammars and transformations pretty-printed automatically [27]. Guided grammar convergence is a methodology stemming from the grammarware “technological space” [14]. When looking for similar techniques in other spaces (engaging in “space travel”), the obvious candidates are schema matching and data integration in the field of data modeling and databases [21]; comparison of UML models or metamodels in the context of model-driven engineering [6,26]; model weaving for product line software development [3,24]; computation of refactorings from different OO program versions [4,18]; etc. For example, Del Fabro and Valduriez [3] utilised metamodel properties for automatically producing weaving models. The core difference is that (meta)model weaving ultimately aims at incorporating all the changes into the resulting (meta)model, while guided grammar convergence also makes complete sense when some changes in the details are disregarded. The lowest limit in this process is needed (otherwise additional claims on the minimality of inferred transformations are required), and we specify this lowest limit as the master grammar. Another difference is that model weaving rarely involves a number of models bigger than two, and even our little case study of guided convergence had 10+ grammars in it. In general, prodsig-based matching is more lightweight than those methods, since it in fact compares straightforwardly structured prodsigs, thus easily wins in performance and implementability but loses in applicability to complex scenarios. 7 Conclusion We knew that language equivalence is undecidable and that grammar identity is trivial. In this paper, we have attempted to reach a useful level of reasoning about language relationships by departing from grammar identity as the “easy” side of the spectrum. This was done in the scope of grammar convergence, when several implementations of the same software language are inspected for compatibility. A definition of an intended language was provided (Def. 2) based on a bidirectional transformation between language entities. Then we revisited existing and possible techniques of structural matching that assumed nominal identity (Def. 3). In order to automatically infer nominal matching, we introduced nonterminal footprints (Def. 5), production signatures (Def. 7) and various degrees of equivalence among them. An extensive normalisation scheme (Def. 11) was proposed to transform any given grammar into the form most suitable for nominal and then structural matching. It has been explained that when such normalisation is not enough, a more targeted yet still automated approach is needed with grammar mutation strategies making the method robust with respect to different grammar design decisions, such as the use of layers instead of priorities or recursion instead of iteration. Just as all other parts of the proposed process, these mutations operate automatically and do not require human intervention. A case study was used to evaluate the proposed method of guided grammar convergence. The experiment concerned several implementations of a simple functional language in ANTLR, DCG, Ecore, Java, Python, Rascal, SDF, TXL, XML Schema. The diversity in language processing frameworks — metaprogramming languages, declarative specifications, syntax definitions, algebraic data types, parsing libraries, transformation frameworks, software models, parser definitions — was intentional and aimed at stressing the definition of the intended language and the guided convergence method. Casting all grammars from our case study to ANF allowed us to make inference quicker and with less obstacles, as well as to explain the process more clearly. All artifacts discussed on the pages of this paper, are transparently available to the public through a GitHub repository [32]. For each of the sources of the case study, one could inspect the original file, the extracted grammar, the extractor itself, the mutations that have been derived and applied, the normalisations to ANF, the normalised grammar, the nominal resolution and reasons for each match, as well as the structural resolution steps. One could also investigate the implementation of the method of guided grammar convergence, the algorithm for calculating prodsigs and the process of convergence. Supplementary material contains 40+ pages of the full report, also generated by our prototype [27]. On the practical side, guided grammar convergence provides a balanced method of grammar manipulation, positioned right between unstructured inline editing (which makes grammar development very much like software development but lacks important properties such as traceability and reproducibility) and strictly exogenous functional transformation (which requires substantially more effort but is robust, repeatable and exposes the intended semantics). Its future role can be seen as a support for grammar product lines that allows both steady adaptation plans for deriving secondary artifacts from the reference grammar, and occasional inline editing of the derived artifacts with subsequent automated restoration of the adaptation scripts. This is a contribution to the field of engineering discipline for grammarware [12]. References 1. K. Czarnecki, J. Foster, Z. Hu, R. Lämmel, A. Schürr, and J. Terwilliger. Bidirectional Transformations: A Cross-Discipline Perspective. In TPMT, volume 5563 of LNCS, pages 260–283. Springer, 2009. 2. T. R. Dean, J. R. Cordy, A. J. Malton, and K. A. Schneider. Grammar Programming in TXL. In SCAM. IEEE, 2002. 3. M. D. Del Fabro and P. Valduriez. Semi-Automatic Model Integration Using Matching Transformations and Weaving Models. In SAC, pages 963–970, 2007. 4. D. Dig, C. Comertoglu, D. Marinov, and R. Johnson. Automated Detection of Refactorings in Evolving Components. In ECOOP, volume 4067 of LNCS, pages 404–428. Springer, 2006. 5. Eclipse. Eclipse Modeling Framework Project (EMF 2.4), 2008. http://www.eclipse.org/modeling/emf. 6. J.-R. Falleri, M. Huchard, M. Lafourcade, and C. Nebut. Metamodel Matching for Automatic Model Transformation Generation. In MoDELS, volume 5301 of LNCS, pages 326–340. Springer, 2008. 7. J. Fialli and S. Vajjhala. Java Specification Request 31: XML Data Binding Specification, 1999. 8. B. Ford. Parsing Expression Grammars: a Recognition-Based Syntactic Foundation. In POPL, January 2004. 9. S. Gao, C. M. Sperberg-McQueen, and H. S. Thompson. W3C XML Schema Definition Language (XSD) 1.1. W3C Recommendation, Apr. 2012. 10. A. Johnstone and E. Scott. Tear-Insert-Fold grammars. In LDTA, pages 6:1–6:8. ACM, 2010. 11. P. Klint. Meta-Environment for Generating Program- ming Environments. TOSEM, 2(2):176–201, 1993. 12. P. Klint, R. Lämmel, and C. Verhoef. Toward an Engineering Discipline for Grammarware. TOSEM, 14(3):331–380, 2005. 13. P. Klint, T. van der Storm, and J. Vinju. EASY Meta-programming with Rascal. In GTTSE, volume 6491 of LNCS, pages 222–289. Springer, January 2011. 14. I. Kurtev, J. Bézivin, and M. Akşit. Technological Spaces: an Initial Appraisal. In CoopIS, DOA’2002, Industrial track, 2002. 15. R. Lämmel and V. Zaytsev. An Introduction to Grammar Convergence. In iFM, volume 5423 of LNCS, pages 246–260. Springer, February 2009. 16. P. McGuire. Getting Started with Pyparsing. O’Reilly, first edition, 2007. 17. L. Meertens. Designing Constraint Maintainers for User Interaction. Manuscript, June 1998. 18. M. O’Keeffe and M. O. Cinnéide. Search-Based Refactoring: an Empirical Study. JSME, 20(5):345–364, 2008. 19. T. Parr. ANTLR—ANother Tool for Language Recognition, 2008. 20. F. Pereira and D. Warren. Definite Clause Grammars for Language Analysis. In Readings in Natural Language Processing, pages 101–124. MKP, 1986. 21. E. Rahm and P. A. Bernstein. A Survey of Approaches to Automatic Schema Matching. The VLDB Journal, 10:334–350, December 2001. 22. P. Stevens. Bidirectional Model Transformations in QVT: Semantic Issues and Open Questions. In MODELS, volume 4735 of LNCS, pages 1–15. Springer, 2007. 23. T. v. d. Storm, W. R. Cook, and A. Loh. Object Grammars: Compositional & Bidirectional Mapping Between Text and Graphs. In SLE, volume 7745 of LNCS, pages 4–23. Springer, July 2013. 24. M. Völter and I. Groher. Product line implementation using aspect-oriented and model-driven software development. In SPLC, pages 233–242. IEEE, 2007. 25. D. S. Wile. Abstract Syntax from Concrete Syntax. In ICSE, pages 472–480, 1997. 26. Z. Xing and E. Stroulia. Refactoring Detection based on UMLDiff Change-Facts Queries. In WCRE, pages 263–274. IEEE, 2006. 27. V. Zaytsev. Guided Grammar Convergence. Full Case Study Report. Generated by converge::Guided. ACM CoRR, 6541:1–44, July 2012. 28. V. Zaytsev. Language Evolution, Metasyntactically. EC-EASST, BX, 49, 2012. 29. V. Zaytsev. Case Studies in Bidirectionalisation. In Pre-proceedings of TFP’14, pages 51–58, May 2014. Extended Abstract. 30. V. Zaytsev. Software Language Engineering by Intentional Rewriting. EC-EASST, SQM, 65, Mar. 2014. 31. V. Zaytsev and A. H. Bagge. Parsing in a Broad Sense. In MoDELS, volume 8767 of LNCS, pages 50–67. Springer, Oct. 2014. 32. V. Zaytsev, R. Lämmel, T. van der Storm, L. Renggli, R. Hahn, and G. Wachsmuth. Software Language Processing Suite2 , 2008–2013. http://slps.github.io. 2 The authors are given according to the list of http://github.com/grammarware/slps/graphs/contributors. contributors at
6cs.PL
1 Coexistence of RF-powered IoT and a Primary Wireless Network with Secrecy Guard Zones arXiv:1705.07237v1 [cs.IT] 20 May 2017 Mustafa A. Kishk and Harpreet S. Dhillon Abstract This paper studies the secrecy performance of a wireless network (primary network) overlaid with an ambient RF energy harvesting Internet of Things (IoT) network (secondary network). The nodes in the secondary network are assumed to be solely powered by ambient RF energy harvested from the transmissions of the primary network. We assume that the secondary nodes can eavesdrop on the primary transmissions due to which the primary network uses secrecy guard zones. The primary transmitter goes silent if any secondary receiver is detected within its guard zone. Using tools from stochastic geometry, we derive the probability of successful connection of the primary network as well as the probability of secure communication. Two conditions must be jointly satisfied in order to ensure successful connection: (i) the signal-to-interference-plus-noise ratio (SINR) at the primary receiver is above a predefined threshold, and (ii) the primary transmitter is not silent. In order to ensure secure communication, the SINR value at each of the secondary nodes should be less than a predefined threshold. Clearly, when more secondary nodes are deployed, more primary transmitters will remain silent for a given guard zone radius, thus impacting the amount of energy harvested by the secondary network. Our results concretely show the existence of an optimal deployment density for the secondary network that maximizes the density of nodes that can harvest an amount of energy above a predefined threshold. Furthermore, we show the dependence of this optimal deployment density on the guard zone radius of the primary network. In addition, we show that the optimal guard zone radius selected by the primary network is a function of the deployment density of the secondary network. The interesting coupling between the performance of the two networks is studied using tools from game theory. In addition, we propose an algorithm that can assist the two networks to converge to Nash equilibrium. The convergence of this algorithm is verified using simulations. Overall, this work is one of the few concrete works that symbiotically merge tools from stochastic geometry and game theory. M. A. Kishk and H. S. Dhillon are with Wireless@VT, Department of ECE, Virginia Tech, Blacksburg, VA. Email: {mkishk, hdhillon}@vt.edu. The support of the U.S. NSF (Grants CCF-1464293, CNS-1617896, and IIS-1633363) is gratefully acknowledged. This paper was presented in part at the IEEE WCNC 2017, San Francisco, CA [1]. Last updated: May 23, 2017. 2 Index Terms Stochastic geometry, wireless power transfer, physical layer security, game theory, coverage probability, Poisson Point Process, Poisson hole process. I. I NTRODUCTION Owing to rapid technological advances, wireless communication networks are undergoing unprecedented paradigm shifts. One of the most interesting amongst them is the attempt to make wireless networks virtually self-perpetual in terms of their energy requirements. This is especially gaining importance in internet-of-things (IoT) realm where it may not be economical to charge or replace batteries periodically in billions of devices worldwide [2]. In order to achieve this vision of self-perpetual operation, it is necessary to provide energy harvesting capability to such networks in addition to reducing energy expenditures through energy-efficient communication policies [3], [4] and energy efficient hardware [5]. While, in principle, we can use any available source of energy to power these networks, ambient RF energy harvesting is considered a preferred option due to its ubiquity [6]. Further, due to the need of deploying these ambient RF energy harvesting nodes/devices (referred to as energy receivers or ERs in the rest of this paper) close to the sources of RF signals, concerns on the secrecy of these RF signals were recently raised in the literature [7]–[13]. While the RF signal source (referred to as primary transmitter or PT in this paper) transmits confidential messages to legitimate information receivers (IRs), the existence of ERs close to the PT may enable them to decode these messages. Consequently, careful study of physical layer security in such systems is required to glean insights on the new secrecy performance limitations in the presence of ERs. The importance of physical layer security lies in ensuring the ability of legitimate receivers to decode the confidential messages while preventing illegitimate receivers from decoding these messages [14]. Many solutions were proposed to enhance physical layer security including: (i) using protected zones in order to ensure an eavesdropper-free regions around the transmitters [15], [16], (ii) using artificial noise in order to degrade the confidential signal’s SNR at the energy receiver [9], [17], (iii) beamforming in multi-antenna systems [10]–[12], and (iv) using guard zones to stop information transmission whenever an eavesdropper is detected within a specific region around the transmitter [18], [19]. In this paper, we limit our attention to single-antenna transmitters and receivers, which means beamforming is not applicable to our setup. In addition, using protected zones assumes some physical control over the eavesdroppers, which will not be considered in this paper. Thus, we have 3 two options to choose from: either use artificial noise or guard zones. In [20], it was recently shown that the guard zone technique outperforms the artificial noise technique in the noise limited regime when the link distance is higher than a specific threshold. No such performance comparison between the two techniques is known when interference is taken into account. Regardless, we focus on the guard zone technique in this paper while leaving the artificial noise technique as a promising direction of future work. In particular, modeling the interaction between a primary network using guard zones to enhance secrecy and an IoT network using RF signals transmitted by the primary network to harvest energy is the main focus of this paper. A. Related Work In this subsection, we will provide a brief summary of the related works in three general directions of interest to this paper: (i) stochastic geometry-based analysis of secrecy and/or energy harvesting wireless networks, (ii) game theory-based analysis of secrecy and/or energy harvesting wireless networks, and (iii) analysis of secure wireless power transmission. Stochastic geometry-based work. Stochastic geometry has emerged as a powerful mathematical tool for the modeling and analysis of variety of wireless networks [21]–[24]. Out of numerous aspects of wireless networks that have been studied using stochastic geometry, two that are most relevant to this paper are: (i) secrecy [18], [25], [26], and (ii) energy harvesting [27]– [31]. We first discuss the related works on secrecy. The work presented in [18] quantified the loss in network throughput that results from ensuring a specific level of secrecy performance. In addition, possible performance enhancement using guard zones was also studied. Authors in [25] studied the physical layer security of downlink cellular networks assuming that all the existing users in the network are potential cooperating eavesdroppers. In [26], authors studied the secrecy of downlink transmission when the transmitter adopts transmit antenna selection. In particular, they derived the secrecy outage probability for the cases of independent and cooperating eavesdroppers, considering both half and full duplex legitimate receivers. Stochastic geometry has also been applied to analyze the performance of energy harvesting cellular networks with emphasis on either the downlink channel [27]–[29] or the uplink channel [30]. The work presented in [27] provided a comprehensive framework for analyzing heterogeneous cellular networks with energy harvesting base stations (BSs). The primary focus was on characterizing optimal transmission policies as well as quantifying the availability of different tiers of BSs. In [28], [29], the joint analysis of the downlink signal quality and the 4 amount of energy harvested at an RF-powered user was performed. In [30], [31], the uplink counterpart of this problem was explored in which the RF-powered node first harvests energy from ambient RF signals and then uses it to perform data transmission. The work presented in [32] focused on the secrecy analysis of wireless networks where the legitimate transmitters are powered by energy harvesting. To the best of our knowledge, our work provides the first stochastic geometry-based secrecy analysis of wireless power transmission with energy receivers acting as potential eavesdroppers. More details will be provided shortly. Game theory-based work. Tools from game theory have been widely used in the analysis of secrecy in wireless networks [33]–[36]. Using these tools, in [33] authors modeled the interaction between cognitive networks and eavesdroppers, where a channel selection algorithm was proposed to reach the Nash equilibrium. In [34], authors studied the problem of optimizing the uplink path in multi-hop networks in order to maximize the secrecy rate. In [35], authors used matching theory to develop an algorithm that enhances the secrecy of source-destination pairs using jamming nodes. In [36], authors proposed a distributed algorithm that enhances the achievable secrecy rates in wireless networks with cooperative wireless nodes. These tools have also been used in the analysis of energy harvesting wireless networks. For instance, authors in [37] provided different approaches to manage energy trading among energy harvesting small cell BSs in order to minimize the consumption of non-renewable energy. Authors in [38] used theses tools to model the relay interference channels where the relay divides the received power from the source into two parts: (i) the first part is used to charge its own battery, and (ii) the rest of the received power is used to forward the received packet to its destination. In [39], these tools were used to determine optimal probability of switching from listen to active modes and from sleep to active modes for a solar powered wireless sensor network. Secure wireless power transmission. While the idea of having the energy receiver as a potential eavesdropper has not been studied yet in the stochastic geometry literature (with randomly located ERs and legitimate transmitters), recent works have explored this idea for the deterministic system setups [7], [8], [40]–[42]. These works assume that the transmitter aims to maximize secrecy performance with the constraint of providing ERs with the required wireless power. In [7], [8], authors focused on a single point-to-point link with one ER (potential eavesdropper) in the system. An artificial noise-based solution was proposed to improve secrecy without reducing the amount of wireless power received by the ER. In [40], authors studied the use of a friendly jammer to enhance the performance of the point-to-point system. The friendly jammer 5 increases the amount of received power by the ER. In addition, it reduces the decodability of the confidential message by the ER. The single link system was extended in [41] to consider one multi-antenna transmitter, one legitimate receiver, and K ERs. Optimal beamforming schemes were provided to either maximize secrecy subject to constraints on harvested energy by the ERs or to maximize harvested energy by the ERs subject to secrecy constraints. Similar approach was adopted in [42] for a more general system model of one macro BS serving M users, N femto BSs each serving K users, and L ERs. Unlike all these works, we will model the locations of ERs and legitimate transmitters using point processes, which will enable us to draw general conclusions that will not be restricted to particular topologies. In this paper, we study the secrecy performance of a primary network that consists of PTs and information receivers (which will also be referred to as primary receivers or PRs), overlaid with an IoT network that consists of RF-powered devices (energy receivers or ERs). Guard zones are assumed to be present around PTs in order to improve secrecy. The only sources of ambient RF signals for ERs are the PT transmissions. The PT transmits information (becomes active) to the PRs only when the guard zone is free of ERs, otherwise it remains silent. On one hand, the IoT network would prefer a dense deployment of ERs so as to increase the overall energy harvested by the IoT network. However, on the other hand, more dense deployment of ERs will mean that more PTs will stay silent (due to the higher likelihood of ERs lying in the guard zones of the PTs) that will ultimately reduce the amount of ambient RF energy harvested, and hence degrade energy harvesting performance. Modeling and analysis of this setup is the main focus of this paper. We summarize the contributions of this paper next. B. Contributions Primary network performance analysis. Modeling the locations of PTs and ERs by two independent Poisson point processes (PPPs), we show that the locations of active PTs (PTs with ER-free guard zones) follow Poisson hole process. For this setup, we define the probability of successful connection (Pcon ) between the PT and its associated PR by the joint probability of the PT being active and the SINR at the PR being above a predefined threshold. We derive Pcon as a function of the density of ERs and the guard zone radius rg . We concretely derive a threshold on the density of the PTs below which Pcon is a decreasing function of rg . Above this threshold, we prove the existence of an optimal value of rg that maximizes Pcon . For the secrecy analysis, we derive the probability of secure communication (defined by the probability 6 of having the SINR value at any ER less than a predefined threshold). Referring to this metric as Psec , we provide several useful insights on the effect of the PT transmission power as well as the density of ERs on the value of Psec . IoT network performance analysis. For the IoT network (secondary network), we derive the probability of harvesting a minimum amount of energy Emin by the ERs. We define the density of ERs that satisfy this condition as the density of successfully powered ERs. We prove the existence of an optimal deployment density of ERs that maximizes this density of successfully powered ERs. In order to capture the relation between this optimal density and the guard zone radius, we derive a useful lower bound on the the density of successfully powered ERs. We show that the optimal deployment density that maximizes this lower bound is a decreasing function of rg . Although this conclusion is drawn using a lower bound, we use numerical results and simulations to demonstrate that it holds for the exact expressions as well. Modeling the interaction between the two networks. Building on the above results, we show that the interaction between the two networks can be modeled using tools from game theory. In particular, we show that this system can be modeled by a two player non-cooperative static game. The first player is the primary network with the guard zone radius representing its strategy. Its utility function is modeled to capture the successful connection probability as well as the probability of secure communication. The second player is the IoT network with the deployment density representing its strategy. Its utility function is modeled to capture the main performance metric of this network, which is the density of successfully powered ERs. We propose a best response-based learning algorithm that helps in achieving the Nash equilibrium of this game. II. S YSTEM M ODEL We consider a system that is composed of two wireless networks: (i) a primary network, and (ii) an IoT network (will be referred to as secondary network in the rest of this paper). The primary network is constructed of PTs and primary receivers (will be referred to as either PRs or legitimate receivers interchangeably throughout the paper). The locations of the PTs are modeled by a homogeneous PPP ΦP ≡ {xi } ⊂ R2 with density λP . In order to enhance secrecy performance, each PT is surrounded by a circular guard zone of radius rg centered at the PT. We assume that each PT is able to detect the presence of any illegitimate receiver within its guard zone [43]. Various detecting devices can be used for this purpose including metal detectors and leaked local oscillator power detectors [15]. The benefits of using secrecy guard zones and their 7 Guard Zone Active PT ER PR Silent PT Information Transmission Guard Zone Wireless Charging Fig. 1. The PT stops transmission (becomes silent) if any ER is detected within its guard zone. effect on secrecy performance were discussed in [18]. As shown in Fig. 1, before the PT transmits data to its associated PR, it scans the guard zone for any illegitimate receivers. If the guard zone is clear, the PT transmits the confidential data, otherwise, the PT stops transmission (becomes silent). The secondary network is constructed of RF-powered nodes that harvest RF energy from the signals transmitted by the primary network. We refer to these nodes as energy receivers (will be referred to as either ERs or eavesdroppers interchangeably throughout the paper). The locations of the ERs are modeled by a homogeneous PPP ΦS ≡ {yi } ⊂ R2 with density λS . From the primary network’s perspective, the ERs are considered illegitimate receivers. Hence, applying the guard zone scheme, the PT stops transmission whenever at least one ER exists within its guard zone. We assume that ERs are the only potential eavesdroppers in the system. We focus our analysis on the typical PT whose intended PR is located at a given distance r1 from the PT. Drawing analogy from the Poisson bipolar model, we call this the typical link and its constituent PT and PR as typical PT and typical PR, respectively. Note that this terminology is indeed rigorous if we assume a Poisson bipolar model in which each PT has an associated PR at a fixed distance. However, since the same setup can be used for cellular networks by treating r1 as the conditional value of the serving distance, we leave the setup general. Overall, the assumption of fixed r1 enables us to gain several useful insights. In particular, this enables us to better understand how the rest of the system parameters (e.g. rg , λS , and PT’s transmission power) affect the interaction between the two networks. Due to the stationarity of PPP, the typical PR can be assumed to be located at the origin without loss of generality. The typical PT is located at x1 at distance r1 = kx1 k from the typical PR. In case the guard zone is clear of ERs, the typical PT transmits the confidential message to the typical PT. In that case, the received power at the typical PR is Pt h1 r1−α , where Pt is the PT transmission power, h1 ∼ exp(1) models 8 TABLE I TABLE OF N OTATIONS Notation Description ΦP ; λP PPP modeling the locations of the PTs; density of the PTs ΦS ; λS PPP modeling the locations of ERs; density of the ERs EH Amount of energy harvested by ER (in Joules) Pcon The probability of successful connection between a PT and its associated PR Psec The probability of secure communication Penergy The density of successfully powered ERs h; g; w Fading gains for the link between the typical PR and an arbitrary PT; the typical PT and an arbitrary ER; an ER and its nearest active PT rg ; R e Guard zone radius; distance between a PT and its nearest ER 1(Ξ) An indicator function such that 1(Ξ) = 1 if the condition Ξ is satisfied and equals zero otherwise Pt ; σP2 ; σS2 PT transmission power; noise power at the PR; noise power at the ER ; α Minimum required value for Psec ; path loss exponent (α > 2) βP ; βS Minimum required SINR value at the PR to ensure successful connection; threshold on SINR at ERs to ensure perfect secrecy Rayleigh fading gain, and r1−α models power law path-loss with exponent α > 2. A. Primary Network Modeling According to Wyner’s encoding scheme [14], [44] and the approach used in [18], the PT defines the rate of codewords and the rate of confidential messages, Ct and Cs respectively. The difference, Ce = Ct − Cs , can be interpreted as the cost paid to secure the confidential messages. Let the mutual information between PT’s channel input and PR’s channel output be It and between PT’s channel input and ER’s channel output be Ie . Then, the objective is to ensure that the following two conditions are satisfied: (i) Ct ≤ It to ensure successful decoding at the PR, and (ii) Ce ≥ Ie to ensure perfect secrecy. Equivalently, we can define two SINR thresholds at the legitimate receiver and at the eavesdropper. To ensure successful decoding of the received confidential message at the PR, the condition SINRP ≥ βP should be satisfied, where βP = 2Ct − 1. Similarly, to ensure perfect secrecy, the SINR at any eavesdropper should satisfy the condition SINRS ≥ βS , where βS = 2Ct −Cs − 1. In order to mathematically define the instantaneous value of SINR at the legitimate receiver, we need to capture the effect of adopting the guard zone scheme on the interference level at the typical PR. According to the guard zone scheme, an interfering PT located at xi is active only if its guard zone is clear of ERs. Hence, denoting the random variable representing the distance between the typical PT and its nearest 9 After each PT scans its guard zone for ERs: Locations of retained (active) PTs are modeled by PHP Before each PT scans its guard zone for ERs: Locations of PTs are modeled by PPP PTs inside holes are removed (turn silent) Arbitrary PT ER Active PT Hole with radius 𝑟𝑔 Silent PT Fig. 2. The locations of active PTs is modeled by a PHP where the locations of ERs represent the centers of the holes. eavesdropper by Re , the probability of a typical PT being active is 2 Pactive = P(Re ≥ rg ) = e−λS πrg . (1) Next, we formally define the value of SINR at the typical PR as Pt h1 r1−α , −α + σ 2 P xi ∈ΦP \x1 δi Pt hi kxi k SINRP = P (2) where hi ∼ exp(1) models Rayleigh fading gain for the link between the typical PR and the PT located at xi , and σP2 is the noise power at the PRs. The indicator function δi is used to capture only the active interfering nodes. Hence, δi = 1 if the PT located at xi is active and equals zero otherwise. The expected value of δi is E[δi ] = Pacitve . The locations of the active PTs can be modeled using Poisson hole process (PHP) Ψ [45], [46]. A PHP is constructed using two independent PPPs: (i) Baseline PPP Φ1 , and (ii) the PPP modeling the locations of the hole centers Φ2 . All points of Φ1 that are within distance D from any point in Φ2 are carved out. The remaining points of Φ1 represent the PHP. In our system, as shown in Fig. 2, we can use the same approach to model the locations of the active PTs. Any PT in ΦP that is within a distance rg from any ER in ΦS is inactive. Hence, the locations of the remaining (active) PTs are modeled by PHP. This can be formally defined as follows ( ) [ Ψ = x ∈ ΦP : x ∈ / B(y, rg ) , y∈ΦS (3) 10 where B(y, rg ) is a ball of radius rg centered at y. Since the probability of retention of any point in ΦP is Pactive , the density of the resulting PHP Ψ is λP Pacitve . The primary network tries to jointly optimize two main performance metrics: (i) successful connection probability, and (ii) secure communication probability. While the former is related to the successful delivery of the data from the PT to the PR, the latter is related to the security of the transmitted data when the PT is active. Both metrics are formally defined below. Definition 1 (Probability of successful connection). In order to ensure successful connection between the typical PT and PR, two conditions need to be satisfied: (i) the typical PT is active, and (ii) the SINR at the typical PR is greater than the threshold βP . Therefore, the probability of successful connection is Pcon (rg , λS ) = P(Re ≥ rg , SINRP ≥ βP ). (4) When a PT is transmitting confidential data (active PT), the condition of SINRS ≤ βS needs to be satisfied at each ER in order to ensure perfect secrecy. Focusing on the signal transmitted by the typical PT, the SINR value at an ER located at yj is Pt g1,j kx1 − yj k−α , −α + σ 2 S xi ∈ΦP \x1 δi Pt gi,j kxi − yj k SINRS (yj ) = P (5) where gi,j ∼ exp(1) models Rayleigh fading gain for the link between the PT located at xi and the ER located at yj , and σS2 is the noise power at the ERs. We now define the second performance metric for the primary network, the secure communication probability, next. Definition 2 (Secure communication probability). Given that a PT is active, the probability that its transmitted data is perfectly secured is   Psec (rg , λS ) = E 1   [ SINRS (yj ) ≤ βS Re ≥ rg  . (6) yj ∈ΦS For a given value of λS , the primary network selects the value of rg = rg∗ that maximizes the value of Pcon while ensuring Psec ≥ , where 0 <  ≤ 1. The selection of rg∗ is mathematically formulated next. Definition 3 (Guard zone radius selection). The primary network selects the guard zone radius rg∗ that satisfies the following rg∗ = arg max Pcon (rg , λS ), rg ∈G(λS ) 11 G(λS ) = {rg : Psec (rg , λS ) ≥ }. (7) Remark 1. By observing Eq. 7, we note that the value of rg∗ selected by the primary network is a function of the density of the secondary network λS . In addition, while Pactive is obviously a decreasing function of rg , the exact effect of rg on either Pcon or Psec is harder to describe than one expects. It might seem intuitive to expect that as rg increases the average distance between any PT and its nearest ER will increase, leading to an increase in the probability of secure communication. However, this is actually not always correct. The reason for that is the effect of rg on the density of the PHP Ψ, λP Pacitve , which is the density of active interferers. As the guard zone radius increases, the density of interferers decreases, which means that the interference level at any ER will decrease on average leading to a larger SINR value. To better understand the behavior of all the aforementioned performance metrics, we will derive some insightful expressions that will, with the help of the numerical results, provide a complete picture for the effect of the system parameters on these metrics. B. Secondary Network Modeling For an ambient RF energy harvesting device, the distance to the nearest source is critical and has major effect on the average harvested energy value, as shown in [29]. The energy harvested from the nearest source is frequently used in the literature to study the performance of ambient RF energy harvesting wireless devices. For instance, in [47], authors proposed the concept of harvesting zone where an ER is able to activate its power conversion circuit and harvest energy only if it is within a specific distance from the active PT. Consequently, we focus our analysis of the energy harvested from the nearest PT since it is the dominant source of ambient RF energy. Hence, the energy harvested by the ER located at yj is EH = ηT Pt kxj,1 − yj k−α wj , (8) where η models the RF-DC efficiency of the ER, T is the duration of the transmission slot (assumed to be unity in the rest of the paper), xj,1 is the location of the nearest active PT to the ER located at yj , and wj ∼ exp(1) models Rayleigh fading gain for the link between the ER located at yj and its nearest active PT. Most of the relevant existing works use one of two performance metrics for the anlysis of energy harvesting wireless networks: (i) the expected value of the harvested energy E[EH ] as in [31], or (ii) the energy coverage probability P(EH ≥ 12 Emin ) as in [30], where Emin is the minimum required value of EH at each ER. We will use a modified version of the latter metric. In order to maximize the density of ERs that harvest the minimum amount of energy Emin , the secondary network selects the network density λS = λ∗S that maximizes Penergy = λS P(EH ≥ Emin ). (9) The above metric represents the density of the successfully powered ERs. Remark 2. Note that the distance between an ER and its nearest active PT increases, on average, as the density of active PTs, λP Pacitve , decreases. Recalling, from Eq. 1, that Pactive is a decreasing function of both rg and λS , we can expect P(EH ≥ Emin ) to be a decreasing function of both rg and λS . This implies two things: (i) the performance metric defined in Eq. 9 has a local maximum at λS = λ∗S , and (ii) the value of the selected density λ∗S that maximizes Eq. 9 is a function of rg . From Remarks 1 and 2 we can get some initial observations on the coupling between the two networks. To better understand the relation between the parameters selected by each of the networks (rg for the primary network, and λS for the secondary network), we first need to derive an expression for each of Pcon and Psec for the primary network, and Penergy for the secondary network. III. P ERFORMANCE A NALYSIS A. Primary Network 1) Probability of Successful Connection: As stated earlier, for a given value of λS , the primary network selects the optimal guard zone radius rg∗ that maximizes Pcon while ensuring that Psec ≥ . The process of rg selection was mathematically formulated in Definition 3. In the following Theorem we derive Pcon . Theorem 1 (Probability of successful connection). For a given value of λS , the probability of successful connection defined in Definition 1 is " 2 2π 2 λP Pactive βPα r12 σ2 Pcon (rg , λS ) = exp − λS πrg2 + βP P r1α + Pt α sin( α2 π) Proof: See Appendix A. #! . (10) 13 Remark 3. According to Definition 1 of Pcon , the effect of rg on Pcon is two fold. On one hand, increasing the value of rg decreases the probability of the PT being active, which decreases Pcon . This effect appears in the first term in the exponent in Eq. 10. On the other hand, increasing the value of rg decreases the density of active interferers. Hence, the probability of having SINR higher than βP increases, which increases Pcon . This effect appears in the third term in the exponent in Eq. 10 implicitly in the value of Pactive . To better understand the effect of rg on Pcon , we derive the value of r̂g that maximizes Pcon in the following Theorem. 2 Theorem 2. Defining A1 = • • 2π 2 λP βPα r12 2 α sin( α π) then: If A1 ≤ 1, then Pcon is a decreasing function of rg , and r̂g = 0. q 1) If A1 > 1, then r̂g = ln(A . πλS Proof: See Appendix B. Remark 4. From the above Theorem, we conclude that when A1 ≤ 1 the effect of rg on the density of active interferers is negligible. This is consistent with intuition. Observing the expression of A1 in Theorem 2, we note that it is an increasing function of λP , βP , and r1 . Hence, A1 ≤ 1 results from one or more of the following conditions: (i) λP is too small to take the effect of interference into consideration (the system is noise limited), (ii) r1 is too small such that the received signal power from the intended PT is hardly attenuated by the path-loss, and (iii) βP is a very relaxed threshold. These three consequences of having A1 ≤ 1 make the condition of Re ≥ rg in Definition 1 of Pcon dominate the other condition of SINRP ≥ βP . This eventually makes Pcon a decreasing function of rg , similar to P(Re ≥ rg ). In the following corollary, an upper bound on the value of Pcon (rg∗ , λS ) is provided. Corollary 1. Using the result in Theorem 2, the value of Pcon (rg∗ , λS ) is upper bounded as follows s Pcon (rg∗ , λS ) ≤ Pcon  where A1 is defined in Theorem 2.  ln (max{A1 , 1}) , λS  , πλS (11) 14 Proof: The proof follows by observing that r̂g is the value of rg that maximizes Pcon without any constraints, while rg∗ is the value of rg that maximizes Pcon with the constraint of rg ∈ G(λS ), as explained in Definition 3. 2) Secure Communication Probability: The secure communication probability, formally defined in Definition 2, is derived in the following theorem. Theorem 3 (Secure communication probability). For a given value of rg and λS , the probability of secure communication is Z Psec (rg , λS ) = exp −2πλS rg  where LI2 (s) = exp −2πλP Pactive R srg−α 0 !   2 σS βS ryα LI2 (βS ryα )ry dry , exp − Pt  2 sα . 2 dz ∞ (12) α(1+z)z α Proof: See Appendix C. Remark 5. The intuitive observations provided in Remark 1 can now be verified using Theorem 3. For instance, the effect of rg on the distance between the PT and its nearest ER is captured in the integration limits in the above equation. Obviously, as we increase rg , the integration interval will decrease, which increases the value of Psec . On the other hand, the effect of rg on the density of active interferers at the ER is captured in the term LI2 (βS rxα ). As we mentioned earlier, increasing the value of rg decreases the interference levels at the ER, which increases the value of SINRS , which eventually reduces Psec . This is verified here by observing that LI2 (s) is an increasing function of rg . Due to the complexity of the expression provided in Theorem 3 for Psec , it is not straightforward to derive expressions for either G(λS ) or rg∗ . However, using the results for Pcon and Psec in Theorems 1 and 3, it is easy to compute rg∗ numerically. In order to better understand the behavior of the system, we will provide expressions for Pcon and Psec in both noise-limited as well as interference-limited regimes. In the discussion section, results for both regimes will be compared with the results of the system at different values of rg resulting in several meaningful insights. In the case of a noise limited regime, the interference terms in the expressions of both Pcon and Psec will be removed leading to the following corollary. 15 Corollary 2. In the noise limited regime, Pcon will be a decreasing function of rg , while Psec will be an increasing function of rg as follows    σP2 α 2 Noise limited , = exp − λS πrg + βP r1 Pcon Pt !  2 Z ∞ α σ β r S y S Noise limited Psec = exp −2πλS exp − ry dry Pt rg   α2  ! Pt 2 rgα βS σS2 2πλS Γ , . = exp − α σS2 βS α Pt And the value of rg∗ is presented by the following equation         1 ∗ α 2 αLn  2 (rg ) βS σS 2  Γ = min ,   α2 , Γ α  .  α Pt  2πλ  Pt S σ 2 βS (13) (14) (15) S Proof: Eq. 13 and 14 follow directly by removing the interference terms from the results in Noise Theorem 1 and Theorem 3. Since Pcon limited Noise is a decreasing function of rg , and Psec limited is an increasing function of rg , the primary network picks the minimum value of rg that satisfies the condition Psec ≥ . Substituting for Psec using Eq. 14 in the inequality Psec ≥  leads to Eq. 15. In the case of an interference-limited regime, the noise terms in the expressions of both Pcon and Psec will be ignored leading to the following corollary. Corollary 3. In the interference limited regime, expressions for Pcon and Psec are provided below. #! " 2 2 α 2 2π λ P β r P active Int. limited P 1 , (16) Pcon = exp − λS πrg2 + α sin( α2 π) ! Z ∞ Int. limited (17) Psec = exp −2πλS LI2 (βS rxα )rx drx . rg Proof: These results follow by substituting for σP2 = σS2 = 0 in Theorems 1 and 3. The main take-away from this subsection is that each of Pcon and Psec are functions of λS , which consequently implies that rg∗ is a function of λS . In the next subsection, we will show that optimal density λ∗S selected by the secondary network is also a function of rg . B. Secondary Network The objective of the secondary network is to maximize the density of successfully powered ERs Penergy , introduced in Eq. 9, which is derived in the following Theorem. 16 Theorem 4 (Density of successfully powered ERs). For a given value of rg and λS , the density of successfully powered ERs is   Z ∞ Emin rpα 2 2 2πλP Pactive rp exp −πλP Pactive (rp − rg ) − Penergy (rg , λS ) = λS drp . Pt η rg (18) Proof: See Appendix D. The above equation is a product of two terms: (i) the density of ERs λS , and (ii) the integral term, which is the expression derived for the probability P(EH ≥ Emin ). Consequently, we can claim the existence of an optimal value of λS that maximizes the density of successfully powered ERs Penergy . The reason behind that is the dependence of the density of active sources of RF energy (active PTs) on the density of ERs. This interesting trade-off arises due to the use of secrecy guard zones by the primary network. Obviously, the value of Penergy is a function of rg . Hence, the value of λ∗S , that maximizes Penergy , is also a function of rg . Unfortunately, λ∗S can not be computed from the above expression due to its complexity. Hence, to get more insights on the relation between λ∗S and rg , we derive a lower bound on Penergy in the following corollary. We use this lower bound to compute λ∗S as a function of rg . Corollary 4. The value of Penergy is lower bounded as follows   Z ∞ Emin rpα 2 2 drp . Penergy ≥ λS 2πλP Pactive rp exp −πλP (rp − rg ) − Pt η rg (19) The value of λS that maximizes the lower bound is λ∗S = 1 . πrg2 (20) Proof: The lower bound follows by simply replacing Pactive inside the exponent in Eq. 18 with unity. The value of λ∗S follows by differentiating Eq. 19 with respect to λS . Remark 6. It can be noted from Eq. 20 that the value of λ∗S is a decreasing function of rg . This agrees with intuition since when the value of rg increases, the secondary network needs to decrease λS in order to maintain the density of active PTs, which are the sources of RF energy. The mutual coupling between rg∗ and λS as well as λ∗S and rg can be best modeled using tools from game theory. This will be the core of the next section. 17 IV. G AME T HEORETICAL M ODELING Building on all the insights and comments given in the previous section, we can model the interaction between the two networks using tools from game theory. For a given value of λS , the primary network selects rg∗ as presented in Definition 3, which can be rewritten as rg∗ = arg max Pcon (rg , λS )1(Psec (rg , λS ) ≥ ), rg ≥0 (21) where 1(Ξ) = 1 if the condition Ξ is satisfied, and equals zero otherwise. On the other hand, for a given value of rg , the secondary network selects λ∗S as follows λ∗S = arg max Penergy (rg , λS ). λS ≥0 (22) Observing Eq. 21 and 22, it is fairly straightforward to see that the system setup can be modeled as a non-cooperative static game with two players: (i) the primary network is player 1, and (ii) the secondary network is player 2. The utility function of player 1 is U1 (rg , λS ) = Pcon (rg , λS )1(Psec (rg , λS ) ≥ ), (23) while the utility function of player 2 is U2 (rg , λS ) = Penergy (rg , λS ). (24) For this game, the main objective is to find the values of rg∗ and λ∗S where each of the two networks has no tendency to change its tuning parameter. This is the definition of Nash equilibrium (NE). This can be mathematically modeled as rg∗ = arg max Pcon (rg , λ∗S )1(Psec (rg , λ∗S ) ≥ ), rg ≥0 λ∗S = arg max Penergy (rg∗ , λS ). λS ≥0 (25) Unfortunately, due to the complexity of the expressions of Pcon in Theorem 1 and Psec in Theorem 3, it is challenging to provide a closed-form solution for NE. However, based on the comments given in Remark 2 and the result in Theorem 2, we provide a learning algorithm that assists both networks to find NE. The proposed learning algorithm is a simple best-response based algorithm [48]–[50]. In each iteration, each network updates its parameters according to the opponent’s network parameter in the previous iteration. This can be mathematically presented as follows:   (n−1) rg(n) = rg∗ λS , 18  (n) λS = λ∗S rg(n−1) , (26)   (n) (n) (n−1) where rg and λS are the outputs of the algorithm in the n-th iteration, rg∗ λS is computed   (n−1) (n−1) (n−1) is computed using Eq. 22 for rg = rg . using Eq. 21 for λS = λS , and λ∗S rg Assuming that the secondary network has a maximum possible deployment density, λS ≤ λS,max , the algorithm is provided next. Algorithm: Proposed algorithm for finding the NE network parameters rg∗ and λ∗S input: λP , λS,max , βP , βS , Pt , α, η, and Emin . output: rg∗ , λ∗S . (0) (0) Initialization: rg = 0 for all PTs in ΦP , λS = λS,max , n = 1 1: Repeat 3:   (n−1) (n) rg = rg∗ λS   (n−1) (n) ∗ λS = λS rg 4: n=n+1 2: (n) (n−1) 5: Until rg = rg (n) (n−1) & λS = λS Note that we assume the ability of each network to estimate perfectly the opponent’s action in the previous iteration. Including the possibility of the estimation error and its effect on convergence is left as a promising direction of future work. In the next section, we will show using simulations the convergence of the proposed algorithm to the NE of the modeled game. V. R ESULTS AND D ISCUSSION In this section, we will use both theoretical and simulation results (obtained from Monte-Carlo trials) to analyze the performance of both primary and secondary networks. The values of the system parameters used for the simulation setup are: λP = 1, η = 0.75, Emin = 10−4 Joules, α = 4, λS,max = 2, Pt = 1, βP = 3 dB, βS = 0 dB, r1 = 0.1, and  = 0.8. The values of the rest of the parameters will be defined either on the figures or in their captions. We also refer to the SNR values at the primary and secondary receivers as γP = Pt 2 σS and γS = In addition, we define the ratio of λS to its maximum value by δS = λS . λS,max Pt 2 σS respectively. Our main goals in this section are: (i) to validate the approximations used in our derivations, (ii) to get further Probability of successful connection Pcon(rg,λS ) 19 1 Theorem 1 Simulation 0.8 Increasing λS : [0.5, 0.65, 0.8, 0.95] 0.6 0.4 0.2 0 0 0.5 1 1.5 Guard zone radius rg 2 Fig. 3. The effect of λS on the behavior of Pcon against different values of rg . The SNR value at the legitimate receiver is γP = 7 dB. insights on the behavior of both the networks, and (iii) to verify the comments provided in the Remarks throughout the paper. We first study the successful connection probability Pcon in Fig. 3. First note that the simulation parameters chosen above are such that we get A1 < 1, where A1 is defined in Theorem 2. The results in Fig. 3 show that increasing the density of ERs decreases Pcon . Although increasing λS decreases the density of active interferers (which should increase Pcon ), it also decreases the probability of the PT being active (which decreases Pcon ). Ultimately, for this setup, Pcon is a decreasing function of λS because of having A1 < 1. As explained in Remark 4, A1 < 1 leads to a noise limited system from the perspective of the successful connection probability, which means that the effect of λS on the density of active interferers is negligible compared to its effect on the probability of the PT being active. Further, note that because of having A1 < 1, Pcon is also a decreasing function of rg . As a result, rg∗ will be the minimum value of rg that ensures Psec ≥ . The value of Psec as a function of rg is plotted in Fig. 4 for different values of γS . Consistent with the intuition, increasing γS decreases Psec . We also note that at low values of rg the effect of γS is hardly noticeable, while at higher values of rg , the effect of γS becomes significant. Furthermore, we note that rg∗ is an increasing function of γS . To better understand the effect of γS on the behavior of Psec , we plot in Fig. 5 the value of Psec for both the noise limited and the interference limited regimes, which are derived in Corollary 2 and 3, respectively. These results lead to the following key insights: Secure communication probability Psec(rg,λS) Secure communication probability Psec(rg,λS) 20 1 Increasing γS : [1, 3, 5, 8] dB 0.8 0.6 r*g 0.4 Theorem 3 Simulation 0.2 0 0.5 1 1.5 2 2.5 3 1 Increasing γS : [1, 3, 5, 8] dB 0.8 0.6 0.4 Theorem 3 Interference limited Noise limited 0.2 0 0 0.5 1 1.5 2 2.5 3 Guard zone radius rg Guard zone radius rg NoiseLimited Int.Limited Fig. 5. Comparing Psec , Psec , and Psec Fig. 4. The effect of γS on the behavior of Psec against as functions of rg for different values of γS . The density different values of rg . The density of ERs is λS = 0.6. of ERs is λS = 0.6. • At lower values of rg , the density of active interferers is relatively high. Hence, we observe that from the secure communication probability perspective, the system is interference limited in this regime. Furthermore, increasing the SNR value γS has a negligible effect. This is a direct consequence of being in the interference-limited regime. • At higher values of rg , the density of active interferers decreases, which drives the system to the noise limited regime. As a result, the noise power has more noticeable effect on Psec . Equivalently, increasing value of γS decreases the value of Psec at higher values of rg . • Int. Obviously, Psec Limited Noise is a decreasing function of rg , while Psec Limited is an increasing function of rg . However, the behavior of Psec is harder to describe. We note the existence Int. of a local minimum of Psec below which it behaves more like Psec Noise this local minimum, Psec behaves similar to Psec Limited Limited , whereas above . In Fig. 6, we study the effect of λS on the behavior of Psec against different values of rg . We note that rg∗ increases with λS . We also note that, unlike γS , the effect of λS is more prominent at the lower values of rg . As explained above, the reason is that the system is interference limited at lower values of rg , where increasing λS decreases the density of interferers, which in Int. turn decreases Psec Limited Int. . We plot Psec , Psec Limited Noise , and Psec Limited in Fig. 7 to verify these arguments. We also note that at higher values of rg , as we stated earlier, the system is noise Noise limited, where λS has less effect on Psec Limited Int. compared to Psec Limited . This can be verified 1 Increasing λS : [0.5, 0.65, 0.8, 0.95] 0.8 0.6 r*g 0.4 Theorem 3 Simulation 0.2 0 0.5 1 1.5 2 Guard zone radius rg Secure communication probability Psec(rg,λS) Secure communication probability Psec(rg,λS) 21 1 0.8 Increasing λS : [0.5, 0.8] 0.6 0.4 Theorem 3 Interference limited Noise limited 0.2 0 0 0.5 1 1.5 2 Guard zone radius rg Fig. 6. The effect of λS on the behavior of Psec against NoiseLimited Int.Limited Fig. 7. Comparing Psec , Psec , and Psec different values of rg . The SNR value at ERs is γS = 4.8 as functions of rg for different values of λS . The SNR dB. value at ERs is γS = 4.8 dB. from Fig. 6 by observing that the gaps between the Psec curves for different values of λS get tighter as rg increases. Now that we have better understanding of the behavior of Pcon and Psec , we study the energy harvesting performance of the secondary network. In Fig. 8, we illustrate the behavior of Penergy against λS for different values of rg . We note that at lower values of rg , the optimal value of λS is its maximum value λS,max . This is consistent with intuition that at lower values of rg , the density of active PTs (sources of RF energy) will hardly get affected by increasing λS . As rg increases, the impact of λS on the density of active PTs becomes noticeable. As shown in Fig. 8, this eventually leads to the existence of a local maximum of Penergy . We also note that as the value of rg increases, the optimal value λ∗S decreases. This is also consistent with our comments in Remark 6 that as rg increases, the secondary network needs to decrease its density in order to maintain the density of active PTs that provide the RF energy to the ERs. Taking a second look at Figs. 6 and 8, we can easily verify our earlier comments that the parameters selected by each of the networks (rg for the primary network and λS for the secondary network) affect the value of the optimal parameter of the other network. Using the procedure provided in Sec. IV, we simulate the interaction between both networks by simulating the relations between rg∗ and δS as well as δS∗ and rg , where δS = λS λS,max is the normalized value of the density of ERs. In Fig. 9, we plot rg∗ (on the y-axis) for different values of δS (on the Density of successfully powered ERs Penergy(rg,λS) 22 2 Theorem 4 Simulation 1.5 Increasing r g: λ*S =2 [0.6, 0.8, 1, 1.2] 1 λ*S =0.4 λ*S =1.4 0.5 λ*S =0.85 0 0.5 1 1.5 2 Density of ERs λS Fig. 8. The density of successfully powered ERs Penergy against λS for different values of rg . Output of the proposed algorithm 2 r*g/rg 1.5 1 NE: r*g=1.48, δ*s=0.33 0.5 r*g using Eq. 21 λ*S using Eq. 22 0 0.2 0.4 0.6 0.8 1 2 r(n) g δ(n) S 1.5 Algorithm converged to 1 r(n) =1.48,δ(n) =0.33 g S 0.5 0 2 δS/δ*S 4 6 8 10 12 14 Number of iterations n Fig. 9. Plotting both rg∗ against δS and δS∗ against rg on Fig. 10. the same plot to compute the NE values. equilibrium in a finite number of iterations. The proposed algorithm converges to Nash x-axis). On the same figure, we plot δS∗ (on the x-axis) for different values of rg (on the y-axis). The intersection of both curves represents the value of NE where each of the two networks has no intention to deviate as explained in Eq. 25. In Fig. 10, we evaluate the performance of the algorithm proposed in Sec. IV. The results demonstrate the convergence of the proposed algorithm to the NE found from Fig. 9 after less than 13 iterations. 23 VI. C ONCLUSIONS The emergence of IoT regime is characterized by the deployment of billions of devices some of which may be equipped with energy harvesting capability. Due to the ubiquity of RF signals, harvesting energy from the ambient RF signals is perhaps the most attractive option for such devices. This raises the possibility of some of these devices acting as eavesdroppers, which motivates the need to study secure wireless power transfer to energy receivers acting as potential eavesdroppers. While this problem received some attention in the literature, the existing works are limited to simple point-to-point or simple deterministic topologies, which are not sufficient to accurately model the massive scale of IoT. In this paper, we developed the first comprehensive stochastic geometry-based model to study the performance of an ambient RF energy harvesting network (secondary network) when the sources of RF signals are transmitters with secrecy guard zones (primary network). First, using tools from stochastic geometry, we derived the successful connection and secure communication probabilities of the primary network. Next, we derived the density of successfully powered nodes in the secondary network. Furthermore, we showed that the performance metrics of the two networks are coupled. In particular, we showed that the optimal guard zone radius (that maximizes the successful connection probability while maintaining the secure communication probability above a predefined threshold) is a function of the deployment density of the secondary network. In addition, we showed that the optimal deployment density of the secondary network (that maximizes the density of successfully powered nodes) is a function of the guard zone radius of the primary network. Hence, we used tools from game theory to model this interesting coupling between the two networks. In particular, we showed that such system can be modeled as a two player non-cooperative game. In addition, we proposed a best-response based algorithm and demonstrated with simulations its convergence to Nash equilibrium. This paper is one of the few concrete works that symbiotically merge tools from stochastic geometry and game theory. It can be extended in many directions. From the secrecy perspective, it will be useful to extend the proposed model to incorporate other secrecy enhancing techniques, such as beamforming and artificial noise technique. From the modeling perspective, it is worthwhile to investigate other meaningful morphologies, such as the one in which ERs are clustered around the RF sources. From game theory perspective, it will be interesting to consider the effect of imperfect estimation of the opponent’s action on the performance of the proposed algorithm. 24 A PPENDIX A P ROOF OF T HEOREM 1 Recalling the expression for SINRP given in Eq. 2, specifically the indicator function δi that indicates which interferer is active and which is silent, we concluded that the locations of active PTs can be modeled by PHP Ψ in Eq. 3. However, before using Ψ in our analysis, we need to make it clear that δi for different xi ∈ ΦP are correlated. This implicit correlation arises from the dependence of δi for all i on the PPP ΦS . However, capturing this correlation in our analysis will significantly reduce the tractability of the results. Hence, this correlation will be ignored in our analysis for the sake of tractability. The tightness of this approximation will be verified in the Numerical Results section. Now revisiting the expression of Pcon in Eq. 4, we note that the correlation between δ1 at the typical PT and δi values at each of the interferers in the expression of SINRP is the only source of correlation between the events (Re ≥ rg ) and (SINRP ≥ βP ). Hence, ignoring this correlation will lead to the following Pcon = P(Re ≥ rg )P(SINRP ≥ βP ). (27)  The first term in the above expression represents Pactive = exp −πλS rg2 (please recall Eq. 1 where Pactive was derived). To derive the second term in the above expression, characterizing the statistics of the interference from a PHP modeled network at a randomly located reference point (the typical PR) is required. However, ignoring the correlation between {δi }, for the sake of tractability as explained above, is equivalent to approximating the PHP Ψ with a PPP ΨP of P equivalent density λ̃P = λP Pactive . Defining I = xi ∈ΨP hi kxi k−α , then !      σP2 h1 r1−α (a) = EI exp −βP I + r1α P(SINRP ≥ βP ) = P 2 ≥ βP σP P t I + Pt     σP2 α σP2 α α (b) = exp −βP r1 EI [exp (−βP Ir1 )] = exp −βP r1 LI (βP r1α ) , (28) Pt Pt where h1 ∼ exp(1) leads to step (a), and in step (b) we use the definition of Laplace transform of I which is LI (s) = E [exp (−sI)]. The Laplace transform of the interference in PPP is a well established result in the literature [23]. For completeness, the derivation of LI (s) is provided next. " LI (s) = EΨP ,{hi } exp −s !# X xi ∈ΨP hi kxi k−α " = EΨP ,{hi } # Y xi ∈ΨP exp −shi kxi k  −α 25 " (c) Y = EΨP xi ∈ΨP  Z (e) = exp −2π λ̃P 0 ∞ #   1 = exp −λ̃P 1− dx 1 + skxk−α x∈R2 !  2 2π 2 λ̃P s α csc 2π srx−α (f ) α , rx drx = exp − 1 + srx−α α 1 1 + skxi k−α (d) Z (29) where knowing that the set of fading gains hi are i.i.d with hi ∼ exp(1) leads to step (c), step (d) results from using the probability generating function (PGFL) of PPP [24], step (e) results from converting to polar co-ordinates, and step (f) follows after some mathematical manipulations. Substituting Eq. 29 in Eq. 28 and then in Eq. 27 leads to the final result in Theorem 1. A PPENDIX B P ROOF OF T HEOREM 2 Observing the expression of Pcon in Theorem 1, we note that it can be rewritten as a function of Pactive = exp(−λS πrg2 ) as follows   σP2 α Pcon = exp −βP r1 Pactive exp (−Pactive A1 ) , Pt (30) 2 where A1 = 2π 2 λP βPα r12 . 2 α sin( α π) To get more information about the behavior of Pcon against Pactive , we compute the first derivative (with respect to Pactive ). Given that Pactive is a decreasing function of rg (recall Eq. 1), we conclude the following 1) If 1 − A1 Pactive ≥ 0, then Pcon is a decreasing function of rg , 2) If 1 − A1 Pactive ≤ 0, then Pcon is an increasing function of rg . Consequently, we can infer that, since 0 ≤ Pacitve ≤ 1, Pcon is a decreasing function of rg as long as A1 ≤ 1. In the case of A1 ≥ 1, the relation between Pcon and rg can be explained as q 1) ), and follows: (i) Pcon is an increasing function of rg as long as Pactive ≥ A11 (or rg ≤ ln(A λS π q 1) (ii) Pcon is a decreasing function of rg as long as Pactive ≤ A11 (or rg ≥ ln(A ). This concludes λS π the proof. A PPENDIX C P ROOF OF T HEOREM 3 From Definition 2 of Psec , we observe that we need to jointly analyze the values of SINRS (yj ) at all the locations yj ∈ ΦS . Despite the usual assumption throughout most of the stochastic geometry-based literature on secrecy analysis that these values are uncorrelated, this is actually not precise. The reason for that is the dependence of SINRS (yj ), by definition, on the PPP 26 ΦP for all yj ∈ ΦS . Some recent works started working on characterizing the correlation between intereference levels at different locations [51]. However, most of these works focus on characterizing the correlation between only two locations assuming the knowledge of the distance between them. Unfortunately, these results will not be useful for our analysis. Hence, aligning with the existing literature, we will ignore this correlation in our analysis with the knowledge that this will provide an approximation. Furthermore, the accuracy of this approximation is expected to get worse as the value of λS increases. This is due to the fact that the distances between ERs decrease as λS increases, which was shown in [51] to increase the correlation. For notational simplicity, and without any loss of generality due to the stationarity of PPP, we will assume that the typical PT is placed at the origin, i.e. x1 = o, in the rest of this proof. All the analysis provided in this section is conditioned on the event Re ≥ rg . Following the same approach as in Appendix A of approximating the PHP Ψ with a PPP ΨP , and defining P I2 (yj ) = xi ∈ΨP \x1 gi,j kxi − yj k−α , Psec can be derived as follows     ! −α Y [ g1,j kyj k−α g ky k  (g) = EΦS ,I2 ,{g1,j }  1 1,j j σ2 ≤ βS  Psec = EΦS ,I2 ,{g1,j } 1  2 ≤ βS σS I2 (yj ) + PSt yj ∈ΦS yj ∈ΦS I2 (yj ) + Pt       2 σS β I (y ) + Y S 2 j Pt (h) 1 − exp −  = EΦS ,I2  −α ky jk yj ∈ΦS  2      σS    β Y S Pt (i) 1 − exp −  E exp − βS I2 (yj )  , = EΦS  (31) −α −α ky ky jk jk y ∈Φ j S where step (g) (and step (i)) follow from assuming that the values of SINRS (yj ) (and I2 (yj )) are uncorrelated, as we discussed earlier in this Appendix. Step (h) is due to assuming the set of fading gains {g1,j } to be i.i.d with g1,j ∼ exp(1). Defining the Laplace transform of I2 (yj ) by LI2 (yj ) (s) = E[exp(−sI2 (yj ))], we note that there is only one difference in the derivation of LI2 (yj ) (s) compared to that of LI (s) in Eq. 29. The difference is in the reference point from where we are observing the interference. In Appendix A, the reference point was the PR, which does not have a minimum distance from any active interfering PT. In the current derivation, the reference point is an ER, which has a minimum distance of rg from any active interfering PT. Hence, the derivation of LI2 (yj ) (s) will be exactly the same as in Eq. 29 until step (e), where the minimum distance effect will appear in the lower limit of the integral as follows ! Z ∞ srx−α r drx . LI2 (yj ) (s) = exp −2π λ̃P −α x rg 1 + srx (32) 27 Note that the above expression is not a function of yj , so we drop it from the notation of Laplace transform. The final expression for LI2 (s) as provided in Theorem 3 follows after simple mathematical manipulations. Substituting Eq. 32 in Eq. 31, we get       2 Y  σS Psec = EΦS  1 − exp −βS kyj kα LI2 (βS kyj kα )  Pt y ∈Φ j (k) S = exp −2πλS !   2  σS exp −βS kykα LI2 (βS kykα ) dy , P 2 t y∈R ∩B(o,rg ) Z (33) where step (k) results from applying PGFL of PPP, and the integration is over y ∈ R2 ∩ B(o, rg ) because the analysis in this section is conditioned on the event Re ≥ rg , which means that the typical PT is active. Since we assumed that the typical PT is placed at the origin in this derivation, the ball B(o, rg ) is clear of ERs. Converting from Cartesian to polar co-ordinates leads to the final result in Theorem 3. A PPENDIX D P ROOF OF T HEOREM 4 The density of successfully powered ERs can be derived as follows     (l) Emin Rpα −α , Penergy = λS P ηPt Rp w ≥ Emin = ERp exp − ηPt (34) where Rp is the distance between the ER and its nearest active PT, and step (l) is due to w ∼ exp(1). The distance Rp represents the contact distance of a PHP observed from a hole center. Unfortunately, the exact distribution of this distance is unknown. However, the approach of approximating the PHP Ψ with a PPP ΨP is known to provide fairly tight approximation of the contact distance distribution of PHP [52]. Given that the nearest active PT to the ER is at a distance of at least rg , the distribution of Rp is   2 fRp (rp ) = 2π λ̃P exp −π λ̃P (rp − rg ) , rp ≥ rg . (35) Using this distribution to compute the expectation in Eq. 34 leads to the final result in Theorem 4. R EFERENCES [1] M. A. Kishk and H. S. Dhillon, “Modeling and analysis of ambient RF energy harvesting in networks with secrecy guard zones,” in Proc., IEEE Wireless Commun. and Networking Conf. (WCNC), March 2017. [2] H. S. Dhillon, H. Huang, and H. Viswanathan, “Wide-area wireless communication challenges for the Internet of Things,” IEEE Commun. Mag., vol. 55, no. 2, pp. 168–174, Feb. 2017. 28 [3] H. S. Dhillon, H. C. Huang, H. Viswanathan, and R. A. Valenzuela, “Power-efficient system design for cellular-based machine-to-machine communications,” IEEE Trans. on Wireless Commun., vol. 12, no. 11, pp. 5740 – 5753, Nov. 2013. [4] ——, “Fundamentals of throughput maximization with random arrivals for M2M communications,” vol. 62, no. 11, pp. 4094 – 4109, Nov. 2014. [5] V. Jelicic, M. Magno, D. Brunelli, V. Bilas, and L. Benini, “Analytic comparison of wake-up receivers for WSNs and benefits over the wake-on radio scheme,” in Proc., ACM workshop on Perform. Monit. and Measurement of Heterog. Wireless and Wired Netw., Oct. 2012, pp. 99–106. [6] P. Kamalinejad, C. Mahapatra, Z. Sheng, S. Mirabbasi, V. C. Leung, and Y. L. Guan, “Wireless energy harvesting for the internet of things,” IEEE Commun. Magazine, vol. 53, no. 6, pp. 102–108, 2015. [7] H. Xing, L. Liu, and R. Zhang, “Secrecy wireless information and power transfer in fading wiretap channel,” IEEE Trans. on Veh. Technology, vol. 65, no. 1, pp. 180–190, Jan. 2016. [8] Q. Li, W. K. Ma, and A. M. C. So, “Robust artificial noise-aided transmit optimization for achieving secrecy and energy harvesting,” in Proc., IEEE Intl. Conf. on Acoustics, Speech, and Sig. Proc. (ICASSP), May 2014, pp. 1596–1600. [9] M. Zhang, Y. Liu, and R. Zhang, “Artificial noise aided secrecy information and power transfer in OFDMA systems,” IEEE Trans. on Wireless Commun., vol. 15, no. 4, pp. 3085–3096, 2016. [10] M. R. Khandaker and K.-K. Wong, “Robust secrecy beamforming with energy-harvesting eavesdroppers,” IEEE Wireless Commun. Letters, vol. 4, no. 1, pp. 10–13, 2015. [11] D. W. K. Ng, E. S. Lo, and R. Schober, “Robust beamforming for secure communication in systems with wireless information and power transfer,” IEEE Trans. on Wireless Commun., vol. 13, no. 8, pp. 4599–4615, 2014. [12] J. Xu, L. Liu, and R. Zhang, “Multiuser miso beamforming for simultaneous wireless information and power transfer,” IEEE Trans. on Signal Processing, vol. 62, no. 18, pp. 4798–4810, 2014. [13] K. Banawan and S. Ulukus, “Mimo wiretap channel under receiver-side power constraints with applications to wireless power transfer and cognitive radio,” IEEE Trans. on Commun., vol. 64, no. 9, pp. 3872–3885, 2016. [14] A. D. Wyner, “The wire-tap channel,” The Bell System Technical Journal, vol. 54, no. 8, pp. 1355–1387, Oct. 1975. [15] S. H. Chae, W. Choi, J. H. Lee, and T. Q. S. Quek, “Enhanced secrecy in stochastic wireless networks: Artificial noise with secrecy protected zone,” IEEE Trans. on Information Forensics and Security, vol. 9, no. 10, pp. 1617–1628, Oct. 2014. [16] W. Liu, Z. Ding, T. Ratnarajah, and J. Xue, “On ergodic secrecy capacity of random wireless networks with protected zones,” IEEE Trans. on Vehicular Technology, vol. 65, no. 8, pp. 6146–6158, Aug. 2016. [17] X. Zhou and M. R. McKay, “Secure transmission with artificial noise over fading channels: Achievable rate and optimal power allocation,” IEEE Trans. on Vehicular Technology, vol. 59, no. 8, pp. 3831–3842, 2010. [18] X. Zhou, R. K. Ganti, J. G. Andrews, and A. Hjorungnes, “On the throughput cost of physical layer security in decentralized wireless networks,” IEEE Trans. on Wireless Commun., vol. 10, no. 8, pp. 2764–2775, Aug. 2011. [19] P. C. Pinto, J. Barros, and M. Z. Win, “Secure communication in stochastic wireless networks–Part I: Connectivity,” IEEE Trans. on Info. Forensics and Security, vol. 7, no. 1, pp. 125–138, Feb. 2012. [20] M. A. Kishk and H. S. Dhillon, “Stochastic geometry-based comparison of secrecy enhancement techniques in D2D networks,” IEEE Wireless Commun. Letters, to appear. [21] H. ElSawy, E. Hossain, and M. Haenggi, “Stochastic geometry for modeling, analysis, and design of multi-tier and cognitive cellular wireless networks: A survey,” IEEE Commun. Surveys and Tutorials, vol. 15, no. 3, pp. 996 – 1019, 2013. [22] H. ElSawy, A. Sultan-Salem, M. S. Alouini, and M. Z. Win, “Modeling and analysis of cellular networks using stochastic geometry: A tutorial,” IEEE Commun. Surveys Tutorials, vol. 19, no. 1, pp. 167–203, Firstquarter 2017. 29 [23] J. G. Andrews, A. K. Gupta, and H. S. Dhillon, “A primer on cellular network analysis using stochastic geometry,” available online: arxiv.org/abs/1604.03183. [24] M. Haenggi, Stochastic geometry for wireless networks. Cambridge University Press, 2012. [25] G. Geraci, H. S. Dhillon, J. G. Andrews, J. Yuan, and I. B. Collings, “Physical layer security in downlink multi-antenna cellular networks,” IEEE Trans. on Commun., vol. 62, no. 6, pp. 2006–2021, 2014. [26] G. Chen, J. P. Coon, and M. Di Renzo, “Secrecy outage analysis for downlink transmissions in the presence of randomly located eavesdroppers,” 2017, available online: arxiv.org/abs/1701.00982. [27] H. S. Dhillon, Y. Li, P. Nuggehalli, Z. Pi, and J. G. Andrews, “Fundamentals of heterogeneous cellular networks with energy harvesting,” IEEE Trans. on Wireless Commun., vol. 13, no. 5, pp. 2782 – 2797, May 2014. [28] M. Di Renzo and W. Lu, “System-level analysis and optimization of cellular networks with simultaneous wireless information and power transfer: Stochastic geometry modeling,” IEEE Trans. on Veh. Technology, vol. 66, no. 3, pp. 2251–2275, March 2017. [29] M. A. Kishk and H. S. Dhillon, “Downlink performance analysis of cellular-based IoT network with energy harvesting receivers,” in IEEE GLOBECOM, Dec. 2016. [30] A. H. Sakr and E. Hossain, “Analysis of k-tier uplink cellular networks with ambient RF energy harvesting,” IEEE Journal on Sel. Areas in Commun., vol. 33, no. 10, pp. 2226–2238, 2015. [31] I. Flint, X. Lu, N. Privault, D. Niyato, and P. Wang, “Performance analysis of ambient RF energy harvesting with repulsive point process modeling,” IEEE Trans. on Wireless Commun., vol. 14, no. 10, pp. 5402–5416, 2015. [32] Y. Liu, L. Wang, S. A. R. Zaidi, M. Elkashlan, and T. Q. Duong, “Secure D2D communication in large-scale cognitive cellular networks: A wireless power transfer model,” IEEE Trans. on Commun., vol. 64, no. 1, pp. 329–342, Jan. 2016. [33] A. Houjeij, W. Saad, and T. Basar, “A game-theoretic view on the physical layer security of cognitive radio networks,” in Proc., IEEE Intl. Conf. on Commun. (ICC), June 2013, pp. 2095–2099. [34] W. Saad, X. Zhou, B. Maham, T. Basar, and H. V. Poor, “Tree formation with physical layer security considerations in wireless multi-hop networks,” IEEE Trans. on Wireless Commun., vol. 11, no. 11, pp. 3980–3991, Nov. 2012. [35] S. Bayat, R. H. Y. Louie, Z. Han, B. Vucetic, and Y. Li, “Physical-layer security in distributed wireless networks using matching theory,” IEEE Trans. on Information Forensics and Security, vol. 8, no. 5, pp. 717–732, May 2013. [36] W. Saad, Z. Han, T. Başar, M. Debbah, and A. Hjørungnes, “Distributed coalition formation games for secure wireless transmission,” Mobile Networks and Applications, vol. 16, no. 2, pp. 231–245, 2011. [37] N. Reyhanian, B. Maham, V. Shah-Mansouri, W. Tusher, and C. Yuen, “Game-theoretic approaches for energy cooperation in energy harvesting small cell networks,” 2017, IEEE Trans. on Veh. Technology, to appear. [38] H. Chen, Y. Li, Y. Jiang, Y. Ma, and B. Vucetic, “Distributed power splitting for SWIPT in relay interference channels using game theory,” IEEE Trans. on Wireless Commun., vol. 14, no. 1, pp. 410–420, Jan. 2015. [39] D. Niyato, E. Hossain, M. M. Rashid, and V. K. Bhargava, “Wireless sensor networks with energy harvesting technologies: a game-theoretic approach to optimal energy management,” IEEE Wireless Commun., vol. 14, no. 4, pp. 90–96, Aug. 2007. [40] M. Liu and Y. Liu, “Power allocation for secure SWIPT systems with wireless-powered cooperative jamming,” IEEE Commun. Letters, to appear. [41] L. Liu, R. Zhang, and K. C. Chua, “Secrecy wireless information and power transfer with MISO beamforming,” IEEE Trans. on Signal Processing, vol. 62, no. 7, pp. 1850–1863, April 2014. [42] Y. Ren, T. Lv, H. Gao, and Y. Li, “Secure wireless information and power transfer in heterogeneous networks,” 2017, IEEE Access, to appear. [43] Y. Zhou, Z. Z. Xiang, Y. Zhu, and Z. Xue, “Application of full-duplex wireless technique into secure MIMO communication: Achievable secrecy rate based optimization,” IEEE Signal Processing Letters, vol. 21, no. 7, pp. 804–808, July 2014. 30 [44] A. Thangaraj, S. Dihidar, A. R. Calderbank, S. W. McLaughlin, and J. M. Merolla, “Applications of LDPC codes to the wiretap channel,” IEEE Trans. on Info. Theory, vol. 53, no. 8, pp. 2933–2945, Aug. 2007. [45] Z. Yazdanshenasan, H. S. Dhillon, M. Afshang, and P. H. J. Chong, “Poisson hole process: Theory and applications to wireless networks,” IEEE Trans. on Wireless Commun., vol. 15, no. 11, pp. 7531–7546, Nov. 2016. [46] C. h. Lee and M. Haenggi, “Interference and outage in Poisson cognitive networks,” IEEE Trans. on Wireless Commun., vol. 11, no. 4, pp. 1392–1401, April 2012. [47] S. Lee, R. Zhang, and K. Huang, “Opportunistic wireless energy harvesting in cognitive radio networks,” IEEE Trans. on Wireless Commun., vol. 12, no. 9, pp. 4788–4799, Sept. 2013. [48] W. H. Sandholm, Population games and evolutionary dynamics. MIT press, 2010. [49] A. Cortes and S. Martinez, “Self-triggered best-response dynamics for continuous games,” IEEE Trans. on Automatic Control, vol. 60, no. 4, pp. 1115–1120, April 2015. [50] E. Barron, R. Goebel, and R. Jensen, “Best response dynamics for continuous games,” Proceedings of the American Mathematical Society, vol. 138, no. 3, pp. 1069–1083, 2010. [51] S. Krishnan and H. S. Dhillon, “Spatio-temporal interference correlation and joint coverage in cellular networks,” available online: arxiv.org/abs/1606.05332. [52] M. A. Kishk and H. S. Dhillon, “Tight lower bounds on the contact distance distribution in Poisson hole process,” IEEE Wireless Commun. Letters, to appear.
7cs.IT
Nearly Optimal Robust Subspace Tracking Praneeth Narayanamurthy and Namrata Vaswani {pkurpadn, namrata}@iastate.edu Department of Electrical and Computer Engineering, Iowa State University, Ames, IA ∗ arXiv:1712.06061v3 [cs.IT] 25 Mar 2018 March 28, 2018 Abstract In this work, we study the robust subspace tracking (RST) problem and obtain one of the first two provable guarantees for it. The goal of RST is to track sequentially arriving data vectors that lie in a slowly changing low-dimensional subspace, while being robust to corruption by additive sparse outliers. It can also be interpreted as a dynamic (time-varying) extension of robust PCA (RPCA), with the minor difference that RST also requires a short tracking delay. We develop a recursive projected compressive sensing algorithm that we call Nearly Optimal RST via ReProCS (ReProCS-NORST) because its tracking delay is nearly optimal. We prove that NORST solves both the RST and the dynamic RPCA problems under weakened standard RPCA assumptions, two simple extra assumptions (slow subspace change and most outlier magnitudes lower bounded), and a few minor assumptions. Our guarantee shows that NORST enjoys a near optimal tracking delay of O(r log n log(1/)). Its required delay between subspace change times is the same, and its memory complexity is n times this value. Thus both these are also nearly optimal. Here n is the ambient space dimension, r is the subspaces’ dimension, and  is the tracking accuracy. NORST also has the best outlier tolerance compared with all previous RPCA or RST methods, both theoretically and empirically (including for real videos), without requiring any model on how the outlier support is generated. This is possible because of the extra assumptions it uses. 1 Introduction Principal Components Analysis (PCA) is one of the most widely used dimension reduction techniques. It finds a small number of orthogonal basis vectors, called principal components, along which most of the variability of the dataset lies. According to its modern definition [3], robust PCA (RPCA) is the problem of decomposing a given data matrix into the sum of a low-rank matrix (true data) and a sparse matrix (outliers). The column space of the low-rank matrix then gives the desired principal subspace (PCA solution). A common application of RPCA is in video analytics in separating a video into a slow-changing background image sequence (modeled as a low-rank matrix) and a foreground image sequence consisting of moving objects or people (sparse) [3]. Robust Subspace Tracking (RST) can be simply interpreted as a time-varying extension of RPCA. It assumes that the true data lies in a low-dimensional subspace that can change with time, albeit slowly. The goal is to track this changing subspace over time in the presence of additive sparse outliers. The offline version of this problem can be called dynamic (or time-varying) RPCA. RST requires the tracking delay to be small, while dynamic RPCA does not. Time-varying subspace is a more appropriate model for long data sequences, e.g., long surveillance videos, since if a ∗ A shorter version of this manuscript [1] is submitted to a double-blind conference. Another small part, Corollary 5.18, will appear in [2]. 1 single subspace model is used the resulting matrix may not be sufficiently low-rank. Moreover the RST problem setting (short tracking delay) is most relevant for applications where real-time or near real-time estimates are needed, e.g., video-based surveillance (object tracking) [4], monitoring seismological activity [5], or detection of anomalous behavior in dynamic social networks [6]. In recent years, RPCA has since been extensively studied. Many fast and provably correct approaches now exist: PCP introduced in [3] and studied in [3, 7, 8], AltProj [9], RPCA-GD [10] and NO-RMC [11]. There is much lesser work on provable dynamic RPCA and RST: original-ReProCS [12, 13, 14] for dynamic RPCA and simple-ReProCS [15] for both. The subspace tracking (ST) problem (without outliers), and with or without missing data, has been studied for much longer in [16, 17, 18, 19]. However, all existing guarantees for it only consider the statistically stationary setting of data being generated from a single unknown subspace. Of course, the most general nonstationary model that allows the subspace to change at each time is not even identifiable since at least r data points are needed to compute an r-dimensional subspace even in the no noise or missing entries case. In this work, we make the subspace tracking problem identifiable by assuming a piecewise constant model on subspace change. We show that it is possible to track the changing subspace to within  accuracy as long as the subspace remains constant for at least O(r log n log(1/)) time instants, and some other assumptions hold. This is more than r by only log factors. Here n is the ambient space dimension. Notation. We use the interval notation [a, b] to refer to all integers between a and b, inclusive, and we use [a, b) := [a, b − 1]. k.k denotes the l2 norm for vectors and induced l2 norm for matrices unless specified otherwise, and 0 denotes transpose. We use MT to denote a sub-matrix of M formed by its columns indexed by entries in the set T . For a matrix P we use P (i) to denote its i-th row. In our algorithm statements, we use L̂t;α := [`ˆt−α+1 , · · · , `ˆt ] and SV Dr [M ] to refer to the matrix of top of r left singular vectors of the matrix M . A matrix P with mutually orthonormal columns is referred to as a basis matrix and is used to represent the subspace spanned by its columns. For basis matrices P1 , P2 , we use SE(P1 , P2 ) := k(I − P1 P1 0 )P2 k as a measure of Subspace Error (distance) between their respective subspaces. This is equal to the sine of the largest principal angle between the subspaces. It is also called “projection distance” [20]. If P1 and P2 are of the same dimension, SE(P1 , P2 ) = SE(P2 , P1 ). We reuse the letters C, c to denote different numerical constants in each use. Robust Subspace Tracking (RST) and Dynamic RPCA Problem Setting. At each time t, we get a data vector yt ∈ Rn that satisfies yt := `t + xt + νt , for t = 1, 2, . . . , d where νt is small unstructured noise, xt is the sparse outlier vector, and `t is the true data vector that lies in a fixed or slowly changing low-dimensional subspace of Rn , i.e., `t = P(t) at where P(t) is an n × r basis matrix with r  n and with k(I − P(t−1) P(t−1) 0 )P(t) k small compared to kP(t) k = 1. We use Tt to denote the support set of xt . Given an initial subspace estimate, P̂0 , the goal is to track span(P(t) ) and `t either immediately or within a short delay. A by-product is that `t , xt , and Tt can also be tracked on-the-fly. The initial subspace estimate, P̂0 , can be computed by applying any of the existing RPCA solutions, e.g., PCP or AltProj, for the first roughly r data points, i.e., for Y[1,ttrain ] , with ttrain = Cr. Dynamic RPCA is the offline version of the above problem. Define matrices L, X, W , Y with L = [`1 , `2 , . . . `d ] and Y , X, W similarly defined. The goal is to recover the matrix L and its column space with  error. We use rL to denote the rank of L. The maximum fraction of nonzeros in any row (column) of the outlier matrix X is denoted by max-outlier-frac-row (max-outlier-frac-col). Identifiability and other assumptions. The above problem definition does not ensure identifiability since either of L or X can be both low-rank and sparse. Moreover, if the subspace changes at every time, it is impossible to correctly estimate all the subspaces. One way to ensure that L is not sparse is by requiring that its left and right singular vectors are dense (non-sparse) or “incoherent” w.r.t. a sparse vector [3, 8, 9]. 2 Definition 1.1. An n × r basis matrix P is µ-incoherent if maxi=1,2,..,n kP (i) k22 ≤ µr/n. Here µ is called the coherence parameter. It quantifies the non-denseness of P . A simple way to ensure that X is not low-rank is by imposing upper bounds on max-outlier-frac-row and max-outlier-frac-col [8, 9]. One way to ensure identifiability of the changing subspaces is to assume that they are piecewise constant: P(t) = Pj for all t ∈ [tj , tj+1 ), j = 1, 2, . . . , J, and to lower bound tj+1 − tj . Let t0 = 1 and tJ+1 = d. With this model, rL = rJ in general (except if subspace directions are repeated). The union of the column spans of all the Pj ’s is equal to the span of the left singular vectors of L. Thus, assuming that the Pj ’s are µ-incoherent implies their incoherence. We also assume that the subspace coefficients at are mutually independent over time, have identical and diagonal covariance matrices denoted by Λ, and are element-wise bounded. Element-wise bounded-ness of at ’s, along with the statistical assumptions, is similar to incoherence of right singular vectors of L (right incoherence); see Remark 3.5. Because tracking requires an online algorithm that processes data vectors one at a time or in mini-batches, we need these statistical assumptions on the at ’s. For the same reason, we also need to re-define max-outlier-frac-row as the maximum fraction of nonzeroes in any row of any α-consecutive-column sub-matrix of X. Here α is the mini-batch size used by the RST algorithm. We will refer to it as max-outlier-frac-rowα to indicate this difference. Contributions. (1) We develop a recursive projected compressive sensing (ReProCS) algorithm for RST that we call Nearly Optimal RST via ReProCS (ReProCS-NORST) because its tracking delay is nearly optimal. We will refer to it as just “NORST” in the sequel. NORST has a significantly improved (and simpler) subspace update step compared to all previous ReProCS-based methods. Our most important contribution is one of the first two provable guarantees for RST, and the first that ensures near optimal tracking delay, needs a near optimal lower bound on how long a subspace should remain constant, and needs minimal assumptions on subspace change. Moreover, our guarantee also shows that NORST is online (after initialization), fast (has the same complexity as vanilla r-SVD), and has memory complexity of order nr log n log(1/). Here “online” means the following. After each subspace change, the algorithm detects the change in at most 2α = Cf 2 r log n time instants, and after that, it improves the subspace estimate every α time instants1 . The improvement after each step is exponential and thus, one can get an -accurate estimate within K = C log(1/) such steps. Offline NORST also provably solves dynamic RPCA. (2) Our guarantees for both NORST and offline NORST (Theorem 2.2) essentially hold under “weakened” standard RPCA assumptions and two simple extra assumptions: (i) slow subspace change and (ii) a lower bound on most outlier magnitudes. (i) is a natural assumption for static camera videos (with no sudden scene changes) and (ii) is also easy because, by definition, an “outlier” is a large magnitude corruption. The small magnitude ones get classified as νt . Besides these, we also need that at ’s are mutually independent, have identical and diagonal covariance matrix Λ, and are element-wise bounded. Element-wise bounded-ness, along with the statistical assumptions on at , is similar to right incoherence of L; see Remark 3.5. For the initial Cr samples, NORST needs the outlier fractions to be O(1/r) (needed to apply AltProj). As explained in Sec. 2.3, the extra assumptions help ensure that, after initialization, NORST can tolerate a constant maximum fraction of outliers per row in any α-column-sub-matrix of the data matrix without assuming any outlier support generation model. This statement assumes that the condition number of the covariance of at is a constant (with n). As is evident from Table 1, this 1 The reason that just O(r log n) samples suffice for each update is because we assume that the at ’s are element-wise bounded, νt is very small and with effective dimension r or smaller (see Theorem 2.2). These, along with the specific structure of the PCA problem we encounter (noise/error seen by the PCA step depends on the `t ’s and thus has “effective dimension” r), is why so few samples suffice. 3 Video Frame NORST (16.5ms)AltProj(26.0ms)RPCA-GD(29.5ms)GRASTA (2.5ms) PCP (44.6ms) Figure 1: Background Recovery. NORST gives the best background estimate. All the other algorithms exhibit some artifacts. Only NORST does not contain the person or even his shadow. NORST is also faster than all except GRASTA (which does not work). The GRASTA output also slightly lags the actual frame. Time taken per frame is shown in parentheses. is better than what all existing RPCA approaches can tolerate. For the video application, this implies that NORST tolerates slow moving and occasionally static foreground objects much better than all other approaches. This is also corroborated by our experiments on real videos, e.g., see Fig 1 and Sec. 6. (3) Unlike simple-ReProCS [15] or original-ReProCS [12, 13, 14], NORST needs only a coarse initialization which can be computed using just C log r iterations of any batch RPCA method such as AltProj applied to Cr initial samples. In fact, if the outlier magnitudes were very large for an initial set of O(r log n log r) time instants, or if the outliers were absent for this much time, even a random initialization would suffice. This simple fact has two important implications. First, NORST with the subspace change detection step removed also provides an online, fast, memory-efficient, and provably correct approach for static RPCA (our problem with J = 1, i.e., with `t = P at ). The other online solution for such a problem is ORPCA which comes with only a partial guarantee [21] (the guarantee requires intermediate algorithm estimates to be satisfying certain properties). Moreover, a direct corollary of our result is a guarantee that a minor modification of NORST-random (NORST with random initialization) also solves the subspace tracking with missing data (ST-missing) and the dynamic matrix completion (MC) problems. All existing guarantees for ST-missing [18, 19] hold only for the case of a single unknown subspace and are only partial guarantees. From the MC perspective, NORST-random does not assume any model on the set of observed entries. However, the tradeoff is that it needs many more observed entries. Both these results are given in Sec. 5. Paper Organization. The rest of the paper is organized as follows. In Sec. 2 we explain the main ideas of the NORST algorithm and present our main result for it (Theorem 2.2). We also discuss the implications of our guarantee, and provide detailed comparison with related work. In Sec. 3, we give the complete NORST algorithm and carefully explain the subspace change detection approach. In Sec. 4, we give the proof outline, the three main lemmas leading to the proof of Theorem 2.2, then also prove the lemmas. In Sec. 5, we provide useful corollaries for (a) Static RPCA, (b) Subspace Tracking with missing entries and (c) a simple extension to recover the guarantee of s-ReProCS from [15]. Empirical evaluation on synthetic and real-world datasets is described in Sec. 6. The complete proof of Theorem 2.2, of two auxiliary lemmas, and of the extensions is given in the Appendix. 2 NORST Algorithm and Main Result 2.1 NORST: Nearly-Optimal RST NORST starts with a “good” estimate of the initial subspace. This can be obtained by C log r iterations2 of AltProj applied to Y[1,ttrain ] with ttrain = Cr. It then iterates between (a) Projected Compressive 2 √ Using C log r iterations helps ensure that the initialization error is O(1/ r). 4 Sensing (CS) / Robust Regression3 in order to estimate the sparse outliers, xt ’s, and hence the `t ’s, and (b) Subspace Update to update the subspace estimate P̂(t) . Projected CS proceeds as follows. At time t, if the previous subspace estimate, P̂(t−1) , is accurate enough, because of slow subspace change, projecting yt onto its orthogonal complement will nullify most of `t . We compute ỹt := Ψyt where Ψ := I − P̂(t−1) P̂(t−1) 0 . Thus, ỹt = Ψxt + Ψ(`t + νt ) and kΨ(`t + νt )k is small due to slow subspace change and small νt . Recovering xt from ỹt is now a CS / sparse recovery problem in small noise [22]. We compute x̂t,cs using noisy l1 minimization followed by thresholding based support estimation to obtain T̂t . A Least Squares (LS) based debiasing step on T̂t returns the final x̂t . We then estimate `t as `ˆt = yt − x̂t . The `ˆt ’s are then used for the Subspace Update step which involves (i) detecting subspace change, and (ii) obtaining improved estimates of the new subspace by K steps of r-SVD, each done with a new set of α samples of `ˆt . While this step is designed under the piecewise constant subspace assumption (needed for identifiability of P(t) ’s), if the goal is only to get good estimates of `t or xt , the method works even when this assumption may not hold, e.g., for real videos. For ease of understanding, we present a basic version of NORST in Algorithm 1. This assumes the change times tj are known. The actual algorithm, that we study and implement, detects these automatically. It is given as Algorithm 2 in Sec. 3. 2.2 Main Result Before stating the result, we precisely define max-outlier-frac-col and max-outlier-frac-rowα . Since NORST is an online approach that performs outlier support recovery one data vector at a time, it needs different bounds on both. Let max-outlier-frac-col := maxt |Tt |/n. We define max-outlier-frac-rowα as the maximum fraction of outliers (nonzeros) per row of any sub-matrix of X with α consecutive columns. To understand P this precisely, for a time interval, J , define γ(J ) := maxi=1,2,...,n |J1 | t∈J 1{i∈Tt } where 1S is the indicator P function for statement S. Thus, t∈J 1{i∈Tt } counts the number of outliers (nonzeros) in row i of XJ , and so γ(J ) is the maximum outlier fraction in any row of the sub-matrix XJ of X. Let J α denote a time interval of duration α. Then max-outlier-frac-rowα := maxJ α ⊆[1,d] γ(J α ). We use t̂j to denote the time instant at which the j-th subspace change time is detected by Algorithm 2. Theorem 2.2. Consider Algorithm 2 given in the next section. Let α := Cf 2 r log n, Λ := E[a1 a1 0 ], λ+ := λmax (Λ), λ− := λmin (Λ), f := λ+ /λ− , and let xmin := mint mini∈Tt (xt )i denote the minimum outlier magnitude. Pick an ε ≤ min(0.01, 0.03 minj SE(Pj−1 , Pj )2 /f ). Let K := C log(1/ε). If 1. Pj ’s are µ-incoherent; and at ’s are zero mean, mutually independent over time t, have identical covariance matrices, i.e. E[at at 0 ] = Λ, are element-wise uncorrelated (Λ is diagonal), are elementwise bounded (for a numerical constant η, (at )2i ≤ ηλi (Λ)), and are independent of all outlier supports Tt ; 2. kνt k2 ≤ crkE[νt νt 0 ]k, kE[νt νt 0 ]k ≤ cε2 λ− , νt ’s are zero mean, mutually independent, and independent of xt , `t ; 3. max-outlier-frac-col ≤ c1 /µr, max-outlier-frac-rowα ≤ b0 := c2 ; f2 4. subspace change: let ∆ := maxj SE(Pj−1 , Pj ), assume that 3 Robust Regression (with a sparsity model on the outliers) assumes that observed data vector y satisfies y = P̂ a + x + b where P̂ is a tall matrix (given), a is the vector of (unknown) regression coefficients, x is the (unknown) sparse outliers, b is (unknown) small noise/modeling error. An obvious way to solve this is by solving mina,x λkxk1 + ky − P̂ a − xk2 . In this, one can solve for a in closed form to get â = P̂ 0 (y − x). Substituting this, the minimization simplifies to minx λkxk1 + k(I − P̂ P̂ 0 )(y − x)k2 . This is equivalent to the Lagrangian version of the projected CS problem that NORST solves (see line 7 of Algorithm 1). 5 (a) tj+1 − tj > (K + 2)α, and √ (b) ∆ ≤ 0.8 and C1 rλ+ (∆ + 2ε) ≤ xmin ; √ 5. initialization4 : SE(P̂0 , P0 ) ≤ 0.25, C1 rλ+ SE(P̂0 , P0 ) ≤ xmin ; and (6) algorithm parameters are set as given in Algorithm 2; then, with probability (w.p.) at least 1 − 10dn−10 ,  if t ∈ [tj , t̂j + α),  (ε + ∆) k−1 SE(P̂(t) , P(t) ) ≤ (0.3) (ε + ∆) if t ∈ [t̂j + (k − 1)α, t̂j + kα),  ε if t ∈ [t̂j + Kα + α, tj+1 ). Treating f as a numerical constant, the memory complexity is O(nα) = O(nr log n) and time complexity is O(ndr log(1/ε)). Corollary 2.3. Under Theorem 2.2 assumptions, the following also hold: 1. kx̂t − xt k = k`ˆt − `t k ≤ 1.2(SE(P̂(t) , P(t) ) + ε)k`t k with SE(P̂(t) , P(t) ) bounded as above, 2. at all times, t, T̂t = Tt , 3. tj ≤ t̂j ≤ tj + 2α, of f line f line f line 4. Offline-NORST (last few lines of Algorithm 2): SE(P̂(t) , P(t) ) ≤ ε, kx̂of − xt k = k`ˆof − t t `t k ≤ εk`t k at all t. Its memory complexity is O(Knα) = O(nr log n log(1/ε)). Remark 2.4 (Relaxing outlier magnitudes lower bound). The assumption on xmin (outlier magnitudes) required by Theorem 2.2 can be significantly relaxed to the following which only requires that most outlier magnitudes are lower bounded. Assume that the outlier magnitudes are such that the following holds: xt can be split as xt = (xt )small + (xt )large with √ the two components being such that, in the k-th subspace 5 k−1 + update interval , k(xt )small √ k ≤ 0.3 (ε + ∆) rλ and the smallest nonzero entry of (xt )large is larger k−1 than C1 · 0.3 (ε + ∆) rλ+ . For the case of j = 0, we need the bound to hold with ∆ replaced by ∆init = SE(P̂0 , P0 ), and ε replaced by zero. If there were a way to bound the element-wise error of the CS step (instead of the l2 norm error), one could relax the above requirement even more. Discussion. This discussion assumes that f is a constant (does not increase with n), i.e., it is O(1). Theorem 2.2 shows that, with high probability (whp), when using NORST, the subspace change gets detected within a delay of at most 2α = Cf 2 (r log n) time instants, and the subspace gets estimated to ε error within at most (K + 2)α = Cf 2 (r log n) log(1/ε) time instants. The same is also true for the recovery error of xt and `t . Both the detection and tracking delay are within log factors of the optimal since r is the minimum delay needed even in the noise-free, i..e, xt = νt = 0, case. The fact that NORST can detect subspace change within a short delay can be an important feature for certain applications, e.g., this feature is used in [6] to detect structural changes in a dynamic social network. Moreover, if offline processing is allowed, we can guarantee recovery within normalized error ε at all time instants. This implies that offline-NORST solves the dynamic RPCA problem. Observe that Theorem 2.2 allows a constant maximum fraction of outliers per row (after initialization), without making any assumption on how the outlier support is generated, as long as the extra assumptions 4 This can be satisfied by applying C log r iterations of AltProj [9] on the first Cr data samples and assuming that these have outlier fractions in any row or column bounded by c/r. 5 k-th subspace update interval refers to Jk := [t̂j + (k − 1)α, t̂j + kα) for k > 1 and J1 = [tj , t̂j + α) for k = 1. The first interval also includes the subspace detection interval, [tj , t̂j ), since the analysis of the projected CS step for this interval is the same as for [t̂j , t̂j + α). 6 Algorithm 1 Basic-NORST (with tj known). The actual algorithm that detects tj automatically is Algorithm 2. Obtain P̂0 by C(log r) iterations of AltProj on Y[1,ttrain ] with ttrain = Cr followed by SVD on the output L̂. 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: Input: yt , Output: x̂t , `ˆt , P̂(t) , T̂t Parameters: K ← C log(1/ε), α ← Cf 2 r log n, ωsupp ← xmin /2, ξ ← xmin /15, r Initialize: j ← 1, k ← 1 P̂(ttrain ) ← P̂0 for t > ttrain do Ψ ← I − P̂(t−1) P̂(t−1) 0 ỹt ← Ψyt . Projected-CS x̂t,cs ← arg minx̃ kx̃k1 s.t. kỹt − Ψx̃k ≤ ξ. (Robust T̂t ← {i : |x̂t,cs | > ωsupp }. Regression). x̂t ← IT̂t (ΨT̂t 0 ΨT̂t )−1 ΨT̂t 0 ỹt . `ˆt ← yt − x̂t . if t = tj + kα − 1 then P̂j,k ← SV Dr [L̂t;α ], P̂(t) ← P̂j,k , k ← k + 1. else P̂(t) ← P̂(t−1) . Subspace end if Update. if t = tj + Kα − 1 then P̂j ← P̂(t) , k ← 1, j ← j + 1 end if end for discussed below hold. We explain why this is possible in Sec. 2.3. Of course, for the initial Cr samples, NORST needs max-outlier-frac-rowCr ∈ O(1/r) (needed to apply AltProj). Also, the memory complexity guaranteed by Theorem 2.2 is nearly d/r times better than that of all existing RPCA solutions; see Table 1. The time complexity is worse than that of only NO-RMC6 , but NO-RMC needs d ≥ cn (unreasonable requirement for videos which often have much fewer frames d than the image size n). Finally, NORST also needs outlier fraction per column to be O(1/r) instead of O(1/rL ). If J is large, e.g. if J = d/(r log n), it is possible that rL  r. We should clarify that NORST allows max-outlier-frac-rowα ∈ O(1) but this does not necessarily imply that the number of outliers in each row can be this high. The reason is it only allows the fraction per column to only be O(1/r). Thus, for a matrix of size n × α, it allows the total number of outliers to be O(min(nα, nα/r)) = O(nα/r). Thus the average fraction allowed is only O(1/r). NORST needs the following extra assumptions. The main extra requirement is that xmin be lower bounded as given in the last two assumptions of Theorem 2.2, or as stated in Remark 2.4. The lower bound on xmin is reasonable7 as long as the initial subspace estimate is accurate enough and the subspace changes √ slowly enough so that both ∆ and SE(P̂0 , P0 ) are O(1/ r). This requirement may seem restrictive on first glance but actually is not. The reason is that SE(.) is only measuring the largest principal angle. This bound on SE still allows the chordal distance between the two subspaces to be O(1). Chordal distance [20] is the l2 norm of the vector containing the sine of all principal angles. The second related extra requirement is an upper bound on ∆ (slow subspace change) which depends on the value of xmin . We discuss this point next. Other than these two, NORST only needs simple statistical assumptions on 6 NO-RMC is so fast because it is actually a robust matrix completion solution and it deliberately undersamples the entire data matrix Y to get a faster √ RPCA algorithm. 7 requires xmin to be C λ+ or larger. 7 Table 1: Comparing RPCA and RST solutions. All algorithms also require left and right incoherence or left incoherence and at ’s element-wise bounded (this, along with the i.i.d. assumption on at ’s, is similar to right incoherence), and hence these are not compared. The incoherence parameter µ and the condition numbers are treated as constants in this table. In general rL = rJ. Strong or unrealistic assumptions are shown in red. PCP(C) [3], PCP(H) [7, 8], mod-PCP [23], AltProj [9], RPCA-GD [10], NO-RMC [11], orig-ReProCS [13, 14], s-ReProCS [15]. Algorithm Outlier tolerance Other Assumptions Memory, Time, # params PCP(C) [3] max-outlier-frac-row ∈ O(1) outlier support: unif. random, Memory: O(nd) zero max-outlier-frac-col ∈ O(1) rL ≤ c min(n, d)/log2 n Time: O(nd2 1 ) max-outlier-frac-row ∈ O (1/rL ) d ≥ crL Memory: O(nd) PCP(H) [8] AltProj [9] max-outlier-frac-row ∈ O (1/rL ) d ≥ crL Memory: O(nd) max-outlier-frac-row ∈ O(1/rL1.5 ) d ≥ crL Memory: O(nd) max-outlier-frac-row ∈ O (1/rL ) c2 n ≥ d ≥ cn Memory: O(nd) max-outlier-frac-row ∈ O(1) outlier support: unif. random, Memory: O(nr log2 n) max-outlier-frac-col ∈ O(1) slow subspace change (unrealistic), Time: O(ndr log2 n 1 ) rL ≤ orig-ReProCS [13, 14] max-outlier-frac-rowα tracking delay max-outlier-frac-col ∈ O(1/rL ) ∈ O(1) too large 4 Time: O(nrL3 log2 n log2 1 ) max-outlier-frac-col ∈ O(1/rL ) mod-PCP [23] 5 Time: O(ndrL log 1 ) max-outlier-frac-col ∈ O(1/rL1.5 ) NO-RMC [11] 2 Time: O(ndrL2 log 1 ) max-outlier-frac-col ∈ O (1/rL ) RPCA-GD [10] 1 Time: O(nd2 1 ) max-outlier-frac-col ∈ O (1/rL ) c min(n,d) log2 n Delay: ∞ outlier support: moving object model, Memory: O(nr2 /2 ) unrealistic subspace change model, Time: O(ndr log 1 ) 5 changed eigenvalues small for some time, outlier mag. lower bounded, init data: AltProj assu’s, at ’s independent, d ≥ Cr2 /2 s-ReProCS: [15] max-outlier-frac-rowα solves max-outlier-frac-col ∈ O(1/r) ∈ O(1) subspace change: only 1 direc at a time, Memory: O(nr log n log 1 ) outlier mag. lower bounded, Time: O(ndr log 1 ) 4 at ’s i.i.d., d ≥ Cr log n log 1 . RST with sub-optimal delay init data: AltProj assumptions NORST max-outlier-frac-rowα ∈ O(1) subspace change: mild, Memory: O(nr log n log 1 ) (this work): solves max-outlier-frac-col ∈ O(1/r) outlier mag. lower bounded, Time: O(ndr log 1 ) RST with at ’s i.i.d., d ≥ Cr log n log 1 , near-optimal delay first Cr samples: AltProj assumptions 4 at ’s. The zero-mean assumption is a minor one. The assumption that Λ be diagonal is also minor8 . In the video setting, zero-mean can be ensured by subtracting the empirical average of the background images computing using the first ttrain frames. Mutual independence of at ’s holds if the changes in each background image w.r.t. a “mean” background are independent, when conditioned on their subspace. This is valid, for example, if the background changes are due to illumination variations or due to moving curtains (see Fig. 5). Moreover, by using the approach of [14], it is possible to relax this to just requiring that the at ’s satisfy an autoregressive model over time. Element-wise boundedness, along with the above, is similar to right incoherence (see Remark 3.5). Outlier v/s Subspace Assumptions. When there are fewer outliers in the data or when outliers are easy to detect, one would expect to need weaker assumptions on the true data’s subspace and/or on its rate of change. This is indeed true. The max-outlier-frac-col bound relates max-outlier-frac-col to µ (not-denseness parameter) and r (subspace dimension). The upper bound on ∆ implies that, if xmin is 8 It only implies that Pj is the matrix of principal components of E[Lj L0j ] where Lj := [`tj , `tj +1 , . . . , `tj+1 −1 ]. 8 larger (outliers are easier to detect), a larger amount of subspace change ∆ can be tolerated. The relation of max-outlier-frac-row to rate of subspace change is not evident from the way the guarantee is stated above because we have assumed max-outlier-frac-row ≤ b0 := c/f 2 with c being a numerical constant, and used c∆ this to get a simple expression for K. If we did not do this, we would get K = Cd − log(1√b f ) log( 0.8ε )e, 0 see Remark A.1. Since we need tj+1 − tj ≥ (K + 2)α, a smaller b0 means a larger ∆ can be tolerated for the same delay, or vice versa. Algorithm Parameters. Algorithm 2 assumes knowledge of 4 model parameters: r, λ+ , λ− and xmin to set the algorithm parameters. The initial dataset used for estimating P̂0 (using AltProj) can be used to get an accurate estimate of r, λ− and λ+ using standard techniques. Thus one really only needs to set xmin . If continuity over time is assumed, we can let it be time-varying and set it as mini∈T̂t−1 |(x̂t−1 )i | at t. Related Work. For a summary of comparisons, see Table 1. In terms of other solutions for provably correct RST or dynamic RPCA, there is very little work. For RST, there is only one other provable algorithm, simple-ReProCS (s-ReProCS) [15]. This has the same tracking delay and memory complexity as NORST, however, it assumes that only one subspace direction can change at each change time. This is a more restrictive model than ours. Moreover, it implies that the tracking delay of s-ReProCS is r-times sub-optimal. Also, s-ReProCS uses a projection-SVD step for subspace update (as opposed to simple SVD in NORST). These two facts imply that it needs an -accurate subspace initialization in order to ensure that the later changed subspaces can be tracked with -accuracy. Thus, it does not provide a static RPCA or subspace tracking with missing data solution. For dynamic RPCA, the earliest result was a partial guarantee (a guarantee that depended on intermediate algorithm estimates satisfying certain assumptions) for the original reprocs approach (originalReProCS) [12]. This was followed up by two complete guarantees for reprocs-based approaches with minor modifications [13, 14]. For simplicity we will still call these “original-ReProCS”. These guarantees needed very strong assumptions and their tracking delay was O(nr2 /2 ). Since  can be very small, this factor can be quite large, and hence one cannot claim that original-ReProCS solves RST. Our work is a very significant improvement over all these works. (i) The guaranteed memory complexity, tracking delay, and required delay between subspace change times of NORST are all r/2 times lower than that of original-ReProCS. (ii) All the original-ReProCS guarantees needed a very specific assumption on how the outlier support could change. They required an outlier support model inspired by a video moving object that moves in one direction for a long time; and whenever it moves, it must move by a fraction of s := maxt |Tt |. This is very specific model with the requirement of moving by a fraction of s being the most restrictive. Our result removes this model and replaces it with just a bound on max-outlier-frac-row. We explain in the last para of Sec. 4.1 why this is possible. (iii) The subspace change model assumed in [13, 14] required a few new directions, that were orthogonal to Pj−1 , to be added at time tj and some others to be removed. This is an unrealistic model for slow subspace change, e.g., in 3D, it implies that the subspace needs to change from the x-y plane to the y-z plane. Moreover because of this model, their results needed the “energy” (eigenvalues) along the newly added directions to be small for a period of time after each subspace change. This is a strong (and not easy to interpret) requirement. Our result removes all these requirements and replaces them with a bound on SE(Pj−1 , Pj ) which is much more realistic. Thus, in 3D, our result allows the x-y plane to change to a slightly tilted x-y plane. An approach called modified-PCP (mod-PCP) was proposed to solve the problem of RPCA with partial subspace knowledge [23]. A corollary of its guarantee shows that it can also be used to solve dynamic RPCA [23]. However, since it adapted the PCP proof techniques from [3], its pros and cons are similar to those of PCP, e.g., it also needs a uniformly randomly generated outlier support. As can be seen from Table 1, its pros and cons are similar to those of the PCP result by [3] (PCP(C)) discussed below. We also provide a comparison with provably correct RPCA approaches in Table 1. In summary, 9 NORST has significantly better memory complexity than all of them, all of which are batch; it has the best outlier tolerance (after initialization), and the second-best time complexity, as long as its extra assumptions hold. It can also detect subspace change quickly, which can be a useful feature. Consider outlier tolerance. PCP(H), AltProj, RPCA-GD, and NO-RMC need both max-outlier-frac-row and max-outlier-frac-col to be O(1/rL ); PCP(C) [3] and modified-PCP [23] need the outlier support to uniformly random (strong requirement: for video it implies that objects are very small sized and jumping around randomly); and original-ReProCS needs it to satisfy a very specific moving object model described above (restrictive). Instead, after initialization, NORST only needs max-outlier-frac-rowα ∈ O(1) and max-outlier-frac-col ∈ O(1/r). 2.3 The need for extra assumptions As noted in [9], the standard RPCA problem (that only assumes left and right incoherence of L and nothing else) cannot tolerate a bound on outlier fractions in any row or any column that is larger than 1/rL 9 . The reason NORST can tolerate a constant max-outlier-frac-rowα bound is because it uses extra assumptions. We explain the need for these here. It recovers xt first and then `t and does this at each time t. When recovering xt , it exploits “good” knowledge of the subspace of `t (either from initialization or from the previous subspace’s estimate and slow subspace change), but it has no way to deal with the residual error, bt := (I − P̂(t−1) P̂(t−1) 0 )`t , in this knowledge. Since the individual vector bt does not have any structure that can exploited10 , the error in recovering xt cannot be lower than Ckbt k. This means that, to correctly recover the support of xt , xmin needs to be larger than Ckbt k. This is where the xmin lower bound comes from. As we will see in Sec. 4, correct support recovery is needed to ensure that the subspace estimate can be improved with each update. In particular, it helps ensure that the error vectors et := xt − x̂t in a given subspace update interval are mutually independent, when conditioned on the yt ’s from all past intervals. This step also uses element-wise boundedness of the at ’s along with their mutual independence and identical covariances. 3 Automatic NORST We present the actual NORST algorithm (automatic NORST) in Algorithm 2. The main idea why automatic NORST works is the same as that of the basic algorithm with the exception of the additional subspace detection step. The subspace detection idea is borrowed from [15], although its correctness proof has differences because we assume a much simpler subspace change model. In Algorithm 2, the subspace update stage toggles between the “detect” phase and the “update” phase. It starts in the “update” phase with t̂0 = ttrain . We then perform K r-SVD steps with the k-th one done at t = t̂0 + kα − 1. Each such step uses the last α estimates, i.e., uses L̂t;α . Thus at t = t̂0 + Kα − 1, the subspace update of P0 is complete. At this point, the algorithm enters the “detect” phase. For any j, if the j-th subspace change is detected at time t, we set t̂j = t. At this time, the algorithm enters the “update” (subspace update) phase. We then perform K r-SVD steps with the k-th r-SVD step done at t = t̂j + kα − 1 (instead of at t = tj + kα − 1). Each such step uses the last α estimates, i.e., uses 9 The reason is this: let b0 = max-outlier-frac-row, one can construct a matrix X with b0 outliers in some rows that has rank equal to 1/b0 . A simple way to do this would be to let the support and nonzero entries of X be constant for b0 d columns before letting either of them change. Then the rank of X will be d/(b0 d). A similar argument can be used for max-outlier-frac-col. 10 However the bt ’s arranged into a matrix do form a low-rank matrix whose approximate rank is r or even lower (if not all directions change). If we try to exploit this structure we end up with a modified-PCP [23] type approach. This needs the uniform random support assumption (used in its guarantee). Or, if the [8] approach were used for its guaratee, for identifiability reasons similar to the one described above, it will still not tolerate outlier fractions larger than 1/rnew where rnew is the (approximate) rank of the matrix formed by the bt ’s. 10 Algorithm 2 Automatic-NORST. Obtain P̂0 by C(log r) iterations of AltProj on Y[1,ttrain ] with ttrain = Cr followed by SVD on the output L̂. 1: Input: P̂0 , yt , Output: x̂t , `ˆt , P̂(t) 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: Parameters: K ← C log(1/ε), α ← Cf 2 r log n, ωsupp ← xmin /2, ξ ← xmin /15, ωevals ← 2ε2 λ+ , r. P̂(ttrain ) ← P̂0 ; j ← 1, k ← 1 phase ← update; t̂0 ← ttrain ; for t > ttrain do Lines 5 − 10 of Algorithm 1 Projected CS. if phase = detect and t = t̂j−1,f in + uα then Φ ← (I − P̂j−1 P̂j−1 0 ). B ← ΦL̂t,α Subspace if λmax (BB 0 ) ≥ αωevals then Detect Phase. phase ← update, t̂j ← t, end if end if if phase = update then if t = t̂j + uα − 1 for u = 1, 2, · · · , then Subspace P̂j,k ← SV Dr [L̂t;α ], P̂(t) ← P̂j,k , k ← k + 1. Update Phase. else P̂(t) ← P̂(t−1) end if if t = t̂j + Kα − 1 then t̂j,f in ← t, P̂j ← P̂(t) k ← 1, j ← j + 1, phase ← detect. end if end if end for Offline NORST: At t = t̂j + Kα, for all t ∈ [t̂j−1 + Kα, t̂j + Kα − 1], offline ← [P̂ 0 P̂(t) j−1 , (I − P̂j−1 P̂j−1 )P̂j ] offline P̂ offline 0 Offline Ψ ← I − P̂(t) (t) NORST. x̂offline ← I (Ψ 0 Ψ )−1 Ψ 0 y t T̂t T̂t T̂t 30: `ˆoffline ← yt − x̂offline . t t T̂t t L̂t;α Thus, at t = t̂j,f in = t̂j + Kα − 1, the update is complete. At this time, the algorithm enters the “detect” phase again. To understand the change detection strategy, consider the j-th subspace change. Assume that the previous subspace Pj−1 has been accurately estimated by t = t̂j−1,f in = t̂j−1 + Kα − 1 and that t̂j−1,f in < tj . Let P̂j−1 denote this estimate. At this time, the algorithm enters the “detect” phase in order to detect the next (j-th) change. Let Bt := (I − P̂j−1 P̂j−1 0 )L̂t;α . For every t = t̂j−1,f in + uα − 1, u = 1, 2, . . . , we √ detect change by checking if the maximum singular value of Bt is above a pre-set threshold, ωevals α, or not. We claim that, whp, under assumptions of Theorem 2.2, this strategy has no “false subspace detections” and correctly detects change within a delay of at most 2α samples. The former is true because, for any t for which [t − α + 1, t] ⊆ [t̂j−1,f in , tj ), all singular values of the matrix Bt will be close to 11 √ √ zero (will be of order ε λ+ ) and hence its maximum singular value will be below ωevals α. Thus, whp, t̂j ≥ tj . To understand why the change is correctly detected within 2α samples, first consider t −t̂ in t = t̂j−1,f in + d j j−1,f eα := tj,∗ . Since we assumed that t̂j−1,f in < tj (the previous subspace update is α complete before the next change), tj lie in the interval [tj,∗ − α + 1, tj,∗ ]. Thus, not all of the `t ’s in this interval lie in the new subspace. Depending on where in the interval tj lies, the algorithm may or may not detect the change at this time. However, in the next interval, i.e., for t ∈ [tj,∗ + 1, tj,∗ + α], all of the `t ’s lie in the new subspace. We can prove that Bt for this time t will have maximum singular value that is above the threshold. Thus, if the change is not detected at tj,∗ , whp, it will get detected at tj,∗ + α. Hence one can show that, whp, either t̂j = tj,∗ , or t̂j = tj,∗ + α, i.e., tj ≤ t̂j ≤ tj + 2α (see Appendix A). √ Time complexity. Consider initialization. To ensure that SE(P̂0 , P0 ) ∈ O(1/ r), we need to use C log r iterations of AltProj. Since there is no lower bound in the AltProj guarantee on the required number of matrix columns (except the trivial lower bound of rank) [9], we can use ttrain = Cr frames for √ initialization. Thus the initialization complexity is O(nttrain r2 log( r) = O(nr3 log r) [9]. The projectedCS step complexity is equal to the cost of a matrix vector multiplication with the measurement matrix times negative logarithm of the desired accuracy in solving the l1 minimization problem. Since the measurement matrix for the CS step is I − P̂(t−1) P̂(t−1) 0 , the cost per CS step (per frame) is O(nr log(1/)) [24] and so the total cost is O((d−ttrain )nr log(1/)). The subspace update involves at most ((d−ttrain )/α) rank r-SVD’s on n×α matrices all of which have constant eigen-gap (this is proved in the proof of tTheorem 4.14 from [25] which we use to show correctness of this step). Thus the total time for subspace update steps is at most ((d − ttrain )/α) ∗ O(nαr log(1/)) = O((d − ttrain )nr log(1/)) [26]. Thus the running time of the complete algorithm is O(ndr log(1/) + nr3 log r). As long as r2 log r ≤ d log(1/), the time complexity of the entire algorithm is O(ndr log(1/)). Remark 3.5 (Relating our assumptions to right incoherence of Lj := L[tj ,tj+1 ) [8]). From our assumptions, Lj = Pj Aj with Aj := [atj , atj +1 , . . . atj+1 −1 ], the columns of Aj are zero mean, mutually independent, have identical covariance Λ, Λ is diagonal, and are element-wise bounded as specified by Theorem P 2.2. Let dj := tj+1 − tj . Define a diagonal matrix Σ with (i, i)-th entry σi and with p σi2 := t (at )2i /dj . Define a dj × r matrix Ṽ with the t-th entry of the i-th column being (ṽi )t := (at )i /(σi dj ). Then, Lj = Pj ΣṼ 0 and each column of Ṽ is unit 2-norm. Also, from the bounded-ness assumption, (ṽi )2t ≤ η σλ2i · d1j i where η is a numerical constant. Observe that Pj ΣṼ 0 is not exactly the SVD of Lj since the columns of Ṽ are not necessarily exactly mutually orthogonal. However, if dj is large enough, one can argue using any law of large numbers’ result (e.g., Hoeffding inequality), that the columns of Ṽ are approximately mutually orthogonal whp. Also, whp, σi2 ≥ 0.99λi . This also follows using Hoeffding11 . Thus, our assumptions imply that, whp, (ṽi )2t ≤ C/dj . If one interprets Ṽ as an “approximation” to the right singular vectors of Lj , this is the right incoherence assumed by [8] and slightly stronger than what is assumed by [3, 9] and others (these require that the squared norm of each row of the matrix of right singular vectors be bounded by Cr/dj ). The claim that “Ṽ can be interpreted as an “approximation” to the right singular vectors of Lj ” is not rigorous. But it is also not clear how to make it rigorous since our work uses statistical assumptions SVD on the at ’s. To get the exact SVD of Lj , we need the SVD of Aj . Suppose Aj = RΣV 0 , then SVD Lj = (Pj R)ΣV 0 . Here R will be an r × r orthonormal matrix. Now it is not clear how to relate the element-wise bounded-ness assumption on at ’s to an assumption on entries of V , since now there is no easy expression for each entry of V or of the entries of Σ in terms of at (since R is unknown). 11 The first claim uses all the four assumptions on at ; the second claim uses all assumptions except diagonal Λ 12 4 Proof Outline and (most of the) Proof In this section we first give the main ideas of the proof (without formal lemmas). We then state the three main lemmas and explain how they help prove Theorem 2.2. After this, we prove the three lemmas. 4.1 Main idea of the proof It is not hard to see that the “noise” bt := Ψ(`t + νt ) seen by the projected CS step is proportional the error between the subspace estimate from (t − 1) and the current subspace. Moreover, incoherence (denseness) of the P(t) ’s and slow subspace change together imply that Ψ satisfies the restricted isometry property (RIP) [12]. Using this, a result for noisy l1 minimization [22], and the lower bound assumption on outlier magnitudes, one can ensure that the CS step output is accurate enough and the outlier support Tt is correctly recovered. With this, we have that `ˆt = `t + νt − et where et := xt − x̂t satisfies et = ITt (ΨTt 0 ΨTt )−1 ITt 0 Ψ0 `t and ket k ≤ Ckbt k. Consider subspace update. Every time the subspace changes, one can show that the change can be detected within a short delay. After that, the K SVD steps help get progressively improved estimates of the changed subspace. To understand this, observe that, after a subspace change, but before the first update step, bt is the largest and hence, et , is also the largest for this interval. However, because of good initialization or because of slow subspace change and previous subspace correctly recovered (to error ε), neither is too large. Both are proportional to (ε + ∆), or to the initialization error. Using the idea below, we can show that we get a “good” first estimate of the changed subspace. The input to the PCA step is `ˆt and the noise seen by it is et . Notice that et depends on the true data `t . Hence this is a setting of PCA in data-dependent noise [27, 25]. From [25], it is known that the subspace recovery error of the PCA step is proportional to the ratio between the time averaged noise P P power plus time-averaged signal-noise correlation, (k t E[et et 0 ]k + k t E[`t et 0 k)/α, and the minimum signal space eigenvalue, λ− . The instantaneous value of noise power is (∆ + ε)2 times λ+ while that of signal-noise correlation is of order (∆ + ε) times λ+ . However, using the fact that et is sparse with α is bounded, one can argue (using support Tt that changes enough over time so that max-outlier-frac-row √ α Cauchy-Schwartz) that their time averaged values are max-outlier-frac-row result, √ times smaller. Asα a + after the first subspace update, the subspace recovery error is at most 4 max-outlier-frac-row (λ /λ− ) times (∆ + ε). Since max-outlier-frac-rowα (λ+ /λ− )2 is bounded by a constant c2 < 1, this means that, √ after the first subspace update, the subspace error is at most c2 times (∆ + ε). √ This, in turn, implies that kbt k, and hence ket k, is also c2 times smaller in the second subspace update interval compared to the first. This, along with repeating the above argument, helps show that √ √ the second estimate of the changed subspace is c2 times better than the first and hence its error is ( c2 )2 √ times (∆ + ε). Repeating the argument K times, the K-th estimate has error ( c2 )K times (∆ + ε). Since K = C log(1/ε), this is an ε accurate estimate of the changed subspace. A careful application of the result of [25] is the reason why we are able to remove the moving object model assumption on the outlier support needed by the earlier guarantees for original-ReProCS [13, 14]. P Applied to our problem, this result requires k t∈J α ITt ITt 0 /αk to be bounded by a constant less than P one. It is not hard to see that maxJ α ∈[1,d] k t∈J α ITt ITt 0 /αk = max-outlier-frac-rowα . To understand P 0 this simply, the matrix t∈J α ITt ITt is diagonal, and the i-th diagonal entry counts the number of time the index i appears in the support set Tt in the interval J α which is precisely the definition of max-outlier-frac-rowα · α. This is also why a constant bound on max-outlier-frac-rowα suffices for our setting. On the other hand the guarantees of [13, 14] required that, for any sequence of positive semi-definite P (p.s.d.) matrices, At , k t∈J α ITt At ITt 0 /αk, be bounded by a constant less than one. This is a much more stringent requirement; one way to satisfy it is using the moving object model on outlier supports assumed there. 13 4.2 Main Lemmas For simplicity, we give the proof for the νt = 0 case. The changes with νt 6= 0 are minor, see Appendix A. First consider the simpler case when tj ’s are known, i.e., consider Algorithm 1. In this case, t̂j = tj . Definition 4.6. Define √ 1. the constants used in Theorem 2.2: c1 = 0.01, c2 = 0.01, and C1 = 15 η 2. s := max-outlier-frac-col · n 3. φ+ = 1.2 4. bound on max-outlier-frac-rowα : b0 := 0.01/f 2 . 5. q0 := 1.2(ε + SE(Pj−1 , Pj )), qk = (0.3)k q0 6. et := x̂t − xt . Since νt = 0, et = `t − `ˆt 7. Events: Γ0,0 := {assumed bound on SE(P̂0 , P0 )}, Γ0,k := Γ0,k−1 ∩ {SE(P̂0,k , P0 ) ≤ 0.3k SE(P̂0 , P0 )}, Γj,0 := Γj−1,K , Γj,k := Γj,k−1 ∩ {SE(P̂j,k , Pj ) ≤ qk−1 /4} for j = 1, 2, . . . , J and k = 1, 2, . . . , K. 8. Using the expression for K given in the theorem, and since P̂j = P̂j,k (from the Algorithm), it follows that Γj,K implies SE(P̂j , Pj ) = SE(P̂j,K , Pj ) ≤ ε. Observe that, if we can show that Pr(ΓJ,K |Γ0,0 ) ≥ 1 − dn−10 we will have obtained all the subspace recovery bounds of Theorem 2.2. The next two lemmas applied sequentially help show that this is true for Algorithm 1 (tj known). The correctness of the actual algorithm (Algorithm 2) follows using these, Corollary 4.10, and Lemma 4.12. The Theorem’s proof is in Appendix A. Lemma 4.7 (first subspace update interval). Under the conditions of Theorem 2.2, conditioned on Γj,0 , p 1. for all t ∈ [t̂j , t̂j + α), kΨ`t k ≤ (ε + ∆) ηrλ+ < xmin /15, kx̂t,cs − xt k ≤ 7xmin /15 < xmin /2, T̂t = Tt , and the error et := x̂t − xt = `t − `ˆt satisfies −1 (1) ITt 0 Ψ`t , et = ITt ΨTt 0 ΨTt and ket k ≤ 1.2(ε + ∆) p ηrλ+ . 2. w.p. at least 1 − 10n−10 , the first subspace estimate P̂j,1 satisfies SE(P̂j,1 , Pj ) ≤ (q0 /4), i.e., Γj,1 holds. Lemma 4.8 (k-th subspace update interval). Under the conditions of Theorem 2.2, conditioned on Γj,k−1 , 1. for all t ∈ [t̂j p + (k − 1)α, t̂j + kα − 1), all claims of the p first part of Lemma 4.7 holds, kΨ`t k ≤ 0.3k−1 (ε + ∆) ηrλ+ , and ket k ≤ (0.3)k−1 · 1.2(ε + ∆) ηrλ+ . 2. w.p. at least 1 − 10n−10 the subspace estimate P̂j,k satisfies SE(P̂j,k , Pj ) ≤ (qk−1 /4), i.e., Γj,k holds. Remark 4.9. For the case of j = 0, in both the lemmas above, ∆ gets replaced by SE(P̂0 , P0 ) and ε by zero. Corollary 4.10. Under the conditions of Theorem 2.2 the following hold 14 1. For all t ∈ [tj , t̂j ), conditioned on Γj−1,K , all claims of the first item of Lemma 4.7 hold. 2. For all t ∈ [t̂j + Kα, tj+1 ), conditioned on Γj,K , the first item of Lemma 4.8 holds with k = K. Thus, for all t, by the above two claims and Lemmas 4.7, 4.8, under appropriate conditioning, et satisfies (1). We prove these lemmas in the next few subsections. The projected CS proof (item one of both lemmas) uses the following lemma from [12] that relates the s-Restricted Isometry Constant (RIC), δs (.), [22] of a projection matrix to the incoherence of its orthogonal complement. Lemma 4.11. [[12]] For an n × r basis matrix P , (1) δs (I − P P 0 ) = max|T |≤s kIT 0 P k2 ; and (2) max|T |≤s kIT 0 P k2 ≤ s maxi=1,2,...,n kIi 0 P k2 ≤ sµr/n. The last bound of the above lemma is a consequence of Definition 1.1. We apply this lemma with s = max-outlier-frac-col · n. The subspace update step proof (item 2 of both the above lemmas) uses a guarantee for PCA in sparse data-dependent noise, Theorem 4.14, due to [25]. Notice that et = `t − `ˆt is the noise/error seen by the subspace update step. By (1), this is sparse and depends on the true data `t . Consider the actual tj unknown case. The following lemma is used to show that, whp, we can detect subspace change within 2α time instants. This lemmas assumes detection threshold ωevals = 2ε2 λ+ (see Algorithm 2). Lemma 4.12 (Subspace Change Detection). Consider an α-length time interval J α ⊂ [tj , tj+1 ] (so that `t = Pj at ). 1. If Φ := I − P̂j−1 P̂j−1 0 and SE(P̂j−1 , Pj−1 ) ≤ ε, with probability at least 1 − 10n−10 , ! 1 X ˆ ˆ0 λmax Φ`t `t Φ ≥ 0.28λ− SE2 (Pj−1 , Pj ) > ωevals α α t∈J 2. If Φ := I − P̂j P̂j 0 and SE(P̂j , Pj ) ≤ ε, with probability at least 1 − 10n−10 , ! 1 X ˆ ˆ0 Φ`t `t Φ ≤ 1.37ε2 λ+ < ωevals λmax α α t∈J 4.3 Proof of Lemma 4.7: projected CS and subspace update in the first update interval We first state a simple lemma. This is proved in Appendix B. Lemma 4.13. Let Q1 , Q2 and Q3 be r-dimensional subspaces in Rn such that SE(Q1 , Q2 ) ≤ ∆1 and SE(Q2 , Q3 ) ≤ ∆2 . Then, SE(Q1 , Q3 ) ≤ ∆1 + ∆2 . Proof of Lemma 4.7. Recall from Definition 4.6 that s := max-outlier-frac-col · n and φ+ = 1.2. Recall also that, for simplicity, we are considering the νt = 0 case. Proof of item 1. First consider j > 0. We have conditioned on the event Γj,0 := Γj−1,K . This implies that SE(P̂j−1 , Pj−1 ) ≤ ε. We consider the interval t ∈ [t̂j , t̂j + α). For this interval, P̂(t−1) = P̂j−1 and thus Ψ = I − P̂j−1 P̂j−1 0 (from Algorithm). For the sparse recovery step, we first need to bound the 2s-RIC of Ψ. To do this, we first obtain bound on max|T |≤2s kIT 0 P̂j−1 k as follows. Consider any set T such that |T | ≤ 2s. Then, IT 0 P̂j−1 ≤ IT 0 (I − Pj−1 Pj−1 0 )P̂j−1 + IT 0 Pj−1 Pj−1 0 P̂j−1 ≤ SE(Pj−1 , P̂j−1 ) + IT 0 Pj−1 = SE(P̂j−1 , Pj−1 ) + IT 0 Pj−1 15 Using Lemma 4.11, and the bound on max-outlier-frac-col from Theorem 2.2, max kIT 0 Pj−1 k2 ≤ 2s max kIi 0 Pj−1 k2 ≤ i |T |≤2s 2sµr ≤ 0.01 n (2) Thus, using SE(P̂j−1 , Pj−1 ) ≤ ε, max IT 0 P̂j−1 ≤ ε + max IT 0 Pj−1 ≤ ε + 0.1 |T |≤2s |T |≤2s Finally, using Lemma 4.11, δ2s (Ψ) ≤ 0.112 < 0.15. Hence Ψ Tt 0 Ψ Tt −1 ≤ 1 1 1 ≤ ≤ < 1.2 = φ+ . 1 − δs (Ψ) 1 − δ2s (Ψ) 1 − 0.15 When j = 0, there are some minor changes. From the initialization assumption, we have SE(P̂0 , P0 ) ≤ 0.25. Thus, max|T |≤2s IT 0 P̂0 ≤ 0.25 + 0.1 = 0.35. Thus, using Lemma 4.11, δ2s (Ψ0 ) ≤ 0.352 < 0.15. The rest of the proof given below is the same for j = 0 and j > 0. Next we bound norm of bt := Ψ`t . This and the RIC bound will then be used to bound kx̂t,cs − xt k. kbt k = kΨ`t k = (I − P̂j−1 P̂j−1 0 )Pj at ≤ SE(P̂j−1 , Pj ) kat k (a) p ≤ (ε + SE(Pj−1 , Pj )) ηrλ+ := bb where (a) follows from Lemma 4.13 with Q1 = P̂j−1 , Q2 = Pj−1 and Q3 = Pj . Under the assumptions of Theorem 2.2, bb < xmin /15. This is why we have set ξ = xmin /15 in the Algorithm. Using these facts, and δ2s (Ψ) ≤ 0.15, the CS guarantee from [22, Theorem 1.3] implies that kx̂t,cs − xt k ≤ 7ξ = 7xmin /15 < xmin /2 Consider support recovery. From above, |(x̂t,cs − xt )i | ≤ kx̂t,cs − xt k ≤ 7xmin /15 < xmin /2 The Algorithm sets ωsupp = xmin /2. Consider an index i ∈ Tt . Since |(xt )i | ≥ xmin , xmin − |(x̂t,cs )i | ≤ |(xt )i | − |(x̂t,cs )i | ≤ |(xt − x̂t,cs )i | < Thus, |(x̂t,cs )i | > (xt )j = 0 and so xmin 2 xmin 2 = ωsupp which means i ∈ T̂t . Hence Tt ⊆ T̂t . Next, consider any j ∈ / Tt . Then, |(x̂t,cs )j | = |(x̂t,cs )j )| − |(xt )j | ≤ |(x̂t,cs )j − (xt )j | ≤ bb < xmin 2 which implies j ∈ / T̂t and T̂t ⊆ Tt implying that T̂t = Tt . Finally, we get an expression for et and bound it. With T̂t = Tt and since Tt is the support of xt , xt = ITt ITt 0 xt , and so −1 −1 x̂t = ITt ΨTt 0 ΨTt ΨTt 0 (Ψ`t + Ψxt ) = ITt ΨTt 0 ΨTt ITt 0 Ψ`t + xt since ΨTt 0 Ψ = IT0 t Ψ0 Ψ = ITt 0 Ψ. Thus et = x̂t − xt satisfies −1 et = ITt ΨTt 0 ΨTt ITt 0 Ψ`t and −1 ket k ≤ ΨTt 0 ΨTt ITt 0 Ψ`t ≤ φ+ ITt 0 Ψ`t ≤ 1.2bb Proof of Item 2 : We will use the following result from [25, Remark 4.18]. 16 Theorem 4.14 (PCA in sparse data-dependent noise (PCA-SDDN)). We are given data vectors yt := `t + wt with wt = ITt Ms,t `t , t = 1, 2, . . . , α, where Tt is the support set of wt , and `t = P at with at satisfying the assumptions of Theorem 2.2. Pick an εSE > 0. Assume that maxt kMs,t P k2 ≤√q < 1, the fraction of non-zeroes in any row of the noise matrix [w1 , w2 , . . . , wα ] is bounded by b, and 3 bqf ≤ 0.9εSE /(1 + εSE ). Define α0 := Cη q2f 2 r log n ε2SE For an α ≥ α0 , let P̂ be the matrix of top r eigenvectors of D := 1 − 10n−10 , SE(P̂ , P ) ≤ εSE . 1 α Pα 0 t=1 yt yt . With probability at least Since `ˆt = `t − et with et satisfying (1), updating P̂(t) from the `ˆt ’s is a problem of PCA in sparse data-dependent noise (SDDN), et . To analyze this, we use Theorem 4.14 given above. Recall from Item 1 of this lemma that, for t ∈ [t̂j , t̂j + α), et satisfies (1). Recall from the Algorithm that we compute Pt̂j +α−1 ˆ ˆ 0 the first estimate of the j-th subspace, P̂j,1 , as the top r eigenvectors of α1 t= `t `t . In the notation t̂j −1 0 0 of Theorem 4.14, yt ≡ `ˆt , wt ≡ et , `t ≡ `t , Ms,t = − (ΨT ΨT ) ΨT , P̂ = P̂j,1 , P = Pj , and so t t t kMs,t P k = k (ΨTt 0 ΨTt )−1 ΨTt 0 Pj k ≤ 1.2(ε + SE(Pj−1 , Pj )) := q0 . Also, b ≡ b0 which is the upper bound on max-outlier-frac-rowα (see Definition 4.6). Applying Theorem 4.14 with q ≡ q0 , b ≡ b0 and using εSE = q0 /4, observe that we require p 0.9(q0 /4) b0 q0 f ≤ . 1 + (q0 /4) Since q0 = 1.2(ε + SE(Pj−1 , Pj )) < 1.2(0.01 + 0.8) < 0.98 (follows from the bounds on ε and on ∆ √ given in Theorem 2.2), this holds if b0 f ≤ 0.18. This is true since we have assumed b0 = 0.01/f 2 (see Definition 4.6). Thus, from Theorem 4.14, with probability at least 1 − 10n−10 , SE(P̂j,1 , Pj ) ≤ q0 /4. Thus, conditioned on Γj,0 , with this probability, Γj,1 holds. Remark 4.15 (Clarification about conditioning). In the proof above we have used Theorem 4.14 which assumes that, for t ∈ J α , the at ’s are mutually independent and the matrices Ms,t are either nonrandom or are independent of the at ’s for this interval. When we apply the theorem for our proof, we are conditioning on Γj,0 . This does not cause any problem since the event Γj,0 is a function of the random variable yold := {y1 , y2 , . . . , yt̂j −1 } where as our summation is over J α := [t̂j , t̂j + α). Also, by Theorem 2.2, at ’s are independent of the outlier supports Tt . To be precise, we are applying Theorem 4.14 conditioned on yold , for any yold ∈ Γj,0 . Even conditioned on yold , clearly, the matrices Ms,t used above are independent of the at ’s for this interval. Also, even conditioned on yold , the at ’s for t ∈ [t̂j , t̂j + α) are clearly mutually independent. Thus, the theorem can be applied. Its conclusion then tells us that, for any yold ∈ Γj,0 , conditioned on yold , with probability at least 1 − 10n−10 , SE(P̂j,1 , Pj ) ≤ q0 /4. Since this holds with the same probability for all yold ∈ Γj,0 , it also holds with the same probability when we condition on Γj,0 . Thus, conditioned on Γj,0 , with this probability, Γj,1 holds. An analogous argument will also apply to the following proofs. 4.4 Proof of Lemma 4.8: lemma for projected CS and subspace update in k-th update interval Proof of Lemma 4.8. We first present the proof for the k = 2 case and then generalize it for an arbitrary k. (A) k = 2: We have conditioned on Γj,1 . This implies that SE(P̂j,1 , Pj ) ≤ q0 /4. 17 Proof of Item 1 : We consider the interval t ∈ [t̂j + α, t̂j + 2α). For this interval, P̂(t−1) = P̂j,1 and thus Ψ = I − P̂j,1 P̂j,1 0 (from Algorithm). For the sparse recovery step, we need to bound the 2s-RIC of Ψ. Consider any set T such that |T | ≤ 2s. We have IT 0 P̂j,1 ≤ IT 0 (I − Pj Pj 0 )P̂j,1 + IT 0 Pj Pj 0 P̂j,1 ≤ SE(Pj , P̂j,1 ) + IT 0 Pj = SE(P̂j,1 , Pj ) + IT 0 Pj The equality holds since SE is symmetric for subspaces of the same dimension. Using SE(P̂j,1 , Pj ) ≤ q0 /4, (2), max IT 0 P̂j,1 ≤ q0 /4 + max IT 0 Pj ≤ q0 /4 + 0.1. |T |≤2s |T |≤2s Finally, from using the assumptions of Theorem 2.2, q0 ≤ 0.96. Using this and Lemma 4.11, δ2s (Ψj ) = max IT 0 P̂j,1 |T |≤2s 2 ≤ 0.352 < 0.15. From, this ΨTt 0 ΨTt −1 ≤ 1 1 1 ≤ ≤ < 1.2 = φ+ . 1 − δs (Ψ) 1 − δ2s (Ψ) 1 − 0.15 Consider kbt k. p kbt k = kΨ`t k = (I − P̂j,1 P̂j,1 0 )Pj at ≤ SE(P̂j,1 , Pj ) kat k ≤ (q0 /4) ηrλ+ (a) p ≤ 0.3(ε + SE(Pj−1 , Pj )) ηrλ+ := 0.3bb We have 0.3bb < bb < xmin /15 as in the proof of Lemma 4.7. The rest of the proof is the same too. Notice here that, we could have loosened the required lower bound on xmin for this interval. Proof of Item 2 : Again, updating P̂(t) using `ˆt ’s is a problem of PCA in sparse data-dependent noise (SDDN), et . We use the result of Theorem 4.14. Recall from Item 1 of this lemma that, for Pt̂j +2α−1 ˆ ˆ 0 t ∈ [t̂j + α, t̂j + 2α), et satisfies (1). We compute P̂j,2 as the top r eigenvectors of 1 `t `t . In α t=t̂j +α notation of Theorem 4.14, yt ≡ `ˆt , wt ≡ et , `t ≡ `t , P ≡ Pj , P̂ ≡ Pj,2 , and Ms,t = − (ΨTt 0 ΨTt )−1 ΨTt 0 . So kMs,t Pj k = k (ΨTt 0 ΨTt )−1 ΨTt 0 Pj k ≤ (φ+ /4)q0 := q1 . Applying Theorem 4.14 with q ≡ q1 , b ≡ b0 (b0 bounds max-outlier-frac-rowα ), and setting εSE = q1 /4, observe that we require p b0 q1 f ≤ 0.9(q1 /4) 1 + (q1 /4) √ which holds if b0 f ≤ 0.18. This is ensured since b0 = 0.01/f 2 . Thus, from Theorem 4.14, with probability at least 1 − 10n−10 , SE(P̂j,2 , Pj ) ≤ (q1 /4) = 0.25 · 0.3q0 . Thus, with this probability, conditioned on Γj,1 , Γj,2 holds. (B) General k: We have conditioned on Γj,k−1 . This implies that SE(P̂j,k−1 , Pj ) ≤ qk−1 /4. Proof of Item 1 : Consider the interval [t̂j + (k − 1)α, t̂j + kα). In this interval, P̂(t−1) = P̂j,k−1 and thus Ψ = I − P̂j,k−1 P̂j,k−1 0 . Using the same idea as for the k = 2 case, we have that for the k-th interval, qk−1 = (φ+ /4)k−1 q0 . Pick εSE = (qk−1 /4). From this it is easy to see that  2 0 δ2s (Ψ) ≤ max IT P̂j,k−1 ≤ (SE(P̂j,k−1 , Pj ) + max IT 0 Pj )2 |T |≤2s |T |≤2s (a) ≤ (SE(P̂j,k−1 , Pj ) + 0.1)2 ≤ ((φ+ /4)k−1 (ε + SE(Pj−1 , Pj ) + 0.1)2 < 0.15 18 where (a) follows from (2). Using the approach Lemma 4.7, p kΨ`t k ≤ SE(P̂j,k−1 , Pj ) kat k ≤ (φ+ /4)k−1 (ε + SE(Pj−1 , Pj )) ηrλ+ (a) p ≤ (φ+ /4)k−1 (ε + ∆) ηrλ+ := (φ+ /4)k−1 bb Proof of Item 2 : Again, updating P̂(t) from `ˆt ’s is a problem of PCA in sparse data-dependent noise given in Theorem 4.14. From Item 1 of this lemma that, for t ∈ [t̂j + (k − 1)α, t̂j + kα], et satisfies Pt̂j +kα−1 (1). We update the subspace, P̂j,k as the top r eigenvectors of α1 t= `ˆ `ˆ 0 . In the setting above t̂j +(k−1)α t t yt ≡ `ˆt , wt ≡ et , `t ≡ `t , and Ms,t = − (ΨT 0 ΨT )−1 ΨT 0 , and so kMs,t Pj k = k (ΨT 0 ΨT )−1 ΨT 0 Pj k ≤ t t t t t t (φ+ /4)k−1 q0 := qk−1 . Applying Theorem 4.14 with q ≡ qk−1 , b ≡ b0 (b0 bounds max-outlier-frac-rowα ), and setting εSE = qk−1 /4, we require p 0.9(qk−1 /4) b0 qk−1 f ≤ 1 + (qk−1 /4) √ which holds if b0 f ≤ 0.12. This is true by our assumption. Thus, from Theorem 4.14, with probability at least 1 − 10n−10 , SE(P̂j,k , Pj ) ≤ (φ+ /4)k−1 q1 . Thus, with this probability, conditioned on Γj,k−1 , Γj,k holds. 4.5 Proof of Lemma 4.12: subspace change detection lemma Proof of Lemma 4.12. The proof uses the following lemma. It is proved in Appendix B. The proof uses Cauchy-Schwartz for sums of matrices, followed by either matrix Bernstein [28] or Vershynin’s subGaussian result [29]. Lemma 4.16 (Concentration Bounds). Assume that the assumptions of Theorem 2.2 hold. For this P lemma assume that `t = P at , Φ := I − P̂ P̂ 0 , et = M2,t M1,t `t , with k α1 t∈J α M2,t M2,t 0 k ≤ b0 and kM1,t P k ≤ q. Assume that event E0 holds. Then, ! 1X Pr at at 0 − Λ ≤ 0 λ− ≥ 1 − 10n−10 α t ! p 1X Pr Φ`t et 0 Φ ≤ (1 + 1 )SE(P̂ , P ) b0 qλ+ ≥ 1 − 10n−10 α t ! p 1X Pr Φet et 0 Φ ≤ (1 + 2 ) b0 q 2 λ+ ≥ 1 − 10n−10 α t ! 1X 0 − ≥ 1 − 2n−10 Pr Φ`t νt Φ ≤ l,v λ α t ! 1X 2 − 0 Pr ≥ 1 − 2n−10 Φνt νt Φ ≤ (ε + v,v )λ α t Proof of Item (a): First from Corollary 4.10, note that for t ∈ [tj , t̂j ], the error et satisfies (1). We 19 have ! 1 X λmax Φ[Pj at at 0 Pj 0 + et et 0 + `t et 0 + et `t 0 ]Φ α t∈J α ! ! X (a) 1 X 1 ≥ λmax ΦPj at at 0 Pj 0 Φ + λmin Φ[et et 0 + `t et 0 + et `t 0 ]Φ α α α α t∈J t∈J ! 1 X 1 X 1 X ΦPj at at 0 Pj 0 Φ − Φet et 0 Φ − 2 Φ`t et 0 Φ ≥ λmax α α α α α α t∈J t∈J t∈J 1 X 1 X := λmax (T ) − Φet et 0 Φ − 2 Φ`t et 0 Φ α α α α t∈J (3) t∈J where (a) follows from Weyl’s Inequality. Now we bound the second and third terms by invoking Lemma 4.16 with E0 := {SE(P̂j−1 , Pj−1 ) ≤ ε}, P̂ ≡ P̂j−1 , P ≡ Pj , M2,t ≡ ITt and M1,t ≡ (ΨTt 0 ΨTt )−1 ΨTt 0 , where Ψ = I − P̂j−1 P̂j−1 0 . Thus, b0 ≡ b0 , q ≡ q0 . Thus, with probability at least 1 − 4n−10 , p p 1 X 1 X Φet et 0 Φ + 2 Φ`t et 0 Φ ≤ b0 q02 λ+ (1 + 2 ) + 2 b0 q0 (SE(Pj−1 , Pj ) + ε)λ+ (1 + 1 ) α α α α t∈J t∈J (4) The above equation uses the fact that SE(P̂j−1 , Pj ) ≤ ε + SE(Pj−1 , Pj ) which is a direct consequence QR of using Lemma 4.13. We bound the first term of (3) as follows. Let ΦPj = Ej Rj be its reduced QR decomposition. Thus Ej is an n × r matrix with orthonormal columns and Rj is an r × r upper triangular matrix. Let ! 1 X 0 at at Rj 0 . A := Rj α α t∈J Observe that T can also be written as      A0 Ej 0 T = Ej Ej,⊥ 0 0 Ej,⊥ 0 (5) and thus λmax (A) = λmax (T ). We work with λmax (A) in the sequel. We will use the following simple claim. Claim 4.17. If X  0 (i.e., X is a p.s.d matrix), where X ∈ Rr×r , then RXR0  0 for all R ∈ Rr×r . Proof. Since X is p.s.d., y 0 Xy ≥ 0 for any vector y. Use this with y = R0 z for any z ∈ Rr . We get z 0 RXR0 z ≥ 0. Since this holds for all z, RXR0  0. Using Lemma 4.16, it follows that Pr 1X at at 0 − (λ− − 0 )I  0 α t ! ≥ 1 − 2n−10 . Using Claim 4.17, with probability 1 − 2n−10 , Rj 1X at at 0 − (λ− − 0 )I α t =⇒ λmin Rj ! Rj 0  0 1X at at 0 − (λ− − 0 )I α t 20 ! ! Rj 0 ≥0 Using Weyl’s inequality [30], with the same probability, ! ! 1X λmin Rj at at 0 − (λ− − 0 )I Rj 0 ≤ λmax Rj α t 1X at at 0 α t ! ! Rj 0 − (λ− − 0 )λmax Rj Rj 0  and so, λmax (A) ≥ (λ− − 0 )λmax (Rj Rj 0 ). We now obtain a lower bound on the second term in the rhs above. λmax (Rj Rj 0 ) = λmax (Pj 0 (I − P̂j−1 P̂j−1 0 )Pj )) = λmax (Pj 0 (I − Pj−1 Pj−1 0 + Pj−1 Pj−1 0 − P̂j−1 P̂j−1 0 )Pj )) ≥ λmax (Pj 0 (I − Pj−1 Pj−1 0 )Pj ) + λmin (Pj 0 (Pj−1 Pj−1 0 − P̂j−1 P̂j−1 0 )Pj ) 2 = σmax ((I − Pj−1 Pj−1 0 )Pj ) + λmin (Pj 0 (Pj−1 Pj−1 0 − P̂j−1 P̂j−1 0 )Pj ) ≥ SE2 (Pj−1 , Pj ) − Pj 0 (Pj−1 Pj−1 0 − P̂j−1 P̂j−1 0 )Pj (a) ≥ SE2 (Pj−1 , Pj ) − Pj−1 Pj−1 0 − P̂j−1 P̂j−1 0 ≥ SE2 (Pj−1 , Pj ) − 2ε (6) where we have used [12, Lemma 2.10]. Thus, combining (3), (4), (6), and using 0 = 0.01, 1 = 2 = 0.01, with probability at least 1 − 10n−10 , ! p 1 X ˆ ˆ0 λmax Φ`t `t Φ ≥ 0.99λ− (SE2 (Pj−1 , Pj ) − 2ε) − λ+ [ b0 q0 (1.01q0 + 2.02(ε + SE(Pj−1 , Pj )))] α α t∈J (a) h i p ≥ λ− 0.91SE2 (Pj−1 , Pj ) − 2.7 b0 f (ε + SE(Pj−1 , Pj )2 (b)   ≥ λ− 0.91SE2 (Pj−1 , Pj ) − 0.54(ε2 + SE2 (Pj−1 , Pj ) ≥ λ− SE2 (Pj−1 , Pj )(0.91 − 0.54 · 1.16) ≥ 0.28λ− SE2 (Pj−1 , Pj ) where (a) uses q0 = 1.2(ε + SE(Pj−1 , Pj )) and ε ≤ 0.03SE2 (Pj−1 , Pj )/f 2 < 0.4SE2 (Pj−1 , Pj ), (b) uses √ b0 f = 0.1 and (a + b)2 ≤ 2(a2 + b2 ). and the last inequality again uses ε ≤ 0.03SE2 (Pj−1 , Pj )/f 2 . Proof of Item (b): First, we recall that from Corollary 4.10, for t ∈ [t̂j + Kα, tj+1 ), the error et satisfies (7). ! ! ! X 1 X ˆ ˆ0 1 X 1 λmax Φ`t `t Φ ≤ λmax Φ`t `t 0 Φ + λmax Φ[`t et 0 + et `t 0 + et et 0 ]Φ α α α α α α t∈J t∈J t∈J ! 1 X 1 X 1 X ≤ λmax Φ`t `t 0 Φ + Φet et 0 Φ + 2 Φ`t et 0 Φ α α α α α α t∈J t∈J t∈J 1 X 1 X := λmax (T ) + Φet et 0 Φ + 2 Φ`t et 0 Φ α α α α t∈J t∈J To obtain bounds on the second and third terms in the equation above we invoked Lemma 4.16 with E0 := {SE(P̂j , Pj ) ≤ ε}, P̂ ≡ P̂j , P ≡ Pj , M2,t ≡ ITt , M1,t ≡ (ΨTt 0 ΨTt )−1 ΨTt 0 , where Ψ = I − P̂j P̂j 0 and b0 ≡ b0 , ≡ qK , . Thus, with probability at least 1 − 10n−10 , p 1 X 1 X Φet et 0 Φ + 2 Φ`t et 0 Φ ≤ b0 qK λ+ (qK (1 + 2 ) + 2(1 + 1 )ε) α α α α t∈J t∈J 21 QR The above equation also uses SE(P̂j , Pj ) ≤ ε. Proceeding as before to bound λmax (T ), define ΦPj = Ej Rj , define A as before, we know λmax (T ) = λmax (Ej 0 T Ej ) = λmax (A). Further, ! ! ! X (a) 1 X 1 λmax (A) = λmax Rj at at 0 Rj 0 ≤ λmax at at λmax (Rj Rj 0 ) α α α α t∈J t∈J where (a) uses Ostrowski’s theorem [30, Theorem 5.4.9]. We have 2 2 λmax (Rj Rj 0 ) = σmax (Rj ) = σmax ((I − P̂j P̂j 0 )Pj ) ≤ ε2 P and we can bound λmax ( α1 t∈J α at at 0 ) using the first item of Lemma 4.16 with 0 = 0.01. Combining all of the above, and setting 1 = 2 = 0.01, when the subspace has not changed, with probability at least 1 − 10n−10 , ! (a) p 1 X ˆ ˆ0 λmax Φ`t `t Φ ≤ λ+ [1.01ε2 + b0 qK (1.01qK + 2.01ε)] ≤ 1.37ε2 λ+ α α t∈J where (a) uses qK ≤ ε and b0 f 2 = 0.01. Under the condition of Theorem 2.2, recall that ωevals = 2ε2 λ+ and thus, with high probability, 1.37ε2 λ+ < ωevals < 0.28λ− SE2 (Pj−1 , Pj ). 5 5.1 Extensions Static Robust PCA A useful corollary of our result for RST is that NORST is also the first online algorithm that provides a provable finite sample guarantee for the static Robust PCA problem. Static RPCA is our problem setting with J = 1, or in other words, with `t = P at . A recent work, [21], developed an online stochastic optimization based reformulation of PCP, called ORPCA, to solve this. Their paper provides only a partial guarantee because the guarantee assumes that the intermediate algorithm estimates, P̂(t) , are fullrank. Moreover the guarantee is only asymptotic. Instead our result given below is a complete guarantee and is non-asymptotic. Corollary 5.18 (Static RPCA). Consider Algorithm 1 with t2 = ∞. Theorem 2.2 holds with following modification: replace the slow subspace change assumption with a fixed subspace P . Everything else remains as is, but with r ≡ rL . Under the assumptions of Theorem 2.2, all the conclusions hold with same probability. The time and memory complexity are O(ndr log(1/)) and O(nr log n log(1/)). In applications such as “robust” dimensionality reduction [31, 32] where the objective is to just obtain the top-r directions along which the variability of data is maximized, we only need the first Kα = Cf 2 r log n log(1/ε) samples to obtain an ε-accurate subspace estimate. If only these are used, the time complexity reduces to O(nKαr log(1/ε)) = O(nr2 log n log2 (1/)). This is faster than even NO-RMC [11] and does not require d ≈ n; of course it requires the other extra assumptions discussed earlier. 5.2 Subspace Tracking with Missing Data (ST-missing) and Dynamic Matrix Completion Another useful corollary of our result is a guarantee for the ST-missing problem. Consider the subspace tracking with missing data (ST-missing) problem. By setting the missing entries at time t to zero, and by defining Tt to be the set of missing entries at time t, we observe n-dimensional vectors that satisfy yt := `t − ITt ITt 0 `t , for t = 1, 2, . . . , d. 22 (7) Algorithm 3 NORST-Random for subspace tracking with missing data (ST-missing) Algorithm 2 with the following changes 1. Replace line 3 with: compute P̂0 ← P̂init ← Generate an n × r basis matrix from the random orthogonal model; j ← 1, k ← 1 2. Replace line 6 with the following • Ψ ← I − P̂(t−1) P̂(t−1) 0 ; ỹt ← Ψyt ; x̂t ← ITt (ΨTt 0 ΨTt )−1 ΨTt 0 ỹt ; `ˆt ← yt − x̂t . with xt ≡ ITt ITt 0 `t . This can be interpreted as a special case of the RST problem where the set Tt is known. Because there are no sparse corruptions (outliers), there is no xmin . Thus the initialization error √ need not be O(1/ r) (needed in the RST result to ensure a reasonable lower bound on xmin ) and so one can even use random initialization. We assume that the initialization is obtained using the Random Orthogonal Model described in [33]. As explained in [33], a basis matrix generated from this model is already µ-incoherent. We have the following corollary. The only change in its proof is the proof of the first subspace update interval for the j = 0 case. Corollary 5.19 (ST-missing). Consider NORST-Random (Algorithm 3). If the assumptions of Theorem 2.2 on at and νt hold, Pj ’s are µ-incoherent, tj+1 − tj > (K + 2)α, ∆ < 0.8, the outlier fraction bounds given in Theorem 2.2 hold, and if, for t ∈ [t0 , t1 ], max-outlier-frac-col ≤ c/(log n), then all conclusions of Theorem 2.2 on P̂(t) and on `t hold with the same probability. To our knowledge, the above is the first complete non-asymptotic guarantee for ST-missing; and the first result that allows changing subspaces. All existing guarantees are either partial guarantees (make assumptions on intermediate algorithm estimates), e.g., [19], or provide only asymptotic results [16, 18]. Moreover, from a dynamic matrix completion viewpoint, it is also giving a matrix completion solution without assuming that the set of observed entries is generated from a uniform or a Bernoulli model. Of course the tradeoff is that it needs many more observed entries. All these points will be discussed in detail in follow-up work where we will also numerically evaluate NORST-random for this problem. 5.3 Fewer than r directions change It is possible to relax the lower bound on outlier magnitudes if not all of the subspace directions change at a given subspace change time. Suppose that only rch < r directions change. When rch = 1, we recover the guarantee of [15] but for NORST (which is a simpler algorithm than s-reprocs). Let Pj−1,fix denote a basis for the fixed component of Pj−1 and let Pj−1,ch denote a basis for its changing component. Thus, Pj−1 R = [Pj−1,fix , Pj−1,ch ], where R is a r × r rotation matrix. We have Pj = [Pj−1,fix , Pj,chd ] (8) where Pj,chd is the changed component and has the same dimension as Pj−1,ch . Thus, SE(Pj−1 , Pj ) = SE(Pj−1,ch , Pj,chd ) (9) and so ∆ = maxj SE(Pj−1 , Pj ) = maxj SE(Pj−1,ch , Pj,chd ). Let λ+ ch denote the largest eigenvalue along any direction in Pj,chd . Corollary 5.20. In Algorithm 2, replace line 17 by P̂(t) ← basis(P̂j−1 , P̂j,k ). For basis matrices P1 , P2 , we use P = basis(P1 , P2 ) to mean that P is a basis matrix with column span equal to the column span of 23 log(SE(P̂(t) , P(t) )) GRASTA ORPCA s-ReProCS NORST Offline-NORST 0 −2 −4 2,000 4,000 6,000 8,000 10,000 2,000 t 4,000 6,000 t 8,000 10,000 Figure 2: Left plot illustrates the `t error for outlier supports generated using Moving Object Model and right plot illustrates the error under the Bernoulli model. The values are plotted every kα−1 time-frames. [P1 , P2 ]. Assume that (8) and (9) hold. Also assume that the conditions of Theorem 2.2 holds with the q p + lower bound on xmin relaxed to xmin ≥ C(ε η(r − rch )λ + (ε + ∆) ηrch λ+ ch ). Then, all conclusions of Theorem 2.2 hold. 6 Empirical Evaluation In this section we present the results for extensive numerical experiments on synthetic and real data to R validate our theoretical claims. All time comparisons are performed on a Desktop Computer with Intel Xeon E3-1240 8-core CPU @ 3.50GHz and 32GB RAM and all synthetic data experiments are averaged over 100 independent trials. The codes are available at https://github.com/praneethmurthy/NORST. 6.1 Synthetic Data We perform three experiments on synthetic data to corroborate our theoretical claims. Experiment 1. We compare the results of NORST and Offline-NORST with static RPCA algorithms, and Robust Subspace Tracking/Online RPCA methods proposed in literature. For our first experiment, we generate the changing subspaces using Pj = eγj Bj Pj−1 as done in [34] where γj controls the subspace change and Bj ’s are skew-symmetric matrices. In the first experiment we used the following parameters. n = 1000, d = 12000, J = 2, t1 = 3000, t2 = 8000, r = 30, γ1 = 0.001, γ2 = γ1 and the matrices B1 and B2 are generated as B1 = (B̃1 − B̃1 ) and B2 = (B̃2 − B̃2 ) where the entries of B̃1 , B̃2 are generated independently from a standard normal distribution. We set α = 300. This gives us the basis matrices P(t) for all t. To obtain the low-rank matrix L from this we generate the coefficients i.i.d at ∈ Rr as independent zero-mean, bounded random variables. They are (at )i ∼ unif [−qi , qi ] where √ √ qi = f − f (i − 1)/2r for i = 1, 2, · · · , r − 1 and qr = 1. thus the condition number is f and we selected f = 50. For the sparse supports, we considered two models according to which the supports are generated. First we use Model G.24 [15] which simulates a moving object pacing in the video. For the first ttrain = 100 frames, we used a smaller fraction of outliers with parameters s/n = 0.01, b0 = 0.01. For t > ttrain we used s/n = 0.05 and b0 = 0.3. Secondly, we used the Bernoulli model to simulate sampling uniformly at random, i.e., each entry of the matrix, is independently selected with probability ρ or not selected with probability 1 − ρ. We generate the sparse supports using the Bernoulli model using ρ = 0.01 for the first ttrain frames and ρ = 0.3 for the subsequent frames. The sparse outlier magnitudes for both support models are generated uniformly at random from the interval [xmin , xmax ] with xmin = 10 and xmax = 20. 24 Table 2: Comparison of kL̂ − LkF /kLkF for Online and offline RPCA methods. Average time for the Moving Object model is given in parentheses. The offline (batch) methods are performed once on the complete dataset. Outlier Model GRASTA (0.02 ms) s-ReProCS (0.9 ms) ORPCA (1.2ms) NORST (0.9 ms) RPCA-GD (7.8ms) AltProj (4.6ms) Offline-NORST (1.7ms) Moving Object Bernoulli 0.630 6.163 0.598 2.805 0.861 1.072 4.23 × 10−4 0.002 4.283 0.092 4.441 0.072 8.2 × 10−6 2.3 × 10−4 We initialized the s-ReProCS and NORST algorithms using AltProj applied to Y[1,ttrain ] with ttrain = 100. For the parameters to AltProj we used used the true value of r, 15 iterations and a threshold of 0.01. This, and the choice of γ1 and γ2 ensure that SE(P̂init , P0 ) ≈ SE(P1 , P0 ) ≈ SE(P2 , P1 ) ≈ 0.01. The other algorithm parameters are set as mentioned in the theorem, i.e., K = dlog(c/ε)e = 8, α = Cr log n = 300, ω = xmin /2 = 5 and ξ = 7xmin /15 = 0.67, ωevals = 2ε2 λ+ = 7.5 × 10−4 . For l1 minimization we used the YALL-1 toolbox [35] and set the tolerance to 10−4 . For the least-squares step we use the Conjugate Gradient Least Squares instead of the well-known “backslash” operator in MATLAB since this is a well conditioned problem. For this we set the tolerance as 10−10 and the number of iterations as 10. We have not done any code optimization such as use of MEX files for various sub-routines to speed up our algorithm. For the other online methods we implement the algorithms without modifications. The regularization √ √ parameter for ORPCA was set as with λ1 = 1/ n and λ2 = 1/ d according to [21]. Wherever possible we set the tolerance as 10−6 and 100 iterations to match that of our algorithm. As shown in Fig. 2, NORST is significantly better than all the RST methods - s-ReProCS [15], and two popular heuristics from literature - ORPCA [21] and GRASTA [34]. We also provide a comparison of offline techniques in Table 2. We must mention here that we implemented the static RPCA methods once on the entire data matrix, Y . We do this to provide a roughly equal comparison of the time taken. In principle, we could also implement the static techniques on disjoint batches of size α, but we observed that this did not yield significant improvement in terms of reconstruction accuracy, while being considerably slower, and thus we report only the latter setting. As can be seen, offline NORST outperforms all static RPCA methods, both for the moving object outlier support model and for the commonly used random Bernoulli support model. For the batch comparison we used √ PCP, AltProj and RPCA-GD. We set the regularization parameter for PCP 1/ n in accordance with [3]. The other known parameters, r for Alt-Proj, outlier-fraction for RPCA-GD, are set using the true values. Furthermore, for all algorithms (the IALM solver in case of PCP) we set the threshold as 10−6 and the number of iterations to 100 as opposed to 10−3 and 50 iterations which were set as default to provide a fair comparison with NORST and Offline-NORST. All results are averaged over 100 independent runs. Experiment 2. Next we perform an experiment to validate our claim of NORST admitting a higher fraction of outliers per row than the state of the art. In particular, since AltProj has the highest tolerance to max-outlier-frac-row, we only compare with it. The experiment proceeded as follows. We chose 10 different values of each of r and b0 (we slightly misuse notation here to let b0 := max-outlier-frac-row for this section only). For each pair of b0 and r we implemented NORST and ALtProj over 100 independent trials and computed the relative error in recovering L, i.e., we computed kL̂ − LkF /kLkF for each run. We computed the empirical probability of success, i.e., we enumerated the number of times out of 100 the error seen by each algorithm was less than a threshold, 0.5. For each pair of {b0 , r} we used the Bernoulli model for sparse support generation, the low rank matrix is generated exactly as done in the previous experiments with the exception that again to provide an equal footing, we increased the “subspace change” by setting γ1 and γ2 to 10 times the value that was used in the previous experiment. For the first ttrain frames we used b0 = 0.02. We provide the phase transition 25 (a) Phase Transition for Alt Proj (b) Phase Transition for NORST 30 30 (a) (b) 20 r r 20 10 10 0.1 0.2 0.3 b0 0.4 0.5 0.6 0.7 0.1 0.2 0.3 b0 0.4 0.5 0.6 0.7 Figure 3: Numerically computed kL̂ − Lk2F /kLk2F for AltProj and for Offline NORST. Note that NORST indeed has a much higher tolerance to outlier fraction per row as compared to AltProj. Black denotes 0 and white denotes 1. log(SE(P̂(t) , P(t) )) AltProj Offline NORST xmin = 0.5 xmin = 5 xmin = 10 0 −2 −4 2,000 4,000 6,000 8,000 10,000 2,000 t 4,000 6,000 8,000 10,000 t Figure 4: In the above plots we show the variation of the subspace errors for varying xmin . In particular, we set all the non-zero outlier values to xmin . The results are averaged over 100 independent trials. plots for both algorithm in Fig. 2. Here, white represents success while black represents failure. As can be seen, NORST is able to tolerate a much larger fraction of outlier-per-row as compared to AltProj. Experiment 3. Finally we perform an experiment to analyze the effect of the lower bound on the outlier magnitude xmin with the performance of NORST and AltProj. We show the results in Fig. 4. In the first stage, we generate the data exactly as done in the Moving Object sparse support model of the first experiment. The only change to the data generation parameters is that we now choose three different values of xmin = {0.5, 5, 10}. Furthermore, we set all the non-zero entries of the sparse matrix to be equal to xmin . This is actually harder than allowing the sparse outliers to take on any value since for a moderately low value of xmin the outlier-lower magnitude bound of Theorem 2.2 is violated. This is indeed confirmed by the numerical results presented in Fig. 4. (i) When xmin = 0.5, NORST works well since now all the outliers get classified as the small unstructured noise νt . (ii) When xmin = 10, NORST still works well because now xmin is large enough so that the outlier support is mostly correctly recovered. (iii) But when xmin = 5 the NORST reconstruction error stagnates around 10−3 . All AltProj errors are much worse than those of NORST because the outlier fraction per row is the same as in the first experiment. What can be noticed though is that the variation with varying xmin is not that significant. 6.2 Real Data In this section we provide empirical results on real video for the task of Background Subtraction. For the AltProj algorithm we set r = 40. The remaining parameters were used with default setting. For NORST, we set α = 60, K = 3, ξt = kΨ`ˆt−1 k2 . We found that these parameters work for most videos that we 26 (a) original (b) NORST (c) AltProj (d) RPCA-GD (e) GRASTA (f) PCP Figure 5: Comparison of visual performance in Foreground Background separation for the MR dataset. The images are shown at t = ttrain + 10, 140, 630, 760. (a) original (b) NORST (c) AltProj (d) RPCA-GD (e) GRASTA (f) PCP Figure 6: Comparison of visual performance in Foreground Background separation for the Lobby (LB) dataset. The recovered background images are shown at t = ttrain + 260, 545, 610. verified our algorithm on. For RPCA-GD we set the “corruption fraction” α = 0.2 as described in their paper. Meeting Room (MR) dataset: The meeting room sequence is set of 1964 images of resolution 64 × 80. The first 1755 frames consists of outlier-free data. Henceforth, we consider only the last 1209 frames. For NORST, we used ttrain = 400. In the first 400 frames, a person wearing a black shirt walks in, writes something on the board and goes back. In the subsequent frames, the person walks in with a white shirt. This is a challenging video sequence because the color of the person and the color of the curtain are hard to distinguish. NORST is able to perform the separation at around 43 frames per second. We present the results in Fig. 5 Lobby (LB) dataset: This dataset contains 1555 images of resolution 128 × 160. The first 341 frames are outlier free. Here we use the first 400 “noisy” frames as training data. The Alt Proj algorithm is used to obtain an initial estimate with rank, r = 40. The parameters used in all algorithms are exactly the same as above. NORST achieves a “test” processing rate of 16 frames-per-second. We present the results in Fig. 6 27 Acknowledgments The authors would like to thank Praneeth Netrapalli and Prateek Jain of Microsoft Research India for fruitful discussions on strengthening the guarantee by removing assumptions on subspace change model. References [1] P. Narayanamurthy and N. Vaswani, “Nearly optimal robust subspace tracking and dynamic robust pca,” submitted to a double blind conference, 2018. [2] P. Narayanamurthy and N. Vaswani, “A Fast and Memory-Efficient Algorithm for Robust PCA (MERoP),” in IEEE Intl. Conf. Acoustics, Speech, Sig. Proc. (ICASSP), 2018. [3] E. J. Candès, X. Li, Y. Ma, and J. Wright, “Robust principal component analysis?,” J. ACM, vol. 58, no. 3, 2011. [4] J.P. Costeira and T. Kanade, “A multibody factorization method for independently moving objects,” International Journal of Computer Vision, vol. 29, no. 3, pp. 159–179, 1998. [5] G. S. Wagner and T. J. Owens, “Signal detection using multi-channel seismic data,” Bulletin of the Seismological Society of America, vol. 86, no. 1A, pp. 221–231, 1996. [6] A. Ozdemir, E. M. Bernat, and S. Aviyente, “Recursive tensor subspace tracking for dynamic brain network analysis,” IEEE Transactions on Signal and Information Processing over Networks, 2017. [7] V. Chandrasekaran, S. Sanghavi, P. A. Parrilo, and A. S. Willsky, “Rank-sparsity incoherence for matrix decomposition,” SIAM Journal on Optimization, vol. 21, 2011. [8] D. Hsu, S. M. Kakade, and T. Zhang, “Robust matrix decomposition with sparse corruptions,” IEEE Trans. Info. Th., Nov. 2011. [9] P. Netrapalli, U N Niranjan, S. Sanghavi, A. Anandkumar, and P. Jain, “Non-convex robust pca,” in NIPS, 2014. [10] X. Yi, D. Park, Y. Chen, and C. Caramanis, “Fast algorithms for robust pca via gradient descent,” in NIPS, 2016. [11] Y. Cherapanamjeri, K. Gupta, and P. Jain, “Nearly-optimal robust matrix completion,” ICML, 2016. [12] C. Qiu, N. Vaswani, B. Lois, and L. Hogben, “Recursive robust pca or recursive sparse recovery in large but structured noise,” IEEE Trans. Info. Th., pp. 5007–5039, August 2014. [13] B. Lois and N. Vaswani, “Online matrix completion and online robust pca,” in IEEE Intl. Symp. Info. Th. (ISIT), 2015. [14] J. Zhan, B. Lois, H. Guo, and N. Vaswani, “Online (and Offline) Robust PCA: Novel Algorithms and Performance Guarantees,” in Intnl. Conf. Artif. Intell. Stat. (AISTATS), 2016. [15] P. Narayanamurthy and N. Vaswani, “Provable dynamic robust pca or robust subspace tracking,” arXiv:1705.08948 (submitted to IEEE Trans. Info. Theory), 2017. [16] B. Yang, “Projection approximation subspace tracking,” IEEE Trans. Sig. Proc., pp. 95–107, 1995. 28 [17] T. Adali and S. Haykin, Eds., Adaptive Signal Processing: Next Generation Solutions, Wiley & Sons, 2010. [18] Y. Chi, Y. C. Eldar, and R. Calderbank, “Petrels: Parallel subspace estimation and tracking by recursive least squares from partial observations,” IEEE Trans. Sig. Proc., December 2013. [19] L. Balzano and S. Wright, “Local convergence of an algorithm for subspace identification from partial data,” Found. Comput. Math., vol. 15, no. 5, 2015. [20] K. Ye and L. H. Lim, “Schubert varieties and distances between subspaces of different dimensions,” SIAM Journal on Matrix Analysis and Applications, vol. 37, no. 3, pp. 1176–1197, 2016. [21] J. Feng, H. Xu, and S. Yan, “Online robust pca via stochastic optimization,” in NIPS, 2013. [22] E. Candes, “The restricted isometry property and its implications for compressed sensing,” C. R. Math. Acad. Sci. Paris Serie I, 2008. [23] J. Zhan and N. Vaswani, “Robust pca with partial subspace knowledge,” IEEE Trans. Sig. Proc., July 2015. [24] Lin Xiao and Tong Zhang, “A proximal-gradient homotopy method for the l1-regularized leastsquares problem,” in ICML, 2012. [25] N. Vaswani and P. Narayanamurthy, “Finite sample guarantees for pca in non-isotropic and datadependent noise,” arXiv:1709.06255, 2017. [26] Cameron Musco and Christopher Musco, “Randomized block krylov methods for stronger and faster approximate singular value decomposition,” in Advances in Neural Information Processing Systems, 2015, pp. 1396–1404. [27] N. Vaswani and H. Guo, “Correlated-pca: Principal components’ analysis when data and noise are correlated,” in Adv. Neural Info. Proc. Sys. (NIPS), 2016. [28] J. A. Tropp, “User-friendly tail bounds for sums of random matrices,” Found. Comput. Math., vol. 12, no. 4, 2012. [29] R. Vershynin, “Introduction to the non-asymptotic analysis of random matrices,” Compressed sensing, pp. 210–268, 2012. [30] R. Horn and C. Johnson, Matrix Analysis, Cambridge Univ. Press, 1985. [31] E. Keogh, K. Chakrabarti, M. Pazzani, and S. Mehrotra, “Dimensionality reduction for fast similarity search in large time series databases,” Knowledge and information Systems, vol. 3, no. 3, pp. 263–286, 2001. [32] J. C. Harsanyi and C. I. Chang, “Hyperspectral image classification and dimensionality reduction: an orthogonal subspace projection approach,” IEEE Transactions on geoscience and remote sensing, vol. 32, no. 4, pp. 779–785, 1994. [33] E. J. Candes and B. Recht, “Exact matrix completion via convex optimization,” Found. of Comput. Math, , no. 9, pp. 717–772, 2008. [34] J. He, L. Balzano, and A. Szlam, “Incremental gradient on the grassmannian for online foreground and background separation in subsampled video,” in IEEE Conf. on Comp. Vis. Pat. Rec. (CVPR), 2012. 29 [35] J. Yang and Y. Zhang, “Alternating direction algorithms for l1 problems in compressive sensing,” Tech. Rep., Rice University, June 2010. A Proof of Theorem 2.2 We divide the proof into 3 parts for better clarity. We first prove the νt = 0 case for NORST (Algorithm 2), then prove the correctness of Offline NORST, and finally explain the changes needed when νt 6= 0. A.1 Proof with νt = 0 Remark A.1 (Deriving the long expression for K given in the discussion). We have used max-outlier-frac-rowα ≤ b0 with b0 = 0.01/f 2 throughout the analysis in order to simplify the proof. If we were not to do this, and √ if we used [25], it is possible to show that the “decay rate” qk is of the form qk = (c2 b0 f )k q0 from which it follows that to obtain an ε-accurate approximation of the subspace it suffices to have   log (c1 ∆/ε) √ K= . − log(c2 b0 f ) We first prove Theorem 2.2 for the case when tj ’s are known, i.e., correctness of Algorithm 1. Proof of Theorem 2.2 with assuming tj known. In this case t̂j = tj . The proof is an easy consequence of Lemmas 4.7 and 4.8. Recall that Γj,K ⊆ Γj,K−1 ⊆ · · · Γj,0 and ΓJ,K ⊆ ΓJ−1,K ⊆ · · · ⊆ Γ1,K . To show that the conclusions of the Theorem hold, it suffices to show that Pr(ΓJ,K |Γ0,0 ) ≥ 1 − 10dn−10 . Using the chain rule of probability, Pr(ΓJ,K |Γ1,0 ) = Pr(ΓJ,K , ΓJ−1,K , · · · , Γ1,K |Γ1,0 ) = J Y Pr(Γj,K |Γj,0 ) = j=1 = J Y K Y J Y Pr(Γj,K , Γj,K−1 , · · · , Γj,1 |Γj,0 ) j=1 (a) Pr(Γj,k |Γj,k−1 ) ≥ (1 − 10n−10 )JK ≥ 1 − 10JKn−10 . j=1 k=1 where (a) used Pr(Γj,1 |Γj,0 ) ≥ 1 − 10n−10 from Lemma 4.7 and Pr(Γj,k |Γj,k−1 ) ≥ 1 − 10n−10 from Lemma 4.8. Proof of Theorem 2.2. Define  t̂j−1,f in := t̂j−1 + Kα, tj,∗  tj − t̂j−1,f in = t̂j−1,f in + α α Thus, t̂j−1,f in is the time at which the (j − 1)-th subspace update is complete; w.h.p., this occurs before tj . With this assumption, tj,∗ is such that tj lies in the interval [tj,∗ − α + 1, tj,∗ ]. Recall from the algorithm that we increment j to j + 1 at t = t̂j + Kα := t̂j,f in . Define the events Ptj,∗ 1. Det0 := {t̂j = tj,∗ } = {λmax ( α1 t=t Φ`ˆt `ˆ0t Φ) > ωevals } and j,∗ −α+1 P tj,∗ +α Det1 := {t̂j = tj,∗ + α} = {λmax ( 1 Φ`ˆt `ˆ0 Φ) > ωevals }, α t t=tj,∗ +1 2. SubUpd := ∩K k=1 SubUpdk where SubUpdk := {SE(P̂j,k , Pj ) ≤ qk }, P 3. NoFalseDets := {for all J α ⊆ [t̂j,f in , tj+1 ), λmax ( α1 t∈J α Φ`ˆt `ˆ0t Φ) ≤ ωevals } 30 4. Γ0,end := {SE(P̂0 , P0 ) ≤ 0.25},  5. Γj,end := Γj−1,end ∩ (Det0 ∩ SubUpd ∩ NoFalseDets) ∪ (Det0 ∩ Det1 ∩ SubUpd ∩ NoFalseDets) . Let p0 denote the probability that, conditioned on Γj−1,end , the change got detected at t = tj,∗ , i.e., let p0 := Pr(Det0|Γj−1,end ). Thus, Pr(Det0|Γj−1,end ) = 1 − p0 . It is not easy to bound p0 . However, as we will see, this will not be needed. Assume that Γj−1,end ∩Det0 holds. Consider the interval J α := [tj,∗ , tj,∗ +α). This interval starts at or after tj , so, for all t in this interval, the subspace has changed. For this interval, Φ = I − P̂j−1 P̂j−1 0 . Applying the first item of Lemma 4.12, w.p. at least 1 − 10n−10 , ! 1 X ˆ ˆ0 λmax Φ`t `t Φ ≥ ωevals α α t∈J and thus t̂j = tj,∗ + α. In other words, Pr(Det1|Γj−1,end ∩ Det0) ≥ 1 − 10n−10 . Conditioned on Γj−1,end ∩ Det0 ∩ Det1, the first SVD step is done at t = t̂j + α = tj,∗ + 2α and the subsequent steps are done every α samples. We can prove Lemma 4.7 with Γj,0 replaced by Γj,end ∩ Det0 ∩ Det1 and Lemma 4.8 with Γj,k−1 replaced by Γj,end ∩ Det0 ∩ Det1 ∩ SubUpd1 ∩ · · · ∩ SubUpdk−1 and with the k-th SVD interval being Jk := [t̂j + (k − 1)α, t̂j + kα). Applying Lemmas 4.7, and 4.8 for each k, we get Pr(SubUpd|Γj−1,end ∩ Det0 ∩ Det1) ≥ (1 − 10n−10 )K+1 . We can also do a similar thing for the case when the change is detected at tj,∗ , i.e. when Det0 holds. In this case, we replace Γj,0 by Γj,end ∩ Det0 and Γj,k by Γj,end ∩ Det0 ∩ SubUpd1 ∩ · · · ∩ SubUpdk−1 and conclude that Pr(SubUpd|Γj−1,end ∩ Det0) ≥ (1 − 10n−10 )K . Finally consider the NoFalseDets event. First, assume that Γj−1,end ∩ Det0 ∩ SubUpd holds. Consider any interval J α ⊆ [t̂j,f in , tj+1 ). In this interval, P̂(t) = P̂j , Φ = I − P̂j P̂j 0 and SE(P̂j , Pj ) ≤ ε. Using the second part of Lemma 4.12 we conclude that w.p. at least 1 − 10n−10 , ! 1 X ˆ ˆ0 λmax Φ`t `t Φ < ωevals α α t∈J t −t −Kα−α Since Det0 holds, t̂j = tj,∗ . Thus, we have a total of b j+1 j,∗α c intervals J α that are subsets of tj+1 −tj,∗ −Kα−α tj+1 −tj −Kα−α tj+1 −tj [t̂j,f in , tj+1 ). Moreover, b c≤b c ≤ b α c − (K + 1) since α ≤ α. Thus, α α Pr(NoFalseDets|Γj−1,end ∩ Det0 ∩ SubUpd) ≥ (1 − 10n−10 )b tj+1 −tj α c−(K) On the other hand, if we condition on Γj−1,end ∩ Det0 ∩ Det1 ∩ SubUpd, then t̂j = tj,∗ + α. Thus, Pr(NoFalseDets|Γj−1,end ∩ Det0 ∩ Det1 ∩ SubUpd) ≥ (1 − 10n−10 )b tj+1 −tj α c−(K+1) We can now combine the above facts to bound Pr(Γj,end |Γj−1,end ). Recall that p0 := Pr(Det0|Γj−1,end ). Clearly, the events (Det0∩SubUpd∩NoFalseDets) and (Det0∩Det1∩SubUpd∩NoFalseDets) are disjoint. 31 Thus, Pr(Γj,end |Γj−1,end ) = p0 Pr(SubUpd ∩ NoFalseDets|Γj−1,end ∩ Det0) + (1 − p0 ) Pr(Det1|Γj−1,end ∩ Det0) Pr(SubUpd ∩ NoFalseDets|Γj−1,end ∩ Det0 ∩ Det1) ≥ p0 (1 − 10n−10 )K (1 − 10n−10 )b tj+1 −tj α c−(K) + (1 − p0 )(1 − 10n−10 )(1 − 10n−10 )K (1 − 10n−10 )b = (1 − 10n−10 )b tj+1 −tj α c tj+1 −tj α c−(K+1) ≥ (1 − 10n−10 )tj+1 −tj . Since the events Γj,end are nested, the above implies that Pr(ΓJ,end |Γ0,end ) = Y Pr(Γj,end |Γj−1,end ) ≥ j Y (1 − 10n−10 )tj+1 −tj = (1 − 10n−10 )d j ≥ 1 − 10dn−10 . A.2 Proof of Offline NORST We now provide the proof of the Offline Algorithm (lines 26-30 of Algorithm 2). Proof of Offline NORST. The proof of this follows from the conclusions of the online counterpart. Note that the subspace estimate in this case is not necessarily r dimensional. This is essentially done to ensure that in the time intervals when the subspace has changed, but has not yet been updated, the output of the algorithm is still an ε-approximate solution to the true subspace. In other words, for t ∈ [t̂j−1 + Kα, tj ], the true subspace is Pj−1 and so in this interval offline SE(P̂(t) , Pj−1 ) = SE([P̂j−1 , (I − P̂j−1 P̂j−1 0 )P̂j ], Pj−1 ) (a) = [I − (I − P̂j−1 P̂j−1 0 )P̂j P̂j 0 (I − P̂j−1 P̂j−1 0 )][I − P̂j−1 P̂j−1 0 ]Pj−1 ≤ [I − (I − P̂j−1 P̂j−1 0 )P̂j P̂j 0 (I − P̂j−1 P̂j−1 0 )] SE(P̂j−1 , Pj−1 ) ≤ ε where (a) follows because for orthogonal matrices P1 and P2 , I − P1 P1 0 − P2 P2 0 = (I − P1 P1 0 )(I − P2 P2 0 ) = (I − P2 P2 0 )(I − P1 P1 0 ) Now consider the interval t ∈ [tj , t̂j + Kα]. In this interval, the true subspace is Pj and we have back propagated the ε-approximate subspace P̂j in this interval. We first note that span([P̂j−1 , (I − P̂j−1 P̂j−1 0 )P̂j ]) = span([P̂j , (I − P̂j P̂j 0 )P̂j−1 ]). And so we use the latter to quantify the error in this interval as offline SE(P̂(t) , Pj ) = SE([P̂j , (I − P̂j P̂j 0 )P̂j−1 ], Pj ) = [I − (I − P̂j P̂j 0 )P̂j−1 P̂j−1 0 (I − P̂j P̂j 0 )][I − P̂j P̂j 0 ]Pj ≤ [I − (I − P̂j P̂j 0 )P̂j−1 P̂j−1 0 (I − P̂j P̂j 0 )] SE(P̂j , Pj ) ≤ ε 32 A.3 Proof with νt 6= 0 In this section we analyze the “stable” version of RST, i.e., we let νt 6= 0. Proof. The proof is very similar to that of the noiseless case but there are two differences due to the additional noise term. The first is the effect of the noise on the sparse recovery step. The approach to address this is straightforward. We note that the error now seen in the sparse recovery step is bounded by kΨ(`t + νt )k and using the bound on kνt k, we observe p that the error only changes by a constant factor. In particular, we can show that ket k ≤ 2.4(2ε + ∆) ηrλ+ . The other crucial difference is in updating subspace estimate. To deal with the additional uncorrelated noise, we use the following result. Remark 4.18 of [25] states the following for the case where the data contains unstructured noise νt 2 + that satisfies the assumptions of Theorem 2.2. Thus, in the notation of [25], λ+ v ≤ cε λ and rv = r. The following result also assumes r, n large enough so that (r + log n) ≤ r log n. Corollary A.2 (Noisy PCA-SDDN). Given data vectors yt := `t + wt + zt = `t + ITt Ms,t `t + zt , t = 1, 2, . . . , α, where Tt is the support set of wt , and `t satisfying the model detailed above. Furthermore, maxt kMs,t P k2 ≤ q < 1. zt is small uncorrelated noise such that E[zt zt 0 ] = Σz , maxt kzt k2 := b2z < ∞. 2 + Define λ+ z := λmax (Σz ) and rz as the “effective rank” of zt such that bz = rz λz . Then for any α ≥ α0 , where   C b2z 2 2 α0 := 2 max ηq f r log n, − f log n λ εSE the fraction of nonzeroes in any row of the noise matrix [w1 , w2 , . . . , wα ] is bounded by b, and √ 0.9εSE − 3 bqf + λ+ z /λ ≤ 1 + εSE P For an α ≥ α0 , let P̂ be the matrix of top r eigenvectors of D := α1 t yt yt0 . With probability at least 1 − 10n−10 , SE(P̂ , P ) ≤ εSE . We illustrate how applying Corollary A.2 changes the subspace update step. Consider the first subspace estimate, i.e., we are trying to get an estimate P̂j,1 in the j-th subspace change time interval. Define (e` )t = ITt 0 (ΨTt 0 ΨTt )−1 ΨTt 0 `t and (eν )t = ITt 0 (ΨTt 0 ΨTt )−1 ΨTt 0 νt . We estimate the new subspace, P̂j,1 Pt̂j +α−1 ˆ ˆ 0 as the top r eigenvectors of 1 `t `t . In the setting above, yt ≡ `ˆt , wt ≡ (e` )t , zt ≡ (eν )t , `t ≡ `t α t=t̂j and Ms,t = − (ΨTt 0 ΨTt )−1 ΨTt 0 and so kMs,t P k = k (ΨTt 0 ΨTt )−1 ΨTt 0 Pj k ≤ φ+ (ε + SE(Pj−1 , Pj )) := q0 . Applying Corollary A.2 with q ≡ q0 , and recalling that the support, Tt satisfies the assumptions similar to that of the noiseless case and hence b0 ≡ max-outlier-frac-rowα . Now, setting εSE,1 = q0 /4, observe that we require p 0.5 · 0.9εSE,1 0.5 · 0.9εSE,1 λ+ z , and, (ii) − ≤ . (i) b0 q0 f ≤ 1 + εSE,1 λ 1 + εSE,1 √ which holds if (i) b0 f ≤ 0.12, and (ii) is satisfied as follows from using the assumptions on νt as follows. − 2 It is immediate to see that λ+ z /λ ≤ ε ≤ .2εSE,1 . Furthermore, the sample complexity term remains unchanged due to the choice of νt . To see this, notice that the only extra term in the α0 expression is b2z f log n/(ε2SE λ− ) which simplifies to ε2 f 2 r log n/ε2SE which is what was required even in the noiseless case. Thus, from Corollary A.2, with probability at least 1 − 10n−10 , SE(P̂j,1 , Pj ) ≤ εSE,1 = q0 /4. The argument in other subspace update stages will require the same changes and follows without any further differences. The final difference is in the subspace detection step. Notice that here too, in general, there will be some extra assumption required to provably detect the subspace change. However, due to the bounds assumed on kνt k and the bounds on using l,v = v,v = 0.01ε, we see that (i) the extra sample complexity term is the same as that required in the noiseless case. 33 B Proof of Lemmas 4.13 and 4.16 Proof of Lemma 4.13. The proof follows from triangle inequality as SE(Q1 , Q3 ) = (I − Q1 Q1 0 )Q3 = (I − Q1 Q1 0 )(I − Q2 Q2 0 + Q2 Q2 0 )Q3 ≤ (I − Q1 Q1 0 )(I − Q2 Q2 0 )Q3 + (I − Q1 Q1 0 )Q2 Q2 0 Q3 ≤ (I − Q1 Q1 0 ) SE(Q2 , Q3 ) + SE(Q1 , Q2 ) Q2 0 Q3 ≤ ∆1 + ∆2 We need the following results for proving Lemma 4.16. Theorem B.1 (Cauchy-Schwartz for sums of matrices [12]). For matrices X and Y we have 1X Xt Yt 0 α t 2 ≤ 1X Xt Xt 0 α t 1X Yt Yt 0 α t (10) The following theorem is adapted from [28]. Theorem B.2 (Matrix Bernstein [28]). Given an α-length sequence of n1 × n2 dimensional random matrices and a r.v. X. Assume the following holds. For all X ∈ C, (i) conditioned on X, the matrices Zt are P P mutually independent, (ii) P(kZt k ≤ R|X) = 1, and (iii) max α1 t E[Zt 0 Zt |X] , α1 t E[Zt Zt 0 |X] ≤ σ 2 . Then, for an  > 0 and for all X ∈ C, !   −α2 1X 1X P Zt ≤ E[Zt |X] +  X ≥ 1 − (n1 + n2 ) exp . (11) α t α t 2 (σ 2 + R) The following theorem is adapted from [29]. Theorem B.3 (Sub-Gaussian Rows [29]). Given an N -length sequence of sub-Gaussian random vectors wi in Rnw , an r.v X, and a set C. Assume the following holds. For all X ∈ C, (i) wi are conditionally independent given X; (ii) the sub-Gaussian norm of wi is bounded by K for all i. Let W := [w1 , w2 , . . . , wN ]0 . Then for an  ∈ (0, 1) and for all X ∈ C      1 1  0 c2 N 0 P W W − E W W |X ≤  X ≥ 1 − 2 exp nw log 9 − . (12) N N 4K 4 Proof of Lemma 4.16. The proof approach is similar to that of [15, Lemma 7.17] but the details are different since we use a simpler subspace model. √ Item 1 : Recall that the (at )i are bounded r.v.’s at are p satisfying |(at )i | ≤ ηλi . Thus, the vectors,p sub-Gaussian with kat kψ2 = maxi k(at )i kψ2 = ηλ+ . We now apply Theorem B.3 with K ≡ ηλ+ ,  = 0 λ− , N ≡ α and nw ≡ r to conclude the following: For an α ≥ α(0) := C(r log 9 + 10 log n)f 2 , ! 1X − 0 ≥ 1 − 10n−10 Pr at at − Λ ≤ 0 λ α t The Lemma statement assumes α = Cf 2 r log n. For large r, n, this α > α(0) = Cf 2 (r + log n). Thus, the above holds under the Lemma statement. Item 2 : For the second term, we proceed as follows. Since kΦk = 1, 1X 1X Φ`t et 0 Φ ≤ Φ`t et 0 . α t α t 34 To bound the RHS above, we will apply Theorem B.2 with Zt = Φ`t et 0 . Conditioned on {P̂∗ , Z}, the Zt ’s are mutually independent. We first bound obtain a bound on the expected value of the time average of the Zt ’s and then compute R and σ 2 . By Cauchy-Schwartz, " 1X E Φ`t et 0 α t 2 # 1X = ΦP ΛP 0 M1,t 0 M2,t 0 α t 2 (a)   1X ΦP ΛP 0 M1,t 0 M1,t P ΛP 0 Φ α t h i (b) 2 ≤ b0 max ΦP ΛP 0 M1,t 0 ≤ 1X M2,t M2,t 0 α t t 2 ≤ b0 SE (P̂ , P )q 2 (λ+ )2 (13) where (a) follows by Cauchy-Schwartz (Theorem B.1) with Xt = ΦP ΛP 0 M1,t 0 and Yt = M2,t , (b) follows from the assumption on M2,t . To compute R kZt k ≤ kΦ`t k ket k ≤ SE(P̂ , P )qηrλ+ := R Next we compute σ 2 . Since wt ’s are bounded r.v.’s, we have  1X 1X  1 E[Zt Zt 0 ] = E Φ`t et 0 et `t 0 Φ = E[ket k2 Φ`t `t 0 Φ] α t α t α    1X  2 E Φ`t `t 0 Φ ≤ max ket k et α t ≤ q 2 SE2 (P̂ , P )ηr(λ+ )2 · := σ 2 it can also be seen that 1 α P Pr 0Z ] t evaluates to the same expression. Thus, applying Theorem B.2 ! p 1X Φ`t et 0 ≤ SE(P̂ , P ) b0 qλ+ +  α t   −α n o . ≥ 1 − 2n exp  σ2 R 4 max 2 ,  t E[Zt Let  = 1 λ− , then, σ 2 /2 = cηf 2 r and R/ = cηf r. Hence, for the probability to be of the form 1 − 2n−10 we require that α ≥ α(1) := C · ηf 2 (r log n). Item 3 : We use Theorem B.2 with Zt := Φet et 0 Φ. The proof is analogous to the previous item. First we bound the norm of the expectation of the time average of Zt :  X  1X 1 0 E Φet et Φ = ΦM2,t M1,t P ΛP 0 M1,t 0 M2,t 0 Φ α α 1X ≤ M2,t M1,t P ΛP 0 M1,t 0 M2,t 0 α ! h i 1/2 (a) 1X 0 0 0 2 ≤ M2,t M2,t max M2,t M1,t P ΛP M1,t (·) t α t i p (b) p h ≤ b0 max M1,t P ΛP 0 M1,t 0 M2,t 0 ≤ b0 q 2 λ+ t 35 where (a) follows from Theorem B.1 with Xt = M2,t and Yt = M1,t P ΛP 0 M1,t 0 M2,t 0 and (b) follows from the assumption on M2,t . To obtain R, kZt k = Φet et 0 Φ ≤ max kΦMt P at k2 ≤ q 2 rηλ+ := R t To obtain σ 2 , i  1X  1X h E Φet (Φet )0 (Φet )et 0 Φ = E Φet et 0 Φ kΦet k2 α t α t   2 ΦMt P ΛP 0 Mt 0 Φ ≤ max kΦet k et 2 ≤ q rηλ+ · q 2 λ+ := σ 2 Applying Theorem B.2, we have Pr !   p 1X −α2 0 2 + Φet et Φ ≤ b0 q λ +  ≥ 1 − n exp α t 2(σ 2 + R) Letting  = 2 λ− we get R/ = cηrf and σ 2 /2 = cηrf 2 . For the success probability to be of the form 1 − 2n−10 we require α ≥ α(2) := Cη · 11f 2 (r log n). The proof of the last two items follow from using [25, Lemma 7.19]. C Proof of Extensions In this section we present the proof of the extensions stated in Sec. 5. C.1 Static Robust PCA The proof follows directly from Theorem 2.2 by setting J = 1. C.2 Subspace Tracking with missing data and dynamic Matrix Completion Here we present the proof of the subspace tracking with missing data problem. The only changes needed for this proof are in the initialization step, i.e., for j = 0. For this we use the following lemma. Lemma C.1 (Lemma 2.1, [33]). Set r̄ = max(r, log n). Then there  exist constants C and c such  that 2 the random orthogonal model with left singular vectors P̂init obeys Pr maxi Ii 0 P̂init ≤ C r̄/n ≥ 1 − cn−β log n. Thus,  2 0 Pr max Ii P̂init i  ≤ µr̄/n ≥ 1 − n−10 Consider the two scenarios (i) if r ≥ log n, then everything discussed before remains true, whereas, if (ii) 0.01 r ≤ log n, we redefine µ2 = C log n/r and thus in the interval [t0 , t1 ] we require max-outlier-frac-col ≤ log n. Further, using the bound on max-outlier-frac-col it follows from triangle inequality that max IT 0 P̂init T ≤2s 2 ≤ 2s max Ii 0 P̂init i 36 2 ≤ 2sµr < 0.01 n We only mention the changes needed for Lemma 4.7 for when j = 0 since the initialization is different. The rest of the argument of recursively applying the lemmas hold exactly as before. First, ttrain = 1 since we use random initialization. Thus from the Algorithm, t̂0 = ttrain = 1. Proof. Proof of item 1. Since the support of xt is known, the LS step gives −1 −1 x̂t = ITt ΨTt 0 ΨTt ΨTt 0 (Ψ`t + Ψxt ) = ITt ΨTt 0 ΨTt ITt 0 Ψ`t + xt Thus et = x̂t − xt satisfies et = ITt ΨTt 0 ΨTt −1 ITt 0 Ψ`t Now, from the incoherence assumption on P̂init , Lemma 4.11, the bound on max-outlier-frac-col, and recalling that in this interval, Ψ = I − P̂init P̂init 0 we have 2sµr ≤ 0.09 =⇒ δ2s (Ψ) ≤ 0.32 < 0.15, n 1 1 1 ≤ ≤ < 1.2 = φ+ . ≤ 1 − δs (Ψ) 1 − δ2s (Ψ) 1 − 0.15 max IT 0 P̂init |T |≤2s Ψ Tt 0 Ψ Tt −1 2 ≤ Secondly, ITt 0 ΨP0 ≤  ITt 0 P0 + ITt 0 P̂init  ≤ 0.3 + 0.3 = 0.6 (14) p Thus, kITt 0 Ψ`t k ≤ 0.6 ηrλ+ . Proof of Item 2 : Since `ˆt = `t − et with et satisfying the above equation, updating P̂(t) from the `ˆt ’s is a problem of PCA in sparse data-dependent noise (SDDN), et . To analyze this, we use the PCA-SDDN result of Theorem 4.14 (this is taken from [25]). Recall from above that, for t ∈ [t̂0 , t̂0 + α], T̂t = Tt , and `ˆt = `t − et . Recall from the algorithm that we compute the first estimate of the j-th subspace, P̂j,1 , Pt0 +α−1 ˆ ˆ 0 as the top r eigenvectors of α1 t=t `t `t . In the notation of Theorem 4.14, yt ≡ `ˆt , wt ≡ et , `t ≡ `t 0 −1 0 0 and Ms,t = − (ΨTt ΨTt ) ΨTt and so kMs,t P k = k (ΨTt 0 ΨTt )−1 ΨTt 0 P0 k ≤ φ+ · 0.6 = 0.72 := q0 . This follows using (14). Also, b0 ≡ max-outlier-frac-rowα . Applying Theorem 4.14 with q ≡ q0 , b0 ≡ max-outlier-frac-rowα and setting εSE = q0 /4, observe that we require p 0.9(q0 /4) b0 q0 f ≤ . 1 + (q0 /4) √ This holds if b0 f ≤ 0.12 as provided by Theorem 2.2. Thus, from Corollary 4.14, with probability at least 1 − 10n−10 , SE(P̂j,1 , P0 ) ≤ q0 /4. C.3 Fewer than r directions change Proof of Corollary 5.20. The proof is very similar to that of Theorem 2.2. The only changes occur  in the    at,fix (a) Projected CS step. With the subspace change model, we define `t = P(t) at := Pj−1,fix Pj,chd at,chd where at,fix is a (r − rch ) × 1 dimensional vector and at,chd is a rch × 1 dimensional vector. In the first α frames after the j-th subspace changes (or, the j-th subspace change is detected in the automatic case), recall that P̂(t) = P̂j−1 . Thus, SE(P̂(t) , Pj−1,fix ) = SE(P̂j−1 , Pj−1,fix ) ≤ SE(P̂j−1 , Pj−1 ) ≤ ε and so, the error can be bounded as q p kΨ`t k ≤ kΨPj−1,fix at,fix k + kΨPj,chd at,chd k ≤ ε η(r − rch )λ+ + (ε + SE(Pj−1 , Pj )) ηrch λ+ ch 37 In the second α frames, have P̂(t) = basis(P̂j−1 , P̂j,1 ). Thus SE(P̂(t) , Pj−1,fix ) ≤ SE(P̂j−1 , Pj−1,fix ) ≤ SE(P̂j−1 , Pj−1 ) ≤ ε and SE(P̂(t) , Pj,chd ) ≤ SE(P̂j,1 , Pj,chd ) ≤ SE(P̂j,1 , Pj ) ≤ 0.3 · (ε + SE(Pj−1 , Pj )). Thus, the error in the sparse recovery step in the interval after the first subspace update is performed is given as q p kΨ`t k ≤ ε η(r − rch )λ+ + 0.3 · (ε + SE(Pj−1 , Pj )) ηrch λ+ ch The rest of the proof follows as before. The error after the k-th subspace update is also bounded using the above idea. (b) Subspace Detection step: The proof of the subspace detection step follows exactly analogous to Lemma 4.12. One minor observation is noting that SE(Pj−1 , PJ ) = SE(Pj−1,ch , Pj,chd ) in the proof of part (a) of Lemma 4.12. The rest of the argument is exactly the same. 38
7cs.IT
Private and Secure Coordination of Match-Making for Heavy-Duty Vehicle Platooning ? Farhad Farokhi ∗ Iman Shames ∗ Karl H. Johansson ∗∗ ∗ arXiv:1702.08582v1 [cs.SY] 28 Feb 2017 Department of Electrical and Electronic Engineering, University of Melbourne, Parkville, VIC 3010, Australia (e-mails: {ffarokhi,ishames}@unimelb.edu.au) ∗∗ ACCESS Linnaeus Center, School of Electrical Engineering, KTH Royal Institute of Technology, SE-100 44 Stockholm, Sweden (e-mail: [email protected]) Abstract: A secure and private framework for inter-agent communication and coordination is developed. This allows an agent, in our case a fleet owner, to ask questions or submit queries in an encrypted fashion using semi-homomorphic encryption. The submitted query can be about the interest of the other fleet owners for using a road at a specific time of the day, for instance, for the purpose of collaborative vehicle platooning. The other agents can then provide appropriate responses without knowing the content of the questions or the queries. Strong privacy and security guarantees are provided for the agent who is submitting the queries. It is also shown that the amount of the information that this agent can extract from the other agent is bounded. In fact, with submitting one query, a sophisticated agent can at most extract the answer to two queries. This secure communication platform is used subsequently to develop a distributed coordination mechanisms among fleet owners. Keywords: Privacy; Security; Coordination; Homomorphic Encryption; Vehicle Platooning. 1. INTRODUCTION The advances in communication technology has created new opportunities regarding shared economy. An example is collaborative driving, such as heavy-duty vehicle platooning or ride sharing, with the aim of reducing costs or carbon footprint of commuters or fleets (Besselink et al., 2016). This has motivated studies for creating appropriate incentives for the fleet owners to collaborate (Farokhi et al., 2015). Although promising, heavy-duty vehicle platooning has not yet been adopted by the larger population of vehicles. Beside technological and legal barriers, this could be partly motivated by that commercial, often competing, entities are unwilling to share their entire private data, e.g., the routes of their vehicles and their travel times, with each other even if doing so results in lower operative costs. This could be because of privacy constraints by the customers or secretive nature of marketing agencies. Therefore, it is of interest to create private and secure match-making services for effective coordination among competing entities to facilitate these new technologies. It goes without saying that the use for such services is not limited to vehicle platooning and can be justified in many other setups, such as ride sharing, collaborative logistics, energy markets, and even online dating services. ? The work of F. Farokhi was supported by a McKenzie Fellowship and an Early Career Grant from Melbourne School of Engineering. The work of K. H. Johansson was supported by Knut och Alice Wallenbergs Foundation (KAW), Swedish Foundation for Strategic Research (SSF), and Swedish Research Council (VR). Following this motivation, in this paper, we create a secure and private framework for communication between two agents, fleet owners within the context of the heavy-duty vehicle platooning. In the presented framework, it is possible for an agent to ask a question or submit a simple query regarding the interest of the other agents about using a road at a specific time of the day (for forming platoons) in an encrypted fashion. This is done in such a way that the other agents can provide their responses without knowing the content of the questions or the queries. The framework is developed with the aid of semi-homomorphic encryption, which allows algebraic manipulation of the plain data without the need for decryption using appropriate computations over the encrypted data; see, e.g., (Yi et al., 2014a) about homomorphic encryption. This category of encryption techniques makes it possible for the second agent (i.e., the fleet owner receiving the encrypted question) to respond to it using appropriate manipulations of the encrypted data. Strong privacy and security guarantees are provided for the agent who submits the query. It is also shown that the amount of the information that the questioning agent can extract from all the other agents is bounded (in fact with one question a fleet owner can at most extract the answer to two questions about the interests of the other fleet owners, which could be negligible in comparison to the number of possible questions). This secure communication platform is used subsequently to develop distributed coordination mechanisms for heavyduty vehicle platooning. Note that although the platform is developed in the context of match-making for heavy- duty vehicle platooning, the outcomes are more general and can be readily used in other examples as well (specifically if the questions or the queries are regarding selecting an element of a finite discrete set). This paper is in essence close to the problem of private searching on streaming data (Ostrovsky and Skeith, 2007; Yi and Bertino, 2011; Yi et al., 2014b; Boneh and Waters, 2007), where it is of interest to determine if certain important keywords are used within private encrypted messages, such as text messages and e-mails, while the content of the messages itself is not of special interest (at least not if the keywords are not utilized). However, it should be noted that the privacy guarantees of those studies are one sided (with the aim of protecting the privacy of the messages). However, in this paper, we would like to provided guarantees to both sides, i.e., both the agents posing the question and the ones responding to it. Recently, homomorphic encryption have been utilized to solve security and privacy issues in networked control and estimation (Farokhi et al., 2016; Kogiso and Fujita, 2015). Those studies are however involved with the intricacies of dynamical systems and using encryption for closing the control loop rather than creating a private/secure communication framework among multiple (possibly competing) agents. Further, they do not provide two-sided privacy guarantees (as it is not of special interest to preserve the privacy of a malicious agent if it communicates with the controller). The rest of the paper is organized as follows. First, the problem formulation and some necessary background material are presented in Section 2. A secure and private communication framework between two agents is provided in Section 3. Section 4 uses the framework to construct a distributed mechanism for coordination among several fleet owners. Finally, numerical examples are presented in Section 5 and the paper is concluded in Section 6. 2. PROBLEM FORMULATION In this paper, the problem formulation and the results are provided within the context of coordination among fleet owners for heavy-duty vehicle platooning. However, the results can be readily used in other classes of problems involving match-making and coordination, such as ride sharing and electricity markets. Investigating the platooning coordination problem allows us to pose concrete questions and provide meaningful privacy and security guarantees. Consider the case with F fleet owners, each owning Ii , i ∈ F := {1, . . . , F }, heavy-duty vehicles. These vehicles can operate over various roads on a transportation network in set P (based on the requests of the customers of the fleet owners) and at various time intervals of the day (based on logistical constraints and customer preferences) in set T such that |T | < ∞. Here, we discretize the time of the day (e.g., half an hour windows of the day) so that the number of time windows of interest is finite. We use the set of integers W := {1, . . . , |P||T |} to refer to all the possible combinations of roads and time windows (in which a fleet owner might be interested or one of its heavy-duty vehicles might be operating) captured by the entries of the product set P × T . In fact, it can be said that the set W is isomorph to the set P × T . Our goal is to develop a secure and private communication framework for the fleet owners to identify potential heavy-duty vehicles that can form platoons. This is clearly possible if the fleet owners exchange the time and the roads over which all their heavyduty vehicles operate; however, that would violate the privacy of the customers and the fleet owners (possibly jeopardizing their competitive advantages). Therefore, we would like to create a communication platform so that the fleet owners can only enquire about each other’s interests and logistical constraints under strict privacy constraints. In fact, we show that the enquiring fleet owner does not leak any private information (i.e., the other fleet owners cannot realize the road and the time window of interest of the enquiring fleet owner). In addition, we show that even with most sophisticated manoeuvres the enquiring fleet owner can only extract information on the interests of the other fleet owners about at most two pairs of roads and time windows (which considering the sheer number of roads and time windows is negligible). To do so, we use the Paillier’s encryption method, which is a semi-homomorphic encryption technique. The encryption method is introduced in the following subsection. 2.1 Background Material In this subsection, the Paillier’s encryption technique is briefly introduced (Paillier, 1999). The method (or rather its security) relies on the Decisional Composite Residuosity Assumption, i.e., for given integers N ∈ Z and x ∈ ZN 2 , it is “hard” to decide whether there exists y ∈ ZN 2 such that x ≡ y N mod N . Here, the notation ZN denotes the set of integers modulo N for all N ∈ N. More information regarding the assumption can be found in (Paillier, 1999; Yi et al., 2014a). The encryption scheme is as follows. First the public and private keys are generated. To do so, large prime numbers p and q are selected randomly and independently of each other such that gcd(pq, (1 − p)(1 − q)) = 1, where gcd(a, b) refers to the greatest common divisor of a and b. The public key (which is shared with all the parties and is used for encryption) is N = pq. The private key (which is only available to the entity that needs to decrypt the data) is (λ, µ) with λ = lcm(p−1, q−1) and µ = λ−1 mod N , where lcm(a, b) is the least common multiple of a and b. The ciphertext of a plain message t ∈ ZN can be constructed using E(t; r) = (N + 1)t rN mod N 2 , where r is randomly selected with uniform probability from Z∗N := {x ∈ ZN | gcd(x, N ) = 1}. Finally, to decrypt any ciphertext c ∈ ZN 2 , we may use D(c) = L(cλ mod N 2 )µ mod N , where L(x) = (x − 1)/N . The correctness of the Paillier’s encryption technique implies that D(E(t; r)) = t for all r ∈ Z∗N and all t ∈ ZN (Paillier, 1999). The following important property shows that the Paillier’s encryption is a semi-homomorphic encryption scheme, i.e., algebraic manipulation of the plain data is possible without the need for decryption using appropriate computations over the encrypted data. Proposition 1. The following identities hold: (1) For all r, r0 ∈ Z∗N and t, t0 ∈ ZN such that t + t0 ∈ ZN , E(t; r)E(t0 ; r0 ) mod N 2 = E(t + t0 ; rr0 ); (2) For all r ∈ Z∗N and t, t0 ∈ ZN such that tt0 ∈ ZN , 0 0 E(t; r)t mod N 2 = E(t0 t; rt ). Algorithm 1 Procedure SubmitQuery for the first fleet owner. 1: procedure SubmitQuery(w) 2: # Computed by the first fleet owner 3: for i ∈ W do 4: if i = w then 5: xi ← E(1; ri ) 6: else 7: xi ← E(0; ri ) 8: end if 9: end for 10: return x 11: end procedure Proof. The proof follows from simple algebraic manipulations and can be found in (Paillier, 1999).  Proposition 1 shows that summation and multiplication can be performed on the encrypted data. This is used subsequently for creating a secure and private method for coordination between fleet owners for heavy-duty vehicle platooning. 3. SECURE AND PRIVATE COMMUNICATION FRAMEWORK In this section, we restrict ourselves to two fleet owners. We subsequently generalize the setup to develop a distributed coordination mechanism. Let us assume that the first fleet owner would like to know if the second fleet owner has any heavy-duty vehicle that uses the path and the time of the day associated with w ∈ W. However, it does not wish to let the second fleet owner to know w perhaps due to the competitive nature of the fleet owners or the privacy constraints imposed by the end user. Therefore, the first fleet owner construct an encrypted vector x ∈ Z|W| such that the i-th element of x is given by  E(1; ri ), i = w, xi = E(0; ri ), otherwise. Note that the presence of the random element ri ensures that with a high probability cyphertexts associated with 0 are different 1 . Then the first fleet owner transmits x to the second fleet owner. The second fleet owner computes the set W ⊆ W as the set of all w0 ∈ W with which at least one of its heavy-duty vehicles is associated. The second fleet owner then computes  Y  v y= xj j mod N 2 mod N 2 , j∈W where vj is randomly selected from the set {1, . . . , N − 1} with a uniform probability. We summarize the procedures of the first and the second fleet owner in Algorithms 1 and 2. We can prove the following useful result pointing to the correctness of our proposed methodology. Proposition 2. If the first and the second fleet owner, respectively, use Algorithms 1 and 2, then D(y) 6= 0 if any of the heavy-duty vehicles owned by the second fleet 1 In fact, for industry standards that assume both q and q are of the order of 1024 bits, we have N = O(22048 ). Thus the probability of selecting the same r twice even in a vector of millions of elements is smaller than 10−1000 , which is practically zero. Algorithm 2 Procedure ReturnResponse for the first fleet owner. 1: procedure SubmitQuery(x,W) 2: # Computed by the second fleet owner 3: y←1 4: for i ∈ W do 5: Select vi randomly from {1, . . . , N − 1} 6: y ← y(xvi i mod N 2 ) mod N 2 7: end for 8: return y 9: end procedure owner uses the path and time window associated with w and D(y) = 0 otherwise. Proof. The proof follows from the construction of the vector x and the application of Proposition 1.  To be able to assess the security and privacy of the proposed method from the perspective of the first fleet owner, we present the following definition. This notion is derived from what is known in the encryption literature as semantic security. To present this definition, we need to define the notion of negligible functions. A function f : N → R≥0 is called negligible if, for any c ∈ N, there exists nc ∈ N such that f (n) ≤ 1/nc for all n ≥ nc (Ostrovsky and Skeith, 2007). Definition 1. Let the second fleet owner propose w1 , w2 ∈ W. The first fleet owner chooses at random w from {w1 , w2 } with equal probability and sends x constructed using Algorithm 1. The second fleet owner can based on its knowledge of x guess w. This guess is denoted by w0 . The second fleet owner’s advantage 2 is given by Adv(k) := |P{w = w0 }−1/2|, where k denotes the security parameter, e.g., min(p, q) in the Paillier’s technique. The proposed strategy is defined to be secure and private if Adv is negligible. Definition 1, although long and cumbersome, says that the proposed strategy is secure and private if, essentially, the performance of the second fleet owner in guessing the first fleet owner’s preference w is not better than a pure random number generator. Proposition 3. Under the Decisional Composite Residuosity Assumption, Algorithm 1 is secure and private in the sense of Definition 1. Proof. The proof follows from the application of the results of (Paillier, 1999).  Unfortunately, the privacy and security guarantees are weaker for the second fleet owner. This is because by definition if the first and the second fleet owner, respectively, use Algorithms 1 and 2, the first fleet owner can successfully determine if the second fleet owner is in possession of any heavy-duty vehicles that operate on the path and in the time window associated with w (therefore some private information is leaked even in the best of situations). However, one might be able to argue that the first fleet owner can potentially extract more information by not following Algorithm 1. This is in fact true (pointing to 2 The advantage refers to its superior performance to that of a “dart throwing monkey.” a deeper erosion of privacy). However, in what follows, we prove that the amount of information the first fleet owner can optimally extract is limited (with the bound being extremely small). Assume that the first fleet owner does not use Algorithm 1. Instead, it constructs the vector x such that xi = E(x̃i ; ri ) for some integer x̃i ∈ ZN . We can prove the following lemma. Lemma 1. If, for all i, xi = E(x̃i ; ri ) for some integer x̃i ∈ ZN , then  X  D(y) = x̃i vi zi mod N, (1) w∈W where zi = 1 if any of the heavy-duty vehicles owned by the second fleet owner uses the path and the time window associated with i ∈ W and zi otherwise. Proof. The proof follows from the construction of the vector x, x̃i , ∀i, and the application of Proposition 1.  Following P Lemma 1, the first fleet owner needs to solve D(y) = w∈W x̃i vi zi mod N to find zi for all i. Note that the first fleet owner can introduce the change of variable ξi = vi zP i and instead solve the linear equation modulo D(y) = w∈W x̃i ξi mod N . Evidently, zi = 1 if ξi 6= 0 and zi = 0 otherwise. Let us form the set ( )  X  |W| Ξ := ξ ∈ ZN D(y) = x̃i ξi mod N , (2) w∈W which represents the set ofPall solutions of the linear equation modulo D(y) = w∈W x̃i ξi mod N . We can prove the following useful result. Proposition 4. Let t = |{i | x̃i 6= 0}| > 1. Then |Ξ| ≥ (N − 1)t−1 if there exists i such that gcd(x̃i , N ) = 1. Proof. For i such that gcd(x̃i , N ) = 1, there exists x̃−1 i mod N . Thus we get   X ξi = D(y) − x̃−1 x̃ ξ j j mod N. i j6=i Therefore, all (ξj )j6=i are free variables, i.e., for any selection of (ξj )j6=i , there exists P ξi that satisfies the linear equation modulo D(y) = w∈W x̃i ξi mod N . This points to that the number of solutions of the linear equation modulo (which is equal to |Ξ|) is equal to the number of all the possible choices of (ξj )j6=i .  This shows that even if only two x̃iPare non-zero, the number of possible solutions of D(y) = w∈W x̃i ξi mod N , i.e., |Ξ|, is larger than N − 1. The situation worsens as more x̃i become non-zero because t (the number of the non-zero elements) appear as an exponent. Noting that the encryption relies on N being extremely large 3 , the first fleet owner needs to check a huge number of possible solutions, which is numerically impractical. Proposition 5. Let t = |{i | x̃i 6= 0}| > 2. Then |Ξ| ≥ 2(N −1)t−2 if there does not exist i such that gcd(x̃i , N ) = 1. Proof. If there does not exist i such that gcd(x̃i , N ) = 1, we can construct two sets where in the first one x̃i is divisible by q and in the second one x̃i is divisible by p 3 Routinely, p, q are selected as prime numbers with the length of 1024 bits pointing to that N = O(22048 ). (note that x̃i cannot be divisible by both as otherwise it will be larger than lcm(p, q) = pq = N ). Let the sets be denoted by J1 and J2 , respectively. In this case, we can write  X    X   x̃j x̃j ξj D(y) = q ξj +p mod N. q p j∈J1 j∈J 2 | {z } | {z } x̃0j x̃0j Noting that gcd(p, q) = 1 (since p and q are prime numbers), this equation can be separated into X ξj x̃0j mod N, (3a) α= j∈J1 β= X ξj x̃0j mod N, (3b) j∈J2 where α = D(y)ᾱ and β = D(y)β̄ with ᾱ and β̄ denoting Bézout coefficients, i.e., ᾱq + β̄p = 1. There are only two Bézout coefficients that satisfy |ᾱ| < p and |β̄| < q (Vialar, 2015, Proposition 13, p. 60). The number of the solutions of (3a) can be lower bounded with the same line of reasoning as in Proposition 4 by (N − 1)|J1 |−1 . Similarly, the number of the solutions of (3b) can be lower bounded by (N − 1)|J2 |−1 . This concludes the proof.  Proposition 5 shows that, by smart planning and sophisticated manoeuvres, the first fleet owner can realize if the second fleet owner has any heavy-duty vehicles on the roads and the time windows associated with two entries of W instead of one by following Algorithm 1. Assuming that |W| is large, this might not matter in practice. Remark 1. (Computational Complexity). Before moving to more complex communication structures, the computational complexity of the proposed algorithms should be discussed. Algorithm 1 involves |W| encryption operations. Each encryption operation has a cost that is a (nonlinear) function of N . Noting that the size of N is often a constant set by standards of the industry, the cost of the encryption is also constant (albeit a large one). Therefore, the computational complexity of Algorithm 1 is O(|W|). Algorithm 2, on the other hand, involves |W| ≤ maxi Ii exponentiations and multiplications. Therefore, the computational complexity of Algorithm 2 is O(maxi Ii ). Therefore, the total computational complexity of Algorithms 1 and 2 is O(|W|) because, in practice, maxi Ii  |W|. Finally, since the first fleet owner needs to submit O(maxi Ii ) questions or queries to solve the platooning coordination problem, the computational complexity of the whole task is O(|W| maxi Ii ). 4. DISTRIBUTED COORDINATION Now, we use the results of the previous section to develop a distributed mechanism for the fleet owners to coordinate their efforts. Let the undirected graph G with the vertex set F (i.e., the vertices are the fleet owners) and the edge set E ⊆ F × F capture the communication structure among the agents. A walk over G (not to be mistaken with roads over which the heavy-duty vehicles travel on real transportation network) is a sequence of (not necessarily unique) vertices L = (v0 , . . . , vk ) such that (vi , vi+1 ) ∈ E for all 0 ≤ i ≤ k − 1. A k-connected graph is a graph that after removing any k vertices (and all the edges connected Algorithm 3 Procedure DistResponse for the fleet owners in the walk L responding to the query of the fleet owner ` distributedly. 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: procedure DistResponse(x,L,(Wj )j∈L\{`} ) # Computed by the fleet owners in L except i for j = v1 , . . . , vk−1 do for i ∈ W j do Select ωi randomly in {1, . . . , bN/(|L|−2)c} 2 i xi ← xω i mod N end for end for y←1 for i ∈ W vk do Select ωi randomly in {1, . . . , bN/(|L| − 2)c} 2 2 i y ← y(xω i mod N ) mod N end for return y end procedure focus on the privacy guarantees of the other fleet owners in L \ {`}. Now, we can prove the following lemma. Lemma 2. If, for all i, xi = E(x̃i ; ri ) for some integer x̃i ∈ ZN , then  X  X  D(y) = x̃i vi zij mod N, (4) w∈W = 1 if any of the heavy-duty vehicles owned by where fleet owner j ∈ L \ {`} uses the path and the time window associated with i ∈ W and zij = 0 otherwise. Proof. The proof is similar to that of Lemma 1. Assumption 1 states that even if one of the fleet owners is removed, all the remaining ones can still communicate with each other successfully. This allows us to develop an algorithm for the fleet owners to collaboratively respond to queries by avoiding communication with fleet owners that have submitted the queries. Let us consider the case where fleet owner ` ∈ F would like to find out if there exists any other fleet owner such that one of its heavy-duty vehicles operate over the path and the time window associated with w ∈ W. Further, let there be a walk L = (v0 , . . . , vk ) over G such that v0 = vk = ` (therefore the walk is a loop) while vj 6= ` for all 1 ≤ j ≤ k − 1. Existence of such a walk is guaranteed by Assumption 1. Similar, to the previous section, fleet owner i can follow Algorithm 1 to construct the vector x, thus submitting an encrypted query for coordination. After that all the other fleet owners in the walk L can follow the procedure in Algorithm 3 to respond to the query of fleet owner `. In this algorithm, Wj ⊆ W denotes the set of all w ∈ W with which at least one of its heavy-duty vehicles of fleet owner j ∈ F is associated. The following proposition shows that if fleet owner ` uses Algorithm 1 and all the fleet owners in L\{`} use Algorithm 3, the provided response is correct. Proposition 6. If fleet owner ` uses Algorithm 1 and all the fleet owners in L \ {`} use Algorithm 3, then D(y) 6= 0 if any of the heavy-duty vehicles owned by the fleet owner in L \ {`} uses the path and time window associated with w, and D(y) = 0 otherwise. Proof. The proof follows from the application of Proposition 1.  Note that, if fleet owner ` is interested in figuring out the possibility of forming a platoon with all the other fleet owners (and not a select few), it should find a walk L that spans all the vertices of the graph. A similar result as in Proposition 3 can be proved for the enquiring fleet owner in this case as well. Therefore, we  Similarly, following Lemma 2, the enquiring fleet owner ` must solve the linear equation modulo  X X  D(y) = x̃i ξij mod N, w∈W j∈L\{`} 6= 0 and zij = 0 otherwise. Let us = 1 if where construct the set of all possibilities  |W|(|L|−2) Ξ := (ξij )j∈L\{`} ∈ ZN  X X   j D(y) = x̃i ξi mod N . (5) zij to those vertices) is still a connected graph. We make the following standing assumption. Assumption 1. G is 2-connected. j∈L\{`} zij ξij w∈W j∈L\{`} We can prove the following useful result regarding the size of the set Ξ. Proposition 7. The following two statements hold: • Let t = |{i | x̃i 6= 0}| > 1. Then |Ξ| ≥ (|L| − 2)(N − 1)t−1 if there exists i such that gcd(x̃i , N ) = 1. • Let t = |{i | x̃i 6= 0}| > 2. Then |Ξ| ≥ 2(|L| − 2)2 (N − 1)t−2 if there does not exist i such that gcd(x̃i , N ) = 1. Proof. The proof follows a similar line of reasoning as in Propositions 4 and 5. This proposition shows that the privacy guarantees of the fleet owners of the walk is stronger than those in the case of two agents as the responses of all the agents gets mixed. Therefore, even if the fleet owner can extract the aggregate answers to two questions, it would not know which one of the fleet owners from the set L \ {`} has responded positively. In practice, however, when the fleet owners show up for forming a platoon the set of all possibilities gets further narrowed down. 5. NUMERICAL EXAMPLE In this section, we review some practical aspects of the developed framework. Specifically, we review the computation time and the communication burden associated with executing the proposed algorithms. Let us consider an example, where two fleet owners need to coordinate their efforts for organizing heavy-duty vehicle platoons. Assume that there are |P| = 10 roads and time of the day is discretized into |T | = 24 one-hour windows. Therefore, |W| = 240. The second fleet owner has heavy-duty vehicles on roads and time windows associated with w = 1, 6, 21, 50. Figure 1 illustrates the outcome of Algorithms 1 and 2 for various queries submitted by computational complexity grows polynomially with the key length (the linear appearance is due to the logarithmic scaling of both axes in Figure 2). In fact, upon fitting an appropriate curve, we get that the computational time (in sec) grows as O(k 2.44 ) with k denoting the key length. On the other hand, the computational burden is a linear function of the key length (the slope of the line in Figure 2 is equal to one) as the size of the integers that needs to be transmitted grows linearly with the key length. D(y) > 0 1 6. CONCLUSIONS AND FUTURE WORK 0 16 21 50 w Fig. 1. The outcome of Algorithms 1 and 2 for various w. 2 15 A secure and private framework for communication between two fleet owners was proposed. This secure communication platform was generalized to create distributed coordination mechanisms among fleet owners for heavy-duty vehicle platooning. The future work will focus on developing a centralized coordination mechanism for reducing the computational complexity or outsourcing burden to cloud computing services as well as the application of the framework to other services. 64 Computation Time (sec) 1 hour 2 10 16 1 min 25 4 20 1 2-5 16 32 64 129 256 512 Communication Complexity (KBytes) REFERENCES 1024 Key Length (bits) Fig. 2. The computation time ( ) and the communication burden ( × ) associated with executing Algorithms 1 and 2 versus the key length. the first fleet owner with a key length of 128 bits. The vertical axis of Figure 1 is equal to one if D(y) > 0 and is equal to zero otherwise. Evidently, D(y) > 0 for only w = 1, 6, 21, 50. Therefore, as expected, upon following the proposed algorithms, the second fleet owner can correctly respond to the query of the first fleet owner without even knowing the content of the query. However, this secure communication channel comes at a price. Figure 2 shows the computation time and the communication burden associated with executing Algorithms 1 and 2 versus the key length, measured in bits. The computation is done with Python programming language on Windows 7 over a PC with Intel(R) i7-4770 CPU at 3.40GHz and 16GB of RAM. The computation time rapidly increases with increasing the key length. The amount of data the fleet owners need to communicate also increases with the key length. Note that the security of the encryption is related to the key length. In fact, the computational complexity of a brute-force attack that requires the test of all the keys of a specific length grows exponentially with the key length. Note that the Besselink, B., Turri, V., van de Hoef, S.H., Liang, K.Y., Alam, A., Mrtensson, J., and Johansson, K.H. (2016). Cyber-physical control of road freight transport. Proceedings of the IEEE, 104(5), 1128–1141. Boneh, D. and Waters, B. (2007). Conjunctive, subset, and range queries on encrypted data. In S.P. Vadhan (ed.), Theory of Cryptography: 4th Theory of Cryptography Conference, TCC 2007, Amsterdam, The Netherlands, February 21-24, 2007. Proceedings, 535–554. Springer Berlin Heidelberg, Berlin, Heidelberg. Farokhi, F., Shames, I., and Batterham, N. (2016). Secure and private cloud-based control using semihomomorphic encryption. In Proceedings of the 6th IFAC Workshop on Distributed Estimation and Control in Networked Systems. Farokhi, F., Liang, K.Y., and Johansson, K.H. (2015). Cooperation patterns between fleet owners for transport assignments. In Proceedings of the IEEE Conference on Control Applications, 1124–1129. IEEE. Kogiso, K. and Fujita, T. (2015). Cyber-security enhancement of networked control systems using homomorphic encryption. In Proceedings of the 54th IEEE Conference on Decision and Control, 6836–6843. Ostrovsky, R. and Skeith, E.W. (2007). Private searching on streaming data. Journal of Cryptology, 20(4), 397– 430. Paillier, P. (1999). Public-key cryptosystems based on composite degree residuosity classes. In J. Stern (ed.), Advances in Cryptology — EUROCRYPT ’99: International Conference on the Theory and Application of Cryptographic Techniques Prague, Czech Republic, May 2–6, 1999 Proceedings, 223–238. Springer Berlin Heidelberg, Berlin, Heidelberg. Vialar, T. (2015). Handbook of mathematics. Books on Demand. Yi, X., Paulet, R., and Bertino, E. (2014a). Homomorphic Encryption and Applications. SpringerBriefs in Computer Science. Springer International Publishing. Yi, X. and Bertino, E. (2011). Private searching for single and conjunctive keywords on streaming data. In Proceedings of the 10th Annual ACM Workshop on Privacy in the Electronic Society, 153–158. Yi, X., Bertino, E., Vaidya, J., and Xing, C. (2014b). Private searching on streaming data based on keyword frequency. IEEE Transactions on Dependable and Secure Computing, 11(2), 155–167.
3cs.SY
1 Simulated Annealing Algorithm for Graph Coloring Alper Köse, Berke Aral Sönmez, Metin Balaban, Random Walks Project arXiv:1712.00709v1 [cs.AI] 3 Dec 2017 Abstract—The goal of this Random Walks project is to code and experiment the Markov Chain Monte Carlo (MCMC) method for the problem of graph coloring. In this report, we present the plots of cost function H by varying the parameters like q (Number of colors that can be used in coloring) and c (Average node degree). The results are obtained by using simulated annealing scheme, where the temperature (inverse of β) parameter in the MCMC is lowered progressively. Keywords—Graph Coloring, Simulated Annealing, MCMC Method. I. I NTRODUCTION A. Graph Coloring Graph coloring is one of the most important concepts in graph theory and is used in many real time applications in computer science. It can be defined as a problem of how to assign colors to certain elements of a graph given some constraints. It is especially used in research areas of science such as data mining, image segmentation, clustering, image capturing, networking etc. Vertex coloring is the most common application of graph coloring. In vertex coloring, given m colors, the aim is to find the coloring of vertices of the graph such that no two adjacent vertices have the same color (Here, adjacent means that two vertices are directly connected by an edge). If this goal is achieved, the graph is said to have proper coloring. However, it is not always possible to find the proper coloring of a graph. In this situation, the coloring with the minimum cost function is searched: H(x) = X 1xv =xw (1) (v,w)∈E This energy function assigns a unit cost to every edge which has the same colors on two vertices bounded to it. Therefore, one can state that this function counts the total number of such bad edges in a graph. Our goal here is to minimize the energy function and to see if there exist minimizers that yield zero cost (proper coloring). On the other hand, if the global minimum is strictly positive, then there does not exist a proper coloring for the given graph for given number of colors. To minimize the energy function, we use the simulated annealing method in this project. B. Simulated Annealing Finding the optimal solution for some optimization problems can be an incredibly difficult task because when a problem gets sufficiently large we need to search through an enormous number of possible solutions to find the optimal one. Therefore, there are often too many possible solutions to consider. In such cases, since it is not possible to find the optimal solution within a reasonable length of time, one has to try to find a solution that is close enough to global optimum. Most minimization strategies find the nearest local minimum but we need a different strategy not to get stuck in a local minimum. Namely, we should sometimes iterate to new colorings that do not improve the current situation. In such a situation, we consider Simulated Annealing, since it is a probabilistic technique for approximating the global optimum of a given function which works as described above. In Simulated Annealing, there is a temperature parameter that has to be tuned, in order to get close enough to the optimal solution. It has an initial value and it should be slowly decreased. One must be careful for finding such a schedule because if the cooling is too slow, it may not be possible to reach the minimizer in a reasonable amount of time, on the other hand, if the cooling is too fast, it is likely to end up in a local minimum. For now, practical deterministic algorithms for finding optimal solution are not known. As a probabilistic model, Simulated Annealing method can do quite well. In other words, given sufficient time at each temperature, it leads to equilibrium state and in the end it can converge to a solution which is close enough to the optimal one. C. Metropolis Algorithm In the problem, we want to find the coloring vector that minimizes the cost function H. In order to achieve this goal, we use simulated annealing which is an adaptation of Metropolis Algorithm and the Monte Carlo method. Metropolis Algorithm that is given in the project description is used in optimization with only modifying β parameter in some steps of the iterations. The Metropolis algorithm is given below (Think β as fixed for now since we do not change it in every iteration) : 1. At time t = 0, initialize with a coloring x0 taken uniformly at random. 2. At times t ≥ 0, make a transition xt → xt+1 according to the following rules: • Select a vertex v ∈ V uniformly at random, with current color xv . Pick a color different from xv at random and recolor the vertex v. Consider the new coloring xnew and compute 4 = H(xnew ) − H(xt ). • if 4 ≤ 0, then accept the new color (with probability one) and set xt+1 = xnew . • if 4 > 0, then accept the new color with probability p(H(xnew )) = exp(−β4) p(H(xt )) (2) and set xt+1 = xnew ; reject the move with the complementary probability and set xt+1 = xt . 3. Iterate for n time steps. 2 Fig. 1. Results on an Erdos-Renyi graph with 1000 vertices and average node degree c = 5. The algorithm is iterated 106 times for every q value of 3,5 and 7. For these q values, Hmin is obtained as 34, 0, and 0 respectively. Fig. 2. Results on an Erdos-Renyi graph with 1000 vertices and average node degree c = 10. The algorithm is iterated 106 times for every q value of 3,5 and 7. For these q values, Hmin is obtained as 395, 0,and 0 respectively. II. program. Therefore, we also changed initial β = 0.8 and 0 trials0 = 1.5 ∗ N which we get good results for this number of iterations. The final β was 23 which makes the acceptance probability close enough to zero as to be considered as the chain is frozen. As we expected, results were not as good as it is in 1 billion iterations, but still close to it. We plotted the curves of H(xt ) as a function of time for three different values of c = 5, 10, 20 and three different values of q = 3, 5, 7. The plots can be seen in Figures 1,2 and 3. In general, as we desired, there are significant oscillations in the H values at the beginning (β is small) of iterations and they become more stable with the time and at the end (β is large) they are frozen. From the perspective of c values, the number of edges in the graph is proportional to the c value. Thus, with higher connectivity, it is harder to obtain a proper coloring scheme for the graph. This can be verified from the Figures 1,2 and 3, because it is seen that when c = 5, q = 5 and q = 7 give proper coloring where q = 3 gives a coloring scheme which has a relatively small cost. When c = 10, q = 5 and q = 7 again give proper coloring where q = 3 gives a coloring scheme which has a higher cost than c = 5 case. Finally, when c = 20, only q = 7 is able to give a proper coloring, q = 5 no longer provides a proper coloring scheme and q = 3 has the highest cost among all schemes. From the perspective of q values, it is straight-forward to state that when q increases, we obtain smaller costs in every iteration, and it is intuitively obvious since higher number of available color means higher possibility of having different colors on two ends of an edge. Although there is a possibility that in some iterations we can have smaller cost in colorings while also having smaller q values, this probability is very small and even gets smaller when the vertex number or iterations (with same modification scheme of β) increases. In our second experiment, we aim to show the relation E XPERIMENTAL S ETUP AND D ISCUSSION OF R ESULTS As recommended in the lab sheet, we coded the algorithm in Matlab firstly. We know that there is not a certain optimal point that is aimed to be reached. We want to make Hmin as small as possible. As known, β must be increased slow enough not to converge to a local minimum and fast enough to complete the simulation in a reasonable amount of time. By trials we saw that increasing the number of iterations allows us to reach lower energies and sometimes proper colorings for some parameters. Therefore, we chose our iteration number to be as big as possible and also as small as allowing as to do computations in a reasonable amount of time. We experimented with 1000x1000 Erdos-Renyi random graph to see if the execution time is reasonable. When we do 105 iterations, it takes approximately 50 seconds to run the program in Matlab. We thought that we can complete this task in a time which is much shorter than this, so we coded the algorithm in C++. As a result, it took 0.04 seconds to run the same algorithm which is 1250 times faster. Then, in the optimization step, we thought that we can increase β slowly not to get stuck in a local minima since our computation time is really low. With the trials by hand, we estimated the modification scheme as (0.2+N/n) where N 0.2 is the number of vertices and n is the number of iterations. To find a good initial β and how often to apply the modification, we ran our code many times by taking random samples for the initial β and the 0 trials0 (modifying in every that number of iteration). As a result, we obtained the best results when we used 1 billion iterations with initial β = 0.98 and 0 trials0 = 3.4 ∗ N . This simulation of 1 billion iterations is completed in just 100 seconds. Also, when we increase the number of iterations, we could not observe a better Hmin . On the other hand, since we are obliged to give the graphs of H and Hmin in the report, we decided to use 1 million iterations for plotting them in Matlab without crashing the 3 Fig. 3. Results on an Erdos-Renyi graph with 1000 vertices and average node degree c = 20. The algorithm is iterated 106 times for every q value of 3,5 and 7. For these q values, Hmin is obtained as 1510, 302, and 5 respectively. between the node degree of Erdos-Renyi graph and the minimum of the cost function (Hmin ). For the experiment setup, we created 100 random graphs whose c parameters range from 1 to 100. On each of these graphs, we attempted to get the best coloring for q = 3, 5, 7 using our simulated annealing algorithm implementation. We kept the parameters of the algorithm the same as we set in the first experiment. As a result, we got the plot in Figure 4. As expected, when the node degree is very low, q = 3, 5, 7 all gives proper coloring for the problem. When we gradually increase the node degree, minimum value of the cost function (Hmin ) starts to be non-zero for q = 3 at first, then for q = 5 and lastly for q = 7. This is a normal behavior because we can color a graph easier if we have more colors to use, namely we have more chance to get closer to proper coloring by using more colors. Also, after being non-zero, linear increase of Hmin can be seen from the graphs. This can be explained like that: The expectation of edge number will be c(N − 1)/2, when the node degree c is increased linearly, edge number will increase in the same pattern, and as edge number increases and since we have random coloring, we will also have a linear increase in the minimum of the cost function Hmin . But, the slope of the linearly increasing functions are bigger when q is smaller. This is because the increase in the total number of possible color combinations will grow more while q is increasing. For instance, think of a graph which has 3 vertices and all of the vertices are connected. In this case, we have 6 different proper colorings if q = 3, 24 if q = 4 and 60 if q = 5. So, as one can see, we have increasingly growing options while q value increases which explains the different values of the slopes of the Hmin s. III. C ONCLUSION 1) The more the iteration the larger the probability of having better coloring.The reason for this is we have the possibility Fig. 4. The plot showing the relation between average node degree (c) and the minimum potential. c values ranges from 1 − 100 and the algorithm is iterated 106 times for every q value of 3,5 and 7. of making more iterations for each β value which makes us closer to mixing time for that β value. 2) Different β modification schemes give similar results given the required conditions are satisfied (small initial β, modifying slow enough not to get stuck in a local minimum). 3) Final β value must be large enough to guarantee that the chain is frozen(1/β goes to 0). 4) The simulated annealing algorithm on large instances of graph coloring problem does not assure the optimal coloring assignment. The mixing time for the chain to converge to the stationary distribution is larger than the time required for exploring the state space of the problem. That state space is quite large, for example, when the number of vertices is 1000 and number of colors are 5, the size is 51000 . 5) Since the simulated annealing algorithm is a randomized algorithm and it does not guarantee reaching the optimal value, different runs produce different results. In order to obtain the minimum potential in limited time, the best strategy is to split the time interval into several runs and return the minimum value among the runs. Another advantage of this strategy is that different runs can be parallelizable due to independence of the runs. We run the algorithm concurrently on the same graph instance, achieving higher computational power. 6) C++ is efficient in time but harder to code. R EFERENCES [1] Project Description. http://lthiwww.epfl.ch/~leveque/Random_Walks/ project_RW_2016.pdf [2] Ahmed, Shamim. "Applications of Graph Coloring in Modern Computer Science." International Journal of Computer and Information Technology.() (2012). [3] http://csg.sph.umich.edu/abecasis/class/2006/615.19.pdf [4] Johnson, David S., et al. "Optimization by simulated annealing: an experimental evaluation; part II, graph coloring and number partitioning." Operations research 39.3 (1991): 378-406.
2cs.AI
Application of a Semi-automatic Algorithm for Identification of Molecular Components in SBML Models Andrea Maggiolo-Schettini Paolo Milazzo Giovanni Pardini Dipartimento di Informatica Università di Pisa, Italy [email protected] Dipartimento di Informatica Università di Pisa, Italy [email protected] Dipartimento di Informatica Università di Pisa, Italy [email protected] Reactions forming a pathway can be rewritten by making explicit the different molecular components involved in them. A molecular component represents a biological entity (e.g. a protein) in all its states (free, bound, degraded, etc.). In this paper we show the application of a component identification algorithm to a number of real-world models to experimentally validate the approach. Components identification allows subpathways to be computed to better understand the pathway functioning. 1 Introduction A typical aspect of a biochemical pathway is that the process described involves mainly a few chains of reactions, in which the occurrence of a reaction produces some intermediate molecule which is then transformed subsequently by other reactions. Just a few basic biological entities are often involved in a pathway, for example a simple protein undergoes a series of transformations, starting from its initial synthesized form, which can then be activated and also become part of different complexes. Therefore, intermediate molecular species can actually be seen as different states of the same initial biological entities. In accordance with this view, in the modelling of biochemical pathways we can consider a notion of molecular component [9, 8] that is the formal counterpart of the notion of biological entity. A molecular components will hence be associated with the set of species mentioned in the model and corresponding to different states of the same biological entity. This paper discusses the application of a semi-automatic algorithm for the identification of molecular components in pathways which is presented in [18]. The algorithm infers components from the interactions of molecular species. In order to make components involved in each reaction explicit, the algorithm replaces each compound species (which is usually identified by a distinct name) with a fresh name for each one of its components, and transforms reactions into a normal form in which each complex is represented by as many species as are the biological entities involved in it. The algorithm is actually semi-automatic, since there are cases in which the components involved in a reaction cannot be univocally determined from the context; these cases must be solved with the help of the user. In this paper, we present the results of the application of such an algorithm to a number of realworld pathways from the BioModels repository [12], an online database of machine-readable models of biological processes formalized in the well-known Systems Biology Markup Language (SBML). In particular, we have analyzed all of the models in the curated section, which contains only models from the literature, for a total of 436 models. In this paper, some of the models are also discussed individually in order to experimentally assess the validity of our approach when applied to real-world models. The identification of components by the transformation of the pathway reactions into normal form allows different kinds of analysis to be performed. For example, syntactic transformations, such as the projection of the pathway over a subset of components, would allow the user to obtain insights on A. Graudenzi, G. Caravagna, G. Mauri, M. Antoniotti (Eds.): Wivace 2013 - Italian Workshop on Artificial Life and Evolutionary Computation EPTCS 130, 2013, pp. 43–52, doi:10.4204/EPTCS.130.7 c A. Maggiolo-Schettini, P. Milazzo & G. Pardini This work is licensed under the Creative Commons Attribution License. 44 Identification of Molecular Components in SBML Models the functioning of the pathway. In particular, by focusing on the reactions in which they are involved, the mechanisms underlying the pathway dynamics could be more easily identified. Moreover, from a theoretical point of view, the normalization would allow the automatic translation of a pathway into a set of automata or terms of process calculi [19, 1, 2, 5, 7], thus enabling the use of any tool available for their analysis. 2 Algorithm for Component Identification In this section we recall the algorithm for component identification presented in [18]. The algorithm is based on the idea that a species is a “state” of a more abstract biological entity, and a reaction is a synchronized state change of a set of such entities. The algorithm assumes that biological entities involved in a reaction cannot appear from nothing and/or disappear (i.e. degradations should be modelled by using a species representing the degraded state of the biological entity). As a consequence, every entity involved in a reaction should be mentioned both among reactants and among products, and hence in a reaction there should be as many reactants as products. Let a component be a set of species representing all possibile states of a given biological entity. The component identification algorithm transforms a given pathway into a normal-form pathway, namely such that, for all its reactions, there are as many reactants as products and there is a one-to-one positional correspondence between reactants and products which are part of the same component. The fundamental operation of the algorithm is to split a species into new subspecies, denoted by newly-introduced symbols. A split of a species is performed any time the algorithm can infer that, in a reaction, the occurrence of such a species must actually denote a complex composed of multiple bound molecules. For example, this is the case of a reaction A, B → C, where C can be split into subspecies CA ,CB , obtaining the normalform reaction A, B → CA ,CB , with components {A,CA } and {B,CB }. In general, this process may not be completely automatic since some ambiguities may arise. For example, a reaction such as A, B → C, D, E is ambiguous since it is not clear which of the two reactants has to be split into two in order to obtain as many reactants as products. Another important aspect is that, in principle, the number of components of a pathway is not univocally determined. For example, it is possible to split the reactants/products of a reaction A → B into A1 , . . . , An → B1 , . . . , Bn , thus identifying any number of components, one for each pair Ai , Bi . However, the idea is to identify only those components which can be inferred from the context, namely from the reactions in which a component is involved. For this reason, the algorithm performs a split only if it is needed to match the components of reactants and products of a reaction. Structure of the algorithm Let us denote (in an abstract manner) by comp(S) the component in which a species S occurs at a given step. Initially, the algorithm assumes that each species occurring in the input pathway is part of a different component. It then iteratively performs two alternating phases, until a normal-form pathway is obtained. In the first phase, it tries to transform the set of reactions into reactions having the same number of reactants and products. This entails inspecting each reaction in turn, in order to both (i) split species into subspecies as needed, and (ii) refine the information about components by collapsing different components into single ones, according to what can be inferred from reactions. In case of ambiguities, the algorithm may fail to generate a normal-form pathway since either the number of reactants and products differ, or the correspondence between reactants and products is not completely specified for all the reactions. In such a case, the algorithm performs a second phase, which demands user intervention to resolve a single ambiguous reaction. Then the two phases are repeated to propagate the new information derivable from the resolved reaction to the others, as it may be useful to A. Maggiolo-Schettini, P. Milazzo & G. Pardini 45 resolve other ambiguous reactions, and possibly all of them. As regards the first phase, the algorithm examines each reaction singularly. Let us consider a reaction having reactants R = {A1 , . . . , Aγ } and products P = {B1 , . . . , Bδ }. Moreover, assume that the components of each of the first k < γ, δ pairs of reactant/product match, namely ∀i ∈ {1, . . . , k}. comp(Ai ) = comp(Bi ). Let n = γ − k and m = δ − k denote the number of remaining unmatched reactants/products of the reaction, respectively. The algorithm then distinguishes five kinds of reactions, as follows: • Case n = 0, m = 0: the reaction is resolved, with complete correspondence between each reactant and product. This case is not necessarily definitive, since the algorithm, due to some split, may subsequently modify the reaction by replacing a species occurring in it with new symbols. • Case n = 1, m = 1: since there is just one species remaining in each side, this means that both of them are part of the same component. Thus, the components of the reactant and product are joint into a single component by taking their union. • Case (n = 0 ∧ m > 0) or (n > 0 ∧ m = 0): if either of reactants or products are empty, there is at least a component which appears in either side of the reaction which does not occur in the other side. In other words, such a component either appears or disappears in between the reaction, which is not allowed by our approach. Thus this case is regarded as an error, which cannot be resolved. • Case n = 1 ∧ m > 1 (or n > 1 ∧ m = 1): in this case there is a single reactant which is actually formed from m subspecies. Thus, m new symbols Aγ -Bk , . . . , Aγ -Bδ are introduced, by combining the name of Aγ with the Bi ’s. Then Aγ is replaced by the new symbols in all the reactions, and the components of each pair of species (Aγ -Bk , Bk ), . . . , (Aγ -Bδ , Bδ ) are matched, i.e. ∀k ≤ j ≤ δ . comp(Aγ -B j ) = comp(B j ). (The converse case, with one product and n reactants is analogous.) • Case n > 1, m > 1: if there are multiple unmatched reactants and products, the reaction is currently ambiguous. This means that the current information regarding components does not allow the algorithm to decide which species must be split, thus this reaction is skipped. The first phase continues until there are only resolved, erroneous and ambiguous reactions. In case of ambiguous reactions remaining, the algorithm asks the user to resolve one reaction by specifying the species to split and rewriting it in normal-form. The procedure is repeated from the first phase in order to propagate the updated information about components to the other reactions. As an example, let us consider pathway P = {r1 : Lig, rcpt → C1 ; r2 : GDP, Gα → C2 ; r3 : GT P, Gα → C3 ; r4 : C3 → C2 ; r5 : C2 , Gβ γ → C4 ; r6 : C4 ,C1 → C5 }, which models a small fragment of the well-known G protein signalling pathway, in which a ligand Lig (representing the signal) binds the receptor rcpt on cellular membrane, triggering the internal process. The algorithm identifies 5 components (representative species of which are Lig, rcpt, Gα , Gβ γ and GDP) and produces the follwing normal-form pathway (where species names are abbreviated): P0 ={r01 : Lig, rcpt → C1 -Lig,C1 -rcpt; r02 : GDP, Gα → C2 -GDP,C2 -Gα ; r04 : C3 -GT P,C3 -Gα → C2 -GDP,C2 -Gα ; r03 : GT P, Gα → C3 -GT P,C3 -Gα ; r05 : C2 -GDP,C2 -Gα , Gβ γ → C4 -GDP,C4 -Gα ,C4 -Gβ γ ; r06 : C4 -GDP,C4 -Gα ,C4 -Gβ γ ,C1 -Lig,C1 -rcpt → C5 -GDP,C5 -Gα ,C5 -Gβ γ ,C5 -Lig,C5 -rcpt}. The sets of species forming each component are as follows: {Lig,C1 -Lig,C5 -Lig}, {rcpt,C1 -rcpt,C5 -rcpt}, {Gα ,C2 -Gα ,C4 -Gα ,C5 -Gα ,C5 -Gα ,C3 -Gα }, {Gβ γ ,C4 -Gβ γ ,C5 -Gβ γ }, {GDP,C2 -GDP,C4 -GDP,C5 -GDP, GT P, C3 -GT P}. Now, we can compute subpathways describing the activity of a subset of the molecular components. For instance, by assuming that we are not interested in the role of Lig, rcpt and GDP, we can compute the subpathway dealing only with components Gα and Gβ γ as follows: P00 = {r002 : Gα → C2 -Gα ; r003 : Gα → C3 -Gα ; r004 : C3 -Gα → C2 -Gα ; r005 : C2 -Gα , Gβ γ → C4 Gα ,C4 -Gβ γ ; r006 : C4 -Gα ,C4 -Gβ γ → C5 -C2 -Gα ,C5 -Gβ γ }. Moreover, the subpathways describing each component individually can be trivially translated into a finite state automaton or into a process algebra term to enable the application of formal analysis tools. 46 3 Identification of Molecular Components in SBML Models Applications In order to test our component identification algorithm on a relevant number of real pathways we downloaded all of the pathway descriptions available in the BioModels database [12] under the category “curated models”. So, our testbed consisted of 436 different SBML models of pathways. SBML [10] is a well-established XML-based language for pathway description. A SBML pathway model includes (among others) the following elements: • Species: Proteins, genes, ions and other molecules that can participate in reactions. • Compartments: Well-stirred containers in which species can be located. A SBML model may contain multiple compartments (at least one) and each species must be located in one of them. • Reactions: Statements describing transformation, transport or binding processes that can change the amount of one or more species. A reaction consists of reactants, products and modifiers. Moreover, the kinetic law of a reaction can be expressed by using arbitrary mathematical functions. • Rules: Mathematical expressions describing how some variable values (e.g. species amounts) can be calculated from other variables, or used to define the rate of change of variables. Rules in a model can be used either together with (or in place of) reactions to determine the model dynamics. • Events: A statement describing an instantaneous, discontinuous change in a set of variables when a triggering condition is satisfied. We developed a simple translator of SBML models into CSV files accepted by our implementation of the algorithm. The translator considers only the reactions of a SBML model and transforms them into the format expected by the algorithm. SBML models in which the dynamics is governed only by rules, and not by reactions, are translated into empty CSV files, and hence are unusable by our tool. Moreover, we excluded from our test models containing reactions with fractional stoichiometry, that are meaningful only when the dynamics is described by means of ODEs. In the considered testbed, unusable models turn out to be 59 out of 436 and excluded models are 23 out of 436, hence we have 354 usable CSV files. The 354 usable models consisted on average of 22.07 species and 31.05 reactions, with 108 models dealing with more than 20 species, 31 dealing with more than 50 species, and 6 dealing with more than 100 species. We executed our algorithm batch on all of the models. The execution (on a standard laptop) takes a few seconds for each model. The execution on a model can terminate either successfully with an automatically generated normal-form pathway (OK), or with an error message if an erroroneous reaction is encountered, or with a human intervention request if an ambiguous reaction is encountered. In the latter two cases, the execution is interrupted and the number of erroneous and ambiguous reactions, respectively, is printed. The results we obtained on the 354 usable models are shown in the table below, on line “Batch execution”. Most of the models (244 out of 354) encountered some errors. By inspecting some of them we discovered that in most cases the error was due to reactions describing either synthesis or degradation of some species, in which either products or reactants were absent, respectively. Batch execution Preprocessing & Batch execution Preprocessing & Batch execution with dynamic correction Ok 96 241 318 Erroneous 244 93 0 Ambiguous 14 20 36 We decided to solve the problem of synthesis/degradation reactions by preprocessing the SBML models. The preprocessing was performed on the CSV translation and consisted in inserting a dummy species in each empty set of reactants or products encountered. Note that every time an empty set is encountered by the preprocessor, a new fresh species is generated and used as dummy. Hence, each dummy species will appear only once in the pathway. Since dummy species added during preprocessing do not interact with other species, error situations are solved without affecting component identification. A. Maggiolo-Schettini, P. Milazzo & G. Pardini 47 The results of executions of the algorithm after preprocessing are in the table, on line “Preprocessing & Batch execution”. Most of the previously erroneous situations can now be handled by the algorithm, and in the vast majority of the cases they did not encountered ambiguous reactions (151 errors are solved and only 6 of them turn out to need human intervention). By inspecting some of the models still giving an erroneous result we discovered that in some cases the error was caused by a reaction describing the degradation of a part of a complex. For example, let us consider a pathway consisting of reactions A, B → C and C → A. The first reaction is the formation of a complex composed by A and B, and the second is the degradation of B when it bound to A. In this case the algorithm transforms the first reaction into A, B → CA ,CB . Consequently, in the second reaction it replaces C by CA ,CB obtaining CA ,CB → A. Now, in the second reaction the algorithm associates CA with A (as this follows from the first reaction) and it has nothing to associate with CB (error situation). To solve this second kind of errors we choose to add fresh dummy objects also at runtime when errors are encountered. In the example, the second reaction could be corrected by adding a fresh dummy object DB as follows: CA ,CB → A, DB . This is not always correct since the dynamic insertion of dummy species may lead to different components being identified, depending on the order of processing of reactions. The results of executions of the algorithm after preprocessing and with insertion of dummy objects at runtime are in the table, on line “Preprocessing & Batch execution with dynamic correction”. All of the error situations are now solved and only 36 of the 354 models turn out to need human intervention. The component identification algorithm completed automatically its execution in the 89.83% of the cases. In the remaining 36 cases we had an average of 4.67 ambiguous reactions, that means that at most 4.67 questions are asked to the user in an average execution of a model with ambiguous reaction (with a maximum of 16 and only two models over 10). The average computed over all of the 354 cases is 0.53. The algorithm, although semi-automatic, turns out to require very limited human intervention in practice. Let us now assess the quality of the computed results by comparing the molecular components identified by the algorithm with the biological entities the modelled pathways deal with according to the referenced literature. We consider eight “randomly” chosen SBML models (numbers 50, 100, 150, 200, 250, 300, 350 and 400 in the BioModels database), three randomly chosen big models (numbers 88, 235 and 293) and three randomly chosen models with ambiguities (numbers 82, 143 and 165). In the following paragraphs a brief summary of the analysis of each of these SBML models is given. Analysis of model 50 (BIOMD0000000050.xml). This SBML model describes a kinetic model of N(1-deoxy-D-fructos-1-yl)-glycine (DFG) thermal decomposition [14]. The SBML model includes 14 species and 16 reactions. During its execution the algorithm encountered one erroneous reaction, that was solved by dynamically inserting a dummy object in it. In the model DFG can be degraded into several different ways obtaining a number of different substances. The model includes some species representing unidentified intermediate components (E1 and E2 ) and unidentified carbohydrate fragments (Cn ). Most of the species involved in the pathway can be transformed into these unidentified molecules, thus causing all of these species to be included in the same molecular component by the algorithm. As a consequence, the algorithm identifies only 3 components: two including all and only the species related with Glycine and methyulglyoxal, respectively, and one including all of the other species. The quality of the result in this case are hence only partially satisfactory, and the cause of unsatisfaction is that the model includes ambiguities (unidentified species). Analysis of model 82 (BIOMD0000000082.xml). This SBML model describes the formation of an inhibitor of the Adenylate Cyclase enzyme [24]. The SBML model includes 10 species and 6 reactions. During its execution the algorithm encountered no erroneous reactions, but two ambiguous reactions. The two ambiguous reactions are the following: DR, G GDP → DRG GDP and DRG GDP → GDP, DRG. 48 Identification of Molecular Components in SBML Models These reactions describe the passage (in two steps) of a G-protein from GDP to DR. This is a typical case of ambiguity (see [18]) that can be solved by making it explicit the involvement of the “hidden” component representing the G protein, namely by replacing the ambiguous reactions with the following ones: DR, GG GDP , GDPG GDP → DRG GDP and DRG GDP → GDP, GDRG , DRDRG . So, in this case the algorithm needs human intervention, after which 4 components are correctly identified. Analysis of model 88 (BIOMD0000000088.xml). This model describes the Rho-kinase pathway in order to study thrombin-dependent in vivo transient responses of Rho activation and Ca2+ increase [13]. It includes 104 species and 110 reactions, and it is one of the biggest models we have considered. During its execution the algorithm encountered no erroneous and ambiguous reactions. The algorithm identified 28 components. Species in the SBML file are represented by numbers, hence checking the correctness of the identified components was not trivial. We checked a few randomly chosen components and each of them turned out to be composed of species representing different states of the same molecule. Although we do not have a complete proof of the correctness of the result, we consider this case satisfactory. Analysis of model 100 (BIOMD0000000100.xml). This SBML model is used to study the effects of cytosolic calcium oscillations on activation of glycogen phosphorylase [21]. The SBML model includes 5 species and 10 reactions. During its execution the algorithm encountered five errors, that were solved by preprocessing. The species involved in the model are: external calcium (EC), cytosolic calcium (Z), intravescicular calcium (Y), inositol 1,4,5-trisphosphate IP3 (A), and glycogen phosphorlylase (GP). The reactions described in the model are: calcium influx, transportation of calcium between compartments, and IP3 and glycogen phosphorylase syntheses and degradations. The algorithm identifies 3 components: one including all of the species representing calcium (EC, Z and Y) and the other two including IP3 and glycogen, respectively. The quality of the result in this case is hence satisfactory. Analysis of model 143 (BIOMD0000000143.xml). This SBML model describes the metabolism of activated neutrophils in which oscillatory behaviours have been observed [17]. The model includes 20 species and 20 reactions. During its execution the algorithm encountered three errors, solved by preprocessing. The algorithm encountered also 9 ambiguous reactions. After inspecting the model we discovered that thee reactions in particular were problematic, the solution of which solved also the ambiguities in the other 6 reactions. The three problematic reactions describe the Peroxidase Cycle in which an enzyme is activated by a H2 O2 molecule and then transforms in two steps two Melatonin molecules into Melatonin-free-radical. During this cycle two molecules of water are released, and also some hydrogen ions are involved. Water and hydrogen are not mentioned in the model, and this creates ambiguities in the reactions. Such ambiguities can be solved by a human intervention aimed at clarifying the three problematic reactions. After this, the algorithm completes by correctly identifiying 5 components. Analysis of model 150 (BIOMD0000000150.xml). This is a very simple SBML model describing formation and activation of Cdk/Cyclin Complexes [15]. The model includes 4 species and 4 reactions. The algorithm encountered no erroneous reactions. The modelled reactions are trivial (complex formation from two species, activation of the complex and inverse reactions). The algorithm correctly identifies 2 components, one for each molecule involved in the complex. The result in this case is hence satisfactory. Analysis of model 165 (BIOMD0000000165.xml). This model deals with intracellular signalling through cAMP and its cAMP-dependent protein kinase (PKA) [22]. The SBML model includes 37 species and 30 reactions. During its execution the algorithm encountered three erroneous reactions, two of which solved by preprocessing and one by dynamically inserting a dummy object. The model included one ambiguous reaction similar to those encountered in the case of model 82. The reaction can be disambiguated by means of a single human intervention after which 16 components are correctly identified. Analysis of model 200 (BIOMD0000000200.xml). This SBML model describes binding reactions leading to a transmembrane receptor-linked multiprotein complex involved in bacterial chemotaxis [4]. A. Maggiolo-Schettini, P. Milazzo & G. Pardini 49 The SBML model includes 21 species and 34 reactions. During its execution the algorithm encountered no erroneous reactions. The biochemical entities involved in the pathway are the dimeric aspartatebinding receptor Tar (TT) and four cytoplasmic proteins CheW (W), CheA (AA), CheY (Y), CheB (B) and CheZ (Z). TT, W and AA are involved in a number of reactions leading to the formation of a complex TTWWAA that activates proteins Y, B, Z in different ways . The algorithm identifies exactly 6 components out of the 21 species, and such components correspond exactly to the 6 biochemical entities involved in the pathway. The quality of the result in this case is hence satisfactory. Analysis of model 235 (BIOMD0000000235.xml). This SBML model describes the sea urchin endomesoderm network [11], a very big gene regulation network. The model includes 618 species and 778 reactions. During its execution the algorithm encountered only 3 erroneous reactions, solved by preprocessing. The algorithm identified only 47 components. By inspecting them we discovered that actually one of the components included the vast majority of the species. By inspecting reactions we discovered that actually they consisted mostly of syntheses and degradations in which species “none” was used in all the case of empty reactants or products. The algorithm associated all of the species involved in a synthesis or degradation reaction in the same component. This was due to the fact that all of such species are in relation with the same species “none”. We modified the model by replacing the unique “none” by fresh dummy species (as in the case of preprocessing). After this change the algorithm identified 406 components. We checked some of them (randomly chosen) and they turned out to be correct representations of biochemical entities involved in the network. We consider hence the quality of the result satisfactory, although this model needed to be slightly modified in order to let the algorithm work as expected. Analysis of model 250 (BIOMD0000000250.xml). This SBML model is used to study how epidermial growth factor (EGF) and heregulin (HRG) generate distinct responses of the transcription factor c-fos [16]. The SBML model includes 49 species and 78 reactions. During its execution the algorithm encountered 19 erroneous reactions solved by preprocessing. The algorithm identifies 18 components that, after an analysis of the description of the pathway in the paper, seem to correspond to the biochemical entities involved in the pathway. The quality of the result in this case is hence satisfactory. Analysis of model 293 (BIOMD0000000293.xml). This SBML model describes an ubiquitin-proteasome system [20]. The SBML model includes 136 species and 316 reactions. During its execution the algorithm encountered 114 erroneous reactions, all solved by dynamic insertion of dummy objects. The algorithm identified only 12 components. By inspecting the model we discoverd that is suffered from the same problem of model 235, namely the same dummy species “source” and “AggP Proteasome” were used in many syntheses and inhibition reactions, causing the most of the species to be assigned to the same component by the algorithm. We modified this model as we did for model 235. The number of erroneous reactions encounterd decreased to 77, and the number of components identified by the algorithm decreased to 16. Components seems to be rather correct, since they seems to represent a reasonable partition of the species set. However, the complexity of the model and the high number of erroneous reactions solved only at runtime does not allow us to be sure about the correctness of the result. We leave the assessment of the quality of this result as a future work. Analysis of model 300 (BIOMD0000000300.xml). This SBML model is used to study how the activity of the heterodimeric transcription factor hypoxia inducible factor (HIF) if affected by the interaction of factors inhibiting HIF (FIH) with ankyrin-repeat domain (ARD) proteins [23]. The SBML model includes 9 species and 10 reactions. Reactions are all degradations and syntheses of species. All of the 10 reactions become erroneous reactions that are solved by preprocessing. The algorithm identifies 9 components. However, by inspecting the models it emerged that most of the dynamics is described by means of SBML rules, hence the models turns out to be unusable. Analysis of model 350 (BIOMD0000000350.xml). This SBML model is used to study the circadian 50 Identification of Molecular Components in SBML Models network of higher plants. In particular, it is a model of the clock of the picoeukaryotic alga Ostreococcus tauri as a feedback loop between the genes TOC1 and CCA1 [25]. The SBML model includes 14 species and 30 reactions. Actually, most reactions are syntheses and degradations. Indeed, 27 reactions out of 30 become erroneous reactions that are solved by preprocessing. Only three reactions describe transformation of species, and consequently the algorithm correctly identifies 11 components. The quality of the result in this case is hence satisfactory. Analysis of model 400 (BIOMD0000000400.xml). This SBML model belongs to the set of unusable models since it does not include any reaction. 4 Discussion The component identification algorithm we proposed in [18] turned out to work pretty well. In the majority of the cases the execution of the algorithm has been completely automatic, and the computed molecular components correctly represented the biological entities involved in the pathway. In the cases in which human intervention was necessary, it usally consisted in answering very few questions on how resolve ambiguous reactions. After the detailed analysis of some of the models (numbers 235 and 293) a recurrent “error” in the modelling of pathways (from the viewpoint of the algorithm) is to use the same special species to represent the pre-synthesis or the degraded form of many different biological entities. This causes different molecular components to be erroneously merged into one. Moreover, it also emerged that ambiguities often are of the same kind, namely they are include some “hidden” species that is always bound to some other species. In these cases the algorithm cannot identify the component corresponding to such species and the reactions turn out to be ambiguous. Most of the erroneous and ambiguous situations could be prevented by a more accurate construction of models. However, it could be an interesting further development of our work the definition of some rule or heuristics able to solve these situations when encountered. Otherwise, the prevention of erroneous and ambiguous situations could be approached by developing of a model repair preprocessing routine based for instance on static checking of conservation laws or P-invariants [6]. References [1] Roberto Barbuti, Giulio Caravagna, Andrea Maggiolo-Schettini, Paolo Milazzo & Giovanni Pardini (2008): The calculus of looping sequences. In: Formal Methods for Computational Systems Biology, Springer, pp. 387–423. doi:10.1007/978-3-540-68894-5 11 [2] Roberto Barbuti, Andrea Maggiolo-Schettini, Paolo Milazzo & Angelo Troina (2006): A calculus of looping sequences for modelling microbiological systems. Fundamenta Informaticae 72(1), pp. 21–35. [3] Michael L Blinov, James R Faeder, Byron Goldstein & William S Hlavacek (2004): BioNetGen: software for rule-based modeling of signal transduction based on the interactions of molecular domains. Bioinformatics 20(17), pp. 3289–3291. doi:10.1093/bioinformatics/bth378 [4] D. Bray & R.B. Bourret (1995): Computer analysis of the binding reactions leading to a transmembrane receptor-linked multiprotein complex involved in bacterial chemotaxis. Molecular biology of the cell 6(10), pp. 1367–1380. [5] Federica Ciocchetta & Jane Hillston (2009): Bio-PEPA: A framework for the modelling and analysis of biological systems. Theoretical Computer Science 410(33), pp. 3065–3084. doi:10.1016/j.tcs.2009.02.037 [6] Allan Clark, Vashti Galpin, Stephen Gilmore, Maria Luisa Guerriero & Jane Hillston (2012): Formal methods for checking the consistency of biological models. In: Advances in Systems Biology, Springer, pp. 461–475. doi:10.1007/978-1-4419-7210-1 27 A. Maggiolo-Schettini, P. Milazzo & G. Pardini 51 [7] Vincent Danos & Cosimo Laneve (2004): Formal molecular biology. Theoretical Computer Science 325(1), pp. 69–110. doi:10.1016/j.tcs.2004.03.065 [8] Peter Drábik, Andrea Maggiolo-Schettini & Paolo Milazzo (2012): On conditions for modular verification in systems of synchronising components. Fundamenta Informaticae 120(3), pp. 259–274. [9] Peter Drábik, Andrea Maggiolo-Schettini & Paolo Milazzo (2012): Towards modular verification of pathways: fairness and assumptions. In: Proceedings of MeCBIC 2012, EPTCS 100, pp. 63–81. [10] M. Hucka, A. Finney, H.M. Sauro, H. Bolouri, J.C. Doyle, H. Kitano & the rest of the SBML Forum (2003): The systems biology markup language (SBML): a medium for representation and exchange of biochemical network models. Bioinformatics 19(4), pp. 524–531. doi:10.1093/bioinformatics/btg015 [11] C. Kühn, C. Wierling, A. Kühn, E. Klipp, G. Panopoulou, H. Lehrach & A. Poustka (2009): Monte carlo analysis of an ode model of the sea urchin endomesoderm network. BMC systems biology 3(1), p. 83. doi:10.1186/1752-0509-3-83 [12] C. Li, M. Donizelli, N. Rodriguez, H. Dharuri, L. Endler, V. Chelliah, L. Li, E. He, A. Henry, M.I. Stefan, J.L. Snoep, M. Hucka, N. Le Novère & C. Laibe (2010): BioModels Database: An enhanced, curated and annotated resource for published quantitative kinetic models. BMC Systems Biology 4, p. 92. doi:10.1186/17520509-4-92 [13] A. Maeda, Y. Ozaki, S. Sivakumaran, T. Akiyama, H. Urakubo, A. Usami, M. Sato, K. Kaibuchi & S. Kuroda (2006): Ca2+-independent phospholipase A2-dependent sustained Rho-kinase activation exhibits all-ornone response. Genes to Cells 11(9), pp. 1071–1083. doi:10.1111/j.1365-2443.2006.01001.x [14] S.I.F.S. Martins & M.A.J.S. Van Boekel (2003): Kinetic modelling of Amadori N-(1-deoxy-d-fructos-1-yl)glycine degradation pathways. Part II–Kinetic analysis. Carbohydrate research 338(16), pp. 1665–1678. doi:10.1016/S0008-6215(03)00174-5 [15] M.C. Morris, C. Gondeau, J.A. Tainer & G. Divita (2002): Kinetic Mechanism of Activation of the Cdk2/Cyclin A Complex. Journal of Biological Chemistry 277(26), pp. 23847–23853. doi:10.1074/jbc.M107890200 [16] T. Nakakuki, M.R. Birtwistle, Y. Saeki, N. Yumoto, K. Ide, T. Nagashima, L. Brusch, B.A. Ogunnaike, M. Okada-Hatakeyama & B.N. Kholodenko (2010): Ligand-specific c-Fos expression emerges from the spatiotemporal control of ErbB network dynamics. Cell 141(5), pp. 884–896. doi:10.1016/j.cell.2010.03.054 [17] L.F. Olsen, U. Kummer, A.L. Kindzelskii & H.R. Petty (2003): A model of the oscillatory metabolism of activated neutrophils. Biophysical journal 84(1), pp. 69–81. doi:10.1016/S0006-3495(03)74833-4 [18] G. Pardini, P. Milazzo & A. Maggiolo-Schettini: An Algorithm for the Identification of Components in Biochemical Pathways. In: Proceedings of CS2Bio 2013, ENTCS. In press.1 . [19] A. Phillips & L. Cardelli (2007): Efficient, correct simulation of biological processes in the stochastic picalculus. In: Computational Methods in Systems Biology, Springer, pp. 184–199. doi:10.1007/978-3-54075140-3 13 [20] C.J. Proctor, P.J. Tangeman & H.C. Ardley (2010): Modelling the Role of UCH-L1 on Protein Aggregation in Age-Related Neurodegeneration. PLoS ONE 5(10), p. e13175. doi:10.1371/journal.pone.0013175.s013 [21] A. Rozi & Y. Jia (2003): A theoretical study of effects of cytosolic Ca2+ oscillations on activation of glycogen phosphorylase. Biophysical chemistry 106(3), pp. 193–202. doi:10.1016/S0301-4622(03)00192-3 [22] J.J. Saucerman, J. Zhang, J.C. Martin, L.X. Peng, A.E. Stenbit, R.Y. Tsien & A.D. McCulloch (2006): Systems analysis of PKA-mediated phosphorylation gradients in live cardiac myocytes. Proceedings of the National Academy of Sciences 103(34), pp. 12923–12928. doi:10.1073/pnas.0600137103 [23] B. Schmierer, B. Novák & C. Schofield (2010): Hypoxia-dependent sequestration of an oxygen sensor by a widespread structural motif can shape the hypoxic response-a predictive kinetic model. BMC systems biology 4(1), p. 139. doi:10.1186/1752-0509-4-139 1 Pre-proceedings version available online at http://cs2bio13.di.unito.it/papers/Pardini.pdf 52 Identification of Molecular Components in SBML Models [24] W.J. Thomsen, J.A. Jacquez & R.R. Neubig (1988): Inhibition of adenylate cyclase is mediated by the high affinity conformation of the alpha 2-adrenergic receptor. Molecular pharmacology 34(6), pp. 814–822. [25] C. Troein, F. Corellou, L.E. Dixon, G. van Ooijen, J.S. ONeill, F.-Y. Bouget & A.J. Millar (2011): Multiple light inputs to a simple clock circuit allow complex biological rhythms. The Plant Journal 66(2), pp. 375–385. doi:10.1111/j.1365-313X.2011.04489.x
5cs.CE
HyperENTM: Evolving Scalable Neural Turing Machines through HyperNEAT Jakob Merrild and Mikkel Angaju Rasmussen and Sebastian Risi arXiv:1710.04748v1 [cs.AI] 12 Oct 2017 IT University of Copenhagen, Denmark {jmer, mang, sebr}@itu.dk Abstract Recent developments within memory-augmented neural networks have solved sequential problems requiring long-term memory, which are intractable for traditional neural networks. However, current approaches still struggle to scale to large memory sizes and sequence lengths. In this paper we show how access to memory can be encoded geometrically through a HyperNEAT-based Neural Turing Machine (HyperENTM). We demonstrate that using the indirect HyperNEAT encoding allows for training on small memory vectors in a bit-vector copy task and then applying the knowledge gained from such training to speed up training on larger size memory vectors. Additionally, we demonstrate that in some instances, networks trained to copy bit-vectors of size 9 can be scaled to sizes of 1,000 without further training. While the task in this paper is simple, these results could open up the problems amendable to networks with external memories to problems with larger memory vectors and theoretically unbounded memory sizes. Introduction Memory-augmented neural networks are a recent improvement on artificial neural networks (ANNs) that allow them to solve complex sequential tasks requiring long-term memory (Sukhbaatar et al. 2015; Graves et al. 2016; Graves, Wayne, and Danihelka 2014) . Here we are particularly interested in Neural Turing Machines (NTM) (Graves, Wayne, and Danihelka 2014), which allow a network to use an external memory tape to read and write information during execution. This improvement enables the ANN to be trained in fewer iterations, for certain tasks, and also allows the network to change behaviour on the fly. However, scaling to large memory sizes and sequence length is still challenging. Additionally, current algorithms have difficulties extrapolating information learned on smaller problem sizes to larger once, thereby bootstrapping from it. For example, in the copy tasks introduced by Graves et al. (2014) the goal is to store and later recall a sequence of bit vectors of a specific size. It would be desirable that a network trained on a certain bit vector size (e.g. 8 bits) would be able to scale to larger bit vector sizes without further training. However, current machine learning approaches often cannot transfer such knowledge. Recently, Greve et al. (2016a) introduced an evolvable version of the NTM (ENTM), which did not rely on differen- tiability and offered some unique advantages. First, in addition to the networks weights, the optimal neural architecture can be learned at the same time. Second, a hard memory attention mechanism is directly supported and the complete memory does not need to be accessed each time step. Third, a growing and theoretically infinite memory is now possible. Additionally, in contrast to the original NTM, the network was able to perfectly scale to very long sequence lengths. However, because it employed the direct genetic encoding NEAT, which means that every parameter of the network is described separately in its genotype, the approach had problems scaling to copy tasks with vectors of more than 8 bits. To overcome these challenges, in this paper we combine the ENTM with the indirect Hypercube-based NeuroEvolution of Augmenting Topologies (HyperNEAT) encoding (Stanley, D’Ambrosio, and Gauci 2009). HyperNEAT provided a new perspective on evolving ANNs by showing that the pattern of weights across the connectivity of an ANN can be generated as a function of its geometry. HyperNEAT employs an indirect encoding called compositional pattern producing networks (CPPNs), which can compactly encode patterns with regularities such as symmetry, repetition, and repetition with variation (Stanley 2007). HyperNEAT exposed the fact that neuroevolution benefits from neurons that exist at locations within the space of the brain and that by placing neurons at locations, evolution can exploit topography (as opposed to just topology), which makes it possible to correlate the geometry of sensors with the geometry of the brain. While lacking in many ANNs, such geometry is a critical facet of natural brains (Sporns 2002). This insight allowed large ANNs with regularities in connectivity to evolve for high-dimensional problems. In the new approach introduced in this paper, called HyperENTM, an evolved neural network generates the weights of a main model, including how it connects to the external memory component. Because HyperNEAT can learn the geometry of how the network should be connected to the external memory, it is possible to train a CPPN on a small bit vector sizes and then scale to larger bit vector sizes without further training. While the task in this paper is simple it shows – for the first time – that access to an external memory can be indirectly encoded, an insight that could directly benefit indirectly encoded HyperNetworks training through gradient de- scent (Ha, Dai, and Le 2016) and could be applied to more complex problem by employing recent advances in Evolutionary Strategies (Salimans et al. 2017). 1) Query each potential 2) Feed each coordinate pair into CPPN connection on substrate 1 x1 Y Backgorund This section reviews NEAT, HyperNEAT, and Evolvable Neural Turing Machines, which are foundational to the approach introduced in this paper. Neuroevolution of Augmenting Topologies The HyperNEAT method that enables learning from geometry in this paper is an extension of the original NEAT algorithm that evolves ANNs through a direct encoding (Stanley and Miikkulainen 2002; Stanley and Miikkulainen 2004). It starts with a population of simple neural networks and then complexifies them over generations by adding new nodes and connections through mutation. By evolving networks in this way, the topology of the network does not need to be known a priori; NEAT searches through increasingly complex networks to find a suitable level of complexity. The important feature of NEAT for the purpose of this paper is that it evolves both the topology and weights of a network. Because it starts simply and gradually adds complexity, it tends to find a solution network close to the minimal necessary size. The next section reviews the HyperNEAT extension to NEAT that is itself extended in this paper. HyperNEAT In direct encodings like NEAT, each part of the solution’s representation maps to a single piece of structure in the final solution (Floreano, Dürr, and Mattiussi 2008). The significant disadvantage of this approach is that even when different parts of the solution are similar, they must be encoded and therefore discovered separately. Thus this paper employs an indirect encoding instead, which means that the description of the solution is compressed such that information can be reused. Indirect encodings are powerful because they allow solutions to be represented as a pattern of parameters, rather than requiring each parameter to be represented individually (Bongard 2002; Gauci and Stanley 2010; Hornby and Pollack 2002; Stanley and Miikkulainen 2003). HyperNEAT, reviewed in this section, is an indirect encoding extension of NEAT that is proven in a number of challenging domains that require discovering regularities (Clune et al. 2009; Gauci and Stanley 2010; Stanley, D’Ambrosio, and Gauci 2009). For a full description of HyperNEAT see (Gauci and Stanley 2010). In HyperNEAT, NEAT is altered to evolve an indirect encoding called compositional pattern producing networks (CPPNs (Stanley 2007)) instead of ANNs. CPPNs, which are also networks, are designed to encode compositions of functions, wherein each function in the composition loosely corresponds to a useful regularity. The appeal of this encoding is that it allows spatial patterns to be represented as networks of simple functions (i.e. CPPNs), which means that NEAT can evolve CPPNs just like ANNs. CPPNs are similar to ANNs, but they rely on -1 -1 Substrate X 1 1,0 1,1 ... -0.5,0 0,1 ... -1,-1 -0.5,0 ... -1,-1 - 1,0 ... y1 x2 y2 CPPN (evolved) 3) Output is weight between (x 1,y1) and (x 2,y2) Figure 1: Hypercube-based Geometric Connectivity Pattern Interpretation. A collection nodes, called the substrate, is assigned coordinates that range from −1 to 1 in all dimensions. (1) Every potential connection in the substrate is queried to determine its presence and weight; the dark directed lines in the substrate depicted in the figure represent a sample of connections that are queried. (2) Internally, the CPPN (which is evolved) is a graph that determines which activation functions are connected. As in an ANN, the connections are weighted such that the output of a function is multiplied by the weight of its outgoing connection. For each query, the CPPN takes as input the positions of the two endpoints and (3) outputs the weight of the connection between them. Thus, CPPNs can produce regular patterns of connections in space. more than one activation function (each representing a common regularity) and are an abstraction of biological development rather than of brains. The indirect CPPN encoding can compactly encode patterns with regularities such as symmetry, repetition, and repetition with variation (Stanley 2007). For example, simply by including a Gaussian function, which is symmetric, the output pattern can become symmetric. A periodic function such as sine creates segmentation through repetition. Most importantly, repetition with variation (e.g. such as the fingers of the human hand) is easily discovered by combining regular coordinate frames (e.g. sine and Gaussian) with irregular ones (e.g. the asymmetric x-axis). The potential for CPPNs to represent patterns with motifs reminiscent of patterns in natural organisms has been demonstrated in several studies (Secretan et al. 2008; Stanley 2007). The main idea in HyperNEAT is that CPPNs can naturally encode connectivity patterns (Gauci and Stanley 2010; Stanley, D’Ambrosio, and Gauci 2009). That way, NEAT can evolve CPPNs that represent large-scale ANNs with their own symmetries and regularities. Formally, CPPNs are functions of geometry (i.e. locations in space) that output connectivity patterns whose nodes are situated in n dimensions, where n is the number of dimensions in a Cartesian space. Consider a CPPN that takes four inputs labeled x1 , y1 , x2 , and y2 ; this point in fourdimensional space also denotes the connection between the two-dimensional points (x1 , y1 ) and (x2 , y2 ), and the output of the CPPN for that input thereby represents the weight of that connection (Figure 1). By querying every possible connection among a pre-chosen set of points in this manner, a CPPN can produce an ANN, wherein each queried point is a neuron position. Because the connections are produced by a function of their endpoints, the final structure is produced with knowledge of its geometry. In HyperNEAT, the experimenter defines both the location and role (i.e. hidden, input, or output) of each such node. As a rule of thumb, nodes are placed on the substrate to reflect the geometry of the task (Clune et al. 2009; Stanley, D’Ambrosio, and Gauci 2009). That way, the connectivity of the substrate is a function of the task structure. How to integrate this setup with an ANN that has an external memory component is an open question, which this paper tries to address. Evolvable Neural Turing Machines (ENTM) Based on the principles behind the NTM, the recently introduced ENTM uses NEAT to learn the topology and weights of the ANN controller (Greve, Jacobsen, and Risi 2016a). That way the topology of the network does not have to be defined a priori (as is the case in the original NTM setup) and the network can grow in response to the complexity of the task. As demonstrated by Greve et al., the ENTM often finds compact network topologies to solve a particular task, thereby avoiding searching through unnecessarily high-dimensional spaces. Additionally, the ENTM was able to solve a complex continual learning problem (Lüders et al. 2017). Because the network does not have to be differentiable, it can use hard attention and shift mechanisms, allowing it to generalize perfectly to longer sequences in a copy task. Additionally, a dynamic, theoretically unlimited tape size is now possible. The ENTM has a single combined read/write head. The network emits a write vector w of size M , a write interpolation control input i, a content jump control input j, and three shift control inputs sl , s0 , and sr (left shift, no shift, right shift). The size of the write vector M determines the size of each memory location on the tape. The write interpolation component allows blending between the write vector and the current tape values at the write position, where Mh (t) is the content of the tape at the current head location h, at time step t, it is the write interpolation, and wt is the write vector, all at time step t: Mh (t) = Mh (t − 1) · (1 − it ) + wt · it . The content jump determines if the head should be moved to the location in memory that most closely resembles the write vector. A content jump is performed if the value of the control input exceeds 0.5. The similarity between write vector w and memory vector m is determined by: s(w, m) = P M i=1 |wi −mi | . M At each time step t, the following actions are performed in order: (1) Record the write vector wt to the current head position h, interpolated with the existing content according to the write interpolation it . (2) If the content jump control input jt is greater than 0.5, move the head to location on the tape most similar to the write vector wt . (3) Shift the head one position left or right on the tape, or stay at the current location, according to the shift control inputs sl , s0 , and sr . (4) Read and return the tape values at the new head position. Approach: Hyper Neural Turing Machines (HyperENTM) In the HyperENTM the CPPN does not only determine the connections between the task related ANN inputs and outputs but also how the information coming from the memory is integrated into the network and how information is written back to memory. Because HyperNEAT can learn the geometry of a task it should be able to learn the geometric pattern in the information written to and read from memory. The following section details the HyperENTM approach on the copy task, which was first introduced by (Graves, Wayne, and Danihelka 2014). In the copy task the network is asked to store and later recall a sequence of bit vectors. At the start of the task the network receives a special input, which denotes the start of the input phase. Afterwards, the network receives the sequence of bit-vectors, one at a time. Once the sequence has been fully passed to the network it receives another special input, signaling the end of the input phase and the start of the output phase. For any subsequent time steps the network does not receive any input. In summary, the network has the following inputs: Start: An input that is activated when the storing of numbers should begin. Switch: An input that is activated when the storing should stop and the network must start recalling the bit vectors instead. Bit-vector input: Before the switch input has been activated this input range is activated with the bits that are to be recited later. Memory read input: The memory vector that the TM read in the previous time step. And following outputs: Bit-vector output: The bit vector that the network outputs to the environment. During the input phase this output is ignored. Memory write output: The memory vector that should be written to memory. TM controls: TM specific control outputs. Jump, interpolation, and three shift controls (left, stay, and right). Copy Task Substrate The substrate for the copy task is shown in Figure 2. The substrate is designed such that the bit-vector input nodes share x-coordinates with the memory vector write nodes and vice versa with memory vector read nodes and bitvector output nodes. Furthermore, the switch input shares its x-coordinate with the jump output, thus encouraging the network to jump in memory when it should start reciting. In this paper, the size of the memory vector equals the bit vector size. Furthermore, none of the substrates contain hidden nodes as it has been shown that it is possible to solve even large versions of the problem without any hidden nodes (Greve, Jacobsen, and Risi 2016b). Following Verbancsics and Stanley (2011), in addition to the CPPN output that determines the weights of each connection, each CPPN has an additional step-function output, called the link-expression output (LEO), which determines if a connections should be expressed. Potential connections are queried for each input on layers y = 1 and y = −1 to each output on layers y = 1 and y = −1. The number of inputs and outputs on the y = −1 layer (Figure 2b) are scaled dependent on the size of the copy task bit vector. In the shown example the bit-vector size is three. Neurons are z Inputs y=1 z 1 Inputs −1 1 Outputs 1 y = −1 x −1 1 x Outputs (a) Bit-vector input Memory read vector Switch Start Shift controls Jump control Interp control Memory write vector Bit-vector output (b) Figure 2: The HyperENTM substrate for the copy task. All inputs are in z = 1 and all outputs in z = −1. Figure (a) shows all nodes in y = 1 which is the start/switch inputs and the tm controls. Notably the x-coordinate is the same for the switch input and the jump control output. Figure (b) shows the nodes in y = −1 which are the bit-vector and memory vector input and outputs. Bit-vector input nodes share x-coordinates with memory vector write nodes, while memory vector read nodes share x-coordinates with bit-vector output nodes. uniformly distributed in the x interval [−1.0, −0.2] for bit vector inputs and memory write vector and in the interval [0.2, 1.0] for the memory read vector and bit vector output. The CPPN has an additional output that determines the bias values for each nodes in the substrate. These values are determine through node-centric CPPN queries (i.e. both source and target neuron positions xyz are set to the location of the node whose bias should be determined). Experiments A total of three different approaches are evaluated on bitsizes of 1, 3, 5, and 9. HyperNEAT is compared to the direct NEAT encoding, and a Seeded HyperNEAT treatment that starts evolution with a CPPN seed that encourages locality on both the x- and y-coordinates (Figure 7a). A similar locality seed has been shown useful in HyperNEAT to encourage the evolution of modular networks (Verbancsics and Stanley 2011). This locality seed is then later adjusted by evolution (e.g. adding/removing nodes and connections and changing their weights). The fitness function in this paper follows the one in the original ENTM paper (Greve, Jacobsen, and Risi 2016a). During training the network is given a sequence of random bit vectors, between 1 and 10 vectors long, and asked to recite it. The network is tasked to do this with 50 random sequences and assigned a normalized fitness. The network is evaluation the bit-vectors recited by the network are compared to those given to it during the input phase; for every bit-vector the network is given a score based on how close the output from the network corresponding to a specific bit was to the target. If the bit was within 0.25 of the target, the network is awarded a fitness of the difference between the actual output and the target output. Otherwise, the nett| work is not awarded for that specific bit: f = 1 − |x−x 0.25 if |x−xt | < 0.2 and 0 otherwise. The fitness for any given bitvector is equal to the the sum of the fitness for each individual bit, normalized to the length of the bit-vector. Similarly, the fitness for a complete sequence is the sum of the fitness for each bit-vector normalized to the length of the sequence. This results in a fitness score between 0 and 1. This fitness function rewards the network for gradually getting closer to the solution, but it does not actively reward the network for using the memory to store the inputs. Experimental Parameters For the NEAT experiments, offspring generation proportions are 50% sexual (crossover) and 50% asexual (mutation). Following (Lüders et al. 2017), we use 98.8% synapse weight mutation probability, 9% synapse addition probability, and 5% synapse removal probability. Node addition probability is set to 0.05%. The NEAT implementation SharpNEAT uses a complexity regulation strategy for the evolutionary process, which has proven to be quite impactful on our results. A threshold defines how complex the networks in the population can be (here defined as the number of genes in the genome and set to 10 in our experiments), before the algorithm switches to a simplifying phase, where it gradually reduces complexity. For the HyperNEAT experiments the following parameters are used. Elitism proportion is 2%. Offspring generation proportions are 50% sexual (crossover) and 50% asexual (mutation). CPPN connection weights have a 98.8% probability of being changed, a 1% change of connection addition, and 0.1% change of node addition and node deletion. The activation functions available to new neurons in the CPPN are Linear, Gaussian, Sigmoid, and Sine, each with a 25% probability of being added. Both NEAT and HyperNEAT experiments run with a population size of 500 for a maximum of 10,000 generations or until a solution is found. The code is available from: https://github.com/kalanzai/ ENTM_CSharpPort. Mean fitness over 10,000 generations 1 HyperNEAT Seeded HyperNEAT NEAT Comparison of solution rate 0.7 0.6 1 0.8 Size 3 Fitness 0.9 0.7 0.6 Number of experiments solved 20 0.8 Size 1 Fitness 0.9 15 10 5 0 1 HyperNEAT Seeded HyperNEAT NEAT 1 3 5 9 Size 0.8 Size 5 Fitness 0.9 0.7 0.6 Figure 4: The number of solutions found by each configuration for the four different bit vector sizes. 1 0.8 Comparison of final fitness Size 9 Fitness 0.9 0.7 Figure 3: Mean champion fitness for the different treatments and bit-sizes, averaged over 20 independent evolutionary runs. Results Figure 3 shows the mean champion fitness over 10, 000 generations for each of the different approaches and bit vector sizes. While NEAT performs best on smaller bit vectors, as the size of the vector grows to 9 bits, the seeded HyperNEAT variant outperforms both NEAT and HyperNEAT. The numbers of solutions found (i.e. networks that reach a training score ≥ 0.999) in regards to the bit vector size are shown in Figure 4. For bit size 1 all approaches solve the problem equally well. However, as the size of the bit vector is increased the configurations using HyperNEAT and locality seed performs best and the only method that is able to find any solution for size 9. Testing Performance. To determine how well the champions from the last generation generalize, they were tested on 100 random bit-vector sequences of a random lengths between 1 and 10 (Figure 5). On sizes 1 and 5 there is no statistical difference between either treatment (following a two-tailed Mann-Whitney U test). On size 3, NEAT performs significantly better than the seeded HyperNEAT (p < .00001). Finally, seeded HyperNEAT performs significantly better than NEAT on size 9 (p < .00001). The main conclusions are that (1) while NEAT performs best on smaller bit vectors it degrades rapidly with increased bit sizes, and (2) the seeded HyperNEAT variant is able to scale to larger sizes while maintaining performance better. Generalizing to longer sequences. We also tested how many of the solutions, which were trained on bit sequences of length 10, generalize to sequences of length 100. The training and generalisation results are summarized in Ta- Fitness 0.6 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 1 3 5 9 Size NEAT HyperNEAT Seeded HyperNEAT Figure 5: The mean performance of the champion networks from the last generation. NEAT does well on smaller sizes, but degenerates quickly as the size goes up. ble 1, which shows the number of solutions for each of the three approaches, how many of those solutions generalized to sequences of length 100, and the average number of generations it took to find a solution. For all three methods, most solutions generalize perfectly to sequences that are longer than the sequences encountered during training. Transfer Learning To test the scalability of the Seeded HyperNEAT solutions, champion genomes from runs which found a solution for a given size were used as a seed for evolutionary runs of higher sizes. The specific runs and which seeds were used can be seen in Table 2, which also contains the number of solutions found, how many solutions generalized, and the average number of generations needed to find the solutions. Seeds denoted X → Y refer to champion genomes from a run of size Y which was seeded with a champion from a run of size X. Because the number of solutions found varied between the different sizes (see Table 1), the scaling experiments were not run exactly 20 times. Instead, the number of runs was Table 1: Generalisation Results. Shown are the number of solutions, the number of solutions that generalize, together with the average number of generations it took to find a solution and standard deviation. HyperNEAT NEAT Size 1 3 5 9 1 3 5 9 1 3 5 9 #sol. 20 5 6 8 20 2 0 0 20 19 12 0 #gen 20 5 5 5 20 2 0 0 19 19 11 0 gens. 1055.8 4454.8 2695.5 1523.25 1481.45 4395.5 N/A N/A 281 2140.5 3213.4 N/A sd. 1147.4 3395.8 2666.5 2004.1 1670.8 388.2 N/A N/A 336.3 1594.4 2254.2 N/A Table 2: HyperNEAT Transfer Learning Seed 3 3 5 3→5 5 9 5→9 9 9→17 Size 5 9 9 9 17 17 17 33 33 #sol 12/20 16/20 23/24 23/24 18/20 24/24 20/20 23/24 24/24 #general 6 2 11 8 12 12 17 17 19 gens. 434.1 1150.3 58.9 588 258.9 89.3 36.25 94 456.5 sd. 574.6 2935.9 129.2 1992 301.3 235.9 47.5 217 2002.4 the smallest number above or equal to 20 which allowed for each champion to be seeded an equal number of times, e.g. if there were 6 solutions 24 runs were made; 4 runs with the champion from each solution. Figure 6 shows a comparison of HyperNEAT seeded with the locality seed and seeded with champion genomes of smaller sizes on the size 9 problem. HyperNEAT yielded significantly better results when seeded with size 5 and 3→5 champions compared to starting with the locality seed (p < .001), but not when seeded with the champion from size 3. Scaling without further training The champions from runs which found a solution were tested for scaling to larger bit-vector sizes without further evolutionary training (i.e. new input and output nodes are created and queried by the CPPN; see copy task substrate section for details). Each genome was tested on 50 sequences of 100 random bit-vectors of size 1,000. Some of the champions found using only the LEO size 9 configuration scaled perfectly to a bit-size of 1,000 without further training, as seen in Table 3. The main results is that it is possible to find CPPN that perfectly scale to any size. The fact that evolution with HyperNEAT performs significantly better, when seeded with a champion genome which solved a smaller size of the problem, together with the fact that evolution sometimes finds 0.9 Fitness Seeded HyperNEAT Size 9 1 0.8 0.7 Seeded HyperNEAT Seeded HyperNEAT from size 3 champion Seeded HyperNEAT from size 5 champion Seeded HyperNEAT from size 3 -> 5 champion 0.6 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Generations Figure 6: Comparison of the size 9 problem with normal locality seed and with champion seeds from a smaller size. Table 3: Scaling using LEO without further evolution Size # of champions # which scaled to 1000 9 8 2 9 → 17 24 7† † 6 of these can be traced back to the 2 champions from size 9 which scaled perfectly. solutions which scale without further training, demonstrates that HyperNEAT can be used to scale the dimensionality of the bit-vector in the copy task domain. Solution Example Here we take a closer look at one of the champion genomes (trained on bit-vector size 9), which was able to scale perfectly to the size 1000 problem (Table 3). Figure 7 shows a visualization of the champion genome, as well as the locality seed from which it was evolved. The champion genome does resemble the seed but also evolved several additional connections that are necessary to solve the problem. Figure 8 shows two different ANNs generated by the the same CPPN, which is shown in Figure 7b. It can be seen that for non-bias connections to be expressed, the source and destination nodes have to be located in the same position on both the x position and y layer in the substrate. These results suggest that the locality encouraging seed works as intended. To further demonstrate the scalability of this evolved CPPN, memory usage for size 9 and 17 are shown in Figure 9. The output of the networks is shown at the top, followed by the input to the network. Next follows the difference between the given input and the output, i.e. how well the network recited the sequence given to it. The fourth section of the recording shows a heat map of the fitness score based on the bit-vector in that position, where red indicates a high fitness while blue indicates a low fitness. Next follows the output from the network to the TM controller, followed by the interpolation output, and what was written to the memory tape. Finally, the recording shows the jump output from the network, the three different shift outputs, what read from the tape, and the position of the read/write head. As the recording shows, the network which x1 bias y1 weight z1 x2 y2 bias z2 x1 weight y1 z1 y=1 Bias y=1 LEO x2 bias y2 y = −1 (a) (a) bias Bias z2 LEO (b) Figure 7: (a) The CPPN seed that is used to promote locality on the x and y axes. (b) A champion trained on the size 9 problem, which was able to scale without further evolution to size 1,000. Blue connections have a positive weight, while red connections have a negative weight. solves the problem jumps exactly once when the switch input neuron is activated. Conclusion This paper showed that the indirect encoding HyperNEAT makes it feasible to train ENTMs with large memory vectors for a simple copy task, which would otherwise be infeasible to train with an direct encoding such as NEAT. Furthermore, starting with a CPPN seed that encouraged locality, it was possible to train solutions to the copy task that perfectly scale with the size of the bit vectors which should be memorized, without any further training. Lastly, we demonstrated that even solutions which do not scale perfectly can be used to shorten the number of generations needed to evolve a solution for bit-vectors of larger sizes. In the future it will be interesting to apply the approach to more complex domains, in which the geometry of the connectivity pattern to discover is more complex. Additionally, combining the presented approach with recent advances in Evolutionary Strategies (Salimans et al. 2017), which have been shown to allow evolution to scale to problems with extremely highdimensionality is a promising next step. References [Bongard 2002] Bongard, J. C. 2002. Evolving modular genetic regulatory networks. In Proceedings of the 2002 Congress on Evolutionary Computation. y = −1 (b) Figure 8: Networks produced by the champion CPPN (Figure 7b) for bit sizes 3 (a) and 17 (b). [Clune et al. 2009] Clune, J.; Beckmann, B. E.; Ofria, C.; and Pennock, R. T. 2009. Evolving coordinated quadruped gaits with the HyperNEAT generative encoding. In Proceedings of the IEEE Congress on Evolutionary Computation (CEC-2009) Special Session on Evolutionary Robotics. Piscataway, NJ, USA: IEEE Press. [Floreano, Dürr, and Mattiussi 2008] Floreano, D.; Dürr, P.; and Mattiussi, C. 2008. Neuroevolution: from architectures to learning. Evolutionary Intelligence 1(1):47–62. [Gauci and Stanley 2010] Gauci, J., and Stanley, K. O. 2010. Indirect encoding of neural networks for scalable go. In Schaefer, R.; Cotta, C.; Kołodziej, J.; and Rudolph, G., eds., Parallel Problem Solving from Nature, PPSN XI: 11th International Conference, Kraków, Poland, September 11-15, 2010, Proceedings, Part I, 354–363. Berlin, Heidelberg: Springer Berlin Heidelberg. [Graves et al. 2016] Graves, A.; Wayne, G.; Reynolds, M.; Harley, T.; Danihelka, I.; Grabska-Barwińska, A.; Colmenarejo, S. G.; Grefenstette, E.; Ramalho, T.; Agapiou, J.; et al. 2016. Hybrid computing using a neural network with dynamic external memory. Nature 538(7626):471–476. [Graves, Wayne, and Danihelka 2014] Graves, A.; Wayne, G.; and Danihelka, I. 2014. Neural turing machines. CoRR abs/1410.5401. [Greve, Jacobsen, and Risi 2016a] Greve, R. B.; Jacobsen, E. J.; and Risi, S. 2016a. Evolving neural turing machines for reward-based learning. In Proceedings of the Genetic and Evolutionary Computation Conference 2016, GECCO ’16, 117–124. New York, NY, USA: ACM. [Greve, Jacobsen, and Risi 2016b] Greve, R. B.; Jacobsen, E. J.; and Risi, S. 2016b. Evolving neural turing machines (a) (b) Figure 9: Recordings of the activities for bit-sizes 9 (a) and 17 (b) networks. Both networks are produced by the same CPPN. See main text for details. for reward-based learning. In Proceedings of the 2016 on Genetic and Evolutionary Computation Conference, 117– 124. ACM. [Ha, Dai, and Le 2016] Ha, D.; Dai, A.; and Le, Q. V. 2016. Hypernetworks. arxiv preprint. arXiv preprint arXiv:1609.09106 2. [Hornby and Pollack 2002] Hornby, G. S., and Pollack, J. B. 2002. Creating high-level components with a generative representation for body-brain evolution. Artificial Life 8(3). [Lüders et al. 2017] Lüders, B.; Schläger, M.; Korach, A.; and Risi, S. 2017. Continual and one-shot learning through neural networks with dynamic external memory. In European Conference on the Applications of Evolutionary Computation, 886–901. Springer. [Salimans et al. 2017] Salimans, T.; Ho, J.; Chen, X.; and Sutskever, I. 2017. Evolution strategies as a scalable alternative to reinforcement learning. arXiv preprint arXiv:1703.03864. [Secretan et al. 2008] Secretan, J.; Beato, N.; D’Ambrosio, D. B.; Rodriguez, A.; Campbell, A.; and Stanley, K. O. 2008. Picbreeder: Evolving pictures collaboratively online. In CHI ’08: Proceedings of the twenty-sixth annual SIGCHI conference on Human factors in computing systems, 1759– 1768. New York, NY, USA: ACM. [Sporns 2002] Sporns, O. 2002. Network analysis, complexity, and brain function. Complexity 8(1):56–60. [Stanley and Miikkulainen 2002] Stanley, K. O., and Miikkulainen, R. 2002. Evolving neural networks through aug- menting topologies. Evolutionary Computation 10(2):99– 127. [Stanley and Miikkulainen 2003] Stanley, K. O., and Miikkulainen, R. 2003. A taxonomy for artificial embryogeny. Artificial Life 9(2):93–130. [Stanley and Miikkulainen 2004] Stanley, K. O., and Miikkulainen, R. 2004. Competitive coevolution through evolutionary complexification. 21:63–100. [Stanley, D’Ambrosio, and Gauci 2009] Stanley, K. O.; D’Ambrosio, D. B.; and Gauci, J. 2009. A hypercube-based encoding for evolving large-scale neural networks. Artificial life 15(2):185–212. [Stanley 2007] Stanley, K. O. 2007. Compositional pattern producing networks: A novel abstraction of development. Genetic Programming and Evolvable Machines 8(2):131– 162. [Sukhbaatar et al. 2015] Sukhbaatar, S.; Weston, J.; Fergus, R.; et al. 2015. End-to-end memory networks. In Advances in neural information processing systems, 2440–2448. [Verbancsics and Stanley 2011] Verbancsics, P., and Stanley, K. O. 2011. Constraining connectivity to encourage modularity in hyperneat. In Proceedings of the 13th Annual Conference on Genetic and Evolutionary Computation, GECCO ’11, 1483–1490. New York, NY, USA: ACM.
9cs.NE
arXiv:1703.09332v3 [math.GR] 26 Dec 2017 ORDERINGS OF WITZEL-ZAREMSKY-THOMPSON GROUPS TOMOHIKO ISHIDA Abstract. We prove the orderability of the Witzel-Zaremsky-Thompson group for a direct system of orderable groups under a certain compatibility assumption. 1. Introduction Thompson’s groups are interesting countable groups and several kinds of their generalizations have been developed and studied. As one of such examples, Witzel and Zaremsky introduced the group T (G∗ ) associated to a direct system (Gn ) of groups satisfying certain axioms called the cloning system [6]. We call it the Witzel-Zaremsky-Thompson group for (Gn ). The Witzel-Zaremsky-Thompson group T (G∗ ) can be considered as not only a generalization of Thompson’s groups but also a limit of the groups Gn . We prove the group T (G∗ ) inherits the orderability of the groups Gn under the assumption that there exists an ordering of Gn which are compatible with the cloning maps. A precise definition of the compatibility is given in Section 2. Proposition 1.1. Let (Gn ) be a cloning system. (i) The Witzel-Zaremsky-Thompson group T (G∗ ) for (Gn ) is left-orderable if the groups Gn admit left-orderings which are compatible with the cloning maps. (ii) Suppose that the cloning system is pure. The group T (G∗ ) is bi-orderable if the groups Gn admit bi-orderings which are compatible with the cloning maps. The statement (ii) in Proposition 1.1 is proved by an argument which is a straightforward generalization of that used in [3]. The author does not know whether the assumption that the cloning system is pure is essential or not. 2. Preliminaries Let (Gn ) be a direct system of groups. That is, an injective homomorphism Gn ֒→ Gn+1 is given for each n ∈ N. The Witzel-Zaremsky-Thompson group T (G∗ ) is simply a certain subgroup of the cancellative group of the Brin-ZappaSzép product G ⊲⊳ F , where G is the direct limit of the system (Gn ) and F is the monoid of binary forests. However we recall the definition of T (G∗ ) in a fashion describing its elements. Date: December 27, 2017. 2010 Mathematics Subject Classification. Primary 20F60, Secondary 20B07, 20B27, 20E99, 20F36. Key words and phrases. Thompson’s groups, Thompson-like groups, Witzel-ZaremskyThompson groups, braided Thompson group, orderings, braid groups, Dehornoy ordering. 1 2 TOMOHIKO ISHIDA Let Sn be the symmetric group on the set {1, . . . , n}. Set the map ςnk : Sn → Sn+1 by  gm if m ≤ k, gm ≤ gk,    gm + 1 if m < k, gm > gk, ςnk (g)m = g(m − 1) if m > k, g(m − 1) < gk,    g(m − 1) + 1 if m > k, g(m − 1) ≥ gk. Definition 2.1. Suppose that a group homomorphism ρn : Gn → Sn and an injective map κkn : Gn → Gn+1 is given for each n ∈ N and for each k = 1, . . . , n. The triple (Gn ) = ((Gn ), (ρn ), (κkn )) is a cloning system if the following three axioms are satisfied. ρ (g)k (h) for g, h ∈ Gn , (1) κkn (gh) = κkn (g)κnn k (2) κkn+1 ◦ κln = κl+1 ◦ κ n for 1 ≤ k < l ≤ n, and n+1 (3) ρn (κkn (g)) = ςnk (ρn (g)) or sk ςnk (ρn (g)) for g ∈ Gn and for 1 ≤ k ≤ n, where the symbol sk means the transposition (k, k + 1) ∈ Sn+1 . The maps κkn : Gn → Gn+1 are called the cloning maps of the cloning system (Gn ). Suppose that a cloning system (Gn ) = ((Gn ), (ρn ), (κkn )) is given. A tree diagram is a triple (T− , g, T+ ), where g ∈ Gn for certain n ∈ N and T± are rooted planar binary trees with n leaves. A simple expansion of (T− , g, T+ ) is a tree diagram of the form (T−′ , κkn (g), T+′ ). Here, T−′ and T+′ are trees obtained by adjoining carets to the k-th and (ρ(g)k)-th leaves of T− and T+ , respectively. An expansion of (T− , g, T+ ) is a tree diagram obtained as an iterated simple expansions. Two tree diagrams are equivalent if they have a common expansion. The equivalence class represented by a tree diagram (T− , g, T+ ) will be denoted by [T− , g, T+ ]. The Witzel-Zaremsky-Thompson group T (G∗ ) consists of equivalence classes of tree diagrams as a set. For two elements [S− , f, S+ ], [T− , g, T+ ] ∈ T (G∗ ), their product ′ ′ ) and (T−′ , g ′ , T+′ ) , f ′ , S+ is defined as follows. There always exist tree diagrams (S− ′ representing [S− , f, S+ ] and [T− , g, T+ ], respectively and such that S+ = T−′ . The ′ , f ′ g ′ , T+′ ]. This is well-defined. product [S− , f, S+ ][T− , g, T+ ] is defined to be [S− The cloning system (Gn ) is pure if the homomorphism ρn : Gn → Sn is trivial for each n ∈ N. The subgroup of T (G∗ ) consisting of elements represented by the form (T− , 1, T+ ) is isomorphic to the Thompson’s group F . and we denote this subgroup again by F . If we denote by P T (G∗ ) the kernel of natural projection p : T (G∗ ) → V , then the group P T (G∗ ) consists of the elements of the form [T, g, T ], where g ∈ Kerρn and n is the number of leaves of T . If the cloning system (Gn ) is pure, then the image of the projection p : T (G∗ ) → V is equal to Thompson’s group F < V and thus there exists an isomorphism T (G∗ ) ∼ = P T (G∗ ) ⋊ F . When we fix a left-ordering or a bi-ordering <n of Gn for each n, we say the orderings are compatible with the cloning maps κkn ’s if 1 <n+1 κkn (g) for any n and any k whenever 1 <n g. 3. Proof of the main proposition Proof of Proposition 1.1. Let (Gn ) = ((Gn ), (ρn ), (κkn )) be a cloning system. Suppose that a left-ordering <n of the group Gn is given for each n and the orderings <n are compatible with the cloning maps. Since the Thompson’s group F is known ORDERINGS OF WITZEL-ZAREMSKY-THOMPSON GROUPS 3 to be bi-orderable, we fix a left-ordering <F of F . Set the subset Π of the WitzelZaremsky-Thompson group T (G∗ ) for (Gn ) by Π = {[T− , g, T+ ] ∈ T (G∗ ); g ∈ Gn , 1 <n g} ∐ {f ∈ F ; 1 <F f }. Since the orders <n are compatible with the cloning maps, the set Π is well-defined. Further it is easy to verify that Π is a positive cone and thus defines a left-ordering of T (G∗ ). This completes the proof of the statement (i). If the groups Gn admit bi-orderings which are compatible with the cloning maps, then the bi-ordering on P T (G∗ ) is induced. Under the assumption that the cloning system (Gn ) is pure, since both the groups P T (G∗ ) and F are bi-orderable, the group T (G∗ ) which is isomorphic to the semi-direct product P T (G∗ ) ⋊ F is also. This completes the proof of the statement (ii).  Remark 3.1. If we fix a left-ordering or bi-ordering on the group T (G∗ ), its restriction on P T (G∗ ) uniquely determines a family of left-ordering or bi-ordering respectively on the groups Gn . In fact, if for each rooted planar binary tree T with n leaves, we denote by GT the subgroup of P T (G∗ ) consisting of elements represented by tree diagrams of the form (T, g, T ), where g ∈ Gn , then Gn is isomorphic to Gn . Furthermore, if T and T ′ are rooted planar binary trees with same number of leaves, then in T (G∗ ) the subgroups group GT and G′T are conjugate to each other by an element of F . Thus if we assume the cloning system (Gn ) is pure, the converse of each statement of Proposition 1.1 always holds. 4. Examples In this section we discuss examples of Witzel-Zaremsky-Thompson groups to which Proposition 1.1 is applicable. 4.1. The braided Thompson group. Let Bn be the braid group of n strands and σ1 , . . . , σn−1 ∈ Bn the Artin generators. Taking ρn : Bn → Sn to be the natural projection and setting κkn : Bn → Bn+1 by  σi+1 if k < i,    σi+1 σi if k = i, k κn (σi ) = σi σi+1 if k = i + 1,    σi if i + 1 < k, we have a well-defined cloning system on (Bn ). Then the Witzel-Zaremsky-Thompson group T (Bn ) for (Bn ) is isomorphic to the group called the braided Thompson group BV which was independently introduced by Brin and Dehornoy [2][4]. Recall that β ∈ Bn is positive with respect to the Dehornoy ordering if and only if β is represented by a word w in the Artin generators which satisfies the following condition (D): ±1 (D) σi occurs in w but σ1±1 , . . . , σi−1 , σi−1 does not for certain i. It is not difficult to verify only by definition of the cloning maps that if w is a representation of β satisfying the condition (D) then κkn (w) also. Hence the following lemma holds: Lemma 4.1. The Dehornoy orderings of the braid groups Bn are compatible with the cloning maps of (Bn ) defined above. By Proposition 1.1 and Lemma 4.1, we have in easy way the following theorem which was first proved in [4]. 4 TOMOHIKO ISHIDA Theorem 4.2. The braided Thompson group BV is left-orderable. 4.2. The pure braided Thompson group. Let Pn be the pure braid group of n strands. We also denote the restriction on Pn of the map κkn : Bn → Sn we set in the previous subsection again by κkn . Take ρn : Pn → Sn to be the trivial homomorphism. Then we have a well-defined cloning system on (Pn ) and the Witzel-Zaremsky-Thompson group T (Pn ) for (Pn ) which is isomorphic to the pure braided Thompson group BF introduced by Brady, Burillo, Cleary and Stein in [1]. Lemma 4.3 ([3]). The orderings on the braid groups Pn induced from the Magnus orderings of the free groups via the Artin combing are compatible with the cloning maps on (Pn ) defined above. Theorem 4.4 ([3]). The pure braided Thompson group BF is bi-orderable. 4.3. Witzel-Zaremsky-Thompson group for direct powers of a group. For arbitrary group G, set Gn to be the n-th direct power Gn of G. Fix injective homomorphisms φ1 , φ2 of G. If we define κkn : Gn → Gn+1 by κkn (g1 , . . . , gn ) = (g1 , . . . , φ1 (gk ), φ2 (gk ), . . . , gn ) and set ρn : Gn → Sn to be the trivial homomorphism, then we have a cloning system on direct powers (Gn ) of the group G and the Witzel-Zaremsky-Thompson group T (Gn ) which was introduced by Tanushevski [5]. Suppose that G is left-orderable and fix a left-ordering < of G. If the homomorphism φ1 : G → G preserves the order of G, then the lexicographic orderings of Gn ’s induced by < are compatible with the cloning maps of (Gn ). Further if the order on G is bi-invariant, then the induced orders on Gn are also. Since the identity map of G trivially preserves all the orderings of G, by Proposition 1.1 we have the following Theorem: Theorem 4.5. If the group G is left-orderable or bi-orderable, then the WitzelZaremsky-Thompson group T (Gn ) of the direct powers of G is also left-orderable or bi-orderable, respectively. Acknowledgments. The author is grateful to the referee for carefully reading the manuscript and pointing out mistake in it. The author was supported by JSPS Research Fellowships for Young Scientists (26·110). References [1] T. Brady, J. Burillo, S. Cleary, and M. Stein, Pure braid subgroups of braided Thompson’s groups, Publ. Mat. 52 (2008), no. 1, 57–89. MR 2384840 [2] M. G. Brin, The algebra of strand splitting. I. A braided version of Thompson’s group V , J. Group Theory 10 (2007), no. 6, 757–788. MR 2364825 [3] J. Burillo and J. González-Meneses, Bi-orderings on pure braided Thompson’s groups, Q. J. Math. 59 (2008), no. 1, 1–14. MR 2392498 [4] P. Dehornoy, The group of parenthesized braids, Adv. Math. 205 (2006), no. 2, 354–409. MR 2258261 [5] S. Tanushevski, A new class of generalized Thompson’s groups and their normal subgroups, Comm. Algebra 44 (2016), no. 10, 4378–4410. MR 3508306 [6] S. Witzel and C. B. Zaremsky, Thompson groups for systems of groups, and their finiteness properties, preprint, arXiv:1405.5491. Department of Mathematics, Kyoto University, Kitashirakawa Oiwake-cho, Sakyoku, Kyoto 606-8502, Japan. E-mail address: [email protected]
4math.GR
Evolutionary Multimodal Optimization: A Short Survey Ka-Chun Wong (Department of Computer Science, University of Toronto) arXiv:1508.00457v1 [cs.NE] 3 Aug 2015 August 4, 2015 Real world problems always have different multiple solutions. For instance, optical engineers need to tune the recording parameters to get as many optimal solutions as possible for multiple trials in the varied-line-spacing holographic grating design problem. Unfortunately, most traditional optimization techniques focus on solving for a single optimal solution. They need to be applied several times; yet all solutions are not guaranteed to be found. Thus the multimodal optimization problem was proposed. In that problem, we are interested in not only a single optimal point, but also the others. With strong parallel search capability, evolutionary algorithms are shown to be particularly effective in solving this type of problem. In particular, the evolutionary algorithms for multimodal optimization usually not only locate multiple optima in a single run, but also preserve their population diversity throughout a run, resulting in their global optimization ability on multimodal functions. In addition, the techniques for multimodal optimization are borrowed as diversity maintenance techniques to other problems. In this chapter, we describe and review the state-of-the-arts evolutionary algorithms for multimodal optimization in terms of methodology, benchmarking, and application. 1 Introduction and Background Since genetic algorithm was proposed by John H. Holland [9] in the early 1970s, researchers have been exploring the power of evolutionary algorithms [47]. For instance, biological pattern discovery [48] and computer vision [51]. In particular, its function optimization capability was highlighted [6] because of its high adaptability to different non-convex function landscapes, to which we cannot apply traditional optimization techniques. Real world problems always have different multiple solutions [45, 46]. For instance, optical engineers need to tune the recording parameters to get as many optimal solutions as possible for multiple trials in the varied-line-spacing holographic grating design problem because the design constraints are too difficult to be expressed and solved in mathematical forms [31]. Unfortunately, most traditional optimization techniques focus on solving for a single optimal solution. They need to be applied several times; yet all solutions are not guaranteed to be found. Thus the multimodal optimization problem was proposed. In that 1 problem, we are interested in not only a single optimal point, but also the others. Given an objective function, an algorithm is expected to find all optimal points in a single run. With strong parallel search capability, evolutionary algorithms are shown to be particularly effective in solving this type of problem [6]: Given function f : X → R, we would like to find all global and local maxima (or minima) of f in a single run. Although the objective is clear, it is not easy to be satisfied in practice because some problems may have too many optima to be located. Nonetheless, it is still of great interest to researchers how these problems are going to be solved because the algorithms for multimodal optimization usually not only locate multiple optima in a single run, but also preserve their population diversity throughout a run, resulting in their global optimization ability on multimodal functions. Moreover, the techniques for multimodal optimization are usually borrowed as diversity maintenance techniques to other problems [42, 50]. 2 Problem Definition The multimodal optimization problem definition depends on the type of optimization (minimization or maximization). They are similar in principle and defined as follows: 2.1 Minimization In this problem, given f :X → R, we would like to find all global and local minimums of f in a single run. Definition 1 Local Minimum [41]: A (local) minimum x̂l ∈ X of one (objective) function f :X → R is an input element with f (x̂l ) ≤ f (x) for all x neighboring x̂l . If X ∈ RN , we can write: ∀x̂l ∃ > 0 : f (x̂l ) ≤ f (x) ∀x ∈ X, |x − x̂l | < . Definition 2 Global Minimum [41]: A global minimum xˆg ∈ X of one (objective) function f :X → R is an input element with f (xˆg ) ≤ f (x) ∀x ∈ X. 2.2 Maximization In this problem, given f :X → R, we would like to find all global and local maximums of f in a single run. Definition 3 Local Maximum [41]: A (local) maximum x̂l ∈ X of one (objective) function f :X → R is an input element with f (x̂l ) ≥ f (x) for all x neighboring x̂l . If X ∈ RN , we can write: ∀x̂l ∃ > 0 : f (x̂l ) ≥ f (x) ∀x ∈ X, |x − x̂l | < . Definition 4 Global Maximum [41]: A global maximum xˆg ∈ X of one (objective) function f :X → R is an input element with f (xˆg ) ≥ f (x) ∀x ∈ X. 2 3 Methodology In the past literature, there are different evolutionary methods proposed for multimodal optimization. In this section, we discuss and categorize them into different methodologies. 3.1 Preselection In 1970, the doctorial thesis by Cavicchio introduced different methods for genetic algorithms [3]. In particular, the preselection scheme was proposed to maintain the population diversity. In this scheme, the children compete with their parents for survival. If a child has a fitness (measured by an objective function) higher than its parent, the parent is replaced by the child in the next generation. 3.2 Crowding In 1975, the work by De Jong [13] introduced the crowding technique to increase the chance of locating multiple optima. In the crowding technique, each child is compared to a random sub-population of cf members in the existing parent population (cf means crowding factor). The parent member which is most similar to the child itself is selected (measured by a distance metric). If the child has a higher fitness than the parent member selected, then it replaces the parent member in the population. Besides genetic algorithm, Thomsen has also incorporated crowding techniques [13] into differential evolution (CrowdingDE) for multimodal optimization [40]. In his study, the crowding factor is set to the population size and Euclidean distance is adopted as the dissimilarity metric. The smaller the distance, the more similar they are and vice versa. Although an intensive computation is accompanied, it can effectively transform differential evolution into an algorithm specialized for multimodal optimization. In 2012, CrowdingDE has been investigated and extended by Wong et al , demonstrating competitive performance even when it is compared to the other state-of-the-arts methods [49]. 3.3 Fitness Sharing In 1989, Goldberg and Richardson proposed a fitness-sharing niching technique as a diversity preserving strategy to solve the multimodal optimization problem [7]. They proposed a shared fitness function, instead of an absolute fitness function, to evaluate the fitness of a individual in order to favor the growth of the individuals which are distinct from the others. The shared fitness function is defined as follows: f 0 (xi ) = Shared F itness = Actual F itness f (xi ) = PN Degree of Sharing j=1 sh(d(xi , xj )) where f 0 (xi ) is the shared fitness of the ith individual xi ; f (xi ) is the actual fitness of the ith individual xi ; d(xi , xj ) is the distance function between the two individuals xi and xj ; 3 sh(d) is the sharing function. With this technique, a population can be prevented from the domination of a particular type of individuals. Nonetheless, a careful adjustment to the sharing function sh(d) definition is needed because it relates the fitness domain f (xi ) to the distance domain d(xi , xj ) which are supposed to be independent of each other. 3.4 Species Conserving Species conserving genetic algorithm (SCGA) [17] is a technique for evolving parallel subpopulations for multimodal optimization. Before each generation starts, the algorithm selects a set of species seeds which can bypass the subsequent procedures and be saved into the next generation. The algorithm then divides a population into several species based on a dissimilarity measure. The fittest individual is selected as the species seed for each species. After the identification of species seeds, the population undergoes the usual genetic algorithm operations: selection, crossover, and mutation. As the operations may remove the survival of less fit species, the saved species seeds are copied back to the population at the end of each generation. To determine the species seeds in a population, the algorithm first sorts the population in a decreasing fitness order. Once sorted, it picks up the fittest individual as the first species seed and forms a species region around it. The next fittest individual is tested whether it is located in a species region. If not, it is selected as a species seed and another species region is created around it. Otherwise, it is not selected. Similar operations are applied to the remaining individuals, which are subsequently checked against all existing species seeds. To copy the species seeds back to the population after the genetic operations have been executed, the algorithms need to scan all the individuals in the current population and identify to which species they belong. Once it is identified, the algorithm replaces the worst individual (lowest fitness) with the species seed in a species. If no individuals can be found in a species for replacement, the algorithm replaces the worst and un-replaced individual in the whole population. In short, the main idea is to preserve the population diversity by preserving the fittest individual for each species. 3.5 Covariance Matrix Adaptation Evolution strategy is an effective method for numerical optimization. In recent years, its variant CMA-ES (Covariance Matrix Adaptation Evolution Strategy) showed a remarkable success [8]. To extend its capability, niching techniques have been introduced to cope with multimodal functions [35]. For instance, a concept called adaptive individual niche radius has been proposed to solve the niche radius problem commonly found in speciation algorithms [34]. 4 3.6 Multiobjective Approach At this point, we would like to note that the readers should not confuse evolutionary multimodal optimization (main theme of this chapter) with evolutionary multiobjective optimization. The former aims at solving a single function for multiple opima, while the latter aims at solving multiple functions for pareto front solutions. Nonetheless, the techniques involved are related. In particular, Deb and Saha demonstrated that, by decomposing a single multimodal objective function problem into a bi-objective problem, they can solve a multimodal function using a evolutionary multiobjective optimization algorithm [4]. Briefly, they keep the original multimodal objective function as the first objective. On the other hand, they use the gradient information to define peaks in the second objective. 3.7 Ensemble As mentioned in the previous section, different niching algorithms have been proposed over the past years. Each algorithm has its own characteristics and design philosophy behind. Although it imposes difficult conditions to compare them thoroughly, it is a double-edged sword. Such a vast amount of algorithms can provide us a “swiss army knife” for optimizations on different problems. In particular, Yu and Suganthan proposed an ensemble method to combine those algorithms and form a powerful method called Ensemble of Niching Algorithms (ENA) [52]. An extension work can also be found in [32]. 3.8 Others Researchers have been exploring many different ways to deal with the problem. Those methods include: clearing [29], repeated iterations [1], species-specific explosion [43], traps [15], stochastic automation [25], honey bee foraging behavior [39], dynamic niching [27], spatially-structured clearing [5], cooperative artificial immune network [21], particle swarm optimization [10, 19, 14, 22] , and island model [2]. In particular, Stoean et al. have proposed a topological species conservation algorithm in which the proper topological separation into subpopulations has given it an advantage over the existing radius-based algorithms [38]. Comparison studies were conducted by Singh et al. [36], Kronfeld et al. [16], and Yu et al. [53]. Though different methods were proposed in the past, they are all based on the same fundamental idea: it is to strike an optimal balance between convergence and population diversity in order to locate multiple optima simultaneously in a single run [37, 44]. 5 4 Benchmarking 4.1 Benchmark Functions There are many multimodal functions proposed for benchmarking in the past literature. In particular, the following five benchmark functions are widely adopted in literature: Deb’s 1st function [43], Himmelblau function [1], Six-hump Camel Back function [24], Branin function [24], and Rosenbrock function [33]. In addition, five more benchmark functions (PP1 to PP5) can be found in [43, 23]. For more viogorous comparisons, the IEEE Congress on Evolutionary Computation (CEC) usually releases a test suite for multimodal optimization every year. More than 15 test functions can be found there [20]. 4.2 Performance Metrics Several performance metrics have been proposed in the past literature [23, 18, 17, 40]. Among them, Peak Ratio (PR) and Average Minimum Distance to the Real Optima (D) [23, 43] are commonly adopted as the performance metrics. • A peak is considered found when there exists a individual which is within 0.1 Euclidean distance to the peak in the last population. Thus the Peak Ratio is calculated using the equation (3): P eak Ratio = N umber of peaks f ound T otal number of peaks (3) • The average minimum distance to the optima (D) is calculated using the equation (4): n X min d(peaki , indiv) i=1 indiv∈pop (4) n where n is the number of peaks, indiv denotes a individual, peaki is the ith peak, pop denotes the last population, and d(peaki , indiv) denotes the distance between peaki and indiv. D= As different algorithms perform different operations in one generation, it is unfair to set the termination condition as the number of generations. Alternatively, it is also unfair to adopt CPU time because it substantially depends on the implementation techniques for different algorithms. For instance, the sorting techniques to find elitists and the programming languages used. In contrast, fitness function evaluation is always the performance bottleneck [28] 1 . Thus the number of fitness function evaluations is suggested to be adopted as the running or termination condition for convergence analysis. 1 For instance, over ten hours are needed to evaluate a calculation in computational fluid dynamics [11] 6 4.3 Statistical Tests Since evolutionary multimodal optimization is stochastic in nature, multiple runs are needed to evaluate each method on each test function. The means and standard deviations of performance metrics are usually reported for fair comparison. To justify the results, statistical tests are usually adopted to assess the statistical significances. For instance, t-tests, Mann-Whitney U-tests (MWU), and Kolmogorov-Smirnov test (KS). 5 Application Holographic gratings have been widely used in optical instruments for aberration corrections. In particular, Varied-Line-Spacing (VLS) holographic grating is distinguished by the high order aberration eliminating capability in diffractive optical systems. It is commonly used in high resolution spectrometers and monochromaters. A recording optical system of VLS holographic grating is outlined in [31]. 5.1 Problem Modelling The core component descriptions of the optical systems are listed as follows [30]: M1 , M2 : Two spherical mirrors C, D : Two coherent point sources G : A grating blank In this system, there are two light point sources C and D. They emit light rays which are then reflected by mirrors M1 and M2 respectively. After the reflection, the light rays are projected onto the grating blank G. More details are given in [31, 26]. The objective for the design is to find several sets of design variables (or recording parameters [31]) to form the expected groove shape of G (or the distribution of groove density [30]). The design variables are listed as follows: γ : ηC : δ : ηD : pC : qC : pD : qD : The The The The The The The The incident angle of the ray O1 O incident angle of the ray CO1 incident angle of the ray O2 O incident angle of the ray DO2 distance between C and M1 (CO1 ) distance between M1 and G (O1 O) distance between D and M2 (DO2 ) distance between M2 and G (O2 O) 7 Mathematically, the goal is to minimize the definite integral of the square R w error between the expected groove density and practical groove density [31]: min J = −w0 0 (np − ne )2 dw where w0 is the half-width of the grating, np is the practical groove density, and ne is the expected groove density. These two groove densities are complicated functions of the design variables. Ling et al. have further derived the above formula into a simpler one [30]: min J = r12 + w02 (2r1 r3 + r22 ) w04 (r32 + 2r2 r4 ) w06 r42 + + 3 5 7 j20 − n0 b2 λ0 j40 r4 = − n0 b4 2λ0 j10 − n0 , λ0 3j30 r3 = − n0 b3 , 2λ0 r2 = r1 = where j10 , j20 , j30 and j40 are the functions of the design variables, which are n10 , n20 , n30 and n40 respectively in [26]. Theoretically, the above objective is simple and clear. Unfortunately, there are many other auxiliary optical components in practice, which constraints are too difficult to be expressed and solved in mathematical forms. An optimal solution is not necessarily a feasible and favorable solution. Optical engineers often need to tune the design variables to find as many optimal solutions as possible for multiple trials. Multimodal optimization becomes necessary for this design problem. 5.2 Performance measurements As the objective function is an unknown landscape, the exact optima information is not available. Thus the previous performance metrics cannot be adopted. We propose two new performance metrics in this section. The first one is the best fitness, which is the fitness value of the fittest individual in the last population. The second one is the number of distinct peaks, where a distinct peak is considered found when there exists a individual which fitness value is below a threshold 0.0001 and there isn’t any other individual found as a peak before within 0.1 Euclidean distance in the last population. The threshold is chosen to 0.0001 because the fitness values of the solutions found in [31] are around this order of magnitude. On the other hand, the distance is chosen to 0.1 Euclidean distance because it has already been set for considering peaks found in peak ratio [43, 23]. Nonetheless, it is undeniable that such a threshold may not be suitable for this application because the landscape is unknown, although the value of 0.1 is the best choice we can adopt in this study. 5.3 Parameter setting CrowdingDE-STL [49], CrowdingDE-TL [49], CrowdingDE-SL [49], Crowding Genetic Algorithm (CrowdingGA) [13], CrowdingDE [40], Fitness Sharing Genetic Algorithm (SharingGA) [7], SharingDE [40], Species Conserving Genetic Algorithm (SCGA) [17], SDE 8 Table 1: Results for all algorithms tested on the VLS holographic grating design problem (50 runs) Measurement Mean of Best Fitness StDev of Best Fitness Mean of Peaks Found StDev of Peaks Found Measurement Mean of Best Fitness StDev of Best Fitness Mean of Peaks Found StDev of Peaks Found CrowdingDE-STL [49] 8.29E-08 2.91E-07 41.42 13.07 SharingGA [7] 1.87E+04 6.82E+04 0.0 0.0 CrowdingDE-TL [49] 7.17E-07 5.01E-06 45.54 9.00 SharingDE [40] 1.74E+02 2.65E+02 0.0 0.0 CrowdingDE-SL [49] 1.18E-07 4.04E-07 43.38 10.69 SDE [18] 1.13E+00 1.56E+00 0.06 0.31 CrowdingGA [13] 9.02E-06 3.40E-05 8.94 5.04 SCGA [17] 1.24E+02 4.59E+02 0.02 0.14 CrowdingDE [40] 3.66E-06 2.31E-05 41.98 14.26 UN [12] 9.19E-04 3.15E-03 7.22 3.92 [18], and UN [12] are selected for illustrative purposes in this application. All the algorithms were run up to a maximum of 10000 fitness function evaluations. The above performance metrics were obtained by taking the average and standard deviation of 50 runs. The groove density parameters followed the setting in [31]: n0 = 1.400 × 103 (line/mm), b2 = 8.2453 × 10−4 (1/mm), b3 = 3.0015 × 10−7 (1/mm2 ) and b4 = 0.0000 × 10−10 (1/mm3 ). The half-width w0 was 90mm. The radii of spherical mirrors M1 and M2 were 1000mm. The recording wavelength (λ0 ) was 413.1nm. The population size of all the algorithms was set to 50. The previous settings remained the same, except the algorithm-specific parameters: The species distance of SDE and SCGA was set to 1000. The scaling factor and niche radius of SharingDE and SharingGA were set to 1 and 1000 respectively. The discount factor of the temporal locality was set to 0.5. The survival selection method of the non-crowding algorithms was set to binary tournament [12]. 5.4 Results The result is tabulated in Table 1. It can be observed that CrowdingDE-STL can achieve the best fitness whereas CrowdingDE-TL can acheive the best number of peaks found. To compare the algorithms rigorously, statistical tests have also been used. The results are depicted in Figure 1. One can observe that there are some statistically significant performance differences among them. In particular, CrowdingDE-based methods are shown to have the results statistically different from CrowdingGA, SharingGA, SharingDE, SDE, and SCGA. Some configurations obtained after a run of CrowdingDE-STL on this problem are depicted in Figure 2. It can be seen that they are totally different and feasible configurations with which optical engineers can feel free to perform multiple trials after the single run. 6 Discussion To conclude, we have briefly reviewed the state-of-the-arts methods of evolutionary multimodal optimization from different perspectives in this chapter. Different evolutionary 9 multimodal optimization methodologies are described. To compare them fairly, we described different benchmarking techniques such as performance metrics, test functions, and statistical tests. An application to Varied-Line-Spacing (VLS) holographic grating is presented to demonstrate the real-wold applicability of evolutionary multimodal optimization. Nonetheless, we would like to note several current limitations of evolutionary multimodal optimization as well as the possible solutions at the end of this chapter. First, most of the past studies just focus on low dimensional test functions for benchmarking. More high dimensional test functions should be incorporated in the future. Second, we would like to point out that evolutionary multimodal optimization is actually far from just finding multiple optima because the algorithms for multimodal optimization usually not only locate multiple optima in a single run, but also preserve their population diversity throughout a run, resulting in their global optimization ability on multimodal functions. Moreover, the techniques for multimodal optimization are usually borrowed as diversity maintenance techniques to other problems. Third, the computational complexities of the methods are usually very high comparing with the other methods since they involve population diversity maintenance which implies that the related survival operators need to take into account the other individuals, resulting in additional time complexity. References [1] David Beasley, David R. Bull, and Ralph R. Martin. A sequential niche technique for multimodal function optimization. Evol. Comput., 1(2):101–125, 1993. [2] Mourad Bessaou, Alain Pétrowski, and Patrick Siarry. Island model cooperating with speciation for multimodal optimization. In PPSN VI: Proceedings of the 6th International Conference on Parallel Problem Solving from Nature, pages 437–446, London, UK, 2000. Springer-Verlag. [3] Daniel Joseph Cavicchio. Adaptive search using simulated evolution. 1970. [4] Kalyanmoy Deb and Amit Saha. Finding multiple solutions for multimodal optimization problems using a multi-objective evolutionary approach. In Proceedings of the 12th Annual Conference on Genetic and Evolutionary Computation, GECCO ’10, pages 447–454, New York, NY, USA, 2010. ACM. [5] G. Dick. Automatic identification of the niche radius using spatially-structured clearing methods. In 2010 IEEE Congress on Evolutionary Computation (CEC), pages 1 –8, july 2010. [6] David E. Goldberg. Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1989. 10 [7] David E. Goldberg and Jon Richardson. Genetic algorithms with sharing for multimodal function optimization. In Proceedings of the Second International Conference on Genetic algorithms and their application, pages 41–49, Hillsdale, NJ, USA, 1987. L. Erlbaum Associates Inc. [8] Nikolaus Hansen and Andreas Ostermeier. Completely derandomized self-adaptation in evolution strategies. Evol. Comput., 9:159–195, June 2001. [9] John H. Holland. Adaptation in natural and artificial systems. MIT Press, Cambridge, MA, USA, 1992. [10] Zhen Ji, Huilian Liao, Yiwei Wang, and Q.H. Wu. A novel intelligent particle optimizer for global optimization of multimodal functions. In CEC 2007. IEEE Congress on Evolutionary Computation, 2007, pages 3272 –3275, sept. 2007. [11] Yaochu Jin, M. Olhofer, and B. Sendhoff. A framework for evolutionary optimization with approximate fitness functions. IEEE Transactions on Evolutionary Computation, 6(5):481–494, 2002. [12] Kenneth A. De Jong. Evolutionary Computation. A Unified Approach. MIT Press, Cambridge, MA, USA, 2006. [13] Kenneth Alan De Jong. An analysis of the behavior of a class of genetic adaptive systems. PhD thesis, University of Michigan, Ann Arbor, MI, USA, 1975. [14] Yau-Tarng Juang, Shen-Lung Tung, and Hung-Chih Chiu. Adaptive fuzzy particle swarm optimization for global optimization of multimodal functions. Information Sciences, 181(20):4539 – 4549, 2011. Special Issue on Interpretable Fuzzy Systems. [15] Naoya Karatsu, Yuichi Nagata, Isao Ono, and Shigenobu Kobayashi. Globally multimodal function optimization by real-coded genetic algorithms using traps. In 2010 IEEE Congress on Evolutionary Computation (CEC), pages 1–8, 2010. [16] M. Kronfeld and A. Zell. Towards scalability in niching methods. In 2010 IEEE Congress on Evolutionary Computation (CEC), pages 1 –8, july 2010. [17] Jian Ping Li, Marton E. Balazs, Geoffrey T. Parks, and P. John Clarkson. A species conserving genetic algorithm for multimodal function optimization. Evol. Comput., 10(3):207–234, 2002. [18] Xiaodong Li. Efficient differential evolution using speciation for multimodal function optimization. In GECCO ’05: Proceedings of the 2005 conference on Genetic and evolutionary computation, pages 873–880, New York, NY, USA, 2005. ACM. 11 [19] Xiaodong Li. Niching without niching parameters: Particle swarm optimization using a ring topology. IEEE Transactions on Evolutionary Computation, 14(1):150 –169, feb. 2010. [20] Xiaodong Li, Ke Tang, Mohammad N. Omidvar, Zhenyu Yang, and Kai Qin. Benchmark functions for the cec 2013 special session and competition on large-scale global optimization, 2013. [21] Li Liu and Wenbo Xu. A cooperative artificial immune network with particle swarm behavior for multimodal function optimization. In CEC 2008. (IEEE World Congress on Computational Intelligence). IEEE Congress on Evolutionary Computation, 2008, pages 1550 –1555, june 2008. [22] Lili Liu, Shengxiang Yang, and Dingwei Wang. Force-imitated particle swarm optimization using the near-neighbor effect for locating multiple optima. Information Sciences, In Press, Uncorrected Proof:–, 2010. [23] Rodica I. Lung, Camelia Chira, and D. Dumitrescu. An agent-based collaborative evolutionary model for multimodal optimization. In GECCO ’08: Proceedings of the 2008 GECCO conference companion on Genetic and evolutionary computation, pages 1969–1976, New York, NY, USA, 2008. ACM. [24] Zbigniew Michalewicz. Genetic algorithms + data structures = evolution programs (3rd ed.). Springer-Verlag, London, UK, 1996. [25] K. Najim and A.S. Poznyak. Multimodal searching technique based on learning automata with continuous input and changing number of actions. IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics, 26(4):666 –673, aug. 1996. [26] Takeshi Namioka and Masato Koike. Aspheric wave-front recording optics for holographic gratings. Appl. Opt., 34(13):2180–2186, 1995. [27] A. Nickabadi, M.M. Ebadzadeh, and R. Safabakhsh. Evaluating the performance of dnpso in dynamic environments. pages 2640 –2645, oct. 2008. [28] Yew S. Ong, Prasanth B. Nair, and Andrew J. Keane. Evolutionary optimization of computationally expensive problems via surrogate modeling. AIAA Journal, 41(4):687 –696, 2003. [29] A. Petrowski. A clearing procedure as a niching method for genetic algorithms. In Proceedings of IEEE International Conference on Evolutionary Computation, 1996, pages 798–803, Nagoya, Japan, May 1996. [30] Ling Qing, Wu Gang, and Wang Qiuping. Restricted evolution based multimodal function optimization in holographic grating design. In The 2005 IEEE Congress 12 on Evolutionary Computation, 2005, volume 1, pages 789–794, Edinburgh, Scotland,, September 2005. [31] Ling Qing, Wu Gang, Yang Zaiyue, and Wang Qiuping. Crowding clustering genetic algorithm for multimodal function optimization. Appl. Soft Comput., 8(1):88–95, 2008. [32] Bo-Yang Qu and P.N. Suganthan. Novel multimodal problems and differential evolution with ensemble of restricted tournament selection. In 2010 IEEE Congress on Evolutionary Computation (CEC), pages 1 –7, july 2010. [33] Yun-Wei Shang and Yu-Huang Qiu. A note on the extended rosenbrock function. Evol. Comput., 14(1):119–126, 2006. [34] Ofer Shir and Thomas Back. Niche radius adaptation in the cma-es niching algorithm. In Thomas Runarsson, Hans-Georg Beyer, Edmund Burke, Juan Merelo-Guervos, L. Whitley, and Xin Yao, editors, Parallel Problem Solving from Nature - PPSN IX, volume 4193 of Lecture Notes in Computer Science, pages 142–151. Springer Berlin / Heidelberg, 2006. [35] Ofer M. Shir, Michael Emmerich, and Thomas Bäck. Adaptive niche radii and niche shapes approaches for niching with the cma-es. Evol. Comput., 18:97–126, March 2010. [36] Gulshan Singh and Dr. Kalyanmoy Deb. Comparison of multi-modal optimization algorithms based on evolutionary algorithms. In GECCO ’06: Proceedings of the 8th annual conference on Genetic and evolutionary computation, pages 1305–1312, New York, NY, USA, 2006. ACM. [37] M. Srinivas and L.M. Patnaik. Adaptive probabilities of crossover and mutation in genetic algorithms. IEEE Transactions on Systems, Man and Cybernetics, 24(4):656 –667, apr. 1994. [38] C. Stoean, M. Preuss, R. Stoean, and D. Dumitrescu. Multimodal optimization by means of a topological species conservation algorithm. IEEE Transactions on Evolutionary Computation, 14(6):842 –864, dec. 2010. [39] K. Sundareswaran and V.T. Sreedevi. Development of novel optimization procedure based on honey bee foraging behavior. pages 1220 –1225, oct. 2008. [40] R. Thomsen. Multimodal optimization using crowding-based differential evolution. In CEC2004. IEEE Congress on Evolutionary Computation, 2004, volume 2, pages 1382–1389, June 2004. [41] Thomas Weise. Global Optimization Algorithms ? Theory and Application. Thomas Weise, july 16, 2007 edition, July 2007. Online available at http://www.itweise.de/projects/book.pdf. 13 [42] Ka-Chun Wong, Tak-Ming Chan, Chengbin. Peng, Yue Li, and Zhaolei Zhang. DNA motif elucidation using belief propagation. Nucleic Acids Res., 41(16):e153, Sep 2013. [43] Ka-Chun Wong, Kwong-Sak Leung, and Man-Hon Wong. An evolutionary algorithm with species-specific explosion for multimodal optimization. In GECCO ’09: Proceedings of the 11th Annual conference on Genetic and evolutionary computation, pages 923–930, New York, NY, USA, 2009. ACM. [44] Ka-Chun Wong, Kwong-Sak Leung, and Man-Hon Wong. Effect of spatial locality on an evolutionary algorithm for multimodal optimization. In EvoApplications 2010, Part I, LNCS 6024. Springer-Verlag, 2010. [45] Ka-Chun Wong, Kwong-Sak Leung, and Man Hon Wong. Protein structure prediction on a lattice model via multimodal optimization techniques. In GECCO ’10: Proceedings of the 12th annual conference on Genetic and evolutionary computation, pages 155–162, New York, NY, USA, 2010. ACM. [46] Ka-Chun Wong, Yue Li, Chengbin. Peng, and Zhaolei Zhang. SignalSpider: probabilistic pattern discovery on multiple normalized ChIP-Seq signal profiles. Bioinformatics, Sep 2014. [47] Ka-Chun Wong, Chengbin Peng, Yue Li, and Tak-Ming Chan. Herd clustering: A synergistic data clustering approach using collective intelligence. Applied Soft Computing, 23:61–75, 2014. [48] Ka-Chun Wong, Chengbin Peng, Man-Hon Wong, and Kwong-Sak Leung. Generalizing and learning protein-dna binding sequence representations by an evolutionary algorithm. Soft Computing - A Fusion of Foundations, Methodologies and Applications, 15:1631–1642, 2011. 10.1007/s00500-011-0692-5. [49] Ka-Chun Wong, Chun-Ho Wu, Ricky KP Mok, Chengbin Peng, and Zhaolei Zhang. Evolutionary multimodal optimization using the principle of locality. Information Sciences, 194:138–170, 2012. [50] Ka-Chun Wong and Zhaolei Zhang. SNPdryad: predicting deleterious nonsynonymous human SNPs using only orthologous protein sequences. Bioinformatics, Jan 2014. [51] Chun-Ho Wu, Na Dong, Waihung Ip, Ching-Yuen Chan, Kei-Leung Yung, and Zengqiang Chen. Chaotic hybrid algorithm and its application in circle detection. In EvoWorkshops, pages 302–311, 2010. [52] E. L. Yu and P. N. Suganthan. Ensemble of niching algorithms. Inf. Sci., 180:2815– 2833, August 2010. 14 [53] E. L. Yu and P.N. Suganthan. Empirical comparison of niching methods on hybrid composition functions. In CEC 2008. (IEEE World Congress on Computational Intelligence). IEEE Congress on Evolutionary Computation, 2008, pages 2194 –2201, june 2008. 15 (a) Best Fitness (b) Best Fitness (c) Peaks Found (d) Peaks Found Figure 1: For Table 1, we depict the statistical significance test results for the pairwise performance differences between all algorithms tested on the VLS holgraphic grating design problem by Mann-Whitney U-test (MWU) and Two-sample Kolmogorov-Smirnov test (KS) with p=0.05. Each sub-figure correspond to the performance comparison using a metric by a statistical test. The vertical axis is the same as the horizontal axis. Each algorithm is represented by a number on each axis. The numbering of the algorithms follows the order in Table 1. For instance, 1 refers to CrowdingDE-STL, 2 refers to CrowdingDE-TL......10 refers to UN. The color of each block represents whether the algorithm indicated by the horizontal axis shows a performance different from the algorithm indicated by the vertical axis in a statistically significant way. The black color denotes the p-values higher than 0.05 whereas the white color denotes the p-values lower than 0.05. The even numbered sub-figures are the results obtained by MWU, whereas the odd numbered sub-figures are the results obtained by KS. 16 (a) (b) Figure 2: Configurations obtained by a single run of CrowdingDE-STL on the VLS holographic grating design problem. It can be seen that they are totally different and feasible configurations with which optical engineers can feel free to perform multiple trials after the single run. 17
9cs.NE
The Non-Uniform k-Center Problem Deeparnab Chakrabarty Prachi Goyal Ravishankar Krishnaswamy arXiv:1605.03692v2 [cs.DS] 13 May 2016 Microsoft Research, India dechakr,t-prgoya,[email protected] Abstract In this paper, we introduce and study the Non-Uniform k-Center (NUkC) problem. Given a finite metric space (X, d) and a collection of balls of radii {r1 ≥ · · · ≥ rk }, the NUkC problem is to find a placement of their centers on the metric space and find the minimum dilation α, such that the union of balls of radius α · ri around the ith center covers all the points in X. This problem naturally arises as a min-max vehicle routing problem with fleets of different speeds. The NUkC problem generalizes the classic k-center problem when all the k radii are the same (which can be assumed to be 1 after scaling). It also generalizes the k-center with outliers (kCwO for short) problem when there are k balls of radius 1 and ` balls of radius 0. There are 2-approximation and 3-approximation algorithms known for these problems respectively; the former is best possible unless P=NP and the latter remains unimproved for 15 years. We first observe that no O(1)-approximation is to the optimal dilation is possible unless P=NP, implying that the NUkC problem is more non-trivial than the above two problems. Our main algorithmic result is an (O(1), O(1))-bi-criteria approximation result: we give an O(1)-approximation to the optimal dilation, however, we may open Θ(1) centers of each radii. Our techniques also allow us to prove a simple (uni-criteria), optimal 2-approximation to the kCwO problem improving upon the long-standing 3-factor. Our main technical contribution is a connection between the NUkC problem and the so-called firefighter problems on trees which have been studied recently in the TCS community. We show NUkC is as hard as the firefighter problem. While we don’t know if the converse is true, we are able to adapt ideas from recent works [3, 1] in non-trivial ways to obtain our constant factor bi-criteria approximation. 1 Introduction Source location and vehicle routing problems are extremely well studied [19, 23, 9] in operations research. Consider the following location+routing problem: we are given a set of k ambulances with speeds s1 , s2 , . . . , sk respectively, and we have to find the depot locations for these vehicles in a metric space (X, d) such that any point in the space can be served by some ambulance as fast as possible. If all speeds were the same, then we would place the ambulances in locations S such that maxv∈X d(v, S) is minimized – this is the famous k-center problem. Differing speeds, however, leads to non-uniformity, thus motivating the titular problem we consider. Definition 1.1 (The Non-Uniform k-Center Problem (NUkC)). The input to the problem is a metric space (X, d) and a collection of k balls of radii {r1 ≥ r2 ≥ · · · ≥ rk }. The objective is to find a placement C ⊆ X of the centers of these balls, so as to minimize the dilation parameter α such that the union of balls of radius α · ri around the ith center covers all of X. Equivalently, we need to find centers {c1 , . . . , ck } to minimize i) maxv∈X minki=1 d(v,c ri . 1 As mentioned above, when all ri ’s are the same (and equal to 1 by scaling), we get the k-center problem. The k-center problem was originally studied by Gonzalez [10] and Hochbaum and Shmoys [13] as a clustering problem of partitioning a metric space into different clusters to minimize maximum intra-cluster distances. One issue (see Figure 1 for an illustration and refer to [11] for a more detailed explanation) with k-center (and also k-median/means) as an objective function for clustering is that it favors clusters of similar sizes with respect to cluster radii. However, in presence of qualitative information on the differing cluster sizes, the non-uniform versions of the problem can arguably provide more nuanced solutions. One such extreme special case was considered as the “clustering with outliers” problem [7] where some fixed number/fractions of points in the metric space need not be covered by the clusters. In particular, Charikar et al [7] consider (among many problems) the k-center with outlier problem (kCwO, for short) and show a 3-approximation for this problem. It is easy to see that kCwO is a special case of the NUkC problem when there are k balls of radius 1 and ` (the number of outliers) balls of radius 0. Motivated by the aforementioned reasons (both from facility location as well as from clustering settings), we investigate the worst-case complexity of the NUkC problem. Gonzalez [10] and Hochbaum and Shmoys [13] give 2-approximations for the k-center problem, and also show that no better factor is possible unless P = NP. Charikar et al [7] give a 3-approximation for the kCwO problem, and this has been the best factor known for 15 years. Given these algorithms, it is natural to wonder if a simple O(1)-approximation exists for the NUkC problem. In fact, our first result shows a qualitative distinction between NUkC and these problems: constant-approximations are impossible for NUkC unless P=NP. Theorem 1.2. For any constant c ≥ 1, the NUkC problem does not admit a c-factor approximation unless P = N P , even when the underlying metric is a tree metric. The hardness result is by a reduction from the so-called resource minimization for fire containment problem on trees (RMFC-T, in short), a variant of the firefighter problem. To circumvent the above hardness, we give the following bi-criteria approximation algorithm which is the main result of the paper, and which further highlights the connections with RMFC-T since our algorithms heavily rely on the recent algorithms for RMFC-T [3, 1]. An (a, b)-factor bi-criteria algorithm for NUkC returns a solution which places at most a balls of each type (thus in total it may use as many as a · k balls), and the dilation is at most b times the optimum dilation for the instance which places exactly one ball of each type. Theorem 1.3. There is an (O(1), O(1))-factor bi-criteria algorithm for the NUkC problem. Figure 1: The left figure shows the dataset, the middle figure shows a traditional k-center clustering, and the right figure depicts a non-uniform clustering 2 Furthermore, as we elucidate below, our techniques also give uni-criteria results when √ the number of distinct radii is 2. In particular, we get a 2-approximation for the kCwO problem and a (1+ 5)-approximation when there are only two distinct types of radii. Theorem 1.4. There is a 2-approximation for the kCwO problem. √ Theorem 1.5. There is a (1 + 5)-approximation for the NUkC problem when the number of distinct radii is at most 2. 1.1 Discussion on Techniques Our proofs of Theorems 1.2 and 1.3 shows a strong connection between NUkC and the so-called resource minimization for fire containment problem on trees (RMFC-T, in short). This connection is one of the main findings of the paper, so we first formally define this problem. Definition 1.6 (Resource Minimization for Fire Containment on Trees (RMFC-T)). Given a rooted tree T as input, the goal is to select a collection of non-root nodes N from T such that (a) every root-leaf path has at least one vertex from N , and (b) maxt |N ∩ Lt | is minimized, where Lt is the tth-layer of T , that is, the vertices of T at exactly distance t from the root. To understand the reason behind the name, consider a fire starting at the root spreading to neighboring vertices each day; the RMFC-T problem minimizes the number of firefighters needed per day so as to prevent the fire spreading to the leaves of T . It is NP-hard to decide if the optimum of RMFC-T is 1 or not [8, 17]. Given any RMFC-T instance and any c > 1, we construct an NUkC instance on a tree metric such that in the “yes” case there is always a placement with dilation = 1 which covers the metric, while in the “no” case even a dilation of c doesn’t help. Upon understanding our hardness construction, the inquisitive reader may wonder if the reduction also works in the other direction, i.e., whether we can solve NUkC using a reduction to RMFC-T problem. Unfortunately, we do not know if this is true even for two types of radii. However, as we explain below we still can use positive results for the RMFC-T problem to design good algorithms for the NUkC problem. Indeed, we start off by considering the natural LP relaxation for the NUkC problem and describe an LP-aware reduction of NUkC to RMFC-T. More precisely, given a feasible solution to the LP-relaxation for the given NUkC instance, we describe a procedure to obtain an instance of RMFC-T defined by a tree T , with the following properties: (i) we can exhibit a feasible fractional solution for the LP relaxation of the RMFC-T instance, and (ii) given any feasible integral solution to the RMFC-T instance, we can obtain a feasible integral solution to the NUkC instance which dilates the radii by at most a constant factor. Therefore, an LP-based ρ-approximation to RMFC-T would immediately imply (ρ, O(1))-bicriteria approximation algorithms for NUkC. This already implies Theorem 1.4 and Theorem 1.5 since the corresponding RMFC-T instances have no integrality gap. Also, using a result of Chalermsook and Chuzhoy [3], we directly obtain an (O(log∗ n), O(1))-bicriteria approximation algorithm for NUkC. Here we reach a technical bottleneck: Chalermsook and Chuzhoy [3] also show that the integrality gap of the natural LP relaxation for RMFC-T is Ω(log∗ n). When combined with our hardness reduction in Theorem 1.2 , this also implies a (Ω(log∗ n), c) integrality gap for any constant c > 1 for the natural LP relaxation for NUkC. That is, even if we allow a violation of c in the radius dilation, there is a Ω(log∗ n)integrality gap in terms of the violation in number of balls opened of each type. However, very recently, Adjiashvili, Baggio and Zenklusen [1] show an improved O(1)-approximation for the RMFC-T problem. At a very high level, the main technique in [1] is the following. Given an 3 RMFC-T instance, they carefully and efficiently “guess” a subset of the optimum solution, such that the natural LP-relaxation for covering the uncovered leaves has O(1)-integrality gap. However, this guessing procedure crucially uses the tree structure of T in the RMFC-T problem. Unfortunately for us though, we get the RMFC-T tree only after solving the LP for NUkC, which already has an Ω(log∗ n)-gap! Nevertheless, inspired by the ideas in [1], we show that we can also efficiently preprocess an NUkC instance, “guessing” the positions of a certain number of balls in an optimum solution, such that the standard LP-relaxation for covering the uncovered points indeed has O(1)-gap. We can then invoke the LP-aware embedding reduction to RMFC-T at this juncture to solve our problem. This is quite delicate, and is the most technically involved part of the paper. 1.2 Related Work and Open Questions The k-center problem [10, 13] and the k-center with outliers [7] probems are classic problems in approximation algorithms and clustering. These problems have also been investigated under various settings such as the incremental model [5, 22], streaming model [4, 22], and more recently in the map-reduce model [14, 21]. Similarly, the k-median [6, 15, 20, 2] and k-means [15, 16, 12, 18] problems are also classic problems studied extensively in approximation algorithms and clustering. The generalization of k-median to a routing+location problem was also studied recently [9]. It would be interesting to explore the complexity of the non-uniform versions of these problems. Another direction would be to explore if the new non-uniform model can be useful in solving clustering problems arising in practice. 2 Hardness Reduction In this section, we prove Theorem 1.2 based on the following NP-hardness [17] for RMFC-T. Theorem 2.1. [17] Given a tree T whose leaves are at the same distance from the root, it is NP-hard to distinguish between the following two cases. YES: There is a solution to the RMFC-T instance of value 1. NO: All solutions to the RMFC-T instance has value 2. Given an RMFC-T instance defined by tree T , we now describe the construction of our NUkC instance. Let h be the height of the tree, and let Lt denote the vertices of the tree at distance exactly t from the root. So, the leaves constitute Lh since all leaves are at the same distance from the root. The NUkC instance, I(T ), is defined by the metric space (X, d), and a collection of balls. The points in our metric space will correspond to the leaves of the tree, i.e., X = Lh . To define the metric, we assign a weight d(e) = (2c + 1)h−i+1 for each edge whose one endpoint is in Li and the other in Li−1 ; we then define d be the shortest-path metric on X induced by this weighted tree. Finally, we set k = h, and define the k radii r1 ≥ r2 ≥ . . . ≥ rk iteratively as follows: define rk := 0, and for k ≥ i > 1, set ri−1 := (2c + 1) · ri + 2(2c + 1). This completes the NUkC instance. Before proceeding we make the simple observation: for any two leaves u and u0 with lca v ∈ Lt , we have d(u, u0 ) = 2(2c + 1 + (2c + 1)2 + · · · + (2c + 1)h−t ) = rt . The following lemma proves Theorem 1.2. Lemma 2.2. If T is the YES case of Theorem 2.1, then I(T ) has optimum dilation = 2. If T is the NO case of 2.1, then I(T ) has optimum dilation ≥ 2c. Proof. Suppose T is in the YES case, and there is a solution to RMFC-T which selects at most 1 node from each level Lt . If v ∈ Lt is selected, then select a center cv arbitrarily from any leaf in the sub-tree rooted at v and open the ball of radius rt . We now need to show all points in X = Lh are covered by these balls. Let u 4 be any leaf; there must be a vertex v in some level Lt in u’s path to the root such that a ball of radius rt is opened at cv . However, d(u, cv ) ≤ d(u, v) + d(v, cv ) = 2rt and so the ball of radius 2rt around cv covers u. Now suppose T is in the NO case, and the NUkC instance has a solution with optimum dilation < 2c. We build a good solution for the RMFC-T instance N as follows: suppose the NUkC solution opens the radius < 2c · rt ball around center u. Let v be the vertex on the u-root path appearing in level Lt . We then pick this node in N . Observe two things: first, this ball covers all the leaves in the sub-tree rooted at v since rt ≥ d(u, u0 ) for any such u0 . Furthermore, since the NUkC solution has only one ball of each radius, we get that |N ∩ Lt | ≤ 1. Finally, since d(u, w) ≥ 2c · rt for all leaves w not in the sub-tree rooted at v, the ball of radius rt around u doesn’t contain any leaves other than those rooted at v. Contra-positively, since all leaves w are covered in some ball, every leaf must lie in the sub-tree of some vertex picked in N . That is, N is a solution to RMFC-T with value = 1 contradicting the NO case. 3 LP-aware reduction from NUkC to RMFC-T For reasons which will be apparent soon, we consider instances I of NUkC counting multiplicites. That is, we consider instance to be a collection of tuples (k1 , r1 ), . . . , (kh , rh ) to indicate there are ki balls of Pan h radius ri . So t=1 kt = k. Intuitively, the reason we do this is that if two radii rt and rt+1 are “close-by” then it makes sense to round up rt+1 to rt and increase kt , losing only a constant-factor loss in the dilation. LP-relaxation for NUkC. We now state the natural LP relaxation for a given NUkC instance I. For each point p ∈ X and radius type ri , we have an indicator variable xp,i ≥ 0 for whether we place a ball of radius ri centered at p. By doing a binary search on the optimal dilation and scaling, we may assume that the optimum dilation is 1. Then, the following linear program must be feasible. Below, we use B(q, ri ) to denote the set of points within distance ri from q. ∀p ∈ X, ∀t ∈ 1, · · · , h h X X t=1 q∈B(p,rt ) X xq,t ≥1 (NUkC LP) ≤ kt xp,t p∈X LP-relaxation for RMFC-T. Since we reduce fractional NUkC to fractional RMFC-T, we now state the natural LP relaxation for RMFC-T on a tree T of depth h + 1. In fact, we will work with the following budgeted-version of RMFC-T (which is equivalent to the original RMFC-T problem — for a proof, see [1]): Instead of minimizing the maximum number of “firefighters” at any level t (that is |N ∩ Lt | where N is the chosen solution), suppose we specify a budget limit of kt on |N ∩ Lt |. The goal is the minimize the maximum dilation of these budgets. Then the following is a natural LP relaxation for the budgeted RMFC-T problem on trees. Here L = Lh is the set of leaves, and Lt are the layer t-nodes. For a leaf node v, let Pv denote the vertex set of the unique leaf-root path excluding the root. min α X yu ≥ 1 ∀v ∈ L, u∈Pv X ∀t ∈ 1, · · · , h u∈Lt 5 yu ≤ α · kt (RMFC-T LP) The LP-aware Reduction to Tree metrics. We now describe our main reduction algorithm, which takes as input an NUkC instance I = {(X, d); (k1 , r1 ), . . . , (kh , rh )} and a feasible solution x to NUkC LP, and returns a budgeted RMFC-T instance IT defined by a tree T along with budgets for each level, and a feasible solution y to RMFC-T LP with dilation 1. The tree we construct will have height h + 1 and the budgeted RMFC-T instance will have budgets precisely kt at level 1 ≤ t ≤ h, and the budget for the leaf level is 0. For clarity, throughout this section we use the word points to denote elements of the metric space in I, and the word vertices/nodes to denote the tree nodes in the RMFC-T instance that we construct. We build the tree T in a bottom-up manner, where in each round, we pick a set of far-away representative points (the distance scale increases as we move up the tree) and cluster all points to their nearest representative. This is similar to a so-called clustering step in many known algorithms for facility location (see, e.g. [6]), but whereas an arbitrary set of far-away representatives would suffice in the facility location algorithms, we need to be careful in how we choose this set to make the overall algorithm work. Formally, each vertex of the tree T is mapped to some point in X, and we denote the mapping of the vertices at level t by ψt : Lt → X. We will maintain that each ψt will be injective, so ψt (u) 6= ψt (v) for u 6= v in Lt . So, ψt−1 is well defined for the range of ψt . The complete algorithm runs in rounds h + 1 to 2 building the tree one level per round. To begin with, the ψh+1 mapping is an arbitrary bijective mapping between L := Lh+1 , the set of leaves of the tree, and the points of X (so, in particular, |L| = |X|). We may assume it to be the identity bijection. In each round t, the range of the mappings become progressively smaller, that is1 , P ψt (Lt ) ⊇ ψt−1 (Lt−1 ). We call ψt (Lt ) as the winners at level t. We now describe round t. Let Covt (p) := q∈B(p,rt ) xq,t denote Pthe fractional amount the point p is covered by radius rt balls in the solution x. Also define Cov≥t (p) := s≥t Covs (p) denoting the fractional amount p is covered by radius rt or smaller balls. Let Covh+1 (p) = 0 for all p. Algorithm 1 Round t of the LP-aware Reduction. Input: Level Lt , subtrees below Lt , the mappings ψs : Ls → X for all t ≤ s ≤ h. Output: Level Lt−1 , the connections between Lt−1 and Lt , and the mapping ψt−1 . Define A = ψt (Lt ) the set of points who are winners at level t. while A 6= ∅ do (a) Choose the point p ∈ A with minimum coverage Cov≥t (p). (b) Let N (p) := {q ∈ A : d(p, q) ≤ 2rt−1 } be the set of all nearby points in A to p. (c) Create a new tree vertex w ∈ Lt−1 corresponding to p and set ψt−1 (w) := p. Call p a winner at level t − 1, and each q ∈ N (p) ⊆ A a loser to p at this level. (d) Create edge (w, v) for tree vertices v ∈ ψt−1 (N (p)) associated with N (p) at level t. (e) Set A ← A \ (N (p)). (f) Set yw = Covt−1 (p). end while Finally, we add a root vertex and connect it to all vertices in L1 . This gives us the final tree T and a solution y which assigns a value to all non-leaf, non-root vertices of the tree T . The following claim asserts well-definedness of the algorithm. Lemma 3.1. The solution y is a feasible solution to RMFC-T LP on IT with dilation 1. Proof. The proof is via two claims for the two different set of inequalities. 1 We are using the notation ψ(X) := S x∈X ψ(x). 6 Claim 3.2. For all 1 ≤ t ≤ h, we have P w∈Lt yw ≤ kt . Proof. Fix t. Let P P Wt ⊆ X denote the winners at level t, that is, Wt = ψt (Lt ). By definition of the algorithm, y = w∈Lt w p∈Wt Covt (p). Now note that for any two points p, q ∈ Wt , we have B(p, rt ) ∩ B(q, rt ) = ∅. To see this, consider the first point which enters A in the (t + 1)th round when Lt was being formed. If this is p, then all points in the radius t ball are deleted from A. Since the balls are disjoint, the second P 2rP inequality of NUkC LP implies p∈Wt q∈B(p,rt ) xq,t ≤ kt . The second summand in the LHS is precisely Covt (p). P Claim 3.3. For any leaf node w ∈ L, we have v∈Pw yv ≥ 1. Proof. We start with an observation. Fix a level t and a winner point p ∈ Wt . Let u ∈ Lt such that ψt (u) = p. Since Wt ⊆ Wt+1 ⊆ · · · ⊆ Wh , there is a leaf v in the subtree rooted at u corresponding to p. Moreover, by 0 0 the P way we formed our tree edges in step (d), we have that ψs (w ) = p for all w in the (u, v)-path and hence w0 ∈[u,v]-path yw0 is precisely Cov≥t (p). Now, for contradiction, suppose there is some leaf corresponding to, say point p, such that the root-leaf path has total y-assignment less than 1. Then, pick the point, among all such unsatisfied points p, who appears in a winning set Wt with t as small as possible. By the preceding observation, the total y-assignment p receives on its path from level h to level t is −1 exactly Cov≥t (p). Moreover, suppose p loses to q at level t − 1, i.e., ψt−1 (p) is a child of ψt−1 (q). In particular, it means that q has also been a winner up to level t and so the total y-assignment on q’s path −1 upto level t is also precisely Cov≥t (q). Additionally, since ψt−1 (q) became the parent node for ψt−1 (p), we know that Cov≥t (q) ≤ Cov≥t (p) due to the way we choose winners in step (a) of the while loop. Finally, by our maximality assumption on p, we know that q is fractionally satisfied by the y-solution. Therefore, there is fractional assignment of at least (1 − Cov≥t (q)) on q’s path from nodes in level t − 1 to level 1. Putting these observations together, we get that the total fractional assignment on p’s root-leaf path is at least Cov≥t (p) + (1 − Cov≥t (q)) ≥ 1, which results in the desired contradiction. The following lemma shows that any good integral solution to the RMFC-T instance IT can be converted to a good integral solution for the NUkC instance I. Lemma 3.4. Suppose there exists a feasible solution N to IT such that for all 1 ≤ t ≤ h, |N ∩ Lt | ≤ αkt . Then there is a solution to the NUkC instance I that opens, for each 1 ≤ t ≤ h, at most αkt balls of radius ≤ 2r≥t ,where r≥t := rt + rt+1 + · · · + rh . Proof. Construct the NUkC solution as follows: for level 1 ≤ t ≤ h and every vertex w ∈ N ∩ Lt , place the center at ψt (w) of radius 2r≥t . We claim that every point in X is covered by some ball. Indeed, for any p ∈ X, look at the leaf v = ψh+1 (p), and let w ∈ N be a node in the root-leaf path. Let w ∈ Lt for some t. Now observe that d(p, ψt (w)) ≤ 2r≥t ; this is because for any edge (u0 , v 0 ) in the tree where u0 is in Lt and is the parent of v 0 , we have that d(ψt+1 (v 0 ), ψt+1 (u0 )) < 2rt . This completes the reduction, and we now prove a few results which follow easily from known results about the firefighter problem. Theorem 3.5. There is a polynomial time (O(log∗ n), 8)-bi-criteria algorithm for NUkC. 7 Proof. Given any instance I of NUkC, we first club the radii to the nearest power of 2 to get an instance I 0 with radii (k1 , r1 ), · · · , (kh , rh ) such that an (a, b)-factor solution for I 0 is an (a, 2b)-solution for I. Now, by scaling, we assume that the optimal dilation for I 0 is 1; we let x be the feasible solution to the NUkC LP. Then, using Algorithm 1, we can construct the tree IT0 and a feasible solution y to the RMFC-T LP. We can now use the following theorem of Chalermsook and Chuzhoy [3]: given any feasible solution to the RMFC-T LP, we can obtain a feasible set N covering all the leaves such that for all t, |N ∩ Lt | ≤ O(log∗ n)kt . Finally, we can apply Lemma 3.4 to obtain a (O(log∗ n), 4) solution to I 0 (since r≥t ≤ 2rt ). Proof of Theorem 1.4 and Theorem 1.5. We use the following claim regarding the integrality gap of RMFC-T LP for depth 2 trees. Claim 3.6. When h = 2 and kt ’s are integers, given any fractional solution to RMFC-T LP, we can find a feasible integral solution as well. Proof. Given a feasible solution y to RMFC-T LP, we need to find a set N such that |N ∩ Lt | ≤ kt for t = 1, 2. There must exist at least one vertex w ∈ L1 such that yw ∈ (0, 1) for otherwise the solution y is trivially integral. If only one vertex w ∈ L1 is fractional, then since k1 is an integer, we can raise this yw to be an integer as well. So at least two vertices w and w0 in L1 are fractional. Now, without loss of generality, let us assume that |C(w)| ≥ |C(w0 )|, where C(w) is the set of children of w. Now for some small 0 := y + , y 0 := y 0 − , ∀c ∈ C(w), y 0 := y − , and constant 0 <  < 1, we do the following: yw w c w c w0 ∀c ∈ C(w0 ), yc0 := yc + . Note that y(L1 ) remains unchanged, y(L2 ) can only decrease, and root-leaf paths still add to at least 1. We repeat this till we rule out all fractional values. To see the proof of Theorem 1.4, note that an instance of the k-center with outliers problem is an NUkC instance with (k, 1), (`, 0), that is, r1 = 1 and r2 = 0. We solve the LP relaxation and obtain the tree and an RMFC-T solution. The above claim implies a feasible integral solution to RMFC-T since h = 2, and finally note that r≥1 = r1 for kCwO, implying we get a 2-factor approximation. √ The proof of Theorem 1.5 is similar. If√r1 < θr2 where θ = ( 5 + 1)/2, then we simply run k-center with k = k1√+ k2 . This gives a 2θ = 5 + 1-approximation. Otherwise, we apply Lemma 3.4 to get a 2(1 + 1θ ) = 5 + 1-approximation. We end this section with a general theorem, which is an improvement over Lemma 3.4 in the case when many of the radius types are close to each other, in which case r≥t could be much larger than rt . Indeed, the natural way to overcome this would be to group the radius types into geometrically increasing values as we did in the proof of Theorem 3.5. However, for some technical reasons we will not be able to bucket the radius types in the following section, since we would instead be bucketing the number of balls of each radius type in a geometric manner. Instead, we can easily modify Algorithm 1 to build the tree by focusing only on radius types where the radii grow geometrically. Theorem 3.7. Given an NUkC instance I = {M = (X, d), (k1 , r1 ), (k2 , r2 ), . . . , (kh , rh )} and an LP solution x for NUkC LP, there is an efficient reduction which generates an RMFC-T instance IT and an LP solution y to RMFC-T LP, such that the following holds: (i) For any two tree vertices w ∈ Lt and v ∈ Lt0 where w is an ancestor of v (which means t ≤ t0 ), suppose p and q are the corresponding points in the metric space, i.e., p = ψt (w) and q = ψt0 (v), then it holds that d(p, q) ≤ 8 · rt . 8 (ii) Suppose there exists a feasible solution N to IT such that for all 1 ≤ t ≤ h, |N ∩ Lt | ≤ αkt . Then there is a solution to the NUkC instance I that opens, for each 1 ≤ t ≤ h, at most αkt balls of radius at most 8 · rt . 3.1 Proof of Theorem 3.7 Both the algorithm as well as the proof are very similar, and we now provide them for completeness. At a high level, the only difference occurs when we identify and propagate winners: instead of doing it for each radius type, we identify barrier levels where the radius doubles, and perform the clustering step only at the barrier levels. We now present the algorithm, which again proceeds in rounds h + 1, h, h − 1, . . . , 2, but makes jumps whenever there are many clusters of similar radius type. To start with, define rh+1 = 0. Algorithm 2 Round t of the Improved Reduction. Input: Level Lt , subtrees below Lt , the mappings ψs : Ls → X for all t ≤ s ≤ h. Output: Level Lt−1 , the connections between Lt−1 and Lt , and the mapping ψt−1 . Let t0 = mins s.t.rs ≤ 2rt−1 be the type of the largest radius smaller than 2rt−1 . Define A = ψt (Lt ) the set of points who are winners at level t. while A 6= ∅ do (a) Choose the point p ∈ A with minimum coverage Cov≥t (p). (b) Let N (p) := {q ∈ A : d(p, q) ≤ 2rt0 } denote all points in A within 2rt0 from p. (c) Create new vertices wt−1 , . . . , wt0 −1 ∈ Lt−1 , . . . , Lt0 −1 levels respectively, all corresponding to p, i.e., set ψi (w) := p for all t0 − 1 ≤ i ≤ t − 1. Connect each pair of these vertices in successive levels with edges. Call p a winner at levels t − 1, . . . , t0 − 1. (d) Create edge (wt−1 , v) for vertices v ∈ ψt−1 (N (p)) associated with N (p) at level t. (f) Set A ← A \ (N (p)). (g) Set ywi = Covi (p) for all t − 1 ≤ i ≤ t0 − 1. end while Jump to round t0 − 1 of the algorithm. Add t0 − 1 to the set of barrier levels Our proof proceeds almost in an identical manner to those of Lemmas 3.1 and 3.4, but now our tree has an additional property that for any two nodes u ∈ Li and v ∈ Li0 where u is an ancestor of v, the distance between the corresponding points in the metric space p = ψi (u) and q = ψi0 (v) is at most d(p, q) ≤ 8ri , which was the property not true in the earlier reduction. This is easy to see because as we traverse a tree path from u to v, notice that each time we change winners, the distance between the corresponding points in the metric space decreases geometrically. This proves property (i) of Theorem 3.7. With this in hand, the remaining proofs to prove the second property are almost identical to the ones in Section 3 and we sketch them below for completeness. Lemma 3.8. The solution y is a feasible solution to RMFC-T LP on IT with dilation 1. Proof. The proof is via two claims for the two different set of inequalities. P Claim 3.9. For all 1 ≤ t ≤ h, we have w∈Lt yw ≤ kt . Proof. Fix a barrier Plevel t. Let W Pt ⊆ X denote the winners at level t, that is, Wt = ψt (Lt ). By definition of the algorithm, w∈Lt yw = p∈Wt Covt (p). Now note that for any two points p, q ∈ Wt , we have B(p, rt ) ∩ B(q, rt ) = ∅. To see this, consider the first point which enters A in the round (corresponding to the 9 previous barrier) when Lt was being formed. If this is p, then all points in the P radiusP2rt ball is deleted from A. Since the balls are disjoint, the second inequality of NUkC LP implies p∈Wt q∈Bt (p) xq,t ≤ kt . The second summand in the LHS is the definition of Covt (p). The same argument holds for all levels t between two consecutive barrier levels t1 and t2 s.t. t1 > t2 , as the winner set remains the same, and the radius rt is only smaller than the radius rt2 at the barrier t2 . P Claim 3.10. For any leaf node w ∈ L, we have v∈Pw yv ≥ 1. Proof. This proof is identical to that of Claim 3.3, and we repeat it for completeness. Fix a level t and a winner point p ∈ Wt . Let u ∈ Lt such that ψt (u) = p. Since Wt ⊆ Wt+1 ⊆ · · · ⊆ Wh , there is a leaf v in the subtree rooted at u corresponding to p. Moreover, by the Pway we formed our tree edges in step (d), we have that ψs (w) = p for all w0 in the (u, v)-path and hence w0 ∈[u,v]-path yw0 is precisely Cov≥t (p). Now, for contradiction, suppose there is some leaf corresponding to, say point p, such that the root-leaf path has total y-assignment less than 1. Then, pick the point, among all such unsatisfied points p, who appears in a winning set Wt with t as small as possible. By the preceding observation, the total y-assignment p receives on its path from level h to level t is −1 exactly Cov≥t (p). Moreover, suppose p loses to q at level t − 1, i.e., ψt−1 (p) is a child of ψt−1 (q). In particular, it means that q has also been a winner up to level t and so the total y-assignment on q’s path up −1 to level t is also precisely Cov≥t (q). Additionally, since ψt−1 (q) became the parent node for ψt−1 (p), we know that Cov≥t (q) ≤ Cov≥t (p) due to the way we choose winners in step (a) of the while loop. Finally, by our maximality assumption on p, we know that q is fractionally satisfied by the y-solution. Therefore, there is fractional assignment of at least (1 − Cov≥t (q)) on q’s path from nodes in level t − 1 to level 1. Putting these observations together, we get that the total fractional assignment on p’s root-leaf path is at least Cov≥t (p) + (1 − Cov≥t (q)) ≥ 1, which results in the desired contradiction. Finally, the following lemma shows that any good integral solution to the RMFC-T instance IT can be converted to a good integral solution for the NUkC instance I. Lemma 3.11. Suppose there exists a feasible solution N to IT such that for all 1 ≤ t ≤ h, |N ∩ Lt | ≤ αkt . Then there is a solution to the NUkC instance I that opens, for each 1 ≤ t ≤ h, at most αkt balls of radius at most 8rt . Proof. Construct the NUkC solution as follows: for level 1 ≤ t ≤ h and every vertex w ∈ N ∩ Lt , place the center at ψt (w) of radius 8 · rt . We claim that every point in X is covered by some ball. Indeed, for any p ∈ X, look at the leaf v = ψh+1 (p), and let w ∈ N be a node in the root-leaf path which covers it in the instance IT . By property (i) of Theorem 3.7, we have that the distance between ψt (w) and p is at most 8 · rt , and hence the ball of radius 8 · rt around ψt (w) covers p. The number of balls of radius type t is trivially at most αkt . 4 Getting an (O(1), O(1))-approximation algorithm In this section, we improve our approximation factor on the number of clusters from O(log∗ n) to O(1), while maintaining a constant-approximation in the radius dilation. As mentioned in the introduction, this requires more ideas since using NUkC LP one cannot get any factor better than (O(log∗ n), O(1))-bicriteria 10 approximation since any integrality gap for RMFC-T LP translates to a (Ω(log∗ n), Ω(1)) integrality gap for NUkC LP. Our algorithm is heavily inspired by the recent paper of Adjiashvili et al [1] who give an O(1)approximation for the RMFC-T problem. In fact, the structure of our algorithms follows the same three “steps” of their algorithm. Given an RMFC-T instance, [1] first “compress” the input tree to get a new tree whose depth is bounded; secondly, [1] give a partial rounding result which saves “bottom heavy” leaves, that is, leaves which in the LP solution are covered by nodes from low levels; and finally, Adjiashvili et al [1] give a clever partial enumeration algorithm for guessing the nodes from the top levels chosen by the optimum solution. We also proceed in these three steps with the first two being very similar to the first two steps in [1]. However, the enumeration step requires new ideas for our problem. In particular, the enumeration procedure in [1] crucially uses the tree structure of the firefighter instance, and the way our reduction generates the tree for the RMFC-T instance is by using the optimal LP solution for the NUkC instance, which in itself suffers from the Ω(log∗ n) integrality gap. Therefore, we need to devise a more sophisticated enumeration scheme although the basic ideas are guided by those in [1]. Throughout this section, we do not optimize for the constants. 4.1 Part I: Radii Reduction In this part, we describe a preprocessing step which decreases the number of types of radii. This is similar to Theorem 5 in [1]. Theorem 4.1. Let I be an instance of NUkC with radii {r1 , r2 , · · · , rk }. Then we can efficiently construct a new instance Ib with radii multiplicities (k0 , rb0 ), ..., (kL , rbL ) and L = Θ(log k) such that: (i) ki := 2i for all 0 ≤ i < L and kL ≤ 2L . b (ii) If the NUkC instance I has a feasible solution, then there exists a feasible solution for I. b we can efficiently obtain a (3α, β)-bicriteria solution to I. (iii) Given an (α, β)-bicriteria solution to I, Proof. For an instance I, we construct the compressed instance Ib as follows. Partition the radii into Θ(log k) b we simply round up all classes by defining barriers at rbi = r2i for 0 ≤ i ≤ blog kc. Now to create instance I, i i+1 the radii rj for 2 ≤ j < 2 to the value rbi = r2i . Notice that the multiplicity of rbi is precisely 2i (except maybe for the last bucket, where there might be fewer radii rounded up than the budget allowed). Property (i) is just by construction of instance. Property (ii) follows from the way we rounded up the radii. Indeed, if the optimal solution for I opens a ball of radius rj around a point p, then we can open a cluster of radius rbi around p, where i is such that 2i ≤ j < 2i+1 . Clearly the number of clusters of radius rbi is at most 2i because OPT uses at most one cluster of each radius rj . For property (iii), suppose we have a solution Sb for Ib which opens α2i clusters of radius βb ri for all 0 ≤ i ≤ L. Construct a solution S for I as follows. For each 1 ≤ i ≤ L, let Ci denote the set of centers where Sb opens balls of radius βb ri . In the solution S, we also open balls at precisely these centers with 2α i−1 balls of radius rj for every 2 ≤ j < 2i . Since |Ci | ≤ α · 2i , we can open a ball at every point in Ci ; furthermore, since j < 2i , we have rj ≥ rbi and so we cover whatever the balls from Sb covered. Finally, we also open the α clusters (corresponding to i = 0) of radius βr1 = βb r0 at the respective centers C0 where Sb opens centers of radius rb0 . Therefore, the total number of clusters of radius type is at most 2α with the exception of r1 , which may have 3α clusters. 11 4.2 Part II: Satisfying Bottom Heavy Points One main reason why the above height reduction step is useful, is the following theorem from [1] for RMFC-T instances on trees; we provide a proof sketch for completeness. Theorem 4.2 ([1]). Given a tree T of height h and a feasible solution y to (RMFC-T LP), we can find a feasible integral solution N to RMFC-T such that for all 1 ≤ t ≤ h, |N ∩ Lt | ≤ kt + h. Proof. Let y be a basic feasible solution of (RMFC-T LP). Call a vertex v of the tree loose if yv > 0 and the sum of y-mass on the vertices from v to the root (inclusive of v) is < 1. Let VL be the set of loose vertices of the tree, and let VI be the set of vertices with yv = 1. Clearly N = VL ∪VI is a feasible solution: every leaf-toroot path either contains an integral vertex or at least two fractional vertices with the vertex closer to root being loose. Next we claim that |VL | ≤ h; this proves the theorem since |N ∩ Lt | ≤ |VI ∩ Lt | + |VL | ≤ kt + |VL |. The full proof can be found in Lemma 6, [1] – here is a high level sketch. There are |L| + h inequalities in (RMFC-T LP), and so the number of fractional variables is at most |L| + h. We may assume there are no yv = 1 vertices. Now, in every leaf-to-root path there must be at least 2 fractional vertices, and the one closest to the leaf must be non-loose. If the closest fractional vertex to each leaf was unique, then that would account for |L| fractional non-loose vertices implying the number of loose vertices must be ≤ h. This may not be true; however, if we look at linearly independent set of inequalities that are tight, we can argue uniqueness as a clash can be used to exhibit linear dependence between the tight constraints. Theorem 4.3. Suppose we are given an NUkC instance Ib with radii multiplicities (k0 , rb0 ), (k1 , rb1 ), . . . , (kL , rbL ) with budgets ki = 2i for radius type rbi , and an LP solution x to (NUkC LP) b Let τ = log log L, and suppose X 0 ⊆ X be the points covered mostly by small radii, that is, let for I. Cov≥τ (p) ≥ 12 for every p ∈ X 0 . Then, there is an efficient procedure round which opens at most O(kt ) balls of radius O(b rt ) for τ ≤ t ≤ L, and covers all of X 0 . Proof. The procedure round works as follows: we partition the points of X 0 into two sets, one set XU in which the points receive at least 14 of the coverage by clusters of radius rbi where i ∈ {log log L, log log L + 1, . . . , log L}, and another set XB in which the points receive 14 coverage from clusters of levels t ∈ {log L + P L 0 1, log L + 2, . . . , L}. More precisely, XU := {p ∈ X 0 : log t=τ Covt (p) ≥ 1/4}, and XB = X \ XB . Now consider the following LP-solution to (NUkC LP) for Ib restricted to XU : we scale x by a factor 4 and zero-out x on radii type rbi for i ∈ / {log log L, . . . , log L}. By definition of XU this is a feasible fractional solution; furthermore, the LP-reduction algorithm described in Section 3 will lead to a tree T of height ≤ log L and fractional solution y for (RMFC-T LP) on T were each ki ≥ 2log log L = log L. Applying Theorem 4.2, we can find an integral solution N with at most O(ki ) vertices at levels i ∈ {log log L, . . . , log L}. We can then translate this solution back using Theorem 3.7 to NUkC and find O(kt ) clusters of radius O(b rt ) to cover all the points XU . A similar argument, when applied to the smaller radius types rbt for t ∈ {log L, . . . , L} can cover the points in XB . We now show how we can immediately also get a (very weakly) quasi-polynomial time O(1)-approximation for NUkC. Indeed, if we could enumerate the set of clusters of radii rbt for 0 ≤ t < log log L, we can then explicitly solve an LP where all the uncovered points need to be fractionally covered by only clusters of radius type rbt for t ≥ log log L. We can then round this solution using Corollary 4.3 to obtain the desired O(1)-approximation for the NUkC instance. Moreover, the time complexity of enumerating the optimal clusters of radii rbt for 0 ≤ t < log log L is nO(log L) = nO(log log k) , since the number of clusters of radius at least rblog log L is at most O(2log log L ) = O(log L). Finally, there was nothing special in the proof of Theorem 4.3 about the choice of τ = log log L — we could set t = log(q) L to be the q th iterated logarithm of 12 L, and obtain an O(q)-approximation. As a result, we get the following corollary. Note that this gives an alternate way to prove Theorem 3.5. Corollary 4.4. For any q ≥ 1, there exists an (O(q), O(1))-factor bicriteria algorithm for NUkC which (q) runs in nO(log k) time. 4.3 Part III: Clever Enumeration of Large Radii Clusters In this section, we show how to obtain the (O(1), O(1))-factor bi-criteria algorithm. At a high level, our algorithm tries to “guess” the centers2 A of large radius, that is rbi for i ≤ τ := log log L = log log log k, which the optimum solution uses. However, this guessing is done in a cleverer way than in Corollary 4.4. In particular, given a guess which is consistent with the optimum solution (the initial “null set” guess is trivially consistent), our enumeration procedure generates a list of candidate additions to A of size at most 2τ ≈ poly log logk (instead of n), one of which is a consistent enhancement of the guessed set A. This reduction in number of candidates also requires us to maintain a guess D of points where the optimum solution doesn’t open centers. Furthermore, we need to argue that the “depth of recursion” is also bounded by poly log logk; this crucially uses the technology developed in Section 3. Altogether, we get the total time is at most (poly log logk)poly log logk = o(k) for large k. We start with some definitions. Throughout, A and D represent sets of tuples of the form (p, t) where p ∈ X and t ∈ {0, 1, . . . , τ }. Given such a set A, we associate a partial solution SA which opens a ball of radius 22b rt at the point p. For the sake of analysis, fix an optimum solution OPT. We say the set A is consistent with OPT if for all (p, t) ∈ A, there exists a unique q ∈ X such that OPT opens a ball of radius rbt at q and d(p, q) ≤ 11b rt . In particular, this implies that SA covers all points which this OPT-ball covers. We say the set D is consistent with OPT if for all (q, t) ∈ D, OPT doesn’t open a radius rbt ball at q (it may open a different radius ball at q though). Given a pair of sets (A,D), we define the minLevel of each point p as follows minLevelA,D (p) := 1 + arg max{(q, t) ∈ D for all q ∈ B(p, rbt )} t If (A, D) is a consistent pair and minLevelA,D (p) = t, then this implies in the OPT solution, p is covered by a ball of radius rbt or smaller. Next, we describe a nuanced LP-relaxation for NUkC. Fix a pair of sets (A, D) as described above. Let XG be the subset of points in X covered by the partial solution SA . Fix a subset Y ⊆ X \ XG of points. Define the following LP. ∀p ∈ Y, ∀t ∈ 1, · · · , h L X X t=minLevel(p) q∈B(p,b rt ) X xq,t ≤ xq,t ≥1 (LPNUkC (Y, A, D)) kt q∈Y ∀(p, t) ∈ A, xp,t = 1 The following claim encapsulates the utility of the above relaxation. Claim 4.5. If (A, D) is consistent with OPT, then (LPNUkC (Y, A, D)) is feasible. 2 Actually, we end up guessing centers “close” to the optimum centers, but for this introductory paragraph this intuition is adequate. 13 Proof. We describe a feasible solution to the above LP using OPT. Given OPT, define O to be the collection of pairs (q, t) where OPT opens a radius rbt ball at point q. Note that the number of tuples in O with second term t is ≤ kt . Since A is consistent with OPT, for every (p, t) ∈ A, there exists a unique (q, t) ∈ O; remove all such tuples from O. Define xq,t = 1 for all other remaining tuples. By the uniqueness property, we see the second inequality of the LP is satisfied. We say a point p ∈ X is covered by (q, t) if p lies in the rbt -radius ball around q. Since Y ⊆ X \ XG , and since the partial solution SA contains all points p which is covered by all the removed (q, t) tuples, we see that every point p ∈ Y is covered by some remaining (q, t) ∈ O. Since D is consistent with OPT, for every point p ∈ Y and t < minLevelA,D (p), if q ∈ B(p, rbt ) then (q, t) ∈ / O. Therefore, the first inequality is also satisfied. Finally, for convenience, we define a forbidden set F := {(p, i) : p ∈ X, 1 ≤ i ≤ τ } which if added to D disallows any large radii balls to be placed anywhere. Now we are ready to describe the enumeration Algorithm 3. We start with A and D being null, and thus vacuously consistent with OPT. The enumeration procedure ensures that: given a consistent (A, D) tuple, either it finds a good solution using LP rounding (Step 10), or generates candidate additions (Steps 18–20) to A or D ensuring that one of them leads to a larger consistent tuple. Algorithm 3 Enum(A, D, γ) 1: Let XG = {p : ∃ (q, i) ∈ A s.t d(p, q) ≤ 22b ri } denote points covered by SA . 2: if there is no feasible solution to LPNUkC (X \ XG , A, D) then 3: Abort. //Claim 4.5 implies (A, D) is not consistent. 4: else 5: x∗ be a feasible solution to LPNUkC (X \ XG , A, D). 6: end if 7: Let XB = {u ∈ X \ XG : Cov≥τ (u) ≥ 21 } denote bottom-heavy points in x∗ 8: Let SB be the solution implied by Theorem 4.3. // This solution opens O(kt ) balls of radius O(b rt ) for τ ≤ t ≤ L and covers all of XB . 9: Let XT = X \ (XG ∪ XB ) denote the top heavy points in x∗ 10: if LPNUkC (XT , A, F ∪ D) has a feasible solution xT then 11: By definition of F , in xT we have Cov≥τ (u) = 1 for all u ∈ XT . 12: ST be the solution implied by Theorem 4.3. // This solution opens O(kt ) balls of radius O(b rt ) for τ ≤ t ≤ L and covers all of XT . 13: Output (SA ∪ SB ∪ ST ). //This is a (O(1), O(1))-approximation for the NUkC instance. 14: else 15: for every level 0 ≤ t ≤ τ do 16: Let Ct = {p ∈ XT s.t minLevelA,D (p) = t}, the set of points in XT with minLevel t. 17: Use the LP-aware reduction from Section 3 using x∗ and the set of points Ct to create tree Tt . 18: for every winner p at level t in Tt do 19: Enum(A ∪ {(p,St)}, D, γ − 1) 20: Enum(A, D ∪ p0 ∈B(p,11brt ) {(p0 , t)}), γ − 1) 21: end for 22: end for 23: end if 14 Define γ0 := 4 log log k · log log log k. The algorithm is run with Enum(∅, ∅, γ0 ). The proof that we get a polynomial time (O(1), O(1))-bicriteria approximation algorithm follows from three lemmas. Lemma 4.6 shows that if Step 10 is true with a consistent pair (A, D), then the output in Step 13 is a (O(1), O(1))approximation. Lemma 4.7 shows that indeed Step 10 is true for γ0 as set. Finally, Lemma 4.8 shows with such a γ0 , the algorithm runs in polynomial time. Lemma 4.6. If (A, D) is a consistent pair such that Step 10 is true, then the solution returned is an (O(1), O(1))-approximation algorithm. Proof. Since A is consistent with OPT, SA opens at most kt centers with radius ≤ 22b rt for all 0 ≤ t ≤ τ . By design, SB and ST open at most O(kt ) centers with radius ≤ O(rt ) for τ ≤ t ≤ L. Lemma 4.7. Enum(∅, ∅, γ0 ) finds consistent (A, D) such that Step 10 is true. Proof. For this we identify a particular execution path of the procedure Enum(A, D, γ), that at every point maintains a tuple (A, D) that is consistent with OPT. At the beginning of the algorithm, A = ∅ and D = ∅, which is consistent with OPT. Now consider a tuple (A, D) that is consistent with OPT and let us assume that we are within the execution path Enum(A, D, γ). Let X \ XG be the points not covered by A and let x∗ be a solution to LPNUkC (X \ XG , A, D). If OPT covers all top-heavy points XT using only smaller radii, then this implies LPNUkC (XT , A, F ∪ D) has a feasible solution implyin Step 10 is true. So, we may assume, there exists at least one top-heavy point q ∈ XT that OPT covers using a ball radii ≥ rbτ around a center oq . In particular, minLevelA,D (q) ≤ τ . Let q ∈ Ct and hence q belongs to Tt for some 0 ≤ t ≤ τ . Let p ∈ Pt be the level t winner in Tt s.t q belongs to the sub-tree rooted at p in Ti ; p may or may not be q. We now show that there is at least one recursive call where we make non-trivial progress in (A, D). Indeed, we do this in two cases: case (A) If OPT opens a ball of radius rbt at a point o such that d(o, p) ≤ 11b rt . In this case, Step 19 maintains consistency. Furthermore, we can “charge” (p, t) uniquely to the point o with radius rbt . To see this, for contradiction, let us assume that before arriving to the recursive call where (p, t) is added to A, some other 0 0 0 tuple (u, t) ∈ A , in an earlier recursive call with (A , D ) as parameters charged to (o, t). Then by definition we know that d(u, o) ≤ 11b rt implying d(u, p) ≤ 22b rt . Then p would be in XG in all subsequent iterations, contradicting that p ∈ XT currently. case (B): Tf there is no (o, t) ∈ OPT with d(o, p) ≤ 11b rt , then for all points p0 ∈ B(p, 11b rt ) we can add 0 (p , t) to D. In this case, we follow the recursive call in Step 20. To sum, we can definitely follow the recursive calls in the consistent direction; but how do we bound the depth of recursion. In case (A), the measure of progress is clear – we increase the size of |A|, and it can be argued (we do so below) the maximum size of A is at most poly log logk. Case (B) is subtler. We do increase size of D, but D could grow as large as Θ(n). Before going to the formal proof, let us intuitively argue what “we learn” in Case (B). Recall q is covered in OPT by a ball around the center oq . Since minLevel(q) = t ≤ τ , by definition there is a point v ∈ B(q, rbt ) such that (v, t) ∈ / D, and d(q, oq ) ≤ rbt . Together, we get d(v, oq ) ≤ 2b rt , that is, v ∈ B(oq , 2b rt ). Now also note, since q lies in p’s subtree in Tt , by construction of the trees, d(p, q) ≤ 8b rt by property (i) of Theorem 3.7. Therefore, d(p, oq ) ≤ 9b rt and in case (B), for all points u ∈ B(oq , 2b rt ) we put (u, t) in the set D in the next recursive call. This is “new info” since for the current D we know that at least one point v ∈ B(oq , 2b rt ), we had (v, t) ∈ / D. Formally, we define the following potential function. Let Oτ denote the centers in OPT around which balls of radius rbj , j ≤ τ have been opened. Given the set D, for 0 ≤ t ≤ τ and for all o ∈ Oτ , define the 15 (D) indicator variable Zo,t which is 1 if for all points u ∈ B(o, 2b rt ), we have (u, t) ∈ D and 0 otherwise. Φ(A, D) := |A| + τ XX (D) Zo,t o∈Oτ t=0 Note that Φ(∅, ∅) = 0. From the previous paragraph, we conclude that in both case (A) or (B), the potential increases by at least 1. for any consistent A, D we can upper bound Φ(A, D) as follows. PFinally, τ t τ +1 = log L = log log k. The second term in Φ is at most Since A is consistent, |A| ≤ t=0 2 ≤ 2 τ +1 2 · τ = log L log log L. Thus, in at most 2 log log k · log log log k < γ0 steps we reach a consistent pair (A, D) with Step 10 true. Lemma 4.8. Enum(∅, ∅, γ0 ) runs in polynomial time for large enough k. Proof. Each single call of Enum is clearly polynomial time, and so we bound the number of recursive calls. Indeed, this number will be o(k). We first bound the number of recursive calls in a single execution of Enum(A, D, γ). For a fixed tuple (A, D), Algorithm 3, constructs trees T0 , . . . , Tτ in Step 17, using the reduction algorithm from Section 3. Let Ltj represent the set of nodes at level j in the tree Tt . Then Pt = ψt (Ltt ) represents the set of points that are winners at level t in Tt . NowSfor any tree Tt , Algorithm 3 makes two recursive calls for each winner in Pt (Step 19-20). Let PAD = τt=0 Pt be the set of all the winners that the algorithm considers in a single call to Enum(A, D, γ). The total number of recursive calls in a single execution is therefore 2|PAD |. Now we claim that for a fixed tuple (A, D), the total number of winners is bounded. Claim 4.9. |PAD | ≤ 4 log log k · log log log k Proof. Consider a tree Tt and the corresponding set Pt as defined above. We use y (t) to denote the RMFC-T LP solution given along with the tree Tt given by the reduction algorithm in Section 3. Let p ∈ Pt be a winner at level t (and consequently, at level τ also), and suppose it is mapped to tree vertices w at level t and w0 at level τ . Then, by the way the tree was constructed and because p ∈ XT is top-heavy, we have P (t) 1 u∈[w,w0 ]−path yu ≥ 2 (Refer to the proof of Claim 3.3 for more clarity). So each winner at level t has a 1 path down to level τ with fractional coverage 2 . But the total fractional coverage in the top part of Patτ least t the tree is at most the total budget, which is t=1 2 ≤ 2 log L ≤ 2 log log k. Therefore, |Pt | ≤ 4 log log k. Adding for all 1 ≤ t ≤ τ , gives |PAD | ≤ 4 log log k · t ≤ 4 log log k · log log log k. Since the recursion depth γ0 , the total number of recursive calls made to the Enum is loosely upper bounded by γ0poly log logk = o(k), thus completing the proof. References [1] D. Adjiashvili, A. Baggio, and R. Zenklusen. Firefighting on trees beyond integrality gaps. CoRR, abs/1601.00271, 2016. [2] J. Byrka, T. Pensyl, B. Rybicki, A. Srinivasan, and K. Trinh. An improved approximation for k-median, and positive correlation in budgeted optimization. Proceedings, ACM-SIAM Symposium on Discrete Algorithms (SODA), 2015. 16 [3] P. Chalermsook and J. Chuzhoy. Resource minimization for fire containment. Proceedings, ACM-SIAM Symposium on Discrete Algorithms (SODA), 2010. [4] M. Charikar, L. O’ Callaghan, and R. Panigrahy. Better streaming algorithms for clustering problems. ACM Symp. on Theory of Computing (STOC), 2003. [5] M. Charikar, C. Chekuri, T. Feder, and R. Motwani. Incremental clustering and dynamic infomation retrieval. ACM Symp. on Theory of Computing (STOC), 1997. [6] M. Charikar, S. Guha, D. Shmoys, and E. Tardos. A constant-factor approximation algorithm for the k-median problem. ACM Symp. on Theory of Computing (STOC), 1999. [7] M. Charikar, S. Khuller, D. M. Mount, and G. Narasimhan. Algorithms for facility location problems with outliers. Proceedings, ACM-SIAM Symposium on Discrete Algorithms (SODA), 2001. [8] S. Finbow, A. King, G. MacGillivray, and R. Rizzi. The firefighter problem for graphs of maximum degree three. Discrete Mathematics, 307(16):2094–2105, 2007. [9] I. L. Goertz and V. Nagarajan. Locating depots for capacitated vehicle routing. Proceedings, International Workshop on Approximation Algorithms for Combinatorial Optimization Problems, 2011. [10] T. F. Gonzalez. Clustering to minimize the maximum intercluster distance. Theoretical Computer Science, 38:293–306, 1985. [11] S. Guha, R. Rastogi, and K. Shim. CURE: An efficient clustering algorithm for large databases. Proceedings of SIGMOD, 1998. [12] S. Har-Peled and S. Mazumdar. Coresets for k-means and k-median clustering and their applications. ACM Symp. on Theory of Computing (STOC), 2004. [13] D. S. Hochbaum and D. B. Shmoys. A best possible heuristic for the k-center problem. Mathematics of operations research, 10(2):180–184, 1985. [14] S. Im and B. Moseley. Fast and better distributed mapreduce algorithms for k-center clustering. Proceedings, ACM Symposium on Parallelism in Algorithms and Architectures, 2015. [15] K. Jain and V. V. Vazirani. Approximation algorithms for metric facility location and k-median problems using the primal-dual schema and lagrangian relaxation. J. ACM, 48(2):274 – 296, 2001. [16] T. Kanungo, D. M. Mount, N. S. Netanyahu, C. D. Piatko, R. Silverman, and A. Y. Wu. : A local search approximation algorithm for k-means clustering. 2002. [17] A. King and G. MacGillivray. The firefighter problem for cubic graphs. Discrete Mathematics, 310(3):614–621, 2010. [18] A. Kumar, Y. Sabharwal, and S. Sen. A simple linear time (1 + )-approximation algorithm for k-means clustering in any dimensions. Proceedings, IEEE Symposium on Foundations of Computer Science (FOCS), 2004. [19] G. Laporte. Location routing problems. In B. L. Golden and A. A. Assad, editors, Vehicle Routing: Methods and Studies, pages 163–198. 1998. 17 [20] S. Li and O. Svensson. Approximating k-median via pseudo-approximation. ACM Symp. on Theory of Computing (STOC), 2013. [21] G. Malkomes, M. J. Kusner, W. Chen, K. Q. Weinberger, and B. Moseley. Fast distributed k-center clustering with outliers on massive data. Advances in Neur. Inf. Proc. Sys. (NIPS), 2015. [22] R. McCutchen and S. Khuller. Streaming algorithms for k-center clustering with outliers and with anonymity. Proceedings, International Workshop on Approximation Algorithms for Combinatorial Optimization Problems, 2008. [23] H. Min, V. Jayaraman, and R. Srivastava. Combined location-routing problems: A synthesis and future research directions. European Journal of Operational Research, 108:1–15, 1998. 18
8cs.DS
Entropy production rate as a criterion for inconsistency in decision theory Purushottam D. Dixit1 Department of Systems Biology, Columbia University New York, NYa) arXiv:1801.01733v1 [cs.AI] 5 Jan 2018 Evaluating pairwise comparisons breaks down complex decision problems into tractable ones. Pairwise comparison matrices (PCMs) are regularly used to solve multiple-criteria decision-making (MCDM) problems using Saaty’s analytic hierarchy process (AHP) framework. There are two significant drawbacks of using PCMs. First, humans evaluate PCM in an inconsistent manner. Second, PCMs of large problems often have missing entries. We address these two issues by first establishing a novel connection between PCMs and time-irreversible Markov processes. Specifically, we show that every PCM induces a family of dissipative maximum path entropy random walks (MERW) over the set of alternatives. We show that only ‘consistent’ PCMs correspond to detailed balanced MERWs. We identify the non-equilibrium entropy production in the induced MERWs as a metric of inconsistency of the underlying PCMs. Notably, the entropy production satisfies all of the recently laid out criteria for reasonable consistency indices. We also propose an approach to use incompletely filled PCMs in AHP. Potential future avenues are discussed as well. Individuals and organizations regularly to choose from a large number of available alternatives. Often, the alternatives have multiple attributes (for example, cost, quality, and durability) which makes the decision complex. On the one hand, if only single attributes are considered individual alternatives can be ranked on a one dimensional absolute preference scale. On the other hand, no such scale may exist when all attributes are considered. Nevertheless, it has been argued that it is possible for human agents to robustly compare pairs of alternatives in a high dimensional attribute space1 . Pairwise comparison matrices (PCMs) were first introduced in a nascent form in psychophysics by Fechner in the 18602 and later rigorously defined by Thurstone in the 1920s3 . PCMs allow agents to simplify complex decision making problems by breaking them up into smaller tractable ones. Starting from the 1970s, Saaty devised a framework to approximate the absolute preference scale from PCMs using his analytic hierarchy process (AHP)1,4 and analytic network process (ANP)4 . Mathematically, PCMs are organized as follows. Consider that an agent has to choose from n > 1 alternatives denoted by {a}. The entry Wab in a PCM W denotes the preference of an agent for alternative a over alternative b. We assume that Wba = 1/Wab . While PCMs simplify large complex problems, two drawbacks have been identified. First, agents may decide between pairs of alternative using a combination of quantitative analysis and intuition. As a result, not all pairwise comparisons within a matrix may be ‘consistent’ with each other1 . For example, if an agent prefers ‘a’ over ‘b’ by a factor of 2 and ‘b’ over ‘c’ by a factor of 2, in real PCMs, it is not guaranteed that the same agent will also prefer ‘a’ over ‘c’ by a factor of Wab Wbc = 4. For a consistent PCM, we have a) Email: [email protected] for any path over the alternatives a1 → a2 → . . . ak log Wa1 ak = k−1 X log Wai ai+1 . (1) i=1 Consequently, the individual entries of a consistent PCMs can be expressed as1 log Wab = log fa − log fb (2) for some absolute preference scale f¯ > 01 . In other words, individual pairwise comparisons in a consistent PCM can be represented by a ‘state function’ log f¯. Notably, the absolute preference scale is proportional to the right Perron-Frobenius eigenvector ν̄ if the PCM is consistent (νa ∝ fa ). Based on the relationship between the Perron-Frobenius eigenvector and the absolute preference scale for consistent PCMs, Saaty in his AHP and ANP argued that the same eigenvector also approximates the absolute preference scale for inconsistent PCMs1,4 . The AHP/ANP approach is now regularly used to infer absolute preference scales over alternatives in a broad range of areas such as environmental sciences5 , organizational studies6 , and public health7 . In addition to their use in AHP, PCMs also allow agents to identify the sources of departure from consistency in individual and group decision making8 . Over the last three decades, several indices have been developed to quantify consistency of PCMs8 . For example, a popular index by Saaty1 quantifies the Perron-Frobenius eigenvalue η of the PCM. Saaty showed that η ≥ n for any PCMs with equality holding iff the PCM is consistent. Based on this observation, he defined the consistency index CI: η−n CI = . (3) n−1 Other examples of consistency indices include the Harmonic consistency index9 and Geometric consistency index10 . Recently Brunelli et al.11,12 laid out a set of requirements for reasonable quantifiers of departures from consistency of PCMs. 2 Second, several entries in a large PCM (n  1) may be missing. The reasons are several fold. The total num ber of pairwise comparisons n2 increases as the square of the total number of alternatives n. Indeed, psychological studies have shown that human agents are not able to reliable estimate multiple pairwise comparisons at the same time because of information overload or simply because they get bored and/or inattentive (see13 references). Moreover, not all comparisons may be realistically available (for example when rankingsports teams or players with non-overlapping stints14,15 ). A number of proposals fill up incomplete PCMs using the available entries for subsequent analysis have been suggested16–20 . A popular proposal by Harker16 is as follows. We assume that the adjacency graph A of an incompletely filled PCM W is fully connected. For any missing entry, say Wab , we first enumerate all possible elementary paths {Γ} on A between a and b. Next, we approximate the comparison along each path Γ ≡ a → a1 → a2 → · · · → ak → b as if the known entries in the PCM were described by a state function, ! k−1 X log Wab (Γ) = log Waa1 + log Wai ai+1 i=1 + log Wak b . (4) The logarithm of the missing entry log Wab is then approximated as an arithmatic mean of log Wab (Γ) over all possible elementary paths between a and b. All previously missing entries defined this way automatically satisfy Wab Wba = 1. Notably, most subsequent analyses of PCMs assume that they are positive (Wab > 0 ∀ a and b). Thus, it is not clear how particular filling up procedures may influence analysis of PCMs. In this work we address the following problem: is there a way to analyze PCMs without relying on a process to fill them up? We provide a physics-based answer. First, we establish a novel connection between PCMs and and time-irreversible statistical physics. Specifically, we show that every PCM (incompletely filled or otherwise) induces a family of Markovian random walks over the alternatives. The random walks are maximum path entropy random walks constrained to reproduce a ‘flux’ J ∝ hlog Wab i21–23 . This connection allows us to bring insights from recent work in stochastic thermodynamics24 to study of PCMs. Notably, we show that the entropy production rate in the induced random walks is intricately related to the consistency of the underlying PCM. Quantification of entropy production does not require filling up of the PCM as long as the adjacency graph A of the PCM is connected. Moreover, the entropy production can be decomposed as either a sum over (a) alternatives or (b) pairwise comparisons which allows us to directly identify the alternatives or the comparisons that are inconsistent with the rest of the PCM. We provide physics-based explanations for independently laid out conditions for reasonable inconsistency indices11,12 . We also show that the absolute preference scale can be extracted from an incompletely filled but otherwise consistent PCM by correcting for the effect of the adjacency graph of the incomplete PCM. This allows us to generalize Saaty’s AHP for incompletely filled PCMs. We numerically compare our consistency index with previously developed ones. We illustrate our development by systematically examining the effect of filling up incompletely filled matrices on the evaluation of consistency and the AHP. We show that filling up a PCM introduces systematic biases in evaluation of consistency. Importantly, we believe that the connections established in this work between two previously unrelated fields of scientific inquiry will allow a greater understanding of consistency of pairwise comparison matrices in the future. I. RESULTS A. PCM-induced random walk Consider an incompletely filled PCM W . We assume that the unquerried entries in W are set to zero and Wab > 0 ⇒ Wab Wba = 1. We also assume that the graph of adjacency A of W is connected. We have Aab = 1 if Wab > 0. We define a microscopic ‘flux’ jab = log Wab between vertices a and b of A that have an edge between them (Wab > 0 in the PCM). The microscopic flux is antisymmetric; jab + jba = 0. We construct a discrete time Markov process with transition probabilities {kab } and a stationary distribution {pa } on A that is consistent with a given ensemble average flux J = hjab i per unit time. The ensemble average flux is given by X hjab i = pa kab jab . (5) a,b There are infinitely many Markov processes consistent with a single path ensemble average. We seek the one with the maximum path entropy. The path entropy is given by23,25,26 X S=− pa kab log kab . (6) a,b Maximization of S is a constrained problem23,25,26 because {pa } and {kab } are dependent of each other, X X pa kab = pa , pa kab = 1, and (7) b X a,b pa kab = pb (8) a and X a,b pa kab jab = hjab i = J (9) 3 Eqs. 8 represent the constraint of probability conservaThe entropy production rate ṡ of the induced MERWs tion and normalization and {pa } as the stationary distridefined in Eq. 14 serves as a physics-based quantifer of bution respectively. Eq. 9 represents the imposed path the inconsistency of the underlying PCM. We prove that ensemble constraint of the flux J. We solve the conṡ = 0 iff the underlying PCM is consistent. strained problem using the method of Lagrange MultiFirst, consider ṡ = 0. We show that all non-zero entries pliers. We write the unconstrained Caliber27 of W are given by Wab = fa /fb for some absolute scale ! ! f¯ > 0. Detailed balance implies X X X X νb νa C=S+ la pa kab − pa + mb pa kab − pb µa νa Wab = µb νb Wba (15) ηνa ηνb a a b b   ! µb νa Wab 2 X X = Wab = × (16) ⇒   Wba νb µa +δ pa kab − 1 + γ pa kab jab − J (10) ab a,b fa ⇒ Wab = (17) fb In Eq. 10, {la }, {mb }, and δ are the Lagrange multipliers where fa = (νa /µa ). that impose the constraints in Eq. 8. γ is the Lagrange Next, consider a PCM W whose non-zero entries are multiplier that imposes the dynamical flux constraint. given by Wab = fa /fb where f¯ > 0 is a vector of posiThe transition probabilities of maximum path entropy tive elements. We evaluate the entropy production rate random walks (MERW) are given by23 of the induced MERWs. First, we derive the transition νb (γ) γ probabilities kab . We write W (11) kab (γ) = η(γ)νa (γ) ab W = Diag(f¯)ADiag(1/f¯) (18) where η(γ) is the largest eigenvalue of the modified PCM ¯ ¯ ⇒ W Diag(f ) = Diag(f )A (19) W γ , and ν̄(γ) is the corresponding right eigenvector. In Eq. 19, Diag(x̄) is the diagonal matrix with entries From here onwards, we recognize W γ as the element-wise from the vector x̄ and A is the adjacency matrix of W . exponentiation and not the matrix exponentiation. AcLet η be the Perron-Frobenius eigenvalue of A and ν̄ cording to the Perron-Frobenius theorem, ν̄(γ) has posibe the corresponding Perron-Frobenius eigenvector. We tive entries and η(γ) > 0. Finally, the stationary distrihave bution {pa (γ)} is given by the outer product23 pa (γ) = νa (γ)µa (γ) (12) where µa (γ) is the left Perron-Frobenius eigenvector of W γ . We call the γ-dependent family of Markov processes described by Eq. 11 the maximum path entropy random walks induced by the PCM. Notably, both the left and the right Perron-Frobenius eigenvectors are used as an approximate absolute preference scale in Saaty’s AHP1,4 . We note that the Markov process at γ = 1 corresponds to the original PCM W . From here onwards, unless specified otherwise we will assume that γ = 1. We omit the dependence on γ for brevity. B. Entropy production as a metric of inconsistency The entropy production rate of a Markov process quantifies the degree of irreversibility in it; the entropy production rate is zero iff the process is time-symmetric and satisfies detailed balance pa kab = pb kba ∀ a and b24 . We have23 X kab (13) ṡ = pa kab log kba a,b   X νb2 = pa kab log 2 + 2 log Wab νa a,b 2X = µa νb Wab log Wab ≥ 0. η (14) Aν̄ = ην̄ ¯ ⇒ W Diag(f )ν̄ = Diag(f¯)Aν̄ = ηDiag(f¯)ν̄. (20) (21) In other words, the Perron-Frobenius eigenvalue of W is η and the corresponding eigenvector is ḡ where ga = νa fa . The transition probabilities of the MERWs are given by (see Eq. 11) kab = ν b fb νb × fa /fb Aab = Aab ηνa fa ηνa (22) where Aab = 1 if a and b are connected by an edge (if the comparison between a and b is available) and zero otherwise. Since A is symmetric (Aab = Aba ∀ a and b), the Markov process described by Eq. 22 satisfies detailed balance and has a zero entropy production rate21–23 . In other words, the induce MERWs is detailed balanced iff the underlying PCM is consistent. Notably, Brunelli’s first requirement for any metric that measures inconsistency is the ability to uniquely identify consistent PCMs11,12 . As shown here, the entropy production rate satisfies this requirement. Why does ṡ quantify consistency? Let us consider the detailed balanced Markov process induced by a consistent PCM. As we showed above, the MERW induced by a consistent PCM is detailed balanced (pa kab = pb kba ∀ a and b). An illustrative analogy is to imagine that the MERW describes a system at thermodynamic equilibrium with a surrounding bath. Let us assume that 4 the stationary distribution of the MERW is given by pa ∝ e−βEa where Ea is the ‘energy’ of the alternative a. Let us consider a path over the alternatives Γ = a1 → a2 → · · · → am and the corresponding time reversed path Γ0 = am → am−1 → · · · → a1 . The log ratio of the forward and the reverse path probabilities is related to the total heat exchanged during the trajectory. We have, ka a × · · · × kam−1 am p(Γ|a1 ) log (23) = log 1 2 p(Γ0 |am ) kam am−1 × · · · × ka2 a1   pa2 pam = log × ··· × (24) pa1 pam−1 = ∆Q = −β (Em − E1 ) (25) Notably, the heat exchange is independent of the path only for detailed balance processes. Specifically, the heat exchange is zero for all loops i.e. am = a1 ⇒ ∆Q = 0. In contrast, the heat dissipation in the MERW induced by an inconsistent PCM depends on the entire history of the trajectory. We have23 log p(Γ|a1 ) = 2γ p(Γ0 |am ) m−1 X jai ai+1 + 2 log i=1 νam . νa1 (26) To translate this observation in the language of PCMs let us consider a Markovian random walker on a looped trajectory of the induced MERW. We imagine that the random walker exchanges ‘energy’ with the ‘surrounding’. Every time step when the walker goes to an alternative that is less favored compared to the current one (Wai ai+1 > 1) she receives energetic renumeration ∝ log Wai ai+1 . However, she has to pay the same amount of energy when she goes to an alternative that is more favored. On the one hand, if the MERW is detailed balanced (if the PCM is consistent), the walker will end up with no net change in energy over any loop. On the other hand, if the PCM is inconsistent, there will exist loops which have a net exchange of energy between the walker and the surrounding. The induced MERWs have few other notable properties. Consider a long path Γ = a1 → a2 → . . . of length T  1 of the MERW for a fixed value of γ. From Eq. 11, we write the probability p(Γ)23 1 p(Γ) ≈ e(T −1)γj(Γ) (27) η(γ)T −1 We note that η(−γ) is the Perron-Frobenius eigenvalue γ of W −γ = (Trans(W )) where Trans(W ) is the transpose of W . Since the eigenvalues of W and Trans(W ) are the same, we conclude that η(−γ) = η(γ) i.e. η(γ) is an even function of γ. Consequently, it’s derivative hjab i(γ) is an odd function of γ. Moreover, X d 1 d2 log e(T −1)γj(Γ) hjab i(γ) = 2 dγ T − 1 dγ (31) 2 = hjab i − hjab i2 ≥ 0. (32) Γ Thus, hjab i(γ) is a monotonic function of γ. As a result, (1) ṡ(γ) is a monotonically increasing function of γ for γ > 0 and since hjab i(γ) is an odd function of γ (2) ṡ = γhjab i(γ) is an even function of γ. Notably, these two observations directly correspond with requirement (3) and (6) laid out by Brunelli’s11,12 . In appendix A1, we show that ṡ(γ) satisfies all of Brunelli’s requirements. C. Using incomplete PCMs in the AHP Can we perform Saaty’s AHP analysis on an incompletely filled PCM? As above, let us consider an incompletely filled but otherwise consistent PCM. We have Wab > 0 ⇒ Wab = fa /fb . (33) Can we extract the absolute preference scale from W ? Eq. 21 shows that the Perron-Frobenius eigenvector ḡ of W is given by ga = νa fa where ν̄ is the Perron-Frobenius eigenvector of the adjacency matrix A corresponding to W . Notably, the absolute preference scale can be extracted from an incompletely filled but otherwise consistent PCM not as the reciprocal of the right PerronFrobenius eigenvector ḡ, but with a correction that accounts for the connectivity in the adjacency graph: fa = ga /νa . (34) Similar in spirit to the original observation of the AHP, we propose that for inconsistent and incompletely filled PCMs, the absolute preference scale f¯ can be approximated using the Perron-Frobenius eigenvector ḡ of the PCM W and the Perron-Frobenius eigenvector ν̄ of the corresponding adjacency matrix A as shown in Eq. 34. where j(Γ) = T −1 1 X ja a T − 1 i=1 i i+1 (28) is the flux per unit time associated with the path Γ. We recognize η(γ)T −1 as the partition function. Since p(Γ) is normalized, we write (in the limit T  1) X η(γ)T −1 = e(T −1)γj(Γ) (29) Γ d ⇒ hjab i(γ) = log η(γ). dγ (30) II. ILLUSTRATIVE EXAMPLES A. Numerical comparison between ṡ and other consistency indices We illustrate ṡ as a quantifier of inconsistency by evaluating the inconsistency of multiple incompletely filled pairwise comparison matrices. Specifically, we study Saaty’s CI (see Eq. 3) and the harmonic consistency index (HCI)9 . We have already introduced Saaty’s CI, here 5 A B D F N S A B D F 1 1.39 0 0.76 0.72 1 0 0 0 0 1 0.95 1.32 0 1.05 1 1.11 0 1.29 1.91 1.36 1.3 0 0.95 N S 0.9 0.73 0 0.77 0.77 0 0.52 1.05 1 0 0 1 TABLE I. Pairwise comparison matrix among Tennis players based on their performance against each other. Entries between players who did not play any matches between them are set to zero. FIG. 1. Panel (a) Comparison between Saaty’s CI and ṡ as defined in Eq. 14 for randomly generated PCMs with varying degree of inconsistency. Panel (b) Comparison between the Harmonic consistency index HCI and ṡ as defined in Eq. 14 for randomly generated PCMs with varying degree of inconsistency. we briefly introduce the HCI and the GCI. Since consistent PCMs W have rank(W ) = 1, the colums P are proportional to each other. Consequently, if s = a a Wab , P −1 it was proven that sa = 1 iff W is consistent9 . The HCI P quantifies deviations of the harmonic mean HM = n/ s−1 a from n. We have HCI = (HM − n) (n + 1) n(n − 1) (35) We construct an ensemble of PCMs with n = 5 of varying degree of inconsistency. First, we construct an absolute scale f¯ > 0 by drawing n = 5 uniformly distributed random numbers between [0, 1]. We construct a PCM W with elements Wab = fa exp (ρab α) for a > b. fb (36) The parameter α controls the inconsistency. PCMs with α = 0 are consistent (but incompletely filled) and the inconsistency increases as α increases. We choose α to be randomly distributed between [0, 4]. ρab are normally distributed random numbers with zero mean and unit standard deviation. The lower-diagonal entries of W are filled to satisfy the reciprocal relationship Wab Wba = 1. In Fig. 1, we compare our inconsistency index ṡ with the CI and the HCI. The dashed red line shows x = y. Notably, ṡ correlates extremely well with Saaty’s CI FIG. 2. The graph of adjacency between Tennis players corresponding to the pairwise comparison matrix given in Table I. (Pearson r2 = 0.98). This may be because ṡ directly depends on the Perron-Frobenius eigenvalue η (see Eq. 14). ṡ also correlates well with the HCI. However the correlation is lower (Pearson r2 = 0.71) and there is a a large scatter. B. Inferring preference scales from incomplete matrices We now show how to infer the absolute preference scale using an incompletely filled PCMs using Eq. 34 as proposed above. We compare our approach with the approach by Harker16 described above. Recently, Bozóki et al.15 studied the problem of determining ranking among 25 Tennis players based on their performance against each other. Notably, not all players played with each other, for example, Agassi never played a match with Nadal. Consequently, the PCM constructed using players’ performance is inherently incomplete. Here, we carry out an analysis on 6 of the 25 players; Agassi (A), Baker (B), Djokovic (D), Federer (F), Nadal (N), and Samprass (S). The PCM is given in Table I (see Bozóki et al.15 for details). We set to zero all incompletely filled entries. The graph of connectivity among the tennis players is shown in Fig. 2. In Table II, we show the results of our calculations. First, we estimate the absolute preference scale using Harker’s method16 . The ‘filled’ PCM is given in Ta- 6 A B D F N S f¯H 0.150 0.122 0.166 0.161 0.232 0.170 ν̄ 0.211 0.120 0.120 0.211 0.170 0.170 ḡ 0.188 0.083 0.116 0.208 0.233 0.173 f¯ 0.150 0.117 0.164 0.166 0.231 0.172 TABLE II. Comparison of the estimated absolute preference scale using Harker’s method16 (f¯H ) and Eq. 34 (f¯). ble A1. The principal eigenvector of the filled PCM f¯H is given in column 1. The absolute preference scale is L1 normalized. In order to evaluate the absolute preference scale using Eq. 34, we first evaluate the right Perron-Frobenius eigenvector ν̄ (column 2). Next, we evaluate the right Perron-Frobeius eigenvector of the incompletely filled matrix in Table I ḡ (column 3). Finally, the L1 normalized estimate of the absolute preference scale using Eq. 34 is given by f¯ (column 4). Notably, f¯H and f¯ are highly correlated with each other (Pearson’s r2 = 0.99, p = 3.3 × 10−5 ). III. CONCLUSION In this work, we established a novel connection between a popular tool in decision theory; pairwise comparison matrices (PCMs) and non-equilibrium statistical physics. Specifically, we showed that PCMs induce a family of maximum path entropy random walks constrianed to reproduce a non-equilibrium flux. Notably, only consistent PCMs (incompletely filled or otherwise) induce detailed balanced random walks. Based on these insights, we proposed the entropy production rate ṡ in the induced MERWs as a quantifier of inconsistency. We showed that ṡ satisfies all previously laid out criteria for reasonable consistency indices. We also showed how to use incompletly filled PCMs in Saaty’s AHP. We hope that our work brings together two previously unrelated areas of scientific inquiry namely nonequilibrium Markov processes and pairwise comparison matrices. Notably, recent years have seen a renewed interest in the study of statistical physics of nonequilibrium Markov processes (reviewed by Seifert28 ). For example, many new identities such as various ‘fluctuation theorems’ have been discovered across a wide range of settings. We speculate that the connections established in the current work will allow a greater exchange of ideas between the two previously unrelated fields of inquiry and potentially refine our understanding of consistency in pairwise comparisons. IV. ACKNOWLEDGMENTS I would like to Thank Dr. Jason Wagoner for stimulating discussions on non-equilibrium flow processes that lead to an investigation into pairwise comparison matrices. I would also like to thank Dr. Matteo Brunelli and Dr. Luis Vargas for a critical reading of the manuscript and multiple valuable suggestions. 1 T. L. Saaty and L. G. VargasModels, methods, concepts & applications of the analytic hierarchy process Vol. 175 (Springer Science & Business Media, 2012). 2 G. T. FechnerElemente der psychophysik Vol. 2 (, 2012). 3 L. L. Thurstone, Psychological review 34, 273 (1927). 4 T. L. Saaty, Journal of systems science and systems engineering 13, 1 (2004). 5 R. Ramanathan, Journal of environmental management 63, 27 (2001). 6 R. L. Nydick and R. P. Hill, Journal of supply chain management 28, 31 (1992). 7 M. J. Liberatore and R. L. Nydick, European Journal of Operational Research 189, 194 (2008). 8 M. Brunelli, L. Canal, and M. Fedrizzi, Annals of Operations Research 211, 493 (2013). 9 W. E. Stein and P. J. Mizzi, European journal of operational research 177, 488 (2007). 10 J. Aguaron and J. M. Moreno-Jiménez, European journal of operational research 147, 137 (2003). 11 M. Brunelli and M. Fedrizzi, Journal of the Operational Research Society 66, 1 (2015). 12 M. Brunelli, Annals of Operations Research 248, 143 (2017). 13 F. J. Carmone, A. Kara, and S. H. Zanakis, European journal of operational research 102, 538 (1997). 14 L. Csató, Central European Journal of Operations Research , 1 (2013). 15 S. Bozóki, L. Csató, and J. Temesi, European Journal of Operational Research 248, 211 (2016). 16 P. T. Harker, Mathematical Modelling 9, 837 (1987). 17 P. T. Harker, Mathematical Modelling 9, 353 (1987). 18 W. W. Koczkodaj, M. W. Herman, and M. Orlowski, Knowledge and Information Systems 1, 119 (1999). 19 M. Fedrizzi and S. Giove, European Journal of Operational Research 183, 303 (2007). 20 S. BozóKi, J. Fülöp, and L. RóNyai, Mathematical and Computer Modelling 52, 318 (2010). 21 Z. Burda, J. Duda, J. Luck, and B. Waclaw, Physical review letters 102, 160602 (2009). 22 L. R. Frank and V. L. Galinsky, Physical Review E 89, 032142 (2014). 23 P. D. Dixit, Physical Review E 92, 042149 (2015). 24 U. Seifert, The European Physical Journal B-Condensed Matter and Complex Systems 64, 423 (2008). 25 P. D. Dixit and K. A. Dill, J. Chem. Th. Comp. 10, 3002 (2014). 26 P. D. Dixit, A. Jain, G. Stock, and K. A. Dill, Journal of chemical theory and computation 11, 5464 (2015). 27 P. D. Dixit et al., Journal of Chemical Physics (2017). 28 U. Seifert, Physica A: Statistical Mechanics and its Applications (2017). 7 A1. ṡ(γ) SATISFIES REQUIREMENTS FOR REASONABLE CONSISTENCY INDICES Recently, Brunelli et al.11,12 laid out six requirements for any index I(W ) that quantifies the inconsistency in a PCM W . Here, we show that the entropy production rate ṡ(γ) satisfies all of those requirements. They are as follows 1. I(W ) uniquely identifies consistent PCMs. If W is a family of cosistent PCMs then I(W ∈ W) = v ∗ for some v ∗ ∈ R. Conversely, I(W ) = v ∗ ⇒ W ∈ W. 2. I(P W Trans(P )) = I(W ) for any permutation matrix P . 3. I(W γ ) > I(W ) if γ > 1. element-wise exponentiation. Here, W γ denotes 4. We start with a consistent PCM W . We choose δ one entry Wab and transform it Wab → Wab , γ δ 6=. We also transform Wba → Wba . The resultant PCM W 0 (δ) is not consistent. We require I(W 0 (δ)) > I(W 0 ()) > if δ >  > 1. We also require I(W 0 (δ)) > I(W 0 ()) > if δ <  < 1. 5. I(W ) is continuous with respect to entries in W . 6. I(W ) = I(Trans(W )). We proved that ṡ(γ) satisfies requirements (1), (3), and (6) in the main text. Requirement (2) implies that the entropy production rate in the Markov process is invariant under permutation of vertex labels. ṡ(γ) trivially satisfies this requirement as the entropy production rate is the global property of the entire Markov process. ṡ(γ) satisfies requirement (5) as well. Since the Perron-Frobenius eigenvalue η(γ) and the eigenvector ν̄(γ) are continuous with respect to the elements of W 1 , ṡ(γ) is also continuous with respect to elements of W . While we couldn’t prove that ṡ satisfies requirement (4), we provide evidence that it is true based on a conjecture that we numerically checked. Consider two consistent pairwise comparison matrices W and Q. We have Wab > 0 ⇒ Wab fb /fa for some scale f¯ > 0 and Qab > 0 ⇒ Qab = gb /ga for some other unrelated scale ḡ > 0. We assume that the adjacency graph A corresponding to W and Q is identical and is connected. We create two new matrices where a specific entry Wab (and Qab ) is changed to Wab → αWab (and Qab → αQab ). We also change the corresponding reciprocal entry Wba (and Qba ). Let us call the modified matrices W (α) and W (α) respectively. Note that W (α) and Q(α) are not consistent if α 6= 1. Eq. 22 of the main text suggests that the induced MERW of a consistent matrix W (and Q) only depends on the properties of the adjacency graph A. Hence, the MERW induced by consistent PCMs W and Q are identical. Surprisingly, based on our numerical calculations we observe that the MERWs induced by W (α) and Q(α) are also identical. We conjecture that this is true. Requirement (4) follows from this conjecture. Consider an incompletely filled but otherwise consistent PCM W . Let A denote its adjacency graph. We note that A is also a consistent PCM. As above, let us modify Wab → αWab and Aab = αAab for some specific entry. We assume that α 6= 1. Let us denote the two modified matrices by W (α) and A(α). Based on our conjecture, the family of MERWs induced by W (α) is identical to the family of MERWs induced by A(α) ∀ α. Consequently ṡ(W (α)) = ṡ(A(α)). Next, let us consider W (α1 ) and W (α2 ) such that α2 > α1 > 1. To prove that the entrop production rate ṡ satisfies requirement (4), we need to show that ṡ(W (α2 )) > ṡ(W (α1 )). First, we note that Aab (α2 ) = Aab (α1 )τ where τ = logα1 α2 > 1. Since ṡ satisfies requirement (3), we have ṡ(A(α2 )) > ṡ(A(α1 )) ⇒ ṡ(W (α2 )) > ṡ(W (α1 )). This proves that ṡ satisfies requirement (4). A. Harker’s method to fill an incomplete PCM A B D F N S A 1 0.72 1.21 1.32 1.11 1.36 B 1.39 1 1.36 1.15 2.02 1.3 D 0.83 0.74 1 1.05 1.29 1.05 F 0.76 0.87 0.95 1 1.91 0.95 N 0.9 0.50 0.77 0.52 1 0.71 S 0.73 0.77 0.95 1.05 1.42 1 TABLE A1. The ‘filled’ PCM using Harker’s method. The original PCM is given in Table I.
2cs.AI
1 Pearson information-based lower bound on Fisher information arXiv:1611.07712v1 [math.ST] 23 Nov 2016 Dave Zachariah and Petre Stoica Abstract—The Fisher information matrix (FIM) plays an important role in the analysis of parameter inference and system design problems. In a number of cases, however, the statistical data distribution and its associated information matrix are either unknown or intractable. For this reason, it is of interest to develop useful lower bounds on the FIM. In this lecture note, we derive such a bound based on moment constraints. We call this bound the Pearson information matrix (PIM) and relate it to properties of a misspecified data distribution. Finally, we show that the inverse PIM coincides with the asymptotic covariance matrix of the optimally weighted generalized method of moments. The Cramér-Rao bound (CRB) is a useful tool for the analysis of parameter inference problems, benchmarking estimators, and system design [1]–[4]. Let y = [y1 · · · yN ]⊤ denote the observed data from a system and let θ ∈ Rn be the parameters of interest. The CRB exists under certain regularity conditions and is given by the inverse of the Fisher information matrix (FIM) J(θ), which is a function of the probability density p(y; θ). More specifically, the FIM is defined as # " ⊤ ∂ ln p(y; θ) ∂ ln p(y; θ)  0, (1) J(θ) , E ∂θ ∂θ ∂ ln p(y;θ) ∂θ where the gradient is known as the ‘score function’. Under certain regularity conditions, the score function has zero mean   ∂ ln p(y; θ) = 0. (2) E ∂θ In many applications, J(θ) may not be obtainable. For instance, p(y; θ) may be unknown in a practical problem. As an example, let the observations be modeled as y = f (u), where f (·) is a nonlinear function and u follows a probability density function p(u; θ). Then a closed-form expression for p(y; θ) is not available in general even if p(u; θ) is known. It is possible, however, to derive tractable lower bounds on the FIM. If E[y] is a function of θ and Cov[y] is independent of θ, then using the Gaussian distribution in lieu of p(y; θ) leads to the minimum FIM JG (θ)  J(θ) (where G stands for Gaussian) and therefore the ‘worst-case’ inference scenario [5], [6]. A generalization to θ-dependent Cov[y] was given in [7]. The minimum FIM can be used for robust system design and estimator formulations. However, in some cases the minimum information can be overly conservative. In this lecture note, we derive a tighter lower bound 0  L(θ)  J(θ) ∈ Rn×n , (3) based on moment constraints. For this reason we call L(θ) the Pearson information matrix (PIM) as an homage to the This work has been partly supported by the Swedish Research Council (VR) under contract 621-2014-5874. inventor of ‘the method of moments’ [8]. As we will see, the PIM is related to the generalized method of moments [9]. I. R ELEVANCE The PIM is a tractable tool for analyzing parameter estimation and system design problems when the statistical data distribution is unknown or intractable. II. P REREQUISITIES The reader needs basic knowledge about linear algebra, elementary probability theory, and statistical signal processing. III. P RELIMINARIES We begin by constructing a function z(y) that contains M statistics of y. We assume that z(y) has computable—either analytically or numerically—mean and covariance µ(θ) , E[z(y)] ∈ RM , ⊤ Σ(θ) , E[(z(y) − µ) (z(y) − µ) ] ∈ RM×M , (4) where M ≥ n. For instance, z may be constructed using powers of the data, that is, its elements are made up of empirical moments {yi } {yi yj }, {yi yj yk }, etc. We assume that Σ(θ) is nonsingular. For notational simplicity, we drop the argument θ in the next analysis and reinstate it when needed. We also write pθ = p(y; θ). IV. P EARSON INFORMATION MATRIX In Section IV-A, we begin with a step-by-step algebraic derivation of L in (3) which will define the Pearson information matrix. As explained there, the PIM generalizes the results in [5]–[7] and coincides with a bound recently derived in [10] (by comparison this lecture notes provides a simple textbook-style derivation of the bound as well as further connections). In Section IV-B we go on to provide an information-theoretic connection between the PIM and misspecified data distributions using the principle of maximum entropy [11]. Then we study the behaviour of PIM when M increases in Section IV-C. Finally, in Section V, we establish a relation between the PIM and generalized method of moments that is analogous to the relation between the FIM and the maximum likelihood method. The presented results enable a tractable analysis of a wider class of data models that satisfy certain moment constraints. 2 A. Algebraic derivation Consider a linear combination of the centered statistics z − µ: D⊤ W(W⊤ ΣW)−1 W⊤ D  D⊤ Σ−1 D, ⊤ W (z − µ), Under regularity conditions that allow the interchanging of integral and derivative operations [2], the following identity holds:   ∂ ln pθ E (z − µ)⊤ ∂θ Z 1 ∂pθ (z − µ)⊤ pθ dy = pθ ∂θ  Z  ∂µ⊤ ∂pθ (z − µ)⊤ dy + pθ = (6) ∂θ ∂θ Z  ∂  ∂µ⊤ = E (z − µ)⊤ + pθ dy ∂θ | ∂θ {z } | {z } =0 =1 = D⊤ , D⊤ = (12) −1 where W⊤ ∈ Rn×M denotes a linear combiner matrix. This vector has zero-mean similar to the score function, cf. (2). We construct the following matrix   ∂ ln p ⊤  ∂ ln p θ θ ∂θ ∂θ E  0. (5) W⊤ (z − µ) W⊤ (z − µ) where Using the Schur complement of the lower-right block of (11) we obtain the upper bound ∂µ⊤ ∈ Rn×M ∂θ (7) is the gradient of the mean vector. Using (4) and (6), the matrix in (5) can be expressed as   J D⊤ W  0. (8) W⊤ D W⊤ ΣW It follows from the Schur complement of the lower-right block of (8) that 0  D⊤ W(W⊤ ΣW)−1 W⊤ D  J, (9) assuming that W⊤ ΣW has full rank [12]. Equation (9) yields a nonnegative lower bound on the FIM that is dependent on the choice of the linear combiner W. The tightest lower bound (9) is found by solving the problem max D⊤ W(W⊤ ΣW)−1 W⊤ D. (10) W The combiner that produces the tightest bound is W⋆ = Σ−1 D. To show this, begin by constructing the following positive semidefinite matrix,   ⊤ −1 D Σ D D⊤ W W⊤ D W⊤ ΣW     ⊤ −1  I 0 D Σ D D⊤ I 0 = 0 W 0 W⊤ D Σ     ⊤ −1/2   ⊤ −1/2 ⊤  I 0 D Σ I 0 D Σ  0. = 0 W 0 W⊤ Σ1/2 Σ1/2 (11) which is clearly attained at W⋆ = Σ D. In conclusion, using (9) and (12), we have proved the following theorem. Theorem 1. The optimal lower bound (in the class of bounds considered) is L , D⊤ Σ−1 D  J, (13) where Σ and D are either obtained analytically or computed numerically. We call L  0 the Pearson information matrix for reasons explained above. Remark: Suppose y ∼ pθ can be modeled as y = µ(θ) + w ∈ RN , where w is a zero-mean random variable. Let z(y) = y. Then the corresponding PIM coincides with the FIM bounds in [5], [6] and in [7], when the covariance matrix is fixed, Σ, and variable, Σ(θ), respectively. The above algebraic derivation of the PIM provides, moreover, a simple textbook-like proof of the optimized FIM bound in [10] (which also contains an illustrative example consisting of a nonlinear amplification device). B. Connection to misspecified data distributions We now relate L to certain properties of misspecified data distributions using the principle of maximum entropy. Instead of the unknown or intractable distribution pθ , we will use an alternative statistical model, denoted p⋆ , along with the following identity: ln pθ = ln p⋆ + ln δ⋆ , which holds for any choice of p⋆ , where δ⋆ = ppθ⋆ . The uncertainty of the data y is quantified by the (differential) entropy which can be decomposed as H(pθ ) , − E[ln pθ ] = − E[ln p⋆ ] − ∆(pθ ||p⋆ ), where ∆(pθ ||p⋆ ) = E[ln δ⋆ ] ≥ 0 is the divergence of p⋆ from the unknown distribution pθ [13], [14]. We decompose the score function into ∂ ln pθ ∂ ln p⋆ ∂ ln δ⋆ = + , (14) ∂θ ∂θ ∂θ where the terms correspond to a misspecified score and a divergence score, respectively. The misspecified information matrix is defined as " # ∂ ln p⋆ ∂ ln p⋆ ⊤ J⋆ , E  0, (15) ∂θ ∂θ where the expectation is taken with respect to pθ . Lemma 1. A general lower bound on J is e  J, J⋆ + J (16) 3 where " e = E ∂ ln δ⋆ ∂ ln p⋆ J ∂θ ∂θ ⊤ # +E " ∂ ln p⋆ ∂ ln δ⋆ ∂θ ∂θ ⊤ # where that . (17) Proof: Inserting (14) into (1), we obtain the following decomposition # " ∂ ln δ⋆ ∂ ln δ⋆ ⊤ e (18) J = J⋆ + J + E ∂θ ∂θ and the result follows immediately. We are concerned with misspecified data models p⋆ that satisfy the given constraint E[z] = µ. That is, distributions that satisfy Z zp⋆ dy = µ. (19) In particular, we let p⋆ correspond to the maximum uncertainty of y. The distribution with the maximum (differential) entropy is known to be p⋆ ≡ arg max − E′ [ln p′ ] = exp(λ⊤ z − λ0 ), p′ ∈P where P is the set of valid probability distributions for y that satisfy (19) and λ0 , λ are multipliers that are chosen to satisfy the constraint (assuming that the problem is feasible) [14]. For completeness, we prove this result by noting that the following upper bound holds for any p′ : H(p′ ) = − E′ [ln p′ ] ≤ − E′ [ln p⋆ ] Z = − (λ⊤ z − λ0 )p′ dy Z = − (λ⊤ z − λ0 )p⋆ dy = H(p⋆ ). The equality in the penultimate line follows since both p′ and p⋆ satisfy the constraint (19). The maximum entropy distribution therefore belongs to the exponential family, that is,   p⋆ (y; θ) = exp λ⊤ (θ)z(y) − λ0 (θ) , (20) where λ0 (θ) = ln Z is a normalizing constant.   exp λ⊤ (θ)z(y) dy is n × M . The second line follows from the fact Z ∂λ0 1 ∂ exp(λ⊤ z) = R dy ∂θ ∂θ exp(λ⊤ z)dy′ ! Z exp(λ⊤ z) ∂λ⊤ dy z R = ∂θ exp(λ⊤ z)dy′ Z ∂λ⊤ = zp⋆ dy ∂θ Z ∂λ⊤ = zpθ dy ∂θ ∂λ⊤ = µ. ∂θ Next, from the proof of (16) we have that # " ∂ ln δ⋆ ∂ ln δ⋆ ⊤ e . J − (J⋆ + J) = E ∂θ ∂θ Proof: For (20), we have that (22) (23) (24) Using (14), the divergence score can be written as the sum of two random vectors,   ∂ ln δ⋆ ∂ ln pθ ⊤ −1 = − D Σ (z − µ) ∂θ ∂θ   (25) ∂ ln p⋆ . + D⊤ Σ−1 (z − µ) − ∂θ For the maximum entropy distribution, these two random vectors are orthogonal, i.e.,  h ∂ ln p θ − D⊤ Σ−1 (z − µ) E ∂θ  ⊤ i ∂ ln p⋆ ⊤ −1 × D Σ (z − µ) − ∂θ    ∂λ = D⊤ − D⊤ Σ−1 Σ Σ−1 D − ∂θ = 0, where the equality follows from (22) and (6). Finally, by inserting (25) into (24), the right hand side of (24) equals ⊤    ∂λ ∂λ −1 −1 ⊤ −1 Σ Σ D− J−D Σ D+ Σ D− ∂θ ∂θ and result (21) follows. Theorem 2. The tightest bound (16) is the PIM: e  L  J, J⋆ + J Lemma 2. Using the maximum entropy distribution (20), the bound in (16) is given by ⊤    ∂λ e = L − Σ−1 D − ∂λ (21) Σ Σ−1 D − J⋆ + J ∂θ ∂θ ∂λ⊤ ∂λ0 ∂ ln p⋆ = z− ∂θ ∂θ ∂θ ∂λ⊤ (z − µ) = ∂θ ∂λ⊤ ∂θ (26) and the corresponding misspecified information matrix is J⋆ = L. Proof: It follows from (22) that for maximum entropy distributions, the misspecified information matrix is ∂λ⊤ ∂λ Σ . ∂θ ∂θ Furthermore, in (21) it is readily seen that the tightest bound is attained for ∂λ⊤ = D⊤ Σ−1 . (27) ∂θ e = 0 in (16). Therefore (27) leads to J⋆ = L and J J⋆ = 4 C. The PIM increases as M increases The vector z employs M statistics, and to stress that we −1 write LM = D⊤ M ΣM DM . Theorem 3. Including more statistics in z can never worsen the bound, i.e., 0  Ln  · · ·  LM  LM+1  J. (28) Proof: Suppose we extend the vector z with an (M +1)th statistic so that we can write     ΣM c DM ΣM+1 = and D = . (29) M+1 c⊤ κ d⊤ Then calculating Σ−1 M+1 using [15, Lemma A.2], we obtain      ⊤  ΣM c −1 DM LM+1 = DM d c⊤ κ d⊤      I   = D⊤ d Σ−1 M M I 0 0      ⊤ −1  DM 1 −Σ−1 M c + −c ΣM 1 d⊤ 1 κ − c⊤ Σ−1 M c = LM + ⊤ −1 ⊤ (d − D⊤ Σ−1 M c)(d − D ΣM c) κ − c⊤ Σ−1 M c  LM . An interesting research problem is to study the limit of LM as M → ∞. Under what conditions will LM converge to J? V. PIM AND G ENERALIZED METHOD OF MOMENTS b exists if and only if the An efficient unbiased estimator θ following identity holds [3], [4] ∂ ln pθ b − θ), = J(θ (30) ∂θ which is satisfied only in rare cases. In more general scenarios, the maximum likelihood estimator b = arg min − ln p(y; θ). θ (31) θ is (asymptotically) unbiased with (asymptotic) covariance mab = J−1 under certain regularity conditions. It is trix Cov[θ] thus asymptotically efficient. Given an appropriate initializab0 , (31) can be solved iteratively using the Newtontion point θ based scoring method: bi+1 = θ bi − J−1 ∂ − ln pθ θ ∂θ bi θ=θ ∂ − ln pb⋆ bi+1 = θ bi − J b−1 θ ⋆ ∂θ bi θ=θ . (32) pθ are unknown, we may use instead When J and ∂ ln ∂θ the best misspecified information matrix (15) and score (22), in the sense of Theorem 2. Then the so-obtained scoring method is related to a method that minimizes a certain class of cost functions V (θ) which we characterize in what follows. Consider evaluating the misspecified variables (15) and (22) b instead of Σ. obtained using (27) and a consistent estimate Σ Then the corresponding scoring method, analogous to (32), can be expressed as ., (33) where we define (according to the above discussion about (15), (22) and (27)) ∂ ln pb⋆ b −1 (z − µ(θ)) = D⊤ (θ)Σ ∂θ b⋆ = D⊤ (θ)Σ b −1 D(θ). J (34) One can verify that (33) is a scoring method for solving the following problem b = arg min 1 (z − µ(θ))⊤ Σ b −1 (z − µ(θ)), θ 2 θ | {z } (35) ,V (θ) p b⋆ b⋆ is an estimate of by noting that ∂θ V (θ) = − ∂ ln and that J ∂θ 2 the Hessian ∂θ V (θ). Eq. (35) is recognized as a generalized method of moments, using an asymptotically optimal weight b −1 [9], [15]. matrix Σ The cost function V (θ) can be characterized around its minimum, as follows b ≃ ∂θ V (θ) + ∂ 2 V (θ)(θ b − θ), 0 = ∂θ V (θ) θ (36) where the right-hand side is a Taylor expansion. Using properb and obtain the following ties of (34) in (36), we can solve for θ approximation b ≃ θ + (D⊤ Σ b −1 D)−1 D⊤ Σ b −1 (z − µ). θ Since the unknown distribution pθ satisfies (19), it follows that b ≃ θ and E[θ] b ≃ (D⊤ Σ−1 D)−1 = L−1  J−1 . Cov[θ] The above expressions hold asymptotically as the number of samples N in y increases [15]. In summary, using a scoring method analogous to (32) leads to the generalized method of moments (35) with asymptotic covariance given by the inverse PIM. VI. C ONCLUSIONS We have provided a direct, algebraic derivation of a tractable lower bound on the Fisher information matrix which we called the Pearson information matrix (for reasons explained above). Furthermore, we presented an information-theoretic link between the PIM and misspecified data distributions as well as a connection to the generalized method of moments. R EFERENCES [1] C. Rao, “Information and accuracy attainable in the estimation of statistical parameters,” Bulletin of the Calcutta Mathematical Society, vol. 37, no. 3, pp. 81–91, 1945. [2] H. Cramér, “A contribution to the theory of statistical estimation,” Scandinavian Actuarial Journal, vol. 1946, no. 1, pp. 85–94, 1946. [3] H. Van Trees and K. Bell, Detection Estimation and Modulation Theory, Pt.I. Detection Estimation and Modulation Theory, Wiley, second ed., 2013 [1968]. [4] S. M. Kay, Fundamentals of Statistical Signal Processing: Estimation theory. Prentice Hall, 1993. [5] P. Stoica and P. Babu, “The Gaussian data assumption leads to the largest Cramér-Rao bound,” IEEE Signal Processing Mag., vol. 28, no. 3, pp. 132–133, 2011. [6] S. Park, E. Serpedin, and K. Qaraqe, “Gaussian assumption: The least favorable but the most useful,” IEEE Signal Processing Mag., vol. 30, no. 3, pp. 183–186, 2013. 5 [7] M. Stein, A. Mezghani, and J. Nossek, “A lower bound for the Fisher information measure,” IEEE Signal Processing Letters, vol. 21, pp. 796– 799, July 2014. [8] K. Pearson, “Contributions to the mathematical theory of evolution,” Philosophical Transactions of the Royal Society of London. A, vol. 185, pp. 71–110, 1894. [9] L. P. Hansen, “Large sample properties of generalized method of moments estimators,” Econometrica: Journal of the Econometric Society, pp. 1029–1054, 1982. [10] M. Stein, J. A. Nossek, and K. Barbé, “Fisher information bounds with applications in nonlinear learning, compression and inference,” arXiv preprint arXiv:1512.03473, 2015. [11] E. T. Jaynes, “Information theory and statistical mechanics,” Physical review, vol. 106, no. 4, p. 620, 1957. [12] R. Horn and C. Johnson, Matrix Analysis. Cambridge University Press, 1990. [13] S. Kullback, Information Theory and Statistics. Dover, 1997 [1959]. [14] T. M. Cover and J. A. Thomas, Elements of Information Theory. John Wiley & Sons, 2006. [15] T. Söderström and P. Stoica, System identification. Prentice-Hall, Inc., 1988.
10math.ST
Published as a conference paper at ICLR 2018 OF GRID - LIKE REPRESENTATIONS BY TRAINING RECURRENT NEURAL NETWORKS TO PERFORM SPATIAL LOCALIZATION arXiv:1803.07770v1 [q-bio.NC] 21 Mar 2018 E MERGENCE Christopher J. Cueva∗, Xue-Xin Wei∗ Columbia University New York, NY 10027, USA {ccueva,weixxpku}@gmail.com A BSTRACT Decades of research on the neural code underlying spatial navigation have revealed a diverse set of neural response properties. The Entorhinal Cortex (EC) of the mammalian brain contains a rich set of spatial correlates, including grid cells which encode space using tessellating patterns. However, the mechanisms and functional significance of these spatial representations remain largely mysterious. As a new way to understand these neural representations, we trained recurrent neural networks (RNNs) to perform navigation tasks in 2D arenas based on velocity inputs. Surprisingly, we find that grid-like spatial response patterns emerge in trained networks, along with units that exhibit other spatial correlates, including border cells and band-like cells. All these different functional types of neurons have been observed experimentally. The order of the emergence of grid-like and border cells is also consistent with observations from developmental studies. Together, our results suggest that grid cells, border cells and others as observed in EC may be a natural solution for representing space efficiently given the predominant recurrent connections in the neural circuits. 1 I NTRODUCTION Understanding the neural code in the brain has long been driven by studying feed-forward architectures, starting from Hubel and Wiesel’s famous proposal on the origin of orientation selectivity in primary visual cortex (Hubel & Wiesel, 1962). Inspired by the recent development in deep learning (Krizhevsky et al., 2012; LeCun et al., 2015; Hochreiter & Schmidhuber, 1997; Mnih et al., 2015), there has been a burst of interest in applying deep feedforward models, in particular convolutional neural networks (CNN) (LeCun et al., 1998), to study the sensory systems, which hierarchically extract useful features from sensory inputs (see e.g., Yamins et al. (2014); Kriegeskorte (2015); Kietzmann et al. (2017); Yamins & DiCarlo (2016)). For more cognitive tasks, neural systems often need to maintain certain internal representations of relevant variables in the absence of external stimuli- a process that requires more than feature extraction. We will focus on spatial navigation, which typically requires the brain to maintain a representation of self-location and update it according to the animal’s movements and landmarks of the environment. Physiological studies done in rodents and other mammals (including humans, non-human primates and bats) have revealed a variety of neural correlates of space in Hippocampus and Entorhinal Cortex (EC), including place cells (O’Keefe, 1976), grid cells (Fyhn et al., 2004; Hafting et al., 2005; Fyhn et al., 2008; Yartsev et al., 2011; Killian et al., 2012; Jacobs et al., 2013), along with border cells (Solstad et al., 2008), band-like cells (Krupic et al., 2012) and others (see Figure 1a). In particular, each grid cell only fires when the animal occupies a distinct set of physical locations, and strikingly these locations lie on a lattice. The study of the neural underpinning of spatial cognition has provided an important window into how high-level cognitive functions are supported in the brain (Moser et al., 2008; Aronov et al., 2017). ∗ equal contribution 1 Published as a conference paper at ICLR 2018 How might the spatial navigation task be solved using a network of neurons? Recurrent neural networks (RNNs) (Hochreiter & Schmidhuber, 1997; Graves et al., 2013; Oord et al., 2016; Theis & Bethge, 2015; Gregor et al., 2015; Sussillo et al., 2015) seem particularly useful for these tasks. Indeed, recurrent-based continuous attractor networks have been one popular type of models proposed for the formation of grid cells (McNaughton et al., 2006; Burak & Fiete, 2009; Couey et al., 2013) and place cells (Samsonovich & McNaughton, 1997). Such models have provided valuable insights into one set of possible mechanisms that could support the formation of the grids. However, these models typically rely on fine-tuned connectivity patterns, in particular the models need a subtle yet systematic asymmetry in the connectivity pattern to move the attractor state according to the animal’s own movement. The existence of such a specific 2D connectivity in rodent EC remains unclear. Additionally, previous models have mainly focused on grid cells, while other types of responses that co-exist in the Entorhinal Cortex have been largely ignored. It would be useful to have a unified model that can simultaneously explain different types of neural responses in EC. Motivated by these considerations, here we present an alternative modeling approach for understanding the representation of space in the neural system. Specifically, we trained a RNN to perform some spatial navigation tasks. By leveraging the recent development in RNN training and knowledge of the navigation system in the brain, we show that training a RNN with biologically relevant constraints naturally gives rise to a variety of spatial response profiles as observed in EC, including grid-like responses. To our knowledge, this is the first study to show that grid-like responses could emerge from training a RNN to perform navigation. Our result implies that the neural representation in EC may be seen as a natural way for the brain to solve the navigation task efficiently (Wei et al., 2015). More generally, it suggests that RNNs can be a powerful tool for understanding the neural mechanisms of certain high-level cognitive functions. firing rate a grid cell b band cell border cell irregular cell RNN c Input Output speed x-position direction speed Performance Output: target Output: RNN direction y-position Figure 1: a) Example neural data showing different kinds of neural correlates underlying spatial navigation in EC. All figures are replotted from previous publications. From left to right: a “grid cell” recorded when an animal navigates in a square environment, replotted from Krupic et al. (2012), with the heat map representing the firing rate of this neuron as a function of the animal’s location (red corresponds to high firing rate); a “band-like” cell from Krupic et al. (2012); a border cell from Solstad et al. (2008); an irregular spatially tuned cell from Diehl et al. (2017); a “speed cell” from Kropff et al. (2015), which exhibits roughly linear dependence on the rodent’s running speed; a “heading direction cell” from Sargolini et al. (2006), which shows systematic change of firing rate depending on animal’s heading direction. b) The network consists of N = 100 recurrently connected units (or neurons) which receive two external inputs, representing the animal’s speed and heading direction. The two outputs linearly weight the neurons in the RNN. The goal of training is to make the responses of the two output neurons accurately represent the animal’s physical location. c) Typical trajectory after training. As shown, the output of the RNN can accurately, though not perfectly, track the animal’s location during navigation. 2 Published as a conference paper at ICLR 2018 2 2.1 M ODEL M ODEL DESCRIPTION Our network model consists of a set of recurrently connected units (N = 100). The dynamics of each unit in the network ui (t) is governed by the standard continuous-time RNN equation: τ Nin N X X dxi (t) in = −xi (t) + Wijrec uj (t) + Wik Ik (t) + bi + ξi (t) dt j=1 (1) k=1 for i = 1, . . . , N . The activity of each unit, ui (t), is related to the activation of that unit, xi (t), through a nonlinearity which in this study we take to be ui (t) = tanh(xi (t)). Each unit receives input from other units through the recurrent weight matrix W rec and also receives external input, I(t), that enters the network through the weight matrix W in . Each unit has two sources of bias, bi which is learned and ξi (t) which represents noise intrinsic to the network and is taken to be Gaussian with zero mean and constant variance. The network was simulated using the Euler method for T = 500 timesteps of duration τ /10. To perform a 2D navigation task with the RNN, we linearly combine the firing rates of units in the network to estimate the current location of the animal. The responses of the two linear readout neurons, y1 (t) and y2 (t), are given by the following equation: yj (t) = N X out Wji ui (t) (2) i=1 2.2 I NPUT TO THE NETWORK The network inputs and outputs were inspired by simple spatial navigation tasks in 2D open environments. The task resembles dead-reckoning (sometimes referred to as path integration), which is ethologically relevant for many animal species (Darwin, 1873; Mittelstaedt & Mittelstaedt, 1980; Etienne & Jeffery, 2004; McNaughton et al., 2006). To be more specific, the inputs to the network were the animal’s speed and direction at each time step. Experimentally, it has been shown that the velocity signals exist in EC (Sargolini et al., 2006; Kropff et al., 2015; Hinman et al., 2016), and there is also evidence that such signals are necessary for grid formation (Winter et al., 2015a;b). Throughout the paper, we adopt the common assumption that the head direction of the animal coincides with the actual moving direction. The outputs were the x- and y-coordinates of the integrated position. The direction of the animal is modeled by modified Brownian motion to increase the probability of straight-runs, in order to be consistent with the typical rodent’s behavior in an open environment. The usage of such simple movement statistics has the advantage of having full control of the simulated trajectories. However, for future work it would be very interesting to test the model using different animals’ real movement trajectories to see how the results might change. Special care is taken when the animal is close to the boundary. The boundary of the environment will affect the statistics of the movement, as the animal cannot cross the boundary. This fact was reflected in the model by re-sampling the angular input variable until the input angle did not lead the animal outside the boundary. In the simulations shown below, the animal always starts from the center of the arena, but we verified that the results are insensitive to the starting locations. 2.3 T RAINING We optimized the network parameters W rec , W in , b and W out to minimize the squared error in equation (3) between target x- and y-coordinates from a two dimensional navigation task (performed in rectangular, hexagonal, and triangular arenas) and the network outputs generated according to equation (2). M,T,N Xout 1 E= (yj (t, m) − yjtarget (t, m))2 (3) M T Nout m,t,j=1 Parameters were updated with the Hessian-free algorithm (Martens & Sutskever, 2011) using minibatches of size M = 500 trials. In addition to minimizing the error function in equation (3) we 3 Published as a conference paper at ICLR 2018 regularized the input and output weights according to equation (4) and the squared firing rates of the units (referred to as metabolic cost) according to equation (5). In sum, the training aims to minimize a loss function, that consists of the error of the animal, the metabolic cost, and a penalty for large network parameters. RL2 N,N NX out ,N Xin 1 1 in 2 = (W ) + (Wijout )2 N Nin i,j=1 ij N Nout i,j=1 RF R = 1 NTM N,T,M X ui (t, m)2 (4) (5) i,t,m=1 We find that the results are qualitatively insensitive to the initialization schemes used for the recurrent weight matrix W rec . For the results presented in this paper, simulations in the hexagonal environment were obtained by initializing the elements of W rec to be zero mean Gaussian random variables with variance 1.52 /N , and simulations in the square and triangular environments were initialized with an orthogonal W rec (Saxe et al., 2014). We initialized the bias b and output weights W out to be zero. The elements of W in were zero mean Gaussian variables with variance 1/Nin . a grid-like b band-like c border d irregular Figure 2: Different types of spatial selective responses of units in the trained RNN. Example simulation results for three different environments (square, triangular, hexagon) are presented. Blue (yellow) represents low (high) activity. a) Grid-like responses. b) Band-like responses; c) Borderrelated responses; d) Spatially irregular responses. These responses can be spatially selective but they do not form a regular pattern defined in the conventional sense. 3 R ESULTS We run simulation experiments in arenas with different boundary shapes, including square, triangular and hexagonal. Figure 1c shows a typical example of the model performance after training; the network (red trace) accurately tracks the animal’s actual path (black). 3.1 T UNING PROPERTIES OF THE MODEL NEURONS We are mostly interested in what kind of representation the RNN has learned to solve this navigation task, and whether such a representation resembles the response properties of neurons in EC (Moser et al., 2008). 3.1.1 S PATIAL TUNING To test whether the trained RNN developed location-selective representations, we plot individual neurons’ mean activity level as a function of the animal’s location during spatial exploration. Note 4 Published as a conference paper at ICLR 2018 that these average response profiles should not be confused with the linear filters typically shown in feedforward networks. Surprisingly, we find neurons in the trained RNN show a range of interesting spatial response profiles. Examination of these response profiles suggests they can be classified into distinct functional types. Importantly, as we will show, these distinct spatial response profiles can be mapped naturally to known physiology in EC. The spatial responses of all units in trained networks are shown in the Appendix. Grid-like responses Most interestingly, we find some of the units in the RNN exhibit clear grid-like responses (Figure 2a). These firing patterns typically exhibit multiple firing fields, with each firing field exhibiting roughly circular symmetric or ellipse shape. Furthermore, the firing fields are highly structured, i.e., when combined, are arranged on a regular lattice. Furthermore, the structure of the response lattice depends on the shape of the boundary. In particular, training the network to perform self-localization in a square environment tends to give rectangular grids. In hexagonal and triangular environments, the grids are closer to triangular. Experimentally, it is shown that (medial) EC contains so-called grid cells which exhibit multiple firing fields that lie on a regular grid (Fyhn et al., 2004; Hafting et al., 2005). The grid-like firing patterns in our simulation are reminiscent of the grid cells in rodents and other mammals. However, we also notice that the the grid-like model responses typically exhibit few periods, not as many as experimental data (see Figure 1a). It is possible that using a larger network might reveal finer grid-patterns in our model. Nonetheless, it is surprising that the gird-like spatial representations can develop in our model, given there is no periodicity in the input. Another potential concern is that, experimentally it is reported that the grids are often on the corners of a triangular lattice (Hafting et al., 2005) even in square environments (see Figure 1a), though the grids are somewhat influenced by the shape of the environment. However, the rats in these experiments presumable had spatial experience in other environments with various boundary shapes. Experimentally, it would be interesting to see if grid cells would lie on a square lattice instead if the rats are raised in a single square environment - a situation we are simulating here. Border responses Many neurons in the RNN exhibit selectivity to the boundary (Figure 2c). Typically, they only encode a portion of the boundary, e.g. one piece of wall in a square shaped environment. Such properties are similar to the border cells discovered in rodent EC (Solstad et al., 2008; Savelli et al., 2008; Lever et al., 2009). Experimentally, border cells mainly fire along one piece of wall, although some have been observed to fire along multiple borders or along the whole boundary of the environment; interestingly, these multi-border responses were also observed in some RNN models. Currently, it is unclear how the boundary-like response profiles emerge (Solstad et al., 2008; Savelli et al., 2008; Lever et al., 2009). Our model points to the possibility that the border cells may emerge without the presence of tactile cues. Furthermore, it suggests that border cell formation may be related to the movement statistics of the animals, i.e. due to the asymmetry of the movement statistics along the boundary. Band-like responses Interestingly, some neurons in the RNN exhibit band-like responses (Figure 2b). In most of our simulations, these bands tend to be parallel to one of the boundaries. For some of the units, one of the bands overlaps the boundary, but for others, that is not the case. Experimentally, neurons with periodic-like firing patterns have been recently reported in rodent EC. In one study, it has been reported that a substantial portion of cells in EC exhibit band-like firing characteristics (Krupic et al., 2012). However, we note that based on the reported data in Krupic et al. (2012), the band pattern is not as clear as in our model. Spatially-stable but non-regular responses Besides the units described above, most of the remaining units also exhibit stable spatial responses, but they do not belong to the above categories. These response profiles can exhibit either one large irregular firing field; or multiple circular firing fields, but these firing fields do not show a regular pattern. Experimentally these types of cells have also been observed. In fact, it is recently reported that the non-grid spatial cells constitute a large portion of the neurons in Layer II and III of rodent EC (Diehl et al., 2017). 3.1.2 S PEED TUNING AND HEAD DIRECTION TUNING Speed tuning We next ask how neurons in the RNN are tuned to the inputs. Many of the model neurons exhibit linear responses to the running speed of the animal, while some neurons show no selectivity to speed, as suggested by the near-flat response functions. Example response profiles are 5 Published as a conference paper at ICLR 2018 a d g b e h c f i direction speed direction speed direction speed Figure 3: Direction tuning and speed tuning for nine example units in an RNN trained in a triangular arena. For each unit, we show the spatial tuning, (head) directional tuning, speed tuning respectively, from left to right. a,b,c) The three model neurons show strong directional tuning, but the spatial tuning is weak and irregular. The three neurons also exhibit linear speed tuning. d,e,f) The three neurons exhibit grid-like firing patterns, and clear speed tuning. The strength of their direction tuning differ. g,h) Border cells exhibit weak and a bit complex directional tuning and almost no speed tuning. i) This band cell shows weak directional tuning, but strong speed tuning. shown in Figure 3. Interestingly, we observe that the model border cells tend to have almost zero speed-tuning (e.g., see Figure 3g,h). Head direction tuning A substantial portion of the model neurons show direction tuning. There are a diversity of direction tuning profiles, both in terms of the strength of the tuning and their preferred direction. Example tuning curves are shown in Figure 3, and the direction tuning curves of a complete population are shown in the Appendix. Interestingly, in general model neurons which show the strongest head direction tuning do not show a clear spatial firing pattern (see Figure 3a,b,c). This suggests that there are a group of neurons which are mostly responsible for encoding the direction. We also notice that neurons with clear grid-like firing can exhibit a variety of direction tuning strengths, from weak to strong (Figure 3d,e,f). In the Appendix, we quantify the relation between these different tuning properties at the whole population level, which show somewhat complex dependence. Experimentally, the heading direction tuning in EC is well-known, e.g., Sargolini et al. (2006). Both the grid and non-grid cells in EC exhibit head direction tuning (Sargolini et al., 2006). Furthermore, the linear speed dependence of the model neurons is similar to the properties of speed cells reported recently in EC (Kropff et al., 2015). Our result is also consistent with another recent study reporting that the majority of neurons in EC exhibit some amount of speed tuning (Hinman et al., 2016). It remains an open question experimentally, at a population level, how different types of tuning characteristics in EC relate to each other. 3.1.3 D EVELOPMENT OF THE TUNING PROPERTIES We next investigate how the spatial response profiles evolve as learning/training progresses. We report two main observations. First, neurons that fire selectively along the boundary typically emerge first. Second, the grid-like responses with finer spatial tuning patterns only emerge later in training. For visualization, we perform dimensionality reduction using the t-SNE algorithm (Maaten & Hinton, 2008). This algorithm embeds 100 model neurons during three phases of training (early, intermediate, and late) into a two-dimensional space according to the similarity of their temporal responses. Here the similarity metric is taken to be firing rate correlation. In this 2D space as shown in Figure 4a, border cell representations appear early and stably persist through the end of training. Furthermore, early during training all responses are similar to the border related responses. In contrast, grid-like cells typically undergo a substantial change in firing pattern during training before settling into their final grid-like representation (Figure 4b). The developmental time line of the grid-like cells and border cells is roughly consistent with developmental studies in rodents. Experimentally, it is known that border cells emerge earlier in development, and they exist at about 2 weeks after the rat is born (Bjerknes et al., 2014). The grid 6 Published as a conference paper at ICLR 2018 a Dimension 2 cells mature only at about 4 weeks after birth (Langston et al., 2010; Wills et al., 2010; Bjerknes et al., 2014). Furthermore, our simulations suggest the reason why border cells emerge earlier in development may be that computationally it is easier to wire-up a network that gives rise to border cell responses. b 0 -10 Early Training iteration 100 -20 Intermediate Training 500 -20 iteration -10 Late Training iteration1000 0 Dimension 1 10 Figure 4: Development of border cells and grid-like cells. Early during training all responses are similar to the border related responses, and only as training continues do the grid-like cells emerge. We perform dimensionality reduction using the t-SNE algorithm on the firing rates of the neurons. Each dot represents one neuron (N = 100), and the color represents different training stages (early/intermediate/late shown in blue/cyan/yellow). Each line shows the trajectory of a single highlighted neuron as its firing responses evolve during training. In panel a), we highlight the border representation. It appears there are four clusters of border cells, each responding to one wall of a square environment (spatial responses from four of these border cells are inset). These cells’ response profiles appear early and stably persist through training, illustrated by the short distance they travel in this space. In b), we show that the neurons which eventually become grid cells initially have tuning profiles similar to the border cells but then change their tuning substantially during learning. As a natural consequence, they need to travel a long distance in this space between the early and late phase of the training. Spatial responses are shown for four of these grid-like cells during the late phase of training. 3.2 T HE IMPORTANCE OF REGULARIZATION We find appropriate regularizations of the RNN to be crucial for the emergence of grid-like representations. We only observed grid-like representations when the network was encouraged to store information while perturbed by noise. This was accomplished by setting the speed input to zero, e.g. zero speed 90% of the time, and adding Gaussian noise to the network (ξi (t) in equation (1)); the precise method for setting the speed input to zero and the value of the noise variance is not crucial for our simulations to develop grid-like representations. The cost function which aims to capture the penalization on the metabolic cost of the neural activity also acts as an important regularization. Our simulations show that the grid-like representation did not emerge without this metabolic cost. In Figure 5, we show typical simulation results for a square environment, with and without proper metabolic regularization. In the Appendix, we illustrate the effect of regularization further, in particular the role of injecting noise into the RNN units. Our results are consistent with the general notion on the importance of incorporating proper constraint for learning useful representations in neural networks (Bengio et al., 2013). Furthermore, it suggests that, to learn a model with response properties similar to neural systems it may be necessary to incorporate the relevant constraints, e.g., noise and metabolic cost. 3.3 E RROR CORRECTION AROUND THE BOUNDARY One natural question is whether the trained RNNs are able to perform localization when the path length exceeds the typical length used during training (500 steps), in particular given that noise in 7 Published as a conference paper at ICLR 2018 a b Figure 5: Complete set of spatial response profiles for 100 neurons in a RNN trained in a square environment. a) Without proper regularization, complex and periodic spatial response patterns do not emerge. b) With proper regularization, a rich set of periodic response patterns emerge, including grid-like responses. Regularization can also be adjusted to achieve spatial profiles intermediate between these two examples. 0.02 no boundary interaction boundary interaction b Squared error Squared error a 0.016 0.012 0 boundary interaction 1 boundary interaction 2 to 5 interactions 6 to 50 interactions 0.4 0 (in the next 50 time steps) 0.008 RNN output constant output 0.8 -40 -20 0 20 40 Timesteps relative to first boundary interaction 0 2 4 6 Timesteps 8 10 10 5 Figure 6: Error-correction happens at the boundary and the error is stable over time. At the boundary, the direction is resampled to avoid input velocities that lead to a path extending beyond the boundary of the environment. These changing input statistics at the boundary, termed a boundary interaction, are the only cue the RNN receives about the boundary. We find that the RNN uses the boundary interactions to correct the accumulated error between the true integrated input and its prediction based on the linear readout of equation (2). Panel a), the mean squared error increases when there are no boundary interactions, but then decreases after a boundary interaction, with more boundary interactions leading to greater error reduction. In the absence of further boundary interaction, the squared error would gradually increase again (blue curve) at roughly a constant rate. b) The network was trained using mini-batches of 500 timesteps but has stable error over a duration at least four orders of magnitude larger. The error of the RNN output (mean and standard deviation shown in black, computed based on 10000 timesteps) is compared to the error that would be achieved by an RNN outputting the best constant values (red). the network would gradually accumulate, leading to a decrease in localization performance. We test this by simulating paths that are several orders of magnitude longer. Somewhat surprisingly, we find the RNNs still perform well (Figure 6b). In fact, the squared error (averaged over every 10000 steps) is stable. The spatial response profiles of individual units also remain stable. This implies that the RNNs have acquired intrinsic error-correction mechanisms during training. As shown earlier, during training some of the RNN units develop boundary-related firing (Figure 2c), presumably by exploiting the change of input statistics around the boundary. We hypothesize that 8 Published as a conference paper at ICLR 2018 boundary interactions may enable error-correction through signals based on these boundary-related activities. Indeed, we find that boundary interactions can dramatically reduce the accumulated error (Figure 6a). Figure 6a shows that, without boundary interactions, on average the squared error grows roughly linearly as expected, however, interactions with the boundaries substantially reduce the error, and more frequent boundary interactions can reduce the error further. Error-correction on grid cells via boundary interactions has been proposed (Hardcastle et al., 2015; Pollock et al., 2017), however, we emphasize that the model proposed here develops the grid-like responses, boundary responses and the error-correction mechanisms all within the same neural network, thus potentially providing a unifying account of a diverse set of phenomena. 4 D ISCUSSION In this paper, we trained RNNs to perform path integration (dead-reckoning) in 2D arenas. We found that after training RNNs with appropriate regularization, the model neurons exhibit a variety of spatial and velocity tuning profiles that match neurophysiology in EC. What’s more, there is also similarity in terms of when these distinct neuron types emerge during training/development. The EC has long been thought to be involved in path integration and localization of the animal’s location (Moser et al., 2008). The general agreement between the different response properties in our model and the neurophysiology provide strong evidence supporting the hypothesis that the neural population in EC may provide an efficient code for representation self-locations based on the velocity input. Recently, there has been increased interest in using complex neural network models to understand the neural code. But the focus has been on using feedforward architectures, in particular CNNs (LeCun et al., 1998). Given the abundant recurrent connections in the brain, it seems a particularly fruitful avenue to take advantage of the recent development in RNNs to help with neuroscience questions (Mante et al., 2013; Song et al., 2016; Miconi, 2017; Sussillo et al., 2015). Here, we only show one instance following this approach. However, the insight from this work could be general, and potentially useful for other cognitive functions as well. The finding that metabolic constraints lead to the emergence of grid-like responses may be seen as conceptually related to the efficient coding hypothesis in visual processing (Barlow, 1961), in particular the seminal work on the emergence of the V1-like Gabor filters in a sparse coding model by Olshausen & Field (1996). Indeed, our work is partly inspired by these results. While there are conceptual similarities, however, we should also note there are differences between the sparse coding work and ours. First, the sparsity constraint in sparse coding can be naturally viewed as a particular prior while in the context of the recurrent network, it is difficult to interpret that way. Second, the grid-like responses are not the most sparse solution one could imagine. In fact, they are still quite dense compared to a more spatially localized representation. Third, the grid-like patterns that emerged in our network are not filters based on the raw input, rather the velocity inputs need to be integrated first in order to encode spatial locations. Our work is also inspired by recent work using the efficient coding idea to explain the functional architecture of the grid cells (Wei et al., 2015). It has been shown that efficient coding considerations could explain the particular set of grid scales observed in rodents (Stensola et al., 2012). However, in that work, the firing patterns of the neurons are assumed to have a lattice structure to start with. Furthermore, our work is related to the study by Sussillo and others (Sussillo et al., 2015), in which they show that regularization of RNN models are important for generating solutions that are similar to the neural activity observed in motor cortex. In Sussillo et al., a smoothness constraint together with others lead to simple oscillatory neural dynamics that well matches the neural data. We have not incorporated a smoothness constraint into our network. Additionally, we note that there are a few recent studies which use place cells as the input to generate grid cells (Dordek et al., 2016; Stachenfeld et al., 2016), which are fundamentally different from our work. In these feedforward network models, the grid cells essentially perform dimensionality reduction based on the spatial input from place cells. However, the main issue with these models is that, it is unclear how place cells acquire spatial tuning in the first place. To the contrary, our model takes the animal’s velocity as the input, and addresses the question of how the spatial tuning can be generated from such input, which are known to exist in EC (Sargolini et al., 2006; Kropff et al., 2015). In another related study (Kanitscheider & Fiete, 2016), the authors train a RNN with 9 Published as a conference paper at ICLR 2018 LSTM units (Hochreiter & Schmidhuber, 1997) to perform different navigation tasks. However, no grid-like spatial firing patterns are reported. Although our model shows a qualitative match to the neural responses observed in the EC, nonetheless it has several major limitations, with each offering interesting future research directions. First, the learning rule we use seems to be biologically implausible. We are interested in exploring how a more biologically plausible learning rule could give rise to similar results (Lillicrap et al., 2016; Miconi, 2017; Guerguiev et al., 2017). Second, the simulation results do not show a variety of spatial scales in grid-like cells. Experimentally, it is known that grid cells have multiple spatial scales, that scale geometrically with a ratio 1.4 (Stensola et al., 2012), and this particular scale ratio is predicted by efficient coding of space (Wei et al., 2015). We are investigating how to modify the model to get a hierarchy of spatial scales, perhaps by incorporating more neurons or modifying the regularization. Last but not least, we have focused on the representation produced by the trained RNN. An equally important set of questions concern how the networks actually support the generation of such a representation. As a preliminary effort, we have examined the connectivity patterns of the trained network, and they do not seem to resemble the connectivity patterns required by standard attractor network models. Maybe this should not be seen as too surprising. After all, the trained networks can produce a diverse set of neural responses, while the previous models only led to grid responses. It would be interesting for future work to systematically examine the questions related to the underlying mechanisms. 5 ACKNOWLEDGEMENTS We thank members of the Center for Theoretical Neuroscience at Columbia University for useful discussions and three anonymous reviewers for constructive feedback. Research supported by NSF NeuroNex Award DBI-1707398 and NIH training grant 5T32NS064929 (CJC). R EFERENCES Dmitriy Aronov, Rhino Nevers, and David W Tank. Mapping of a non-spatial dimension by the hippocampalentorhinal circuit. Nature, 2017. Horace B Barlow. Possible principles underlying the transformation of sensory messages. Sensory communication, pp. 217–234, 1961. Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013. Tale L Bjerknes, Edvard I Moser, and May-Britt Moser. Representation of geometric borders in the developing rat. Neuron, 82(1):71–78, 2014. Yoram Burak and Ila R Fiete. Accurate path integration in continuous attractor network models of grid cells. PLoS computational biology, 5(2):e1000291, 2009. Jonathan J Couey, Aree Witoelar, Sheng-Jia Zhang, Kang Zheng, Jing Ye, Benjamin Dunn, Rafal Czajkowski, May-Britt Moser, Edvard I Moser, Yasser Roudi, et al. Recurrent inhibitory circuitry as a mechanism for grid formation. Nature neuroscience, 16(3):318–324, 2013. Charles Darwin. Origin of certain instincts. Nature, 7:417–418, 1873. Geoffrey W Diehl, Olivia J Hon, Stefan Leutgeb, and Jill K Leutgeb. Grid and nongrid cells in medial entorhinal cortex represent spatial location and environmental features with complementary coding schemes. Neuron, 94(1):83–92, 2017. Yedidyah Dordek, Daniel Soudry, Ron Meir, and Dori Derdikman. Extracting grid cell characteristics from place cell inputs using non-negative principal component analysis. eLife, 5:e10094, 2016. Ariane S Etienne and Kathryn J Jeffery. Path integration in mammals. Hippocampus, 14(2):180– 192, 2004. 10 Published as a conference paper at ICLR 2018 Marianne Fyhn, Sturla Molden, Menno P Witter, Edvard I Moser, and May-Britt Moser. Spatial representation in the entorhinal cortex. Science, 305(5688):1258–1264, 2004. Marianne Fyhn, Torkel Hafting, Menno P Witter, Edvard I Moser, and May-Britt Moser. Grid cells in mice. Hippocampus, 18(12):1230–1238, 2008. Alex Graves, Abdel-Rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In Acoustics, speech and signal processing (icassp), 2013 ieee international conference on, pp. 6645–6649. IEEE, 2013. Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015. Jordan Guerguiev, Timothy P Lillicrap, and Blake A Richards. Towards deep learning with segregated dendrites. eLife, 6, 2017. Torkel Hafting, Marianne Fyhn, Sturla Molden, May-Britt Moser, and Edvard I Moser. Microstructure of a spatial map in the entorhinal cortex. Nature, 436(7052):801–806, 2005. Kiah Hardcastle, Surya Ganguli, and Lisa M Giocomo. Environmental boundaries as an error correction mechanism for grid cells. Neuron, 86(3):827–839, 2015. James R Hinman, Mark P Brandon, Jason R Climer, G William Chapman, and Michael E Hasselmo. Multiple running speed signals in medial entorhinal cortex. Neuron, 91(3):666–679, 2016. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of physiology, 160(1):106–154, 1962. Joshua Jacobs, Christoph T Weidemann, Jonathan F Miller, Alec Solway, John F Burke, Xue-Xin Wei, Nanthia Suthana, Michael R Sperling, Ashwini D Sharan, Itzhak Fried, et al. Direct recordings of grid-like neuronal activity in human spatial navigation. Nature neuroscience, 16(9):1188– 1190, 2013. Ingmar Kanitscheider and Ila Fiete. Training recurrent networks to generate hypotheses about how the brain solves hard navigation problems. arXiv preprint arXiv:1609.09059, 2016. Tim Christian Kietzmann, Patrick McClure, and Nikolaus Kriegeskorte. Deep neural networks in computational neuroscience. bioRxiv, pp. 133504, 2017. Nathaniel J Killian, Michael J Jutras, and Elizabeth A Buffalo. A map of visual space in the primate entorhinal cortex. Nature, 491(7426):761–764, 2012. Nikolaus Kriegeskorte. Deep neural networks: a new framework for modeling biological vision and brain information processing. Annual Review of Vision Science, 1:417–446, 2015. Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. Emilio Kropff, James E Carmichael, May-Britt Moser, and Edvard I Moser. Speed cells in the medial entorhinal cortex. Nature, 523(7561):419–424, 2015. Julija Krupic, Neil Burgess, and John O?Keefe. Neural representations of location composed of spatially periodic bands. Science, 337(6096):853–857, 2012. Rosamund F Langston, James A Ainge, Jonathan J Couey, Cathrin B Canto, Tale L Bjerknes, Menno P Witter, Edvard I Moser, and May-Britt Moser. Development of the spatial representation system in the rat. Science, 328(5985):1576–1580, 2010. Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. 11 Published as a conference paper at ICLR 2018 Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. Colin Lever, Stephen Burton, Ali Jeewajee, John O’Keefe, and Neil Burgess. Boundary vector cells in the subiculum of the hippocampal formation. The journal of neuroscience, 29(31):9771–9777, 2009. Timothy P Lillicrap, Daniel Cownden, Douglas B Tweed, and Colin J Akerman. Random synaptic feedback weights support error backpropagation for deep learning. Nature communications, 7, 2016. Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008. Valerio Mante, David Sussillo, Krishna V Shenoy, and William T Newsome. Context-dependent computation by recurrent dynamics in prefrontal cortex. Nature, 503(7474):78–84, 2013. James Martens and Ilya Sutskever. Learning recurrent neural networks with hessian-free optimization. pp. 10331040, 2011. Bruce L McNaughton, Francesco P Battaglia, Ole Jensen, Edvard I Moser, and May-Britt Moser. Path integration and the neural basis of the ’cognitive map’. Nature Reviews Neuroscience, 7(8): 663–678, 2006. Thomas Miconi. Biologically plausible learning in recurrent neural networks reproduces neural dynamics observed during cognitive tasks. eLife, 6:e20899, 2017. M-L Mittelstaedt and H Mittelstaedt. senschaften, 67(11):566–567, 1980. Homing by path integration in a mammal. Naturwis- Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. Edvard I Moser, Emilio Kropff, and May-Britt Moser. Place cells, grid cells, and the brain’s spatial representation system. Annu. Rev. Neurosci., 31:69–89, 2008. John O’Keefe. Place units in the hippocampus of the freely moving rat. Experimental neurology, 51 (1):78–109, 1976. Bruno A Olshausen and David J Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):607, 1996. Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. Eli Pollock, Niral Desai, Xue-Xin Wei, and Vijay B Balasubramanian. A mechanism for selforganized error-correction of grid cells by border cells. CoSyNe abstract, 2017. Alexei Samsonovich and Bruce L McNaughton. Path integration and cognitive mapping in a continuous attractor neural network model. Journal of Neuroscience, 17(15):5900–5920, 1997. Francesca Sargolini, Marianne Fyhn, Torkel Hafting, Bruce L McNaughton, Menno P Witter, MayBritt Moser, and Edvard I Moser. Conjunctive representation of position, direction, and velocity in entorhinal cortex. Science, 312(5774):758–762, 2006. Francesco Savelli, D Yoganarasimha, and James J Knierim. Influence of boundary removal on the spatial representations of the medial entorhinal cortex. Hippocampus, 18(12):1270, 2008. Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. 2014. Trygve Solstad, Charlotte N Boccara, Emilio Kropff, May-Britt Moser, and Edvard I Moser. Representation of geometric borders in the entorhinal cortex. Science, 322(5909):1865–1868, 2008. 12 Published as a conference paper at ICLR 2018 H Francis Song, Guangyu R Yang, and Xiao-Jing Wang. Training excitatory-inhibitory recurrent neural networks for cognitive tasks: A simple and flexible framework. PLoS Comput Biol, 12(2): e1004792, 2016. Kimberly Lauren Stachenfeld, Matthew M Botvinick, and Samuel J Gershman. The hippocampus as a predictive map. bioRxiv, pp. 097170, 2016. Hanne Stensola, Tor Stensola, Trygve Solstad, Kristian Frøland, May-Britt Moser, and Edvard I Moser. The entorhinal grid map is discretized. Nature, 492(7427):72–78, 2012. David Sussillo, Mark M Churchland, Matthew T Kaufman, and Krishna V Shenoy. A neural network that finds a naturalistic solution for the production of muscle activity. Nature neuroscience, 18(7): 1025–1033, 2015. Lucas Theis and Matthias Bethge. Generative image modeling using spatial lstms. In Advances in Neural Information Processing Systems, pp. 1927–1935, 2015. Xue-Xin Wei, Jason Prentice, and Vijay Balasubramanian. A principle of economy predicts the functional architecture of grid cells. Elife, 4:e08362, 2015. B Willmore and DJ Tolhurst. Characterizing the sparseness of neural codes. Network, 12:255–270, 2001. Tom J Wills, Francesca Cacucci, Neil Burgess, and John O’keefe. Development of the hippocampal cognitive map in preweanling rats. Science, 328(5985):1573–1576, 2010. Shawn S. Winter, Benjamin J. Clark, and Jeffrey S. Taube. Disruption of the head direction cell network impairs the parahippocampal grid cell signal. Science, 347(6224):870–874, 2015a. Shawn S. Winter, Max L. Mehlman, Benjamin J. Clark, and Jeffrey S. Taube. Passive transport disrupts grid signals in the parahippocampal cortex. Current Biology, 25:2493–2502, 2015b. Daniel LK Yamins and James J DiCarlo. Using goal-driven deep learning models to understand sensory cortex. Nature neuroscience, 19(3):356–365, 2016. Daniel LK Yamins, Ha Hong, Charles F Cadieu, Ethan A Solomon, Darren Seibert, and James J DiCarlo. Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, 2014. Michael M Yartsev, Menno P Witter, and Nachum Ulanovsky. Grid cells without theta oscillations in the entorhinal cortex of bats. Nature, 479(7371):103–107, 2011. 13 Published as a conference paper at ICLR 2018 A T RIANGULAR ENVIRONMENT Noise 1, Metabolic 0 Noise 0, Metabolic 1 Noise and metabolic cost are important for grid-like representations. The figure on the left shows the spatial responses for a network trained with noise and no metabolic cost. The figure on the right shows the spatial responses for a network trained with no noise and the metabolic cost. 14 Published as a conference paper at ICLR 2018 Head direc&on tuning Activity of unit (-1 to 1) Ac&vity of unit (-1 to 1) Training epoch 2900, 2000 trials, 500 time steps in simulation errormain = 0.002977, normalized error overall = 1.3595% Angular input (0 to 360 degrees) Direc&on input (0 to 360 degrees) Speed tuning Activity of unit (-1 to 1) Ac,vity of unit (-1 to 1) Training epoch 2900, 2000 trials, 500 time steps in simulation errormain = 0.002977, normalized error overall = 1.3595% Speed input (0 to 0.199999) Speed input 15 Published as a conference paper at ICLR 2018 R ECTANGULAR ENVIRONMENT Head direc6on tuning Activity of units (-1 to 1) Ac6vity of unit (-1 to 1) Training epoch 1000, 2000 trials, 450 time steps in simulation errormain = 0.0047399, normalized error overall = 3.5752% Angular input (0 to 360 degrees) Angular input (0 to 360 degrees) Speed tuning Training epoch 1000, 2000 trials, 450 time steps in simulation errormain = 0.0047399, normalized error overall = 3.5752% Activity of unit (-1 to 1) Ac,vity of unit (-1 to 1) B Speed input (0 to 0.2) Speed input 16 Published as a conference paper at ICLR 2018 H EXAGONAL ENVIRONMENT Head direc6on tuning Activity of unit (-1 to 1) Ac6vity of unit (-1 to 1) Training epoch 900, 2000 trials, 450 time steps in simulation errormain = 0.00403, normalized error overall = 4.2275% Angular input (0 to 360 degrees) Angular input (0 to 360 degrees) Speed tuning Activity of unit (-1 to 1) Training epoch 900, 2000 trials, 450 time steps in simulation errormain = 0.00403, normalized error overall = 4.2275% Ac#vity of unit (-1 to 1) C Speed input (0 to 0.2) Speed input 17 Published as a conference paper at ICLR 2018 D R ELATION BETWEEN SPEED , DIRECTION , AND SPATIAL SELECTIVITY To quantify the speed selectivity of each unit we first fit a line to the tuning curve of unit activity as a function of speed. The speed selectivity is the absolute value of the slope. If the unit activity is not modulated by speed then the speed selectivity is 0. To quantify the direction selectivity of each unit we calculated the average unit activity as a function of direction input and then took the maximum minus minimum of this tuning curve. If the unit activity is not modulated by direction then the direction selectivity is 0. To quantify the spatial selectivity we used lifetime sparseness (Willmore & Tolhurst, 2001). If the unit activity is not modulated by spatial location then the spatial selectivity is 0. Each dot in the figures below show the selectivity for a single unit. Rectangle Hexagon 0.5 0.4 0.4 0.4 0.3 0.2 0.1 Spatial selectivity 0.5 Spatial selectivity Spatial selectivity Spa$al selec$vity Triangle 0.5 0.3 0.2 0.1 0 0.3 0.2 0.1 0 0 0.5 1 1.5 2 0 0.5 Direction selectivity 1 1.5 0 2 0 Direction selectivity 0.5 Triangle Rectangle 4 1 1.5 2 1.5 2 Direction selectivity Direc$on selec$vity Hexagon 4 3.5 2 1 Speed selectivity Speed selectivity Speed selectivity Speed selec)vity 3 3 2.5 2 1.5 1 3 2 1 0.5 0 0 0 0.5 1 1.5 2 0 0.5 Direction selectivity 1 1.5 0 2 0 0.5 Direction selectivity 1 Direction selectivity Direc)on selec)vity Triangle Rectangle 4 Hexagon 4 3.5 2 1 Speed selectivity Speed selectivity Speed selectivity Speed selec$vity 3 3 2.5 2 1.5 1 3 2 1 0.5 0 0 0 0.1 0.2 0.3 Spatial selectivity 0.4 0.5 0 0.1 0.2 0.3 0.4 Spatial selectivity Spa$al selec$vity 18 0.5 0 0 0.1 0.2 0.3 Spatial selectivity 0.4 0.5 Published as a conference paper at ICLR 2018 E A DDITIONAL TRAINING DETAILS During training we tried to balance all three terms we were minimizing (E, RL2 , and RF R ) so no single term was neglected or dominated. At the beginning of training we weighted the regularization term RL2 to be equal to the error function E and then decreased the weighting on RL2 according to the schedule used by Martens & Sutskever (2011). We adaptively adjusted the weighting on RF R , starting from an initial value of E/10 and enforcing an upper bound of E/3 as training progressed. We found this training procedure improved training performance and led to more interesting representations. 19
2cs.AI
arXiv:1706.02429v3 [stat.ME] 28 Nov 2017 Fast and General Best Subset Selection using Data Depth and Resampling Subhabrata Majumdar∗ University of Florida Informatics Institute and Snigdhansu Chatterjee† School of Statistics, University of Minnesota Abstract We present a technique using data depth functions and resampling to perform best subset variable selection for a wide range of statistical models. We do this by assigning a score, called an e-value, to a candidate model, and use a fast bootstrap method to approximate sample versions of these e-values. Under general conditions, e-values can separate statistical models that adequately explain properties of the data from those that do not. This results in a fast algorithm that fits only a single model and evaluates p + 1 models, p being the number of predictors under consideration, as opposed to the traditional requirement of fitting and evaluating 2p models. We illustrate in simulation experiments that our proposed method typically performs better than an array of currently used methods for variable selection in linear models and fixed effect selection in linear mixed models. As a real data application, we use our procedure to elicit climatic drivers of Indian summer monsoon precipitation. Keywords: Model selection, best subset selection, linear mixed model, generalized bootstrap, Indian monsoon. ∗ The author acknowledges the University of Minnesota Interdisciplinary Doctoral Fellowship program. This research is partially supported by the National Science Foundation (NSF) under grants # IIS1029711 and # DMS-1622483 and by the National Aeronautics and Space Administration (NASA). † 1 1 Introduction Consider the linear model Y = Xβ +  (1.1) where Y ∈ Rn is the vector of responses, X ∈ Rn×p is the predictor matrix, β ∈ Rp is the unknown vector of coefficients, and  ∈ Rn is a vector of independent and identically distributed random errors. Many important applications of this model demand the detection of important predictors affecting the response and thus obtaining a parsimonious fit to the data in hand. Because of this, variable selection in linear models has been a well-studied topic, including classics (Akaike, 1970; Schwarz, 1978; Shao, 1996; Tibshirani, 1996) and more recent advances (Bertsimas et al., 2016; Lai et al., 2015; Zou, 2006). The two major avenues variable selection has been explored through are sparse penalized regression and best subset selection. Sparse penalized regression has received abundant attention in the past two decades due to its relative computational simplicity and ability to tackle high-dimensional data. However, there are several inferential and algorithmic issues associated with such methods: for example the bias and confidence intervals of Lasso estimates (Zhang and Zhang, 2014) and use of convex relaxations to compute approximate local solutions of nonconvex penalized regression problems (Wang et al., 2013; Zou and Li, 2008). A detailed discussion of the caveats of penalized regression procedures can be found in Bertsimas et al. (2016). On the other hand, the major challenge of performing best subset selection by checking multiple model fits is computational. In the setup of (1.1) there are 2p potential models, and navigating through this model space is an NP-Hard problem (Natarajan, 1995). Greedy methods like forward selection or backward deletion give no theoretical guarantee to select the correct model, and popular algorithms like leaps-and-bounds or branch-and-bounds are not computationally scalable to even moderate data dimensions (n ' 100, p ' 50). A recent paper by Bertsimas et al. (2016) proposed a tractable solution to the best subset problem using techniques from the optimization literature. It requires specifying the desired level of sparsity in the final model beforehand and works well in practice when the true model has a small number of non-zero coefficients. However, this is a largely unverifiable assumption, and there are more computational issues associated with it in high-dimensional situations, which we shall discuss later in the paper. Although there has been some progress in best subset model selection for linear regression, it has received lesser attention for more complex models due to its perceived computational intractability and lack of intelligent search strategies. The fence methods (Jiang et al., 2008; Nguyen and Jiang, 2014) are popular in performing model selection in mixed effect models. Model selection criteria that expand the Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC) and Mallow’s Cp to mixed models (Meza and Lahiri, 2005; Vaida and Blanchard, 2005) and robust regression (Ronchetti, 2000) have also been proposed. However, they still depend on multiple model fits and suffer from the same scalability issues as linear regression best subset selection. 2 Our method In this paper, we propose a unified framework that is able to perform best subset selection in the coefficient vector β for a range of statistical models much broader than (1.1) by traversing a very small proportion of the space of candidate models. Even though our proposal is not based on penalization, we are able to determine important variables in a model by training a single model: the one with all covariates under consideration. We do this by obtaining a score for a candidate model M based on the amount of similarity between the sampling distribution of the model coefficient estimate β̂M and that of the least parsimonious estimate, say β̂. We use data depths, which are functions that provide center-outward ranking for points in multivariate space with respect to a probability distribution (Tukey, 1975; Zuo, 2003; Zuo and Serfling, 2000), to compute this score- which we call the e-value of the candidate model. Specifically, given some depth function D(., .) we define the e-value as e(M) = ED(β̂M , [β̂]) i.e. the expected depth of the model estimates with respect to the sampling distribution of β̂, which is denoted by [β̂]. In this setup, for large enough n the index set Sselect ⊆ {1, . . . , p} obtained using Algorithm 1 elicits all non-zero covariates in the true parameter vector. Algorithm 1. (Best subset selection using e-values) 1. Obtain e-value for the full model: e(Mf ull ) = ED(β̂, [β̂]). 2. Set Sselect = φ. 3. For j in 1 : p Replace j th index of β̂ by 0, name it β̂−j . Obtain e(M−j ) = ED(β̂−j , [β̂]). If e(M−j ) < e(Mf ull )) Set Sselect ← {Sselect , j}. For a size-n finite sample, we use resampling to generate multiple copies of β̂ and subsequently estimate e(M) for each model. The example in Figure 1.1 illustrates our motivation of using mean depth as a model selection criterion. Suppose p = 2 and i ∼ N (0, σ 2 ), σ > 0, i = 1, . . . , n in (1.1), and consider the following choice of models: M1 M2 M3 M4 : : : : Y Y Y Y = X1 β1 + X2 β2 + ; = X1 β1 + ; = X2 β2 + ; = ; Θ1 Θ2 Θ3 Θ4 = R2 = R × {0} = {0} × R = (0, 0)T where Θi denotes the domain of parameter values corresponding to model Mi ; i = 1, ..., 4. Now assume that the true value of the coefficient vector is β0 = (5, 0)T , aT denoting the transpose of a vector or matrix-valued a. The full model estimate has sampling 3 5 3 ● −4 −6 − 1 1 be ta 1 7 ● M1 M2 M3 M4 ● 2 ta2 0 −2 be Figure 1.1: Illustration of the e-value method. The depth surface is obtained using mahalanobis depth. The solid and dotted ellipses represent depth contours at some fixed level α > 0 for sample sizes n1 and n2 , respectively, with n2 > n1 . distribution N (β0 , σ 2 (X T X)−1 ). As n grows, this distribution concentrates around β0 , and the depths at points along the (red) line β2 = 0, as well as at the (red) point (0,0) become smaller and smaller. Hence, the expected depths go to 0 for M3 and M4 . However, owing to affine invariance of depth functions, the range of depth values for points in M1 (blue line) and M2 (blue surface) stays the same. Moreover, depth contours coincide with density contours for elliptical distributions (Liu and Singh, 1993), thus e(M1 ) and e(M2 ) remain positive and do not converge to 0 as n → ∞. For the purpose of covariate selection, the space of all possible models can be divided into two classes: models with non-zero support that contains the non-zero support of the true coefficient vector, and models that do not satisfy this. Because of the above reasoning, e-values for models in the first class become clearly separated from e-values of models in the second class. We further leverage the properties of depth functions to prove that within the first class of ‘good’ models, a rank ordering of e-values of the models exists based on the amount of parsimony in them: after which Algorithm 1 becomes immediate. Structure of paper The paper is organized as follows. Section 2 provides background for the development of our framework. We define e-values formally in Section 3, present details about their estimation through resampling and their implementation through our fast algorithm. Theoretical results are presented in Section 4. In Section 5 we present illustrative examples on how our fast model selection algorithm is implemented, and its performance relative to state-of-art methods in both classical n > p and high-dimensional situations. This is followed in Section 6 with a study on the possible determinants of precipitation in the Indian sub-continent during the summer monsoon months. In Section 7 we discuss the potentials of our proposed method, directions of future research, as well as some caveats and concluding comments. Proofs of all theoretical results are given in the 4 appendix. Notations We denote the (i, j)th entry of a matrix M ∈ RA×B by (M )ij . The notations IA and 0A indicate the identity matrix of dimension A × A and the vector of zeros of dimension A, respectively. For a vector v = (v1 , . . . , vA )T ∈ RA we denote its euclidean qP PA A 2 norm by kvk = i=1 I(vi 6= 0): I(.) being the indicator i=1 vi , and l0 -norm by kvk0 = function. We denote the non-zero support of v by supp(v), i.e. supp(v) = {i : vi 6= 0}. For random variables R, Rn , n = 1, 2, . . ., the notation Rn R means convergence P in distribution, and Rn → R or plimn→∞ Rn = R means convergence in probability. Expectations are denoted by E(·), and the variance of a scalar-valued random variable or the covariance matrix of a vector-valued random variable is denoted by V(·). 2 Preliminaries We introduce the theoretical framework necessary for our methodology in this section. This includes specifications for the following three things: (1) an appropriate method of estimation, (2) categorization of candidate models, and (3) the choice of a depth function. Suppose at stage n there is a triangular array of functions {Ψni (θn , Zni ) : 1 ≤ i ≤ kn , n ≥ 1} (2.1) where Zn = {Zn1 , . . . , Znkn } is an observable array of random variables, and θn ∈ Θn ⊆ Rp . Functions like Ψni (·) have been referred to as energy functions in optimization and related literature, and have also been called contrast functions (Bose and Chatterjee, 2003; Michel and Pfanzagl, 1971; Pfanzagl, 1969). This framework naturally includes different kinds of regressions, mixed effect models, times series and other traditional topics where covariate or model selection has been historically studied. Note that we use a triangular array-based framework here, where the energy functions and the true parameter may depend on n for precise theoretical study, and to capture the scientific reality that data, models and goals of research evolve over time. We assume that there is a true unknown vector of parameters θ0n , which is the unique minimizer of Ψn (θn ) = E kn X Ψni (θn , Zni ) (2.2) i=1 Also denote the common non-zero support of all estimable parameters as S∗n = ∪θn ∈Θn supp(θn ). In this general setup, we associate a candidate model Mn with two quantities: (a) The set of indices Sn ⊆ S∗n where the parameter values are unknown and estimated from the data, and 5 (b) an ordered vector of known constants Cn = (Cnj : j ∈ / Sn ) for parameters not indexed by Sn . The generic parameter vector corresponding to this model, denoted by θmn ∈ Θmn ⊆ Q Θn := j Θnj , will thus have the structure ( θmnj = unknown θmnj ∈ Θnj known Cnj ∈ Θnj for j ∈ Sn , for j ∈ / Sn . (2.3) So that in each model a part of the parameter vector consists of known constants, and the other part is unknown. 2.1 Method of estimation The estimator θ̂∗n of θ0n is obtained as a minimizer of the sample analog of (2.2). Thus θ̂∗n = arg min Ψ̂n (θn ) = arg min θn θn kn X  Ψni θn , Yni  (2.4) i=1 We assume an elliptical asymptotic distribution for θ̂∗n . Following Fang et al. (1990), the density function of an elliptically distributed random variable takes the form: h(x; µ, Σ) = |Σ|−1/2 g((x − µ)T Σ−1 (x − µ)) where µ ∈ Rp , Σ ∈ Rp×p is positive semi-definite, and g is a non-negative scalar-valued density function that is continuous and strictly increasing, and is called the density generator of the elliptical distribution. We denote such an elliptical distribution by E(µ, Σ, g). For the asymptotic parameter distribution we also assume the following conditions: (A1) There exists a sequence of positive reals an ↑ ∞ such that an (θ̂∗n −θ0n ) E(0p , V, g), p×p for some positive-definite matrix V ∈ R and density generator function g; (A2) For almost every data sequence Zn , There exists a sequence of positive definite matrices Vn ∈ Rp×p such that plimn→∞ Vn = V . Note that under standard regularity conditions the limiting distribution of a suitably centered and scaled parameter estimator will be Gaussian, in which case assumptions (A1)-(A2) are naturally satisfied. The estimator in (2.4) corresponds to the full model M∗n , i.e. the model where all indices in S∗n are estimated. For any other model Mn , we simply augment entries of θ̂∗n at indices in Sn with elements of Cn elsewhere to obtain a model-specific coefficient estimate: ( θ̂mnj = θ̂∗nj Cnj for j ∈ Sn , for j ∈ / Sn . (2.5) The logic behind this plug-in estimate is simple: for a candidate model Mn , a joint distribution of its estimated parameters, i.e. [θ̂sn ], can actually be obtained from [θ̂∗n ] by marginalizing at indices Sn . 6 2.2 Characterization of models Given the formulation of models in (2.3), any model can be classified into two categories: adequate and inadequate models. Definition 2.1. A model Mn is called adequate if lim n→∞ X |Cnj − θ0nj | = 0 (2.6) j ∈S / n A model that is not adequate, will be called an inadequate model. We also consider a stronger version of adequacy below. Definition 2.2. The model Mn is called strictly adequate if, for all n and j ∈ / Sn , Cnj = θ0nj . By definition the full model is always adequate, as is the model corresponding to the singleton set containing the true parameter, i.e. {θ0n } (because supp(θ0n ) ⊆ S∗n ). Thus the set of adequate models is non-empty by construction. In classical variable selection where all elements of the constant terms Cn are set to 0 for all models, as in linear regression where a subset of covariates Xs is used in fitting the expression Y = Xs βs + s , the above notion of model adequacy captures standard notions of model ‘correctness’. Specifically, (2.6) reduces to limn→∞ EY −Xs βs = 0. This is weaker than the traditional condition EY − Xs βs = 0 about model ‘correctness’ implicit in many studies, which is captured in our condition for a model being strictly adequate. In addition, our definition allows asymptotically similar models to be clubbed together, and has the flexibility to accommodate local asymptotic characteristics. For instance, consider the i.i.d. data-generating model Yni = X1i β01 +X2i δn +i for some β01 ∈ R, δn = o(1), i = N (0, σ02 ) with σ0 > 0 and i = 1, . . . , kn . Evidently, here θ0n = (β01 , δn , σ0 )T . With our formulation, the (constant) sequence of models Mn with Θmn = {(β1 , 0, σ 2 )T : β1 ∈ R, σ > 0} will be adequate. Such situations can arise from prior choices in Bayesian variable selection techniques, for example see Narisetty and He (2014); Roc̆kovà and George (2016). Besides model adequacy, a notion that will be important in our framrwork is the one of nested models. Definition 2.3. We consider a model M1n to be nested in M2n , notationally M1n ≺ M2n , if S1n ⊂ S2n and C2n is a subvector of C1n . ad If a model Mad n is adequate, then any model Mn such that Mn ≺ Mn is also adequate. In the context of covariate selection in the linear model of (1.1), this obtains a linear ordering, with the most parsimonious adequate model having Sn = supp(β0 ) and Cn = 0p−|S| nested in all other adequate models. However all models nested within it shall be inadequate. 7 2.3 Depth functions Let G denote the set of probability measures on Rp , and let D : Rp × G → [0, ∞) be a data depth function (Zuo and Serfling, 2000). We consider data depth functions satisfying the following properties: (B1) The map D is invariant to affine transformations, i.e. for any non-singular matrix A ∈ Rp×p , and b ∈ Rp and random variable Y having distribution G ∈ G, D(x, G) = D(Ax + b, [AY + b]) (B2) The map D(., G) is Lipschitz continuous, where G ∈ G is a fixed, non-degenerate probability distribution. That is, there exists δ > 0 and α ∈ (0, 1), possibly depending on G such that whenever |x − y| < δ, we have |D(x, G) − D(y, G)| < |x − y|α (B3) Assume that Yn ∈ Rp is a sequence of random variables converging in distribution to some Y ∈ G. Then D(y, [Yn ]) converges uniformly to D(y, Y). In particular, if Y ∼ Y, then lim ED(Yn , [Yn ]) = ED(Y, Y) n→∞ exists and is finite. (B4) For any G ∈ G, limkxk→∞ D(x, G) = 0. (B5) For any G ∈ G with a point of symmetry µ(G) ∈ Rp , we have for any t ∈ (0, 1) and any x ∈ Rp D(x, G) < D(µ(G) + t(x − µ(G)), G) < D(µ(G), G) = sup D(x, G) < ∞ x∈Rp That is, the depth function takes a maximum value at µ(G), and is strictly decreasing along any ray connecting µ(G) to any point x ∈ Rp . Conditions (B1), (B4) and (B5) are integral to the formal definition of data depth (Zuo and Serfling, 2000), while (B2) and (B3) implicitly arise for several depth functions (Mosler, 2013). For most of the theoretical analysis in this paper we require only a subset of these properties. However, we shall continue to use data depths throughout for simplicity. 3 The e-values methodology We now associate with each model Mn a functional of the depth of the model estimate with respect to the full model sampling distribution. We call this the e-value of the model. An example of e-value is the mean depth: en (Mn ) = ED(θ̂mn , [θ̂∗n ]) 8 (3.1) which we concentrate on for the rest of the paper. However, any other functional of D(θ̂mn , [θ̂∗n ]) may also be used here, and a large proportion of our theoretical discussion is applicable to any smooth functional of the distribution of D(θ̂mn , [θ̂∗n ]). Furthermore, the distribution of D(θ̂mn , [θ̂∗n ]) is itself informative, and has an important role to play in the study of uniform convergence. We defer all this discussion and analysis to future research. 3.1 Resampling approximation of e-values There are two random quantities involved in (3.1), namely θ̂mn and θ̂∗n . Typically, the distribution of either of them is not known, and have to be elicited from the data. We use resampling for this purpose. Because of the plugin method in (2.5), only [θ̂∗n ] needs to be approximated, and we propose using Generalized Bootstrap (Chatterjee and Bose, 2005) for this. We take an exchangeable array of non-negative random variables, independent of the data, as resampling weights: Wrn = (Wrn1 , . . . , Wrnkn )T ∈ Rkn , and obtain the resampling estimator θ̂r∗n as the minimizer of Ψ̂rn (θn ) = kn X   Wrni Ψni θn , Zni . (3.2) i=1 We assume the following conditions on the resampling weights as n → ∞: EWrn1 VWrn1 τn2 EWrn1 Wrn2 2 2 EWrn1 Wrn2 4 EWrn1 = 1, = τn2 ↑ ∞, = o(a2n ), = O(kn−1 ), → 1, < ∞. (3.3) (3.4) (3.5) (3.6) (3.7) (3.8) Several resampling schemes can be described in the above format and are discussed in Chatterjee and Bose (2005). Here we provide two examples. Example 3.1 (The m-out-of-n or moon-bootstrap). In our framework, the moon-bootstrap is identified with Wrn having a Multinomial distribution with parameters m and probabilities kn−1 (1, . . . , 1) ∈ Rkn , by a factor of kn /m. Thus we have EWrni = (m−1 kn )(m/kn ) = 1, and VWrni = τn2 = (m−1 kn )2 (mkn−1 (1 − kn−1 ) = O(m−1 kn ). In typical applications of the moon-bootstrap, we require that m → ∞ and m/kn → 0 as n → ∞. Thus we have τn2 → ∞ as n → ∞, that is, the scale factor of the resampling weights Wrni tending to infinity with n. Example 3.2 (The scale-enhanced Bayesian bootstrap). A version of Bayesian bootstrap may be constructed by choosing Wrni to be independent and identically distributed 9 Gamma random variables, with mean 1 and variance τn2 → ∞ as n → ∞. The functionality of this resampling scheme and Bayesian interpretation remain similar to the standard Bayesian bootstrap, however some convenient properties like conjugacy are lost. Under fairly weak regularity conditions on the first two derivatives of Ψni (·), Chatterjee and Bose (2005) proved that (an /τn )(θ̂r∗n − θ̂∗n ) converges to the same weak limit in probability as an (θ̂∗n − θ0n ). To estimate the e-value of any model we obtain two independent copies of the solution to (3.2), which we index by r and r1 . We use the first set of resamples to obtain the distribution [θ̂r∗n ] conditional on the data that approximates [θ̂∗n ], and the second set of resamples to obtain θ̂r1 mn corresponding to the model Mn : ( θ̂r1 mnj = for j ∈ Sn ; for j ∈ / Sn θ̂r1 ∗nj Cnj (3.9) Consequently, the resampling estimate of a model e-value is defined as   ern (Mn ) = Er1 D θ̂r1 mn , [θ̂r∗n ] , (3.10) where Er1 is expectation, conditional on the data, of the resampling indexed by r1 . The actual implementation of the resampling procedure is carried out by generating independent copies W1n , . . . , WRn for some sufficiently large integer R. We do not need to solve (3.2) explicitly to calculate θ̂r∗n . Rather, one can use already computed model quantities in the following approximation to get them: #−1 n X n τn X Wi Ψ00ni (θ̂∗n , Zni ) = θ̂∗n − an i=1 " θ̂r∗n Wi Ψ0ni (θ̂∗n , Zni ) + Rrn ; (3.11) i=1 Er kRrn k2 = oP (1) This is immediate from Theorem 3.5 in Chatterjee and Bose (2005). Consequently only Monte Carlo sampling is required to obtain the resamples, resulting in significant computational speed gains. 3.2 Fast algorithm for best subset selection For best subset selection we consider the class of candidate models M0 = {M : Cj = 0 ∀ j ∈ / S∗ } (3.12) dropping n in the subscripts of Mn , Cn , Sn , θn (and their variants). Note that all adequate models are strictly adequate now, and their non-zero support contains supp(θ0 ). In this setup our fast selection algorithm consists of only three stages: (a) Fit the full model and estimate its e-value, (b) Replace each covariate by 0 and compute e-value of all such reduced models, and 10 (c) Collect covariates dropping which causes the e-value to go down. To compute the full model, we need to determine the estimable set of predictor indices S∗ . In traditional n > p situations, the choice is simple: S∗ = {1, . . . , p}. In highdimnensional cases when p > n, we need to ensure that p0 = |S∗ | < n, so that θ̂∗ (properly centered and scaled) has a unique asymptotic distribution, i.e. satisfies condition (A1). We use fast screening methods available in the literature to achieve this, as implemented previously by Lai et al. (2015). For high-dimensional linear regression we use the Sure Independent Screening (SIS) procedure (Fan and Lv, 2008), while for more complex cases like mixed models, single index models etc., we propose using the model-free screening method of Zhu et al. (2011). After obtaining S∗ and the full model estimate, for each of the p0 + 1 models under consideration: the full model and all dropped-predictor models, we generate two sets of resampling weights, use them in (3.11) to obtain bootstrapped coefficient estimates, and finally calculate finite sample approximations of the bootstrap e-values in (3.10). This gives us all the components for a sample version of the population level algorithm 1. We present this as Algorithm 2. Algorithm 2. (Best subset selection using e-values and bootstrap) 1. Fix resampling standard deviation τn . 2. Obtain bootstrap samples: T = {θ̂1∗ , ..., θ̂R∗ }, and T1 = {θ̂1∗ , ..., θ̂R1 ∗ }. P 1 3. Calculate êrn (M∗ ) = R11 R r1 =1 D(θ̂r1 ∗ , [T1 ]). 4. Set Ŝ0 = φ. 5. For j in 1 : p For r1 in 1 : R1 Replace j th index of θ̂∗r1 by 0 to get θ̂r1 ,−j . P 1 Calculate êrn (M−j ) = R11 R r1 =1 D(θ̂r1 ,−j , [T1 ]). If êrn (M−j ) < êrn (M∗ ) Set Ŝ0 ← {Ŝ0 , j}. Remark Choice of the bootstrap standard deviation τn plays a central role in the performance of Algorithm 2. Its intermediate rate of divergence, i.e. τn → ∞, τn /an → 0, is a necessary and sufficient condition for the consistency of the generalized bootstrap procedure (see Chatterjee and Bose (2005) for details), as well as that of the bootstrap approximation of population e-values (Theorem 4.2). Variable selection literature has several examples of such quantities in action that result in model selection consistency: for example the penalty term of BIC, or the tuning parameters of adaptive lasso (Zou, 2006) and Dantzig selector (Candes and Tao, 2007). We demonstrate the performance of Algorithm 2 with several choices of τn in our simulations, and use validation on a test set to select the optimal τn in our data example. 11 4 Theoretical results We investigate theoretical properties of e-values in this section. Our first results are in the most general setup of adequate and inadequate models. We then focus on strictly adequate models, and finally on M0 , as a consequence deriving our fast algorithm. 4.1 Separation of adequate models Our first result on the model elicitation process separates inadequate models from adequate models at the population level. Theorem 4.1. Assume the conditions (A1)-(A2) on θ̂∗n , and that Ekθ̂∗n k4 < ∞. For any data-depth function satisfying (B1)-(B4), the following hold as n → ∞: 1. For the full model M∗n , en (M∗n ) → e0 < ∞, where e0 = ED(Y, [Y ]) with Y ∼ E(0p , V, G), 2. For an adequate model Mn , |en (Mn ) − en (M∗n )| → 0, 3. For inadequate model Mn , en (Mn ) → 0. This ensures that for large enough n, it is possible to find some threshold n ≤ en (M∗n ) such that all inadequate models have e-values less than the threshold, while e-values for all adequate models fall above it. For generalized bootstrap approximations of population e-values through (3.10), we have the following equivalent result: Theorem 4.2. Assume conditions of Theorem 4.1, and Ekθ̂∗n k8 < ∞. Additionally, assume that the resampling weights Wrni are exchangeable random variables satisfying the conditions (3.3)-(3.8). Then, conditional on the data, ern (Mn ) converges to zero in probability if Mn is a sequence of inadequate models, and to e0 if it is a sequence of adequate models. Remark An examination of the proofs of the above two results, which follow similar lines, reveals that they do not use all properties of data depths. Specifically, only location and scale invariance is needed in place of the much stronger affine invariance in (B1), and condition (B5) is not needed at all. We also do not use condition (A2) for θ̂∗n . Consequently, theorems 4.1 and 4.2 continue to hold for depth-like functions in a divergingp setup under relaxed versions of conditions (B1)-(B5) and some technical conditions on the energy functions, and possibly have broader implications than variable selection only. We plan to explore this in detail in future work. 12 4.2 Derivation of algorithm Our next result is concerned with strictly adequate models, and forms the foundation for the fast model selection algorithm. Theorem 4.3. Assume conditions (A1)-(A2), (B1)-(B5). Then, for a finite sequence of strictly adequate models M1n ≺ . . . ≺ Mkn and any finite collection of inadequate models Mk+1,n , . . . , MKn , we have en (M1n ) > . . . > en (Mkn ) > max j∈{k+1,...K} en (Mjn ) for large enough n. We set the constant terms Cn to 0 now, and drop the subscript n from Mn , Sn , Cn , θn and their variants. Recall that we have not yet used the actual data generating process as a candidate model. Let us define the data generating model as M0 ≺ M∗ with associated estimable index set S0 = supp(θ0 ) and C0 = 0p−|S0 | for j ∈ / S0 . Then we have the following result. Corollary 4.1. Assume the conditions of Theorem 4.3. Consider the collection of candidate models M0 = {M : Cj = 0 ∀ j ∈ / S∗ }. Then for large enough n, M0 = arg max [en (M)] M∈M0 (4.1) Thus, within the restricted set of models M0 , the e-value maximizes at the true model. However there are still 2p possible models. This is where the true advantage of using evalues comes through. It hinges on the following observation. Corollary 4.2. Assume the conditions of Corollary 4.1. Consider the models M−j ∈ M0 with S−j = {1, . . . , p} \ {j} for j = 1, . . . , p. Then covariate j is a necessary component of M0 , i.e. M−j is an inadequate model, if and only if en (M−j ) < en (M∗ ) (4.2) for sufficiently large n. Dropping an essential predictor from the full model makes the model inadequate, which has very small e-value for large enough n (Theorem 4.1), whereas dropping a nonessential predictor increases the e-value owing to Theorem 4.3. Thus, simply collecting those predictors that cause decrease in the e-value on dropping them from the model suffices for variable selection. 13 4.3 Model selection consistency Consistency of bootstrap analogues of all model e-values follows from Theorem 4.2. This, in conjunction with the results from Section 4.2 establishes model selection consistency of the finite sample bootstrap procedure. Corollary 4.3. Consider two sets of bootstrap estimates of θ̂∗ : T = {θ̂r∗ : r = 1, . . . , R} and T1 = {θ̂r1 ∗ : r1 = 1, . . . , R1 }. Obtain sample e-value estimates as R1 1 X D(θ̂r1 m , [T ]) êrn (M) = R1 r1 =1 (4.3) where [T ] is the empirical distribution of the corresponding bootstrap samples, and θ̂r1 m are obtained using (3.10). Consider the set of predictors Ŝ0 = {êrn (M−j ) < êrn (M∗ )}. Then as n, R, R1 → ∞, P2 (Ŝ0 = S0 ) → 1 (4.4) where P2 is the probability conditional on the data and bootstrap samples. Equation (4.4) is contingent on the fact that the the data generating model M0 is indeed a member of M0 , i.e. S0 ⊆ S∗ . This is ensured trivially in classical n > p situations. If p is larger than n, M0 is the set of all possible models on the predictor set selected by an appropriate predictor screening procedure. In high-dimensional linear models, we use the SIS procedure for this purpose. Given that the estimable index set S∗ is selected using SIS, Fan and Lv (2008) proved under fairly weak conditions that exp[−Cn1−2κ ] P (M0 ∈ M0 ) ≥ 1 − O log n ! (4.5) where C > 0 and κ are constants that depend on the minimum signal in θ0 . For more complex models we use the model-free screening method of Zhu et al. (2011) to obtain S∗ . Under mild conditions on the predictor matrix, Theorem 3 in Zhu et al. (2011) ensures the validity of their procedure. In our notations, the result therein states as P (|S∗ ∩ S0c | r ≥ r) ≤ 1 − p+d !d (4.6) for positive integers r and d: d = p being a good practical choice as per the numerical studies in Zhu et al. (2011). Combining (4.5) or (4.6) with Corollary 4.3 as needed establishes asymptotically accurate recovery of the support set S0 through Algorithm 2 in Section 3.2. For classical n > p cases this holds for any statistical model satisfying the conditions (A1) and (A2), whereas in high-dimensional situations it is contingent upon additional conditions required by the screening method used. 14 Choice of τn τn = log n τn = n0.1 τn = n0.2 τn = n0.3 τn = n0.4 Choice of τn τn = log n τn = n0.1 τn = n0.2 τn = n0.3 τn = n0.4 Setting 1: n = 1000, p = 60 ρ = 0.5 ρ = 0.7 Sparsity PE (×10−4 ) Sparsity PE (×10−4 ) 5.01 4.5 5.00 3.3 16.16 33.6 16.85 23.3 5.74 8.1 6.03 5.7 5.01 4.5 5.01 3.3 5.00 4.4 5.00 3.3 Setting 2: n = 60, p = 1000 ρ = 0.5 ρ = 0.7 Sparsity PE (×10−2 ) Sparsity PE (×10−2 ) 6.63 4.5 6.34 3.4 7.57 4.6 7.24 3.0 7.38 4.6 7.23 3.0 6.94 4.6 6.58 3.0 6.08 4.1 5.66 3.9 Sparsity 5.06 17.89 6.75 4.96 3.14 ρ = 0.9 PE (×10−4 ) 2.6 16.3 4.8 5.0 633.6 Sparsity 4.79 7.16 6.61 5.44 3.90 ρ = 0.9 PE (×10−2 ) 3.7 2.1 2.3 3.0 6.0 Table 5.1: Model sparsity and prediction errors for different choices of τn 5 Simulation studies We now present three simulation studies to examine the empirical performance of our proposed method using model e-values, along with a host of other variable selection methods for linear and linear mixed models. In terms of n and p, we consider both the classical n > p case (Sections 5.1 and 5.3) and the high-dimensional case where p >> n (Section 5.2). For all depth calculations, we use halfspace depth (Tukey, 1975). 5.1 Selecting covariates in linear regression (n > p) We use the model Y = Xβ0 + , with  ∼ Nn (0, In ), n = 1000 and p = 60. We generate the rows of X independently from Np (0, ΣX ), with (ΣX )ij = ρ|i−j| . In the true coefficient vector β0 , we set the first 5 coefficients to have non-zero values equal to 1, and the other slope parameters to be zero. We repeat this setup for ρ ∈ {0.5, 0.7, 0.9}, and generate 100 independent datasets for each ρ. We use the scale-enhanced Bayesian bootstrap of Example 3.2 with τn ∈ {log n, n0.1 , n0.2 , n0.3 , n0.4 }, and resampling Monte Carlo size R = R1 = 1000 for the calculation of bootstrap e-values using (4.3). Competing methods For comparative evaluation our technique, we consider methods that come from different domains in the model selection literature: (a) The Mixed Integer Optimization (MIO) method of Bertsimas et al. (2016), which is based on advanced discrete optimization methods; (b) LASSO and (c) SCAD-penalized linear regression, which represent the domain of penalized regressions; and (d) Stepwise regression using the BIC and forward selection, which is a conventional favorite. MIO has two versions: all subset and forward selection. The all subset method was much more computationally intensive than other methods, so we used the forward selection MIO. This returns one model for each of the p + 1 possible sparsity levels of the coefficient vector, following which we select the model with lowest BIC. For the penalized regression methods we use ten-fold cross validation to select the optimal tuning parameter. 15 60 rho=0.9 60 rho=0.7 60 rho=0.5 ● evalue MIO Lasso SCAD Step ● MIO Lasso SCAD 40 ● ● 0 ● evalue 30 10 Model sparsity 50 ● 20 50 40 30 Model sparsity 10 ● ● 0 0 ● 20 40 30 20 ● 10 Model sparsity 50 ● Step ● evalue MIO Lasso SCAD Step ● ● ● ● ● 2.0 2.0 2.0 ● ● ● ● ● ● ● ● ● ● ● ● ● 1.5 1.0 ● ● ● ● ● Lasso SCAD Step evalue ● ● ● ● ● ● 0.0 0.0 MIO ● ● ● ● ● ● ● evalue Prediction error ● ● ● ● 0.5 ● ● ● ● ● MIO Lasso ● ● 0.0 ● ● ● 0.5 ● ● ● ● ● ● ● 1.0 ● Prediction error 1.5 ● 1.5 1.0 ● ● 0.5 Prediction error ● ● SCAD Step ● evalue MIO Lasso SCAD Step Figure 5.1: Model sparsity (top row) and prediction performance (bottom row) for all methods in n = 60, p = 1000 setup. Performance measures We use model sparsity and prediction error on an independently generated dataset (ytest , Xtest ) using the same setup as the training data to evaluate each of the methods under consideration. For any estimate β̂, these metrics are defined as kXtest β̂ − Xtest β0 k Sparsity(β̂) = kβ̂k0 ; PE(β̂) = kXtest β0 k These are plausible metrics of model evaluation when the features are highly correlated (Bertsimas et al., 2016). Choice of tuning parameter The top few rows of Table 5.1 give the average sparsity and PE values of our e-value based method for different values of the bootstrap standard deviation τn . Both the metrics take lowest values for ρ = 0.7 and ρ = 0.9 when τn = log n. For ρ = 0.5, τn = n0.4 has marginally lower values, however it performs much worse than τn = log n when ρ = 0.9. Comparison with other methods Figure 5.2 presents boxplots of these performance measures, with τn = log n assumed for our e-value based method. Our method gives the sparsest models and lowest prediction errors among all methods across all values of ρ. The second sparsest models are given by MIO, although its prediction errors are higher. 16 40 rho=0.9 40 rho=0.7 40 rho=0.5 ● 30 30 30 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 20 Model sparsity ● 10 ● ● ● ● ● ● ● ● ● ● ● ● MIO Lasso SCAD Step MIO Lasso SCAD Step ● ● ● ● ● ● ● ● ● 0.006 ● 0.004 ● ● ● ● ● ● ● ● ● evalue MIO ● ● ● ● ● ● 0.000 0.000 evalue evalue 0.008 Step ● ● 0.000 SCAD Prediction error ● ● ● 0.002 ● ● Lasso 0.006 Prediction error 0.006 ● ● ● ● MIO 0.008 evalue ● 0.004 0.002 Prediction error Step 0.004 SCAD 0.002 Lasso 0.008 MIO ● ● ● ● 0 0 0 ● evalue ● ● 10 ● ● 20 Model sparsity 20 ● 10 Model sparsity ● ● evalue MIO Lasso SCAD Step Lasso SCAD Step Figure 5.2: Model sparsity (top row) and prediction performance (bottom row) for all methods in n = 1000, p = 60 setup. Dotted line in top row indicates true sparsity level. On the other hand, prediction errors of SCAD are similar to our method, but our models are more sparse. For all methods, higher values of ρ result in slightly sparser models and higher prediction errors. 5.2 High-dimensional linear regression (p >> n) Here we generate the data from the same setup as Section 5.1, but with n = 60, p = 1000. To implement the e-values method, we first perform an initial screening of variables using SIS, then apply our best subset selection procedure. Among several choices of the tuning parameter, τn = log n and τn = n0.1 are good choices (see second half of Table 5.1). The first choice provides sparser models, while the second choice has lower prediction errors as the correlation among features increases. To compare with the n > p case, we report the results corresponding to τn = log n in the boxplots of Figure 5.1. As compared to the low-dimensional case in Section 5.1, the e-values method provides much sparser estimates than other methods. MIO always ends up selecting the least parsimonious model with 60 predictors. Our method has good performance in terms of prediction error as well. Stepwise regression is the most unstable among all five methods across all values of ρ and both performance measures used. 17 Method Tuning e-value based τ =3 τ =4 τ =5 τ =6 τ =7 τ =8 BIC AIC GCV p log n/n Peng and Lu Peng and Lu (2012) FPR% FNR% Model size Setting 1: ni = 5, m = 30 15.9 0.0 2.59 8.0 0.0 2.28 5.2 0.0 2.18 2.7 0.0 2.09 2.2 0.0 2.07 1.5 0.0 2.05 21.5 9.9 2.26 17 11.0 2.43 20.5 6 2.30 21 15.6 2.67 FPR% FNR% Model size Setting 2: ni = 10, m = 60 5.2 0.0 2.17 2.8 0.0 2.09 2.0 0.0 2.06 0.7 0.0 2.02 0.3 0.0 2.01 0.3 0.0 2.01 1.5 1.9 2.10 1.5 3.3 2.20 1.5 3 2.18 1.5 4.1 2.26 Table 5.2: Comparison between our method and that proposed by Peng and Lu (2012) through average false positive percentage, false negative percentage and model size 5.3 Best subset selection in presence of random effects Here we use the simulation setup from Peng and Lu (2012). This is a random interceptonly model: Y = Xβ + ZU + . The data consists of independent groups of observations with multiple observations in each groups, Z being the within-group random effects design matrix. We consider 9 fixed effects and 4 random effects, with true β0 = (0, 1, 1, 0, 0, 0, 0, 0, 0) and random effect covariance matrix ∆ with elements (∆)11 = 9, (∆)21 = 4.8, (∆)22 = 4, (∆)31 = 0.6, (∆)32 = (∆)33 = 1, (∆)4j = 0; j = 1, . . . , 4. The error variance of  is set at σ 2 = 1. The goal is to select covariates of the fixed effect. We use two scenarios for our study: one where the number of subjects (m) considered is 30, and the number of observations in the ith subject, i = 1, . . . , n, is ni = 5, and another where m = 60, ni = 10. ˆ for the resampling Given the original restricted maximum likelihood estimates β̂, σ̂ 2 , ∆, step we use the computational approximation τn β̂r ' β̂ + √ (X T V̂ −1 X)−1 Wr X T V̂ −1 (y − X β̂) n ˆ T . This adapts equation (3.11) with Wr = diag(Wr1 I4 , . . . , Wr9 I4 ) and V̂ = σ̂ 2 Ip√+ Z ∆Z in the mixed model setup. We consider τ = τn / n ∈ {1, . . . , 15} here, and independent Gamma(1,1) random variables as the resampling weights {Wr1 + 1, . . . , Wr9 + 1}. We compare our results with those obtained using the mixed effect model selection method of Peng and Lu (2012), as well as two other methods, all of which are based on sparse estimation of the fixed effect coefficients. In the method proposed by Peng and Lu (2012), the tuning parameter can be selected using several different criteria. We present the false positive percentage (FPR%), false negative percentage (FNR%) and model sizes corresponding to four such criteria in Table 5.2. Our e-value based method handsomely outperforms the method proposed by Peng and Lu (2012), especially in smaller sample sizes, as long as τ ≥ 4. We also compare the percentages of times the correct model was identified, and these results are presented in Table 5.3, along with the corresponding results from two other papers. The proposed e-value based procedure performs best here for τ ≥ 5 for the smaller sample setting, and for τ ≥ 7 for larger sample setting. 18 Method e-value based τ τ τ τ τ τ τ =4 =5 =6 =7 =8 =9 = 10 Bondell et al. (2010) Peng and Lu (2012) Fan and Li (2012) Setting 1 79 87 93 94 96 97 98 73 49 90 Setting 2 92 94 98 99 99 99 99 83 86 100 Table 5.3: Comparison of our method and three sparsity-based methods of mixed effect model selection through accuracy of selecting correct fixed effects 6 Eliciting drivers of Indian monsoon precipitation Various studies indicate that our knowledge about the physical drivers of precipitation in India is incomplete; this is in addition to the known difficulties in modeling precipitation itself (Knutti et al., 2010; Trenberth, 2011; Trenberth et al., 2003; Wang et al., 2005). For example, Goswami et al. (2006) discovered an upward trend in frequency and magnitude of extreme rain events, using daily central Indian rainfall data on a 10◦ × 12◦ grid, but a similar study on a 1◦ ×1◦ gridded data by Ghosh et al. (2009) suggested that there are both increasing and decreasing trends of extreme rainfall events, depending on the location. Additionally, Krishnamurty et al. (2009) reported increasing trends in exceedances of the 99th percentile of daily rainfall; however, there is also a decreasing trend for exceedances of the 90th percentile data in many parts of India. Significant spatial and temporal variabilities at various scales have also been discovered by Dietz and Chatterjee (2014) and Dietz and Chatterjee (2015). Here we attempt to identify the driving factors behind precipitation during the Indian monsoon season using our e-value based model selection criterion. Data are obtained from the repositories of the National Climatic Data Center (NCDC) and National Oceanic and Atmospheric Administration (NOAA), for the years 1978–2012. We obtained data on 35 potential covariates of the Indian summer precipitation based on existing knowledge and conjectures from the actual physics driving Indian summer precipitations. Details are provided in the supplementary material. We consider annual medians of all covariates as fixed effects, the log yearly rainfall at a weather station as response variable, and include year-specific random intercepts. We use projection depth (Zuo, 2003) and resample Monte Carlo sizes R = R1 = 1000 to calculate bootstrap equivalents of the e-values. We train our model on data from the years 1978-2002, run best subset selection for tuning parameter values τn ∈ nk ; k ∈ {0.01, 0.02, . . . , 0.16}, and select the predictor set corresponding to the τn that minimizes fixed effect prediction errors on the samples from 2003–2012. Table 6.1 lists the estimated e-values in increasing order for this full model, as well as all 35 models where a single variable is dropped. Variables listed in the rows above none in Table 6.1 are considered relevant by our e-value criterion. 19 3 Full model Reduced model 2 ● ● ● ● 0 ● ● ● ● ● ● ● ● ● −1 Bias 1 ● ● ● −2 ● ● −3 ● 2004 2006 2008 2010 2012 year 8 e-value of M−j 0.1490772 0.2190159 0.2288938 0.2290021 0.2371846 0.2449195 0.2468698 0.2538924 0.2541503 0.2558397 0.2563105 0.2565388 0.2565687 0.2596766 0.2604214 0.2609039 0.261159 0.2624313 0.2626321 0.2630901 0.2633658 0.2649837 0.2660394 0.2663496 0.2677756 0.268231 0.2687891 0.2690791 0.2692731 0.2695297 0.2700276 0.2700579 0.2715089 0.2731708 0.2748239 0.2764488 Full model ● Reduced model 6 ● 4 MSE ● ● ● 2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 ● 2004 2006 2008 2010 2012 year 0.5 Year 2012 0.3 0.2 0.1 density 0.4 Truth Full model pred Reduced model pred 0.0 Predictor dropped - TMAX - X120W - ELEVATION - X120E - del TT Deg Celsius - X80E - LATITUDE - TNH - Nino34 - X10W - LONGITUDE - X100E - EAWR - X70E - v wind 850 - X140E - X40W - SolarFlux - X160E - EPNP - TempAnomaly - u wind 850 - WP none - POL - TMIN - X20E - EA - u wind 200 - u wind 600 - SCA - DMI - PNA - v wind 200 - v wind 600 - NAO −2 0 2 4 6 8 10 log(PRCP+1) 2012 ● Positive resid negative resid ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Table 6.1: Ordered e-values when dropping one variable at a time in the Indian summer precipitation data Figure 6.1: Comparing full model rolling predictions with reduced models: (Top to bottom) Bias across years, Mean Squared Error (MSE) across years, density plots for 2012, stationwise residuals for 2012 20 All variables selected by our procedure have documented effects on Indian monsoon (Krishnamurthy and Kinter III, 2003; Moon et al., 2013). The single largest contributor is the maximum temperature variable, whose relation to precipitation based on the ClausiusClapeyron relation is now classical knowledge in physics (Singleton and Toumi, 2012). It seems that wind velocities high up in the atmosphere are not significant contributors, and the fact that many covariates are selected in the process highlights the complexity of the system. We checked out-of-sample prediction performance of the estimated model using a rolling validation scheme. For each of the 10 test years: 2003–2012, we select important variables from the model built on past 25 years’ data (i.e. use data from 1978–2002 for 2003, 1979-2003 for 2004 and so on), build a model using them and compare predictions on test year obtained from this model with those from the full model. Figure 6.1 summarizes results obtained through this process. Across all testing years, reduced model predictions have less bias as well as are more stable (top two panels). The better approximations of truth by reduced models is also evident from the density plot for 2012 in the third panel, and the residuals do not show any spatial patterns (bottom panel). 7 Conclusion We present above an expansive framework and principle, where the definition of a statistical model is broad, and estimation procedures as well as resampling algorithms very general. In such a scenario, we propose a scheme for best subset selection using the newly defined e-value. An extremely fast algorithm obtains the true model selection with probability tending to one as the sample size grows by fitting and using only a single model. Simulation results show that our algorithm performs better than traditional methods in three illustrative examples, and a case study on Indian summer precipitation identifies several important physical drivers of monsoon precipitation. Theoretical consistency results of multiple kinds are provided. An immediate goal for future research is incorporating dimension asymptotics where the parameter dimension is allowed to grow with the sample size, as well as extremely high-dimensional parameters in our framework. Higher order correctness is a possibility in our context since we use resampling methods. The sensitivity of the results to the choice of the depth functions, resampling algorithm and the tuning parameter τn associated with it, and the way D(θ̂mn , [θ̂∗n ]) is summarized to obtain the e-value deserve further study. Our results suggest excellent asymptotic properties that are borne out in the simulations, but finite-sample performance of the procedure needs further scrutiny. To our knowledge, no other non-penalized method is available in the literature in which computational cost of the covariate selection step scales linearly with dimension of the feature space. This makes the e-values a perfect candidate for being an accurate and scalable model selection method in big data. Because our algorithm easily lends itself to parallel computing across different sets of bootstrap samples, it opens up the possibility 21 to be combined with bootstrap methods on subsamples of the full dataset, like the moonbootstrap, bag of little bootstraps (Kleiner et al., 2014), or subsampled double bootstrap (Sengupta et al., 2016). For ensemble methods in the machine learning literature, e.g. random forest and bagging, by extension of the same logic e-values present an exciting opportunity to explore the formulation of a method for consistent feature ranking. Acknowledgements This research is partially supported by the National Science Foundation (NSF) under grants #IIS-1029711 and #DMS-1622483 and by the National Aeronautics and Space Administration (NASA). The first author also acknowledges the University of Minnesota Interdisciplinary Doctoral Fellowship program. A Proofs of theoretical results Proof of Theorem 4.1. Part 1 follows directly from assumption (B3). Part 2. Assuming now that Mn is an adequate model, we use (B1) property of D:  h D(θ̂mn , [θ̂∗n ]) = D θ̂mn − θ0n , θ̂0n − θ0n i (A.1) , and decompose the first argument θ̂mn − θ0n = (θ̂mn − θ̂0n ) + (θ̂∗n − θ0n ). (A.2) where θmnj equals θ0nj in indices j ∈ Sn and Cnj elsewhere. Now we have, for any Mn , θ̂mn = θmn + a−1 n Tmn where Tmn is non-degenerate at the Sn indices. For the first summand of the right-hand side in (A.2) we get θ̂mn − θ̂∗n = θmn − θ0n + Rn (A.3) where EkRn2 k = O(a−2 n ). Since Mn is an adequate model, θmn − θ0n = o(1). Thus, substituting the above right-hand side in (A.2) we get  h D θ̂mn − θ0n , θ̂∗n − θ0n i  h − D θ̂∗n − θ0n , θ̂∗n − θ0n i ≤ kRn kα (A.4) from Lipschitz continuity of D(·) given in (B2). The result now follows. Part 3. Since the depth function E is invariant under location and scale transformations, we have  h i D(θ̂mn , [θ̂∗n ]) = D an (θ̂mn − θ0n ), an (θ̂∗n − θ0n ) 22 . (A.5) Decomposing the first argument, an (θ̂mn − θ0n ) = an (θ̂mn − θmn ) + an (θmn − θ0n ). (A.6) Since Mn is inadequate, given δ > 0 there exists a subsequence indexed by jn such that |Cnjn − θ0jn | > δ for all n. The result follows by application of condition (B4). Proof of Theorem 4.2. Several derivations here are similar to those of the proof of Theorem 4.1. Consequently we skip some details. We have      a   an n θ̂r1 mn − θ̂∗n , θ̂r∗n − θ̂∗n D θ̂r1 mn , [θ̂r∗n ] = D τ τn  n   a   an an  n . =D θ̂r mn − θ̂mn − θ̂mn − θ̂∗n , θ̂r∗n − θ̂∗n τn 1 τn τn Conditional on the data, (an /τn )(θ̂r1 mn − θ̂mn ) has the same weak limit as an (θ̂mn − θmn ), and (A.3) and τn → ∞ combine to give  an  P θ̂mn − θ̂∗n → 0 τn as n → ∞. The results follow directly now. Proof of Theorem 4.3. Since we are dealing with a finite sequence of nested models, it is enough to prove that en (M1n ) > en (M2n ) for large enough n, when both M1n and M2n are strictly adequate models and M1n ≺ M2n . Suppose T0 = E(0p , Ip , g). Affine invariance implies invariant to rotational transformations, and since the evaluation functions we consider decrease along any ray from the origin because of (B5), E(θ, T0 ) is a monotonocally decreasing function of kθk for any θ ∈ Rp . Now consider the models M01n , M02n that have 0 in all indices outside S1n and S2n , respectively. Take some θ10 ∈ Θ01n , which is the parameter space corresponding to M01n , and replace its (zero) entries at indices j ∈ S2n \ S1n by some non-zero δ ∈ Rp−|S2n \S1n | . Denote it by θ1δ . Then we shall have T T θ1δ > θ10 θ10 θ1δ ⇒ ⇒ D(θ10 , T0 ) > D(θ1δ , T0 ) Es1 D(θ10 , T0 ) > Es1 D(θ1δ , T0 ) where Es1 denotes the expectation taken over the marginal of the distributional argument T0 at indices S1n . Notice now that by construction θ1δ ∈ Θ02n , the parameter space corresponding to M02n , and since the above holds for all possible δ, we can take expectation over indices S2n \ S1n in both sides to obtain Es1 D(θ10 , T0 ) > Es2 D(θ20 , T0 ), with θ20 denoting a general element in Θ20 . Combining (A1) and (A2) we get an Vn−1/2 (θ̂∗n −θ0n ) T0 . Denote Tn = [an Vn−1/2 (θ̂∗n − θ0n )], and choose a positive  < (Es1 D(θ10 , T0 ) − Es2 D(θ20 , T0 ))/2. Then, for large enough n we shall have |D(θ10 , Tn ) − D(θ10 , T0 )| <  ⇒ |Es1 D(θ10 , Tn ) − Es1 D(θ10 , T0 )| <  23 following condition (B4). Similarly we have |Es2 D(θ20 , Tn ) − Es2 D(θ20 , T0 )| <  for the same n for which the above holds. This implies Es1 D(θ10 , Tn ) > Es2 D(θ20 , Tn ). Now apply the affine transformation t(θn ) = Vn1/2 θn /an + θ0n to both arguments of the depth function above. This will keep the depths constant following affine invariance, i.e. D(t(θ10 ), [θ̂∗n ]) = D(θ10 , Tn ) and D(t(θ20 ), [θ̂∗n ]) = D(θ20 , Tn ). Since this transformation maps Θ01n to Θ1n , the parameter space corresonding to M1n , we get Es1 D(t(θ10 ), [θ̂∗n ]) > Es2 D(t(θ20 ), [θ̂∗n ]), i.e. en (M1n ) > en (M2n ). For any inadequate model Mjn , k < j ≤ K, suppose Njn is the integer such that en1 (Mjn1 ) < en1 (M∗n1 ) for all n1 > Njn . Part 3 of Theorem 4.1 ensures that such an integer exists for every inadequate model. Now define N = maxk<j≤K Njn . Thus en1 (M∗n1 ) is larger than e-values of all inadequate models Mjn1 for k < j ≤ K. Proof of Corollary 4.1. By construction, M0 is nested in all other adequate models in M0 . Hence Theorem 4.3 implies en (M0 ) > en (Mad ) > en (Minad ) for any adequate model Mad and inadequate model Minad in M0 and large enough n. Proof of Corollary 4.2. Consider j ∈ S0 . Then θ0 ∈ / M−j , hence M−j is inadequate. By choice of n1 from Corollary 4.1, e-values of all inadequate models are less than that of M∗ , hence en1 (M−j ) < en1 (M∗ ). On the other hand, suppose there exists a j such that en1 (M−j ) ≤ en1 (M∗ ) but j∈ / S0 . Now j ∈ / S0 means that M−j is an adequate model. Since M−j is nested within M∗ for any j, and the full model is always adequate, we have en1 (M−j ) > en1 (M∗ ) by Theorem 4.3: leading to a contradiction and thus completing the proof. Proof of Corollary 4.3. Corollary 4.2 implies that S0 = {j : en (M−j ) < en (M∗ )} Now define S̄0 = {j : ern (M−j ) < ern (M∗ )}. Theorem 4.2 implies that ern (M−j ) = en (M−j ) + Rjn ern (M∗ ) = en (M∗ ) + R∗n such that Er |R∗n |2 = oP (1) and Er |Rjn |2 = oP (1) for all j. Hence P1 (S̄0 = S0 ) → 1 as n → ∞, P1 being probability conditional on the data. Similarly one can prove that the probability conditional on the bootstrap samples that S̄0 = Ŝ0 holds goes to 1 as R, R1 → ∞, which completes the proof. References Akaike, H. (1970). Statistical predictor identification. Ann. Inst. Statist. Math., 22(1):203– 217. 24 Bertsimas, D., King, A., and Mazumder, R. (2016). Best Subset Selection via a Modern Optimization Lens. Ann. Statist., 44(2):813–852. Bondell, H. D., Krishna, A., and Ghosh, S. K. (2010). Joint variable selection for fixed and random effects in linear mixed-effects models. Biometrics, 66(4):1069–1077. Bose, A. and Chatterjee, S. (2003). Generalized bootstrap for estimators of minimizers of convex functions. J. Stat. Plan. Inference, 117(2):225–239. Candes, E. and Tao, T. (2007). The Dantzig selector: Statistical estimation when p is much larger than n. Ann. Statist., 35(6):2313–2351. Chatterjee, S. and Bose, A. (2005). Generalized bootstrap for estimating equations. Ann. Statist., 33(1):414–436. Dietz, L. and Chatterjee, S. (2014). Logit-normal mixed model for Indian monsoon precipitation. Nonlin. Proc. Geophys., 21:934–953. Dietz, L. and Chatterjee, S. (2015). Extreme thresholds in Indian monsoon precipitation using logit-Normal mixed models. In Machine Learning and Data Mining Approaches to Climate Science, pages 239–246. Springer, New York, NY, USA. Fan, J. and Lv, J. (2008). Sure Independence Screening for Ultrahigh Dimensional Feature Space. J. R. Statist. Soc. B, 70:849–911. Fan, Y. and Li, R. (2012). Variable selection in linear mixed effects models. Ann. Statist., 40(4):2043–2068. Fang, K. T., Kotz, S., and Ng, K. W. (1990). Symmetric multivariate and related distributions. Monographs on Statistics and Applied Probability, volume 36. Chapman and Hall Ltd., London. Ghosh, S., Luniya, V., and Gupta, A. (2009). Trend analysis of indian summer monsoon rainfall at different spatial scales. Atmos. Sci. Lett., 10:285–290. Goswami, B., Venugopal, V., Sengupta, D., Madhusoodanan, M. S., and Xavier, P. K. (2006). Increasing trend of extreme rain events over india in a warming environment. Science, 314:1442–1445. Jiang, J., Rao, J. S., Gu, Z., and Nguyen, T. (2008). Fence methods for mixed model selection. Ann. Statist., 36(4):1669–1692. Kleiner, A., Talwalkar, A., Sarkar, P., and Jordan, M. I. (2014). A scalable bootstrap for massive data. J. R. Statist. Soc. B, 76(4):765–814. Knutti, R., Furrer, R., Tebaldi, C., Cermak, J., and Meehl, G. A. (2010). Challenges in combining projections from multiple climate models. J. Clim., 23(10):2739–2758. 25 Krishnamurthy, V. and Kinter III, J. L. (2003). The Indian monsoon and its relation to global climate variability. In Rodo, X. and Comin, F. A., editors, Global Climate: Current Research and Uncertainties in the Climate System, pages 186–236. Springer. Krishnamurty, C. K. B., Lall, U., and Kwon, H.-H. (2009). Changing frequencey and intensity of rainfall extremes over india from 1951 to 2003. J. Clim., 22(18):4737–4746. Lai, R. C. S., Hannig, J., and Lee, T. C. M. (2015). Generalized Fiducial Inference for Ultrahigh-Dimensional Regression. J. Amer. Statist. Assoc., 110(510):760–772. Liu, R. and Singh, K. (1993). A Quality Index Based on Data Depth and Multivariate Rank Tests. J. Amer. Statist. Assoc., 88:252–260. Meza, J. and Lahiri, P. (2005). A note on the Cp statistic under the nested error regression model. Surv. Methodol., 31:105–109. Michel, R. and Pfanzagl, J. (1971). The accuracy of the normal approximation for minimum contrast estimates. Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete, 18(1):73–84. Moon, J.-Y., Wang, B., Ha, K.-J., and Lee, J.-Y. (2013). Teleconnections associated with Northern Hemisphere summer monsoon intraseasonal oscillation. Clim. Dyn., 40(1112):2761–2774. Mosler, K. (2013). Depth statistics. In Becker, C., Fried, R., and Kuhnt, S., editors, Robustness and Complex Data Structures, pages 17–34. Springer Berlin Heidelberg. Narisetty, N. N. and He, X. (2014). Bayesian variable selection with shrinking and diffusing priors. Ann. Statist., 42:789–817. Natarajan, B. K. (1995). Sparse Approximate Solutions to Linear Systems. Siam. J. Comput., 24:227–234. Nguyen, T. and Jiang, J. (2014). Restricted fence method for covariate selection in longitudinal data analysis. Biostatistics, 13(2):303–314. Peng, H. and Lu, Y. (2012). Model selection in linear mixed effect models. J. Multivar. Anal., 109:109–129. Pfanzagl, J. (1969). On the measurability and consistency of minimum contrast estimates. Metrika, 14(1):249–272. Ronchetti, E. (2000). Data Segmentation and Model Selection for Computer Vision: A Statistical Approach, chapter Robust Regression Methods and Model Selection. Springer. pp 31–40. 26 Roc̆kovà, V. and George, E. I. (2016). The Spike-and-Slab LASSO. J. Amer. Statist. Assoc., 0:0–0. Schwarz, G. (1978). Estimating the dimension of a model. Ann. Statist., 6(2):461–464. Sengupta, S., Volgushev, S., and Shao, X. (2016). A Subsampled Double Bootstrap for Massive Data. J. Amer. Statist. Assoc., 111(515):1222–1232. Shao, J. (1996). Bootstrap model selection. J. Amer. Statist. Assoc., 91(434):655–665. Singleton, A. and Toumi, R. (2012). Super-Clausius-Clapeyron scaling of rainfall in a model squall line. Quat. J. R. Met. Soc., 139(671):334–339. Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. J. R. Statist. Soc. B, 58(267–288). Trenberth, K. E. (2011). Changes in precipitation with climate change. Clim. Res., 47(1-2):123–138. Trenberth, K. E., Dai, A., Rasmussen, R. M., and Parsons, D. B. (2003). The changing character of precipitation. Bull. Am. Meteorol. Soc., 84(9):1205–1217. Tukey, J. W. (1975). Mathematics and picturing data. In James, R., editor, Proceedings of the International Congress on Mathematics, volume 2, pages 523–531. Vaida, F. and Blanchard, S. (2005). Conditional Akaike information for mixed effects models. J. Amer. Statist. Assoc., 93:120–131. Wang, B., Ding, Q., Fu, X., Kang, I.-S., Jin, K., Shukla, J., and Doblas-Reyes, F. (2005). Fundamental challenge in simulation and prediction of summer monsoon rainfall. Geophys. Res. Lett., 32(15). Wang, L., Kim, Y., and Li, R. (2013). Calibrating Nonconvex Penalized Regression in Ultra-high Dimension. Ann. Statist., 41:2505–2536. Zhang, C.-H. and Zhang, S. S. (2014). Confidence intervals for low dimensional parameters in high dimensional linear models. J. R. Statist. Soc. B, 76(1):217–242. Zhu, L.-P., Li, L., Li, R., and Zhu, L.-X. (2011). Model-Free Feature Screening for Ultrahigh-Dimensional Data. J. Amer. Statist. Assoc., 106(496):1464–1475. Zou, H. (2006). The Adaptive Lasso and Its Oracle Properties. J. Amer. Statist. Assoc., 101:1418–1429. Zou, H. and Li, R. (2008). One-step sparse estimates in nonconcave penalized likelihood models. Ann. Statist., 36:1509–1533. 27 Zuo, Y. (2003). Projection-based depth functions and associated medians. Ann. Statist., 31:1460–1490. Zuo, Y. and Serfling, R. (2000). General notions of statistical depth function. Ann. Statist., 28(2):461–482. 28
10math.ST
A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search Deng Cai The State Key Lab of CAD&CG, College of Computer Science, Zhejiang University, China Alibaba-Zhejiang University Joint Institute of Frontier Technologies [email protected] arXiv:1612.07545v4 [cs.CV] 18 Feb 2018 ABSTRACT Approximate Nearest Neighbor Search (ANNS) is a fundamental problem in many areas of machine learning and data mining. During the past decade, numerous hashing algorithms are proposed to solve this problem. Every proposed algorithm claims outperform other state-of-the-art hashing algorithms. However, the evaluation of these hashing papers was not thorough enough, and those claims should be re-examined. The ultimate goal of an ANNS method is returning the most accurate answers (nearest neighbors) in the shortest time. If implemented correctly, almost all the hashing methods will have their performance improved as the code length increases. However, many existing hashing papers only report the performance with the code length shorter than 128. In this paper, we carefully revisit the problem of search with the hash index and make a thorough comparison of many popular hashing algorithms. Surprisingly, the random-projection-based Locality Sensitive Hashing (LSH) ranked the second among twelve compared popular hashing algorithms, while all the other eleven hashing papers claim to outperform LSH. Despite the extreme simplicity of random-projection-based LSH, our results show that the capability of this algorithm has been far underestimated. For the sake of reproducibility, all the codes used in the paper are released on GitHub, which can be used as a testing platform for a fair comparison between various hashing algorithms. CCS CONCEPTS • Information systems → Search engine indexing; KEYWORDS ANNS, hashing, hamming ranking ACM Reference Format: Deng Cai. 2018. A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search. In Proceedings of arXiv. ACM, New York, NY, USA, 11 pages. https://doi.org/10.1145/nnnnnnn.nnnnnnn 1 INTRODUCTION Nearest neighbor search plays an important role in many applications of machine learning and data mining. Given a dataset with N entries, the cost for finding the exact nearest neighbor is O(N ), which is very time consuming when the data set is large. So people turn to Approximate Nearest Neighbor (ANN) search in practice [1, 20]. Hierarchical structure (tree) based methods, such as KD-tree [3] ,Randomized KD-tree [32], K-means tree [6], are popular solutions for the ANN search problem. These methods perform very well when the dimension of the data is relatively low. However, the performance decreases dramatically as the dimension of the data increases [32]. During the past decade, hashing based ANN search methods [8, 23, 36] received considerable attention. These methods generate binary codes for high dimensional data points (real vectors) and try to preserve the similarity among the original real vectors. A hashing algorithm generating l-bits code can be regarded as contains l hash functions. Each function partitions the original feature space into two parts, the points in one part are coded as 1, and the points in the other part are coded as 0. When an l-bits code is used, the hashing algorithm (l hash functions) partitions the feature space into 2l parts, which can be named as hash buckets. Thus, all the data points fall into different hash buckets (associated with different binary codes). Ideally, if neighbor vectors fall into the same bucket or the nearby buckets (measured by the hamming distance of binary codes), the hashing based methods can efficiently retrieve the nearest neighbors of a query point. One of the most popular hashing algorithms is Locality Sensitive Hashing (LSH) [8, 13]. LSH is a name for a set of hashing algorithms, and we can specially design different LSH algorithms for the different type of data [8]. For real vectors, random-projection-based LSH [4] might be the most simple and popular one. This algorithm uses random projection to partition the feature space. LSH (random-projection-based) is naturally data independent. Many data-dependent hashing algorithms [7, 9–12, 14–16, 18, 19, 21–24, 26–28, 31, 33, 35–40] have been proposed during the past decades and all these algorithms claimed to have superior performance over the baseline algorithm LSH. However, the evaluation of all these papers are not thorough enough, and their conclusions are questionable: • Despite the performance increases as the code length increases, most of the hashing papers [7, 10, 11, 14–16, 19, 22– 24, 26–28, 33, 35–40] only reported the performance with the code length shorter than 128. How about we further increase the code length? And what is the up-bound of the code length? • The most popular implementation of using a hash index for search is the so-called "hash bucket search" approach 12345 . 1 https://github.com/kayzhu/LSHash 2 https://github.com/willard-yuan/hashing-baseline-for-image-retrieval arXiv, February 18, 2018, Hangzhou, Zhejiang, China 2018. ACM ISBN 978-x-xxxx-xxxx-x/YY/MM. . . $15.00 https://doi.org/10.1145/nnnnnnn.nnnnnnn 3 https://github.com/kevinlin311tw/Caffe-DeepBinaryCode 4 https://github.com/thuml/HashNet 5 https://github.com/ymcidence/DeepSketchHashing arXiv, February 18, 2018, Hangzhou, Zhejiang, China Is it the right way of using hash index for high accuracy required ANNS problems? • Most of the hashing papers use the accuracy - # of retrieved samples curves to compare various hashing algorithms. This metric certainly does not include the possible extra cost of using longer codes. Can we use other metrics which includes all the costs, so that we can compare the hashing algorithms with various non-hashing based ANNS methods? These problems have already been raised in the literature. [18] pointed out that many data-dependent hashing algorithms have the improvements over LSH, but "improvements occur only for relatively small hash code sizes up to 64 or 128 bits". The figure 4 in this paper [18] shows that when 1,024-bits codes were used, LSH is the best-performed hashing algorithm. However, [18] did not provide a full analysis. There is also a public available c++ program named FALCONN on the GitHub6 which implements LSH algorithm. Since we can record the search time of the program, the FALCONN (LSH) can be fairly compared with other non-hashing based ANNS methods. However, the results are not very encouraging7 . There are even researchers pointing out that "LSH is so hopelessly slow and/or inaccurate"8 . Is this true that "LSH is so hopelessly slow and/or inaccurate"? All these problems motivate us to revisit the problem of applying hashing algorithms for ANNS. This study is carried on two popular million scale ANNS datasets (SIFT1M and GIST1M)9 , and the findings are very surprising: • Twelve popular hashing algorithms are thoroughly compared on these two datasets. Despite the fact that all the other eleven data-dependent hashing algorithms claimed the superiority over random-projection-based LSH, LSH ranked the second among all the twelve compared algorithms in our experiments. There is only one algorithm, Spherical Hashing [12], which consistently outperforms LSH on both two datasets. • We also compare our implementation of random-projectionbased LSH (RPLSH) with other five popular open source ANNS algorithms (FALCONN, flann10 , annoy11 , faiss12 and KGrpah13 ). On SIFT1M, if a high recall is required (higher than 98%), RPLSH performs the second best among the six compared methods. On GIST1M, if a high recall is required (higher than 96%), RPLSH performs best among the six compared methods. Despite the extreme simplicity of the random-projection-based LSH, our results show that the capability of this algorithm has been far underestimated. For the sake of reproducibility, all the codes are 6 https://github.com/FALCONN-LIB/FALCONN 7 http://www.itu.dk/people/pagh/SSS/ann-benchmarks/ 8 http://www.kgraph.org/ 9 http://corpus-texmex.irisa.fr/ 10 https://github.com/mariusmuja/flann 11 https://github.com/spotify/annoy 12 https://github.com/facebookresearch/faiss 13 https://github.com/aaalgo/kgraph Deng Cai Algorithm 1 Search with a hash index Require: base set D, query vector q, the hash functions, hash index (binary codes for all the points in the base set), the pool size L and the number K of required nearest neighbors, Ensure: K points from the base set which are close to q. 1: Encode the query q to a binary code b; 2: Locate L points which have shortest hamming distance to b; 3: return the closet K points to q among these L points. Algorithm 2 Hash bucket search subroutine for locate L closest binary codes 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: Let hamming radius r = 0; Let candidate pool set C = ∅; while |C | < L do Get the buckets list B with hamming distance r to b; for all bucket bb in B do Put all the points in bb into C; if |C | >= L then Keep the first L points in C; return; end if end for r = r + 1; end while released on GitHub1415 which can be used as a testing platform for a fair comparison between various hashing methods. 2 SEARCH WITH A HASH INDEX A hashing method transforms the real vectors to binary codes. The binary codes can then be used as a hash index for online search. The general procedure of searching with a hash index is as follows (Suppose the user submit a query q and ask for K neighbors of the query): (1) The search system encodes the query to a binary code b use the hash functions. (2) The search system finds L points which are closest to b in terms of the hamming distance. (3) The search system performs a scan within the L points, returns the top K points which are closet to q. This procedure is summarized in Algorithm 1, and there is only one parameter L which can be used to control the accuracy-efficiency trade-off. Line 1 and 3 are very straightforward, and nothing needs to be discussed. However, it can be tricky in implementing line 2. There are two popular procedures to complete the task in line 2. We named them hash bucket search approach (Algorithm 2) and hamming ranking approach (Algorithm 3). If the code length is l, the hash bucket search approach builds 2l buckets and store the binary vectors in these buckets. Based on this search procedure, we can see that the time of searching with a hash index contains three parts [17]: (1) Coding time: the line 1 in Algorithm 1. 14 https://github.com/ZJULearning/MatlabFunc/tree/master/ANNS/Hashing 15 https://github.com/ZJULearning/hashingSearch A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search arXiv, February 18, 2018, Hangzhou, Zhejiang, China Table 1: Data sets Algorithm 3 Hamming ranking subroutine for locate L closest binary codes 1: 2: Compute the hamming distances between b and all the binary codes in the data set; Sort the points based on the hamming distances in ascending order and keep the first L points; (2) Locating time: the lines 2 in Algorithm 1. (3) Scanning time: the line 3 in Algorithm 1. The hash bucket search and the hamming ranking approaches will need different locating times, and we analyze the pros and cons of these two approaches here and verify this analysis in the next section. • If the search time is considered: – The hamming ranking approach needs to compute the hamming distance of the query code b to all the codes stored in the database. This portion of time16 is dependent on the code length l and independent with the parameter L. Then we need to find the smallest L values (distances). Overall, the locating time of the hamming ranking approach grows linearly with respect to the code length l and the parameter L. – The case of the hash bucket search approach is more complicated. Given a binary code b, locating the hashing bucket corresponding to b costs O(1) time (by using std::vector or std::unordered_map). If there are enough points (larger than L) in this bucket, the total time cost of the hash bucket search is O(1), which seems much more efficient than the hamming ranking approach. However, this is only the ideal case. In reality, there are always not enough points (even no point) in this bucket, and we need to increase the hamming radius r . Given an l-bits code b, considering those hashing buckets whose hamming distance to b is smaller or equal to r . It is easy to  Í show the number of these buckets is ri=0 li , which increases almost exponentially with respect to r and l. As the L increases, to locate L points successfully, r has to be increased. Overall, the locating time of the hash bucket search approach grows exponentially with respect to the code length l and at least linearly with respect to the parameter L. – When the code length is short and the number of required points L is small, the hash bucket search approach will be much more efficient than the hamming ranking approach. However, as the code length increases and L increases, the hash bucket search approach soon becomes extremely slow. • If the index size is considered: – If the hamming ranking approach is used, we can easily find that there is no additional data structure needed for Algorithm 3 and we only need to store the binary codes for the data points in the database. Suppose the database contains n data points and we use l bits code, we need n 8l 16 It is important to note that the hamming distance computation of two binary codes can be extremely fast with smart algorithms. Please see [34]. data set SIFT1M GIST1M dimension 128 960 base number 1,000,000 1,000,000 query number 10,000 1,000 Algorithm 4 random projection based LSH Require: base set D with n m-dimensional points, code length l Ensure: m × l projection matrix A and n l-bits binary codes.. 1: Generate an m × l random matrix A from Gaussian distribution N (0, 1); 2: Project the data onto l dimensional space using this random matrix. 3: Convert the n × l dimensional data matrix to n l-bits binary codes by the binarize operation. byte. This index size may be the smallest one among most of the popular ANNS methods even when l = 1024. – If the hash bucket search approach is used, we need the data structures (either std::vector or std::unordered_map) to store the hash buckets. The index size will be much large than the hamming ranking approach, especially when the code length is considerable. In summary, the hash bucket search approach is suitable for the case that the code is not very long and L is small (e.g., near-duplicate search). If the code length is very long and L is pretty large (e.g., high accuracy required ANNS), the hamming ranking approach should be used. 3 THE RIGHT WAY TO USE HASHING FOR ANNS The previous section gave a brief analysis of the pros and cons of two search procedures using the hash index. In this section, we will experimentally verify our analysis. The experiments are performed on two popular ANNS datasets, SIFT1M and GIST1M17 . The basic statistics of these two datasets are shown in Table 1. We use the random-projection-based LSH [4] for its simplicity. Given a dataset with dimensionality m, one can generate an m × l random matrix from Gaussian distribution N (0, 1) where l is the required code length. Then the data will be projected onto l dimensional space using this random matrix. The l dimensional real representation of each point can then be converted to l-bits binary code by a simple binarize operation 18 . The formal algorithm is illustrated in Algorithm (4). Given a query point, the search algorithm is expected to return K points. Then we need to examine how many points in this returned set are among the real K nearest neighbors of the query. Suppose the returned set of K points given a query is R and the real K nearest neighbors set of the query is R ′ , the precision and recall can be defined [29] as |R ′ ∩ R| |R ′ ∩ R| , recall(R) = . (1) precision(R) = |R| |R ′ | 17 http://corpus-texmex.irisa.fr/ 18 i -th bit is 1 if i -th feature is grater or equal to 0; i -th bit is 0 if i -th feature is smaller than 0; arXiv, February 18, 2018, Hangzhou, Zhejiang, China Deng Cai 80 LSH(16) LSH(20) LSH(24) LSH(28) LSH(32) 40 20 0 5 10 # of located samples LSH(24) LSH(28) LSH(32) LSH(36) LSH(40) 40 20 0.5 15 ×10 Time (s) Recall (%) 1 4 1.5 2 2.5 # of located samples (a) SIFT1M ×10 200 300 100 200 100 0 0 3 16 bit 20 bit 24 bit 28 bit 32 bit 16 bit 20 bit 24 bit 28 bit 32 bit Hamming ranking approach Hash bucket search approach (b) GIST1M (a) Locate 50000 points on SIFT1M 80 300 300 locating time scanning time 20 60 LSH(24) LSH(28) LSH(32) LSH(36) LSH(40) 40 20 100 200 300 400 500 100 150 Time (s) (c) Hamming ranking on SIFT1M 200 100 0 50 Time (s) Time (s) LSH(16) LSH(20) LSH(24) LSH(28) LSH(32) 40 Recall (%) 60 locating time scanning time 5 80 Recall (%) locating time scanning time (d) Hamming ranking on GIST1M locating time scanning time Time (s) Recall (%) 60 60 Time (s) 300 80 200 100 0 24 bit 28 bit 32 bit 36 bit 40 bit 24 bit 28 bit 32 bit 36 bit 40 bit Hamming ranking approach Hash bucket search approach (b) Locate 50000 points on GIST1M 80 60 LSH(16) LSH(20) LSH(24) LSH(28) LSH(32) 40 20 10 1 10 2 10 3 Time (s) (e) Hash bucket search on SIFT1M Recall (%) Recall (%) 80 60 LSH(24) LSH(28) LSH(32) LSH(36) LSH(40) Figure 2: Where the search time spend on? The percentages of the locating time (the scanning time) in the total search time varies as the code length increases when we are fixing to locate 50,000 points on two datasets. 40 20 10 1 10 2 10 3 Time (s) (f) Hash bucket search on GIST1M Figure 1: The ANN search results of LSH on two datasets. The y-axis denotes the average recall while the x-axis denotes (a,b) the # of located samples (c,d) the search time using the hamming ranking approach (e,f) the search time using the hash bucket search approach. We can see that if the hamming ranking approach is used, longer codes means better performance. While if the hash bucket search approach is used, 24bits and 28bits are the optimal code lengths for LSH on SIFT1M and GIST1M respectively. Since the sizes of R ′ and R are the same, the recall and the precision of R are actually the same. We fixed K = 100 throughout our experiments. 3.1 The Search Time against # of Located Samples The ultimate goal of an ANNS method is returning the most accurate answers (nearest neighbors) in the shortest time. Thus, the search time must be reported together with the accuracy measures. Naturally, the accuracy - time curve is an excellent choice to evaluate the performance of various hashing algorithms. As analyzed in Section 2, the search time should include coding time, locating time and scanning time altogether. Some hashing papers[16, 26–28] reported the training and testing time of various hashing algorithms. In an ANNS system, the training time of a hashing algorithm is just the indexing time, while the testing time of a hashing algorithm is merely the coding time. For almost all the popular hashing algorithms, this coding time can be neglected comparing with locating time and scanning time. Please see Table 5 for details. Thus, in our remaining experiments, the search time only includes locating time and scanning time. Many hashing papers [7, 9–12, 15, 19, 23, 27, 28, 31, 33, 37, 38, 40] reported accuracy - # of located samples curves of various hashing algorithms. If the hamming ranking approach is used, one can easily find that various hashing algorithms almost have the same locating time with the equal L (# of located samples) and the same code length. The equal L also means the same scanning time. Thus, # of located samples is a good indicator of the search time, and the accuracy - # of located samples curve can be used to compare various hashing algorithms correctly. Moreover, since the locating time grows slowly as the code length grows (see Figure 3), accuracy - # of located samples curve can also be used to measure the performance of the same hashing algorithm with different code length as long as these code lengths are close to each other. However, if the hash bucket search approach is used, # of located samples is no longer a good indicator of the search time. The locating time grows exponentially as the code length grows. Even with the same code length, different hashing algorithms have different code distributions which result in different locating times. Take Figure 1 as an example. Figure 1 plots the performance of LSH on both two datasets. The code length grows from 16 to 32 on SIFT1M and 24 to 40 on GIST1M. Figure 1 (a,b) show the recall # of located samples curves, (c,d) show the recall - time curves A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search arXiv, February 18, 2018, Hangzhou, Zhejiang, China Table 2: Hamming radius VS. # of queries successfully located 50000 points on SIFT1M (total # of queries 10,000) hamming radius 0 1 2 3 4 5 6 7 8 9 10 # of buckets (16 bits) # of queries (16 bits) (1.752s) 1 0 16 3637 120 4932 560 1230 1,820 169 4,368 30 8,008 1 11,440 1 12,870 0 11,440 0 8,008 0 # of buckets (32 bits) # of queries (32 bits) (237.8s) 1 0 32 0 496 0 4960 4 35,960 1710 201,376 4282 906,192 2691 3,365,856 1021 10,518,300 241 28,048,800 44 64,512,240 7 Table 3: Hamming radius VS. # of queries successfully located 50000 points on GIST1M (total # of queries 1,000) hamming radius 0 1 2 3 4 5 6 7 8 9 10 # of buckets (24 bits) # of queries (24 bits) (0.234s) 1 70 24 467 276 277 2,024 115 10,626 44 42,504 18 134,596 7 346,104 2 735,471 0 1,307,504 0 1,961,256 0 # of buckets (40 bits) # of queries (40 bits) (240.0s) 1 0 40 0 780 27 9,880 252 91,390 302 658,008 205 3,838,380 107 18,643,560 57 76,904,685 27 273,438,880 14 847,660,528 9 10 3 150 100 50 20 24 28 10 1 10 0 0 16 10 2 32 1500 1000 500 0 16 20 Code length 24 28 32 Code length 0 5 10 Located samples (a) Locate 50000 points on SIFT1M 15 ×10 4 (a) 32 bits LSH code on SIFT1M hash bucket search hamming ranking 1500 1000 500 0 0.5 1 1.5 2 Located samples 2.5 3 ×10 5 (b) 40 bits LSH code on GIST1M 10 4 250 hash bucket search hamming ranking 200 Locating time (s) Locating time (s) 2000 hash bucket search hamming ranking Locating time (s) 200 2000 hash bucket search hamming ranking Locating time (s) hash bucket search hamming ranking Locating time (s) Locating time (s) 250 150 100 50 0 24 28 32 36 40 Figure 4: The locating time grows linearly as the number of locating sample increases for the hamming ranking approach while the locating time grows super-linearly as the number of locating sample increases for the hash bucket search approach. hash bucket search hamming ranking 10 2 10 0 10 -2 24 28 Code length 32 36 40 Code length (b) Locate 50000 points on GIST1M Figure 3: The locating time grows linearly as the code length increases for the hamming ranking approach while the locating time grows exponentially as the code length increases for the hash bucket search approach. using the hamming ranking approach and (e,f) show the recall time curves using the hash bucket search approach. We can see that (a, c) and (b, d) have almost the same curves while (a, e) and (b, f) are significantly different. If the hamming ranking approach is used, longer codes (not very long) means better performance. While if the hash bucket search approach is used, 24-bits and 28bits are the optimal code lengths for LSH on SIFT1M and GIST1M respectively. The hash bucket search approach with LSH 40-bits code (actually not very long) on GIST1M is extremely slow. Figure 1 (a,b) is very natural and reasonable. Since each bit is a partition of the feature space and same code (0 or 1) on this bit means two points are on the same side of this partition. If two points share t bits same code, which means these two points are on the same sides of t partitions. Neighbors in the hamming space with longer code are more likely to be the real neighbors in the original feature space. Figure 2 shows how the percentages of the locating time (the scanning time) in the total search time varies as the code length increases when we are fixing to locate 50,000 points on two datasets. Since the number of locating points is fixed, the scanning time will be fixed. The overall search time increasing is caused by the locating time. The locating time of the hamming ranking approach grows slowly as the code length grows while the locating time of the hash bucket search approach grows very quickly. Figure 3 shows that the locating time grows linearly as the code length increases for the hamming ranking approach while the locating time grows exponentially as the code length increases for the hash bucket search approach. This result agrees with our analysis in Section 2. Table 2 and 3 explain the reason. These tables recorded the number of queries (the total number is 10,000 on SIFT1M and 1,000 on GIST1M) which successfully located 50,000 samples in different hamming radius with different code length utilizing hash bucket search approach. As the analysis in Section 2, as the code length increases, the number of hash buckets corresponding to the same arXiv, February 18, 2018, Hangzhou, Zhejiang, China Deng Cai 100 100 (1 table) (32bit) (2 table) (64bit) (4 table) (128bit) (8 table) (256bit) (16 table) (512bit) 90 90 Recall (%) (1 table) (32bit) (2 table) (64bit) (4 table) (128bit) (8 table) (256bit) (16 table) (512bit) 70 60 50 40 Recall (%) 80 80 70 60 50 40 30 20 10 2 10 3 20 50 100 200 Time (s) Time (s) (a) SIFT1M (b) GIST1M Figure 5: The recall-time curves of 1) (black lines) the hash bucket search approach with different number of tables 2) (red lines) the hamming ranking approach with different code length on SIFT1M and GIST1M. 100 80 (1 table) (2 table) (4 table) (8 table) (16 table) 60 Recall (%) 80 Recall (%) 3.2 90 70 60 (1 table) (2 table) (4 table) (8 table) (16 table) 50 40 30 40 10 2 10 3 Time (s) (a) Locate 50000 points on SIFT1M 20 50 100 Time (s) (b) Locate 50000 points on GIST1M Figure 6: The recall-time curves of the hash bucket search approach with different number of tables on SIFT1M and GIST1M. hamming radius increases almost exponentially. Moreover, as the code length increases, the base points are more diversified. And we need to increase the hamming radius to locate enough number of samples. These two reasons cause the locating time grows exponentially as the code length increases for the hash bucket search approach. As a result, the hash bucket search approach has no practical meaning if the code length is longer than 64. When the code length is fixed, Figure 4 shows that the locating time of the hamming ranking approach grows linearly as the number of locating sample increases while the locating time of the hash bucket search approach grows super-linearly as the number of locating sample increases. And the slope of the hamming ranking approach is much smaller than that of the hash bucket search approach. It just because as the number of locating sample increases, we need to increase the hamming radius to locate enough samples successfully. Thus, we need to visit much more hash buckets. The Long Codes against The Multiple Tables Our analysis in the previous section indicates that the hash bucket search approach has no practical meaning if the code length is longer than 64 since the locating time grows exponentially as the code length increases. Can we design a method for the hash bucket search approach to take the advantages of long codes? The answer is yes. A straightforward way is using multiple hash tables to represent long codes. Suppose we have 128-bits codes, if a single table with 128-bits is used, the extremely long locating time will make the hash bucket search approach meaningless. If we use four tables, each table is 32-bits. To locate L points, if we only have one hash table, we have to increase the hamming radius r if the points in all the buckets within the hamming distance r are not enough. This will increase the locating time a lot. If we have multiple hash tables, instead of growing r , we can scan the buckets within the hamming radius r in all the tables, which gives us a more substantial chance to locate enough data points. Figure 6 shows the recall-time curves of LSH with the different number of tables (each table is 32-bits) on the two datasets. The results are very consistent: LSH gains the advantage by using multiple tables on both datasets. This multiple tables trick is more effective on SIFT1M than on GIST1M. If we use four 32-bits tables, actually we used 128-bits codes. A natural question will be which approach is more efficient? The hash bucket search approach with four 32-bits tables? Or the hamming ranking approach with 128-bits codes? Figure 5 shows the recall-time curves of hash bucket search approach with the different number of tables and that of hamming ranking approach with different code length, both on SIFT1M and GIST1M. If we aim at high recall region, the hamming ranking approach is much more efficient. However, the hash bucket search approach can return results (with low recall) in a very short of time. If the hamming ranking approach is used, the computation of the hamming distances of the query code and the database codes A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search arXiv, February 18, 2018, Hangzhou, Zhejiang, China Table 4: Indexing Time (s) Method SIFT1M GIST1M Method SIFT1M GIST1M LSH 3.35 12.33 SH 83.44 3864.3 BRE 680.3 369.49 IsoH 1.68 91.99 USPLH 1099.2 10508.3 KLSH 94.09 194.89 ITQ 88.3 1372.4 AGH1 296.84 389.91 SpH 2583.5 4041.1 AGH2 611.7 703.25 DSH 51.92 122.84 CH 263.78 365.34 ITQ, SH and IsoH learn 128 bits code on SIFT1M and 960 bits code on GIST1M. is unavoidable. Thus it is not possible for the hamming ranking approach to return the answer (even not very accurate) in a very short of time. As summarized in Section 2, the hash bucket search with multiple tables approach is more suitable for the case that L is small (e.g., near-duplicate search). And the hamming ranking approach is more suitable for the case L will be pretty large (e.g., high accuracy required ANNS). 4 A COMPREHENSIVE COMPARISON Our analysis in the previous sections shows that the evaluations in most of the existing hashing papers are not thorough enough and the conclusions in those papers need to be re-examined. In this section, we aim at providing a comprehensive comparison between twelve popular hashing algorithms on SIFT1M and GIST1M. 4.1 Compared Algorithms Twelve popular hashing algorithms compared in the experiments are listed as follows: • LSH is a short name for random-projection-based Locality Sensitive Hashing [4] as in Algorithm 4. It is frequently used as a baseline method in various hashing papers. • SH is a short name for Spectral Hashing [36]. SH is based on quantizing the values of analytical eigenfunctions computed along PCA directions of the data. • KLSH is a short name for Kernelized Locality Sensitive Hashing [23]. KLSH generalizes the LSH method to the kernel space. • BRE is a short name for Binary Reconstructive Embeddings [22]. • USPLH is a short name for Unsupervised Sequential Projection Learning Hashing [33]. • ITQ is a short name for ITerative Quantization [9]. ITQ finds a rotation of zero-centered data so as to minimize the quantization error of mapping this data to the vertices of a zero-centered binary hypercube. • AGH is a short name for Anchor Graph Hashing [28]. It aims at performing spectral analysis [2] of the data which shares the same goal with Self-taught Hashing [39]. The advantage of AGH over Self-taught Hashing is the computational efficiency. AGH uses an anchor graph [25] to speed up the spectral analysis. There are two versions of AGH: one layer AGH and two layer AGH. We use AGH1 and AGH2 to denote them. Table 5: Coding Time (s) Method LSH BRE USPLH ITQ SpH DSH SIFT1M 0.03 0.25 0.05 0.01 0.11 0.04 GIST1M 0.016 0.043 0.02 0.025 0.027 0.02 Method SH IsoH KLSH AGH1 AGH2 CH SIFT1M 1.21 0.007 0.34 0.86 1.06 0.96 GIST1M 6.82 0.034 0.06 0.11 0.22 0.10 • SpH is a short name for Spherical Hashing [12]. SpH uses a hyperspherebased hash function to map data points into binary codes. • IsoH is a short name for Isotropic Hashing [21]. IsoH learns the projection functions with isotropic variances for PCA projected data. The main motivation of IsoH is that PCA directions with different variance should not be equally treated (one bit for one direction). • CH is a short name for Compressed Hashing [24]. CH first learns a landmark (anchor) based sparse representation [5] then followed by LSH. • DSH is a short name for Density Sensitive Hashing [16]. DSH finds the projections which aware the density distribution of the data. Since our problem is high accuracy required ANNS, we use the hamming ranking approach for all the hashing algorithms. For SH, ITQ, and IsoH, the eigenvectors of the covariance matrix will be used. Thus, these three algorithms can only learn 128-bits code on SIFT1M and 960-bits code on GIST1M. All the other nine algorithms learn 1,024-bits code on both datasets. For KLSH, AGH and CH, we need to pick a certain number of anchor (landmark) points. We use the same 1,500 anchor points for all these algorithms, and the anchor points are generated by using kmeans with five iterations. Also, the number of nearest anchors is set to 50 for AGH and CH algorithms. Please see [28] for details. All the hashing algorithms are implemented in Matlab19 , and we use these hashing functions to learn the binary codes for both base vectors and query vectors. The binary codes can then be fed into Algorithm 1 for search. The Matlab functions are run on an i7-5930K CPU with 128G memory, and the Algorithm 1 is implemented in c++ and run on an i7-4790K CPU and 32G memory. For the sake of reproducibility, both the Matlab codes and c++ codes are released on GitHub2021 . Besides all the hashing algorithms, we also report the performance of brute-force search. • brute-force. The performance of brute-force search is reported to show the advantages of using hashing methods. To get a different recall, we just perform brute-force search on a different percentage of the query number. For example, the brute-force search time on 90% queries of the original query set stands for the brute-force search time of 90% recall. 19 Almost all the core parts of the matlab code of the hashing algorithms are written by the original authors of the papers. 20 https://github.com/ZJULearning/MatlabFunc/tree/master/ANNS/Hashing 21 https://github.com/ZJULearning/hashingSearch arXiv, February 18, 2018, Hangzhou, Zhejiang, China Deng Cai claim in all these hashing papers since they never report the performance using longer codes. • If the locating time is ignored, the performance of most of the algorithms increases as the code length increases. However, on SIFT1M, the recall of USPLH decreases as the code length exceeds 256 and the recalls of AGH1 and AGH2 decrease as the code length exceeds 512. On GIST1M, the recall of USPLH almost fixed as the code length increases and the recalls of AGH1, AGH2, SH and IsoH decrease as the code length exceeds 512. This result suggests the five hashing algorithms, USPLH, AGH1, AGH2, SH, and IsoH may not be able to learn very long discriminative codes. 100 90 95 70 LSH SH BRE USPLH ITQ SpH 60 50 40 32 IsoH DSH KLSH AGH1 AGH2 CH 64 Recall(%) Recall(%) 80 90 85 80 75 128 LSH BRE USPLH 256 SpH DSH KLSH 512 Code length AGH1 AGH2 CH 1024 Code length (a) Locate 10000 samples on SIFT1M 100 90 95 70 Recall(%) Recall(%) 80 60 50 90 85 80 40 75 30 20 32 64 128 70 256 512 Code length LSH SH BRE USPLH ITQ SpH IsoH DSH 1024 Code length KLSH AGH1 AGH2 CH LSH SH BRE USPLH ITQ SpH IsoH DSH KLSH AGH1 AGH2 CH (b) Locate 50000 samples on GIST1M Figure 7: The recall - codelength curves of various hashing algorithms when the number of the located samples are fixed 4.2 Results Since we use Matlab functions to learn the binary codes and c++ algorithm to search with a hash index, the coding time and later time (locating time and scanning time) cannot be added together, and we reported them separately. Table 4 and 5 report the indexing (hash learning) time and coding (testing) time of various hashing algorithms. The indexing (hash learning) stage is performed off-line thus the indexing time is not very crucial. The coding time of all the hashing algorithms is short. Therefore the coding time can be ignored compared with locating time and scanning time (see Figure 8) when we consider the total search time. Figure 7 shows how the recall changes as the code length increases of various hashing algorithms when the number of the located samples are fixed at 10,000 on SIFT1M and 50,000 on GIST1M. This figure illustrates several interesting points: • When the code length is 32, all of the other algorithms outperform LSH on both two datasets. When the code length is 64, nine algorithms outperform LSH on SIFT1M, and ten algorithms outperform LSH on GIST1M. However, when the code length exceeds 512, LSH performs the best on SIFT1M and the 3rd best on GIST1M. This result is consistent with the finding in [18] that "many data-dependent hashing algorithms have the improvements over LSH, but improvements occur only for relatively small hash code sizes up to 64 or 128 bits". This result is also consistent with the "outperform LSH" As we discussed in Section 2, if the hamming ranking approach is used, the memory usage for hashing methods’ index is extremely small. Meanwhile, if the recall-time curve is used, the additional cost of locating stage for longer codes automatically be considered. Thus, we are ready to pick the best hashing algorithm in the case that the code length can reach to 1,024 bits. Figure 8 shows the recall-time curves of various hashing algorithms with the optimal code length on SIFT1M and GIST1M. We are very surprised to find there is only one algorithm, Spherical Hashing, can consistently outperform LSH on both two datasets. KLSH is superior to LSH on GIST1M but performs very bad on SIFT1M. Despite the extreme simplicity of random-projection-based LSH, our results show that the capability of this algorithm has been far underestimated. 5 COMPARISON WITH OTHER POPULAR ANNS METHODS Given the surprising performance of random-projection-based LSH, we want to compare it with some public popular ANNS software. To be fair, we convert our Matlab code for random-projection-based LSH to c++ code and make a complete search software (by c++). We named our algorithm RPLSH. The codes are also released on GitHub22 . 5.1 Compared Algorithms We pick five popular ANNS algorithms for comparison which cover various types such as tree-based, hashing-based, quantization-based and graph-based approaches. They are: (1) FALCONN23 is a wel-known ANNS library based on multiprobe locality sensitive hashing. It implements the hash bucket search with multiple tables approach. (2) flann is a well-known ANNS library based on trees [30]. It integrates Randomized KD-tree [32] and Kmeans tree [6]. In our experiment, we use the randomized KD-tree and set the trees number as 32 on SIFT1M and 64 on GIST1M. The code on GitHub can be found at24 . (3) annoy is based on a binary search forest index. We use their code on GitHub for comparison25 . 22 https://github.com/ZJULearning/RPLSH 23 https://github.com/FALCONN-LIB/FALCONN 24 https://github.com/mariusmuja/flann 25 https://github.com/spotify/annoy 100 100 98 98 96 96 94 94 Recall (%) Recall (%) A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search 92 90 92 90 88 88 86 86 84 arXiv, February 18, 2018, Hangzhou, Zhejiang, China 84 60 100 150 200 300 400 30 50 100 Time (s) brute-force LSH(256) SH(128) BRE(256) USPLH(128) ITQ(128) SpH(256) IsoH(128) DSH(256) KLSH(256) 200 300 Time (s) AGH1(256) AGH2(256) CH(256) brute-force LSH(1024) SH(512) BRE(512) USPLH(64) (a) SIFT1M ITQ(960) SpH(1024) IsoH(256) DSH(1024) KLSH(1024) AGH1(256) AGH2(256) CH(512) (b) GIST1M Figure 8: The recall-time curves of various hashing algorithms with the optimal code length on SIFT1M and GIST1M. The number in parenthesis after the algorithm name is the code length. (4) faiss is recently released26 by Facebook. It contains well implemented code for state-of-the-art product quantization [14] based methods both on CPU and GPU. The CPU version is used for a fair comparison. (5) KGraph has open source code GitHub at27 , which is based on an approximate kNN Graph. • Both the RPLSH and the FALCONN are LSH based algorithms. However, RPLSH significantly outperforms FALCONN when the recall is higher than 90% on both two datasets. This is because FALCONN uses the hash buckets search with multiple tables approach while RPLSH uses the hamming ranking approach. • flann and annoy are tree-based methods. Compare the performance of two hashing-based methods with that of two tree-based methods, we can find that tree-based methods are more suitable for low dimensional data. • faiss is a product quantization (PQ) [14] based method, and it uses binary codes to approximate the original features. Thus it is impossible for faiss to achieve a very high recall. The advantage of this approximation is that we do not need the original vectors which is a huge saving of the memory usage [14]. • KGraph is a graph based algorithm, and it is KGraph’s author who says "LSH is so hopelessly slow and/or inaccurate"28 . However, RPLSH is significantly better than KGraph on GIST1M when at the high recall region (higher than 96%) • The different performance of RPLSH on SIFT1M and GIST1M suggest RPLSH is more suitable for high dimensional data. The experiments are carried out on a machine with an i7-4790k CPU and 32G memory. The performance on the high precision region for an ANNS algorithm will be more crucial in real applications. Thus we sample one percentage points from each base set as its corresponding validation set and tune all the algorithms on the validation sets to get their best performing indices at the high precision region. For RPLSH, we use 512-bits code on SIFT1M and 1,024-bits code on GIST1M. For all the search experiments, we only evaluate the algorithms on a single thread. 5.2 Results The recall-time curves of the six compared ANNS methods are shown in Figure 9. A number of interesting conclusions can be made: • On SIFT1M, if a high recall is required (higher than 98%), RPLSH performs the second best among all the six compared methods. On GIST1M, if a high recall is required (higher than 96%), RPLSH performs the best among all the six compared methods. 6 CONCLUSIONS We carefully studied the problem of using hashing algorithms for ANNS. With careful implementation, random-projection-based LSH is superior to many other popular hashing algorithms, and this algorithm is extremely simple. All the codes used in the paper are 26 https://github.com/facebookresearch/faiss 27 https://github.com/aaalgo/kgraph 28 http://www.kgraph.org/ Deng Cai 100 100 98 98 96 94 RPLSH FALCONN flann annoy faiss KGraph 92 90 Recall (%) Recall (%) arXiv, February 18, 2018, Hangzhou, Zhejiang, China RPLSH FALCONN flann annoy faiss KGraph 96 94 92 90 10 1 10 2 10 3 Time (s) (a) SIFT1M 10 1 10 2 10 3 Time (s) (b) GIST1M Figure 9: The recall-time curves of six popular ANNS methods on SIFT1M and GIST1M. released on GitHub, which can be used as a testing platform for a fair comparison between various hashing methods. REFERENCES [1] Sunil Arya and David M. Mount. 1993. Approximate Nearest Neighbor Queries in Fixed Dimensions. In Proceedings of the Fourth Annual ACM/SIGACT-SIAM Symposium on Discrete Algorithms. [2] M. Belkin and P. Niyogi. 2001. Laplacian Eigenmaps and Spectral Techniques for Embedding and Clustering. In Advances in Neural Information Processing Systems 14. [3] Jon Louis Bentley. 1975. Multidimensional Binary Search Trees Used for Associative Searching. Commun. ACM 18, 9 (1975), 509–517. [4] Moses S. Charikar. 2002. Similarity Estimation Techniques from Rounding Algorithms. In Proceedings of the Thiry-fourth Annual ACM Symposium on Theory of Computing. 380–388. [5] Xinlei Chen and Deng Cai. 2011. Large Scale Spectral Clustering with LandmarkBased Representation. In Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence. [6] Keinosuke Fukunaga and Patrenahalli M. Narendra. 1975. A Branch and Bound Algorithm for Computing k-Nearest Neighbors. IEEE Trans. Comput. 100, 7 (1975), 750–753. [7] Tiezheng Ge, Kaiming He, Qifa Ke, and Jian Sun. 2013. Optimized Product Quantization for Approximate Nearest Neighbor Search. In 2013 IEEE Conference on Computer Vision and Pattern Recognition. [8] Aristides Gionis, Piotr Indyk, and Rajeev Motwani. 1999. Similarity Search in High Dimensions via Hashing. In Proceedings of the 25th International Conference on Very Large Data Bases. [9] Yunchao Gong and Svetlana Lazebnik. 2011. Iterative quantization: A procrustean approach to learning binary codes. In The 24th IEEE Conference on Computer Vision and Pattern Recognition. [10] Junfeng He, Wei Liu, and Shih-Fu Chang. 2010. Scalable similarity search with optimized kernel hashing. In Proceedings of the 16th ACM International Conference on Knowledge Discovery and Data Mining. [11] Kaiming He, Fang Wen, and Jian Sun. 2013. K-Means Hashing: An AffinityPreserving Quantization Method for Learning Binary Compact Codes. In 2013 IEEE Conference on Computer Vision and Pattern Recognition. [12] Jae-Pil Heo, Youngwoon Lee, Junfeng He, Shih-Fu Chang, and Sung-Eui Yoon. 2012. Spherical hashing. In 2012 IEEE Conference on Computer Vision and Pattern Recognition. [13] Piotr Indyk and Rajeev Motwani. 1998. Approximate Nearest Neighbors: Towards Removing the Curse of Dimensionality. In Proceedings of the Thirtieth Annual ACM Symposium on the Theory of Computing. [14] Hervé Jégou, Matthijs Douze, and Cordelia Schmid. 2011. Product Quantization for Nearest Neighbor Search. IEEE Trans. Pattern Anal. Mach. Intell. 33, 1 (2011), 117–128. [15] Zhongming Jin, Yao Hu, Yue Lin, Debing Zhang, Shiding Lin, Deng Cai, and Xuelong Li. 2013. Complementary Projection Hashing. In IEEE International Conference on Computer Vision. [16] Zhongming Jin, Cheng Li, Yue Lin, and Deng Cai. 2014. Density Sensitive Hashing. IEEE Trans. Cybernetics 44, 8 (2014), 1362–1371. [17] Zhongming Jin, Debing Zhang, Yao Hu, Shiding Lin, Deng Cai, and Xiaofei. He. 2014. Fast and Accurate Hashing Via Iterative Nearest Neighbors Expansion. IEEE transactions on cybernetics 44, 11 (2014), 2167–2177. [18] Alexis Joly and Olivier Buisson. 2011. Random maximum margin hashing. In The 24th IEEE Conference on Computer Vision and Pattern Recognition. [19] Yannis Kalantidis and Yannis S. Avrithis. 2014. Locally Optimized Product Quantization for Approximate Nearest Neighbor Search. In 2014 IEEE Conference on Computer Vision and Pattern Recognition. [20] Jon M. Kleinberg. 1997. Two Algorithms for Nearest-Neighbor Search in High Dimensions. In Proceedings of the Twenty-Ninth Annual ACM Symposium on the Theory of Computing. [21] Weihao Kong and Wu-Jun Li. 2012. Isotropic Hashing. In Advances in Neural Information Processing Systems 25. [22] Brian Kulis and Trevor Darrell. 2009. Learning to Hash with Binary Reconstructive Embeddings. In Advances in Neural Information Processing Systems 22, NIPS. [23] Brian Kulis and Kristen Grauman. 2009. Kernelized locality-sensitive hashing for scalable image search. In IEEE 12th International Conference on Computer Vision. [24] Yue Lin, Rong Jin, Deng Cai, Shuicheng Yan, and Xuelong Li. 2013. Compressed Hashing. In 2013 IEEE Conference on Computer Vision and Pattern Recognition. [25] Wei Liu, Junfeng He, and Shih-Fu Chang. 2010. Large graph construction for scalable semi-supervised learning. In Proceedings of the 27th International Conference on Machine Learning. [26] Wei Liu, Cun Mu, Sanjiv Kumar, and Shih-Fu Chang. 2014. Discrete Graph Hashing. In Advances in Neural Information Processing Systems 27. [27] Wei Liu, Jun Wang, Rongrong Ji, Yu-Gang Jiang, and Shih-Fu Chang. 2012. Supervised hashing with kernels. In 2012 IEEE Conference on Computer Vision and Pattern Recognition. [28] Wei Liu, Jun Wang, Sanjiv Kumar, and Shih-Fu Chang. 2011. Hashing with Graphs. In Proceedings of the 28th International Conference on Machine Learning. [29] John Makhoul, Francis Kubala, Richard Schwartz, and Ralph Weischedel. 2000. Performance Measures For Information Extraction. In Proceedings of DARPA Broadcast News Workshop. [30] Marius Muja and David G. Lowe. 2014. Scalable Nearest Neighbor Algorithms for High Dimensional Data. IEEE Transactions on Pattern Analysis and Machine Intelligence 36, 11 (2014), 2227–2240. [31] Mohammad Norouzi and David J. Fleet. 2011. Minimal Loss Hashing for Compact Binary Codes. In Proceedings of the 28th International Conference on Machine Learning,ICML 2011. [32] Chanop Silpa-Anan and Richard Hartley. 2008. Optimised KD-trees for fast image descriptor matching. In Proceedings of the 2008 IEEE Conference on Computer Vision and Pattern Recognition. [33] Jun Wang, Sanjiv Kumar, and Shih-Fu Chang. 2010. Sequential Projection Learning for Hashing with Compact Codes. In Proceedings of the 27th International Conference on Machine Learning. [34] Henry S. Warren. 2012. Hacker’s Delight, Chapter 5. Addison-Wesley Professional. A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search [35] Yair Weiss, Rob Fergus, and Antonio Torralba. 2012. Multidimensional Spectral Hashing. In 12th European Conference on Computer Vision. [36] Yair Weiss, Antonio Torralba, and Robert Fergus. 2008. Spectral Hashing. In Advances in Neural Information Processing Systems 21, NIPS. [37] Bin Xu, Jiajun Bu, Yue Lin, Chun Chen, Xiaofei He, and Deng Cai. 2013. Harmonious Hashing. In Proceedings of the 23rd International Joint Conference on Artificial Intelligence. [38] Hao Xu, Jingdong Wang, Zhu Li, Gang Zeng, Shipeng Li, and Nenghai Yu. 2011. Complementary hashing for approximate nearest neighbor search. In IEEE International Conference on Computer Vision. [39] Dell Zhang, Jun Wang, Deng Cai, and Jinsong Lu. 2010. Self-taught hashing for fast similarity search. In Proceeding of the 33rd International ACM SIGIR Conference on Research and Development in Information Retrieval. [40] Kang Zhao, Hongtao Lu, and Jincheng Mei. 2014. Locality Preserving Hashing. In Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence. arXiv, February 18, 2018, Hangzhou, Zhejiang, China
1cs.CV
OptLayer - Practical Constrained Optimization for Deep Reinforcement Learning in the Real World arXiv:1709.07643v2 [cs.RO] 23 Feb 2018 Tu-Hoa Pham1 , Giovanni De Magistris1 and Ryuki Tachibana1 Abstract— While deep reinforcement learning techniques have recently produced considerable achievements on many decision-making problems, their use in robotics has largely been limited to simulated worlds or restricted motions, since unconstrained trial-and-error interactions in the real world can have undesirable consequences for the robot or its environment. To overcome such limitations, we propose a novel reinforcement learning architecture, OptLayer, that takes as inputs possibly unsafe actions predicted by a neural network and outputs the closest actions that satisfy chosen constraints. While learning control policies often requires carefully crafted rewards and penalties while exploring the range of possible actions, OptLayer ensures that only safe actions are actually executed and unsafe predictions are penalized during training. We demonstrate the effectiveness of our approach on robot reaching tasks, both simulated and in the real world. I. I NTRODUCTION Over the recent years, the rise of deep neural network architectures in multiple fields of science and engineering has come together with considerable achievements for deep reinforcement learning techniques, sometimes outperforming humans on high-dimensional problems such as Atari games [1] and Go [2]. The robotics field has also greatly benefitted from these advances, yielding impressive results on tasks otherwise difficult to model explicitly, e.g., manipulation from visual inputs [3] and robust locomotion on challenging terrains [4]. While visual understanding neural network pipelines can often be trained in an end-to-end fashion (e.g., inferring object poses directly from raw pixel information), robot motion is typically initialized in the real world from (partially) supervised learning, which supposes the availability of ground-truth data or expert demonstrations. In contrast, the discovery of robot motion behaviours from scratch is often limited to simulation due to time (to learn basic task features), safety (e.g., collisions), and other experimental constraints (e.g., resetting knocked-down obstacles to a chosen state). However, transferring control policies learned in simulation to reality remains a challenge, in particular due to model uncertainties (kinodynamics) [5] and variability between simulated and real observations [6]. Enabling deep reinforcement learning in the real world is thus crucial for tasks that cannot be learned in simulation and for which expert policies are not known. In this paper, we propose a practical method to constrain neural network predictions to lie within a domain defined by safety constraints (see Fig. 1). Our work capitalizes on the state of the art in multiple areas of robotic control, optimization and reinforcement learning (Section II). We summarize 1 IBM Research AI, Tokyo, Japan. (a) Unconstrained action predictions can be dangerous to run on a real robot. (b) Explicit constraints can be incorporated to guarantee safe robot actions. Fig. 1. 3D reaching with obstacle avoidance using reinforcement learning. the necessary technical background and important challenges for real-world reinforcement learning (Section III), in particular a strong dependency on the chosen reward structure. • We augment a neural network architecture with a constrained optimization layer, OptLayer, that enforces arbitrary constraints on the predicted robot actions (Section IV). OptLayer is fully differentiable, enabling future end-to-end learning under safety constraints. • We tackle the problem of safe reinforcement learning using OptLayer and propose a reward strategy that is simple to implement and readily compatible with existing policy optimization techniques (Section V). • Our approach makes exploration during training more efficient while always satisfying safety constraints. We demonstrate its effectiveness by learning 3D reaching with collision avoidance on an industrial manipulator, on tasks of increasing difficulty, both simulated and in the real world (Section VI). Finally, we discuss challenges we encountered, current limitations and future extensions of our work (Section VII). II. R ELATED W ORK Robot motion is traditionally achieved by solving a multiparameter optimization problem yielding a sequence of states achieving a given task (e.g., track a given end effector trajectory) while respecting constraints motivated by safety and performance (e.g., joint limits). When constraints and task objectives are respectively linear and quadratic in the robot variables, these problems can be formulated and solved as quadratic programs (QP) [7]. Still, the resulting control policy can be unsatisfactory due to uncertainties on the robot kinodynamic model and sensor feedback (e.g., during locomotion, errors on center of mass coordinates can invalidate robot stability constraints), the chosen constraints being too conservative (making the motion suboptimal), or the task dynamics being non-trivial to model (e.g., finding the optimal trajectory to follow). Reinforcement learning (RL) techniques have demonstrated impressive results in this context. In [1], convolutional neural networks (CNN) were trained to play Atari games using only pixels and game score as inputs, achieving humanlevel performance on multiple games without need for expert demonstrations or feature engineering. A guided policy search (GPS) method was proposed by [3] to predict motor torques for a PR2 robot from image and joint state inputs only, training the policy in a data-efficient manner using supervised learning (SL) and local controllers trained by RL. An overview and benchmark of modern RL algorithms for continuous control (e.g., for robotic applications) was presented in [8], along with valuable reference implementations released to the community. We thus chose to build our work upon the top-performing benchmarked algorithm, Trust-Region Policy Optimization (TRPO) [9], which we detail further in Section III-A. TRPO was notably used recently to discover dynamic locomotion behaviours such as crouching and jumping on simulated humanoids [4]. Applied in the real world, RL techniques require special attention to guarantee safe exploration during training, and safe execution at inference time. A thorough survey of safe RL was presented in [10], which classified techniques into two categories: those incorporating safety terms in the policy optimality criterion, and those modifying the exploration process using additional information. In particular, our work was inspired by [11], which proposed a new trust region method, Constrained Policy Optimization (CPO), to guarantee policy performance improvement with near-constraint satisfaction at each iteration, along with important results on convergence speed and worst-case constraint violation. Still, real-world robot experiments may require exact constraint satisfaction, though possibly at the cost of less (time and data) efficient training. Alternatively, constraints can be enforced on the neural network predictions directly: a priori, e.g., by placing limits on the range of possible actions before sampling [12]; or a posteriori, e.g., by ensuring that predictions do not send the robot’s end effector outside of a chosen bounding sphere, reprojecting it inside if needed [13]. Our approach extends these ideas by reshaping the range of possible actions at each time step to ensure that resulting predictions always satisfy the exact safety constraints (not approximations thereof), during both training and inference. Our work also benefitted from [14], which proposed a neural network architecture to solve QP optimization problems in the context of SL, with applications to Sudoku puzzles. We extend this research towards RL for real-world systems with physical constraints. III. BACKGROUND AND M OTIVATION In this section, we summarize the RL algorithm our work builds upon, TRPO (Section III-A). We then consider the motivating example of a 2D reaching task (Section III-B) and illustrate the limitations of RL without explicit consideration of constraints (Section III-C), namely that learning a safe policy involves unsafe actions in the first place, with great sensitivity to the associated reward and cost structure. A. Reinforcement Learning Nomenclature We consider an infinite-horizon discounted Markov Decision Process (MDP) characterized by a tuple (S, A, P, R, ρ0 , γ), with S the set of states (e.g., robot joint configurations), A the set of actions (e.g., motor commands), P : S × A × S → [0, 1] the transition probability distribution to go from one state to another by taking a specific action, R : S × A × S → R the function of associated rewards, ρ0 : S → [0, 1] the initial state probability distribution, γ ∈ [0, 1) a discount factor. Denoting by π : S × A → [0, 1] a stochastic policy, the objective is typically to maximize the discounted  ∞ P i γ R(si , ai , si+1 ) , with expected return η(π) = E τ i=0 τ = (s0 , a0 , . . . ) a state-action trajectory, s0 ∼ ρ0 , ai ∼ π(·|si ) and si+1 ∼ P (·|si , ai ). With the same notations, we denote by Qπ the state-action value function, Vπ the value function and Aπ the advantage function: "∞ # X l γ R(si+l , ai+l , si+l+1 ) , Qπ (si , ai ) = E si+1 ,ai+1 ,... l=0 (1) " Vπ (si ) = E ai ,si+1 ,... ∞ X # γ l R(si+l , ai+l , si+l+1 ) , (2) l=0 Aπ (s, a) = Qπ (s, a) − Vπ (s). (3) We consider in particular the case of a policy πθ parameterized by a vector θ (e.g., neural network parameters). In TRPO, the policy πθk is iteratively refined by solving the following optimization problem at each iteration k:   πθ (a|s) Aπθk (s, a) (4) θk+1 = argmax E s∼ρθk ,a∼πθk πθk (a|s) θ such that with ρθ (s) = E [DKL (πθk (·|s)||πθ (·|s))] ≤ δKL , s∼ρθk ∞ P i=0 (5) γ i P (si = s) the discounted state-visitation frequencies when actions are chosen according to πθ , DKL the Kullback-Leibler divergence (measuring how much two probability distributions differ from each other), and δKL a step size controlling how much the policy is allowed to change at each iteration. Eq. (4) is then solved numerically by sampling state-action trajectories following πθk and averaging over samples. Our work builds on top of the OpenAI Baselines reference implementation for TRPO1 , in which a neural network N predicts state values jointly with actions. In the rest of the paper, we refer to it as a procedure U PDATE N ETWORK (N , (si , ai , ri , vi )i ) that iteratively optimizes N from sequences of state-action-reward-value tuples (si , ai , ri , vi )i=0,...,N over finite horizon N . end θelbow effector forearm target upper arm θshoulder obstacle T YPE rdist rcoll rprox R EWARD −dT −20βcoll if collision else 0 2 if dT ≤ 3 cm else 0 (a) 2-DoF robot, target and obstacle. (b) 2D-reaching reward structure. Fig. 2. 2D reacher description and rewards, with dT the distance between target and end-effector and βcoll ∈ {1, 5, 10, 50} a penalization coefficient. B. Motivating Example We consider a 2-DoF robot with parallel revolute joints. The robot’s base link is rigidly linked to the world such that it evolves in a plane (x, y) perpendicular to the gravity vector −gz. Its two main links, upper arm and forearm, are of length 0.1 m. The task consists in reaching a target point with the robot’s end effector while avoiding a spherical obstacle, both on the plane (x, y). We denote by θ = (θshoulder , θelbow ) the robot’s joint angles, with θshoulder not limited and θelbow ∈ [−π, +π], and by θ̇, θ̈ its joint velocities and accelerations, respectively. We depict the 2D reacher environment, E2D , in Fig. 2a. Each episode is initialized as follows: 1) The robot is reset to the initial state θ = θ̇ = θ̈ = 0. 2) The target’s coordinates are randomly sampled following a uniform distribution of ±0.27 cm along x and y (possibly out of reach for the robot). 3) The obstacle is initialized following the same distribution. If it collides at initialization with the robot, its position is re-sampled until it is no more the case. We discretize time into N = 200 steps of duration ∆T = 0.01 s. The state vector si at step i, or time ti = i∆T , is: • pfa the 3D position of the forearm’s base, • θelbow the elbow joint angle, • θ̇ the joint velocities, • pee the 3D position of the end effector, • pt −pee the target position pt relative to the end effector, • po − pee the obstacle position po , also relative to pee . The robot is controlled in position by providing, at step i, the desired joint position at step i + 1. We define a zero-centered action ai as the joint step ∆θi = θi+1 − θi to perform between two consecutive time steps. Finally, executing ai in the environment yields three rewards, rdist (reward on low distance to target), rcoll (collision penalization), rprox (bonus on proximity to target), detailed in Fig. 2b. We denote by ri the total reward at step i. In order to assess the sensitivity of RL to the reward structure, we parameterize the collision reward rcoll with a coefficient βcoll ∈ {1, 5, 10, 50}. C. Preliminary Results We implement the environment E2D within the OpenAI Gym and Roboschool framework [15], which provides a unified interface to train and test neural network policies. 1 https://github.com/openai/baselines We use the physics engine within Roboschool to monitor external collisions, between any robot link and the obstacle, and auto-collisions, between the end effector and the base. Throughout this paper, we take as neural network N a simple multilayer perceptron (MLP) with two hidden layers of size 32 each. At each step i, the environment produces a state vector si , which is fed into N to produce an action and value pair ai , vi . Executing ai in E2D results in a reward ri and an updated state si+1 . We construct such sequences (si , ai , ri , vi )i=0,...,N over episodes of up to N = 200 timesteps, interrupted in case of collision. On a 8-core computer, we train N on four instances of E2D in parallel, with the TRPO procedure U PDATE N ETWORK of Section IIIA. We report the evolution of the reward over 15000 episodes of training, for four values of βcoll , along with the cumulated number of collisions in Fig. 3. We observe the following: • The reward evolution throughout training is greatly dependent on the collision penalization weight. • With βcoll = 1, the low penalty associated to collisions rcoll = −20 results in collision avoidance never being learnt. The optimal strategy consists in quickly going to the target to get the proximity reward rprox and possibly hitting the obstacle to start a new episode. • Conversely, with βcoll = 50, the large penalty rcoll = −1000 results in fewer collisions but discourages exploration. The optimal strategy then consists in staying in the vicinity of the start pose and ignoring further targets. • βcoll = 5 and 10 (rcoll = −100 and −200, respectively) are comparable in terms of rewards, but the latter results in half the number of collisions. This confirms the importance of carefully crafting the reward structure. These results show that, without explicitly consideration of safety constraints during RL, it is difficult to learn a safe policy without violating such constraints many times. Overall, while we believe it is ultimately possible to design a reward structure that efficiently decreases collisions over time (e.g., empirically or by inverse reinforcement learning [16]), for the sake of RL in the real world, it is crucial to be able to learn to satisfy constraints without ever violating them. IV. C ONSTRAINED O PTIMIZATION L AYER A. OptLayer Architecture With x a vector of nx variables to optimize, we consider quadratic programs (QP) of the form: 1 T x Px + qT x 2 such that Gx ≤ h min x and Ax = b. (6) (7) (8) Eq. (6) is a quadratic objective in x, with P a square matrix and q a vector of respective size nx × nx and nx ; Eq (7) a set of nin linear inequalities, with G and h of respective size nin × nx and nin ; and Eq (8) a set of neq linear equalities, with A and b of respective size neq × nx and neq . Our goal is to ensure that the action coll Cumulated collisions [10] Reward [100] 4 =1 coll 4 =5 coll 4 = 10 2 2 2 2 0 0 0 0 2 2 2 2 4 4 4 4 6 6 6 6 0 10000 100 0 10000 20 50 0 10000 10 0 0 10000 Episode 0 0 Episode reward 10000 Episode = 50 0 10000 0 10000 Episode care is given to constraint matrices, which for robotic applications can be constant or affine in si , require auxiliary state variables, or activate only under particular conditions. Although only inequality constraints appear in the following exposition, equality constraints are treated the same way. 1) Objective matrices: We minimize the (squared) L2 ei : distance between optimization variables x and prediction a 1 1 T 1 ei ||2 = xT x − a e a eTi x + a ei . min ||x − a x 2 2 2 i 0 0 10000 Episode Reward moving average Collision count θ̇min ≤ θ̇ ≤ θ̇max , Fig. 3. Reward and collision count for unconstrained 2D reaching task with collision penalization coefficient βcoll ∈ {1, 5, 10, 50}, averaged over three seeds. Moving average over 40 consecutive episode rewards. v Environment s Agent Neural network World Constraint parameters e a s OptLayer a∗ (a) Prediction-correction architecture. OptLayer: min 12 xT Px + qT x such that Gx ≤ h and Ax = b x c Compute constraint violation cost P, q, G, h, A, b ··· e a s Build constraint Init. matrices P,q,G optim. h,A,b var. Optim. iter. 1 ∆x0 ∆y0 ∆λ0 Optim. iter. n ∆µ0 + ··· ∆xn−1 ∆yn−1 ∆λn−1 ∆µn−1 + x0 , y0 , λ0 , µ0 x1 , y1 , λ1 , µ1 xn−1 , yn−1 , λn−1 , µn−1 xn , yn , λn , µn (b) OptLayer computes the safe action a∗ that is closest to neural network e, while quantifying how much the latter violates safety constraints. prediction a Fig. 4. OptLayer constrained optimization pipeline. at predicted by a neural network N satisfies constraints such as Eqs. (7) and (8). In the following, we denote by ei the action predicted by the neural network N based on a the current state si . We propose a constrained optimization layer, OptLayer, that computes the action a∗i that is closest ei while also satisfying constraints depending on si . We to a depict the overall architecture in Fig. 4a. While multiple solutions are already available for solving QPs alone (as a forward pass), end-to-end neural network training requires a backward pass, in particular computing the gradients of the outputs with respect to the input parameters. We thus construct objective and constraint matrices as differentiable ei (Section IVexpressions of OptLayer’s inputs si and a B). We then solve the QP with an interior point method implemented as fully differentiable layers (Section IV-C). B. Quadratic Program Initialization Our first goal is to construct objective and constraint ei and si . Special matrices as differentiable expressions of a (11) Eq (11) thus defines a set of constraint matrices Gcst = [Inx , −Inx ]T and hcst = [∆T θ̇max , −∆T θ̇min ]T that are constant throughout the robot’s motion. 3) Constraint matrices affine in the state vector: Consider now joint position limits θmin , θmax : θmin ≤ θ ≤ θmax . Select a∗ a∗ = xn ··· (10) with θ̇min , θ̇max velocity limits specified by the manufacturer (typically, θ̇min = −θ̇max ). At step i + 1, approximating joint velocities θ̇i+1 with ∆θi /∆T yields the following inequalities on action hypothesis x = ∆θi , following Eq. (7): [Inx ]x ≤ [∆T θ̇max ] and [−Inx ]x ≤ [−∆T θ̇min ]. c e a (9) eTi a ei does not depend on x, it does not affect the Since a optimum. Eq. (9) can thus be written as Eq. (6), with P = Inx the identity matrix of size nx × nx and q = −e ai . 2) Constant constraint matrices: In general, the constraints that affect a robot can be static or depend on its state. For the former, consider for example joint velocity limits: 5 10 0 coll 4 (12) In this case, the range of possible actions depends on the current joint positions. Since θi+1 = θi + x, we have: [Inx ]x ≤ [θmax − θi ] and [−Inx ]x ≤ [θi − θmin ]. (13) Since θi is a member of the state vector si , we can construct a selection matrix Hθ (with only 0 and ±1) such that [−θi , θi ]T = Hθ si . Eq. (13) defines a set of constraint matrices that are constant or affine in si : Gaff = [Inx , −Inx ]T and haff = Hθ si + [θmax , −θmin ]T . 4) Auxiliary state parameters: In some cases, constraint matrices may not be formulated as a simple function of si . Consider for example limits τmin , τmax on joint torques τ: τmin ≤ τ ≤ τmax . (14) With q, q̇, q̈ the robot’s generalized coordinates (constant base pose and joint angles θ), generalized velocities (zero base velocities 06 and joint velocities θ̇) and generalized accelerations (zero base accelerations 06 and joint accelerations θ̈), respectively, let H(q) be its mass matrix, C(q, q̇) the bias vector comprising Coriolis, centrifugal and gravitational forces, and Fbase the 6-element vector of the external forces and torques exerted at the robot’s (fixed) base. In the absence of other contact forces, the equations of motion are then:   Fbase H(q)q̈ + C(q, q̇) = . (15) τ The first 6 rows of Eq. (15) allow the computation of Fbase . We take Hτ (q) and Cτ (q, q̇) as the rows indexed 7 and onwards in H(q) and C(q, q̇), respectively, such that:   06 τ = Hτ (q)q̈ + Cτ (q, q̇), with q̈ = . (16) θ̈ At step i, estimating θ̈i by forward difference θ̈i = (θ̇i+1 − θ̇i )/∆T and θ̇i+1 = (θi+1 − θi )/∆T = x/∆T yields: θ̇i x − . 2 ∆T ∆T Combining Eqs. (16) and (17) makes τi affine in x:     Hτ (qi ) 06 Hτ (qi ) 06 τi = + C (q, q̇) − . τ x θ̇i ∆T 2 ∆T θ̈i = (17) (18) Since Hτ (qi ) and Cτ (qi , q̇i ) can not be expressed as a trivial function (e.g., linear) of si in its current form, we adjust the environment E to compute them internally and append them to si . Explicitly, we compute Hτ (qi ) and Cτ (qi , q̇i ) from the robot’s joint states and physical parameters using the KDL library [17] and store their elements as additional elements of si . The joint torque constraints of Eq. (14) can then be expressed following Eq. (7), with constraint matrices Gaux and haux assembled from si (extended) directly. 5) Conditional constraint matrices: Finally, some constraints may be active only under some conditions. We consider the collision avoidance constraints of [18]. We denote by Ll a convex object associated to a robot link l, pl the closest point between Ll and the environment, dl and nl the corresponding distance and unit vector, oriented towards pl . If dl is smaller than a threshold dM , named influence distance, then the following constraint is enabled: −ξ dl − dm ≤ d˙l , dM − dm (19) with d˙l the distance velocity, dm a threshold security distance, and ξ a positive velocity damping coefficient. Intuitively, Eq. (19) ensures that the distance dl between the robot and its environment cannot decrease faster than a chosen rate while dm ≤ dl ≤ dM , and that dl strictly increases if dl < dm . Eq. (19) can be equivalently written as a constraint on q̇, with J(q, pl ) the Jacobian matrix of Ll at pl when obstacles are static (otherwise it suffices to adjust d˙l with their velocities):   dl − dm −ξ ≤ nTl J(q, pl ) q̇. (20) dM − dm Similarly to Section IV-B.4, the state vector si can be extended with the elements of J(q, pl )T nl to form constraint matrices Gcond and hcond . We also extend si with dl and denote by Hdl the selection matrix such that Hdl si = dl . With htest = [dM ] − Hdl si , conditional constraints and their activation can be expressed following: If {0 ≤ htest } , then enable {Gcond x ≤ hcond } . (21) Note that activation condition {0 ≤ htest } can only depend on state si , the action x being optimized subsequently. C. Quadratic Program Solving 1) Assembling constraint matrices for batch solving: Using the notations of Section IV-B, we consider first a set of individual constraint matrices that are always active: Gcst , hcst , Gaff , haff , Gaux , haux . We concatenate them into base constraint matrices Gbase = [Gcst , Gaff , Gaux ]T and hbase = [hcst , haff , haux ]T to be considered at every step. When solving only one QP at a time, conditional constraints matrices Gcond , hcond can be appended to the complete constraint matrices G, h of Eq. (7) only when active, i.e.: ( T G = [Gbase , Gcond ] If {0 ≤ htest } : , (22) T h = [hbase , hcond ] ( G = Gbase otherwise : . (23) h = hbase However, deep neural networks are commonly trained using mini-batches of multiple input-output pairs in parallel. A technical consequence of parallel computing is that all elements processed together must be the same size. With Gsub (resp. hsub ) a submatrix of Gbase (resp. hbase ) of size that of Gcond (resp. hcond ), we replace Eq. (23) with: ( T G = [Gbase , Gsub ] . (24) If not {0 ≤ htest } : T h = [hbase , hsub ] G and h being of constant size thus enables batch solving. 2) Iterative resolution: Provided objective and constraint matrices P, q, G, h, A, b, we implement the interior point method for solving QPs described in [7]. With x still denoting the variables to optimize, λ slack variables for the QP, µ and y dual variables respectively associated to the inequality and equality constraints, finding the optimum x∗ amounts to solving a sequence of linear systems. First:      x −q P GT AT G −Inin 0nin ,neq  µ =  h  . (25) y b A 0neq ,nin 0neq ,neq We then use the solution to Eq. (25) to set x0 = x, y0 = y, and initialize λ0 and µ0 depending on the value of µ. We thus obtain a starting point (x0 , λ0 , µ0 , y0 ). The QP is then solved iteratively. For (xk , λk , µk , yk ) at iteration k, with Λk = diag(λk ) and Mk = diag(µk ), update directions are computed by solving linear systems of the form [7]:    ∆xk P 0nin ,nin GT AT 0nin ,nx   Mk Λk 0nin ,neq   ∆λk  = dk , (26)  G Inin 0nin ,nin 0nin ,neq ∆µk  A 0neq ,nin 0neq ,nin 0neq ,neq ∆yk with dk a vector depending on the current iteration (xk , λk , µk , yk ) and QP matrices P, q, G, h, A, b. [14] showed that such problems could be efficiently solved on the GPU and released a public implementation using the PyTorch framework. In our custom implementation, we solved Eqs. (25) and (26) using linear system solvers provided within the Tensorflow framework. We iteratively update xk+1 = xk + ∆xk , λk+1 = λk + ∆λk , µk+1 = µk + 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: procedure B UILD T RAJ(E, N , O, constrained) S, V, R ← (), () . States, values, rewards e A∗ ← (), () A, . Predicted, optimal actions C ← () . Constraint violation costs s = E.reset(); end = false . Get initial state while not end do S.add(s) . Store current state e, v ← N (s) a . Predict action, value e) a∗ , c ← O(s, a . Constrain prediction e A.add(e a); V .add(v); A∗ .add(a∗ ); C.add(c) if constrained then s, r, end = E.do(a∗ ) . Respects constraints else s, r, end = E.do(e a) . Can violate constraints end if R.add(r) . Store reward end while e R, V, A∗ , C return S, A, end procedure Fig. 5. Build a training trajectory for network N and optimization layer O in environment E. If constrained = false, execute raw predictions. ∆µk , yk+1 = yk + ∆yk , for k = 0, . . . , kmax . While early stopping criteria can be employed for single QP solving, we take kmax constant for batch solving. Noting that the problems we solve typically converge in about 5 iterations, we empirically set kmax = 10. The final value for x is then e outputted as the action a∗ closest to the initial prediction a that satisfies all safety constraints. We depict the complete OptLayer pipeline in Fig. 4b. V. C ONSTRAINED R EINFORCEMENT L EARNING We propose a reward strategy that ensures that safety constraints are never violated throughout training and is readily compatible with existing RL methods, such as TRPO. A. Trajectory Sampling Recall from Section III-B that for unconstrained RL, we collect sequences of state-action-reward-value tuples ei , ri , vi )i=0,...,N by iteratively executing neural network (si , a e in the environment E. Having established that predictions a executing unconstrained actions can be dangerous in the real world, we use OptLayer to produce corrected actions a∗ and execute those instead in E. Additionally, given constraint matrices A, b, G, h, it is possible to quantify how much e violate those. We define equality unconstrained predictions a and inequality violation costs ceq and cin , respectively: ceq = ||Ae a − b||, (27) cin = || max(Ge a − h, 0nin )||. (28) From Eq. (27), ceq increases any time Ae a 6= b, element-wise. Similarly, from Eq (28), only elements such that Ge a > h contribute to cin by taking the element-wise maximum with zero. In practice, the rows of A, b (resp. G, h) can be scaled with an arbitrary non-zero (resp. positive) coefficient without changing the QP solution. We thus uniformize their individual contributions in ceq (resp. cin ) by normalization with the coefficients making each row of A (resp. G) of unit norm. We denote by c = ceq + cin the total constraint violation and compute it within OptLayer, together with a∗ . We define a procedure B UILD T RAJ in Fig. 5, that takes as inputs an environment E, a neural network N with OptLayer O, a flag constrained determining whether constrained or unconstrained actions are executed, and outputs states, raw predictions, rewards, values, corrected actions and ei , ri , vi , ai , ci )i . By setting constraint violation costs (si , a constrained = false, unconstrained actions are executed. We only do so in simulation. For real-world RL, we set constrained = true and only execute corrected actions. B. Policy Update Strategies With the procedure U PDATE N ETWORK described in Section III-A, we update the network N with sequences of the form (si , ai , ri , vi )i . We assess four ways to do so. 1) Unconstrained Predictions (UP): We run B UILD T RAJ with constrained = false and update N with ei , ri , vi )i ), as in SecU PDATE N ETWORK (N , (si , a tion III-B. This is our baseline for unconstrained RL. 2) Constrained - learn Predictions (CP): We run B UILD T RAJ with constrained = true and update ei , ri , vi )i ). Note N with U PDATE N ETWORK (N , (si , a that different state sequences are produced compared to UP, as corrected (not predicted) actions are executed. 3) Constrained - learn Corrections (CC): We run B UILD T RAJ with constrained = true and update N with U PDATE N ETWORK (N , (si , a∗i , ri , vi )i ). 4) Constrained - learn Predictions and Corrections (CPC): We run B UILD T RAJ with constrained = true and compute discounted rewards rei using constraint violation costs ci : rei = ri − ci . We first update N with raw predictions and discounted ei , rei , vi )i ). We rewards, U PDATE N ETWORK (N , (si , a update N a second time, using corrected actions and non-discounted rewards from initial sampling: U PDATE N ETWORK (N , (si , a∗i , ri , vi )i ). Intuitively, the CP policy update strategy amounts to considering OptLayer separately from the network and as part of the environment. In the CC strategy, we try to learn corrected actions directly, that can possibly greatly differ from initial neural network predictions. With CPC, we first associate raw predictions with discounted rewards before associating corrected actions with better rewards. VI. E XPERIMENTS We now illustrate the application of OptLayer in the context of RL to learn 3D reaching tasks using a 6-DoF industrial manipulator (Section VI-A), both in simulation (Section VI-B) and in the real world (Section VI-C). A. 3D Reaching with Obstacle Avoidance We perform our experiments on a 6-DoF industrial manipulator (Universal Robots UR5), equipped with a forcetorque sensor (Robotiq FT-150) and a gripper (Robotiq 3Finger Adaptive Robot Gripper). Although we do not use rprox (b) 3D-reaching reward structure. Fig. 6. 3D reacher environment, with dT the distance between target and gripper. In simulation, obstacle (red) and target (green) are floating spheres. In reality, we position them using handles with visual markers. the latter to actually grasp objects in our experiments, we keep it for the sake of realism, making it even more crucial to preserve safety. We control the robot by directly sending desired trajectories through the Robot Operating System (ROS) middleware, in joint space, without making use of any safety mechanism available. We define a 3D reacher environment, E3D , where the goal is to send consecutive joint commands to reach a target point in 3D while avoiding collisions with the environment and the robot itself. At any step i, joint states θi , θ̇i , θ̈i and actions ai = θi+1 − θi are now of size 6. The state vector si contains joint positions and velocities θi , θ̇i , end effector position taken at the center of the finger ends pee,i , and target, obstacle 3D positions relative to pee,i . Each episode is run following the same procedure as the 2D case, except for one adjustment, motivated by real-robot training. At the end of each episode, we reset the robot by replaying the trajectory in reverse. This is important since going back from end to initial pose by joint space interpolation can lead to collisions in between. We set the maximum number of time steps to N = 100, with duration ∆T = 0.1 s. We implement E3D to enable parallel training on multiple physical robots or simulation instances (Gazebo). B. Evaluating Policy Update Strategies To evaluate the UP, CP, CC and CPC policy update strategies, we initialize safety constraint matrices as described in Section IV. While we could formulate them manually based on the specifications of our robot system (UR5 robot, forcetorque sensor, gripper), it is in fact possible to partially automate their definition. We leverage the availability of standardized robot description formats (e.g., URDF, MJCF) often directly released by robot manufacturers. We thus automatically generate constraint matrices for joint limits by simply parsing kinematic and physical parameters from such files. For collision constraints, we manually construct convex hulls for every robot link to enable fast distance computation [19]. We then automate the formulation of collision constraint matrices from a set of distances to monitor, of the form {(gripper, forearm), (elbow, obstacle), . . . }. In total, we enforce 36 joint constraints (position, velocity, torque) and 20 collision constraints (robot, floating obstacle, environment). In simulation, we train neural networks on E3D using UP, CP, CC and CPC. For each policy update strategy, we report rewards and collisions throughout 7000 episodes in Fig. 7a. CP CC CPC 7.5 7.5 7.5 7.5 5.0 5.0 5.0 5.0 2.5 2.5 2.5 2.5 0.0 0.0 0.0 0.0 2.5 2.5 2.5 2.5 5.0 5.0 5.0 5.0 7.5 7.5 7.5 7.5 0 Cumulated collisions [10] (a) UR5 robot, obstacle and target. R EWARD −10dT −100 if collision else 0 10 if dT ≤ 5 cm else 0 Reward [100] UP T YPE rdist rcoll 5000 20 0 0 5000 5000 0.05 0.05 0.00 0.00 0.00 0.05 0 0 0.05 5000 Episode Episode reward 0.05 0 5000 Episode 0 5000 0 5000 Episode 0.05 0 5000 Episode Reward moving average Collision count (a) Reward and collision count. Moving average over 40 consecutive episodes. UP CP CC CPC T OTAL T IME 10 h19 min 12 h28 min 12 h22 min 12 h30 min S T /E P 88 100 100 100 T IME /S T 60 ms 64 ms 64 ms 64 ms E P TO R 5350 4950 N/A 3250 T IME TO R 7 h53 min 8 h49 min N/A 5 h48 min (b) Training time over 7000 episodes E P, steps S T, average reward R = 700. Fig. 7. Training results for 3D reaching with a 6-DoF robot, with policy update strategies UP (unconstrained) and CP, CC, CPC (constrained). We observe the following. First, unconstrained training with UC results in the robot successfully learning to reach (top left), but not in effectively learning collision avoidance (bottom left). In contrast, using OptLayer successfully ensures that collisions never happen for all policy update strategies. In particular, CP realizes rewards that are comparable to UP while never putting the robot at risk. Recall that in CP, from the perspective of the network, OptLayer can be seen as part of the environment, since the network is updated using e only. In constrast, updating the network raw predictions a using only corrected actions a∗ within CC does not enable learning to reach. We believe this is due to a∗ being initially e to be representative of the stochastic policy too far from a we optimize within TRPO, following Eq. (4). To do so e using successfully, CPC first updates the network with a discounted rewards prior to using a∗ . Subsequently, CPC appears to reach the performance of UP and CP with far fewer episodes. For example, a 700 average reward is reached in 5350 episodes by UP, 4950 by CP, 3250 by CPC. Detailed computation times (Fig. 7b) show that, though OptLayer induces some overhead (4 ms per step), the gain in terms of episodes makes CPC faster than UP even in terms of time. C. Real-World Experiments Having trained control policies in simulation, we execute them on a real robot. In these experiments, we position obstacle and target with respect to the robot using physical handles marked with 2D barcodes and tracked with an RGB camera. First, we consider a normal instance of E3D with Fig. 8. From left to right: static obstacle, moving target; moving obstacle, moving target; static obstacle, static target learning on a real robot. static target and obstacle. We execute the unconstrained policy learned with UP, NUP , to reach a target behind a balloon (Fig. 1a). While reaching was successful, the balloon was knocked down, illustrating that collision avoidance was not effectively learned. We do not use NUP further. In contrast, using the constrained policy learned with CPC, NCPC , results in successfully reaching the target while avoiding the balloon (Fig. 1b). As a qualitative example, we consider the case where the target is moving, carried by a toy train around a balloon (Fig. 8, left). Although NCPC was not explicitly trained on this task, the target was successfully followed without hitting the balloon. We then consider the case where the obstacle is also moving. Through the collision avoidance constraints of Eq. (19), we verify that bringing the obstacle close to the robot forces the latter to move away from it. These results illustrate that combining control policies learned on specific tasks with OptLayer can help adapt to changing conditions, while always maintaining safety. Finally, although position control policies can be learned in simulation for E3D , real-world training can be necessary, e.g., for tasks involving force control [20] and physical interaction with the environment [13]. We thus learn a simplified version of E3D , in which the real robot has to reach a static target without touching a static obstacle. For ease of visualization, we use a cake for the latter (Fig. 8, right), never hitting it over 6 h of training. Our approach can thus be used to learn a robot control policy from scratch without active human supervision. We present our complete experimental results in the supplementary material2 . VII. D ISCUSSION AND F UTURE W ORK Our work establishes that stochastic control policies can be efficiently coupled with constrained optimization to enable RL in the real world, where safety is crucial. Our method is simple to implement and readily compatible with existing RL techniques. We illustrated its application on neural network policies optimized with TRPO and demonstrated its effectiveness on a 3D reaching task with collision avoidance. Real-world robot experiments showed in particular that our system could accomodate reasonable changes in environment and task conditions, even without dedicated training. Still, our work is subject to some limitations in its current implementation. While we showed that our approach could speed up training by better exploiting unsafe predictions, 2 https://www.youtube.com/watch?v=7liBbk3VjWQ learning control policies from scratch may remain too timeconsuming even for simple tasks. We would thus like to investigate novel strategies for action space exploration tailored to robotics. Another limitation is that formalizing safety constraints can be difficult, e.g., under dynamic model uncertainties. Even when constraints are well defined, their activation may be contingent on the accuracy of other perception systems (e.g., vision). Our work would thus benefit from further advances in learning perception and control under uncertainties [5], [6]. Next, we intend to tackle other challenging robot learning and control tasks, such as bipedal locomotion and multi-agent collaboration. In the long term, we plan to extend our approach to problems besides robotics, such as decision-making systems for finance or healthcare. R EFERENCES [1] 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, 2015. [2] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. Van Den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, et al., “Mastering the game of go with deep neural networks and tree search,” Nature, 2016. [3] S. Levine, C. Finn, T. Darrell, and P. Abbeel, “End-to-end training of deep visuomotor policies,” J. Mach. Learn. Res., 2016. [4] N. Heess, S. Sriram, J. Lemmon, J. Merel, G. Wayne, Y. Tassa, T. Erez, Z. Wang, A. Eslami, M. Riedmiller, et al., “Emergence of locomotion behaviours in rich environments,” arXiv, 2017. [5] P. Christiano, Z. Shah, I. Mordatch, J. Schneider, T. Blackwell, J. Tobin, P. Abbeel, and W. Zaremba, “Transfer from simulation to real world through learning deep inverse dynamics model,” arXiv, 2016. [6] J. Tobin, R. Fong, A. Ray, J. Schneider, W. Zaremba, and P. Abbeel, “Domain randomization for transferring deep neural networks from simulation to the real world,” in Proc. IEEE-RSJ Int. Conf. Intell. Robot. Syst., 2017. [7] J. Mattingley and S. Boyd, “Cvxgen: A code generator for embedded convex optimization,” Optimization and Engineering, 2012. [8] Y. Duan, X. Chen, R. Houthooft, J. Schulman, and P. Abbeel, “Benchmarking deep reinforcement learning for continuous control,” in Proc. Int. Conf. Mach. Learn., 2016. [9] J. Schulman, S. Levine, P. Abbeel, M. Jordan, and P. Moritz, “Trust region policy optimization,” in Proc. Int. Conf. Mach. Learn., 2015. [10] J. Garcıa and F. Fernández, “A comprehensive survey on safe reinforcement learning,” J. Mach. Learn. Res., 2015. [11] J. Achiam, D. Held, A. Tamar, and P. Abbeel, “Constrained policy optimization,” in Proc. Int. Conf. Mach. Learn., 2017. [12] Y. F. Chen, M. Liu, M. Everett, and J. P. How, “Decentralized noncommunicating multiagent collision avoidance with deep reinforcement learning,” in Proc. IEEE Int. Conf. Robot. Autom., 2017. [13] S. Gu, E. Holly, T. Lillicrap, and S. Levine, “Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates,” in Proc. IEEE Int. Conf. Robot. Autom., 2017. [14] B. Amos and J. Z. Kolter, “Optnet: Differentiable optimization as a layer in neural networks,” in Proc. Int. Conf. Mach. Learn., 2017. [15] G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba, “Openai gym,” arXiv, 2016. [16] C. Finn, T. Yu, J. Fu, P. Abbeel, and S. Levine, “Generalizing skills with semi-supervised reinforcement learning,” in Proc. Int. Conf. Learn. Repr., 2017. [17] R. Smits, H. Bruyninckx, and E. Aertbeliën, “Kdl: Kinematics and dynamics library,” http://www.orocos.org/kdl, 2011. [18] F. Kanehiro, F. Lamiraux, O. Kanoun, E. Yoshida, and J.-P. Laumond, “A local collision avoidance method for non-strictly convex polyhedra,” Robot. Sci. Syst., 2008. [19] J. Pan, S. Chitta, and D. Manocha, “Fcl: A general purpose library for collision and proximity queries,” in Proc. IEEE Int. Conf. Robot. Autom., 2012. [20] T. Inoue, G. De Magistris, A. Munawar, T. Yokoya, and R. Tachibana, “Deep reinforcement learning for high precision assembly tasks,” in Proc. IEEE-RSJ Int. Conf. Intell. Robot. Syst., 2017.
2cs.AI
1 A Scalable Algorithm for Tracking an Unknown Number of Targets Using Multiple Sensors arXiv:1607.07647v1 [cs.DS] 26 Jul 2016 Florian Meyer, Member, IEEE, Paolo Braca, Member, IEEE, Peter Willett, Fellow, IEEE, and Franz Hlawatsch, Fellow, IEEE Abstract—We propose a method for tracking an unknown number of targets based on measurements provided by multiple sensors. Our method achieves low computational complexity and excellent scalability by running belief propagation on a suitably devised factor graph. A redundant formulation of data association uncertainty and the use of “augmented target states” including binary target indicators make it possible to exploit statistical independencies for a drastic reduction of complexity. An increase in the number of targets, sensors, or measurements leads to additional variable nodes in the factor graph but not to higher dimensions of the messages. As a consequence, the complexity of our method scales only quadratically in the number of targets, linearly in the number of sensors, and linearly in the number of measurements per sensors. The performance of the method compares well with that of previously proposed methods, including methods with a less favorable scaling behavior. In particular, our method can outperform multisensor versions of the probability hypothesis density (PHD) filter, the cardinalized PHD filter, and the multi-Bernoulli filter. Index Terms—Multitarget tracking, data association, belief propagation, message passing, factor graph, sensor network. I. I NTRODUCTION A. Multitarget Tracking Using Multiple Sensors Multitarget tracking is important in many applications including surveillance, autonomous driving, biomedical analytics, robotics, and oceanography [1]–[4]. Multitarget tracking aims at estimating the states—i.e., positions and possibly further parameters—of moving objects (targets) over time, based on measurements provided by sensing devices such as radar, sonar, or cameras [3]. Often information from multiple sensors is required to obtain satisfactory reliability and accuracy. The number of targets is usually unknown [4] and there is a data association uncertainty, i.e., an unknown association between measurements and targets [3]. Traditional methods for multitarget tracking model the target states as a random vector, i.e., an ordered list of random variables, and estimate them jointly with the random association variables. Examples are the joint probabilistic F. Meyer and P. Braca are with the NATO STO Centre for Maritime Research and Experimentation, La Spezia 19126, Italy (e-mail: {florian.meyer, paolo.braca}@cmre.nato.int). P. Willett is with the Department of ECE, University of Connecticut, Storrs, CT 06269, USA (e-mail: [email protected]). F. Hlawatsch is with the Institute of Telecommunications, TU Wien, 1040 Vienna, Austria (e-mail: [email protected]). This work was supported by the NATO Supreme Allied Command Transformation under projects SAC000601 and SAC000608, by the Naval Postgraduate School via ONR contract N00244-16-1-0017, by the Austrian Science Fund (FWF) under project P27370-N30, and by the National Sustainability Program of the European Commission under project LO1401. Parts of this paper were previously presented at Fusion 2015, Washington D.C., USA, July 2015 and at Fusion 2016, Heidelberg, Germany, July 2016. data association (JPDA) filter [3] and the multiple hypothesis density tracker (MHT) [5] and their extensions to multiple sensors [6]–[8]. Most of these methods assume that the number of targets is fixed and known, which is typically not true in practice. Because of this assumption, most traditional methods do not solve the track management problem, i.e., they are unable to create or cancel a track when a target appears or disappears, respectively. Track management extensions of the single-sensor JPDA filter and single-sensor MHT include the joint integrated probabilistic data association (JIPDA) filter [9], the joint integrated track splitting (JITS) filter [10], and the search-initialize-track filter [11]. A more recent class of multitarget tracking methods is based on finite set statistics (FISST). These methods calculate an approximation of the posterior multiobject probability density function (pdf), which is a joint distribution of the unordered target states. Typically, this quantity is then used to estimate a (possibly unordered) set of target states, which is described as a random finite set. Notable examples include the probability hypothesis density (PHD) filter [4], [12], [13], the cardinalized PHD (CPHD) filter [4], [14], [15], the Bernoulli filter [16], and the multi-Bernoulli (MB) filter [4], [17]. These FISSTbased tracking methods avoid the data association problem and implicitly perform track management. However, most existing methods are restricted to a single sensor. Even more recently, FISST-based multitarget tracking methods using labeled random finite sets have been proposed. These filters track an unknown number of targets that are identified by an (unobserved) label, and thus are able to estimate individual target tracks. In particular, the labeled multi-Bernoulli (LMB) filter [18] and the generalized LMB filter [19] achieve good estimation accuracy with a computational complexity that is similar to that of the CPHD filter. Alternatively, the track-oriented marginal Bernoulli/Poisson (TOMB/P) filter and the measurement-oriented marginal Bernoulli/Poisson (MOMB/P) filter proposed in [20] can estimate individual target tracks by integrating probabilistic data association into FISST-based sequential estimation; they are not based on labeled random finite sets. In the case of low-observable targets, i.e., targets leading to measurements with a low signal-to-noise ratio, reliable detection and tracking using a single sensor may be impossible. Theoretical results [21] suggest that the probability of detection can be strongly improved by increasing the number of sensors. Unfortunately, the computational complexity of optimum multisensor-multitarget tracking scales exponentially in the number of sensors, number of targets, and number of measurements per sensor [22]–[25]. Computationally feasible 2 multisensor-multitarget tracking methods include the iteratorcorrector (C)PHD or briefly IC-(C)PHD filter [26], the approximate product multisensor (C)PHD filter [27], and the partition-based multisensor (C)PHD (MS-(C)PHD) filter [23], [24]. These methods either use approximations of unknown fidelity and thus may not be able to fully realize the performance gains promised by multiple sensors, or they still scale poorly in relevant system parameters. A further disadvantage of the IC-(C)PHD filter is the strong dependence of its performance on the order in which the sensor measurements are processed [23], [24], [26], [27]. We note that the methods in [18]–[20] have been formulated only for a single sensor. B. The Proposed Method and Other Message Passing Methods Here, we propose a multisensor method for multitarget tracking with excellent scalability in the number of targets, number of sensors, and number of measurements per sensor. Our method allows for an unknown, time-varying number of targets (up to a specified maximally possible number of targets), i.e., it implicitly performs track management. These advantages are obtained by performing ordered estimation using belief propagation (BP) message passing, based on the sum-product algorithm [28]–[31]. Contrary to most FISSTbased methods, which calculate an approximation of the joint posterior multiobject pdf, BP provides accurate approximations of the marginal posterior pdfs for the individual targets. These are then used to perform Bayesian detection and estimation of the target states. The proposed BP method is derived by formulating a detection-estimation problem involving all the target states, existence variables, and association variables—which are modeled via random vectors—for all times, targets, and sensors. We use a redundant formulation of data association uncertainty in terms of both target-oriented and measurement-oriented association vectors [32], [33], and “augmented target states” that include binary target existence indicators. In contrast to FISST-based techniques, the joint augmented target state is ordered and has a fixed number of components. By this new formulation of the multisensor-multitarget detection-estimation problem, the statistical structure of the problem can be described by a factor graph, and the problem can be solved using loopy BP message passing. The advantage of the BP approach is that it exploits conditional statistical independencies for a drastic reduction of complexity [28]– [31]. We use a “detailed” factor graph in which each target state and each association variable is modeled as an individual node. Because this factor graph involves only low-dimensional variables, the resulting BP algorithm does not perform highdimensional operations. As a consequence, the complexity of our method scales only quadratically in the number of targets, linearly in the number of sensors, and linearly in the number of measurements per sensors (assuming a fixed number of message passing iterations). In addition, because our method uses particle-based calculations of all messages and beliefs, it is suited to general nonlinear, non-Gaussian measurement and state evolution models. Simulation results in a challenging scenario with intersecting targets demonstrate that our method exhibits excellent scalability and, at the same time, its performance compares well with that of previously proposed methods. This includes methods with a less favorable scaling behavior, namely, cubic in the number of measurements and in the number of targets. In particular, our method can outperform the IC-PHD and ICCPHD filters [26], the IC-MB filter [17], and the MS-PHD and MS-CPHD filters [23], [24]. Furthermore, its performance does not depend on an assumed order of processing the measurements of the different sensors. To the best of our knowledge, previously proposed BP methods for multisensor-multitarget tracking are limited to the method presented in [34] and our previous method in [35]. In [34], all target states and association variables at one time step are modeled as a joint state. This results in a tree-structured factor graph for which BP is exact but also in an unappealing scalability in the number of targets. In contrast, our method is based on a detailed (but loopy) factor graph that gives rise to low-dimensional messages and, in turn, results in the attractive scaling properties described above. Furthermore, both methods [34], [35] assume that the number of targets is known, whereas our present method is suited to an unknown number of targets. BP-based methods have also been proposed for the problems of data association alone or data association within a multitarget tracking scheme where the tracking itself is not done by BP. In particular, BP has been used in [32] and [33] to calculate approximate marginal association probabilities for a single sensor; in [36] to calculate exact marginal association probabilities for a single sensor; in [37] to calculate approximate association probabilities for multiple sensors with overlapping regions of interest; and in [20] to calculate approximate association probabilities for a single sensor. In contrast to these methods, our method uses BP for the overall multisensormultitarget tracking problem, of which data association is only a part. C. Paper Organization This paper is organized as follows. The system model and the multisensor-multitarget tracking problem are described in Section II, and a statistical formulation of the problem is presented in Section III. In Section IV, we briefly review the framework of factor graphs and BP message passing. Section V develops the proposed multisensor-multitarget tracking method. A particle-based implementation is presented in Section VI. Section VII proposes a scheme for choosing the birth and survival parameters. In Section VIII, relations of the proposed method to existing methods are discussed. Finally, simulation results in a scenario with intersecting targets are reported in Section IX. We note that this paper advances over the preliminary account of our method provided in our conference publication [38] by adding a particle-based implementation, a scheme for choosing birth and survival parameters, a detailed discussion of relations to existing methods, additional performance results, and an experimental verification of scaling properties. II. S YSTEM M ODEL AND P ROBLEM S TATEMENT In this section, we describe our system model and formulate the multitarget detection-estimation problem to be solved. 3 A. Potential Targets and Sensor Measurements We consider at most K targets with time-varying states. We describe this situation by introducing potential targets (PTs) k ∈ K , {1, . . . , K}. The existence of the PTs is modeled by binary variables rn,k ∈ {0, 1}, i.e., PT k exists at time n if and only if rn,k = 1. We also define the vector rn ,  T rn,1 · · · rn,K . The state xn,k of PT k at time n consists of the PT’s position and possibly further parameters. It will be convenient to formally consider a PT state xn,k also if rn,k = 0. We define the augmented state yn,k , [xTn,k rn,k ]T  T T T and the joint augmented state yn , yn,1 · · · yn,K . There are S sensors s ∈ S , {1, . . . , S} that produce “thresholded” measurements resulting from a detection process (as performed, e.g., by a radar or sonar device). Let (s) (s) (s) zn,m , m ∈ Mn , 1, . . . , Mn denote the measurements produced by sensor s at time n. We also define T the stacked (s)T (s)T (s) and zn , measurement vectors zn , zn,1 · · · z (s) n  (1)T  n,M (S)T T (1) (S) T zn · · · zn , and the vector mn , Mn · · · Mn . Because the measurements are thresholded, the multitarget tracking problem is complicated by a data association un(s) certainty: it is unknown which measurement zn,m originated from which PT k, and it is also possible that a measurement (s) zn,m did not originate from any PT (false alarm, clutter) or that a PT did not generate any measurement of sensor s (missed detection) [3], [4]. We make the usual assumption that at any time n, an existing target can generate at most one measurement at sensor s, and a measurement at sensor s can be generated by at most one existing target [3], [4]. The PTmeasurement associations at sensor s and time n can then be described by the target-oriented association variables  (s)  m ∈ Mn , at time n, PT k generates measure (s) ment m at sensor s an,k ,   at time n, PT k is not detected by 0, sensor s.  (s)  (1)T (s) (s) T We also define an , an,1 · · · an,K and an , an · · · (S)T T an . Following [32] and [33], we also use an alternative description of the PT-measurement associations in terms of the measurement-oriented association variables   k ∈ K, at time n, measurement m at   sensor s is generated by PT k (s) bn,m , (1)  0, at time n, measurement m at   sensor s is not generated by a PT.  (s) T  (1)T (s) (s) We also define bn , bn,1 · · · b and bn , bn · · · (s) n,Mn (S)T T (s) bn . The description in terms of bn is redundant in that (s) (s) bn can be derived from an and vice versa. B. Target Detection and State Estimation The problem considered is detection of the PTs k ∈ K (i.e., of the binary target existence variables rn,k ) and estimation of the target states xn,k from the past and present measurements of all the sensors s ∈ S, i.e., from the total T  measurement vector z , zT1 · · · zTn . In a Bayesian setting, this essentially amounts to calculating the marginal posterior existence probabilities p(rn,k = 1|z) and the marginal posterior pdfs f (xn,k |rn,k = 1, z). Target detection is performed by comparing p(rn,k = 1|z) to a threshold Pth , i.e., PT k is considered to exist if p(rn,k = 1|z) > Pth [39, Ch. 2]. For the detected targets k, an estimate of xn,k is then produced by the minimum mean-square error (MMSE) estimator [39, Ch. 4] Z x̂MMSE , xn,k f (xn,k |rn,k = 1, z)dxn,k . (2) n,k This Bayesian two-stage detection-estimation procedure is also employed by the JITS method [10], the JIPDA filter [9], and certain FISST-based algorithms, e.g., [4], [20]. The main problem to be solved now is to find a computationally feasible recursive (sequential) calculation of p(rn,k = 1|z) and f (xn,k |rn,k = 1, z). III. S TATISTICAL F ORMULATION Next, we present a statistical formulation of the system model and the multitarget detection-estimation problem. A. Target States While in our model a PT state xn,k is formally defined also if rn,k = 0, the states of nonexisting PTs are obviously irrelevant. Accordingly, all pdfs and BP messages defined for an augmented state, φ(yn,k ) = φ(xn,k , rn,k ), have the property that for rn,k = 0, φ(xn,k , 0) = φn,k fD (xn,k ), (3) where fD (xn,k ) is a “dummy pdf.” The form (3) must be consistent with a message multiplication operation (such as Equation (24) in Section IV), in the sense that the resulting message product can still be expressed as in (3). This implies that the dummy pdf fD (xn,k ) satisfies fD2 (xn,k ) = fD (xn,k ) for all values of xn,k . Because fD (xn,k ) must also integrate to one, it follows that fD (xn,k ) is 1 on an arbitrary support of area/volume 1 and 0 outside that support. Let Z φ(rn,k ) , φ(xn,k , rn,k )dxn,k . (4) We then have for rn,k = 0 Z Z φ(0) = φ(xn,k , 0)dxn,k = φn,k fD (xn,k )dxn,k = φn,k . (5) Furthermore, using (4) and (5) yields X Z φ(xn,k , rn,k )dxn,k rn,k ∈{0,1} = Z φ(xn,k , 0)dxn,k + Z φ(xn,k , 1)dxn,k = φn,k + φ(1). R P Hence, if rn,k ∈{0,1} φ(xn,k , rn,k )dxn,k = 1, i.e., if φ(xn,k , rn,k ) is a true pdf in the sense of being normalized, then φn,k + φ(1) = 1. In that case, φn,k = φ(0) can be 4 interpreted as a probability of nonexistence of PT k, i.e., of the event rn,k = 0, and φ(1) can be interpreted as a probability of existence of PT k, i.e., of the event rn,k = 1. The augmented target states yn,k = [xTn,k rn,k ]T are assumed to evolve independently according to Markovian dynamic models [3], [4], and at time n = 0, they are assumed statistically independent across k with prior pdfs f (y0,k ) = T  f (x0,k , r0,k ). Thus, the pdf of y , y0T · · · ynT factorizes as f (y) = K Y f (y0,k ) k=1 n Y f (yn′,k |yn′−1,k ). (6) assumption [3], [4] that given y, a, and m, the measurements (s) zn are conditionally independent across time n and sensor index s, the global likelihood function factorizes as n Y S Y f (z|y, a, m) = n′ =1 s=1 If PT k existed at time n − 1, i.e., rn−1,k = 1, then the probability that it still exists at time n, i.e., rn,k = 1, is given s , and if it still exists at time by the survival probability pn,k n, its state xn,k is distributed according to the state transition pdf f (xn,k |xn−1,k ). Thus, for rn−1,k = 1, we have ( s )fD (xn,k ), rn,k = 0 (1− pn,k f (xn,k , rn,k |xn−1,k , 1) = s pn,k f (xn,k |xn−1,k ), rn,k = 1. (8) b s A possible strategy for choosing pn,k , pn,k , and f b (xn,k ) is presented in Section VII. We note that our previous work in [35], which assumed that the number of targets is known, is a s special case of this setup that uses survival probabilities pn,k = b =0 1 (existing targets always survive), birth probabilities pn,k R(no targets are born), and initial prior pdfs f (x0,k , r0,k ) with f (x0,k , 1)dx0,k = 1 (at time n = 0, all targets exist with probability 1). B. Sensor Measurements An existing target k is detected by sensor s (in the sense (s) that the target generates a measurement zn,m at sensor s) with (s) probability Pd (xn,k ), which may depend on the target state xn,k . The number of false alarms at sensor s is modeled by a Poisson probability mass function (pmf) with mean µ(s), and the distribution of each false alarm measurement at sensor s (s)  is described by the pdf fFA zn,m [3], [4].  The dependence of the measurement vector z = zT1 · · · T  zTn on the numbers-of-measurements vector m , mT1 · · ·    T T mTn , the augmented state vector y = y0T · · · ynT , and the   T T association vector a , a1 · · · aTn is described by the global likelihood function f (z|y, a, m). With the commonly used (9) (s) Assuming in addition that the different measurements zn,m (s) at sensor s are conditionally independent given yn , an , and (s) Mn , we have the further factorization [3], [4] (s) Mn n′ =1 Here, the single-target augmented state transition pdf f (yn,k |yn−1,k ) = f (xn,k , rn,k |xn−1,k , rn−1,k ) is given as follows. If PT k did not exist at time n − 1, i.e., rn−1,k = 0, then the probability that it exists at time n, i.e., rn,k = 1, b is given by the birth probability pn,k , and if it does exist at time n, its state xn,k is distributed according to the birth pdf f b (xn,k ). Thus, for rn−1,k = 0, we have ( b (1− pn,k )fD (xn,k ), rn,k = 0 f (xn,k , rn,k |xn−1,k , 0) = b f b (xn,k ), rn,k = 1. pn,k (7) (s)  (s) (s) f zn′ yn′ , an′ , Mn′ . f z(s) n (s) yn , a(s) n , Mn  = Y fFA z(s) n,m m=1 !    (s) f z x n,k (s) Y n,an,k  . (10)  × (s) z f (s) FA (s) k∈D an ,rn (s) n,an,k targets detected at Here, Dan ,rn denotes the set of existing  (s) (s) sensor s and time n, i.e., Dan ,rn , k ∈ K : rn,k = 1, an,k 6= (s) (s) 0 . If zn is observed and thus fixed, Mn is fixed as well and (10) can be written as f z(s) n (s) yn , a(s) n , Mn  =C z(s) n K Y k=1  (s) , g xn,k , rn,k , an,k ; z(s) n (11) (s)  zn where C is a normalization factor that depends only on (s) (s) (s)  zn and g xn,k , rn,k , an,k ; zn is defined as   (s)   f zn,m xn,k (s) (s)  , an,k = m ∈ Mn  (s) (s)  = g xn,k , 1, an,k ; z(s) z f FA n,m n   (s) 1, a =0 n,k  (s) g xn,k , 0, an,k ; z(s) = 1. n (12) Inserting (11) into (9) yields f (z|y, a, m) = C(z) n Y S Y K Y n′ =1 s=1 k=1 (s) (s)  g xn′,k , rn′,k , an′,k ; zn′ , (13) where C(z) is a normalization factor that depends only on z. C. Joint Prior Distribution of Association Variables and Numbers of Measurements (s) (s) Under the assumption that given y, the an and the Mn are conditionally independent across n and s [3], [4], the joint prior pmf of the association vector a and the numbers-ofmeasurements vector m given y factorizes as p(a, m|y) = n Y S Y n′ =1 s=1  (s) (s) p an′ , Mn′ yn′ . (14) (s) Assuming a random permutation of the measurements zn,m , (s) m ∈ Mn at sensor s, with each permutation equally likely, it is shown in [3], [11] that 5 (s) p a(s) n , Mn yn = ψ a(s) n × e  (µ (s) (s) (s) Mn −|Dan ,rn | ) (s) Mn ! Y  (s) k′∈D / an ,rn Y (s) Pd (xn,k ) (s) k∈Dan ,rn  (s) (s)  1 an,k′ − rn,k′ Pd (xn,k′ ) , (15) ψ , ( (s) 1, otherwise, (16) =C Mn(s) K Y k=1 and 1(a) denotes the indicator function of the event a = 0 (i.e., 1(a) = 1 if a = 0 and 0 otherwise). Note that the factor (s)  ψ an enforces the exclusion assumptions stated in Section II-A, i.e., that each existing target can generate at most one measurement at sensor s and each measurement at sensor s can be generated by at most one target. We can express (15) as    (s) (s) ψ a(s) p a(s) n n , Mn yn = C Mn × K Y (s)  (s) h xn,k , rn,k , an,k ; Mn k=1 , (17) (s)  where C Mn is a normalization factor depending only on (s) (s) (s)  Mn and h xn,k , rn,k , an,k ; Mn is defined as (s)  (s) h xn,k , 1, an,k ; Mn  (s)  (s) (s)  Pd (xn,k ) , an,k ∈ Mn µ(s) =   (s) (s) 1− Pd (xn,k ), an,k = 0  (s)  (s) h xn,k , 0, an,k ; Mn(s) = 1 an,k . (18) (s) Using the measurement-oriented association vectors bn defined in (1) alongside with the target-oriented association (s) (s)  vectors an , the exclusion-enforcing function ψ an in (16) can be formally replaced by the function [32], [33] (s) ψ with Fig. 1. Factor graph representing ψ1 (x1 , x2 )ψ2 (x2 )ψ3 (x2 , x3 ). (s) 0, ∃k, k ′ ∈ K such that an,k = an,k′ 6= 0 (s) a(s) n , bn  = K M n Y Y k=1 m=1 Ψ  (s) an,k , b(s) n,m ,  (s) (s)  0, an,k = m, bn,m 6= k  (s) (s) (s) or bn,m = k, an,k 6= m Ψ an,k , b(s) n,m ,   1, otherwise. (19)  Using this redundant reformulation, and defining b , bT1 · · · T bTn , the prior pmf p(a, m|y) in (14) can be formally rewritten as n Y S Y  (s) (s) (s) (20) p(a, b, m|y) = p an′ , bn′ , Mn′ yn′ , n′ =1 s=1 with the single-sensor prior pmfs (cf. (17) and (19)) x3 ψ2 (s) (s) p a(s) yn n , bn , M n  ψ3 x2 ! where a(s) n ψ1 x1 −µ(s) h f (x|z) the factorization  (s) Mn Y (s) (s) Ψ xn,k , rn,k , an,k ; Mn m=1 ∝  (s) an,k , b(s) n,m . Thus, Equation (20) can be expressed as p(a, b, m|y) = C(m) n Y K S Y Y (s) n′ =1 s=1 k=1 (s) Mn′ × (s)  h xn′,k , rn′,k , an′,k ; Mn′ Y (s) (s)  Ψ an′,k , bn′,m , (21) m=1 where C(m) is a normalization factor depending only on m. The factorization in (21) constitutes an important basis for our development of the proposed BP method in Section V. IV. R EVIEW OF BP M ESSAGE PASSING We briefly review factor graphs and the generic BP message passing scheme, which constitute the main methodological basis of the proposed multisensor-multitarget tracking method. Consider the problem of estimating parameter vectors xk , k ∈ {1, . . . , K} from a measurement vector z. Bayesian estimation of xk relies on the posterior pdf f (xk |z) [40]. This pdf is a marginal pdf of the joint posterior pdf f (x|z), K where x = [xk ]k=1 ; however, direct marginalization of f (x|z) is usually infeasible. An efficient marginalization can be achieved if the posterior pdf f (x|z) factorizes, i.e., f (x|z) ∝ Q Y q=1  ψq x(q) . (22) Here, each factor argument x(q) comprises certain parameter vectors xk (each xk can appear in several x(q) ) and ∝ indicates equality up to a normalization factor. Note that for compactness, our notation does not indicate the dependence  of the factors ψq x(q) on z. The factorization structure (22) can be represented by a  T factor graph [31]. As an example, for x = xT1 xT2 xT2 , the factor graph representing the factorization f (x|z) ∝ ψ1 (x1 , x2 )ψ2 (x2 )ψ3 (x2 , x3 ) is shown in Fig. 1. In a factor graph, each parameter variable xk is represented by a variable node and each factor ψq (·) by a factor node (depicted in Fig. 1 by a circle and a square, respectively). Variable node “xk ” and factor node “ψq ” are adjacent, i.e., connected by an edge, if the variable xk is an argument of the factor ψq (·). Belief propagation (BP), also known as the sum-product algorithm [28], is based on a factor graph and aims at computing the marginal posterior pdfs f (xk |z) in an efficient 6 way. For each node, certain messages are calculated, each of which is passed to one of the adjacent nodes. For each variable node, the incoming and outgoing messages are functions of the corresponding variable. More specifically, consider a variable node “xk ” and an adjacent factor node “ψq ”, i.e., the variable xk is part of the argument x(q) of ψq x(q) . Then, the message passed from factor node “ψq ” to variable node “xk ” is given by Z Y ζψq →xk (xk ) = ψq x(q) η xk′ →ψq (xk′ ) dxk̄ , (23) k′6=k Q where k′6=k η xk′ →ψq (xk′ ) denotes the product of the messages passed to factor node “ψRq ” from all adjacent variable nodes except “xk ”, and . . . dxk̄ denotes integration with respect to all constituent vectors of x(q) except xk . For example, the message passed from factor node “ψ ” to variable node “x2 ” in Fig. 1 is ζψ1 →x2 (x2 ) = T  R 1 ψ1 (x1 , x2 )η x1 →ψ1 (x1 )dx1 ; note that x(1) = xT1 xT2 . The message η xk →ψq (xk ) passed from variable node “xk ” to factor node “ψq ” is given by the product of the messages passed to variable node “xk ” from all adjacent factor nodes except “ψq ”. For example, in Fig. 1, the message passed from variable node “x2 ” to factor node “ψ1 ” is η x2 →ψ1 (x2 ) = ζψ2 →x2 (x2 )ζψ3 →x2 (x2 ). Message passing is started at variable nodes with only one edge (which pass a constant message) and/or factor nodes with only one edge (which pass the corresponding factor). Note that BP can also be applied to factorizations involving discrete variables by replacing integration with summation in (23). Finally, for each variable node “xk ”, a belief f˜(xk ) is calculated as the product of all incoming messages (passed from all adjacent factor nodes) followed by a normalization R such that f˜(xk )dxk = 1. For example, in Fig. 1, f˜(x2 ) ∝ ζψ1 →x2 (x2 )ζψ2 →x2 (x2 )ζψ3 →x2 (x2 ). and the marginal posterior pdf f (xn,k |rn,k = 1, z) underlying MMSE state estimation (see (2)) can be obtained from f (xn,k , rn,k |z) according to A. Joint Posterior pdf and Factor Graph The marginal posterior pdf f (yn,k |z) = f (xn,k , rn,k |z) is a marginal density of the joint posterior pdf f (y, a, b|z), which involves all the augmented states, all the target-oriented and measurement-oriented association variables, and all the measurements of all sensors, at all times up to the current time n. In the following derivation of f (y, a, b|z), the measurements (s) z are observed and thus fixed, and consequently Mn and m are fixed as well. Then, using Bayes’ rule and the fact that a implies b, we obtain f (y, a, b|z) = f (y, a, b, m|z) ∝ f (z|y, a, b, m)f (y, a, b, m) = f (z|y, a, m) p(a, b, m|y)f (y). Inserting (6) for f (y), (13) for f (z|y, a, m), and (21) for p(a, b, m|y) then yields the final factorization f (y, a, b|z) ∝ K Y f (y0,k ) k=1 × S Y s=1 V. T HE P ROPOSED BP- BASED M ULTISENSOR M ULTITARGET T RACKING M ETHOD The marginal posterior existence probability p(rn,k = 1|z) underlying target detection as discussed in Section II-B can be obtained from the marginal posterior pdf of the augmented target state, f (yn,k |z) = f (xn,k , rn,k |z), according to Z p(rn,k = 1|z) = f (xn,k , rn,k = 1|z)dxn,k , (25) (26) An efficient approximate calculation of f (xn,k , rn,k |z) can be obtained by performing BP message passing on a factor graph that expresses the factorization of the joint posterior pdf involving all relevant parameters. This factor graph will be derived next. (24) If the factor graph is a tree, i.e., without loops, then the belief f˜(xk ) is exactly equal to the marginal posterior pdf f (xk |z). For factor graphs with loops, BP is applied in an iterative manner, and the beliefs f˜(xk ) are only approximations of the respective marginal posterior pdfs f (xk |z); these approximations have been observed to be very accurate in many applications [28]–[30]. In this iterative “loopy BP” scheme, there is no canonical order in which the messages should be calculated, and different orders may lead to different beliefs. The choice of an appropriate order of message calculation will be an important aspect in our development of the proposed method. f (xn,k , rn,k = 1|z) . p(rn,k = 1|z) f (xn,k |rn,k = 1, z) = with n Y f (yn′,k |yn′−1,k ) n′ =1 υ (s) (s)  yn′,k , an′,k ; zn′ (s) Mn′ Y (s) (s)  Ψ an′,k , bn′,m , m=1 (27)   (s) (s) , g xn,k , rn,k , an,k ; z(s) υ yn,k , an,k ; z(s) n n  (s) × h xn,k , rn,k , an,k ; Mn(s) . (28) This factorization can be represented graphically by a factor graph as explained in Section IV. This factor graph is depicted for one time step in Fig. 2; it provides the starting-point for our development of the proposed BP method. B. BP Method As discussed in Section IV, approximations f˜(yn,k ) of the marginal posterior pdfs f (yn,k |z) can be obtained in an efficient way by running iterative BP message passing [28], [30], [31] on the factor graph in Fig. 2. Since this factor graph is loopy, we have to decide on a specific order of message computation. We choose this order according to the following rules: (i) Messages are not sent backward in time1 [41]. (ii) 1 This is equivalent to the approximative assumption that the target states are conditionally independent given the past measurements, as is done in the derivation of the JPDA filter [3]. 7 = s=S f˜1 f1 γ1 α1 y1 α1 υ1 s=1 α1 γ1 υ1 Ψ1,1 β1 η1 ν1,1 ζ1,1 b1 a1 ζK,1 νM,1 Ψ1,M f˜K γK fK αK yK αK γK ΨK,1 υK αK υK βK ηK ν1,K ζ1,M aK νM,K bM ζK,M ΨK,M Z  (s) α(xn,k , 1) dxn,k υ xn,k , 1, an,k ; z(s) n (s)  + 1 an,k αn,k . (31) (s) (s)  In the last expression, we used υ xn,k , 0, an,k ; zn =  (s) 1 an,k , which follows from (28) with (12) and (18). 2) Iterative data association (this part of the BP method closely follows [32], [33], [42]). In iteration p ∈ {1, . . . , P }, the following calculations are performed for all (s) measurements m ∈ Mn : X  Y (p−1) (s)  (p) (s)  (s) νm→k an,k = ζk′ →m bn,m Ψ an,k , b(s) n,m (s) Fig. 2. Factor graph representing the factorization of the joint posterior pdf f (y, a, b|z) in (27), depicted for one time step. For simplicity, the time index n and sensor index s are omitted, and the following short notations (s) (s)  are used: fk , f (yn,k |yn−1,k ), υk , υ yn,k , an,k ; zn , f˜k , f˜(yn,k ), (s) (s)  (s)  (s)  Ψk,m , Ψ an,k , bn,m , αk , α(yn,k ), βk , β an,k , ηk , η an,k ,   (p) (s) (p) (s) γk , γ (s) (yn,k ), νm,k , νm→k an,k , and ζk,m , ζk→m bn,m . k′ ∈K\{k} bn,m and (32)  X  (p) (s)  (s) ζk→m b(s) β an,k Ψ an,k , b(s) n,m = n,m (s) an,k × Y (s) (p) (s)  νm′ →k an,k . (33) m′ ∈Mn \{m} Iterative message passing is only performed at each time step and at each sensor separately—i.e., in particular, for the loops connecting different sensors we only perform a single message passing iteration—and only for data association. With these rules, the generic BP rules for calculating messages and beliefs as summarized in Section IV yield the following BP message passing operations at time n. First, a prediction step is performed for all PTs k ∈ K, i.e., Z X α(xn,k , rn,k ) = f (xn,k , rn,k |xn−1,k , rn−1,k ) rn−1,k ∈{0,1} × f˜(xn−1,k , rn−1,k ) dxn−1,k . Here, f˜(xn−1,k , rn−1,k ) was calculated at the previous time n−1. Inserting (7) and (8) for f (xn,k , rn,k |xn−1,k , rn−1,k ), we obtain the following expressions of α(xn,k , rn,k ): for rn,k = 1, b s α(xn,k , 1) = pn,k f b (xn,k ) f˜n−1,k + pn,k Z × f (xn,k |xn−1,k )f˜(xn−1,k , 1) dxn−1,k , (29) P P P Here, is short for and (s) (s) (s) bn,m b ∈{0,...,K} an,k n,m P is short for a(s) ∈{0,...,M (s) } . The operations (32) and n n,k (33) constitute an iteration loop, which is initialized (for p = 0) by   X (s) (s)  (0) (34) β an,k Ψ an,k , b(s) ζk→m b(s) n,m . n,m = (s) an,k An efficient implementation of (32) and (33) is described in [42] and [33]. After the last iteration p = P , the (P ) (s)  (s) messages νm→k an,k , m ∈ Mn are multiplied, i.e., (s) Mn η (s)  an,k = Y m=1 (s)  (P ) νm→k an,k . (35) 3) Measurement update: X  (s)  (s) η an,k γ (s) (xn,k , 1) = υ xn,k , 1, an,k ; z(s) n (s) an,k  (s) (s) γn,k = η an,k = 0 . (36) Finally, beliefs f˜(yn,k ) = f˜(xn,k , rn,k ) approximating the marginal posterior pdfs f (yn,k |z) = f (xn,k , rn,k |z) are  s b f˜(xn−1,k , 1) dxn−1,k . obtained as the products f˜n−1,k + 1− pn,k αn,k = 1− pn,k (30) S Y 1 R ˜ f (xn,k , 1) = γ (s) (xn,k , 1) (37) α(xn,k , 1) We note Rthat f˜n−1,k = f˜(xn−1,k , 0)dxn−1,k and Cn,k s=1 αn,k = α(xn,k , 0)dxn,k (cf. (5)). Furthermore, since S ˜(xn,k , rn,k ) is normalized, so is α(xn,k , rn,k ), i.e., Y fP (s) R ˜n,k = 1 αn,k f γn,k , (38) α(x , r )dx = 1. Thus, we have α = n,k n,k n,k n,k C rn,k ∈{0,1} n,k R s=1 1 − α(xn,k , 1)dxn,k . After the prediction step, the following steps are performed with the normalization constant Z for all PTs k ∈ K and all sensors s ∈ S in parallel: S S Y Y (s) (s) C = α(x , 1) γ (x , 1)dx + α γn,k . n,k n,k n,k n,k n,k 1) Measurement evaluation: s=1 s=1 X Z (39)  (s)  (s) (s) β an,k = υ xn,k , rn,k , an,k ; zn 2 Note that fD (xn,k ) = fD (xn,k ) (cf. Section III-A) was used to rn,k ∈{0,1} × α(xn,k , rn,k ) dxn,k obtain (38). Because the belief f˜(xn,k , 1) in (37) approximates and for rn,k = 0, Z  8 (j)  (j) x̄n−1,k , w̄n−1,k  Prediction step maps (j)  (j) x̄n−1,k , w̄n−1,k J ∼ f˜(yn−1,k ), j=1  J ∼ f˜(yn−1,k ) j=1 k ∈ K (from the previous time step n−1) to  (j) α(j)  J +I ∼ j=1 xn,k , wn,k α(yn,k ), k ∈ K (see Section VI-A) For all sensors s: (s)  Particle-based measurement evaluation provides β̃ an,k , k ∈ K (see (42))  (s) (s)  • Iterative data association calculates η̃ a n,k from β̃ an,k , k ∈ K (see (32)–(35)) •  (j) (j)  J +I Importance sampling calculates xn,k , wn,k j=1 ∼ f˜(yn,k ), k ∈ K from  (j) α(j)  J +I (s)  xn,k , wn,k ∼ α(yn,k ) and η̃ an,k , s ∈ S (see Section VI-C) j=1 The quantities pen,k and x̂n,k are determined  (j) (j)  J +I from xn,k , wn,k j=1 ∼ f˜(yn,k ), k ∈ K (see (45) and (46), respectively)  (j) (j)  J +I Resampling maps xn,k , wn,k j=1 ∼ f˜(yn,k ) to  (j) (j)  J x̄n,k , w̄n,k j=1 ∼ f˜(yn,k ), k ∈ K (see Section VI-D)  pen,k , x̂n,k , k ∈ K (j) (j)  J x̄n,k , w̄n,k j=1 ∼ f˜(yn,k ), k ∈ K (for processing at the next time step n + 1)  Fig. 3. Flowchart of a particle-based implementation of the proposed BP method. The symbol ∼ expresses the fact that a set of particles and weights represents a certain distribution. f (xn,k , rn,k = 1|z), it can be substituted for f (xn,k , rn,k = 1|z) in (25) and (26), thus providing the basis for Bayesian target detection and state estimation as discussed in Section II-B. A particle-based implementation of the above BP method that avoids the explicit evaluation of integrals and message products will be presented in Section VI. The “data association” iteration loop (32)–(35) involves solely messages related to discrete random variables. Being based on loopy BP, it does not perform an exact marginalization [28], [30], [31]. However, its high accuracy has been demonstrated numerically [32], [33] (see also Section IX-B), and its convergence has been proven [33], [42]. C. Scalability The main advantage of the BP message passing method described in Section V-B is its scalability. Assuming a fixed number P of message passing iterations, the computational complexity of calculating the (approximate) marginal posterior pdfs of all the target states is only linear in the number of sensors S (see (37), (38)). Moreover, the complexity of the operations (31)–(36) performed for a given sensor s ∈ S (s) (s) scales as O KMn , where Mn increases linearly with the number of PTs K and with the number of false alarms. Thus, the overall complexity of our algorithm scales linearly in the number of sensors and quadratically in the number of PTs. Note that in practical implementations, measurement gating [3] can be used to further improve scalability. Such favorable scaling is a consequence of the “detailed” factorization (27). This factorization, in turn, is due to the redundant formulation of the joint state-association estimation task in terms of both target-related and measurement-related association variables as described in Sections II-A and III-C. Using this factorization, an increase in the number of PTs, the number of sensors, or the number of measurements leads to additional variable nodes in the factor graph (see Fig. 2) but not to higher dimensions of the messages passed between the nodes. The scalability of the proposed algorithm will be further analyzed in Section IX-C. VI. PARTICLE -BASED I MPLEMENTATION For general nonlinear and non-Gaussian measurement and state evolution models, the integrals in (2), (29), (30), and (31) as well as the message products in (37) and (38) typically cannot be evaluated in closed form and are computationally infeasible. Therefore, we next present an approximate particlebased implementation of these operations. In this implementation, each belief f˜(xn,k , rn,k ) is represented by a set of  (j) (j)  J particles and corresponding weights x̄n,k , w̄n,k j=1 . More  (j) (j)  J specifically, f˜(xn,k , 1) is represented by x̄n,k , w̄n,k j=1 , and f˜(xn,k , 0) is given implicitly by the normalization propR erty of f˜(xn,k , rn,k ), i.e., f˜(xn,k , 0) = 1 − f˜(xn,k , 1)dxn,k . Contrary to conventional particle filtering [43], [44], the parti(j) cle weights w̄n,k , j ∈ {1, . . . , J} do not sum to one; instead, e pn,k , J X j=1 (j) w̄n,k ≈ Z f˜(xn,k , 1)dxn,k . (40) R Note that since f˜(xn,k , 1)dxn,k approximates the posterior probability of target existence p(rn,k = 1|z), it follows that the e sum of weights pn,k is approximately equal to p(rn,k = 1|z). The particle operations discussed in the remainder of this section are performed for all PTs k ∈ K in parallel. The resulting particle-based implementation of the overall BP method is summarized in Fig. 3. 9 A. Prediction n ≥ 1 and for each PT k∈ K, J particles and weights  For J (j) (j) e x̄n−1,k , w̄n−1,k = pn−1,k /J j=1 representing the previous belief f˜(xn−1,k , rn−1,k ) were calculated at the previous time n − 1 as described further below. Weighted particles  J+I (j) α(j) xn,k , wn,k j=1 representing the message α(xn,k , 1) in (29) are now obtained as follows.2 First, for each parti(j) (j) cle x̄n−1,k , j ∈ {1, . . . , J}, one particle xn,k is drawn  (j) from f xn,k x̄n−1,k . Next, I additional “birth particles”  (j) J+I xn,k j=J+1 are drawn from the birth pdf f b (xn,k ). Finally, α(j) weights wn,k , j ∈ {1, . . . , J + I} are obtained as α(j) wn,k = ( (j) s pn,k w̄n−1,k , j ∈ {1, . . . , J} b pn,k (1 − j ∈ {J +1, . . . , J +I}. e pn−1,k )/I , (41) importance sampling [43], [44]. To that end, we first rewrite the belief f˜(xn,k , rn,k ) in (37), (38) by inserting (36), i.e., f˜(xn,k , 1) ∝ α(xn,k , 1) S X Y s=1 a(s) n,k f˜n,k ∝ αn,k S Y (s) s=1 A(j) α(j) wn,k = wn,k S X Y (j) B. Measurement Evaluation (s)  For each sensor s ∈ S, an approximation β̃ an,k of the (s)  message β an,k in (31) can be calculated from the weighted  (j) α(j)  J+I particles xn,k , wn,k j=1 representing α(xn,k , rn,k ) as J+I X  α(j) (j) (s) (s)  wn,k υ xn,k , 1, an,k ; z(s) β̃ an,k = n j=1 +1 (s)  an,k 1− J+I X j=1 ! α(j) wn,k  (s)  (j) (s) η̃ an,k , υ xn,k , 1, an,k ; z(s) n j ∈ {1, . . . , J + I}. Note that this expression is based on importance sampling with proposal density α(xn,k , 1) (represented by the weighted  (j) α(j)  J+I particles xn,k , wn,k j=1 ). Similarly, we calculate a single nonnormalized weight corresponding to (44) as ! S J+I X α(j) Y  (s) B wn,k η̃ an,k = 0 , wn,k = 1 − s=1 j=1 in which 1 − PJ+I α(j) wn,k approximates αn,k .  (j) (j)  J+I Next, weighted particles xn,k , wn,k j=1 representing the belief f˜(xn,k , rn,k ) are obtained by using the particles  (j) J+I xn,k j=1 representing α(xn,k , rn,k ) and calculating the corresponding weights as j=1 A(j) . (42) (j) (s) (s)  α(j) Here, wn,k provides a Monte j=1 υ xn,k , 1, an,k ; zn R (s) (s)  Carlo approximation [44] of υ xn,k , 1, an,k ; zn α(xn,k , 1)  PJ+I α(j)  (s) ×dxn,k in (31), and 1 an,k 1 − j=1 wn,k provides an PJ+I α(j) (s)  approximation of 1 an,k αn,k in (31). Note that j=1 wn,k can be interpreted as a “predicted existence probability,” and PJ+I α(j) thus 1 − j=1 wn,k can be interpreted as a “predicted nonexistence probability,” which approximates αn,k . PJ+I C. Data Association, Measurement Update, Belief Calculation (s)  The approximate messages β̃ an,k obtained in (42) are used in the data association loop, i.e., they are substituted for (s)  the messages β an,k in (33) and (34). After convergence of (s)  the data association loop, approximate messages η̃ an,k (ap(s)  proximating the messages η an,k in (35)) are then available for all PTs k and all sensors s. Next, the measurement update step (36) and the belief calculation step (37), (38) are implemented by means of 2 Note (44) (s)  Here, we also replaced η an,k by its particle-based approxi(s)  mation η̃ an,k , even though we do not indicate this additional approximation in our notation f˜(xn,k , rn,k ). We now calculate nonnormalized weights corresponding to (43) as s=1 a(s) e Here, pn−1,k = j=1 w̄n−1,k (cf. (40)). Note that the pro(j) posal distribution [43], [44] underlying (41) is f xn,k xn−1,k ) for j ∈ {1, . . . , J} and f b (xn,k ) for j ∈ {J + 1, . . . , J + I}. A more general expression for particle-based prediction with an arbitrary proposal distribution can be found in [16]. (43)  η̃ an,k = 0 . n,k PJ  (s)  (s) η̃ an,k υ xn,k , 1, an,k ; z(s) n that αn,k in (30) is again given implicitly by these weighted particles since α(xn,k , rn,k ) is normalized. (j) wn,k = B + wn,k wn,k PJ+I j ′ =1 A(j ′ ) wn,k . PJ+I A(j) B Here, wn,k + j=1 wn,k is a particle-based approximation of the normalization constant Cn,k in (39). We note that e pn,k = J+I X (j) wn,k . (45) j=1 D. Target Detection, State Estimation, Resampling  (j) (j)  J+I The weighted particles xn,k , wn,k j=1 can now be used for target detection and estimation. First, for each PT k, an e approximation pn,k of the existence probability p(rn,k = 1|z)  (j) J+I is calculated from the particle weights wn,k j=1 as in (45). e PT k is then detected (i.e., considered to exist) if pn,k is above a threshold Pth (cf. Section II-B). For the detected targets k, an approximation of the MMSE state estimate x̂MMSE in (2) n,k is calculated according to x̂n,k = J+I 1 X e pn,k (j) (j) wn,k xn,k . (46) j=1 Finally, as a preparation for the next time step n + 1, a resampling step [43], [44] is performed to reduce the number of particles to J and to avoid degeneracy effects. The resampling 10 results in equally weighted particles sponding weights are given by j ∈ {1, . . . , J}. VII. C HOICE OF B IRTH (j) w̄n,k AND = J ; the correj=1 PI+J (j ′ ) 1 w̄n,k = J j ′ =1 wn,k ,  (j) x̄n,k S URVIVAL PARAMETERS We next present a scheme for choosing the birth pdfs f b (xn,k ), birth probabilities pbn,k , and survival probabilities psn,k (see Section III-A). This scheme is heuristic but results in scalability with respect to the number of sensors S and, as demonstrated in Section IX-B, in good detection and tracking performance. It is based on the standard assumption that the number of newly born targets obeys a Poisson distribution with mean µb , and existing targets survive with a fixed, specified probability ps [4]. We first distinguish between “reliable” and “unreliable” PTs at time n − 1 by comparing the PT existence probabilities e pn−1,k with a reliability threshold Rth : PT k is considered e reliable at time n−1 if pn−1,k > Rth and unreliable otherwise. r u Let Kn−1 and Kn−1 denote the sets of indices k of reliable and r unreliable PTs at time n −1, respectively. For PTs k ∈ Kn−1 , b we set the birth and survival probabilities at time n to pn,k = 0 and psn,k = ps , respectively. Since pbn,k = 0, no birth pdf is needed at time n (cf. (7)). u u |, , we set psn,k = 0 and pbn,k = µb /|Kn−1 For PTs k ∈ Kn−1 and we construct the birth pdf f b (xn,k ) as follows. Consider  (s0 ) (s0 ) an arbitrary sensor s0 , and let Zn−1 , zn−1,m (s0 ) m∈Mn−1 denote the set of measurements of that sensor at time n −1. (s0 ) (Note that Zn−1 corresponds to the measurement vector  (s0 ) (s0 ) zn−1 = zn−1,m ]m∈M(s0 ) , with the difference that the (s ) n−1 (s ) 0 0 elements zn−1,m are considered unordered in Zn−1 .) We (s0 ) u b partition Zn−1 into disjoint subsets Zn−1,k , k ∈ Kn−1 such b that the cardinalities of the Zn−1,k differ at most by 1, i.e., b b u . Then, based on |Zn−1,k | − |Zn−1,l | ≤ 1 for any k, l ∈ Kn−1 b the kth measurement set Zn−1,k , we construct a corresponding “adaptive birth pdf” as Z b f b (xn,k ) , f (xn,k |xn−1,k )f b (xn−1,k ; Zn−1,k )dxn−1,k , b b ) is constructed using Zn−1,k where the pdf f b (xn−1,k ; Zn−1,k and prior knowledge (e.g., about the target velocity) as discussed in [45]. Particles representing f b (xn,k ) are obtained b ) and performing by drawing particles from f b (xn−1,k ; Zn−1,k particle-based prediction [44]. VIII. R ELATION TO • E XISTING M ETHODS Several aspects of the proposed method are related to existing methods, as discussed next. • The hybrid model for data association using both targetoriented and measurement-oriented association variables was previously proposed in [32] and [33]. In [32], BP is used to estimate optical flow parameters. In [33], BP is used for data association (without multitarget tracking). • Our model for target existence was previously used by the search-initialize-track filter in [11], which, however, is not BP-based, considers only a single sensor, does not • • employ the hybrid model for data association, and uses a different track initialization scheme. In the case of a single target and a single sensor, the proposed method reduces to the particle-based implementation of the Bernoulli filter [16] (which is derived using the FISST framework). The TOMB/P filter [20], which is effectively a FISSTbased variant of the JIPDA filter that uses BP and the hybrid data association model, differs from the proposed method in the following respects: it is restricted to a single sensor and to linear-Gaussian state evolution and measurement models—see [46] for an extension to nonlinear, non-Gaussian models—and the number of PTs (tracks) varies over time. If the parameters of the proposed method are chosen such that all targets exist at all times (this special case was mentioned in Section III-A, and was considered in our previous work in [35]), then the method becomes similar to the Monte Carlo JPDA filter [8] in that it uses a similar particle-based processing scheme. However, contrary to the Monte Carlo JPDA filter, the proposed method performs data association by means of BP, is based on the hybrid model for data association, and can also be used when the number of targets is unknown. IX. S IMULATION R ESULTS Next, we report simulation results assessing the performance of our method and comparing it with that of five previously proposed methods for multisensor-multitarget tracking. A. Simulation Setting We simulated up to five actual targets whose states consist of two-dimensional (2D) position and velocity, i.e., xn,k = [x1,n,k x2,n,k ẋ1,n,k ẋ2,n,k ]T. The targets move in a region of interest (ROI) given by [−3000, 3000] × [−3000, 3000] according to the constant-velocity motion model, i.e., xn,k = Axn−1,k + Wun,k , where A ∈ R4×4 and W ∈ R4×2 are chosen as in [47] and un,k ∼ N (0, σu2 I2 ) with σu2 = 0.025 is an independent and identically distributed (iid) sequence of 2D Gaussian random vectors. The birth distribution fb (xn,k ), b the birth probabilities pn,k , and the survival probabilities s pn,k were chosen as described in Section VII, using the global birth probability p b = 0.01 and the global survival probability p s = 0.999. The number of PTs was set to K = 8. We considered a challenging scenario where the five target trajectories intersect at the ROI center. The target trajectories were generated by first assuming that the five targets start from initial positions uniformly placed on a circle of radius 1000 and move with an initial speed of 10 toward the ROI center, and then letting the targets start to exist at times n = 5, 10, 15, 20, and 25. The sensors are located uniformly on a circle of radius 3000 and perform range and bearing measurements within a measurement range of 6000. More specifically, within the measurement range, the target-generated measurements are given by T  (s) + vn,m , x̃n,k − p(s) ϕ x̃n,k , p(s) z(s) n,m = 11 B. Performance Comparison We compare the proposed BP method with particle implementations of the IC-PHD filter [4], [13], [26], the ICCPHD filter [4], [15], [26], the IC-MB filter [4], [17], and the partition-based MS-PHD and MS-CPHD filters [23], [24]. The “IC-” filters are straightforward multisensor extensions performing a single-sensor update step sequentially for each sensor [4], [6], [26]. The partition-based MS-(C)PHD filters approximate the exact multisensor (C)PHD filters; they can outperform the “IC-” filters but have a higher computational complexity. Since the trellis algorithm used for partition extraction in the original formulation of the MS-(C)PHD filter [23], [24] is only suitable for a Gaussian mixture implementation of the filter, it was adapted to a particle-based implementation. We note that the exact multisensor (C)PHD filters are not computationally feasible for the simulated scenario since their complexity scales exponentially in the number of sensors and in the number of measurements per sensor [22], [25], [48]. The performance of the various methods is measured by the Euclidean distance based OSPA metric with a cutoff parameter of 200 [49]. The (C)PHD-type filters use 24000 particles to represent the PHD of the target states, and they perform kmeans++ clustering [50] for state estimation. The IC-MB filter uses 3000 particles to represent each Bernoulli component. The maximum numbers of subsets and partitions used by the MS(C)PHD filter are 120 and 720, respectively, similarly to [23], [24]. With the above-mentioned parameters, the runtime per time scan for a MATLAB implementation without gating on a single core of an Intel Xeon E5-2640 v3 CPU was measured as 0.07s for the proposed method, 0.11s for the IC-PHD filter, 0.14s for the IC-CPHD filter, 0.27s for the IC-MB filter, 13.21s for the MS-PHD filter, and 13.82s for MS-CPHD filter. The high runtimes of the MS-(C)PHD filters are due to the fact that in our particle-based implementation, the trellis algorithm used for partition extraction is computationally intensive. We note that the efficient extraction of high-quality partitions in a particle-based implementation of the MS-(C)PHD filter is still an open problem. 200 IC-MB IC-PHD MS-PHD IC-CPHD MS-CPHD BP (proposed) MOSPA 160 120 80 40 0 25 50 75 100 125 150 n Fig. 4. MOSPA error versus time n for S = 3 sensors, Pd = 0.8, and µ(s) = 2. 120 IC-MB IC-PHD MS-PHD IC-CPHD MS-CPHD BP (proposed) 100 80 MOSPA T (s) where x̃n,k , [x  1,n,k x2,n,k ] , p is the position of sensor (s) s, ϕ x̃n,k , p is the angle (in degrees) of the vector x̃n,k (s) relative to the vector p(s), and vn,m ∼ N (0, Cv ) with Cv = 2 2 diag{10 , 0.5 } is an iid sequence of 2D Gaussian random (s) vectors. The false alarm pdf fFA zn,m is linearly increasing on [0, 6000] and zero outside [0, 6000] with respect to the range component, and uniform on [0◦ , 360◦) with respect to the angle component. In Cartesian coordinates, this corresponds to a uniform distribution on the sensor’s measurement area. The mean number of false alarm measurements is µ(s) = 2 if not noted otherwise. Our implementation of the proposed method used J = 3000 particles and I = 3000 birth particles for each PT. We performed P = 20 BP iterations for iterative data association. The threshold for target detection was Pth = 0.5, and the reliability threshold was Rth = 10−3. We simulated 150 time steps n. 60 40 20 0 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Pd Fig. 5. Time-averaged MOSPA error versus Pd for S = 3 sensors and µ(s) = 2. Fig. 4 shows the mean OSPA (MOSPA) error—averaged over 400 simulation runs—of all methods versus time n, assuming S = 3 sensors with a detection probability of (s) Pd (xn,k ) = Pd = 0.8. The error exhibits peaks at times n = 5, 10, 15, 20, and 25 because of target births. However, very soon after a target birth, the proposed method as well as the IC-CPHD, MS-PHD, and MS-CPHD filters are able to reliably estimate the number of targets. The proposed method is seen to outperform all the other methods. In particular, it outperforms the IC-CPHD, MS-PHD, and MS-CPHD filters mainly because particle implementations of (C)PHD filters involve a potentially unreliable clustering step. This clustering step is especially unreliable for targets that are close to each other. This fact explains the higher MOSPA error of the ICCPHD, MS-PHD, and MS-CPHD filters around n = 100, i.e., around the time when the target trajectories intersect in the ROI center. Finally, the MOSPA error of the IC-PHD and IC-MB filters is seen to be significantly larger than that of the other methods; this is caused by the inability of these filters to reliably estimate the number of targets. We note that for sensors with different probabilities of detection, the performance loss of IC-(C)PHD filters relative to MS-(C)PHD filters tends to be larger than in Fig. 4 [23], [24]. Fig. 5 shows the time-averaged MOSPA error—averaged over time steps n ∈ {50, . . . , 150}—versus the detection probability Pd for S = 3 sensors. For all methods, as expected, the MOSPA error decreases with decreasing Pd . Fig. 6 shows the time-averaged MOSPA error versus the number of sensors 12 0.2 IC-MB IC-PHD MS-PHD IC-CPHD MS-CPHD BP (proposed) 100 80 MOSPA runtime (s) 120 0.15 0.1 0.05 0 60 2 4 6 8 10 12 14 16 18 20 50 60 70 80 90 14 16 18 20 S 40 20 0 1 2 3 5 4 7 6 8 runtime (s) 0.8 S 0.6 0.4 0.2 0 Fig. 6. Time-averaged MOSPA error versus number of sensors S for Pd = 0.6 and µ(s) = 2. 1 10 20 30 40 µ(s) IC-MB IC-PHD MS-PHD IC-CPHD MS-CPHD BP (proposed) 120 100 MOSPA runtime (s) 0.4 80 0.3 0.2 0.1 0 2 4 6 8 10 12 number of actual targets 60 Fig. 8. Average runtime per time step of the proposed method. Top: versus S for five actual targets and µ(s) = 2; center: versus µ(s) for S = 3 and five actual targets; bottom: versus the number of actual targets for S = 3, µ(s) = 2, and the number of PTs set to K = 5, 7, . . . , 23. 40 20 0 1 10 30 20 40 50 µ(s) Fig. 7. Time-averaged MOSPA error versus mean number of false alarms µ(s) for Pd = 0.6 and S = 3. S for Pd = 0.6. It can be seen that the MOSPA error of the MS-PHD and MS-CPHD filters increases for S larger than 5; this is because the chosen maximum numbers of subsets (120) and partitions (720) are too small for that case. (We note that choosing larger maximum numbers of subsets and partitions leads to excessive simulation times.) Finally, Fig. 7 shows the time-averaged MOSPA error versus the mean number of false alarms µ(s) for S = 3 and Pd = 0.6. As expected, the MOSPA error of all methods increases with growing µ(s). In addition, Figs. 5–7 again show that the proposed method outperforms the other methods. We note that the poor performance of the IC-MB filter is due to the approximation used by that filter, which is accurate only for a high Pd and a very low µ(s) [17]. C. Scalability Finally, we investigate how the runtime of our method scales in the number of sensors S and the number of actual targets, and how it depends on the mean number of false alarms µ(s). Fig. 8 shows the average runtime per time step n versus S, µ(s), and the number of actual targets for a MATLAB implementation on a single core of an Intel Xeon E5-2640 v3 CPU. The runtime was averaged over 150 time steps and 400 simulation runs. The probability of detection was set to Pd = 0.6. These results confirm the linear scaling of the runtime in S and in the mean number of measurements per sensor (which grows linearly with µ(s) ). The scaling in the number of actual targets is seen to be roughly quadratic. Further investigation showed that the scaling in the number of actual targets is linear if the number of PTs is held fixed, and similarly, the scaling in the number of PTs is linear if the number of actual targets is held fixed. The low absolute complexity of the proposed method is evidenced by the fact that for 20 actual targets, S = 3 sensors, and µ(s) = 2, the computations per time step n require less than 0.4s. X. C ONCLUSION We developed and demonstrated the application of the belief propagation (BP) scheme to the problem of tracking an unknown number of targets using multiple sensors. The proposed BP-based multitarget tracking method exhibits low complexity and excellent scaling properties with respect to all relevant systems parameters. This is achieved through the use of “augmented target states” including binary target indicators and the establishment of an appropriate statistical model involving a redundant formulation of data association uncertainty [33]. The complexity of our method scales only quadratically in the number of targets, linearly in the number of sensors, and linearly in the number of measurements per sensors. Simulation results in a challenging scenario with intersecting targets showed that the proposed method can outperform previously proposed methods, including methods with a less favorable scaling behavior. In particular, we observed significant improvements in OSPA performance relative to various multisensor extensions of the PHD, CPHD, and multiBernoulli filters. Promising directions for future research include extensions of the proposed BP method that adapt to time-varying en- 13 vironmental conditions, e.g., to a time-varying probability of detection [51], and distributed variants for use in decentralized wireless sensor networks with communication constraints [52]. A direction of theoretical interest would be a FISST-based derivation of multisensor-multitarget tracking algorithms using BP for data association. R EFERENCES [1] W. Koch, Tracking and Sensor Data Fusion: Methodological Framework and Selected Applications. Berlin, Germany: Springer, 2014. [2] B.-N. Vo, M. Mallick, Y. Bar-Shalom, S. Coraluppi, R. Osborne, R. Mahler, and B.-T. Vo, “Multitarget tracking,” in Wiley Encyclopedia of Electrical and Electronics Engineering, M. Peterca, Ed. Hoboken, NJ, USA: Wiley, 2015. [3] Y. Bar-Shalom and X.-R. Li, Multitarget-Multisensor Tracking: Principles and Techniques. Storrs, CT, USA: Yaakov Bar-Shalom, 1995. [4] R. Mahler, Statistical Multisource-Multitarget Information Fusion. Norwood, MA, USA: Artech House, 2007. [5] D. B. Reid, “An algorithm for tracking multiple targets,” IEEE Trans. Autom. Control, vol. 24, no. 6, pp. 843–854, Dec. 1979. [6] L. Y. Pao and C. W. Frei, “A comparison of parallel and sequential implementations of a multisensor multitarget tracking algorithm,” in Proc. ACC-95, vol. 3, Seattle, WA, USA, Jun. 1995, pp. 1683–1687. [7] S. Deb, M. Yeddanapudi, K. Pattipati, and Y. Bar-Shalom, “A generalized S-D assignment algorithm for multisensor-multitarget state estimation,” IEEE Trans. Aerosp. Electron. Syst., vol. 33, no. 2, pp. 523–538, Apr. 1997. [8] J. Vermaak, S. J. Godsill, and P. Perez, “Monte Carlo filtering for multi target tracking and data association,” IEEE Trans. Aerosp. Electron. Syst., vol. 41, no. 1, pp. 309–332, Jan. 2005. [9] D. Musicki and R. Evans, “Joint integrated probabilistic data association: JIPDA,” IEEE Trans. Aerosp. Electron. Syst., vol. 40, no. 3, pp. 1093– 1099, Jul. 2004. [10] D. Musicki and R. J. Evans, “Multiscan multitarget tracking in clutter with integrated track splitting filter,” IEEE Trans. Aerosp. Electron. Syst., vol. 45, no. 4, pp. 1432–1447, Oct. 2009. [11] P. Horridge and S. Maskell, “Searching for, initiating and tracking multiple targets using existence probabilities,” in Proc. FUSION-09, Seattle, WA, USA, Jul. 2009, pp. 611–617. [12] R. Mahler, “Multitarget Bayes filtering via first-order multitarget moments,” IEEE Trans. Aerosp. Electron. Syst., vol. 39, no. 4, pp. 1152– 1178, Oct. 2003. [13] B.-N. Vo, S. Singh, and A. Doucet, “Sequential Monte Carlo methods for multitarget filtering with random finite sets,” IEEE Trans. Aerosp. Electron. Syst., vol. 41, no. 4, pp. 1224–1245, Oct. 2005. [14] R. Mahler, “PHD filters of higher order in target number,” IEEE Trans. Aerosp. Electron. Syst., vol. 43, no. 4, pp. 1523–1543, Oct. 2007. [15] B.-T. Vo, B.-N. Vo, and A. Cantoni, “Analytic implementations of the cardinalized probability hypothesis density filter,” IEEE Trans. Signal Process., vol. 55, no. 7, pp. 3553–3567, Jul. 2007. [16] B. Ristic, B.-T. Vo, B.-N. Vo, and A. Farina, “A tutorial on Bernoulli filters: Theory, implementation and applications,” IEEE Trans. Signal Process., vol. 61, no. 13, pp. 3406–3430, Jul. 2013. [17] B.-T. Vo, B.-N. Vo, and A. Cantoni, “The cardinality balanced multitarget multi-Bernoulli filter and its implementations,” IEEE Trans. Signal Process., vol. 57, no. 2, pp. 409–423, Feb. 2009. [18] S. Reuter, B.-T. Vo, B.-N. Vo, and K. Dietmayer, “The labeled multiBernoulli filter,” IEEE Trans. Signal Process., vol. 62, no. 12, pp. 3246– 3260, Jun. 2014. [19] B.-N. Vo, B.-T. Vo, and D. Phung, “Labeled random finite sets and the Bayes multi-target tracking filter,” IEEE Trans. Signal Process., vol. 62, no. 24, pp. 6554–6567, Dec. 2014. [20] J. L. Williams, “Marginal multi-Bernoulli filters: RFS derivation of MHT, JIPDA and association-based MeMBer,” IEEE Trans. Aerosp. Electron. Syst., vol. 51, no. 3, pp. 1664–1687, Jul. 2015. [21] P. Braca, S. Marano, V. Matta, and P. Willett, “Asymptotic efficiency of the PHD in multitarget/multisensor estimation,” IEEE J. Sel. Topics Signal Process., vol. 7, no. 3, pp. 553–564, Jun. 2013. [22] R. Mahler, “The multisensor PHD filter: I. General solution via multitarget calculus,” in Proc. SPIE-09, Orlando, FL, USA, Apr. 2009. [23] S. Nannuru, M. Coates, M. Rabbat, and S. Blouin, “General solution and approximate implementation of the multisensor multitarget CPHD filter,” in Proc. IEEE ICASSP-15, Brisbane, Australia, Apr. 2015, pp. 4055–4059. [24] ——, “Multisensor CPHD filter,” 2016, available online: http://arxiv.org/abs/1504.06342. [25] E. Delande, E. Duflos, P. Vanheeghe, and D. Heurguier, “Multi-sensor PHD: Construction and implementation by space partitioning,” in Proc. IEEE ICASSP-11, Prague, Czech Republic, May 2011, pp. 3632–3635. [26] S. Nagappa and D. Clark, “On the ordering of the sensors in the iteratedcorrector probability hypothesis density (PHD) filter,” in Proc. SPIE-11, Orlando, FL, USA, Apr. 2011, pp. 26–28. [27] R. Mahler, “Approximate multisensor CPHD and PHD filters,” in Proc. FUSION-10, Edinburgh, UK, Jul. 2010, pp. 26–29. [28] F. R. Kschischang, B. J. Frey, and H.-A. Loeliger, “Factor graphs and the sum-product algorithm,” IEEE Trans. Inf. Theory, vol. 47, no. 2, pp. 498–519, Feb. 2001. [29] H. Wymeersch, Iterative Receiver Design. New York, NY, USA: Cambridge University Press, 2007. [30] M. J. Wainwright and M. I. Jordan, “Graphical models, exponential families, and variational inference,” Found. Trends Mach. Learn., vol. 1, Jan. 2008. [31] H.-A. Loeliger, “An introduction to factor graphs,” IEEE Signal Process. Mag., vol. 21, no. 1, pp. 28–41, Jan. 2004. [32] M. Chertkov, L. Kroc, F. Krzakala, M. Vergassola, and L. Zdeborová, “Inference in particle tracking experiments by passing messages between images,” PNAS, vol. 107, no. 17, pp. 7663–7668, Apr. 2010. [33] J. L. Williams and R. Lau, “Approximate evaluation of marginal association probabilities with belief propagation,” IEEE Trans. Aerosp. Electron. Syst., vol. 50, no. 4, pp. 2942–2959, Oct. 2014. [34] Z. Chen, L. Chen, M. Cetin, and A. S. Willsky, “An efficient message passing algorithm for multi-target tracking.” in Proc. FUSION-09, Seattle, WA, USA, Jul. 2009, pp. 826–833. [35] F. Meyer, P. Braca, P. Willett, and F. Hlawatsch, “Scalable multitarget tracking using multiple sensors: A belief propagation approach,” in Proc. FUSION-15, Washington D.C., USA, Jul. 2015, pp. 1778–1785. [36] P. Horridge and S. Maskell, “Real-time tracking of hundreds of targets with efficient exact JPDAF implementation,” in Proc. FUSION-06, Florence, Italy, Jul. 2006, pp. 1–8. [37] L. Chen, M. J. Wainwright, M. Cetin, and A. S. Willsky, “Data association based on optimization in graphical models with application to sensor networks,” Math. Comp. Model., vol. 43, no. 9–10, pp. 1114– 1135, 2006. [38] F. Meyer, P. Braca, P. Willett, and F. Hlawatsch, “Tracking an unknown number of targets using multiple sensors: A belief propagation method,” in Proc. FUSION-16, Heidelberg, Germany, Jul. 2016. [39] H. V. Poor, An Introduction to Signal Detection and Estimation. New York, NY: Springer, 1994. [40] S. M. Kay, Fundamentals of Statistical Signal Processing: Estimation Theory. Upper Saddle River, NJ, USA: Prentice-Hall, 1993. [41] H. Wymeersch, J. Lien, and M. Z. Win, “Cooperative localization in wireless networks,” Proc. IEEE, vol. 97, no. 2, pp. 427–450, Feb. 2009. [42] P. O. Vontobel, “The Bethe permanent of a nonnegative matrix,” IEEE Trans. Inf. Theory, vol. 59, no. 3, pp. 1866–1901, Mar. 2013. [43] M. S. Arulampalam, S. Maskell, N. Gordon, and T. Clapp, “A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking,” IEEE Trans. Signal Process., vol. 50, no. 2, pp. 174–188, Feb. 2002. [44] A. Doucet, N. de Freitas, and N. Gordon, Sequential Monte Carlo Methods in Practice. New York, NY, USA: Springer, 2001. [45] B. Ristic and S. Arulampalam, “Bernoulli particle filter with observer control for bearings-only tracking in clutter,” IEEE Trans. Aerosp. Electron. Syst., vol. 48, no. 3, pp. 2405–2415, Jul. 2012. [46] T. Kropfreiter, F. Meyer, and F. Hlawatsch, “Sequential Monte Carlo implementation of the track-oriented marginal multi-Bernoulli/Poisson filter,” in Proc. FUSION-16, Heidelberg, Germany, Jul. 2016. [47] J. H. Kotecha and P. M. Djuric, “Gaussian particle filtering,” IEEE Trans. Signal Process., vol. 51, no. 10, pp. 2592–2601, Oct 2003. [48] R. Mahler, “The multisensor PHD filter: II. Erroneous solution via Poisson magic,” in Proc. SPIE-09, Orlando, FL, USA, Apr. 2009. [49] D. Schuhmacher, B.-T. Vo, and B.-N. Vo, “A consistent metric for performance evaluation of multi-object filters,” IEEE Trans. Signal Process., vol. 56, no. 8, pp. 3447–3457, Aug. 2008. [50] G. Gan, C. Ma, and J. Wu, Data Clustering: Theory, Algorithms, and Applications. Philadelphia, PA, USA: SIAM, 2007. [51] B.-T. Vo, B.-N. Vo, R. Hoseinnezhad, and R. Mahler, “Robust multiBernoulli filtering,” IEEE J. Sel. Topics Signal Process., vol. 7, no. 3, pp. 399–409, Jun. 2013. [52] K. Sohraby, D. Minoli, and T. Znati, Wireless Sensor Networks: Technology, Protocols, and Applications. Hoboken, NJ, USA: Wiley, 2007.
8cs.DS
1 Joint Relay Selection and Power Allocation in Large-Scale MIMO Systems with Untrusted Relays and Passive Eavesdroppers arXiv:1709.01341v1 [cs.IT] 5 Sep 2017 Ali Kuhestani, Student Member, IEEE, Abbas Mohammadi Senior M ember, IEEE , and Mohammadali Mohammadi, M ember, IEEE Abstract—In this paper, a joint relay selection and power allocation (JRP) scheme is proposed to enhance the physical layer security of a cooperative network, where a multiple antennas source communicates with a single-antenna destination in presence of untrusted relays and passive eavesdroppers (Eves). The objective is to protect the data confidentially while concurrently relying on the untrusted relays as potential Eves to improve both the security and reliability of the network. To realize this objective, we consider cooperative jamming performed by the destination while JRP scheme is implemented. With the aim of maximizing the instantaneous secrecy rate, we derive a new closed-form solution for the optimal power allocation and propose a simple relay selection criterion under two scenarios of noncolluding Eves (NCE) and colluding Eves (CE). For the proposed scheme, a new closed-form expression is derived for the ergodic secrecy rate (ESR) and the secrecy outage probability as security metrics, and a new closed-form expression is presented for the average symbol error rate (SER) as a reliability measure over Rayleigh fading channels. We further explicitly characterize the high signal-to-noise ratio slope and power offset of the ESR to highlight the impacts of system parameters on the ESR. In addition, we examine the diversity order of the proposed scheme to reveal the achievable secrecy performance advantage. Finally, the secrecy and reliability diversity-multiplexing tradeoff of the optimized network are provided. Numerical results highlight that the ESR performance of the proposed JRP scheme for NCE and CE cases is increased with respect to the number of untrustworthy relays. Index Terms—Physical-layer security, untrusted relay, joint relay selection and power allocation. I. I NTRODUCTION L ARGE-scale multiple-input multiple-output (MIMO) system as a promising solution of the fifth-generation (5G) wireless communication networks provides significant performance gains in terms of energy saving and spectral efficiency [1], [2]. This new technology deploys simple coherent processing methods, e.g., maximum ratio transmission (MRT) across arrays of hundreds of or even more antennas at base station (BS) and supports tens of or more mobile users (MUs) [1]–[3]. An attractive feature of large-scale MIMO systems is that they offer a significant security improvement compared to a conventional MIMO systems, as with large-scale multiple This work was supported by the INSF and contract number 94023761. A. Kuhestani and A. Mohammadi are with Department of Electrical Engineering, Amirkabir University of Technology, Tehran, Iran (emails: [email protected]; [email protected]). M. Mohammadi is with the Faculty of Engineering, Shahrekord University, Shahrekord, Iran (e-mail: [email protected]). antennas (LSMA) at the BS, a narrow directional beam can be radiated toward the desired terminal. Accordingly, the received signal power at the desired terminal is several orders of magnitude higher than that at any non-coherent passive eavesdropper (Eve) [3]1 . However, the security benefits of LSMA systems are severely hampered in cooperative networks, where the intermediate nodes may be potential Eves [6]. Owing to the broadcast nature of wireless communication, the information transmission between legitimate users can be simply captured by Eves. Accordingly, physical layer security (PLS) as a promising approach to enhance the confidentiality of wireless communications has attracted a lot of interest [7], [8]. Physical layer secure transmission is provisioned by intelligently exploiting the time varying properties of fading channels, instead of relying on conventional cryptographic techniques [7]. Among the proposed PLS solutions, cooperative relaying, cooperative jamming (CJ) and a mixed of these two techniques have recently attracted a great deal of interest [9]–[18]. Cooperative relaying can enhance the PLS through implementing distributed beamforming or opportunistic relaying (OR) [9], [10]. In contrast to distributed beamforming that suffers from high complexity due to the need of large overhead, OR imposes low system overhead by choosing only one relay which offers the best secrecy performance for the network [10]. As a complementary approach, CJ schemes can also be implemented by the network’s nodes to transmit jamming signals towards the Eves in order to degrade the received signal-to-noise ratio (SNR) at the Eves [11]–[18]. This goal can be achieved through applying the following three methods: 1) Source-based jamming [11], [12] in which the source transmits a mixed signal carrying the information signal and the jamming signal, 2) Friendly jammer-based jamming [12]–[15] in which a relay [12]–[14] or an external friendly jammer (FJ) [15] contributes to provide confidential communication, and 3) Destination-based CJ (DBCJ) [16]– [24], in which the destination itself contributes to degrade the received signal at an external Eve [16]–[18] or at a helper intermediate node who may act as an Eve [6]. Among the presented methods, the DBCJ policy can be implemented simply compared to the first and second methods, where the destination performs self-interference cancellation with regard to its prior information of jamming signal. Contrary to 1 It is worth noting that in contrast to passive eavesdropping, an active Eve may cause pilot contamination at the BS and pose more serious security problem to the network [4], [5]. 2 DBCJ, for the first and second methods, the destination must be perfectly aware of the pre-defined jamming signal, while it is unknown for the Eves. This a priori known jamming signal, generated by using some pseudo-random codes or some cryptographic signals, is hard to implement and transfer to the destination confidentially. Transferring this known jamming signal from the source to destination imposes more challenges to the network, when an untrusted relay collaborates for data transmission. From a perspective of security, a trusted relay can friendly assist to protect the confidential message from being eavesdropped by illegitimate nodes, while an untrusted relay may intentionally overhear the information signal when relaying. In some communication networks, an untrusted relay may collaborate to provide a reliable communication [6]. This scenario occurs in large-scale wireless systems such as heterogeneous networks, device-to-device (D2D) communications and Internet-of-things (IoT) applications [5], where confidential messages are often retransmitted by multiple intermediate nodes. It is therefore necessary to answer this question that whether exploiting the untrusted relay is still beneficial compared with direct transmission (DT) and if so, what the appropriate relaying strategy should be. To achieve a positive secrecy rate in untrusted relaying networks, the DBCJ policy was first introduced in [6]. Then several recent works have investigated the performance of the DBCJ policy in presence of a single [19], [20] or multiple [21]–[24] untrusted relays. Specifically, the secrecy performance of DBCJ with optimal power allocation (OPA) in presence of an untrusted amplify-and-forward (AF) relay investigated in [19] and then comprehensively studied in [20]. Taking into account non-colluding untrusted relaying, the authors in [21]–[23] derived lower bound expressions for the ergodic secrecy rate (ESR) performance in the absence [21], [22] or presence [23] of source jamming. The researchers in [21]–[23] indicate that increasing the number of untrustworthy relays degrades the ESR in contrast to the case of trustworthy relays. To be specific, the authors in [22] found that the diversity order of OR is restricted to unity independent of the number of untrusted relays. All the aforementioned works [21]–[24] investigated the cooperative untrusted relaying networks in absence of passive Eves and without considering achievable secrecy rate optimization. While the recent literature [19] presented a solid work for OPA in presence of a single untrusted relay, the impact of OPA on a more realistic cooperative network with multiple untrusted relays and passive Eves has not been studied yet. In this paper, motivated by the recent literature on LSMA-based relaying systems [1], [2], [5], [19], [26], [27], we present a comprehensive research to improve the PLS of cooperative networks in presence of untrusted relays and passive Eves2 . Along this line, we consider a new cooperative network consisting of a large-scale MIMO source, a destination, multiple non-colluding untrusted AF relays [21]–[24], and multiple non-colluding Eves (NCE) [10], [28] who hide their existence in the network. In contrast to vast studies on the secrecy 2 Henceforth, we interchangeably use the terms ‘passive Eve’ and ‘Eve’. performance of untrusted relaying networks [19]–[24], we take into account joint relay selection and power allocation (JRP) in our network by considering the information leakage in the second phase of transmission. We further investigate a worstcase scenario, where passive Eves may collaborate together to maximize the total received SNR. Toward this end, we consider the scenario that the maximal ratio combining (MRC) is performed over all the received signals from the source and the selected relay to perform more harmful attacks. This event is referred to as colluding Eves (CE) [28], [29]. As a benchmark, we next study the conventional DT dispensing with the relays to compare with the proposed JRP transmission policy. In contrast to [30], in which DT policy with transmit antenna selection is analyzed for MIMO wiretap channels, we utilize the simple MRT beamformer [2] in our proposed DT policy to maximize the received SNR at the intended receiver. Furthermore, different from [30] that considered one multiple antennas Eve, we consider two cases of NCE and CE. Therefore, our system model and the related analysis are completely different compared with [30]. The main contributions of the paper are summarized as follows: 1) We develop a JRP scheme to maximize the instantaneous secrecy rate of the network for both NCE and CE cases. Our findings highlight that the large-scale MIMO approach as a powerful mathematical tool offers a new simple relay selection criterion. The proposed criterion only requires the channel state information (CSI) of the relays-destination links. 2) Based on the proposed JRP scheme, new closed-form expressions are derived for the probability of positive secrecy rate and the ESR of NCE and CE cases over Rayleigh fading channels. Furthermore, new compact expressions are derived for the asymptotic ESR. Our asymptotic results highlight that the probability of positive secrecy transmission tends to one for the optimized JRP scheme as the number of relays K grows. Moreover, we find that the ESR performance improves as K increases. We further characterize the high SNR slope and power offset of the ESR to highlight the impact of system parameters on the ESR performance. 3) For the proposed JRP scheme, new closed-form expressions are derived for the secrecy outage probability (SOP) of both NCE and CE cases over Rayleigh fading channels. In order to shed insights into the system performance, new simple expressions are derived for the SOP in the high SNR regime. Our asymptotic results highlight that the proposed JRP scheme enjoys the diversity order of K. Next, the secrecy diversitymultiplexing trade-off (DMT) is examined to express the trade-off between the error probability and the data rate of the proposed JRP scheme. 4) For DT policy, a new tight lower bound is derived for the ESR of NCE and CE cases. We also derive a new closed-form expression for the SOP of those cases. Our results show that the high SNR slope and the secrecy diversity order of this transmission policy are zero. 3 First Phase Second Phase Relay 1 Eve 1 Eve Relay i Destination Eve L Eve Source Relay K Fig. 1. Secure transmission in a cooperative network in presence of multiple untrusted relays and multiple passive Eves. Under DBCJ policy, relay i is selected to amplify the source’s signal. The solid and dashed lines denote the first and second phases of transmission, respectively. 5) To illustrate the reliability of the network, we calculate the average symbol error rate (SER) as the performance measure. New exact and asymptotic closed-form expressions are derived for the SER performance of the proposed JRP scheme over Rayleigh fading channels. Our results highlight that the proposed scheme offers the diversity order of K. We further determine the reliability DMT of the proposed scheme. The remainder of this paper is organized as follows. In Section II we present the system model and preliminaries. Next, in Section III, the relay selection criterion is introduced and the related OPA is evaluated. Performance metrics are evaluated in Section IV. Numerical results are presented in Section V, followed by conclusions in Section VI. Notation: We use bold lower case letters to denote vectors. IN and 0N ×1 denote the Identity matrix and the zeros matrix, respectively. k.k and (.)H denote the Euclidean norm and conjugate transpose operator, respectively; Ex {·} stands for the expectation over the random variable x; Pr(·) denotes the probability; fX (·) and FX (·) denote the probability density function (pdf) and cumulative distribution function (cdf) of the random variable (r.v.) X, respectively; CN (µ, σ 2 ) denotes a circularly symmetric complex Gaussian r.v. with mean µ and variance σ 2 ; Ei(x), Q(x) and Ψ(x) are the exponential integral [31, Section (8.21)], the Q-function [31, Section (8.25)] and the psi function [31, Section (8.25)], respectively. [·]+ = max{0, x} and max stands for the maximum value. ⌈x⌉ is the smallest integer that is larger than or equal to x. II. S YSTEM M ODEL We consider a cooperative LSMA-based network consisting of one multiple antennas source equipped with an array of Ns antennas, one single-antenna destination, K single-antenna untrusted AF relays and L single-antenna passive Eves3 as depicted in Fig. 1. The untrusted relays in our network are so-called semi-trusted, i.e., they are trusted at the service level while they are untrusted at the data level4 [6]. All the passive Eves are randomly located around the source, the relay nodes and the destination, and they hide their existence in the network. We mention that, in this paper, the term “malicious node” includes both the untrusted relays and passive Eves. We further assume that each node operates in a half-duplex mode. Based on time division duplexing (TDD) operation, the source obtains downlink CSI through uplink training. Then the acquired CSI is used to generate the low implementation complexity MRT precoding matrix [26]. We assume that the untrusted relays extract the information signal solely based on its own observation and they adopt selection combining (SC) [23], while relying on the Eves’ behavior, the following two eavesdropping scenarios are considered in our work: 1) Non-colluding eavesdroppers case: In this case, each passive Eve individually overhears the information signal without any collaboration with other Eves. For this case, we assume SC is applied at the Eves. As will be validated via numerical examples, the presented analysis can still be utilized for the case of MRC at the malicious nodes. 2) Colluding eavesdroppers case: In this case, all the passive Eves can connect to a data center to share their information, leading to extract more information. For this case, we assume MRC technique is applied at the Eves to enhance the intercept probability. This case can be considered as a worst-case scenario from the security viewpoint [28]. Some additional assumptions and definitions are as follows: • Complex Gaussian channel vector from the source to the malicious node l: hsl ∼ CN (0Ns ×1 , µsl INs ). • Complex Gaussian channel vector from the source to the destination: hsd ∼ CN (0Ns ×1 , µsd INs ). • Complex Gaussian channel from the selected relay i to the destination: hid ∼ CN (0, µid ). • Complex Gaussian channel from the selected relay i to the malicious node l: hil ∼ CN (0, µil ). • All the channels satisfy the reciprocity theorem [21]. • The additive white Gaussian noise (AWGN) at each receiver nm ,m ∈ {i, l, d}, is a zero-mean complex Gaussian r.v. with variance N0 . • The total transmit power of each phase is limited by P . One practical reason is the impact of co-channel interference between adjacent networks which should be taken into account in network design. P • ρ = N is the transmit SNR of the system. 0 3 The presence of multiple Eves in a wireless network may be a realistic scenario in which the malicious nodes act as harmful attackers to the authorized terminals [5], [29]. 4 The service level trust conveys this concept that the accurate CSI of the communication links can be given to the source through relay’s cooperation, and the relay retransmits the received information signal toward the destination. However, this collaboration is untrustworthy at the data level, i.e., the relay may decipher the confidential information from their received signal. 4 γsi = ρkhsi k2 , γid = ρ|hid |2 , γil = ρ|hil |2 , γld = hH m 2 sm ρ|hld |2 , γsd = ρkhsd k2 and γnull,l = ρ| |hsm | hsl | , m ∈ {i, d}. • γ̄si = ρµsi , γ̄id = ρµid , γ̄sl = ρµsl , γ̄ld = ρµld and γ̄sd = ρµsd . In the following, we describe two transmission policies adopted in this paper to establish the PLS in our considered network; namely DBCJ policy and DT policy. • A. DBCJ Policy In some communication networks, the direct channel gain between the source and destination may be so weak when the source and destination are located far apart or within heavily shadowed areas. In this condition, cooperative relaying offers a promising solution. This scenario has been extensively implemented in most previous works [10], [12]–[14], [18], where the source and relays pertain to a group, while the destination and passive Eves are placed in another group. Some networks including this scenario are the mobile ad-hoc networks (MANETs) [9], the LTE cellular systems [9], [14] and the IoT network [5], [25]. The aim of DBCJ policy is to deteriorate the received signal at the malicious nodes and to not allow them to decipher the information signal. Now, we proceed to highlight the necessity of adopting jamming signal in our relay-aided network. Toward this end and for the first step, we investigate the conventional AF relaying scheme in which CJ is not utilized for data transmission. Since the selected relay i itself is a curious node, the instantaneous secrecy rate is given by [21] h1  1  i+ γsi γid Rsconv = − log2 (1 + γsi ) . log2 1 + 2 1 + γsi + γid 2 (1) xy According to the fact that 1+x+y < min(x, y) ≤ x [21], one can easily conclude that Rsconv = 0. This result indicates that the achievable secrecy rate of the conventional untrusted relaying scheme without employing CJ is zero. Therefore, a jamming signal must be sent to degrade the received signal at the untrusted relay. In this paper, due to the simplicity of DBCJ policy compared with source-based jamming and FJbased jamming, we adopt the DBCJ policy to provide perfect secure transmission. It is worth noting that the analysis in this paper can be simply extended to the case of utilizing an external FJ [15]. Under DBCJ policy, since the nodes operate in a half-duplex mode, the direct link between the source and destination is missed. The whole transmission is performed based on a time division multiple-access (TDMA) protocol including the broadcast phase (first phase) and the relaying phase (second phase). During the first phase, while the source transmits the information signal with power λP , the destination concurrently radiates the artificial noise with power (1 − λ)P , where λ ∈ (0, 1) is the power allocation factor. It is worth noting that this power allocation scheme provides insights for the power allocation of the source and destination. This power allocation approach has been exploited in several works for both performance analysis and network optimization design [10], [19]–[21], [23]. During the second phase, the selected relay normalizes its received signal and forwards it with power P . Finally, the destination decodes the source information by subtracting the self-interference signal. Note that due to the broadcast nature of wireless communication, the signal transmitted in both the phases could be eavesdropped. In this paper, contrary to most recent literature in multiple untrusted relays [21]–[24] that ignored the information leakage in the second phase of transmission, we consider a more realistic scenario. In our considered scenario, the malicious nodes intercept the transmissions of both the source and the selected relay and then try to capture the information. Denoting xs and xd as the information signal and the jamming signal, respectively, the received signal at the malicious node l (l ∈ {1, ..., K + L}) in first phase can be expressed as √ p (1) yl = λP wH hsl xs + (1 − λ)P hld xd + nl , (2) hsi represents the MRT beamformer at the where w = kh si k source and i (i ∈ {1, ..., K}) indicates the index of the selected relay Ri . In the second phase, the relay amplifies its received signal by an amplification factor of s P G= , (3) 2 λP khsi k + (1 − λ)P |hid |2 + N0 and broadcasts the message xi = Gyi . During the second phase, all the malicious nodes hear the signal diffused by Ri . Thus, the received signal at the malicious node l (l 6= i) can be expressed as (2) yl (1) = Ghil yi + nl . (4) Furthermore, at the destination, after performing selfinterference cancellation, the corresponding signal is given by √ (5) yD = λP Gkhsi khid xs + Ghid nj + nd . Based on (2), the received signal-to-interference-and-noiseratio (SINR) at the selected relay i and the SINR at the malicious node l during the first phase of transmission are respectively, given by γi = λγsi (1 − λ)γid + 1 and (1) γl = i λγnull,l . (1 − λ)γld + 1 (6) By substituting (2) into (4), the received SINR at the malicious node l during the second phase can be expressed as (2) γl = λγsi γil . λγsi + (1 + (1 − λ)γid )(1 + γil ) (7) Moreover, by invoking (5), the SINR at the destination can be obtained as λγsi γid γDi = . (8) λγsi + (2 − λ)γid + 1 The instantaneous secrecy rate corresponding to the selected relay i can be expressed as [6] i+ 1h log2 (1 + γDi ) − log2 (1 + γE ) , (9) Rs(i) = 2 where γE is the amount of information leaked to the malicious 5 nodes. In case of NCE, the information leakage is given by o n (1) (2) N CE . (10) = max γ , γ , γ γE i l l i Let i⋆ denote the index of the best selected relay. A relay that maximizes the instantaneous secrecy rate is selected as i⋆ = arg max Rs(i) . 1≤l≤K+L,l6=i 1≤i≤K Moreover, the information leakage for CE case is given by [28], [29] (14) The optimal relay selection criterion (14) requires the CSI of both hops and all inter-relay channels. Therefore, it is rather L n o X (1) (2) (1) (2) CE max {γi , γl , γl }, γEi = max (γl + γl ) , (11) complicated to be implemented in practice, especially when 1≤l≤K,l6=i the number of source antennas and the number of relays are | {z } |l=1 {z } large. To alleviate this issue, motivated by LSMA at the source, Information leakage 1 Information leakage 2 we will propose a simple relay selection criterion for both NCE where information leakages 1 and 2 describe the information and CE cases. leakage for untrusted relays and passive Eves, respectively. Remark 1: In practical cooperative networks, e.g., an ultra- A. Non-colluding Eavesdroppers dense heterogeneous wireless network, both trusted and unFor NCE case, based on (10), we need to find the maximum trusted relays exist. In such a network, to combat the po- received SINR at the malicious nodes. Due to deploying an tential security attacks from untrusted relays, reliable relay LSMA at the source and by leveraging the Cauchy-Schwarz authentication techniques are implemented, i.e., the network inequality, γ (1) in (6) can be upper bounded by l needs to discriminate between the trusted and untrusted relays i λN CE γnull,l and then adopts the suitable secure transmission policy. The (1) < γi , (15) γl = authentication can be accomplished by traditional key-based (1 − λN CE )γld + 1 cryptographic methods or new physical layer authentication where λ N CE represents the power allocation factor related to (2) (PLA) methods [32], [33]. A novel technique to implement NCE case. Furthermore, γl in (7) can be upper bounded by the PLA is the multi-attribute multi-observation (MAMO) λN CE γsi γil (2) technique [33] in which the joint verification of the received γl < (1 + (1 − λN CE )γid )(1 + γil ) signal strength indicator (RSSI) and the hardware imperfecλN CE γsi tions of the transceivers are exploited to authenticate the < = γi . (16) relay nodes. PLA can also be implemented based on this 1 + (1 − λN CE )γid + 1 feature that the device-dependent hardware impairment inAccording to (6), (15) and (16), the information leakage in phase/quadrature (I/Q) imbalance related to the reception and N CE (10) is simplified as γE = γi . As such, the instantaneous transmission of the relays is unique [32]. secrecy rate in (9) is simplified as  1 + γ i+ 1h Di B. DT Policy log2 . (17) Rs(i) = 2 1 + γ i In DT policy, when the source transmits the information △ 1+γDi signal to the destination, all the relays and the Eves listen. Let φ(λ N CE ) = 1+γi . Notably φ(0) ≥ 1. Therefore, Accordingly, the received SNR at the malicious node l and ⋆ for OPA φ(λN CE ) ≥ 1, where λ⋆N CE is the OPA factor the SNR at the destination are respectively, represented by corresponding to NCE case. Therefore, the operator [·]+ in (17) can be dropped. For NCE case, we have the following (a) ρĥdl (a) d γl = γnull,l ≈ and γD = ρkhsd k2 ≈ Ns γ sd , (12) key result. Ns µsd ∆ 2 where ĥdl = |hH sd hsl | . In (12), (a) follows from the law of large numbers [34] due to large Ns . Applying the LindebergLevy central limit theorem [34], the r.v. ĥdl can be approximated as CN (0, Ns µsd µsl ). It is worth pointing out that ĥdl is very well approximated as a Gaussian r.v. even for small Ns d [35]. Therefore, γnull,l can be considered as an exponential d r.v. with mean γ null,l = ρµsl . For DT policy, the information leakage for NCE and CE cases can be respectively, expressed as [28], [29] N CE γE = max {γl } 1≤l≤K+L and CE γE = max 1≤l≤K n γl , L X j=1 o γj . (13) III. J OINT R ELAY S ELECTION AND P OWER A LLOCATION In this section, we first introduce the optimal relay selection scheme. Then motivated by the LSMA [1], [2], our proposed JRP scheme is presented for both NCE and CE cases. Proposition 1: For a large number of antennas at the source, 1+γ the function φ(λN CE ) = 1+γDii is a quasiconcave function of λN CE in the feasible set and the optimal solution is given by √ 2γid . (18) λ⋆N CE = γsi Proof: By substituting the expressions (6) and (8) into (17), forming the function φ(λN CE ), and then taking the first derivative of it with respect to λN CE , we obtain φ′ (λN CE ) =  γsi C1 λN CE 2 + C2 λN CE + C3 − 2  2 ,  si si − λN CE + 1 λN CE γγid − λN CE + 2 γid λN CE γγid (19)   si si where C1 = ( γγid − 1) (γid + 1) γγid + 2 γid − 1 , C2 =   si 4 γid + 4 γγid − 4 and C3 = −2 γid + 4. For a large number 6 of antennas at the source, γsi ≫ γid , the coefficients are simγ2 γsi plified as C1 = (γid + 1) γsi and C3 = −2γid + 4. 2 , C2 = 4 γ id id ′ By solving φ (λN CE ) = 0, the single feasible solution is γ 3 (1+γ ) obtained as (18). Since φ′ (1) = − si 4γ 3 id < 0, we conclude id that φ(λN CE ) is a quasiconcave function in the feasible set.  Thanks to the LSMA at the source, by applying the law of large numbers [34], we have γsi ≈ Ns γ si . Therefore, the optimal solution (18) that requires the CSI of both hops can be further simplified as √ 2|hid |2 ⋆ λN CE ≈ . (20) Ns µsi The proposed OPA factor in (20) requires only the CSI of the selected relay-destination link and the statistical mean of the source-selected relay link. By substituting (20) into (6) and (8), we obtain √ γid N CE N CE √ . (21) ≈ and γD = γi ≈ 2 γE i i 1+ 2 Therefore, by using (21), the instantaneous secrecy rate in (9) can be rewritten as  1 + γ CE  1 Di √ . (22) Rs(i) = log2 2 1+ 2 The interesting result in (22) indicates that the instantaneous secrecy rate only depends on the transmit SNR and the relaydestination link. As a consequence, the high complexity relay criterion (14) can be approximated as i⋆ CE = arg max γD i 1≤i≤K = arg max |hid |2 . 1≤i≤K (23) The proposed relay selection criterion in (23) requires only the relays-destination channel gains and hence, enjoys from low complexity and energy consumption. Furthermore, the relay selection scheme in (23) can be easily implemented using the distributed timer technique in [36]. In practice, the proposed JRP scheme can be implemented as follows: Before data transmission, the relays are scheduled to transmit pilot symbols [26]. Using the pilots, the source and the destination can estimate their channels. Then according to (23), the destination computes the strongest link between itself and the relays and hence, the relay index i⋆ is selected. Afterward, the destination broadcasts i⋆ and pilot symbols to estimate the destination-relay i⋆ link. Then the relay i⋆ forwards a quantized version of the estimated destination-relay i⋆ to the source (l bits). Finally, both the source and destination tune their optimal transmit power to start communication. Accordingly, the overall overhead required for broadcasting is equal to l + ⌈log2 K⌉ bits. source to transmit the information signal. Based on this, λ⋆CE < λ⋆N CE ≪ 1, where λ⋆CE denotes the OPA factor for (2) CE case. Therefore, γl in (7) can be approximated as (2) γl ≈ (a) λCE γsi γil λCE γsi = γi , ≈ (1 + (1 − λCE )γid )(1 + γil ) (1 − λCE )γid + 1 (24) where (a) follows from the high SNR assumption. The interesting result in (24) expresses that the amount of information leakage to the malicious nodes in the second phase of transmission is approximately the same as the amount of information leaked to the selected relay in the first phase. Based on this new result and given this fact that, the received signal by the malicious nodes in the second phase of transmission is a degraded version of the emitted signal by the selected relay, CE γE in (11) is changed to i CE = γi + γE i L X (1) γl . (25) l=1 For the sake of tractability, according to the fact that λ∗CE ≪ 1, (1) γi and γl in (6) can be rewritten as γi ≈ i λCE γnull,l λCE γsi (1) , γl ≈ . (26) (1 − λCE )(γid + 1) (1 − λCE )(γld + 1) By substituting (26) into (25), we obtain CE = γE i λCE ∆ , 1 − λCE (27) i PL γnull,l γsi where ∆ = γid l=1 γld +1 . Following the same steps +1 + as in Proposition 1, at the high SNR regime, the OPA factor corresponding to CE case can be obtained as r 2γid λ∗CE = . (28) γsi ∆ We can conclude from (28) that by increasing the number of Eves, the most amount of the total power is assigned to the destination to inject jamming signal. Remark 2: In practice, often may not be feasible to achieve the CSI of passive Eves. Based on this practical issue, we consider a scenario, where only the second order statistics related to the Eves’ are available which is a common assumption in the literature [10], [13], [14], [18]. Furthermore, for mathematical simplicity, we assume that the relaying and eavesdropping channels are independent and identically distributed, i.e., for relaying channels with 1 ≤ 1 ≤ K, we consider µsl = µsr and µld = µrd , and for eavesdropping channels with 1 ≤ l ≤ L, we consider µsl = µse and µld = µed [9], [13], [14]. B. Colluding Eavesdroppers For CE case, the Eves jointly try to decode the information signal based on MRC processing and hence, the amount of overheard information increases. To tackle this problem, more power should be dedicated to the destination to confuse the Eves compared to λ⋆N CE in (18) and less power to the Here, we consider the case with large number of passive Eves. As will be observed in numerical examples, the analysis are valid even for moderate number of Eves. Based on the law of large numbers and since the first and the second hops are 7 case E{ γsi1 ∗ }, we used Lemma 2.9 in [38] n 1 o 1 = . E ∗ γsi (Ns − 1)ρµsr independent, we have L i n o n 1 o X γnull,l i ≈ L E γnull,l E γld + 1 γld + 1 l=1 Lµse e ρµed  1 ∆ =− Ei − = θ̂, µed ρµed 1 (29) where we used [31, Eq. (3.352.4)]. By substituting (29) into λ⋆CE in (28) and then substituting into (27) and (8), we obtain r γid γ CE CE q id 2 + 2 θ̂ and γD . = ≈ γE i i γsi id θ̂ 1 + 2 + 2 γγsi (30) CE CE By substituting γE and γD in (30) into (9), the instantai i neous secrecy rate is obtained. Accordingly, we find that the optimal relay selection scheme corresponding to the maximum achievable secrecy rate needs the excessive implementational overhead. The optimal relay selection based on both hops is out of the scope of this paper. As such, we adopt the suboptimal simple relay selection scheme proposed for NCE case in (23). We mention that since the second hop has a dominant impact on quantifying the received SNR at the destination, the relay selection criterion in (23) can be considered as a suboptimal criterion to enhance the secrecy rate. Moreover, in case of very LSMA at the source, the suboptimal relay selection criterion in (23) will be the near-optimal one. For the selected relay i∗ with the relay selection criterion in (23) and with very LSMA at the source, we can use the wellknown approximation of minimum mean square error (MMSE) estimator as follows [1], [37] o n 1 o n γ ∗ o (a) n γi∗ d i d ≈E = E γi∗ d E γsi∗ γsi∗ γsi∗ (b) µrd (Ψ(K + 1) + ̺) △ = η, (31) = (Ns − 1)µsr where ̺ = 0.577 [31] is Euler’s constant. In (31), (a) follows from the fact that the two-hops are independent and (b) follows from evaluating E{γi∗ d } and E{ γsi1 ∗ }. For the first case, E{γi∗ d }, we have  o Z ∞ n 1 − Fγi∗ d (x) dx E γi∗ d = 0   (32) = ρµrd Ψ(K + 1) + ̺ , where the last equality follows from using the cdf of γi∗ d which can be obtained based on order statistics [34] Fγi⋆ d (γ) = K h Y γ i 1 − exp (− ) . γ id i=1 =1+ K 2X −1 (33)  X γ  (−1)|un | exp − , γ id n=1 i∈u (34) n where |un | denotes the cardinality of the n-th non-empty subcollection of the K relays, and the last expression follows from applying the binomial expansion theorem. For the second Therefore, by substituting (31) into (30), we arrive at q γ∗ CE CE qi d γE ≈ 2 + 2η θ̂ and γD = . i∗ i∗ 1 + 2 + 2η θ̂ (35) (36) CE We conclude from (36) that the constant value γE increases i∗ by increasing the number of Eves in the network. By equipping the source with √very LSMA Ns → ∞, this information leakage tends to 2 the same as NCE case. Comparing (21) for NCE and (36) for CE, we can define the new parameter C to integrate the performance analysis for NCE and CE cases. Based on this definition, we have p γ∗ pi d , (37) γEi∗ ≈ 2(1 + C) and γDi∗ ≈ 1 + 2(1 + C) where C = 0 for NCE case and C = η θ̂ for CE case. Remark 3: Both the network power optimization and performance analysis presented in this paper, can be routinely extended to the scenario that the untrusted relays and passive Eves collaboratively decode the information signal based on MRC technique. Remark 4: According to the results in (15) and (24), the received SNR at the malicious nodes in the second phase of transmission is more than that one in the first phase of transmission. Therefore, when SC is adopted at the malicious nodes, and all of them cooperate to decode the information signal, the network power optimization and performance analysis are similar to the NCE case. IV. P ERFORMANCE A NALYSIS In this section, we derive new closed-form expressions for the probability of positive secrecy rate, the ESR and the SOP as the metrics of security and the SER as the reliability measure. Both the proposed JRP scheme (which is based on DBCJ policy) and the DT policy are studied. A. Probability of Positive Secrecy Rate In this section, we proceed to derive the probability of positive secrecy rate for the proposed DBCJ and DT policies. DBCJ Policy: By substituting (37) into (9) and using the proposed relay selection criterion in (23), the probability of positive secrecy rate can be expressed as n ⋆ o DBCJ Ppos = Pr Rs(i ) > 0 o n p = Pr γi⋆ d > 2(1 + C) + 2(1 + C)   p = 1 − Fγi⋆ d 2(1 + C) + 2(1 + C) K h  2(1 + C) + p2(1 + C) i Y (a) , 1− exp − = 1− γ id i=1 (38) 8 where (a) follows from substituting (33). It can be concluded from (38) that, the proposed JRP is not efficient when the average transmit SNR of the second hop γ id (which is a function of the transmit SNR ρ and the distance-dependent channel gain µid ) is low. This observation is not surprising, because when the DBCJ policy is adopted, due to the halfduplex operation of the nodes, the direct link between the source and destination is vanished. As such, the destination only relies on the second hop to receive the information signal form the source. Consequently, the reliability of confidential communication is degraded when the relays are far from the destination or the transmit SNR is low. In the high SNR regime, (38) is simplified as K K Y  p 1 DBCJ . Ppos = 1 − 2(1 + C) + 2(1 + C) γ i=1 id (39) We deduce from (39) that the probability of positive secrecy rate approaches one as the transmit SNR or the number of relays increases. The reason is that as K grows, the occurrence probability of a stronger channel between relays DBCJ and the destination increases and thus, Ppos approaches one. DT Policy: For this policy, we will study the NCE case and CE case separately, below. 1) NCE Case: In this case, by combining (9), (10) and (12), the probability of positive secrecy rate can be obtained as  n  DT,NCE = Pr log2 1 + Ns γ sd Ppos  o  d >0 − log2 1 + max γnull,l 1≤l≤K+L ≈ K+L Y  l=1 1−e − Ns µsd µsl l , (40) d where the last expression follows from the fact that γnull,l can be approximated as an exponential r.v., as mentioned in DT,NCE Section II-B. This result reveals that Ppos → 0 as the number of malicious nodes goes to infinity. Furthermore, one DT,NCE can obtain Ppos → 1 as Ns → ∞, which is an intuitive observation, since by increasing Ns , the source with an LSMA focuses the transmission energy toward the direction of the selected relay. Hence, the strength of the received signals at the malicious nodes will be low enough. Based on this, the malicious nodes fail to extract the information. Furthermore, in contrast to DBCJ policy that the confidential communication is solely dependent on the second hop channel, expression (40) illustrates that since the probability of positive secrecy rate for DT policy is independent of the transmit SNR, the DT can offer secure transmission even for low transmit SNRs by deploying large number of source antennas Ns . CE 2) CE Case: As mentioned in (13), in this case γE = PL max1≤l≤K {γl , j=1 γj }. To obtain the probability of positive CE secrecy rate, we first find the cdf of γE . Using order statistics ∆ R [34], the cdf of γE = max1≤l≤K {γl } is given by [9], [34] FγER (γ) = 1 + K 2X −1  X γ  . (−1)|un | exp − γ sl n=1 l∈un (41) The following lemma from [39] helps to obtain the cdf of PL Eve ∆ γE = j=1 γj in (13). Lemma 1: Let {Xi }ni=1 , n > 1, be independent exponential r.vs with distinct averages µi . Then the cdf of their sum W = X1 + X2 + ... + Xn is given by n   X − x Γ(µj ) 1 − e µj , x > 0. (42) FW (x) = j=1 ∆ where Γ(µj ) = Q n 1 i=1 µi  µj 1 k6=j,k=1 ( µk Qn − µ1 ) . j CE Using (41) and leveraging Lemma 1, the cdf of γE in (13) can be expressed as FγECE (γ) = FγER (γ)FγEEve (γ) K −1 L   2X X γ  X − x = 1+ (−1)|un | exp (− Γ(γ̄sj )(1 − e γ̄sj ) . ) γ sl n=1 j=1 l∈un (43) Hence, the probability of positive secrecy rate for DT policy under the presence of CE can be expressed as DT,CE Ppos = FγECE (Ns γ sd ), (44) CE where the cdf of γE is in (43). From (44), we observe that when Ns → ∞, the secure communication is established, while for large number of malicious nodes, the secure transmission is harmed. B. Ergodic Secrecy Rate The ESR as a useful secrecy metric characterizes the average of the achievable instantaneous rate difference between the legitimate channel and the wiretap channel. In the following, we derive new accurate closed-form expressions for the ESR of both DBCJ based and DT policies. DBCJ Policy: By substituting (37) into (9) and using the relay selection criterion in (23), the ESR can be written as Z ∞   1 γ DBCJ p fγi⋆ d (γ)dγ Rs = ln 1 + 2 ln 2 0 1 + 2(1 + C)   p 1 − log2 1 + 2(1 + C) 2 i h Z ∞ (γ) 1 − F γ ⋆ i d 1 (a) p = dγ 2 ln 2 0 γ + 1 + 2(1 + C)   p 1 (45) − log2 1 + 2(1 + C) , 2 where (a) follows from using integration by parts. To obtain a closed-form solution for the ESR, by substituting (34) into (45) and using [31, Eq. (3.352.4)], we get √ 2 −1 P 1+ 2(1+C) 1 X |un | i∈un γ id (−1) e = 2 ln 2 n=1  X 1 + p2(1 + C)  1 p − log2 (1 + 2(1 + C)). × Ei − γ id 2 i∈u K RsDBCJ n (46) 9 We remark that the ESR in (46) is explicitly characterized by the average channel gains between the relays and destination, and the transmit SNR of the network. As observed, increasing the number of antennas at the source Ns has no impact on the ESR performance. For a single-relay network without any passive Eve, the ESR in (46) is simplified as √  1 + √2  1 √ 1+ 2 1 DBCJ γ 1d e − log2 (1 + 2), Rs =− Ei − 2 ln 2 γ 1d 2 (47) which was derived in [19], [20]. As such, the works [19], [20] can be considered as a special case of our work. We can further calculate the ESR performance in the high SNR regime when ρ → ∞ by applying the general asymptotic form given by [30]   (48) Rs∞ = S∞ log2 ρ − L∞ , impacts of µid , the number of relays K and the number of passive Eves L on the ESR and shows that the power offset is independent of Ns . As expected, we find that increasing the number of passive Eves increases the ESR power offset which corresponds to a decrease in the ESR. DT Policy: In the following, we investigate the ESR performance of DT policy for both NCE and CE cases. where S∞ is the high SNR slope in bits/s/Hz/ (3 dB) and L∞ is the high SNR power offset in 3 dB units. These parameters are two key performance factors that explicitly examine the N CE 1) NCE Case: In this case, by substituting γE in (13) ESR performance at the high SNR regime which are defined and γD in (12) into (9), we have respectively, as [30] nh    RsDT,NCE = E log2 1 + Ns γ sd Rs∞ Rs∞  S∞ = lim . (49) and L∞ = lim log2 ρ −  i+ o ρ→∞ log2 ρ ρ→∞ S∞ d − log2 1 + max γnull,l (54) 1≤l≤K+L We mention that the high SNR slope is also recognized as  h  the maximum multiplexing gain or the number of degrees of ≥ log2 1 + Ns γ sd freedom [30]. Based on (37), in the high SNR regime with oi+ △  n DT,NCE d , = Rs,LB − E log2 1 + max γnull,l ρ → ∞, we have ln(1 + γDi ) ≈ ln(γDi ). As such, the ESR 1≤l≤K+L of the proposed JRP scheme can be represented by (55) n o   p 1 n o E ln(γi⋆ d ) − log2 1 + 2(1 + C) . (50) Rs∞ = 2 ln 2 where the inequality follows from the fact E max{x, y} ≥ n o By taking the derivative of (34) with respect to γ to obtain max E{x}, E{y} [21]. Following the same steps presented the pdf of γi∗ d , and then applying [31, Eq. (4.331.1)], the to derive the ESR of DBCJ policy, (55) is given by asymptotic ESR can be obtained as h   DT,NCE K R = log 1 + N γ 2 −1 s h i 2 sd s,LB X 1 1  X Rs∞ = (−1)|un | ln( )+̺ K+L 2 −1 P  X 1 i+ 2 ln 2 n=1 γ 1 1 X i∈un id , (−1)|vn | e i∈vn γ sj Ei − −   p ln 2 n=1 γ sj i∈v (51) − log2 1 + 2(1 + C) . n (56) Using (49), the high SNR slope is given by where |vn | denotes the cardinality of the n-th non-empty 1 S∞ = , (52) subcollection of the K + L nodes. We remark that at the 2 high SNR regime, the instantaneous secrecy rate (54) is further P2K −1 where we used the fact that n=1 (−1)|un | = −1. Expres- simplified as i+   h  sion (52) highlights that the number of source antennas Ns and DT,N CE . (57) max ĥld = 2 log2 Ns µsd − log2 the presence of collaborative eavesdropping have no impact on Rs 1≤l≤K+L the ESR slope. Expression (57) states that the instantaneous secrecy rate Furthermore, the high SNR power offset is derived as of DT is independent of the transmit SNR, i.e., a secrecy K 2X −1 rate ceiling appears when the transmit SNR increases. In X 1 ̺ )+ L∞ = − (−1)|un | log2 ( other words, the high SNR slope of DT policy is zero. We µ ln 2 n=1 i∈un id conclude that, unlike the DBCJ policy, the DT cannot achieve   p + 2 log2 1 + 2(1 + C) , (53) high secure transmission rates. Furthermore, as observed from (57), the ESR decreases by increasing the number of where a decrease in the power offset corresponds to an malicious nodes while the ESR increases as Ns grows. increase in the ESR. Expression (53) characterizes the 10 CE 2) CE Case: In this case, by using γE in (13), a tight lower bound for the ESR of CE case can be obtained as h   n  oi+ DT,CE CE Rs,LB = log2 1 + Ns γ sd − E log2 1 + γE L  X   1 1  Γ(γ̄sj )e γ̄sj Ei − = log2 1 + Ns γ sd + γ̄sj j=1 h − + K L 2X −1 X (−1)|un | Γ(γ̄sj )e P 1 l∈un γ sl Ei(− n=1 j=1 K L 2X −1X 1 (−1)|un| Γ(γ̄sj )e γ̄sj + 1 ) γ̄sl P 1 l∈un γ sl n=1 j=1  X 1 i+ 1 × Ei − , − γ̄sj γ sl (58) l∈un CE where we used the cdf of γE in (43) and [31, Eq. (3.352.4)]. Similar to NCE case, a secrecy rate ceiling appears in the high SNR regime which limits the secrecy performance of DT policy. C. Secrecy Outage Probability The overall SOP denoted by Pout is defined as the probability that a system with the instantaneous secrecy rate Rs is unable o the target transmission rate Rt , i.e., n to support Pout = Pr Rs < Rt . DBCJ Policy: By Substituting (37) into the SOP definition, we obtain o n DBCJ et Pout = Pr γi⋆ d < R K h  R   Y bt i et = , (59) 1 − exp − = Fγi⋆ d R γ id i=1    p p et = 1 + 2(1 + C) 22Rt (1 + 2(1 + C)) − 1 . where R To derive (59), we used the cdf of γi∗ d in (34). Expression (59) indicates that the SOP approaches zero as the transmit SNR ρ → ∞. For a single-relay case and without passive Eve, the overall SOP is simplified as  (1 + √2)(22Rt (1 + √2) − 1)  DBCJ Pout = 1 − exp − , (60) γ 1d which was derived in our previous work [20]. Therefore, this new work extends the recent work [20]. Now, we look into the high SNR regime and investigate the diversity order. In the high SNR regime, the closed-form expression in (59) can be written as DBCJ et )K ≈ (R Pout K Y 1 . γ i=1 id (61) By inspecting (61), we interestingly find that the diversity order of the system equals to the number of untrusted relays K. To justify this new result intuitively, we can say that in the considered LSMA-based network, under applying the OPA, the first hop channel becomes deterministic and only the second hop contributes for signal transmission. Increasing the number of untrusted relays, actually increases the probability of having a stronger link in the second hop. Therefore, the secrecy diversity order of the system increases which in turn decreases the secrecy outage probability. DT Policy: To study the SOP of DT policy, we have two cases of NCE and CE. N CE 1) NCE Case: By substituting γE in (13) and γD in (12) into (9), and then formulating the SOP, we obtain o  n  1 + Ns γ sd DT,NCE < R Pout = Pr log2 t d 1 + max1≤l≤K+L γnull,l n o 1 + Ns γ sd d = 1− Pr max γnull,l < − 1 1≤l≤K+L 2 Rt K+L  i Y h 1 1 + Ns γ sd = 1− 1 − exp − − 1) . ( γ sl 2 Rt l=1 (62) DT,NCE Pout The expression (62) indicates that → 1 as the number of malicious nodes grows. One can easily conclude from (62) that an error floor occurs at the high SNR regime. This means that the secrecy diversity order of MRT-based DT policy is zero. This result is the same as the results in [30], where the authors considered transmit antenna selection at the transmitter and receive generalized selection combining DT,NCE at the receiver. Moreover, we can conclude Pout → 0 as Ns → ∞. 2) CE Case: In this case, we obtain o n 1 + N γ  s sd DT,CE < R Pout = Pr log2 t CE 1 + γE  1 + N γ s sd = 1 − FγECE − 1 , (63) R 2 t where FγECE (γ) is in (43). Expression (63) states that similar to NCE case, the SOP of CE case tends to a constant in the high SNR regime. Furthermore, we find that the SOP of CE case approaches zero as Ns → ∞. D. Average Symbol Error Rate In this subsection, we evaluate the SER of the proposed JRP scheme. The SER of the DT scheme is available in the literature [39, Sec. 3] and is omitted for brevity. The instantaneous SER √ of coherent modulation is in the form of Ps = αm Q( βm γD ), where γD represents the received SNR, and αm and βm depend on the modulation type. Specifically, for rectangular M -ary quadrature amplitude 3 modulation, αm = 4(1 − √1M ) and βm = M−1 . Moreover, for M -ary phase-shift keying (M ≥ 4), αm = 2 and π βm = 2 sin2 M [39]. Using the average SER of coherent modulation as [39] Z ∞  t2  t2 αm exp(− )dt, (64) Ps = √ FγD βm 2 2π 0 11 the average SER of the proposed JRP system using (33) can be expressed as Z ∞ αm t2 DBCJ √ Ps = exp(− ) 2 2π 0 p K h  Y (1 + 2(1 + C))t2 i dt 1 − exp − × βm γ id i=1 K 2X −1  αm  (−1)|un | r = , 1+ √ 2 P 1+ 2(1+C) n=1 1 + 2 i∈un βm γ id (65) where the last expression follows applying q the binoR ∞ from 2 mial expansion and the fact 0 e−qx dx = 12 πq [31, Eq. (3.318.3)]. For a single-relay system, the average SER is s  βm γ 1d αm  √ . (66) Ps = 1− 2 βm γ 1d + 2 + 2 In the high √ SNR regime, √ i.e., γ̄id → ∞, we have 1 − (1+ 2C)t2 (1+ 2C)t2 exp(− βm γ ) ≈ βm γ . Accordingly, the expression id id (65) can be approximated as K  p αm 1 + 2(1 + C) Z ∞ t2 PsDBCJ ≈ t2k e− 2 dt. (67) √ QK K 2πβm i=1 γ id 0 q R ∞ 2k −px2 π Using the facts that 0 x e dx = (2k−1)!! p [31, Eq. 2(2p)k (3.416.3)] with (2k−1)!! = (2k)! 2k k! , the high SNR approximation of the overall average SER can be obtained as p αm (2K)!(1 + 2(1 + C))K DBCJ Ps ≈ . (68) QK K 2K+1 K! βm i=1 γ id By inspecting (68), we observe that the DBCJ policy achieves a diversity order of K. V. D IVERSITY-M ULTIPLEXING T RADEOFF As is known, multi-antenna systems offer two different types of benefits in a fading channel: diversity order and multiplexing gain [39]. The DMT describes this trade-off by presenting a trade-off between the error probability and the data rate of a system [39]. Recently, the secrecy DMT of a MIMO wiretap channel has been addressed in [40], where a zero-forcing (ZF) transmit scheme is utilized. In the following, we evaluate the DMT of the proposed JRP scheme from the perspectives of security and reliability. A. Secrecy Perspective Let d and r be the diversity order and the multiplexing △ 2 Pout gain of the presented system, defined as d = − lim loglog ρ ρ→∞ △ Rt , ρ→∞ log2 ρ and r = lim 2 respectively. Substituting (61) into the diversity order definition and using Rt = r log2 ρ, the DMT can be obtained as   p PK 2Rt (1 + γ −K log 2 2(1 + C))−1 log 2 2 id i=1 d = lim ρ→∞ log2 ρ = K(1 − 2r). (69) It is observed that when the multiplexing gain is not utilized (r → 0), the diversity order equals the maximum value d = K, which is consistent with our previous results. On the other hand, a multiplexing gain of r = 0.5 is achieved as d → 0. This is because, in the presented cooperative network, it takes two time slots to complete the transmission of one traffic flow, and hence, the maximum multiplexing gain of such network is just 0.5. This can be dealt with utilizing a two-way network. B. Reliability Perspective log2 Ps . ρ→∞ log2 ρ In this case, d = − lim By substituting (68) into the diversity order definition and using Rt = r log2 ρ, the DMT is given by d = K(1 − r). (70) One can conclude from (70) that in the absence of a multiplexing gain (r → 0), the diversity order is K. On the other hand, a multiplexing gain of r = 1 is achieved as d → 0. VI. N UMERICAL R ESULTS AND D ISCUSSION In this section, numerical examples are presented to verify the accuracy of the derived performance metrics (ESR, overall SOP and average SER) for the proposed JRP transmission scheme. Numerical curves for the exact JRP scheme, marked with filled circles, are obtained using the optimum relay selection criterion in (14) together with the OPA, which is numerically evaluated for a finite number of source antennas using the bisection method. We compare our proposed JRP scheme for both the NCE and CE cases with other well-known transmission schemes as listed below: 1) Equal power allocation (EPA) between source and destination (λN CE = λCE = 0.5) with random relay selection, which is denoted by “EPRR”, 2) OPA between source and destination with random relay selection, which is denoted by “OPRR”, 3) EPA between source and destination with the optimum relay selection in (14), which is denoted by “EPRS”, 4) The exact JRP scheme for the scenario of adopting the MRC technique at the malicious nodes for NCE case, and 5) The DT policy, wherein both the untrusted relays and passive Eves are considered as pure Eves. To verify the accuracy of the derived LSMA-based expressions for the ESR of JRP, the SOP of JRP, the SER of JRP, the ESR of DT for NCE, the ESR of DT for CE, the SOP of DT for NCE, the SOP of DT for CE and the SER of JRP in (46), (59), (65), (56), (58), (62), (63) and (65) respectively, we conduct Monte-Carlo simulations, where results are shown in Figs. 2 12 Ergodic secrecy Rate (bits/s/Hz) 4 3.5 5 JRP for K=1 using SC, Eq. (46) JRP for K=1 using MRC JRP for K=5 using SC, Eq. (46) JRP for K=5 using MRC EPRR, K={1,5} DT for K=1, Eq. (56) DT for K=5, Eq. (56) 3 Proposed JRP, K=1 4.5 4 Ergodic Secrecy Rate (bits/s/Hz) 4.5 EPRR, K={1,5} 2.5 2 Proposed JRP, K=5 1.5 DT, K=1 1 JRP for K=1, Eq. (46) JRP for K=5, Eq. (46) EPA for K=1 EPRR for K=5 DT for K=1, Eq. (58) DT for K=5, Eq. (58) 3.5 Proposed JRP, K=1 3 2.5 EPRR, K={1,5} Proposed JRP, K=5 2 1.5 1 DT, K=5 0.5 0 0 DT, K=5 0.5 5 10 15 20 25 Transmit SNR [dB] 30 35 0 0 5 10 15 20 25 Transmit SNR [dB] DT, K=1 30 35 Fig. 2. ESR versus the transmit SNR for the NCE case and for different transmission schemes. We consider K = {1, 5} relays, the multi-passive Eve L = 5 scenario, and Ns = 16 source antennas. The asymptotic curves for the JRP scheme are shown with dashed lines using Eq. (51), while the filled circles depict the Monte-Carlo simulations. Fig. 3. ESR versus the transmit SNR for the CE case and for different transmission schemes. We consider K = {1, 5} relays, the multi-passive Eve L = 5 scenario, and Ns = 16 source antennas. The asymptotic curves for the JRP scheme are shown with dashed lines using Eq. (51), while the filled circles depict the Monte-Carlo simulations. - 7. Furthermore, we plot the derived asymptotic expressions for the ESR, SOP and SER of the proposed JRP scheme given by (51), (61) and (68), respectively. As will be observed from Figs. 2 - 7, our LSAM-based closed-form expressions well matched with the simulation results, and the asymptotic curves well approximate the exact curves in the high SNR regime. For simplicity and without loss of generality, we assume that the source, destination and relay(s) are located at the positions (-1,0), (0,0), and (1,0) respectively, and the passive Eves are placed near the relays to overhear the maximum information. Unless otherwise stated, the values of network parameters are: number of antennas at the source Ns = 16, number of untrusted relays K = {1, 5}, number of passive Eves L = 5, the target rate Rt = 1 bits/s/Hz and the distance-dependent path loss factor α = 3. Figure 2 shows the achievable ESR versus the transmit SNR ρ for NCE case. Our observations are summarized as follows: 1) The ESR performance of the proposed JRP scheme is a monotonically increasing function of the transmit SNR ρ while the ESR of the DT scheme converges to a constant value as presented in Section IV-B. The reason behind this behavior of the JRP scheme is that the injected jamming signal by the destination only degrades the received information signal at the malicious nodes and has no effect on the overall two-hop signal reception at the destination. As such, the secrecy performance of the DBCJ-based JRP scheme is superior to the performance of the DT policy in the high SNR regime, while the opposite behavior is observed at the low SNR regime. The reason is that by equipping the source with an LSMA and adopting an MRT beamformer the received SNR at the destination for DT becomes considerable, while the information leakage is negligible as computed in (12). We also mention that, as discussed in Section IVA, the secrecy performance of the JRP is not satisfactory when the average transmit SNR of the second hop is low. Therefore, the proposed JRP suffers from w secrecy performance loss in the low SNR regime. 2) The ESR performance of the JRP scheme increases as K grows, which can be concluded form (22). This is because by increasing K, the probability of emerging a stronger channel between the relays and destination grows and accordingly, the secrecy rate increases. Contrary to the JRP scheme, the ESR of the DT policy decreases by increasing K. The reason is that according to (12), the received SNR at the destination is deterministic, while based on (13), the amount of information leakage increases as K grows. 3) The secrecy rate advantage of JRP scheme compared with EPRR is obvious. For example, the SNR gap between the proposed JRP scheme and EPRR is about 8 dB for K = 1 case; this gap is about 13 dB for K = 5 case to achieve the target transmission rate of 2 bits/s/Hz. 4) The secrecy performance of the proposed JRP scheme with SC at the malicious nodes is close to the secrecy performance of the exact JRP with MRC technique. In Fig. 3, we plot the ESR performance versus the transmit SNR ρ for the CE case. As can be seen, the proposed JRP scheme which is based on the near-optimal relay selection criterion in (23) is in perfect agreement with the exact numerical results across the entire SNR range of interest. As can be seen 13 JRP for NCE with L={5,50} & CE with L=5 JRP for CE with L=50 OPRR for NCE with L={5,50} & CE with L=5 OPRR for CE with L=50 EPRS for NCE with L={5, 50} & CE with L=5 EPRS for CE with L=50 DT for NCE with L=5 DT for NCE with L=50 & CE with L=5 DT for CE with L=50 Ergodic Secrecy Rate (bits/s/Hz) 5 4 Proposed JRP 3 2 OPRR Policy EPRS Policy 1 0 0 10 10 10 40 60 Number of Relays (K) 80 100 DT, K=1 −2 Proposed JRP, K=1 10 10 20 −1 EPRR, K={1,5} 10 DT Policy 0 DT, K=5 Secrecy Outage Probability 6 −3 −4 −5 0 Proposed JRP, K=5 JRP for K=1, Eq. (59) JRP for K=5, Eq. (59) EPRR for K={1,5} DT for K=1, Eq. (62) DT for K=5, Eq. (62) 10 20 30 Transmit SNR [dB] 40 Fig. 4. ESR versus the number of untrusted relays for the transmit SNR of ρ = 20 dB. We consider the multi-Eve scenario with L = {5, 50}, where the number of source antennas Ns = 256. The filled circles are obtained with the Monte-Carlo simulations. Fig. 5. Overall SOP versus the transmit SNR for the NCE case with K = {1, 5} relays and L = 5 passive Eves. The number of source antennas is set to Ns = 16 and the target rate to Rt = 1 bits/s/Hz. The asymptotic curves are shown with dashed lines using Eq. (61), while the filled circles depict the Monte-Carlo simulations. from Fig. 3, the ESR performance of the proposed JRP scheme increases by increasing K, while the opposite is observed for DT policy. Furthermore, we can conclude from Fig. 3 that the ESR of the proposed scheme significantly outperforms the EPRR policy. Figure 4 examines the impact of the number of untrusted relays K on the ESR performance of the proposed JRP scheme for the NCE and CE cases. We set the number of source antennas to Ns = 256 and the transmit SNR ρ = 20 dB. We also consider two cases of small L = 5 and large L = 50 number of passive Eves. The following observations can be made from Fig. 4: can be extracted by Eves, leading to ESR loss relative to NCE case. 3) When OPRR is adopted in the network, the ESR performance for both NCE and CE cases is a constant function of K. The reason is that when one relay is randomly selected out of K available relay nodes and OPA is applied, it is statically equivalent to the single-relay scenario with OPA. For large number of Eves L = 50, due to the collaboration between Eves, the ESR of CE case is somewhat fewer than the NCE case. 4) The ESR performance of DT policy for NCE is a decreasing function of K. The reason is that by increasing K, the probability of emerging a stronger wiretap channel increases and therefore, the ESR decreases. However, for CE with large number of Eves, the ESR is a constant function with respect to K. The reason is that both the amount of information leakage and the received SNR at the destination are independent of the number of untrusted relays. We note that according P to (13) and CE the law of large numbers, we have γE = L j=1 γj ≈ Lρµse which is independent of K. 5) The ESR performance of EPRS for both NCE and CE cases is an increasing function of K. This result highlights the effectiveness of relay selection in LSMAbased security networks even without applying OPA. 1) As predicted by the analytical expressions and discussions in Section IV-B, the ESR performance of the proposed JRP scheme for NCE and CE cases is a monotonically increasing function of the number of untrusted relays K. This new result highlights that, unlike the results in [21], [22], the proposed LSMAbased scheme increases the secrecy rate of the network by utilizing more untrusted relays. 2) The proposed JRP scheme for the NCE case with any number of Eves offers a superior ESR performance relative to the CE case with large number of Eves L = 50. This event can be justified simply based on the new results presented in Section III-B. The reason is that by equipping the source with an LSMA, the amount of information leaked to the malicious nodes in the first of transmission is negligible compared to that one in the second phase. Therefore, for CE with small number of Eves L = 5, the ESR performance is the same as NCE case, while with large number of Eves, some information In Figs. 5 and 6, we compare the overall SOP versus the transmit SNR ρ for NCE and CE cases, respectively. The results in Figs. 5 and 6 indicate that the SOP performance advantage of our proposed secure transmission scheme compared to the EPRR policy. As can be readily observed from these figures, unlike DT policy that the SOP performance converges 14 10 0 10 DT, K=5 0 DT, K=1 10 EPRR, K={1,5} 10 10 10 10 Proposed JRP, K=1 −2 −3 −4 −5 0 10 Proposed JRP, K=5 10 JRP for K=1, Eq. (59) JRP for K=5, Eq. (59) EPRR for K=1 EPRR for K=5 DT for K=1, Eq. (63) DT for K=5, Eq. (63) 10 20 Transmit SNR [dB] Average Symbol Error Rate Secrecy Outage Probability 10 −1 10 30 40 Fig. 6. Overall SOP versus the transmit SNR for the CE case with K = {1, 5} relays and L = 5 passive Eves. The number of source antennas is set to Ns = 16 and the target rate to Rt = 1 bits/s/Hz. The asymptotic curves are shown with dashed lines using Eq. (61), while the filled circles depict the Monte-Carlo simulations. to a nonzero constant as ρ → ∞, the SOP of the proposed JRP scheme for both NCE and CE cases approaches zero in the asymptotic SNR regime. Furthermore, as mentioned in Section IV-C, the proposed JRP scheme achieves the diversity order equal to the number of untrusted relays, which can be obtained simply from the asymptotic curves in Figs. 5 and 6. Finally, we observe from Fig. 6 that, while the DT policy fails to establish confidential communication for target secrecy rate of Rt = 1 bits/s/Hz, the proposed JRP scheme enhances the PLS remarkably. This highlights the efficiency of the proposed JRP scheme. To study the level of reliability of the proposed secure transmission scheme, we plot the average SER metric in Fig. 7. We consider the multi-relay scenario with K = 5 and QPSK modulation. For this network topology, the DT policy offers a superior average SER relative to the proposed JRP scheme. The reason is that the DT policy provisions a better SNR at the destination compared with the proposed scheme. Furthermore, as observed, the average SER of NCE case is lower than the CE case. The reason is that according to the received SINR CE N CE at the destination in (37), we have γD ≤ γD . Moreover, we can conclude from Fig. 7 that the proposed JRP scheme is better compared to OPRR. For example, the SNR gap between the optimized network and OPRR is approximately 13 dB for NCE and 12 dB for CE, respectively, when Ps = 10−2 . This is because the proposed JRP selects the relay with the largest second hop channel to signal transmission. Consequently, the achievable reliability of the proposed scheme is higher than the random relay selection of the OPRR policy. Evidently, unlike the OPRR, the proposed scheme attains diversity order d = 5. 10 OPRR Policy −1 −2 −3 DT Policy Proposed JRP −4 −5 0 JRP for NCE, Eq. (65) JRP for CE, Eq. (65) OPRR for NCE OPRR for CE DT [39] 5 10 15 20 Transmit SNR [dB] 25 30 Fig. 7. Average SER versus the transmit SNR for the number of relays K = 5 and multi-Eve L = 5 scenario. The number of source antennas Ns = 16 and QPSK modulation is used. The asymptotic curves are shown with dashed lines using Eq. (68), while the filled circles depict the Monte-Carlo simulations. VII. C ONCLUSION In this paper, we addressed secure transmission in a two-hop relaying network including a multiple antennas source, a single antenna destination, single antenna untrusted relays and single antenna passive Eves. We considered two practical scenarios of NCE and CE. A novel JRP scheme has been proposed for security enhancement of the two NCE and CE networks. For the proposed JRP scheme, a new closed-form expression was presented for the ESR and the SOP as security metrics, and a new closed-form expression was derived for the average SER as a reliability measure over Rayleigh fading channels. We further evaluated the high signal-to-noise ratio slope and power offset of the ESR to reveal the impacts of system parameters on the achievable ESR. Our findings highlighted that the diversity order of the proposed JRP scheme is equal to the number of untrusted relays. Numerical results presented that the ESR of the proposed JRP scheme for NCE and CE cases increases as the number of untrustworthy relays grows. It would be interesting to extend the results in this paper to the case, where trusted relays are also exist in the network. Thus, we would like to consider this case as future work. Acknowledgments The authors deeply thank Prof. Dimitris Toumpakaris and Prof. Lajos Hanzo for their constructive comments to improve the paper. The authors also would like to thank the editor and the anonymous reviewers for the constructive comments. R EFERENCES [1] F. Rusek, D. Persson, B. K. Lau, E. G. Larsson, T. L. Marzetta, O. Edfors, and F. Tufvesson, “Scaling up MIMO: Opportunities and challenges with very large arrays,” IEEE Sig. Proc. Mag., vol. 30, no. 1, pp. 40-46, Jan. 2013. 15 [2] E. G. Larsson, F. Tufvesson, O. Edfors, and T. L. Marzetta, “Massive MIMO for next generation wireless systems,” IEEE Commun. Mag., vol. 52, no. 2, pp. 186-195 , Feb. 2014. [3] D. Kapetanovic, G. Zheng, and F. Rusek, “Physical layer security for massive MIMO: An overview on passive eavesdropping and active attacks,” IEEE Commun. Mag., vol. 53, no. 6, pp. 21-27, Jun. 2015. [4] Y. Wu, R. Schober, D. W. K. Ng, C. Xiao, and G. Caire, “Secure massive MIMO transmission with an active eavesdropper,” IEEE Trans. Inf. Theory., vol. 62, no. 7, pp. 3880-3900, July 2016. [5] D. B. Rawat, T. White, M. S. Parwez, C. Bajracharya, and M. Song, “Evaluating secrecy outage of physical layer security in large-scale MIMO wireless communications for cyber-physical systems,” IEEE Internet of Things Journal, Apr. 2017. [6] X. He and A. Yener, “Two-hop secure communication using an untrusted relay: A case for cooperative jamming,” in Proc. IEEE Global Commun. Conf. (Globecom), New Orleans, LA, Dec. 2008, pp. 15. [7] A. Mukherjee, S. A. A. Fakoorian, J. Huang, and A. L. Swindlehurst, “Principles of physical layer security in multiuser wireless networks: A survey,” IEEE Commun. Surveys Tuts., vol. 16, no. 3, pp. 1550-1573, Feb. 2014. [8] X. Chen, D. W. K. Ng, W. Gerstacker, and H-H. Chen, “A survey on multiple-antenna techniques for physical layer security,” IEEE Commun. Surveys Tuts., vol. 19, no. 2, pp. 1027-1053, Jun. 2017. [9] Y. Zou, X. Wang, W. Shen, and L. Hanzo, “Security versus reliability analysis of opportunistic relaying,” IEEE Trans. Veh. Tech., vol. 63, no. 6, pp. 2653-2661, Jul. 2014. [10] C. Wang, H.-M. Wang, and X.-G. Xia, “Hybrid opportunistic relaying and jamming with power allocation for secure cooperative networks,” IEEE Trans. Wireless Commun., vol. 14, no. 2, pp. 589-605, Feb. 2015. [11] H.-M. Wang, C. Wang, and D. W. K. Ng, “Artificial noise assisted secure transmission under training and feedback”, IEEE Trans. on Signal Process., vol. 63, no. 23, pp. 6285-6298, Dec. 2015. [12] D. Fang, N. Yang, M. Elkashlan, P. L. Yeoh, and J. Yuan, “Cooperative jamming protocols in two-hop amplify-and-forward wiretap channels,” in Proc. IEEE Int. Conf. Commun. (ICC), Budapest, Hungary, pp. 21882192, Nov. 2013. [13] I. Krikidis, J. S. Thompson, and S. McLaughlin, “Relay selection for secure cooperative networks with jamming,” IEEE Trans. Wireless Commun., vol. 8, no. 10, pp. 5003-5011, Oct. 2009. [14] L. Wang, Y. Cai, Y. Zou, W. Yang and L. Hanzo, “Joint relay and jammer selection improves the physical layer security in the face of CSI feedback delays,” IEEE Trans. Veh. Technol., vol. 65, no. 8, pp. 6259-6274, Aug. 2016. [15] Z. Han, N. Marina, M. Debbah, and A. Hjorungnes, “Physical layer security game: Interaction between source, eavesdropper and friendly jammer,” EURASIP J. Wireless Commun. Netw., vol. 2009, pp. 4529071 452907-10, Mar. 2009. [16] Y. Liu, J. Li and A. P. Petropulu, “Destination assisted cooperative jamming for wireless physical-layer security,” IEEE Trans. Inf. Foren. Sec., vol. 8, no. 4, pp. 682-694, Apr. 2013. [17] T. T. Kim and H. V. Poor, “On the secure degrees of freedom of relaying with half-duplex feedback,” IEEE Trans. Inf. Theory., vol. 57, no. 1, pp. 291-302, Jan. 2011. [18] S. I. Kim, I. M. Kim and J. Heo, “Secure transmission for multiuser relay networks,” IEEE Trans. Wireless Commun., vol. 14, no. 7, pp. 3724-3737, July 2015. [19] L. Wang, M. Elkashlan, J. Huang, N. H. Tran, and T. Q. Duong, “Secure transmission with optimal power allocation in untrusted relay networks,” IEEE Wireless Commun. Lett., vol. 3, no. 3, pp. 289-292, Jun. 2014. [20] A. Kuhestani and A. Mohammadi, “Destination-based cooperative jamming in untrusted amplify-and-forward relay networks: Resource allocation and performance study,” IET Commun., vol. 10, no. 1, pp. 17-23, Feb. 2016. [21] L. Sun, T. Zhang, Y. Li, and H. Niu, “Performance study of two-hop amplify-and-forward systems with untrustworthy relay nodes,” IEEE Trans. Veh. Technol., vol. 61, no. 8, pp. 3801-3807, Oct. 2012. [22] J.-B. Kim, J. Lim, and J. Cioffi, “Capacity scaling and diversity order for secure cooperative relaying with untrustworthy relays,” IEEE Trans. Wireless Commun., vol. 14, no. 7, pp. 3866-3876, July 2015. [23] L. Sun, P. Ren, Q. Du, Y. Wang, and Z. Gao, “Security-aware relaying scheme for cooperative networks with untrusted relay nodes,” IEEE Commun. Lett., vol. 19, no. 3, pp. 463-466, Sep. 2014. [24] W. Wang, K. C. Teh, and K. H. Li, “Relay selection for secure successive AF relaying networks with untrusted nodes,”IEEE Trans. Inf. Forensics Security., vol. 11, no. 11, pp. 2466-2476, Nov. 2016. [25] A. Mukherjee, “Physical-layer security in the Internet of Things: Sensing and communication confidentiality under resource constraints,” Proc. IEEE, vol. 103, no. 10, pp. 1747-1761, Oct. 2015. [26] J. Chen, H. Chen, H. Zhang and F. Zhao, “Spectral-energy efficiency tradeoff in relay-aided massive MIMO cellular networks with pilot contamination.,” IEEE Access, vol. 4, no. , pp. 5234-5242, Sept. 2016. [27] Z. Zhang, Z. Chen, M. Shen, and B. Xia,“Spectral and energy efficiency of multipair two-way full-duplex relay systems with massive MIMO” IEEE J. Sel. Areas in Commun., vol. 34, no. 4, pp. 848-863, Apr. 2016. [28] X. Zhou, R. K. Ganti and J. G. Andrews, “Secure wireless network connectivity with multi-antenna transmission,” IEEE Wireless Commun. Lett., vol. 10, no. 2, pp. 425-430, Feb. 2011. [29] P. L. Yeoh, N. Yang, and K. J. Kim, “Secrecy outage probability of selective relaying wiretap channels with collaborative eavesdropping,”in Proc. IEEE Global Commun. Conf. (Globecom), Dec. 2015, pp. 1-6. [30] L. Wang, M. Elkashlan, J. Huang, R. Schober, and R. K. Mallik, “Secure transmission with antenna selection in MIMO Nakagami-m fading channels,” IEEE Trans. Wireless Commun., vol. 13, no. 11, pp. 6054-6067, Nov. 2014. [31] I. S. Gradshteyn and I. M. Ryzhik, Table of Integrals, Series, and Products, 7th ed. New York: Academic, 2007. [32] P. Hao, X. Wang, and A. Behnad, “Relay authentication by exploiting I/Q imbalance in amplify-and-forward system,”in Proc. IEEE Global Commun. Conf. (Globecom), Dec. 2014, pp. 613-18. [33] X. Wang, P. Hao and L. Hanzo, “Physical-layer authentication for wireless security enhancement: Current challenges and future developments,” IEEE Commun. Mag., vol. 54, no. 6, pp. 152-158, June 2016. [34] A. Papoulis, Probability, Random Variables, and Stochastic Processes. New York: McGraw-Hill, 1984. [35] Z. Wang and G. B. Giannakis, “Outage mutual information of space-time MIMO channels,” IEEE Trans. Inf. Theory, vol. 50, no. 4, pp. 657-662, Apr. 2004. [36] A. Bletsas, A. Khisti, D. P. Reed, and A. Lippman, “A simple cooperative diversity method based on network path selection”, IEEE J. Sel. Areas Commun., vol. 24, no. 3 pp. 659-672, Mar. 2006. [37] S.M. Kay, Fundamentals of Statistical Signal Processing, Volume I: Estimation Theory, Prentice Hall, 1998. [38] A. M. Tulino and S. Verdu, “Random matrix theory and wireless communications,” Foundations and Trends in Communications and Information Theory, vol. 1, no. 1, pp. 1-182, Jun. 2004. [39] J. G. Proakis, Digital Communications. 5th ed. McGraw-Hill, New York, 2008. [40] Z. Rezki and M. S. Alouini, “Secure diversity-multiplexing tradeoff of zero-forcing transmit scheme at finite-SNR,” IEEE Trans. Commun., vol. 60, no. 4, pp. 1138-1147, Apr. 2012.
7cs.IT
Wasserstein and total variation distance between marginals of Lévy processes arXiv:1710.02715v1 [math.PR] 7 Oct 2017 Ester Mariucci∗ Markus Rei߆ 07 October 2017 Abstract We present upper bounds for the Wasserstein distance of order p between the marginals of Lévy processes, including Gaussian approximations for jumps of infinite activity. Using the convolution structure, we further derive upper bounds for the total variation distance between the marginals of Lévy processes. Connections to other metrics like Zolotarev and Toscani-Fourier distances are established. The theory is illustrated by concrete examples and an application to statistical lower bounds. Keywords: Lévy Processes; Wasserstein Distance; Total Variation; ToscaniFourier distance; Statistical lower bound. 1 Introduction Lévy processes form the prototype of continuous-time processes with a continuous diffusion and a jump part. In applications, there is a high interest to disentangle these parts based on discrete observations. While Aït-Sahalia and Jacod [1] among many others propose an asymptotically (as the observation distances become smaller) consistent test on the presence of jumps for general semimartingale models, Neumann and Reiß [17] argue that, already inside the class of α-stable processes with α ∈ (0, 2], no uniformly consistent test exists. The subtle, but important, difference is the uniformity over the class of processes. Mathematically, the difference is that on the Skorokhod path space D([0, T ]) α-stable processes, α ∈ (0, 2), induce laws singular to that of Brownian motion (α = 2), while their respective marginals at tk = kT /n, k = 0, . . . , n for n fixed, have equivalent laws, which even converge in total variation distance as α → 2 to those of Brownian motion. It is our aim here to shed some light on the geometry of the marginal laws of one-dimensional Lévy processes and to quantify the distance of the marginal laws non-asymptotically as a function of the respective Lévy characteristics (b, σ 2 , ν). The marginals form, of course, infinitely divisible distributions, but we prefer here the process point of view which is sometimes more intuitive. Let us recall the fundamental result by Gnedenko and Kolmogorov [11]. ∗ Humboldt-Universität zu Berlin, Germany. E-mail: [email protected]. This research was supported by the Federal Ministry for Education and Research through the Sponsorship provided by the Alexander von Humboldt Foundation. † Humboldt-Universität zu Berlin, Germany. E-mail: [email protected] 1 Theorem 1 ([11]). Marginals of Lévy processes X n = (Xtn )t≥0 with characteristics (bn , σn2 , νn ) converge weakly to marginals of a Lévy process X = (Xt )t≥0 with characteristics (b, σ 2 , ν) if and only if w bn → b and σn2 δ0 + (x2 ∧ 1)νn (dx) − → σ 2 δ0 + (x2 ∧ 1)ν(dx), w where δ0 is the Dirac measure in 0 and − → denotes weak convergence of finite measures. As a particular example, consider the compound Poisson process with Lévy ε measure δ−ε2ε+δ that has jumps of size ε and −ε both at intensity 2ε12 . Then as 2 ε ↓ 0, the marginals converge to those of a standard Brownian motion, which can also be derived from Donsker’s Theorem. Below, we shall be able to quantify this rate of convergence for general Lévy processes in terms of the (stronger) p-Wasserstein distances Wp . The derived Gaussian approximation of the small jump part relies on the fine analysis by Rio [19] of the approximation error in Wasserstein distance for the central limit theorem. This is the subject of Theorem 9, of which the following is a simplified statement: Result. Let X S (ε) be a Lévy process with characteristics (0,R0, νε ) where νε is ε a Lévy measure with support in [−ε, ε]. Introducing σ̄ 2 (ε) = −ε x2 ν(dx), there exists a constant C depending only on p such that: √ Wp (L (XtS (ε)), N (0, tσ̄ 2 (ε))) ≤ C min ( tσ̄(ε), ε) ≤ Cε. A Gaussian approximation of the small jumps of Lévy processes has already been employed, for example when simulating trajectories of Lévy processes with infinite Lévy measure (see e.g. [3]). The above result is actually an intermediate step for the more general Corollary 3, that bounds the p-Wasserstein distance Wp in ℓr (Rn ) as follows: Result. Let X j , j = 1, 2, be two Lévy processes with characteristics (bj , σj2 , νj ), j = 1, 2. Then for all ε ≥ 0, T > 0 and n ∈ N we have   1 1 n 2 2 n Wp (XkT − X ) , (X − X ) kT /n (k−1)T /n k=1 /n (k−1)T /n k=1 1 1 1 ≤ T n r −1 |b1 (ε) − b2 (ε)| + T 1/2 n r − 2 |σ1 + σ̄1 (ε) − σ2 − σ̄2 (ε)| +C 2 X j=1 where bj (ε) := bj − 1 1 1 1 2,B min (T 1/2 n r − 2 σ̄j (ε), n r ε) + n r Wp (XT1,B /n (ε), XT /n (ε)), R R 2 |x|≤ε x ν(dx) and C is 2,B Wp (XT1,B /n (ε), XT /n (ε)), involving ε<|x|≤1 xνj (dx), σ̄j2 (ε) := depending only on p. The term larger ε, can be bounded as in Theorem 10. a constant the jumps Sometimes we can even obtain bounds on the total variation distance, which for statistical purposes, especially testing, is particularly meaningful. The currently available bound in the literature is by Liese [15]. Theorem 2 ([15, Cor. 2.7]). For Lévy processes X 1 and X 2 with characteristics (b1 , σ12 , ν1 ) and (b2 , σ22 , ν2 ), respectively, introduce the squared Hellinger distance of the Lévy measures (put ν0 = ν1 + ν2 ): r 2 Z r dν1 dν2 2 H (ν1 , ν2 ) := (x) − (x) ν0 (dx). dν0 dν0 R 2 Then the total variation distance between the laws of Xt1 and Xt2 is bounded as: kL (Xt1 ) − L (Xt2 )kT V r 2    1  exp − tH 2 (ν1 , ν2 ) ≤ 2 1 − 1 − H 2 N (b̃1 t, σ12 t), N (b̃2 t, σ22 t) 2 R1 R1 with b̃1 = b1 − −1 xν1 (dx), b̃2 = b2 − −1 xν2 (dx). Note that the bound is very loose or even trivial in the case ν2 = 0 and λ1 = ν1 (R) > 1/t because then tH 2 (ν1 , ν2 ) = tλ1 > 1. So, this bound does not allow to deduce a total variation approximation of Brownian motion by jump processes of infinite jump activity like α-stable processes with α ↑ 2. In fact, for pure jump Lévy processes these bounds are analogous to the bounds by Mémin and Shiryayev [16] in the path space D([0, T ]), where pure jump processes and Brownian motion have singular laws (for other results on distances on D([0, T ]) see e.g. [5, 8, 13, 14]). Our main idea is to use the convolutional structure of the laws to transfer bounds from Wasserstein to total variation distance. This strategy is implemented for Lévy processes with a non-zero Gaussian component (but without any restriction on the Lévy measures, which can be infinite, and even with infinite variation) and yields Theorem 14: Result. For Lévy processes X 1 and X 2 with characteristics (bj , σj2 , νj ) and σj > 0, j = 1, 2, we have for all t > 0, ε ∈ [0, 1]: q p √ p t b1 (ε) − b2 (ε) + 2 σ12 + σ̄12 (ε) − σ22 + σ̄22 (ε) 2π p p kL (Xt1 ) − L (Xt2 )kT V ≤ σ12 + σ̄12 (ε) ∨ σ22 + σ̄22 (ε) s 2   q X 2 2 (ε), ε tσ̄ min 2 + j πtσj2 2 j=1 + t|λ1 (ε) − λ2 (ε)| + t(λ1 (ε) ∧ λ2 (ε)) ν1ε νε − 2 λ1 (ε) λ2 (ε) with the above notation, νjε = νj (· \ (−ε, ε)) and λj (ε) = νjε (R). , TV The results proven in this paper provide further insight in the geometry of the space of discretely observed Lévy processes. At the same time, their nonasymptotic character finds fruitful applications in nonparametric statistics, when proving general lower bounds in a minimax sense. The technology is shown at work in Section 5.2, making the original proof by Jacod and Reiß [12] for volatility estimation under high activity jumps simpler and much more transparent. The paper is organized as follows. In Section 2 we review basic properties of the Wasserstein distances and discuss their relationship with the Zolotarev and Toscani-Fourier distances. Then we recall the main non-asymptotic bounds for the Wasserstein distances in the CLT and introduce Lévy processes. Section 3 derives bounds between marginals of Lévy processes in Wasserstein distance. The main focus is on the small jump part, which is treated in Theorem 9 and for which the tightness of the bounds is discussed in detail, first for concrete examples and then more generally using a lower bound via the Toscani-Fourier distance. Main results are presented in Section 3.3. Section 4 introduces properties of the total variation distance and then shows how bounds in Wasserstein or 3 Toscani-Fourier distance transfer under convolution to total variation bounds, see e.g. Proposition 4 and Proposition 7. For Gaussian convolutions the different bounds are first compared and then applied to the marginals of Lévy processes. Section 5 is devoted to the application of the total variation bounds for proving the minimax-optimality of integrated volatility estimators in the presence of jumps proposed in [12]. 2 2.1 Preliminaries The Wasserstein distances Let (X , d) be a Polish metric space. Given p ∈ [1, ∞), let Pp (X ) denote the space of all Borel probability measures µ on X such that the moment bound Eµ [d(X, x0 )p ] < ∞ holds for some (and hence all) x0 ∈ X . Definition 1. Given p ≥ 1, for any two probability measures µ, ν ∈ Pp (X ), the Wasserstein distance of order p between µ and ν is defined by o n 1 (1) Wp (µ, ν) = inf [E[d(X ′ , Y ′ )p ]] p , L (X ′ ) = µ, L (Y ′ ) = ν , where the infimum is taken over all random variables X ′ and Y ′ having laws µ and ν, respectively. We abbreviate Wp (X, Y ) = Wp (L (X), L (Y )) for random variables X, Y with laws L (X), L (Y ) ∈ Pp (X ). The following lemma introduces some properties of the Wasserstein distances that we will use throughout the paper. For a proof, the reader is referred to [24], Chapter 6. Lemma 1. The Wasserstein distances have the following properties: (1) For all p ≥ 1, Wp (·, ·) is a metric on Pp (X ). (2) If 1 ≤ p ≤ q, then Pq (X ) ⊆ Pp (X ), and Wp (µ, ν) ≤ Wq (µ, ν) for every µ, ν ∈ Pq (X ). (3) Given a sequence (µn )n≥1 and a probability measure µ in Pp (X ) lim Wp (µn , µ) = 0 n→∞ if and only if (µn )n≥1 converges to µ weakly and for some (and hence all) x0 ∈ X Z Z d(x, x0 )p µ(dx). d(x, x0 )p µn (dx) = lim n→∞ X X (4) The infimum in (1) is actually a minimum; i.e., there exists a pair (X ∗ , Y ∗ ) of jointly distributed X -valued random variables with L (X ∗ ) = µ and L (Y ∗ ) = ν, such that Wp (µ, ν)p = E[d(X ∗ , Y ∗ )p ]. 4 Following the terminology used in [25], we can say that the Wasserstein distances are ideal metrics since they possess the following two properties. Lemma 2. Let X be a separable Banach space. For any three X -valued random variables X, Y, Z, with Z independent of X and Y , the inequality Wp (X + Z, Y + Z) ≤ Wp (X, Y ) holds. Furthermore, for any real constant c, we have (2) Wp (cX, cY ) = |c|Wp (X, Y ). Proof. Lemma 1 guarantees the existence of two random variables X ∗ , Y ∗ , independent of Z, such that Wp (X, Y ) = (E[d(X ∗ , Y ∗ )p ]) 1/p . We have: 1 1 Wp (X + Z, Y + Z) ≤ (E[d(X ∗ + Z, Y ∗ + Z)p ]) p = (E[d(X ∗ , Y ∗ )p ]) p = Wp (X, Y ). The equality (2) follows by homogeneity of the expectation. An immediate corollary of Lemma 2 is the subadditivity of the metric Wp under independence (or equivalently under convolution of laws). Corollary 1. If X1 , . . . , Xn are independent random variables as well as Y1 , . . . , Yn , then n X Wp (Xi , Yi ). Wp (X1 + · · · + Xn , Y1 + · · · + Yn ) ≤ i=1 Proof. By induction, it suffices to prove the case n = 2. Let X̃2 be a random variable equal in law to X2 and independent of Y1 and of X1 . By means of Lemma 2 we have Wp (Y1 + X̃2 , Y1 + Y2 ) ≤ Wp (X̃2 , Y2 ) = Wp (X2 , Y2 ), Wp (X1 + X2 , Y1 + X̃2 ) ≤ Wp (X1 , Y1 ). Hence, by triangle inequality Wp (X1 + X2 , Y1 + Y2 ) ≤ Wp (X1 , Y1 ) + Wp (X2 , Y2 ) follows. A useful property of the Wasserstein distances is their good behaviour with respect to products of measures. Lemma 3 (Tensorisation). Let (X , d) be Rn endowed with the distance d(x, y) = Pn r 1/r ( i=1 , rN ≥ 1, for all x = (x1 , . . . , xn ), y = (y1 , . . . , yn ) and let i − yi | ) N|x n µ = i=1 µi and ν = ni=1 νi be two product measures on Rn . Then, p Wp (µ, ν) ≤ max(n p r −1 , 1) n X i=1 Wp (µi , νi )p . In the special case where µ1 = · · · = µn and ν1 = · · · = νn , the following stricter inequality holds: p Wp (µ, ν)p ≤ n r Wp (µ1 , ν1 )p . 5 Proof. Thanks to Point (4) in Lemma 1, we can always find two random vectors X ∗,n = (X1∗ , . . . , Xn∗ ), Y ∗,n = (Y1∗ , . . . , Yn∗ ) with independent coordinates such that µi = L (Xi∗ ), νi = L (Yi∗ ) and Wp (µi , νi ) = E[|Xi∗ −Yi∗ |p ]1/p . In particular, we have: p/r   X n . (3) |Xi∗ − Yi∗ |r Wp (µ, ν)p ≤ E[d((Xi∗ )i , (Yi∗ )i )p ] = E i=1 If p ≥ r, by means of the elementary inequality (z1 + · · · + zn )q ≤ nq−1 (z1q + · · · + znq ), q ≥ 1, we deduce from (3) that Wp (µ, ν)p ≤ np/r−1 n X i=1 E[|Xi∗ − Yi∗ |p ] = np/r−1 n X i=1 Wp (µi , νi )p . Similarly, if p < r, the proof follows by the inequality (|z1 |+ · · · + |zn |)1/q ≤ |z1 |1/q + · · · + |zn |1/q , q ≥ 1. In the case where µ1 = · · · = µn and ν1 = · · · = νn , one may choose X1∗ = · · · = Xn∗ and Y1∗ = · · · = Yn∗ . The conclusion readily follows. The distance W1 is commonly called the Kantorovich-Rubinstein distance and it can be characterized in many different ways. Some useful properties of the distance W1 are the following. Proposition 1. [See [9]] Let X and Y be integrable real random variables. Denote by µ and ν their laws and by F and G their cumulative distribution functions, respectively. Then the following characterizations of the Wasserstein distance of order 1 hold: Z 1. W1 (X, Y ) = |F (x) − G(x)|dx, R 2. W1 (X, Y ) = Z 0 1 |F −1 (t) − G−1 (t)|dt, 3. W1 (X, Y ) = supkψkLip ≤1  R R ψdµ − R  ψdν , the supremum being taken R over all ψ satisfying the Lipschitz condition |ψ(x) − ψ(y)|≤ |x − y|, for all x, y ∈ R. This property is generally called Kantorovich-Rubinstein formula. 2.2 Wasserstein, Zolotarev and Toscani-Fourier distances Let µ, ν be two probability measures on R endowed with the distance d(x, y) = |x − y|, x, y ∈ R. Writing p > 0 as p = m + α with m ∈ N0 and 0 < α ≤ 1, denote by Fp the Hölder class of real-valued bounded functions f on R which are m-times differentiable with |f (m) (x) − f (m) (y)| ≤ |x − y|α . Definition 2. The Zolotarev distance Zp between µ and ν is defined by Z  Z Zp (µ, ν) = sup f dµ − f dν . f ∈Fp R 6 R Remark 1. It is easy to see that the functional Zp is a metric. For p = 0 the metric Zp is defined by the relation Z0 = limp→0 Zp and F0 is the set of Borel functions satisfying the condition |f (x) − f (y)|≤ Ix6=y . Thanks to the characterisation of the total variation given in Property 6 below, it follows that Z0 (µ, ν) = kµ − νkT V . Also, by means of the Kantorovich-Rubinstein formula, recalled in Property 1, we have Z1 (µ, ν) = W1 (µ, ν). The following result shows that the Wasserstein distance of order p is bounded by the p-th root of the Zolotarev distance Zp . This fact, together with Theorem 4 below, will be a useful tool to control the Wasserstein distances between the increments of compound Poisson processes. Theorem 3 (See [19], Theorem 3.1). For any p ≥ 1 there exists a positive constant cp such that for any pair (µ, ν) of laws on the real line with finite absolute moments of order p p (Wp (µ, ν)) ≤ cp Zp (µ, ν). Theorem 4. [See [25], Theorem 1.4.3] Let (Xi )i≥1 and (Yi )i≥1 be sequences of independent random variables and N be an integer-valued random variable independent of the random variables from both sequences. Then, Zp X N i=1 Xi , N X Yi i=1  ∞ X ≤ k=1 P(N ≥ k)Zp (Xk , Yk ). Theorem 5 (See [25], Theorem 1.4.2.). Let X and Y be integrable real random variables with laws µ and ν, respectively. Then the following characterization of the Zolotarev distance holds: for any p ≥ 1 Z Z x (x − u)p−1 Zp (X, Y ) = (µ − ν)(du) dx, Γ(p) −∞ where Γ denotes the Gamma function. Let P1 and P2 be two probability measures on the real line. We will denote by ϕ1 (resp. ϕ2 ) the characteristic function of P1 (resp. P2 ), i.e. Z eiux P1 (dx). ϕ1 (u) = R Also, denote by L b (R) (resp. L b (C)) the class of real-valued (resp. complexvalued) bounded functions on R with Lipschitz norm bounded by 1. Definition 3. For s > 0, the Toscani-Fourier distance of order s, denoted by Ts , is defined as: Ts (P1 , P2 ) = |ϕ1 (u) − ϕ2 (u)| . |u|s u∈R\{0} sup The distance introduced in Definition 3 first appeared in [7], under the name “Fourier-based metrics”, to study the trend to equilibrium for solutions of the space-homogeneous Boltzmann equation for Maxwellian molecules. After that, it has been used in several other works, and especially linked to the kinetic theory, see [2] for an overview. In [24], T2 is called the “Toscani distance”. 7 Proposition 2. For all p ≥ 1 1 Wp (P1 , P2 ) ≥ √ T1 (P1 , P2 ). 2 Proof. Thanks to Lemma 1 and Property 1 Wp (P1 , P2 ) ≥ W1 (P1 , P2 ) = 1 sup ≥ √ 2 ψ∈L b (C) sup ψ∈L b (R) Z R Z ψdP1 − R Z ψdP1 − Z R ψdP2  ψdP2 . R iux For all u ∈ R \ {0}, let us consider the function Ψu (x) = e u and observe that the Lipschitz norm of Ψu is 1. It immediately follows that Z Z Z Z sup ψdP1 − ψdP2 ≥ sup Ψu dP1 − Ψu dP2 = T1 (P1 , P2 ). ψ∈L b (C) 2.3 R R u∈R\{0} R R Wasserstein distances in the central limit theorem The class of Wasserstein metrics proves to be very useful in estimating the convergence rate in the central limit theorem. We recall some results. Let (Yi )i≥1 be a sequence of centred i.i.d. random variables Pn with finite and positive vari1 ance σ 2 . We denote by µn the law of √nσ 2 i=1 Yi . For i.i.d. centred random variables with finite absolute third moment, Esseen [4] proved the following result. Theorem 6. [See e.g. [18], Theorem 16] For any n ≥ 1, 1 E|Y1 |3 . W1 (µn , N (0, 1)) ≤ √ 2 n (Var[Y1 ])3/2 The constant 1 2 in this inequality cannot be improved. A bound for the Wasserstein distances of order r ∈ (1, 2] is due to Rio [19]: Theorem 7. [See [19], Theorem 4.1] For any n ≥ 1 and any r ∈ (1, 2], there exists some positive constant C depending only on r such that  1/r E[|Y1 |r+2 ] Wr (µn , N (0, 1)) ≤ C √ r+2 . n(Var[Y1 ]) 2r For r > 2 and i.i.d. random variables with a finite absolute moment of order r, we have the following: Theorem 8. [See [21]] For any n ≥ 1 and r > 2, there exists some positive constant C, depending only on r, such that  1/r E[|Y1 |r ] 1 1 Wr (µn , N (0, 1)) ≤ C p nr −2 . Var[Y1 ] 8 If one only assumes finite absolute moment of order r, this rate cannot be improved. In particular, under this assumption, the classical rate of convergence √1 cannot be recovered for r > 2. For that reason, from now on, we will only n focus on the case r ∈ [1, 2]. 2.4 Lévy processes (b,σ,ν) Let us denote by Pt the marginal law at time t ≥ 0 of a Lévy process X with characteristics (b, σ 2 , ν), i.e. (see Theorem 8.1 in [22])   Z u2 σ 2 iux iuXt + (e − 1 − iuxI|x|≤1 )ν(dx) ) = exp t iub − E(e 2 R   Z u2 σ 2 = exp t iub(ε) − + (eiux − 1 − iuxI|x|≤ε )ν(dx) , 2 R R (b,σ,ν) denotes where b(ε) := b− ε<|x|≤1 xν(dx), for all ε ∈ (0, 1]. Equivalently, Pt the infinitely divisible law with characteristics (bt, σ 2 t, νt). X can be characterised via the Lévy-Itô decomposition (see [22]), that is via a canonical representation with independent components X = X (1) + X (2) (ε) + X S (ε) + X B (ε): For all ε ∈ (0, 1]  X  ∆Xs I(η,ε] (|∆Xs |) − t(b(ε) − b(η)) Xt = σWt + b(ε)t + lim η→0 + X 0<s≤t 0<s≤t ∆Xs I(ε,+∞) (|∆Xs |), where W is a standard Brownian motion, ∆Xs := Xs − limr↑s Xr is the jump at time s of X, X S (ε) is a pure jump martingale containing only small jumps and X B (ε) is a finite variation part containing jumps larger in absolute value than ε. Thus X B (ε) is a compound Poisson process with intensity λε := ν(R \ (−ε, ε)) ν(dx) and jump distribution Fε (dx) = ν(R\(−ε,ε)) I(ε,+∞) (|x|). In the following, someP Nt B times we will write Xt (ε) as i=1 Yi where N is a Poisson process of intensity λε independent of the sequence (Yi )i≥0 of i.i.d. random variables having distribution Fε . Also, for a given Lévy process X we define an auxiliary characteristic σ̄ : R+ → R capturing the variance induced by small jumps: Z 2 σ̄ (ε) := x2 ν(dx). |x|≤ε 3 Wasserstein distances for Lévy processes Let X j , j = 1, 2, be two Lévy processes with characteristics (bj , σj2 , νj ), j = 1, 2. As we will see later, thanks to Corollary 1 and the Lévy-Itô decomposition, in order to control Wp (Xt1 , Xt2 ) it is enough to separately control the Wasserstein distances between two Gaussian random variables as well as Wp (L (Xtj,S (ε)), N (0, tσ̄j2 (ε))) and Wp (Xt1,B (ε), Xt2,B (ε)). A bound for the Wasserstein distances between Gaussian distributions is given by: 9 Lemma 4. [See [10], Prop. 7] W2 (N (m1 , σ12 ), N (m2 , σ22 )) = p (m1 − m2 )2 + (σ1 − σ2 )2 . Upper bounds for Wp (L (Xtj,S (ε)), N (0, tσ̄j2 (ε))) and Wp (Xt1,B (ε), Xt2,B (ε)) will be the subject of Sections 3.1 and 3.2, respectively. 3.1 Distances between marginals of small jump Lévy processes Let X be a Lévy process with Lévy measure ν and denote by X S (ε) the Lévy process associated with the small jumps of X, following the notation introduced in Section 2.4. Theorem 9. For any p ∈ [1, 2], there exists a positive constant C such that    R ε √ |x|p+2 ν(dx) 1/p S 2 Wp (L (Xt (ε)), N (0, tσ̄(ε) )) ≤ C min tσ̄(ε), −ε 2 σ̄ (ε) √  ≤ C min tσ̄(ε), ε . (4) √ In particular, for p = 1 the bound is min(2 tσ̄(ε), 12 ε). Remark 2. The inequality √ Wp (L (XtS (ε)), N (0, tσ̄ 2 (ε))) ≤ W2 (L (XtS (ε)), N (0, tσ̄ 2 (ε))) ≤ 2 tσ̄(ε) is clear from the definition of W2 , noting that tσ̄ 2 (ε) is the second moment of both arguments. The interest of Theorem 9 lies in the bound Wp (L (XtS (ε)), N (0, tσ̄ 2 (ε))) ≤ 2ε, (5) which after renormalisation yields   S  Xt (ε)  Cε Wp L √ , N (0, 1) ≤ √ . tσ̄(ε) tσ̄(ε) Thus, not surprisingly in view of the central limit theorem, the Gaussian approximation is better as t is large. Also whenever σ̄ 2 (ε) is much larger than ε2 , then a Gaussian approximation is valid, e.g. for α-stable processes with α > 0 and ε small, see Example 1 below. Remark 3. The upper bound (4) gives in general the right order. Indeed, let ε us consider for ε > 0 the Lévy measure νε = δ−ε2ε+δ and denote by Y (ε) the 2 corresponding (centred) pure jump Lévy process, i.e. Yt (ε) = ε(Nt1 (ε)−Nt2 (ε)) is the rescaled difference of two independent Poisson processes of intensity λ = 2ε12 Rε each. In particular, observe that σ̄ 2 (ε) = 1 and −ε |x|3 νε (dx) = ε. Let us develop the case p = 1. Applying the scheme of proof proposed in [19], see proof of Theorem 5.1, we show that there exists a constant K such that √ W1 (L (Yt (ε)), N (0, t)) ≥ K min( t, ε). To see that, we consider the cases where t ≤ ε2 and t > ε2 separately. 10 • t ≤ ε2 : From the definition of the Wasserstein distance of order 1 it follows that W1 (L (Yt (ε)), N (0, t)) ≥ E[|N (0, t)|]P(Nt1 (ε) + Nt2 (ε) = 0) r r 2t − t2 2 1√ ε ≥ e = t. π πe • t ≥ ε2 : Again, by the definition of the Wasserstein distance of order 1, we find that i h √ W1 (L (Yt (ε)), N (0, t)) ≥ E min| tN − nε| n∈Z  [ ε √ ≥ P ( t/ε)N ∈ [n + 1/4, n + 3/4] 4 n∈Z √ with N ∼ N (0, 1). Since in this case ( t/ε)N has variance at least one, there exists a constant K such that W1 (L (Yt (ε)), N (0, t)) ≥ Kε. In the case p ∈ (1, 2] Wp is even larger than W1 . For the case p = 2 see also [6]. Example 1. Let us illustrate Theorem 9 for the class of α-stable Lévy processes with a Lévy density proportional to |x|11+α , α ∈ [0, 2). For all ε ∈ (0, 1], let us denote by X S (ε) the Lévy process describing the small jumps and by νI[−ε,ε] its Lévy measure, i.e. X S (ε) ∼ (0, 0, νI[−ε,ε] ), ν(dx) = Cα dx, |x|1+α for some constant Cα . In particular, we have Z ε ε2−α σ̄ 2 (ε) = x2 ν(dx) = 2Cα . 2−α −ε Therefore an application of Theorem 9 guarantees the existence of a constant C, possibly depending on p and α, such that:   X S (ε)   √ α t , N (0, t) ≤ C min ( t, ε 2 ), Wp L σ̄(ε) ∀t > 0, ∀ε ∈ (0, 1], ∀p ∈ [1, 2]. (6) Equation (6) validates the intuition that a Gaussian approximation of the small jumps is the better the more active the small jumps are. Indeed, the approximation in (6) is better when α is larger. Let us now prove Theorem 9. For that we need to recall the following lemma: Lemma 5 (See [20], Lemma 6.). Let X be a Lévy process with Lévy measure ν. R =0 If a Borel function f : R → R satisfies |x|≥1 f (x)ν(dx) < ∞, limx→0 fx(x) 2 and f (x)(|x|2 ∧1)−1 is bounded, then Z 1 lim E[f (Xt )] = f (x)ν(dx). t→0 t 11 Proof of Theorem 9. Let us introduce n random variables defined by Yj = √ S S n(Xtj/n (ε) − Xt(j−1)/n (ε)). The Yj ’s are i.i.d. centred random variables with Pn 2 variance equal to tσ̄ (ε) and such that XtS (ε) = √1n j=1 Yj . An application √ S (ε) of Theorems 7 and 6 (using the fact that Yj has the same law as nXt/n and the homogeneity property of the Wasserstein distances stated in Lemma 2) gives W1 (L (XtS (ε)), N (0, tσ̄ 2 (ε))) ≤ S nE[|Xt/n (ε)|3 ] 2tσ̄ 2 (ε) . Let us now argue that lim sup t→0 E[|XtS (ε)|3 ] ≤ t Z |x|<ε |x|3 ν(dx). Indeed, applying Lemma 5 to the family f (x) = fR (x) = |x|3 I[−R,R] (x) for R > ε, we deduce that Z E[|XtS (ε)|3 I|XtS (ε)|≤R ] lim = |x|3 ν(dx). t→0 t |x|<ε R Thus, using the fact that E[(XtS (ε))4 ] = t |x|<ε x4 ν(dx) + 3t2 σ̄ 4 (ε), we get E[|XtS (ε)|3 ] ≤ E[|XtS (ε)|3 I|XtS (ε)|≤R ] + E[(XtS (ε)4 /R)I|XtS (ε)|>R ]  Z  1 t x4 ν(dx) + 3t2 σ̄ 4 (ε) . ≤ E[|XtS (ε)|3 I|XtS (ε)|≤R ] + R |x|<ε Therefore, for any R > ε, E[|XtS (ε)|3 ] lim sup ≤ t t→0 Z 3 |x|<ε |x| ν(dx) + R |x|<ε x4 ν(dx) R Taking the limit as R → ∞, we conclude. It follows that W1 (L (XtS (ε)), N (0, tσ̄ 2 (ε))) ≤ lim sup n→∞ S nE[|Xt/n (ε)|3 ] 2tσ̄ 2 (ε) ≤ . Rε 3 −ε |x| ν(dx) . 2σ̄ 2 (ε) Moreover, by definition of the Wasserstein distance of order 1 and denoting by N a centered Gaussian random variable with variance tσ̄ 2 (ε), we have p W1 (L (XtS (ε)), N (0, tσ̄ 2 (ε))) ≤ E[|XtS (ε)|] + E[|N |] ≤ 2 tσ̄ 2 (ε). We deduce W1 (L (XtS (ε)), N (0, tσ̄ 2 (ε))) Rε   3 p −ε |x| ν(dx) 2 . ≤ min 2 tσ̄ (ε), 2σ̄ 2 (ε) Similarly, by means of Theorem 7, for p ∈ (1, 2] Wp (L (XtS (ε)), N (0, tσ̄ 2 (ε)))  √ S p+2 1/p C E[| nXt/n | ] ≤ lim sup √ n tσ̄ 2 (ε) n→∞  R ε |x|p+2 ν(dx) 1/p −ε ≤C σ̄ 2 (ε) 12 and also  1/p  1/p p Wp (L (XtS (ε)), N (0, tσ̄ 2 (ε))) ≤ E[|XtS (ε)|p ] + E[|N |p ] ≤ 2 tσ̄ 2 (ε). The upper bound (4) follows by the fact that Rε −ε |x|p+2 νi (dx) σ̄i2 (ε) ≤ εp . Theorem 9 can be used to bound the Wasserstein distances between the increments of the small jumps of two Lévy processes. R Corollary 2. For all ε ∈ (0, 1] let X j (ε) ∼ (− ε<|x|≤1 xνj (dx), σj2 , νj I[−ε,ε] ) be two Lévy processes with σ̄j2 (ε) 6= 0 and σj ≥ 0, j = 1, 2. Then, for all p ∈ [1, 2], there exists a constant C, only depending on p, such that  R ε   2 X √ |x|p+2 νj (dx) 1/p 1 2 C min Wp (Xt (ε), Xt (ε)) ≤ tσ̄j (ε), −ε 2 σ̄j (ε) j=1 q q 2  σ̄12 (ε) + σ12 − σ̄22 (ε) + σ22 . +t Proof. This is a consequence of Theorem 9 and Lemma 4. 3.2 Distances between random sums of random variables Theorem 10. Let (Xi )i≥1 and (Yi )i≥1 be sequences of i.i.d. random variables with Yi ∈ L2 and N , N ′ be two positive integer-valued random variables with N (resp. N ′ ) independent of (Xi )i≥1 (resp. (Yi )i≥1 ). Then, for 1 ≤ p ≤ 2, Wp X N ′ N X Xi , i=1 i=1 Yi    1/p ≤ min (cp E[N ]Zp (X1 , Y1 )) , E[N p ]1/p Wp (X1 , Y1 ) + Wp (N, N ′ )E[|Y1 |p ] 1/p with the constant cp from Theorem 3. Proof. By the triangle inequality,  X  X  X N′ N ′′ N ′′ N N′ N X X X Yi , Yi , Yi + Wp Xi , Yi ≤ Wp Xi , Wp i=1 i=1 i=1 i=1 i=1 (7) i=1 where N ′′ is independent of (Yi )i≥1 and with the same law as N . Thanks to Theorems 3 and 4, the first summand in (7) is bounded by (cp E[N ]Zp (X1 , Y1 ))1/p . Alternatively, this summand can be estimated via Jensen’s inequality joined PÑ PN PN ′′ p p with the fact that Wp ( i=1 Xi , i=1 Yi ) ≤ E[| i=1 (Xi − Yi )| ], Ñ indepen′′ dent of (Xi , Yi )i≥1 and L (Ñ ) = L (N ) = L (N ), as follows:    X Ñ Ñ p X p p−1 |Xi − Yi | ≤ E[N p ]E[|X1 − Y1 |p ]. ≤ E Ñ (Xi − Yi ) E i=1 i=1 Therefore, Wp X N i=1 ′′ Xi , N X i=1 Yi p    X Ñ p (Xi − Yi ) , Ñ independent of (Xi , Yi )i≥1 ≤ inf E i=1 ≤ E[N p ]Wp (X1 , Y1 )p . 13 To control the second summand, we proceed similarly Wp X N ′′ i=1 ′ Yi , N X i=1 Yi p    X N′ N ′′ p X ′′ ′ Yi , N , N independent of (Yi )i≥1 Yi − ≤ inf E i=1 i=1 ≤ E[|Y1 |p ]Wp (N ′′ , N ′ )p , which, by noting L (N ′′ ) = L (N ), concludes the proof. In the preceding theorem one term is bounded alternatively by the Zolotarev or the Wasserstein distance between X1 and Y1 . The difference is the factor in front which is either the first or the pth moment of N . If N is likely to be large, then better bounds can be obtained by profiting from the variance stabilisation for centred sums. Since the larger jumps are not our main issue, this is not pursued further. In the Poisson case the moments and the Wasserstein distances can be easily analysed. Proposition 3. Let N and N ′ be two Poisson random variables of mean λ and λ′ , respectively. Let us denote by m(p,ℓ) the moment of order p of a Poisson random variable of mean ℓ, i.e.       p i X p 1X i−j i i p (−1) jp. ℓ , where := m(p,ℓ) := j i! i i j=0 i=1 Then the following upper bound holds for p ≥ 1 : Wp (N, N ′ )p ≤ m(p,|λ−λ′ |) . In particular, W1 (N, N ′ ) ≤ |λ − λ′ | Wp (N, N ′ )p ≤ |λ − λ′ |+|λ − λ′ |p , 1 < p ≤ 2. (8) (9) Proof. Without loss of generality, let us suppose λ′ ≥ λ and let N ′′ be a Poisson random variable with mean λ − λ′ , independent of N . Thanks to Lemma 2 we have Wp (N, N ′ )p = Wp (N ′ + N ′′ , N ′ )p ≤ Wp (0, N ′′ )p ≤ E[(N ′′ )p ] = m(p,λ′ −λ) . To deduce (8) and (9) we use the fact that m(1,ℓ) = ℓ, m(2,ℓ) = ℓ + ℓ2 and E[(N ′′ )p ] ≤ E[N ′′ ]2−p E[(N ′′ )2 ]p−1 for p ∈ (1, 2] by Hölder’s inequality. 3.3 First main result We will use the notation introduced in Section 2.4. In accordance with that, for any given Lévy process X j with characteristics (bj , σj2 , νj ), X j,B (ε) will be a compound Poisson process with Lévy measure νj (dx)I(ε,∞) (|x|), i.e. j Xtj,B (ε) = Nt X i=1 14 (j) Yi where N j is a Poisson process of intensity λj (ε) := νj (R\(−ε, ε)) independent of (j) the sequence of i.i.d. random variables (Yi )i≥0 having distribution Fεj (dx) = I(ε,∞) (|x|) λj (ε) νj (dx). Recall from Proposition 3 that m(p,ℓ) denotes the moment of order p of a Poisson random variable of mean ℓ. Theorem 11. Let X j , j = 1, 2, be two Lévy processes with characteristics (bj , σj2 , νj ), j = 1, 2. For all p ∈ [1, 2], for all ε ∈ [0, 1] and all t ≥ 0, the following estimate holds 1/2  2 2 Wp (Xt1 , Xt2 ) ≤ t2 (b1 (ε) − b2 (ε)) + t(σ1 + σ̄1 (ε) − σ2 − σ̄2 (ε)) +C 2 X j=1 min √  tσ̄j (ε), ε + Wp (Xt1,B (ε), Xt2,B (ε)), for some constant C, only depending on p. Introducing Lt (ε) := t|λ1 (ε)−λ2 (ε)|, we have (1) (2) Wp (Xt1,B (ε), Xt2,B (ε)) ≤ ((tλ1 (ε))1/p + tλ1 (ε))Wp (Y1 , Y1 ) (2) p 1/p + (Lt (ε)1/p + Lt (ε))E[(Y1 ) ] . Proof of Theorem 11. By some abuse of notation let N (µ, σ 2 ) denote a random variable with this distribution. Then, thanks to the Lévy-Itô decomposition, we have Xti = N (tbi (ε), tσi2 ) + Xti,S (ε) + Xti,B (ε) with independent summands. Hence, by subadditivity we get Wp (Xt1 , Xt2 ) ≤ Wp (N (tb1 (ε), tσ12 ) + Xt1,S (ε), N (tb2 (ε), tσ22 ) + Xt2,S (ε)) + Wp (Xt1,B (ε), Xt2,B (ε)). Observe that Wp (N (tb1 (ε), tσ12 ) + Xt1,S (ε), N (tb2 (ε), tσ22 ) + Xt2,S (ε)) ≤ Wp (N (tb1 (ε), tσ12 ) + Xt1,S (ε), N (tb1 (ε), t(σ12 + σ̄12 (ε)))) + Wp (N (tb2 (ε), tσ22 ) + Xt2,S (ε), N (tb2 (ε), t(σ22 + σ̄22 (ε)))) + Wp (N (tb1 (ε), t(σ12 + σ̄22 (ε))), N (tb2 (ε), t(σ22 + σ̄22 (ε)))) ≤ Wp (Xt1,S (ε), N (0, tσ12 (ε))) + Wp (Xt2,S (ε), N (0, tσ̄22 (ε))) + Wp (N (tb1 (ε), t(σ12 + σ̄12 (ε))), N (tb2 (ε), t(σ22 + σ̄22 (ε)))), where in the second inequality we used again Lemma 2. An application of Theorem 9 together with Point (2) in Lemma 1 and Lemma 4 allows us to bound Wp (N (tb1 (ε), tσ12 ) + Xt1,S (ε), N (tb2 (ε), tσ22 ) + Xt2,S (ε)) by the quantity 2  √ 1/2  X 2 2 tσ̄j (ε), ε , min t2 (b1 (ε) − b2 (ε)) + t(σ1 + σ̄1 (ε) − σ2 − σ̄2 (ε)) +C j=1 for some constant C only depending on p. Finally, Wp (Xt1,B (ε), Xt2,B (ε)) is bounded by means of Theorem 10 and Proposition 3. 15 We now address the problem of how to compute the Wasserstein distance between n given increments of two Lévy processes. To that end, fix a time span 1 1 2 T > 0, a sample size n ∈ N and consider the sample (XkT /n −X(k−1)T /n , XkT /n − 2 n X(k−1)T /n )k=1 . From Property 3 we know that we can measure the distance be2 2 n 1 1 n tween the random vectors (XkT /n − X(k−1)T /n )k=1 and (XkT /n − X(k−1)T /n )k=1 in terms of the Wasserstein distance between the marginals. This observation combined with Theorem 11 allows us to obtain an upper bound for the Wasserstein distance of order p between the increments of these Lévy processes. Corollary 3. Let X j , j = 1, 2, be two Lévy processes with characteristics (bj , σj2 , νj ), j = 1, 2. Then, with respect to the ℓr -metric on RN given by PN 1/r d(x, y) := ( i=1 |xi − yi |r ) , r ≥ 1, for all p ∈ [1, 2], ε ≥ 0, T > 0, n ∈ N we have   n 2 n 2 1 1 Wp (XkT /n − X(k−1)T /n )k=1 , (XkT /n − X(k−1)T /n )k=1 1 1 1 ≤ T n r −1 |b1 (ε) − b2 (ε)| + T 1/2 n r − 2 |σ1 + σ̄1 (ε) − σ2 − σ̄2 (ε)| +C 2 X j=1 1 1 1 1 2,B min (T 1/2 n r − 2 σ̄j (ε), n r ε) + n r Wp (XT1,B /n (ε), XT /n (ε)), 2,B where C is a constant depending only on p. The term Wp (XT1,B /n (ε), XT /n (ε)) can be bounded as in Theorem 10 with t = T /n. In the Euclidean case r = 2 we see that in the bound for the Wasserstein distance the drift part disappears as n → ∞ (T fixed), while the Gaussian part remains invariant and the Gaussian approximation of small jumps gives an error of order min(σ̄j (ε), n1/2 ε). The bound on the larger jumps scales as n1/2 (T /n + (T /n)1/2 ) (for p = 1 even as T /n1/2 ) so that the entire bound on the Wasserstein distance remains bounded as n → ∞. 3.4 Lower bounds Applying the general lower bound established in Proposition 2 to Lévy processes, we get the following result: Corollary 4. Let W be a Brownian motion and X ε be a pure jump Lévy process with jumps of absolute value less than ε ∈ (0, 1]. This means that X ε has Lévy triplet (0, 0, νε ), supp(νε ) ⊂ [−ε, ε] and characteristic function  Z ε  ε iuXtε ϕt (u) = E[e ] = exp t (eiux − 1 − iux)νε (dx) . Let σ̄ 2 (ε) = R −ε x2 νε (dx). Then for p ≥ 1  R   R exp t (eiux − 1 − iux)νε (dx) − exp t √ Wp (Xtε , σ̄(ε)Wt ) ≥ sup 2|u| u∈R By the bound given in Proposition 2 we usually do not lose in approximation order as the following lower bound examples demonstrate. 16  (iux)2 2 νε (dx) . Let us start with the general case that at ε = 1 we have a standardised pure jump process X 1 withRE[Xt1 ] = 0, Var[Xt1 ] = t as for Brownian motion, which R means xν1 (dx) = 0, x2 ν1 (dx) = 1. Then rescaling as in Donsker’s Theorem we consider Xtε := εXε1−2 t such that νε (B) = ε−2 ν1 (ε−1 B) for Borel sets B, σ̄ 2 (ε) = 1 and Z 1   ϕεt (u) = exp tε−2 (eiεux − 1)ν1 (dx) . −1 R 3 Let us further assume that q3 := x ν1 (dx) 6= 0. Then, taking into account the first two moments, a Taylor expansion yields Z 1 itεu3 tu2 −2 tε − q3 + O(tε2 u4 ). (eiεux − 1)ν1 (dx) = − 2 3! −1 For t > ε2 we thus obtain at u0 = t−1/2 2  q √  −1/2 |ϕε (u0 ) − e−tu0 /2 | 3 /3!+O(ε2 /t) = t1/2 e−1/2 e−iq3 εt −1 = ε √ +O(ε/ t) . u0 e3! Hence, by Corollary 4 there are constants M > 0 and c > 0 such that for all t ≥ M ε2 Wp (Xtε , Wt ) ≥ cε. For t ≤ M ε2 we obtain at u0 = (8M λ1 /t)1/2 with λ1 = ν1 (R) 2 R −2 |ϕεt (u0 ) − e−tu0 /2 | t1/2 (cos(εu0 x)−1)ν1 (dx) ≥ etε − e−4Mλ1 1/2 u0 (8M λ1 ) e−2Mλ1 − e−4Mλ1 1/2 t . ≥ (8M λ1 )1/2 We conclude √ ∀t > 0, ε ∈ (0, 1] : Wp (Xtε , Wt ) ≥ K min( t, ε) for some positive R constant K, depending on ν1 , but independent of t and ε, whenever q3 = x3 ν1 (dx) 6= 0. Even for symmetric Lévy measures, √ not inducing skewness of the distribution, we can attain the order min( t, ε). If we consider ν1 = 12 (δ−1 + δ1 ), ε , we arrive at the same conclusion by computing the distance T1 νε = δ−ε2ε+δ 2 between Yt (ε) and N (0, t) as in Remark 3:      2 − exp − tu2 exp − t 1−cos(uε) ε2 . T1 (L (Yt (ε)), N (0, t)) = sup u u∈R If t ≥ ε2 , we choose u = 2π ε If t < ε2 , the choice u = 3 √ t and get  2π 2 t   1 − e−2π2  ε  1 − exp − 2 ε. ≥ T1 (L (Yt (ε)), N (0, t)) ≥ 2π ε 2π gives   −2 −9 √ e −e 2 T1 (L (Yt (ε)), N (0, t)) ≥ t . 3 √ We conclude that also in this case W1 (L (Yt (ε)), N (0, t)) ≥ K min( t, ε) holds for some positive constant K, independent of t and ε. 17 4 Total variation bounds via convolution 4.1 Notation and some useful properties Let (X , F ) be a measurable space and let µ and ν be two probability measures on (X , F ). Definition 4. The total variation distance between µ and ν is defined as kµ − νkT V = sup |µ(A) − ν(A)|. A∈F Lemma 6. The total variation distance has the following properties. R 1. kµ − νkT V = 12 supkΨk∞ ≤1 | X Ψ(x)(µ − ν)(dx)|. 2. kµ − νkT V = inf (P(X 6= Y ) : L (X) = µ, L (Y ) = ν). Remark 4. Let X be a discrete set, equipped with the Hamming metric d(x, y) = Ix6=y . In this case, thanks to Property 2. above, for any probability measures µ and ν on X we have W1 (µ, ν) = kµ − νkT V . The total variation distance does not always bound the Wasserstein distance, because the latter is also influenced by large distances. However, thanks to the following classical result, one can get some control on Wp given a bound on the total variation distance. Theorem 12. [See [24], Theorem 6.13] Let µ and ν be two probability measures on a Polish space (X , d). Let p ∈ [1, ∞) and x0 ∈ X . Then 1 Wp (µ, ν) ≤ 2 p′ Z  p1 d(x0 , x)p |µ − ν|(dx) , 1 1 = 1. + p p′ In particular, if p = 1 and the diameter of X is bounded by D, then W1 (µ, ν) ≤ 2Dkµ − νkT V . In Proposition 4 we will show an inequality that can be thought of as an inverse of the one above. Namely, the total variation distance between two measures convolved with a common measure can be bounded by a multiple of the Wasserstein distance of order 1. 4.2 Wasserstein distance of order 1 and total variation distance Recall that a real function g is of bounded variation if its total variation norm is finite, i.e. nX P −1 |g(xi+1 ) − g(xi )|< ∞, kgkBV = sup P ∈P i=0 where the supremum is taken over the set P = {P = (x0 , . . . , xnP ) : x0 < x1 < · · · < xnP } of all finite ordered subsets of R. We will denote by BV (R) the space of functions of bounded variation. We now state a lemma that will be useful in the following. 18 Lemma 7. Let g be a real function of bounded variation and φ ∈ L∞ (R) such that Z   φ(y) g(t − y) − lim g(x) dy hφ (t) = x→−∞ R is well defined. Then, (10) sup khφ kLip ≤ kgkBV . kφk∞ ≤1 Proof. The proof is an easy consequence of the following classical results on Lebesgue-Stieltjes measures: 1. For every right-continuous function g: R → R of bounded variation there exists a unique signed measure µ such that (11) µ(] − ∞, x]) = g(x) − lim g(y). y→−∞ 2. Let φ ∈ L∞ (R) and let g ∈ BV (R) be a right-continuous function. Let µ R be the finite signed measure associated to g as in (11).Then φ(t−y)µ(dy) is well defined, measurable in t ∈ R and bounded in absolute value by kφk∞ kgkBV . More precisely, let µ be the finite signed measure associated to g. It is enough to R prove that φ(t − y)µ(dy) is the weak R derivative of hφ since then, using Point 2. above, we deduce that khφ kLip = k φ(· − y)µ(dy)k∞ ≤ kφk∞ kgkBV and hence (10). The claim above follows by Fubini’s Theorem: for all T > 0 Z TZ Z Z φ(t − y)µ(dy)dt = I[0,T ] (u + y)φ(u)du µ(dy) 0 Z = φ(u)(g(T − u) − g(−u))du Z   T = φ(u) g(t − u) − lim g(x) du . x→−∞ R Hence, φ(t−y)µ(dy) is the weak derivative of as desired. R t=0 φ(u)(g(t−u)−limx→−∞ g(x))du Proposition 4. Let µ and ν be two measures on (R, B(R)) and G be an absolutely continuous measure with respect to the Lebesgue measure admitting a density g of bounded variation. Then the total variation distance between the convolution measures µ ∗ G and ν ∗ G is bounded by kµ ∗ G − ν ∗ GkT V ≤ kgkBV W1 (µ, ν). 2 Proof. kµ ∗ G − ν ∗ GkT V = 1 sup 2 kφk∞ ≤1 1 sup = 2 kφk∞ ≤1 1 sup = 2 kφk∞ ≤1 Z R φ(x)(µ ∗ G − ν ∗ G)(dx) Z Z R R R R Z Z 19  φ(x)g(x − t)(µ − ν)(dt) dx  φ(x)g(x − t)dx (µ − ν)(dt) , the supremum being taken over compactly supported functions φ. Denote by R hφ (t) = R φ(x)g(x − t)dx. From the last equality it follows that Z 1 sup sup kµ ∗ G − ν ∗ GkT V ≤ ψ(t)(µ − ν)(dt) , 2 kφk∞ ≤1 kψkLip ≤khφ kLip R hence, applying Lemma 7 and Proposition 1, we deduce that Z kgkBV kgkBV sup W1 (µ, ν). kµ ∗ G − ν ∗ GkT V ≤ ψ(t)(µ − ν)(dt) = 2 kψkLip ≤1 R 2 The upper bound established in Proposition 4 is sharp. To see that, let us consider the following example. Example 2. Let µ = δ0 , ν = δε and G = N (0, 1) for some ε > 0. Denoting by ϕ the density of a random variable N ∼ N (0, 1) and by Φ its cumulative distribution function, we have Z  ε ε ε 1 kν ∗ G − µ ∗ GkT V = −Φ − = 2Φ −1 |ϕ(x) − ϕ(x − ε)|dx = Φ 2 R 2 2 2 ε = √ + O(ε2 ). 2π q At the same time it is easy to see that W1 (µ, ν) = ε and kgkBV = π2 . Therefore, the upper bound established in Proposition 4 ε 1 kν ∗ G − µ ∗ GkT V ≤ √ W1 (µ, ν) = √ 2π 2π is exactly the correct estimate up to the first order. 4.3 Total variation distance and Toscani-Fourier distances R For any Lebesgue density f introduce its Fourier transform F f (u) = eiux f (x)dx. A first elementary result linking the total variation distance between convolution measures to Toscani-Fourier metrics is the following. Proposition 5. Let µ, ν and G be probability measures and suppose that its characteristic functions ϕµ , ϕν , ϕG are differentiable. Assume that G has a Lebesgue density g with mth weak derivative g (m) . Then, for all k, j, r ∈ {1, . . . , m}, we have kµ ∗ G − ν ∗ GkT V   √ √ |ϕ′µ (u) − ϕ′ν (u)| (j) kg k ≤ C Tk (µ, ν)kg (k) k2 + 2Tr (µ, ν)k(xg(x))(r) k2 + 2 sup 2 |u|j u∈R for some numerical constant C > 0. Proof. First of all, remark that if any one among the kg (•) k2 , k(xg(x))(•) k2 , |ϕ′ (u)−ϕ′ (u)| T• (µ, ν), or supu∈R µ |u|• ν appearing above is infinite, then there is nothing to prove. Therefore, from now on, we will assume that they are all finite. 20 Since G admits a density g with respect to Lebesgue measure, µ ∗ G and ν ∗ G have densities g ∗ µ and g ∗ ν. Using the Cauchy-Schwarz inequality we have Z p 1 1 √ kµ ∗ G − ν ∗ GkT V = 1 + x2 |g ∗ µ(x) − g ∗ ν(x)|dx 2 2 1+x ≤ C(kg ∗ µ − g ∗ νk2 +kx(g ∗ µ − g ∗ ν)k2 ), for some numerical constant C > 0. For all k > 0 an application of the Plancherel identity yields Z 1 |ϕµ (u) − ϕν (u)|2 1 2 2 kg ∗ µ − g ∗ νk2 = |ϕG (u)|2 uk du. kϕG (ϕµ − ϕν )k2 = 2π 2π uk Hence, kg ∗ µ − g ∗ νk2 ≤ In the same way we also have r 1 |ϕµ (u) − ϕν (u)| k/2 ku ϕG k2 . sup 2π u∈R |u|k/2 kx(g ∗ µ(x) − g ∗ ν(x))k22 ≤ 1 ′ 1 kϕ (ϕµ − ϕν )k22 + kϕG (ϕ′µ − ϕ′ν )k22 π G π and we conclude as before that for all r, j > 0 kx(g ∗ µ(x) − g ∗ ν(x))k2 r r |ϕ′µ (u) − ϕ′ν (u)| j/2 1 1 |ϕµ (u) − ϕν (u)| r/2 ′ ku ϕG k2 + ku ϕG k2 . sup sup ≤ r/2 π u∈R π u∈R |u| |u|j/2 It remains to apply the inverse Fourier transform. Using a different set of hypotheses, one can also establish the following relation between the total variation distance and the Toscani-Fourier distance. Proposition 6. Let µ, ν and G be real probability measures absolutely continuous with respect to the Lebesgue measure. Let fµ , fν and g denote their densities and Fµ and Fν denote the cumulative distribution functions of µ and ν. Suppose that F g ∈ L1 and that Fµ − Fν ∈ L1 . Further suppose that the graphs of fµ ∗ g and fν ∗ g intersect in at most N points. Then, Z N T1 (µ, ν) |F g(u)|du. kµ ∗ G − ν ∗ GkT V ≤ 2π Proof. As in the proof of Proposition 4, let us introduce the function Z hφ (t) := φ(x)g(t − x)dx R and recall that kµ ∗ G − ν ∗ GkT V = 1 sup 2 kφk∞ ≤1 21 Z R hφ (t)(µ − ν)(dt) . Using an integration by part and Plancherel identity, we get Z Z hφ (t)(µ − ν)(dt) = h′φ (t)(Fµ (t) − Fν (t))dt R R Z 1 = F h′φ (u)F (Fµ − Fν )(u)du 2π Z ϕµ (u) − ϕν (u) 1 F h′φ (u) du = 2π −iu Z 1 ≤ T1 (µ, ν) |F h′φ (u)|du. 2π (12) Also observe that sup kφk∞ ≤1 Z hφ (t)(µ − ν)(dt) = R where φ̃(x) = ( −1 1 if if Z R hφ̃ (t)(µ − ν)(dt) fµ ∗ g(x) < fν ∗ g(x), fµ ∗ g(x) ≥ fν ∗ g(x). Let us denote by −∞ = x0 < x1 < · · · < xN < xN +1 = +∞ the points of intersections between the graphs of fµ ∗ g and fν ∗ g. In particular φ̃(u) = P i ± N i=0 (−1) I[xi ,xi+1 ) (u) with the sign depending on the sign of fµ ∗ g − fν ∗ g on (−∞, x1 ). Thus, h′φ̃ (u) = ±2 N X = ±2 N X j=1 (−1)j g(u − xj ). In particular, we get that F h′φ̃ (u) (−1)j F g(u)eiuxj , j=1 hence |F h′φ̃ (u)|≤ 2N |F g(u)|. This fact, together with (12), concludes the proof. Let us observe that another way to link the total variation distance between convolution measures to the Toscani-Fourier distance is offered by Theorem 2.21 in [2] joint with Proposition 4. More precisely, Theorem 2.21 in [2] states that, under appropriate hypotheses on µ and ν, 1/3  18M T2 (µ, ν)1/6 , W1 (µ, ν) ≤ π with M = max {E[X 2 ], E[Y 2 ]}, X ∼ µ and Y ∼ ν. Therefore, from Proposition 4, it follows that  1/3 9M kµ ∗ G − ν ∗ GkT V ≤ kgkBV T2 (µ, ν)1/6 , 4π where g denotes the density of G. Using some ideas from the proof of Theorem 2.21 in [2] we will be able to prove the following general result. 22 Proposition 7. Let µ, ν ∈ Pj (R), j ≥ 1, and G be a measure, absolutely continuous with respect to the Lebesgue measure. Suppose that the density g of G is j-times weakly differentiable with jth derivative g (j) ∈ L2 . Then, 1/(2j+1) kµ ∗ G − ν ∗ GkT V ≤ Cj 2j/(2j+1) kg (j) k2 Tj (µ, ν)2j/(2j+1) , where Cj = max (E[|X + Z|j ], E[|Y + Z|j ]) with X ∼ µ, Y ∼ ν, Z ∼ G and Z independent of X and Y . Proof. Using the same notation as in Proposition 6, we have for all R > 0 Z 1 kµ ∗ G − ν ∗ GkT V = |g ∗ µ(x) − g ∗ ν(x)|dx 2 Z R  Z 1 1 |g ∗ µ(x) − g ∗ ν(x)|dx + j |x|j |g ∗ µ(x) − g ∗ ν(x)|dx ≤ 2 R |x|>R −R Z R  Cj 1 |g ∗ µ(x) − g ∗ ν(x)|dx + j . ≤ 2 R −R By Cauchy-Schwarz inequality, Z R √ |g ∗ µ(x) − g ∗ ν(x)|dx ≤ 2Rkg ∗ µ − g ∗ νk2 −R C 2/(2j+1) j holds. Taking R = ( √2kg∗µ−g∗νk ) 2 kµ ∗ G − ν ∗ GkT V ≤ we get 1 1/(2j+1) √ ( 2kg ∗ µ − g ∗ νk2 )2j/(2j+1) . C 2 j Using Plancherel identity and the properties of the Fourier transform, we deduce that 1 1 kF (g ∗ µ) − F (g ∗ ν)k22 = kF g(ϕµ − ϕν )k22 2π 2π Z |ϕµ (u) − ϕν (u)|2 1 du |F g(u)|2 u2j = 2π u2j Z 1 ≤ Tj (µ, ν)2 |F g(u)|2 u2j du 2π 1 2 T (µ, ν)kF g (j) k22 = Tj2 (µ, ν)kg (j) k22 . = 2π j kg ∗ µ − g ∗ νk22 = It follows that 1/(2j+1) kµ ∗ G − ν ∗ GkT V ≤ Cj (Tj (µ, ν)kg (j) k2 )2j/(2j+1) . Remark 5. To better understand the upper bounds presented above, let us specialise to the case G = N (0, σ 2 ). In order to compare the results presented in Propositions 5–7 let us start by observing that the following equalities hold. R x2 u2 σ2 1 • If g(x) = √2πσ e− 2σ2 , then F g(u) = e− 2 . Therefore, |F g(u)|du = √ 2π σ . 23 that kg ′ k22 = q 2 σ2 π . 2 2 x x 2 √−x e− 2σ2 and g ′′ (x) = √ 1 e− 2σ2 (−1 + σx2 ). It follows 2πσ3 2πσ3 R∞ 2 √1 , kg ′′ k22 = πσ1 5 0 e−y (y 2 −1)2 dy = 4√1πσ5 and kgkBV = 4 πσ3 • Also, g ′ (x) = We are now able to compare the previous results for independent random variables Z ∼ N (0, σ 2 ), X ∼ µ, Y ∼ ν. Proposition 5 for T1 : With a numerical constant C > 0, independent of the laws of X, Y, Z,    1 1 kL (X + Z) − L (Y + Z)kT V ≤ C T1 (X, Y ) √ + σ σ3  |ϕ′X (u) − ϕ′Y (u)| 1 . + √ sup |u| σ 3 u∈R Proposition 6: Let N be the number of intersections between the graphs of the densities of X + Z and Y + Z. Then, N T1 (X, Y ) . kL (X + Z) − L (Y + Z)kT V ≤ √ σ 2π Proposition 7 for T1 : kL (X + Z) − L (Y + Z)kT V  max (E[|X + Z|], E[|Y + Z|]) 1/3 (T (X, Y ))2/3 1 √ ≤ . σ 4 π Proposition 7 for T2 : kL (X + Z) − L (Y + Z)kT V 1/5  (T2 (X, Y ))4/5 max (E[(X + Z)2 ], E[(Y + Z)2 ]) . ≤ 16π σ2 Proposition 4 + Theorem 2.21 in [2]: kL (X + Z) − L (Y + Z)kT V ≤  9 max (E[X 2 ], E[Y 2 ]) √ 2π 5 1/3 (T2 (X, Y ))1/6 . σ We see that Proposition 7 gives a much tighter bound than Proposition 4 + Theorem 2.21 in [2] when T2 (X, Y ) is small. 4.4 Main total variation results As it was the case in Section 3, in order to obtain an upper bound for the total variation distance between the marginals Xt1 and Xt2 of two Lévy processes it is enough to separetely control the total variation distance between Gaussian distributions, between the small jumps and the corresponding Gaussian component and finally between the big jumps. The latter can be controlled by means of the following result. 24 Theorem 13. Let (Xi )i≥1 and (Yi )i≥1 be sequences of i.i.d. random variables a.s. different from zero and N , N ′ be two Poisson random variables with N (resp. N ′ ) independent of (Xi )i≥1 (resp. (Yi )i≥1 ). Denote by λ (resp. λ′ ) the mean of N (resp. N ′ ). Then, L N X i=1  Xi − L N′ X Yi i=1  ′ TV ≤ (λ ∧ λ′ )kL (X1 ) − L (Y1 )kT V +1 − e−|λ−λ | . Proof. Without loss of generality, let us suppose that λ ≥ λ′ and write λ = α + λ′ , α ≥ 0. By triangle inequality, L N X i=1 N′   X Yi Xi − L i=1 TV ≤ L N X i=1 + L N ′′   X Xi Xi − L i=1 N ′′ X i=1 TV N′   X Yi Xi − L i=1 TV , (13) where N ′′ is a random variable independent of (Xi )i≥1 and with the same law as N ′ . The first addendum in (13) can be bounded as follows. Let P be a Poisson random variable independent of N ′′ and (Xi )i≥1 with mean α. Then, L N X i=1 N ′′   X Xi Xi − L TV i=1 = L ′′ +P  NX i=1 ≤ δ0 − L N′   X Xi Xi − L P X i=1 Xi i=1  TV TV where the last bound follows by subadditivity of the total variation distance. By definition, it is easy to see that δ0 − L P X i=1 Xi  TV =P P X i=1  Xi 6= 0 ≤ 1 − e−α . In order to bound the second addendum in (13) we condition on N ′ and use again the subadditivity of the total variation joined with the fact that L (N ′ ) = L (N ′′ ): L N ′′ X i=1  Xi − L N′ X i=1 Yi  TV = X L i=1 n≥0 ≤ X n≥0 n X  Xi − L n X i=1 Yi  TV P(N ′ = n) nkL (X1 ) − L (Y1 )kT V P(N ′ = n) = λ′ kL (X1 ) − L (Y1 )kT V . The treatment of the small jumps is the subject of the following result: 25 Proposition 8. Let X be a pure jump Lévy process with Lévy measure ν. Introduce νε = νI|x|≤ε . Then, for all Σ > 0 and ε ∈ (0, 1], we have (0,Σ,νε ) Pt − (0, Pt √ Σ2 +σ̄2 (ε),0) TV r   2 (0,0,νε ) (0,σ̄(ε),0) P , P W 1 t t πtΣ2 r  p 2 ε ≤ . min 2 tσ̄ 2 (ε), 2 πtΣ 2 ≤ Proof. This follows by applying first Proposition 4 and then Theorem 9. As a consequence of the above estimates on the Wasserstein distances, we obtain a bound for the total variation distance of the marginals of Lévy processes with non-zero Gaussian components. Theorem 14. With the same notation used in Theorem 11 and Section 2.4, for all t > 0, ε ∈ (0, 1] and for all σi > 0, i = 1, 2, we have: (b1 ,σ1 ,ν1 ) Pt (b ,σ2 ,ν2 ) − Pt 2 q TV p √ p b1 (ε) − b2 (ε) + 2 σ12 + σ̄12 (ε) − σ22 + σ̄22 (ε) p p ≤ σ12 + σ̄12 (ε) ∨ σ22 + σ̄22 (ε) s 2  q X 2 ε min 2 tσ̄i2 (ε), + 2 πtσi 2 i=1 t 2π ν1ε νε − 2 kT V , λ1 (ε) λ2 (ε) + t|λ1 (ε) − λ2 (ε)| + t(λ1 (ε) ∧ λ2 (ε))k with νjε = νj (· ∩ (R \ (−ε, ε))) and λj (ε) = νjε (R). Proof. By subadditivity of the total variation distance and by the triangle inequality, (b ,σ ,ν ) Pt 1 1 1 − (b ,σ ,ν ) Pt 2 2 2 TV ≤ 2 X (0,σ ,ν (ε)) Pt i i i=1 (b1 (ε), + Pt √ − (0, Pt σ12 +σ̄12 (ε),0) √ σi2 +σ̄i2 (ε),0) TV (b2 (ε), − Pt √ σ22 +σ̄22 (ε),0) TV + kL (Xt1,B (ε)) − L (Xt2,B (ε))kT V . The proof follows from Proposition 8, the classical bound √ √1 |µ1 − µ2 |+ 2|σ1 − σ2 | . kN (µ1 , σ12 ) − N (µ2 , σ22 )kT V ≤ 2π σ1 ∨ σ2 and Theorem 13. Another useful result follows directly from Proposition 7 with j = 1 and allows to bound the total variation distance for Lévy processes with positive Gaussian part by the Toscani-Fourier distance for the same Lévy processes, but with a smaller Gaussian part. 26 Theorem 15. Let X i ∼ (bi , σi2 , νi ), with σi > 0, i = 1, 2, be two Lévy processes. e i ∼ (bi , σ 2 − Σ2 , νi ), For any Σ ∈ (0, σ1 ∧ σ2 ) consider the Lévy processes X i i = 1, 2. Then, kL (Xt1 ) − L (Xt2 )kT V ≤ 5 5.1 e 1, X e 2 ))2/3 max (E[|Xt1 |], E[|Xt2 |])1/3 (T1 (X t t √ . (16π)1/6 Σ t A statistical application Lower bounds in the minimax sense One of the main goals in statistics is to estimate a quantity of interest from the data. There are different criteria that can be used to judge the quality of an estimator. In nonparametric statistics it is common to use a minimax approach. Let us recall the classical setting. From the data (X1 , . . . , Xn ) one wants to recover a quantity of interest θ (e.g. θ is the density of the observations, or the regression function, or the Léyy density, or the diffusion coefficient, etc.). In practice θ is unknown (but supposed to belong to a certain parameter space Θ) and one needs to estimate it via an estimator (a measurable function of the data) θ̂n = θ̂n (X1 , . . . , Xn ). To measure the accuracy of the estimator one computes the minimax risk R∗n := inf sup E[d2 (θ, Tn )], Tn θ∈Θ where the infimum is taken over all possible estimators Tn of θ and d is a semi-distance on Θ. Furthermore, one says that a positive sequence (ψn )n≥1 is an optimal rate of convergence of estimators on (Θ, d) if there exist constants C < ∞ and c > 0 such that lim sup ψn−2 R∗n ≤ C (upper bound) (14) lim inf ψn−2 R∗n ≥ c, (lower bound). (15) n→∞ and n→∞ The goal is then to construct an estimator θn∗ such that sup E[d2 (θn∗ , θ)] ≤ C ′ ψn2 θ∈Θ where (ψn )n≥1 is the optimal rate of convergence and C ′ < ∞ is a constant. The usual way to proceed is to build an estimator θ̂n of θ and start the investigation about its performance firstly via an upper bound like (14). This is important since the first thing to check is that the considered estimator is at least consistent, that is automatically implied if supθ∈Θ E[d2 (θ, θ̂n )] → 0. After that, a natural question is whether one could construct a better (in terms of rate of convergence in the class (Θ, d)) estimator. In order to ensure that it is not possible to obtain a better estimator than the one already constructed one has to prove a lower bound, that is it is needed to prove that the rate of convergence of any other possible estimator of θ will not be faster than the rate obtained in the upper bound. This is in general a difficult task and we refer to Chapter 2 in [23] for general techniques to prove lower bounds. Without recalling all the 27 steps needed to prove a lower bound following [23], let us stress here that one of the fundamental ingredients is to have a fine upper bound for the total variation distance or other measure distances. To that end the estimates in Section 4.4 can be of general interest to prove lower bounds in the minimax sense. One situation when this general procedure applies is the following, where we show how to simplify the arguments used in [12] in order to prove the desired lower bound for an estimator of the integrated volatility. 5.2 How to simplify the proof of the lower bound in [12] In [12], the authors consider a one-dimensional Itô-semimartingale X with characteristics (B, C, ν): Bt = Z t bs ds, Ct = 0 Z t cs ds, ν(dt, dx) = dtFt (dx). 0 r They assume that X belongs to the class SA of all Itô-semimartingales that satisfy Z |bt |+ct + (|x|r ∧1)Ft (dx) ≤ A ∀t ∈ [0, 1]. Their goal is to estimate the integrated volatility C at time 1, C(X)1 , from high-frequency observations X i , i = 0, . . . , n. They have an upper bound for n an estimator of C(X)1 and they want to prove that the rate of convergence attained by that estimator is optimal. To that aim they need to prove that any uniform rate ψn for estimating C(X)1 satisfies ψn ≥ (n log n)− 2−r 2 if r > 1. (16) Following [23], their strategy consists in finding two Lévy processes X i ∼ (bi , σi2 , Fi ), i = 1, 2, such that 1. σ12 − σ22 = an := (n log n)− R 2. (|x|r ∧1)Fi (dx) ≤ K, 2−r 2 , r ∈ (0, 2), 1 2 3. kL ((Xi/n )1≤i≤n ) − L ((Xi/n )1≤i≤n )kT V → 0 as n → ∞. The construction in [12] of the Lévy processes as well as the proof of the convergence in total variation stated in Point 3. above is very involved. Let us now see how to use Theorem 15 to prove (16) more easily. To that aim consider two sequences of Lévy processes X 1,n ∼ (0, 1 + an , Fn1 ) and X 2,n ∼ (0, 1, Fn2 ) with Lévy measures Fn1 and Fn2 satisfying the following conditions: R • R (|x|r ∧1)Fni (dx) ≤ K, i = 1, 2. R • Define Ψi,n := R (eiux − 1 − iuxI|x|≤1 )Fni (dx), i = 1, 2. Then Ψ1,n and Ψ2,n are real positive functions such that Ψ2,n (u) = an + Ψ1,n (u), 2 28 ∀|u|< un := 2 p n log n. (17) It is not difficult to see that Lévy measures Fn1 and Fn2 satisfying such conditions always exist. In particular, it follows from (17) that the X i,n , i = 1, 2, have the same characteristic function for all |u|< un , i.e.: i  u2 h 1,n Ψ1,n (u)  , (1 + an ) − E eiuX1/n = exp − 2n n i  h  2 2,n u Ψ2,n (u) E eiuX1/n = exp − . − 2n n 1,n 2,n In order to apply Theorem 15 let us observe that X1/n (resp. X1/n ) is equal 1 e 1,n in law to the convolution between a Gaussian distribution N (0, ) and X 1/n 8n e 2,n ∼ (0, 7 , F 2 )). We obtain e 2,n ), where X e 1,n ∼ (0, 7 + an , F 1 ) (resp. X (resp. X n n 1/n 8 8 1,n 2,n kL (X1/n ) − L (X1/n )kT V ≤  32 1/6 π (Cn n3/4 T1 (µn , νn )) 2/3 , 1,n 2,n where Cn2 = max (E[|X1/n |], E[|X1/n |]). We are therefore left to compute T1 (µn , νn ) 1,n 2,n and show that nkL (X1/n ) − L (X1/n )kT V → 0. T1 (µn , νn ) = sup exp ( − u2 7 2n ( 8 + an ) − Ψ1,n (u) ) n u u∈R h 7u exp ( − 16n ) exp ( − 2 = sup |u|>un ≤ exp ( − un 7u2n 16n ) = 2 u an 2n − Ψ1,n (u) ) n − exp ( − − exp ( − u 7u2 16n − Ψ2,n (u) ) n Ψ2,n (u) ) n i log n ) exp ( − 7×4n n−9/4 16n √ = √ . 2 n log n 2 log n Hence, kµn ∗ Gn − νn ∗ Gn kT V ≤ 2/3    2/3 32 1/6 Cn n−1 n−9/4 = Cn n3/4 √ . π (log n)1/3 log n Therefore, q 1,n 2,n nkL (X1/n ) − L (X1/n )kT V  32 1/12  C 1/3 n √ → 0, ≤ π log n 1,n 2,n kL ((Xi/n )1≤i≤n ) − L ((Xi/n )1≤i≤n )kT V ≤ as desired. References [1] Y. Aït-Sahalia and J. Jacod: Testing for jumps in a discretely observed process. The Annals of Statistics, 37, (2009), 184–222. [2] J. A. Carrillo and G. Toscani: Contractive probability metrics and asymptotic behavior of dissipative kinetic equations. Riv. Mat. Univ. Parma, 6, (2007), 75–198. 29 [3] R. Cont and P. Tankov: Financial modelling with jump processes. Chapman & Hall/CRC Financial Mathematics Series, Chapman & Hall/CRC, Boca Raton, FL, 2004. [4] C. G. Esseen: On mean central limit theorems. Kungl. Tekn. Högsk. Handl. Stockholm, 121, (1958), 31. [5] P. Étoré and E. Mariucci: L1-distance for additive processes with timehomogeneous Lévy measures. Electronic Communications in Probability, 19, (2014), 1–10. [6] N. Fournier: Simulation and approximation of Lévy-driven stochastic differential equations. ESAIM Probab. Stat., 15, (2011), 233–248. [7] G. Gabetta, G. Toscani, and B. Wennberg: Metrics for probability distributions and the trend to equilibrium for solutions of the boltzmann equation. Journal of statistical physics, 81, (1995), 901–934. [8] J. Gairing, M. Högele, T. Kosenkova, and A. Kulik: Coupling distances between Lévy measures and applications to noise sensitivity of SDE. Stochastics and Dynamics, 15, (2015). [9] A. L. Gibbs and F. E. Su: On choosing and bounding probability metrics. International statistical review, 70, (2002), 419–435. [10] C. R. Givens and R. M. Shortt: A class of Wasserstein metrics for probability distributions. Michigan Math. J., 31, (1984), 231–240. [11] B. V. Gnedenko and A. N. Kolmogorov: Limit distributions for sums of independent random variables. English edition, Addison-Wesley, 1954. [12] J. Jacod and M. Reiß: A remark on the rates of convergence for integrated volatility estimation in the presence of jumps. The Annals of Statistics, 42, (2014), 1131–1144. [13] J. Jacod and A. N. Shiryaev: Limit theorems for stochastic processes, Springer-Verlag Berlin, volume 288, 1987. [14] Y. A. Kutoyants: Statistical Inference for Spatial Poisson Processes, Lecture Notes in Statistics 134, Springer, New York, volume 134, 2012. [15] F. Liese: Estimates of Hellinger integrals of infinitely divisible distributions. Kybernetika, 23, (1987), 227–238. [16] J. Mémin and A. N. Shiryayev: Distance de Hellinger-Kakutani des lois correspondant à deux processus à accroissements indépendants. Z. Wahrsch. Verw. Gebiete, 70, (1985), 67–89. [17] M. H. Neumann and M. Reiß: Nonparametric estimation for Lévy processes from low-frequency observations. Bernoulli, 15, (2009), 223-248. [18] V. V. Petrov: Sums of independent random variables. Springer-Verlag, Berlin Heidelberg New York, 1975. [19] E. Rio: Upper bounds for minimal distances in the central limit theorem. Ann. Inst. Henri Poincaré Probab. Stat., 45, (2009), 802–817. 30 [20] L. Rüschendorf and J. Woerner: Expansion of transition distributions of Lévy processes in small time. Bernoulli, 8, (2002), 81–96. [21] A. I. Sakhanenko: Estimates in an invariance principle. Limit theorems of probability theory, Trudy Inst. Mat., 5, 1985, 27–44. [22] K. I. Sato: Lévy processes and infinitely divisible distributions. Cambridge Studies in Advanced Mathematics, Cambridge University Press, Cambridge, volume 68, 1999. [23] A. B. Tsybakov: Introduction to nonparametric estimation. Springer Series in Statistics, Springer, New York, 2009. [24] C. Villani: Optimal transport: Old and New. Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], Springer-Verlag, Berlin, volume 338, 2009. [25] V. M. Zolotarev: Modern theory of summation of random variables. Modern Probability and Statistics, VSP, Utrecht, 1997. 31
10math.ST
Device-to-Device Aided Multicasting Thomas Varela Santana∗† , Richard Combes† and Mari Kobayashi† ∗ Orange arXiv:1801.05224v1 [cs.IT] 16 Jan 2018 † Laboratoire Labs Networks, Châtillon, France, Email: [email protected] des Signaux et Systèmes (L2S), CentraleSupélec-CNRS-Université Paris-Sud, Gif-sur-Yvette, France, Email: {richard.combes, mari.kobayashi}@centralesupelec.fr Abstract—We consider a device-to-device (D2D) aided multicast channel, where a transmitter wishes to convey a common message to many receivers and these receivers cooperate with each other. We propose a simple computationally efficient scheme requiring only statistical channel knowledge at transmitter. Our analysis in general topologies reveals that, when the number of receivers K grows to infinity, the proposed scheme guarantees a multicast rate of 21 log2 (1 + β ln K) with high probability for any β < β ⋆ where β ⋆ depends on the network topology. This scheme undergoes a phase transition at threshold β ⋆ ln K where transmissions are successful/unsuccessful with high probability when the SNR is above/below this threshold. We also analyze the outage rate of the proposed scheme in the same setting. Index Terms—Device-to-Device, Multicasting. I. I NTRODUCTION We consider the multicast channel, where a single transmitter sends a common message to many receivers in the presence of fading [1]–[3]. Since the common message must be decoded by all receivers, the multicast capacity of the fading broadcast channel is limited by the worst user. For the case of the i.i.d. Rayleigh fading channel, it is known that the multicast capacity vanishes inversely to the number K of users as K grows [4]. Despite its vanishing rate, the multicast channel is relevant to two scenarios in wireless crowded networks. The first scenario is the wireless edge caching. It has been shown that the traffic during the peak hours can be significantly reduced by caching popular contents during off-peak hours, and delivering these popular contents using multicasting (see e.g. [5], [6] and references therein). A novel user selection scheme requiring only statistical channel knowledge has been proposed recently in [7] for the case of i.i.d. Rayleigh fading channel. The second scenario is so-called enhanced Multimedia Broadcast Multicast Service (eMBMS) aided by Proximity Service (ProSe), standardized by the 3rd Generation Partnership Project (3GPP). These services reduce the network load by multicasting common data to public safety devices [8] which can use Device-to-Device (D2D) communication [9]. In this work, motivated by these two scenarios, we study D2D-aided multicasting without Channel State Information at the Transmitter (CSIT) to overcome the vanishing effect of the multicast rate. We consider a general network topology where the transmitter has only statistical channel knowledge. In this setup, we address the fundamental question: can D2D without CSIT increase the achievable multicasting rate ? We propose a two-stage transmission scheme assuming no CSIT: in the first stage the transmitter sends a common message, while in the second stage, the subset of users whom have successfully decoded retransmit this information simultaneously by using the same codeword. We study this two-stage scheme for two metrics of interest: • The average multicast rate, which is the expected number of successfully decoded bits per channel use achieved by a user chosen uniformly at random; • The outage rate, which is the maximum rate at which all the users can decode the message with an error probability of ǫ. We show that by carefully choosing the transmission rate, we can answer positively to our main question. More specifically, our contributions is two-fold and summarized below: 1) We identify conditions on the network topology for which the average multicast rate grows with the number of users K and the outage rate does not vanish with K. 2) We provide tractable, asymptotic expressions for both the multicast rate and the outage rate in the regime of a large number of users. A similar two-phase scheme has been studied in [10]. However this work is different from ours in its assumption and concept. First, the channel statistic of all users is assumed to be symmetric in [10]. In fact, this is a special case of our model corresponding to a single class C = 1 (see subsection II-D). Second, the metric of the work [10] is on the error probability decay by exploiting channel hardening via spacetime code, while we aim at achieving a scalable multicast rate by exploiting multiuser diversity. The rest of the paper is organized as follows. Section II presents the system model. Sections III and IV studies the multicast and outage rate metrics respectively. Numerical experiments are provided in Section V. Section VI concludes the paper. We denote by ln the natural logarithm and log2 the binary logarithm. II. M ODEL A. Channel Model We consider a multicast channel, where a station (indexed by 0) wants to convey the same message to K users indexed by i = 1, . . . , K. Time is slotted, and in each time slot, yi the received signal by i = 1, . . . , K is given by: yi = K X j=0 xj hj,i + ni , with (xi )i=0,...,K the signal transmitted by i = 0, . . . , K, h = (hi,j )i,j=0,...,K are the channel coefficients and ni ∼ N (0, 1) is Additive White Gaussian Noise (AWGN). The channel coefficients h are assumed to be independent, Gaussian complex random variables with mean 0 and variance γi,j = E(|hi,j |2 ). The transmitted signals have unit power E(|xi |2 ) ≤ 1. This is without loss of generality, otherwise simply replace xi by p √ xi 2 and hi,j by E(|xi |2 )hi,j . E(|xi | ) Matrix Γ = (γi,j )i,j=0,...,K represents the channel statistics, and captures the topology of the network. Channel coefficients during successive time slots are assumed to be independent. No channel state information is available at the transmitter: the transmission strategy should only depend on the statistics of the channel (i.e. Γ), but not on the channel coefficients h. B. Proposed scheme Throughout the article we will study the following transmission scheme, which utilizes two time slots. Let h, h′ , the channel coefficients during the two successive time slots. • During the first time slot, the station broadcasts a message at rate log2 (1 + s), where s is a parameter of the scheme and can be chosen depending on the channel statistics Γ. • At the end of the first time slot, users attempt to decode, and user i decodes successfully if and only if the received Signal to Noise Ratio (SNR) is greater than s, i.e. |h0,i |2 ≥ s (1 ) • All users that have successfully decoded the message in the first slot retransmit this message in the second slot. As before, user j decodes successfully at the end ofPthe second time slot if the SNR is above s, i.e. K | j=1 Zj (s)h′j,i |2 ≥ s, where Z1 (s), . . . , ZK (s) are binary variables with Zj (s) = 1 if j has decoded successfully during the first time slot and 0 otherwise. C. Performance Measures We say that user i decodes if and only if he successfully decodes either in the first or second slot. Denote by i (s) the PP K 1 probability that i = 1, . . . , K decodes, P̄ (s) = K i=1 Pi (s) the probability that a user chosen uniformly at random amongst i = 1, . . . , K decodes, and P+ (s) probability that all users decode. We study two performance measures for our problems: the multicast rate: Rm = 1 max{log2 (1 + s)P̄ (s)}, 2 s≥0 which is the expected number of bits received by a user chosen uniformly at random per time slot, and the outage rate: 1 log2 (1 + s) with s solution to P+ (s) = 1 − ǫ. 2 which is the largest rate such that all users decode with probability at least 1 − ǫ, with ǫ some fixed reliability level. Both performance measures are interesting for different scenarios: Rm seems more appropriate when considering say video streaming where the goal is that on average most users receive enough information, whereas Ro seems more suited to applications such as broadcasting of safety information, where it is important that all users obtain the message. D. The Block Model To study large systems, we introduce a block model for Γ. Users 1, . . . , K are partitioned in classes 1, . . . , C, where ci ∈ {1, . . . , C} indicates the class of user i, and c0 = 0 by convention. There are Kαc users of c, with αc > 0 the Pclass C proportion of users of class c and c=1 αc = 1. Matrix Γ is a block matrix, so that the mean channel gains between two users depends solely on their class. Namely, γi,j = gci ,cj for all i, j = 0, . . . , K. Define G = maxc,c′ =0,...,C gc,c′ the largest entry of Γ, so that maxi,j=0,...,K γi,j = G. This model can represent any network topology, as the number of classes may be arbitrary. We introduce the following natural assumption. Assumption 1: Any class of users can be reached in two transmissions, so that for all c = 1, . . . , C there exists c′ such that g0,c′ gc′ ,c > 0. E. Baseline We will compare the performance of this scheme to the most natural baseline which is the same scheme where only the first time slot is used. The performance of the baseline is recalled below. Proposition 1: The performance of the baseline scheme is: Rm = max{log2 (1 + s) s≥0 C X αc e c=1 −gs 0,c } = K→∞ C 1  1  1  X αc −1  . = O ln Ro = log2 1 + K→∞ K 1−ǫ g K c=1 0,c Proof. In the baseline scheme, user i successfully decodes if and only if |h0,i |2 ≥ s. Since |h0,i |2 follows an exponential distribution with mean γ0,i , we have: Pi (s) = P(|h0,i |2 ≥ s) = e − γs 0,i , and averaging: P̄ (s) = C K X s 1 X − γ0,i − s = αc e g0,c . e K i=1 c=1 which is the announced result. Once again i decodes successfully if and only if |h0,i |2 ≥ s, |h0,i |2 follows an exponential distribution with mean γ0,i and h0,1 , . . . , h0,K are independent so that: Ro = 1 This is valid if we assume that time slots are long enough so that one may use an efficient code for the AWGN channel. O(1), P+ (s) = P(|h0,i |2 ≥ s , i = 1, . . . , K) = K X 1 = exp −s γ i=1 0,i ( ) K Y i=1 P(|h0,i |2 ≥ s) C X αc = exp −sK g c=1 0,c ( ) . The outage rate is log2 (1 + s) with s solution to the equation P+ (s) = 1 − ǫ, so replacing yields the announced result.  III. M ULTICAST R ATE • In this section we study the multicast rate of the proposed scheme, and show that it undergoes a phase transition in the regime of a large number of users K → ∞, so that the probability of success P̄ (s) becomes constant-by-parts and may be computed explicitly as a function of g and α. A. Success probability • We first prove Proposition 2, a formula for the probability of success Pi (s), which will serve as the backbone of our analysis. This result shows that the success probability Pi (s) can be controlled by examining the fluctuations of Xi (s), a sum of independent Bernoulli random variables. Proposition 2: For any i = 1, . . . , K and s ≥ 0 we have:    s − s , Pi (s) = 1 − (1 − e γ0,i )E 1 − exp − Xi (s) where Z1 (s), . . . , ZK (s) aresindependent random variables in PK − {0, 1} with E(Zi (s)) = e γ0,i and Xi (s) = j=1 Zj (s)γj,i . ′ (h′i,j )i,j=0,...,K Proof. Consider h = (hi,j )i,j=0,...,K and h = the channel coefficients during the first and second time slot respectively. By assumption h is independent from h′ . Denote by Z(s) = (Z1 (s), . . . , ZK (s)) the outcome of the first time slot, where Zi (s) = 1 if user i decodes correctly at the first time slot. We may write Zi (s) = 1{|h0,i |2 ≥ s}. Since |h0,i |2 has exponential distribution with mean γ0,i , it follows − γs 0,i . Furthermore, since h0,1 , . . . , h0,K are that E(Zi (s)) = e independent, so are Z1 (s), . . . , ZK (s). Consider user i. Conditionally to the value of Z(s), user i does not decode successfully in the first phase if and only if Zi (s) = 0. If Zi (s) = 0, he does not P decode successfully in the second phase if and only if | j6=i h′j,i Zj (s)|2 = P PK ′ 2 | K hj,i Zj (s)|2 has expoj=1 hj,i Zj (s)| ≤ s, where | PK j=1 nential distribution with mean j=1 γj,i Zj (s) = Xi (s), since Z(s) is independent of h′ . Hence P(i does not decode|Z(s)) = (1 − Zi (s))(1 − e Taking expectations over Z(s) yields the result − X s(s) i ). . B. Asymptotic behavior We now analyze how the multicast rate scales in the regime of a large number of users. Define: βc = • max {g0,c′ 1{gc′ ,c > 0}}, c′ =1,...,C the largest value of g0,c′ , the mean channel gain from the station to class c′ , where class c′ can communicate with class c in the second phase i.e. gc′ ,c > 0. Further define the minimum value β ⋆ = minc=1,...,C βc . Theorem 1 shows that in the limit of a large number of users, for any user i, the success probability Pi undergoes a phase transition at the value βci ln K. Namely transmissions are always successful above this threshold, and always unsuccessful below. This has 3 consequences: Our scheme transmits at rate 12 log2 (1 + β ln K) with an arbitrarily high probability of success for any β < β ⋆ . As K → ∞, the multicast rate of our scheme scales as O(ln ln K) while the baseline yields a multicast rate of O(1). So considering two slots instead of one has a dramatic impact on performance. Considering more than two time slots does not seem to improve this scaling. To obtain an order-optimal rate, one can set s = β ln K for any β < β ⋆ , so that optimizing over s is not needed. Theorem 1: (i) For any β > 0 and i = 1, . . . , K we have: ( 1 if β < βci Pi (β ln K) → K→∞ 0 otherwise. (ii) We have: C X P̄ (β ln K) → K→∞ c=1 αc 1{β < βc }, Proof. From Proposition 2, we have: Pi (β ln K) = 1 − (1 − K We have K β 0,ci −g β 0,ci −g )E(1 − e − X β(βlnlnKK) i ). → 0 so that: K→∞ lim Pi (β ln K) = lim E(e K→∞ − X β(βlnlnKK) i K→∞ ). The β > βci case. Assume that β > βci , and we control the expectation of Xi (β ln K). Since E(Zj (s)) = e − γβ 0,j s 0,cj −g : β 1− C X αc gc,ci K g0,c = β ln K c=1 K  X (β ln K)  X γj,i K i = E β ln K β ln K j=1 β 1− C X αc gc,ci K βci ≤ β ln K c=1 → 0 K→∞ since for all c either gc,ci = 0 or g0,c ≤ βci , and β > βci . Therefore, Xiβ(βlnlnKK) converges to 0 in L1 so that it converges 1 to 0 in distribution as well. Since x 7→ e− x is both continuous and bounded we get: lim Pi (β ln K) = lim E(e K→∞ − X β(βlnlnKK) i K→∞ ) = 0. The β < βci case. Now consider β < βci . We control the moments of Xj (s): E(Xi (s)) = K X γj,i e −γs 0,j , j=1 and since Z1 (s), . . . , ZK (s) are independent: var(Xi (s)) = K X 2 γj,i e −γs j=1 ≤G K X j=1 γj,i e 0,j (1 − e −γs 0,j −γs 0,j ) = GE(Xi (s)). 1 Apply Chebychev’s inequality: Proof. Define f (x) = 1−e− x . Throughout the proof consider Xi (β ln K)     E(Xi (s)) E(Xi (s)) i fixed, and define V = β ln K . P Xi (s) ≤ ≤ P |Xi (s) − E(Xi (s))| ≥ From Proposition 2: 2 2 − β 4G 4var(Xi (s)) 1 − Pi (β ln K) = (1 − K γ0,i )E(f (V )) ∼ E(f (V )). ≤ ≤ K→∞ E(Xi (s))2 E(Xi (s)) − γβ since K 0,i → 0. Define: using the previous bound. Hence K→∞   PC E(Xi (s)) 4G 1− g β 0,c P Xi (s) ≥ ≥1− . (1) c=1 αc gc,ci K 2 E(Xi (s)) → ∞. vK = E(V ) = K→∞ β ln K 1 Since x 7→ e− x is increasing: since β < β ⋆ . To complete the proof, it suffices to show that − X β(βlnlnKK) E(f (V )) )   E(Xi (β ln K)) − E(X2β(βlnlnKK)) i e ≥ P Xi (β ln K) ≥ . 2 E(e i f (V ) = f (V )1{V ≤ (1 − δ)vK } + f (V )1{V ≥ (1 − δ)vK } β E Xi (β ln K) β ln K  ≤ 1{V ≤ (1 − δ)vK } + f ((1 − δ)vK ). 1− C X αc gc,ci K g0,c = β ln K c=1 1− ββc αĉ gĉ,ci K β ln K ≥ i So taking expectations and using Chernoff’s inequality, which is recalled as proposition 6 in appendix: → ∞. E(f (V )) ≤ P(V ≤ (1 − δ)vK ) + f ((1 − δ)vK ) K→∞ ≤ e− Replacing in (1) we deduce   E(Xi (β ln K)) → 1, P Xi (β ln K) ≥ K→∞ 2 and e − E(X2β(βlnlnKK)) i vK e− δ2 v 3 K lim Pi (β ln K) = lim E(e i K→∞ → ∞ so that f (vK ) K→∞ ∼ 1 K→∞ vK and → 0 we get: 1 E(f (V )) ≤ . f (v ) 1 − δ K K→∞ lim sup ) = 1. Lower bound: Similarly: which completes the proof of statement (i). Statement (ii) 1 PK follows from the fact that P̄ (s) = K  i=1 Pi (s). Corollary 2: For any β < β ⋆ we have: Rm ≥ + f ((1 − δ)vK ). K→∞ K→∞ K→∞ δ 2 vK 3 Now using the facts vK → 1 so that: − X β(βlnlnKK) f (vK ). Now consider δ ∈ (0, 1) fixed and let us bound E(f (V )). Upper bound: Since x 7→ f (x) is decreasing: Consider ĉ such that gĉ,ci > 0 and g0,ĉ = βci . Then:  ∼ K→∞ f (V ) = f (V )1{V ≤ (1 + δ)vK } + f (V )1{V ≥ (1 + δ)vK } ≥ 1{V ≤ (1 + δ)vK }f ((1 + δ)vK ) So taking expectations and using Chernoff’s inequality, which is recalled as proposition 6 in appendix: 1 − o(1) log2 (1 + β ln K) , K → ∞. 2 f (V ) ≥ P(V ≤ (1 + δ)vK )f ((1 + δ)vK ) ≥ (1 − e− C. Non asymptotic behavior We may state Theorem 3, a further result which gives a tractable, accurate approximation for 1 − Pj (β ln K) in the regime where Pj (β ln K) → 1 i.e. whenever β < βci . Two K→∞ main facts are worth mentioning: • This approximation is very accurate even for modest size systems (say K ≥ 50) as shown by our numerical experiments (see section V). • Due to it’s accuracy, it allows to find the optimal value of s given g and α in a tractable manner, so that finite size systems can be dealt with efficiently. Theorem 3: Consider β < βc , then:   1 − Pi (β ln K) ∼ 1 − exp P K→∞  C c=1 Using the facts vK e δ2 v − 3K δ 2 vK 3 → K→∞ )f ((1 + δ)vK ). ∞ so that f (vK ) 1 ∼ K→∞ vK and → 0 we get: K→∞ lim inf K→∞ 1 E(f (V )) ≥ . f (vK ) 1+δ Putting it together: The above holds for any δ ∈ (0, 1). So we have proven that δ arbitrairly small: E(f (V )) 1 E(f (V )) 1 ≤ lim inf ≤ lim sup ≤ . K→∞ f (vK ) 1+δ f (v ) 1 − δ K K→∞ Hence we have proven β ln K αc gc,ci K 1− g β 0,c    E(f (V )) . which concludes the proof. ∼ K→∞ f (vK ).  IV. O UTAGE R ATE We now turn to the outage rate, and we show that in the regime of a large number of users, the outage rate may be computed explicitly as a function of g and α. We further show that, while the outage rate of the baseline scheme vanishes when K → ∞ our scheme guarantees a constant outage rate. A. Success probability As in the multicast case, we express the outage rate as a function of X1 (s), . . . , XK (s) in Proposition 3. Proposition 3: For any s ≥ 0 we have: )# " ( K X 1 − Zi (s) , P+ (s) = E exp −s Xi (s) i=1 where Z1 (s), . . . , ZK (s) ares independent random variables in −γ 0,i for i = 1, . . . , K and X (s) = {0, i PK1} and E(Zi (s)) = e j=1 Zj (s)γj,i . Proof. We use the same notation as in the proof of Proposition 2. User iPsuccessfully decodes if and only if either K Zi (s) = 1 or | j=1 Zj (s)h′j,i |2 ≥ s. So i decodes if and only if: K X 2 Zj (s)h′j,i ≥ s(1 − Zi (s)). j=1 j=1 2  ≥ s(1 − Zi (s)) , ∀i|Z(s) 2 j=1 ( = exp −s K X 1 − Zi (s) i=1 Theorem 4: For any s ≥ 0 we have: ( ) − s C X αc (1 − e g0,c ) P+ (s) → exp −s . PC −g s ′ K→∞ 0,c c=1 c′ =1 αc′ gc′ ,c e Proof. We first prove the following fact: K X 1 − Zi (s) Xi (s) i=1 Xi (s)  ≥ s(1 − Zi (s))|Z(s) ) s P → K→∞ K X 1 − Zi (s) PK i=1 B. Asymptotic behavior We now prove our main result concerning outage rate stated in Theorem 4. The main element is to show that, for P proof 1−Zi (s) any s random variable K i=1 Xi (s) concentrates around its expectation when the number of users K grows large. The following facts should be noted: • In the regime of a large number of users, the outage rate converges to a non-zero finite value. Recall that the baseline scheme only guarantees a vanishing outage rate. Hence our scheme is very efficient in countering the variability of the channel coefficients and induces a perfect channel hardening. E(Xi (s)) . ≤ Xi (s) s − K X 1 − Zi (s) i=1 Xi (s) i=1 E(Xi (s)) s − K X Zi (s) − e γ0,i 1 − Zi (s) − + . E(Xi (s)) E(Xi (s)) i=1 We now prove that both terms go to 0 in probability. First term We have: Xi (s) K − X 1 1 − Zi (s) 1 − ≤ E(Xi (s)) X (s) E(X i i (s)) i=1 = K X |Xi (s) − E(Xi (s))| Xi (s)E(Xi (s)) i=1 Furthermore E(Xi (s)) = K with m(s) = ′ 2 j=1 Zj (s)hj,i | ′ since conditional to Z(s), | has exponential distribution with mean Xi (s), and h has independent entries. Averaging over Z(s) yields the result.  i=1 − K X 1 − e γ0,i C X αc gc,ci e c=1 . − K X 1 − e γ0,i We bound the error as follows: i=1 K K  X Y P = Zj (s)h′j,i i=1 • K X 1 − Zi (s) Now: P(all decode|Z(s)) K  X Zj (s)h′j,i =P The outage rate can be computed explicitly as a function of g and α (see corollary 5) by a zero-finding method such as bisection or Newton-Raphson. In fact, this asymptotic result provides a very good approximation even for systems of modest size (say K ≥ 10), as shown by numerical experiments (see section V). • min max c′ =1,...,C c=1,...,C −gs 0,c . ≥ m(s)K. n o − s αc gc,c′ e g0,c > 0. where m(s) > 0 from assumption 1. For i = 1, . . . , K, Xi (s) is a sum of K random variables bounded by G, so that Hoeffding’s inequality yields: √ 1 P(|Xi (s) − E(Xi (s))| ≥ G K ln K) ≤ 2 . K Using a union bound over i = 1, . . . , K: √ P( max |Xi (s) − E(Xi (s))| ≥ G K ln K) i=1,...,K ≤ K X √ 1 P(|Xi (s) − E(Xi (s))| ≥ G K ln K) ≤ K i=1 → 0. K→∞ Therefore the event √ A = { max |Xi (s) − E(Xi (s))| ≤ G K ln K} i=1,...,K Second term Compute the second moment of the second term: # " K s − s − s K 2  X Z (s) − e− γ0,i X e γ0,i (1 − e γ0,i ) i = E E(Xi (s)) E(Xi (s))2 i=1 i=1 s − K X i=1 1 1 ≤ E(Xi (s))2 m(s)2 K → 0, K→∞ since E(Zi (s)) = e γ0,i and Z1 (s), . . . , ZK (s) are independent. So the second term goes to 0 in probability, since L2 convergence implies convergence in probability. Putting it together We have proven that: K X 1 − Zi (s) i=1 Xi (s) s P → K→∞ = C X c=1 − K X 1 − e γ0,i E(Xi (s)) i=1 αc (1 − e PC c′ =1 −gs 0,c αc′ gc′ ,c e ) −g s . 0,c′ Since convergence in probability implies convergence in distribution and x 7→ e−x is continuous and bounded on [0, ∞) we obtain the result: ) ( − s C X αc (1 − e g0,c ) . P+ (s) → exp −s PC −g s ′ K→∞ 0,c c=1 c′ =1 αc′ gc′ ,c e  Corollary 5: When K → ∞, the outage rate converges 1 log 2 (1 + s) where s is the unique solution to: 2 s C X c=1 αc (1 − e PC c′ =1 −gs 0,c αc′ gc′ ,c e ) −g s 0,c′ = ln 0.8 0.6 0.4 0 200  1  . 1−ǫ and for ǫ ≈ 0 we have s ≈ 0 and a Taylor development gives: v   u u 1 ln 1−ǫ u s≈u −1 t PC α  PC c ′ gc′ ,c α ′ c c =1 c=1 g0,c 400 600 800 0.6 0.5 baseline simulation approx 0.4 0.3 0.2 0.1 0 1000 200 400 600 number of users (K) number of users (K) (a) Scenario (a) (b) Scenario (b) 800 1000 0.8 0.6 0.4 0.2 baseline simulation approx 0 200 V. N UMERICAL E XPERIMENTS In this section we present numerical experiments and show that our theoretical analysis provides accurate predictions of the system’s behavior. For each figure, three curves are presented: ”baseline” is the performance of the baseline scheme, ”simulation” is the exact performance of the proposed scheme obtained by simulation, and ”approx” is the analytical approximation of the proposed scheme’s performance. For the multicast rate the approximation is given by Theorem 3 and baseline simulation approx 0.2 multicast rate (bits / channel use) ≤ multicast rate (bits / channel use) → 0. K→∞ for the outage rate, the approximation is given by Theorem 4. We consider three scenarios: (a) A single class C = 1, with α = (1) , g0,1 = 46 dBm and g1,1 = 23 dBm. (b) Two classes C = 2, with α = (0.5, 0.5), g0,1 = 46 dBm,g0,2 = 0, g1,1 = g2,2 = 23 dBm and g1,2 = g2,1 = 13 dBm. (c) A cell of radius 250 m, with K users drawn uniformly at random in this area. The mean channel gains are taken as γi,j = ρi − 128 − 36.4 log10 (di,j ) dBm where di,j is the distance between i and j, expressed in kilometers, and ρi = 46 dBm if i = 0 and ρi = 23 dBm otherwise. For this scenario, the results are averaged over 100 random realizations. Scenario (a) is the homogeneous case where all users are close to the station and to each other, scenario (b) is a case where users of class 1 are close to the station, and users of class 2 are far away from the station, so that in order to receive data they require users of class 1 to act as a relay. Finally scenario (c) represents the case where users arrive uniformly in a cell area, which seems like an acceptable model for a real system in high load (i.e. when there are many active users). For all scenarios ǫ = 10−2 . For the multicast rate, figure 1 presents the multicast rate Rm as a function of the number of users K (when s is chosen optimally), while figure 2 presents the multicast rate as a function of s, for various values of K. For outage rate, figure 3 presents the outage rate as a function of the number of users K, while figure 4 presents the outage probability P+ (s) as a function of s for system size K = 100. multicast rate (bits / channel use) occurs with high probability √ when K → ∞. Consider K large enough so that m(s)K − K ln K ≥ 0. If A occurs: √ K X K K ln K |Xi (s) − E(Xi (s))| √ ≤ Xi (s)E(Xi (s)) m(s)K(m(s)K − K ln K) i=1 400 600 800 1000 number of users (K) (c) Scenario (c) Fig. 1: Multicast rate Rm versus number of users K These numerical experiments point out three facts: • The proposed scheme is vastly superior to the baseline scheme as soon as there are more than a few users, as predicted by our asymptotic analysis. 0.3 0.2 0.1 0 0 1 2 3 4 0.6 10 0 0.5 0.4 0.3 0.2 10 -2 10 -4 0 0 5 1 2 3 4 5 SNR (linear) 10 -2 10 -1 10 -2 error probability 0.4 0.2 (b) Scenario (b), K = 102 10 -2 10 -4 baseline simulation approx 0 2 3 4 5 10 0 10 0 0.6 1 10 -1 SNR (linear) (a) Scenario (a), K = 102 baseline simulation approx 0.8 10 0 SNR (linear) (b) Scenario (c), K = 102 (a) Scenario (c), K = 10 0 baseline simulation approx 10 -1 baseline simulation approx 0.1 SNR (linear) multicast rate (bits / channel use) 10 0 baseline simulation approx error probability baseline simulation approx error probability multicast rate (bits / channel use) multicast rate (bits / channel use) 0.4 6 10 -2 SNR (linear) 10 -1 10 0 SNR (linear) (c) Scenario (c), K = 103 baseline simulation approx 0.04 0.02 0 20 40 60 80 1 2 outage rate (bits / channel use) 0.06 log2 (1 + s)P̄ (s) vs SNR s 1 VI. C ONCLUSION 0.8 0.6 baseline simulation approx 0.4 0.2 0 20 100 40 60 80 100 number of users (K) (a) Scenario (a) (b) Scenario (b) A PPENDIX 0.04 0.03 baseline simulation approx 0.02 0.01 0 40 60 80 100 number of users (K) (c) Scenario (c) Fig. 3: Outage rate Ro versus number of users K • We have studied a new scheme for broadcasting a message to users with receiver-to-receiver communication, without channel state information at the transmitter. We have shown that, in the large system limit, the performance of this scheme can be completely characterized. For finite systems, we also have provided tractable approximations for performance measures which are very accurate even for systems of modest sizes. 0.05 20 • Fig. 4: Outage rate, probability of error 1 − P+ (s) vs SNR s × 10-3 number of users (K) outage rate (bits / channel use) outage rate (bits / channel use) Fig. 2: Multicast, effective rate (c) Scenario (c), K = 102 The proposed approximations/asymptotic expressions derived above predict the performance of the proposed scheme very accurately, even for systems of modest size, say K ≥ 40 for the multicast rate and K ≥ 15 for the outage rate. As a consequence, setting the parameter s can be done in a simple and tractable manner to obtain good practical performance for systems of modest size. We recall below a few basic concentration inequalities. Proofs may be found, for instance, in [11]. Proposition 4: [Chebychev’s inequality] Consider Y a random variable. Then for all δ > 0 we have: P(|Y − E(Y )| ≥ δ) ≤ var(Y ) . δ2 Proposition 5: [Hoeffding’s inequality] Consider Y1 , . . . , YK independent random variables in [0, 1]. Then for all δ > 0 we have: ! K 2 1 X P (Yi − E(Yi )) ≥ δ ≤ e−2Kδ . K i=1 Proposition 6: [Chernoff’s inequality] Consider Y1 , . . . , YK independent random variables in [0, 1]. Define yK = PK E(Y ). Then for all δ ∈ (0, 1) we have: i i=1 ! K X yK δ2 Yi ≥ (1 + δ)yK ≤ e− 3 . P i=1 and P K X i=1 Yi ≤ (1 − δ)yK ! ≤ e− yK δ2 3 . R EFERENCES [1] M. J. Lopez, “Multiplexing, scheduling, and multicasting strategies for antenna arrays in wireless networks,” MIT, Tech. Rep., 2004. [2] P. K. Gopala and H. El Gamal, “On the throughput-delay tradeoff in cellular multicast,” in IEEE WNCMC, 2005. [3] N. D. Sidiropoulos, T. N. Davidson, and Z.-Q. Luo, “Transmit beamforming for physical-layer multicasting,” IEEE Trans. on Signal Processing, vol. 54, no. 6, pp. 2239–2251, 2006. [4] N. Jindal and Z.-Q. Luo, “Capacity limits of multiple antenna multicast,” in Proc. of ISIT, 2006. [5] M. A. Maddah-Ali and U. Niesen, “Fundamental limits of caching,” IEEE Trans. on Information Theory, vol. 60, no. 5, pp. 2856–2867, 2014. [6] G. Paschos, E. Bastug, I. Land, G. Caire, and M. Debbah, “Wireless caching: Technical misconceptions and business barriers,” IEEE Communications Magazine, vol. 54, no. 8, pp. 16–22, 2016. [7] K.-H. Ngo, S. Yang, and M. Kobayashi, “Scalable content delivery with coded caching in multi-antenna fading channels,” IEEE Trans. on Wireless Communications, vol. 17, no. 1, pp. 548–562, 2018. [8] Nokia, “LTE networks for public safety services, white paper, 2016.” [9] 3GPP, “3rd generation partnership project: Technical specification group radio access network: Study on lte device to device proximity services; radio aspects (release 12),” 3GPP, March 2014. [10] A. Khisti, U. Erez, and G. W. Wornell, “Fundamental limits and scaling behavior of cooperative multicasting in wireless networks,” IEEE Trans. on Information Theory, vol. 52, no. 6, pp. 2762–2770, 2006. [11] S. Boucheron, G. Lugosi, and P. Massart, Concentration inequalities. A nonasymptotic theory of independence. Oxford University Press, 2013. multicast rate (bits / channel use) 0.2 baseline simulation approx 0.15 0.1 0.05 0 0 2 4 SNR (linear) 6 multicast rate (bits / channel use) 0.5 baseline simulation approx 0.4 0.3 0.2 0.1 0 0 1 2 3 SNR (linear) 4 5 6 error probability 10 0 baseline simulation approx 10 -1 10 -2 10 -1 SNR (linear) 10 0 error probability 10 0 10 -2 baseline simulation approx 10 -4 10 -2 10 -1 SNR (linear) 10 0 error probability 10 0 10 -2 10 -4 baseline simulation approx 10 -2 10 -1 SNR (linear) 10 0 multicast rate (bits / channel use) 0.4 baseline simulation approx 0.3 0.2 0.1 0 0 1 2 3 SNR (linear) 4 5 6 multicast rate (bits / channel use) 0.8 baseline simulation approx 0.6 0.4 0.2 0 0 1 2 3 SNR (linear) 4 5 6 multicast rate (bits / channel use) baseline simulation approx 0.6 0.5 0.4 0.3 0.2 0.1 0 0 2 4 SNR (linear) 6 8 multicast rate (bits / channel use) 1 baseline simulation approx 0.8 0.6 0.4 0.2 0 0 2 4 SNR (linear) 6 8
7cs.IT
New order bounds in differential elimination algorithms✩ Richard Gustavson arXiv:1602.00246v2 [math.AC] 30 Nov 2016 CUNY Graduate Center, Ph.D. Program in Mathematics, 365 Fifth Avenue, New York, NY 10016, USA Alexey Ovchinnikov CUNY Queens College, Department of Mathematics, 65-30 Kissena Boulevard, Queens, NY 11367, USA Gleb Pogudin Johannes Kepler University, Institute for Algebra, Science Park II, 3rd Floor, 4040 Linz, Austria Abstract We present a new upper bound for the orders of derivatives in the Rosenfeld-Gröbner algorithm. This algorithm computes a regular decomposition of a radical differential ideal in the ring of differential polynomials over a differential field of characteristic zero with an arbitrary number of commuting derivations. This decomposition can then be used to test for membership in the given radical differential ideal. In particular, this algorithm allows us to determine whether a system of polynomial PDEs is consistent. Previously, the only known order upper bound was given by Golubitsky, Kondratieva, Moreno Maza, and Ovchinnikov for the case of a single derivation. We achieve our bound by associating to the algorithm antichain sequences whose lengths can be bounded using the results of León Sánchez and Ovchinnikov. Keywords: Polynomial differential equations; differential elimination algorithms; computational complexity 1. Introduction The Rosenfeld-Gröbner algorithm is a fundamental algorithm in the algebraic theory of differential equations. This algorithm, which first appeared in (Boulier et al., 1995, 2009), takes as its input a finite set F of differential polynomials and outputs a representation of the radical differential ideal generated by F as a finite intersection of regular differential ideals. The algorithm has many applications; for example, it can be used to test membership in a radical differential ideal, and, in conjunction with the differential Nullstellensatz, can be used to test the consistency ✩ This work was partially supported by the NSF grants CCF-095259, CCF-1563942, DMS-1606334, by the NSA grant #H98230-15-1-0245, by CUNY CIRG #2248, by PSC-CUNY grant #69827-00 47, by the Austrian Science Fund FWF grant Y464-N18. Email addresses: [email protected] (Richard Gustavson), [email protected] (Alexey Ovchinnikov), [email protected] (Gleb Pogudin) Preprint submitted to Elsevier December 1, 2016 of a system of polynomial differential equations. See (Golubitsky et al., 2008) for a history of the development of the Rosenfeld-Gröbner algorithm and similar decomposition algorithms. The Rosenfeld-Gröbner algorithm has been implemented in Maple as a part of the DifferentialAlgebra package. In order to determine the complexity of the algorithm, we need to (among other things) find an upper bound on the orders of derivatives that appear in all intermediate steps and in the output of the algorithm. The first step in answering this question was completed in (Golubitsky et al., 2008), in which an upper bound in the case of a single derivation and any ranking on the set of derivatives was found. If there are n unknown functions and the order of the original system is h, the authors showed that an upper bound on the orders of the output of the Rosenfeld-Gröbner algorithm is h(n − 1)!. In this paper, we extend this result by finding an upper bound for the orders of derivatives that appear in the intermediate steps and in the output of the Rosenfeld-Gröbner algorithm in the case of an arbitrary number of commuting derivations and a weighted ranking on the derivatives. We first compute an upper bound for the weights of the derivatives involved for an arbitrary weighted ranking; by choosing a specific weight, we obtain an upper bound for the orders of the derivatives. For this, we construct special antichain sequences in the set Zm >0 ×{1, . . . , n} equipped with a specific partial order. We then use (León Sánchez and Ovchinnikov, 2016) to estimate the lengths of our sequences. A general analysis of lengths of antichain sequences began in (Pierce, 2014) and continued in (Freitag and León Sánchez, 2016). We show that an upper bound for the weights of derivatives in the intermediate steps and in the output of the Rosenfeld-Gröbner algorithm is given by h fL+1 , where h is the weight of our input system of differential equations, { f0 , f1 , f2 , . . . } is the Fibonacci sequence {0, 1, 1, 2, 3, 5, . . .}, and L is the maximal possible length of a certain antichain sequence (that depends solely on h, the number m of derivations, and the number n of unknown functions). For m = 2, we refine this upper bound in a new way by showing that the weights of the derivatives in question are bounded above by a sequence defined similarly to the Fibonacci sequence but with a slower growth rate. By choosing a specific weight, we are able to produce an upper bound for the orders of the derivatives in the intermediate steps and in the output of the Rosenfeld-Gröbner algorithm. Note that this bound is different from the upper bounds for the effective differential Nullstellensatz (D’Alfonso et al., 2014; Gustavson et al., 2016a), which are higher and also depend on the degree of the given system of differential equations. Our result is an improvement of (Gustavson et al., 2016b) because it allows us to compute sharper order upper bounds with respect to specific derivations than the previous upper bound did, and because of the refinement in the case m = 2. For example, if n = 2 and h = 3, 4, 5, the new bound is 3, 8, 33 times better, respectively. The paper is organized as follows. In Section 2, we present the background material from differential algebra that is necessary to understand the Rosenfeld-Gröbner algorithm. In Section 3, we describe this algorithm as it is presented in (Hubert, 2003), as well as two necessary auxiliary algorithms. In Section 4, we prove our main result on the upper bound. In Section 5, we calculate the upper bound for specific values using the results of (León Sánchez and Ovchinnikov, 2016). In Section 6, we give an example showing that the lower bound for the orders of derivatives in the Rosenfeld-Gröbner algorithm is at least double-exponential in the number of derivations. 2. Background on differential algebra In this section, we present background material from differential algebra that is pertinent to the Rosenfeld-Gröbner algorithm. For a more in-depth discussion, we refer the reader to (Hubert, 2003; Kolchin, 1973). 2 Definition 1. A differential ring is a commutative ring R with a collection of m commuting derivations ∆ = {∂1 , . . . , ∂m } on R. Definition 2. An ideal I of a differential ring is a differential ideal if δa ∈ I for all a ∈ I, δ ∈ ∆. √ For a set A ⊆ R, let (A), (A), [A], and {A} denote the smallest ideal, radical ideal,√differential ideal, and radical differential ideal containing A, respectively. If Q ⊆ R, then {A} = [A]. Remark 3. In this paper, as usual, we also use the braces {a1 , a2 , . . .} to denote the set containing the elements a1 , a2 , . . .. Even though this notation conflicts with the above notation for radical differential ideals (used here for historical reasons), it will be clear from the context which of the two objects we mean in each particular situation. In this paper, k is a differential field of characteristic zero with m commuting derivations. The set of derivative operators is denoted by o n Θ := ∂i11 · · · ∂imm : i j ∈ Z>0 , 1 6 j 6 m . For Y = {y1 , . . . , yn } a set of n differential indeterminates, the set of derivatives of Y is ΘY := {θy : θ ∈ Θ, y ∈ Y}. Then the ring of differential polynomials over k is defined to be k{Y} = k{y1 , . . . , yn } := k[θy : θy ∈ ΘY]. We can naturally extend the derivations ∂1 , . . . , ∂m to the ring k{Y} by defining   i +1 ∂ j ∂i11 · · · ∂imm yk := ∂i11 · · · ∂ jj · · · ∂imm yk . For any θ = ∂i11 · · · ∂imm ∈ Θ, we define the order of θ to be ord(θ) := i1 + · · · + im . For any derivative u = θy ∈ ΘY, we define ord(u) := ord(θ). For a differential polynomial f ∈ k{Y} \ k, we define the order of f to be the maximum order of all derivatives that appear in f . For any finite set A ⊆ k{Y} \ k, we set H(A) := max{ord( f ) : f ∈ A}. (1) For any θ = ∂i11 · · · ∂imm and positive integers c1 , . . . , cm ∈ Z>0 , we define the weight of θ to be   w(θ) = w ∂i11 · · · ∂imm := c1 i1 + · · · + cm im . Note that if all of the ci = 1, then w(θ) = ord(θ) for all θ ∈ Θ. For a derivative u = θy ∈ ΘY, we define the weight of u to be w(u) := w(θ). For any differential polynomial f ∈ k{Y} \ k, we define the weight of f , w( f ), to be the maximum weight of all derivatives that appear in f . For any finite set A ⊆ k{Y} \ k, we set W(A) := max{w( f ) : f ∈ A}. 3 Definition 4. A ranking on the set ΘY is a total order < satisfying the following two additional properties: for all u, v ∈ ΘY and all θ ∈ Θ, θ , id, u < θu and u < v =⇒ θu < θv. A ranking < is called an orderly ranking if for all u, v ∈ ΘY, ord(u) < ord(v) =⇒ u < v. Given a weight w, a ranking < on ΘY is called a weighted ranking if for all u, v ∈ ΘY, w(u) < w(v) =⇒ u < v.   Remark 5. Note that if w ∂i11 · · · ∂imm = i1 + · · · + im (that is, w(θ) = ord(θ)), then a weighted ranking < on ΘY is in fact an orderly ranking. From now on, we fix a weighted ranking < on ΘY. Definition 6. Let f ∈ k{Y} \ k. • The derivative u ∈ ΘY of highest rank appearing in f is called the leader of f , denoted lead( f ). • If we write f as a univariate polynomial in lead( f ), the leading coefficient is called the initial of f , denoted init( f ). • If we apply any derivative δ ∈ ∆ to f , the leader of δ f is δ(lead( f )), and the initial of δ f is called the separant of f , denoted sep( f ). Given a set A ⊆ k{Y} \ k, we will denote the set of leaders of A by L(A), the set of initials of A by IA , and the set of separants of A by S A ; we then let HA = IA ∪ S A be the set of initials and separants of A. For a derivative u ∈ ΘY, we let (ΘY)<u (respectively, (ΘY)6u ) be the collection of all derivatives v ∈ ΘY with v < u (respectively, v 6 u). For any derivative u ∈ ΘY, we let A<u (respectively, A6u ) be the elements of A with leader < u (respectively, 6 u), that is, A<u := A ∩ k[(ΘY)<u ] and A6u := A ∩ k[(ΘY)6u ]. We can similarly define (ΘA)<u and (ΘA)6u , where ΘA := {θ f : θ ∈ Θ, f ∈ A}. Given f ∈ k{Y} \ k such that deglead( f ) ( f ) = d, we define the rank of f to be rank( f ) := lead( f )d . The weighted ranking < on ΘY determines a pre-order (that is, a relation satisfying all of the properties of an order, except for the property that a 6 b and b 6 a imply that a = b) on k{Y} \ k: Definition 7. Given f1 , f2 ∈ k{Y} \ k, we say that rank( f1 ) < rank( f2 ) if lead( f1 ) < lead( f2 ) or if lead( f1 ) = lead( f2 ) and deglead( f1 ) ( f1 ) < deglead( f2 ) ( f2 ). 4 Definition 8. A differential polynomial f is partially reduced with respect to another differential polynomial g if no proper derivative of lead(g) appears in f , and f is reduced with respect to g if, in addition, deglead(g) ( f ) < deglead(g) (g). A differential polynomial is then (partially) reduced with respect to a set A ⊆ k{Y} \ k if it is (partially) reduced with respect to every element of A. Definition 9. For a set A ⊆ k{Y} \ k, we say that A is: • autoreduced if every element of A is reduced with respect to every other element. • weak d-triangular if L(A) is autoreduced. • d-triangular if A is weak d-triangular and every element of A is partially reduced with respect to every other element. Note that every autoreduced set is d-triangular. Every weak d-triangular set (and thus every d-triangular and autoreduced set) is finite (Hubert, 2003, Proposition 3.9). Since the set of leaders of a weak d-triangular set A is autoreduced, distinct elements of A must have distinct leaders. If u ∈ ΘY is the leader of some element of a weak d-triangular set A, we let Au denote this element. Definition 10. We define a pre-order on the collection of all weak d-triangular sets, which we also call rank, as follows. Given two weak d-triangular sets A = {A1 , . . . , Ar } and B = {B1 , . . . , B s}, in each case arranged in increasing rank, we say that rank(A) < rank(B) if either: • there exists a k 6 min(r, s) such that rank(Ai ) = rank(Bi) for all 1 6 i < k and rank(Ak ) < rank(Bk ), or • r > s and rank(Ai ) = rank(Bi) for all 1 6 i 6 s. We also say that rank(A) = rank(B) if r = s and rank(Ai ) = rank(Bi ) for all 1 6 i 6 r. We can restrict this ranking to the collection of all d-triangular sets or the collection of all autoreduced sets. Definition 11. A characteristic set of a differential ideal I is an autoreduced set C ⊆ I of minimal rank among all autoreduced subsets of I. Given a finite set S ⊆ k{Y}, let S ∞ denote the multiplicative set containing 1 and generated by S . For an ideal I ⊆ k{Y}, we define the colon ideal to be I : S ∞ := {a ∈ k{Y} : ∃s ∈ S ∞ with sa ∈ I}. If I is a differential ideal, then I : S ∞ is also a differential ideal (Kolchin, 1973, Section I.2). Definition 12. For a differential polynomial f ∈ k{Y} and a weak d-triangular set A ⊆ k{Y}, a differential partial remainder f1 and a differential remainder f2 of f with respect to A are ∞ differential polynomials such that there exist s ∈ S ∞ A , h ∈ HA such that s f ≡ f1 mod [A] and h f ≡ f2 mod [A], with f1 partially reduced with respect to A and f2 reduced with respect to A. 5 We denote a differential partial remainder of f with respect to A by pd-red( f, A) and a differential remainder of f with respect to A by d-red( f, A). There are algorithms to compute pd-red( f, A) and d-red( f, A) for any f and A (Hubert, 2003, Algorithms 3.12 and 3.13). These algorithms have the property that rank(pd-red( f, A)), rank(d-red( f, A)) 6 rank( f ); since we have a weighted ranking, this implies that w(pd-red( f, A)), w(d-red( f, A)) 6 w( f ). Definition 13. Two derivatives u, v ∈ ΘY are said to have a common derivative if there exist φ, ψ ∈ Θ such that φu = ψv. Note this is the case precisely when u = θ1 y and v = θ2 y for some y ∈ Y and θ1 , θ2 ∈ Θ. Definition 14. If u = ∂i11 · · · ∂imm y and v = ∂1j1 · · · ∂mjm y for some y ∈ Y, we define the least common derivative of u and v, denoted lcd(u, v), to be 1 , j1 ) m , jm ) lcd(u, v) = ∂max(i · · · ∂max(i y. m 1 Definition 15. For f, g ∈ k{Y} \ k, we define the ∆-polynomial of f and g, denoted ∆( f, g), as follows. If lead( f ) and lead(g) have no common derivatives, set ∆( f, g) = 0. Otherwise, let φ, ψ ∈ Θ be such that lcd(lead( f ), lead(g)) = φ(lead( f )) = ψ(lead(g)), and define ∆( f, g) := sep(g)φ( f ) − sep( f )ψ(g). Definition 16. A pair (A, H) is called a regular differential system if: • A is a d-triangular set • H is a set of differential polynomials that are all partially reduced with respect to A • S A ⊆ H∞ • for all f, g ∈ A, ∆( f, g) ∈ ((ΘA)<u) : H ∞ , where u = lcd(lead( f ), lead(g)). Definition 17. Any ideal of the form [A] : H ∞ , where (A, H) is a regular differential system, is called a regular differential ideal. Every regular differential ideal is a radical differential ideal (Hubert, 2003, Theorem 4.12). Definition 18. Given a radical differential ideal I ⊆ k{Y}, a regular decomposition of I is a finite collection of regular differential systems {(A1 , H1 ), . . . , (Ar , Hr )} such that I= r \ [Ai ] : Hi∞ . i=1 Due to the Rosenfeld-Gröbner algorithm, every radical differential ideal in k{Y} has a regular decomposition. 6 Definition 19. A d-triangular set C is called a differential regular chain if it is a characteristic set of [C] : HC∞ ; in this case, we call [C] : HC∞ a characterizable differential ideal. Definition 20. A characteristic decomposition of a radical differential ideal I ⊆ k{Y} is a representation of I as an intersection of characterizable differential ideals. As we will recall in Section 3, every radical differential ideal also has a characteristic decomposition. 3. Rosenfeld-Gröbner algorithm Below we reproduce the Rosenfeld-Gröbner algorithm from (Hubert, 2003, Section 6). This algorithm relies on two others, called auto-partial-reduce and update, which we also include. We include these two auxiliary algorithms because, in Section 4, we will study their effect on the growth of the weights of derivatives in Rosenfeld-Gröbner. Rosenfeld-Gröbner takes as its input two finite subsets F, K ∈ k{Y} and outputs a finite set A of regular differential systems such that \ {F} : K ∞ = [A] : H ∞ , (2) (A,H)∈A where A = ∅ if 1 ∈ {F} : K ∞ . If we have a decomposition of {F} : K ∞ as in (2), we can compute, using only algebraic operations, a decomposition of the form \ (3) {F} : K ∞ = [C] : HC∞ , C∈C where C is finite and each C ∈ C is a differential regular chain (Hubert, 2003, Algorithms 7.1 S and 7.2). This means that an upper bound on (A,H)∈A W(A ∪ H) from (2) will also be an upper S bound on C∈C W(C) from (3). Rosenfeld-Gröbner has many immediate applications. For example, if K = {1}, then {F} : K ∞ = {F}, so in this case, Rosenfeld-Gröbner computes a regular decomposition of {F}, which then also gives us a characteristic decomposition of {F} by the discussion in the previous paragraph. The weak differential Nullstellensatz says that a system of polynomial differential equations F = 0 is consistent (that is, has a solution in some differential field extension of k) if and only if 1 < [F] (Kolchin, 1973, Section IV.2). Thus, since Rosenfeld-Gröbner(F, K) = ∅ if and only if 1 ∈ {F} : K ∞ , we see that F = 0 is consistent if and only if Rosenfeld-Gröbner(F, {1}) , ∅. More generally, Rosenfeld-Gröbner and its extension for computing a characteristic decomposition of a radical differential ideal allow us to test for membership in a radical differential ideal, as follows. Suppose we have computed a characteristic decomposition \ {F} = [C] : HC∞ . C∈C Now, a differential polynomial f ∈ k{Y} is contained in {F} if and only if f ∈ [C] : HC∞ for all C ∈ C; this latter case is true if and only if d-red( f, C) = 0, which can be tested using (Hubert, 2003, Algorithm 3.13). Rosenfeld-Gröbner, auto-partial-reduce, and update rely on the following tuples of differential polynomials: 7 Definition 21. A Rosenfeld-Gröbner quadruple (or RG-quadruple) is a 4-tuple (G, D, A, H) of finite subsets of k{Y} such that: • A is a weak d-triangular set, HA ⊆ H, D is a set of ∆-polynomials, and • for all f, g ∈ A, either ∆( f, g) = 0 or ∆( f, g) ∈ D or ∆( f, g) ∈ (Θ(A ∪ G)<u ) : Hu∞ , where u = lcd(lead( f ), lead(g)) and Hu = HA<u ∪ (H \ HA ) ∩ k[(ΘY)<u ]. Algorithm: Rosenfeld-Gröbner, (Hubert, 2003, Algorithm 6.11) Data: F, K finite subsets of k{Y} Result: A set A of regular differential systems such that: • A is empty if it has been detected that 1 ∈ {F} : K ∞ T • {F} : K ∞ = [A] : H ∞ otherwise (A,H)∈A S := {(F, ∅, ∅, K)}; A := ∅; while S , ∅ do (G, D, A, H) := an element of S; S̄ = S \ (G, D, A, H); if G ∪ D = ∅ then A := A ∪ auto-partial-reduce(A, H); else p := an element of G ∪ D; Ḡ, D̄ := G \ {p}, D \ {p}; p̄ := d-red(p, A); if p̄ = 0 then S̄ := S̄ ∪ {(Ḡ, D̄, A, H)}; else if p̄ < k then p̄i := p̄ − init( p̄) rank( p̄) p̄ s := deglead( p̄) ( p̄) p̄ − lead( p̄) sep( p̄); S̄ := S̄ ∪ {update(Ḡ, D̄, A, H, p̄), (G ∪ { p̄ s , sep( p̄)}, D̄, A, H ∪ {init( p̄)}), (Ḡ ∪ { p̄i , init( p̄)}, D̄, A, H)}; end end end S := S̄; end return A; Remark 22. The RG-quadruple that is output by update satisfies additional properties that we do not list, as they are not important for our analysis. For more information, we refer the reader to (Hubert, 2003, Algorithm 6.10) 8 Algorithm: auto-partial-reduce, (Hubert, 2003, Algorithm 6.8) Data: Two finite subsets A, H of k{Y} such that (∅, ∅, A, H) is an RG-quadruple Result: • The empty set if it is detected that 1 ∈ [A] : H ∞ • Otherwise, a set with a single regular differential system (B, K) with L(A) = L(B), HB ⊆ K, and [A] : H ∞ = [B] : K ∞ B := ∅; for u ∈ L(A) increasingly do b := pd-red(Au , B); if rank(b) = rank(Au ) then B := B ∪ {b}; else return (∅); end end K := HB ∪ {pd-red(p, B) : p ∈ H \ HA }; if 0 ∈ K then return (∅); else return {(B, K)}; end Algorithm: update (Hubert, 2003, Algorithm 6.10) Data: • A 4-tuple (G, D, A, H) of finite subsets of k{Y} • A differential polynomial p reduced with respect to A such that (G ∪ {p}, D, A, H) is an RG-quadruple Result: A new RG-quadruple (Ḡ, D̄, Ā, H̄) u := lead(p); G A := {a ∈ A | lead(a) ∈ Θu}; Ā := A \ G A ; Ḡ := G ∪ G A ; D̄ := D ∪ {∆(p, a) | a ∈ Ā} \ {0}; H̄ := H ∪ {sep(p), init(p)}; return (Ḡ, D̄, Ā ∪ {p}, H̄); 9 4. Order upper bound Given finite subsets F, K ⊆ k{Y}, let h = W(F ∪ K). Our goal is to find an upper bound for    [   W  (A ∪ H) , (A,H)∈A where A = Rosenfeld-Gröbner(F, K), in terms of h, m (the number of derivations), and n (the number of differential indeterminates). By then choosing a specific weight, we can find an upper S  bound for H (A,H)∈A (A ∪ H) in terms of m, n, and H(F ∪ K). We approach this problem as follows. Every (A, H) ∈ A is formed by applying auto-partialreduce to a 4-tuple (∅, ∅, A′, H ′ ) ∈ S. Thus, it suffices: • to bound how auto-partial-reduce increases the weight of a collection of differential polynomials (it turns out to not increase the weight), and • to bound W(G ∪ D ∪ A ∪ H) for all (G, D, A, H) added to S throughout the course of Rosenfeld-Gröbner. We accomplish the latter by determining when the weight of a tuple (G, D, A, H) added to S is larger than the weights of the previous elements of S and bounding W(G ∪ D ∪ A ∪ H) in this instance, and then bounding the number of times we can add such elements to S. N There is a sequence {(Gi , Di , Ai , Hi )}i=0 corresponding to each regular differential system (A, H) in the output of Rosenfeld-Gröbner, where N = N(A,H) , such that (Gi+1 , Di+1 , Ai+1 , Hi+1 ) is obtained from (Gi , Di , Ai , Hi ) during the while loop, (G0 , D0 , A0 , H0 ) = (F, ∅, ∅, K), and (A, H) = auto-partial-reduce(AN , HN ). We begin with an auxiliary result, which is an analogue of the first property from (Golubitsky et al., 2009, Section 5.1). Lemma 23. For every f ∈ Ai and i < j, there exists g ∈ A j such that lead( f ) ∈ Θ lead(g). In particular, if p is reduced with respect to A j , then p is reduced with respect to Ai for all i < j. Proof. It is sufficient to consider the case j = i + 1. If (Gi+1 , Di+1 , Ai+1 , Hi+1 ) was obtained from (Gi , Di , Ai , Hi ) without applying update, then Ai = Ai+1 . Otherwise, either f ∈ Ai \ G Ai (we use the notation from update), or f ∈ G Ai . In the former case, f ∈ Ai+1 as well, so we can set g = f . In the latter case, lead( f ) ∈ Θ lead(p), so we can set g = p. We define a partial order 4 on the set of derivatives ΘY as follows. For u, v ∈ ΘY, we say that u 4 v if there exists θ ∈ Θ such that θu = v. Note that this implies that u and v are both derivatives of the same y ∈ Y. Definition 24. An antichain sequence in ΘY is a sequence of elements S = {s1 , s2 , . . . } ⊆ ΘY that are pairwise incomparable in this partial order. N Given a sequence {(Gi , Di , Ai , Hi )}i=0 as above (where N = N(A,H) for some regular differential system (A, H) in the output of Rosenfeld-Gröbner), we will construct an antichain sequence S = {s1 , s2 , . . .} ⊆ ΘY inductively going along the sequence {(Gi , Di , Ai , Hi )}. Suppose S j−1 = {s1 , . . . , s j−1 } has been constructed after considering (G0 , D0 , A0 , H0 ), . . . , (Gi−1 , Di−1 , Ai−1 , Hi−1 ), where S 0 = ∅. A 4-tuple (Gi , Di , Ai , Hi ) can be obtained from the tuple (Gi−1 , Di−1 , Ai−1 , Hi−1 ) in two ways: 10 (1) We did not perform update. In this case, we do not append a new element to S . (2) We performed update with respect to a differential polynomial p̄. If there exists sk ∈ S j−1 such that lead( p̄) 6 sk , we do not append a new element to S j−1 . Otherwise, let s j = lead( p̄) and define S j = {s1 , . . . , s j }. In the latter case, we set k j = i. We also set k0 = 0. Theorem 25. The sequence {s j } is an antichain sequence in ΘY and, for all j > 1, w(s j ) 6 h f j , where { f j } is the Fibonacci sequence. For m = 2, we provide a refined version of Theorem 25. Let { f (n, h)k } be the sequence:    f (n, h)0 = 0, f (n, h)1 = f (n, h)2 = h     (4) f (n, h)k = f (n, h)k−1 + f (n, h)k−2 for k 6 n + 1       f (n, h)k = f (n, h)k−1 + f (n, h)k−2 − 1 for k > n + 1. Proposition 26. For m = 2 the sequence {s j } satisfies, for all j > 1, w(s j ) 6 f (n, h) j. We will prove Proposition 26 while proving Theorem 25, highlighting the case m = 2. Proof. Let i < j. Assume that s j < si . Then, p is not reduced with respect to Aki , which contradicts Lemma 23. On the other hand, the case s j 4 si is impossible by the construction of the sequence, so {s j } is an antichain sequence. Let L denote the length of the sequence {s j }. We denote the maximal j ∈ Z>0 such that k j 6 i by anti-ki . For all i > 0, let us set j = anti-ki and prove by induction on i that ! i S (1) W (Gt ∪ Dt ∪ Ht ) 6 h f j+1 ; t=0 (2) W i S t=0 ! At 6 h f j ; (3) For all distinct elements of i S At , the weights of the least common derivatives of their t=0 leaders do not exceed h f j+1 . If m = 2, let F0 = 0, F1 = F2 = h. We will show that there exists a sequence {Fr } such that • for all r > 1, w(sr ) 6 Fr and • Fr = Fr−1 + Fr−2 − 1 for all r > 3 except at most n − 1 of them, for which Fr = Fr−1 + Fr−2 . In the latter case, we will say that r is a jump index. Note that 2 is not a jump index by the definition, although F2 = F1 + F0 . For each such sequence, the induction hypothesis will be the following: ! ! i i S S (1) W (Gt ∪ Dt ∪ Ht ) 6 F j+1 for j < L and W (Gt ∪ Dt ∪ Ht ) 6 F L+1 + 1 for j = L; t=0 t=0 11 (2) W i S t=0 ! At 6 F j ; (3) For all distinct elements of i S At , the weights of the least common derivatives of their t=0 leaders do not exceed F j+1 for j < L and F L+1 + 1 for j = L; (4) If, in either of (1) or (3), the equality holds in the case j = L, then, for every q, 1 6 q 6 n, a b the sequence {sr } contains ∂1q yq and ∂2q yq for some aq and bq . In the base case i = 0 = k0 , we have W(G0 ∪ D0 ∪ H0 ) = h = h f1 (F1 in the case m = 2) and W(A0 ) = W(∅) = 0 = h f0 (F0 in the case m = 2). There are two distinct cases for i + 1: (1) Case i + 1 < k j+1 (so anti-ki+1 = j). Then, (Gi+1 , Di+1 , Ai+1 , Hi+1 ) was obtained from (Gi , Di , Ai , Hi ) in one of the following ways: (a) We did not perform update. In this case, Ai+1 = Ai and W(Gi+1 ∪ Di+1 ∪ Hi+1 ) 6 W(Gi ∪ Di ∪ Hi ). (b) We performed update with respect to a differential polynomial p such that lead( f ) ∈ S Θ lead(p) for some f ∈ it=0 At . In this case,  i  [  W(Ai+1 ) 6 W  At  . t=0 Then, for all g ∈ At (t 6 i), w(∆(p, g)) 6 w(lcd(lead(g), lead( f ))), which is bounded by h f j+1 (by F j+1 or F L+1 + 1 in the case m = 2) due to the third inductive hypothesis. Since Di+1 \ Di consists of some of these polynomials, Gi+1 \ Gi ⊆ Ai , and Hi+1 \ Hi = {sep(p), init(p)}, then W(Gi+1 ∪ Di+1 ∪ Hi+1 ) 6 W(Gi ∪ Di ∪ Hi ). (2) Case i + 1 = k j+1 (so now anti-ki+1 = j + 1). We performed update with respect to a differential polynomial p, which is a result of reduction of some p̃ ∈ Gi ∪ Di with respect to Ai . Then W(Ai+1 ) 6 max(W(Ai ), w(p)) 6 h f j+1 . Moreover, for every g ∈ i S At , t=0 w(lcd(lead(g), lead(p))) 6 h f j + h f j+1 = h f j+2 . 12 (5) Since Di+1 \ Di consists of some of these polynomials, Gi+1 \ Gi ⊆ Ai , and Hi+1 \ Hi = {sep(p), init(p)}, we have W(Gi+1 ∪Di+1 ∪ Hi+1 ) 6 max(W(Gi ∪ Di ∪ Hi ), h f j+2 ) = h f j+2 . In the case m = 2, instead of (5), we obtain w(lcd(lead(g), lead(p))) 6 w(lead(p)) + w(lead(g)) (6) If (6) is strict, we have w(lcd(lead(g), lead(p))) 6 w(lead(p)) + w(lead(g)) − 1 6 F j + F j+1 − 1 = F j+2 , and j + 2 is not a jump index. Otherwise, (6) turns out to be an equality. In this case, the only possibility is lead(p) = ∂a1 yr and lead(g) = ∂b2 yr (or vice versa) for some r. Note that, for every r, such a situation occurs at most once. Consider the following two cases: a b (a) For every q, 1 6 q 6 n, the sequence s1 , . . . , s j+1 already contains ∂1q yq and ∂2q yq for some aq and bq . In this case, s1 , . . . , s j+1 already form an antichain sequence that cannot be extended further, so j + 1 = L. We set F L+1 = F L + F L−1 − 1, so we can bound the right-hand side of (6) from above by F L+1 + 1. (b) Otherwise, we just set F j+2 = F j+1 + F j , so j + 2 is a jump index, and we still have less than n of them. Since w(s j ) 6 W(Ak j ) 6 h f j , this completes the proof of Theorem 25. In order to complete the proof of Proposition 26, it is sufficient to show that, for every such sequence {F j }, for all j, f (n, h) j > F j . Let i1 , . . . , in−1 denote the jump indices of {F j }. Note that { f (n, h) j } is uniquely defined as a sequence of the same type as {F j } with jump indices 3, . . . , n + 1. It is sufficient to prove that, after decreasing any jump index of {F j } by one, we obtain a sequence which is not smaller than {F j }. Then, since we will obtain { f (n, h) j } after some number of such operations and the jump indices of { f (n, h) j } cannot be further decreased, we will have that { f (n, h) j } is the largest such sequence. The claim is true since, before decreasing i j , the sequence was of the form . . . , Fi j −2 , Fi j −1 = Fi j −3 + Fi j −2 − 1, Fi j = Fi j −1 + Fi j −2 = Fi j −3 + 2Fi j −2 − 1, . . . but, after decreasing i j by one, it will be of the form . . . , Fi j −2 , Fi j −1 = Fi j −3 + Fi j −2 , Fi j = Fi j −1 + Fi j −2 − 1 = Fi j −3 + 2Fi j −2 − 1, . . . Since the rest of terms obey the same recurrence for both sequences, the latter is not smaller than the former. Let n = {1, . . . , n}. Define the degree of an element ((i1 , . . . , im ), k) ∈ Zm >0 ×n to be i1 +· · ·+im .  i  im 1 Given a weight w ∂1 · · · ∂m = c1 i1 + · · · + cm im on Θ, define a map from the set of derivatives ΘY to the set Zm >0 × n by ∂i11 · · · ∂imm yk 7→ ((c1 i1 , . . . , cm im ), k). 13 Note the degree of the image of θy in Z>0 × n is equal to the weight of θy in ΘY. Under this map, the partial order 4 on ΘY determines a partial order 4 on Zm >0 × n by saying ((i1 , . . . , im ), k) 4 (( j1 , . . . , jm ), l) ⇐⇒ k = l and ir 6 jr for all r, 1 6 r 6 m. Thus, every antichain sequence of ΘY determines an antichain sequence of Zm >0 × n. Every 2014, Lemma 4.4). antichain sequence of Zm × n (and thus of ΘY) is finite (Pierce, >0 Given an increasing function f : Z>0 → Z>0 , we say that f bounds the degree growth of an antichain sequence S = {s1 , . . . , sk } ⊆ Zm >0 × n if deg(si ) 6 f (i) for all 1 6 i 6 k. By (Pierce, 2014, Lemma 4.9), there is an upper bound on the length of an antichain sequence of Zm >0 × n with degree growth bounded by f , and this bound depends only on m, n, and f . Let Lnf,m be the maximal length of an antichain sequence of Zm >0 × n with degree growth bounded by f . Theorem 27. Let F, K ⊆ k{Y} be finite subsets with h = W(F ∪ K), L = Lnf,m , and A = Rosenfeld-Gröbner(F, K), where f (i) = h fi with { fi } the Fibonacci sequence. Then     [ (A ∪ H) 6 h fL+1 . W  (A,H)∈A Proof. Since w(pd-red(p, B)) 6 w(p) for any p ∈ k{Y} and weak d-triangular set B, we have W(B ∪ K) 6 W(A ∪ H), where {(B, K)} = auto-partial-reduce(A, H). Hence, it suffices to bound W(G ∪ D ∪ A ∪ H) whenever the tuple (G, D, A, H) is added to S in Rosenfeld-Gröbner. By Theorem 25 and the correspondence between antichain sequences of ΘY and Zm >0 × n, we obtain an antichain sequence of Zm × n of degree growth bounded by f (i), so the length of this >0 sequence (and thus the sequence from Theorem 25) is at most L. In the proof of Theorem 25, it is shown that for all i 6 N, for j := anti-ki , we have  i  [   W  (Gt ∪ Dt ∪ At ∪ Ht ) 6 h f j+1 . t=1 Since the largest possible j is the length of the antichain sequence (and this j is equal to anti-kN ), for every (Gi , Di , Ai , Hi ), we have W(Gi ∪ Di ∪ Ai ∪ Hi ) 6 h fL+1 . Since every (G, D, A, H) added to S is equal to (Gi , Di , Ai , Hi ) for some i, this ends the proof. Corollary 28. Let m = 2, F, K ⊆ k{Y} be finite subsets with h = W(F ∪ K), L = Lnf,m , and A = Rosenfeld-Gröbner(F, K), where f (i) = f (n, h)i with { f (n, h)i } given by (4). Then    [  W  (A ∪ H) 6 f (n, h)L+1 . (A,H)∈A Proof. Replacing h fi with f (n, h)i everywhere in the proof of Theorem 27, we obtain an argument that is valid in all cases except for the case in which, for every q, 1 6 q 6 n, the a b antichain sequence {s j } contains ∂1q yq and ∂2q yq for some aq and bq . In this case, we still have W(Ai ) 6 f (n, h)L for all i. We will prove that W(Hi ) 6 f (n, h)L+1 for all i. For i < kL , this inequality follows from the proof of Theorem 25. For i > kL , every h added to Hi is reduced with 14 respect to Ai (see Rosenfeld-Gröbner). The definition of k j implies that the set of leaders of Ak j contains s j . While performing update for Ai , every leader s of Ai either survives or is replaced with s̃ such that s is a derivative of s̃. Hence, for all i > k j , the set of leaders of Ai contains either s j or s̃ such that s j is a derivative of s̃. Thus, since h is reduced with respect to Ai for i > kL , for every variable ∂a1 ∂b2 yq occurring in h, we have a < aq and b < bq . Thus,  b −1    a −1  w(h) 6 max w ∂1q yq + w ∂2q yq 6 f (n, h)L + f (n, h)L−1 − 2 < f (n, h)L+1 . 16q6n We can use Theorem 27 and Corollary 28 to bound the orders of the output RosenfeldGröbner. Let F, K ⊆ k{Y} be two finite subsets, and define a weight w on Θ such that W(F ∪ K) = H(F ∪ K). (7) This can always be done by letting w(θ) = ord(θ) for all derivatives θ, but there are sometimes other weights that lead to equation (7) being satisfied. Example 29. We provide examples of differential polynomials f that arise as part of systems of PDEs for which it is possible to construct a nontrivial weight w such that w( f ) = ord( f ). We note that we are not applying Rosenfeld-Gröbner to these examples; we simply present them to demonstrate that there are nontrivial weights satisfying equation (7). (1) Consider the heat equation ut − α · (u xx + uyy ) = 0, f (u) := ∂t u − α · (∂2x u + ∂2y u) ∈ k{u}, where u(x, y, t) is the unknown, α is a positive constant, and k{u} has derivations {∂ x , ∂y , ∂t }. If we define a weight w on Θ by   w ∂ix ∂yj ∂kt = i + j + 2k, then w( f ) = 2 = ord( f ). (2) Consider the K-dV equation φt + φ xxx + 6φφ x = 0, f (φ) := ∂t φ + ∂3x φ + 6φ∂ x φ ∈ k{φ}, where φ(x, t) is the unknown and k{φ} has derivations {∂ x , ∂t }. Define a weight w on Θ by   j w ∂ix ∂t = i + 3 j, so that w( f ) = 3 = ord( f ). Using Theorem 27, Corollary 28, and (7), we obtain the following order bound for the output of Rosenfeld-Gröbner: Corollary 30. Let F, K ⊆ k{Y} be finite subsets with h = H(F ∪ K), L = Lnf,m , A = Rosenfeld-Gröbner(F, K), where f (i) = f (n, h)i with { f (n, h)i } the  sequence  given by (4) if m = 2 and f (i) = h fi with { fi } the Fibonacci sequence if m > 2. Let w ∂i11 · · · ∂imm = c1 i1 + · · · + cm im be a weight defined on Θ such that W(F ∪ K) = H(F ∪ K). Then, for all g ∈ A,  f (n,h) L+1   if m = 2  ci ord(g, ∂i) 6  h f   L+1 if m > 2. ci 15 5. Specific values In order to apply the results of the previous section, we need to be able to effectively compute Lnf,m . (Pierce, 2014) only proved the existence of this number, without an analysis of how to construct it. (Freitag and León Sánchez, 2016) constructed an upper bound for m = 1, 2. The first analysis for the case of arbitrary m appears in (León Sánchez and Ovchinnikov, 2016). Let f : Z>0 → Z>0 be an increasing function. Let us define a function Ψ f,m : Z>0 × Zm >0 → Z>0 by the following relations:    Ψ f,m (i, (0, . . . , 0, um)) = i,       Ψ f,m (i − 1, (u1 , . . . , ur , 0, . . . , 0, um))     = Ψ f,m (i, (u1, . . . , ur − 1, f (i) − f (i − 1) + um + 1, 0, . . . , 0)), r < m − 1, ur > 0,       Ψ (i  f,m − 1, (u1 , . . . , um ))      = Ψ f,m (i, (u1, . . . , um−1 − 1, f (i) − f (i − 1) + um + 1)), um−1 > 0. Proposition 31 ((León Sánchez and Ovchinnikov, 2016, Corollary 3.10)). The maximal length of an antichain sequence in Zm >0 with degree growth bounded by f does not exceed Ψ f,m (1, ( f (1), 0, . . . , 0)). Let us also define the sequence ψ0 , ψ1 , . . . by the relations ψ0 = 0 and ψi+1 = Ψ fi ,m (1, ( fi (1), 0, . . . , 0)) + ψi , fi (x) := f (x + ψi ). Proposition 32 ((León Sánchez and Ovchinnikov, 2016, Corollary 3.14)). The maximal length of an antichain sequence in Zm >0 × n with degree growth bounded by f does not exceed ψn . Now, let us apply this technique to the functions f1 (i) = f (n, h)i and f2 (i) = h fi . Then, by Theorem 27 and Corollary 28, an upper bound on the weights of the output of RosenfeldGröbner will be f1 (Lnf1 ,m + 1) if m = 2 and f2 (Lnf2 ,m + 1) if m > 2. In general, we do not have a formula for Lnf1 ,m and Lnf2 ,m for arbitrary h, m, n that improves the one given in Proposition 32; however, we can compute Lnf1 ,m and Lnf2 ,m for some specific values of h, m, n. If W(F ∪ K) = H(F ∪ K) = h, we can use Corollary 30 to produce perhaps sharper bounds for the order of the elements of Rosenfeld-Gröbner(F, K) with respect to particular derivations. In the examples that follow, we calculate upper bounds for ord(g, ∂1) for  i 1 g ∈ Rosenfeld-Gröbner(F, K), where w ∂1 · · · ∂imm = c1 i1 + · · · + cm im in the case in which c1 = 2 and the case in which c1 = 3. We note that in the tables that follow, “N/A” appears whenever we cannot have the given initial order h with given ci as part of the weight function. (1) Assume that n = 1 and m = 2. Then the maximal length of an antichain sequence does not exceed h + 1. In this case, the weights of the resulting polynomials are bounded by f (1, h)h+2 , which results in the following table: h f (1, h)h+2 ord(g, ∂1), c1 = 2 ord(g, ∂1), c1 = 3 1 1 N/A N/A 2 4 2 N/A 3 11 5 3 16 4 25 12 8 5 55 26 17 6 106 53 35 7 205 102 68 8 386 193 128 9 713 356 237 10 1297 648 432 (2) Assume that m = 2 and n is arbitrary. Then the maximal length of an antichain sequence does not exceed bn , where bn satisfies b1 = h + 1 and bn+1 = f (n, h)bn+1 + bn + 1, which results in the following table: n 2 2 2 2 3 h 1 2 3 4 1 bn 5 9 18 34 11 f (n, h)bn+1 4 77 9,960 31, 206, 974 90 ord(g, ∂1 ), c1 = 2 N/A 38 4,980 15, 603, 487 N/A ord(g, ∂1 ), c1 = 3 N/A N/A 3,320 10, 402, 324 N/A (3) Assume that m = 3 and n = 1. We can construct the maximal length antichain sequence of Z3>0 using the methods of (León Sánchez and Ovchinnikov, 2016) and the function f (i) = h fi , resulting in the following sequence: (h, 0, 0), (h − 1, 1, 0), (h − 1, 0, h + 1), (h − 2, 2h + 2, 0), . . . , (h − 2, 0, h f2h+6 − (h − 2)), . . . , (h − i, h fci−1 +1 − (h − i), 0), . . . , (h − i, 0, h fci − (h − i)), . . . , (0, h fch−1+1 , 0), . . . , (0, 0, h fch ), where the sequence ci is given by c0 = 1 and for 1 6 i 6 h, ci = ci−1 + 1 + h fci−1 +1 − (h − i). As a result, we see that the maximal length of an antichain sequence is equal to ch . Below is a table of some maximal lengths Lnf,m and weights f (Lnf,m + 1), where f (i) = h fi , for m = 3, 4, and 5: m 3 3 4 5 n 1 1 1 1 h 1 2 1 1 length 3 10 5 20 weight 3 178 8 10,946 6. Order lower bound This section gives a lower bound for the orders of the output of Rosenfeld-Gröbner, coming from the lower bound for degrees of elements of a Gröbner basis from (Yap, 1991). To be specific, we show that for m, h sufficiently large, there is a set of r differential polynomials F ⊆ k{y} of order at most h, where k is equipped with m derivations, r ∼ m/2, and k is constant with respect to all of the derivations, such that if A = Rosenfeld-Gröbner(F, {1}), then    [  r  H  (A ∪ H) > h2 . (8) (A,H)∈A The arguments presented here are standard, and we include them for completeness. We first note the following standard fact about differential ideals generated by linear differential polynomials. 17 Proposition 33. Suppose F, K ⊆ k{Y} are composed of linear differential polynomials. Then the output of Rosenfeld-Gröbner(F, K) is either empty or consists of a single regular differential system (A, H) with A and H both composed of linear differential polynomials. Suppose now we apply Rosenfeld-Gröbner to (F, {1}), where F consists of linear differential polynomials, in order to obtain a regular decomposition of {F}. Since every element of F is linear, [F] is a prime differential ideal, so by Proposition 33, we have [F] = {F} = [A] : H ∞ for some regular differential system (A, H), with A and H both composed of linear differential polynomials. Since every element of A is linear, after performing scalar multiplications and addition, A can be transformed to an autoreduced set Ā without affecting the leaders and orders of elements of A. Since (A, H) is a regular differential system, Ā is a characteristic set of [F]. So, it suffices to find a lower bound on the orders of elements of linear characteristic sets in k{Y}. There is a well-studied one-to-one correspondence between polynomials in k[x1 , . . . , xm ] and homogeneous linear differential polynomials in k{y} with m derivations and k a field of constants: X X (9) ci1 ,...,im ∂i11 · · · ∂imm y. ci1 ,...,im xi11 · · · ximm ↔ Any orderly ranking on Θy then determines a graded monomial order on k[x1 , . . . , xm ]. Given a polynomial f ∈ k[x1 , . . . , xm ], let f˜ ∈ k{y} be its corresponding differential polynomial under (9). By the discussion above, if we have a collection of polynomials f1 , . . . , fr ∈ k[x1 , . . . , xm ], we can construct a characteristic set C = {C1 , . . . , C s } of [ f˜1 , . . . , f˜r ] ⊆ k{y} consisting of homogeneous linear differential polynomials, and so each Ci ∈ k{y} is in fact equal to g̃i for some gi ∈ k[x1 , . . . , xm ]. Proposition 34 (cf. (Wu, 2005, page 352),(Gerdt, 2005)). With the notation above, {g1 , . . . , g s } ⊆ k[x1 , . . . , xm ] is a Gröbner basis of the ideal I = ( f1 , . . . , fr ). By Proposition 34, we can thus find a lower bound for the orders of the output of RosenfeldGröbner via a lower bound for the degrees of elements of a Gröbner basis, as we do in the following example. Example 35. This example demonstrates the lower bound (8) for the orders of the output of Rosenfeld-Gröbner. In (Yap, 1991, Section 8), for m, h sufficiently large, a collection of m algebraic polynomials f1 , . . . , fr of degree at most h in m algebraic indeterminates, with r ∼ m/2, is constructed such that any Gröbner basis of ( f1 , . . . , fr ) with respect to a graded monomial r order has an element of degree at least h2 . As a result of the previous discussion, we have a collection of differential polynomials F = f˜1 , . . . , f˜r ∈ k{y} of order h with m derivations such that any linear characteristic set r of [ f˜1 , . . . , f˜r ] will contain a differential polynomial of order at least h2 . Since in this case {(A, H)} = Rosenfeld-Gröbner(F, {1}) can be transformed into a linear characteristic set without affecting the orders of the elements, this means that r H(A ∪ H) > h2 . 18 References Boulier, F., Lazard, D., Ollivier, F., Petitot, M., 1995. Representation for the radical of a finitely generated differential ideal. In: ISSAC’95: Proceedings of the 1995 international symposium on Symbolic and algebraic computation. ACM Press, New York, NY, USA, pp. 158–166. URL http://dx.doi.org/10.1145/220346.220367 Boulier, F., Lazard, D., Ollivier, F., Petitot, M., 2009. Computing representations for radicals of finitely generated differential ideals. Applicable Algebra in Engineering, Communication and Computing 20 (1), 73–121. URL http://dx.doi.org/10.1007/s00200-009-0091-7 D’Alfonso, L., Jeronimo, G., Solernó, P., 2014. Effective differential Nullstellensatz for ordinary DAE systems with constant coefficients. Journal of Complexity 30 (5), 588–603. URL http://dx.doi.org/10.1016/j.jco.2014.01.001 Freitag, J., León Sánchez, O., 2016. Effective uniform bounds in partial differential fields. Advances in Mathematics 288, 308–336. URL http://dx.doi.org/10.1016/j.aim.2015.10.013 Gerdt, V., 2005. Involutive algorithms for computing Gröbner bases. In: Computational commutative and noncommutative algebraic geometry. Vol. 196 of NATO Science Series III: Computer and Systems Sciences. IOS, Amsterdam. URL http://arxiv.org/abs/math/0501111 Golubitsky, O., Kondratieva, M., Moreno Maza, M., Ovchinnikov, A., 2008. A bound for Rosenfeld-Gröbner algorithm. Journal of Symbolic Computation 43 (8), 582–610. URL http://dx.doi.org/10.1016/j.jsc.2007.12.002 Golubitsky, O., Kondratieva, M., Ovchinnikov, A., Szanto, A., 2009. A bound for orders in differential Nullstellensatz. Journal of Algebra 322 (11), 3852–3877. URL http://dx.doi.org/10.1016/j.jalgebra.2009.05.032 Gustavson, R., Kondratieva, M., Ovchinnikov, A., 2016a. New effective differential Nullstellensatz. Advances in Mathematics 290, 1138–1158. URL http://dx.doi.org/10.1016/j.aim.2015.12.021 Gustavson, R., Ovchinnikov, A., Pogudin, G., 2016b. Bounds for orders of derivatives in differential elimination algorithms. In: ISSAC ’16: Proceedings of the 2016 ACM International Symposium on Symbolic and Algebraic Computation. ACM Press, New York, NY, USA, pp. 239–246. URL http://dx.doi.org/10.1145/2930889.2930922 Hubert, E., 2003. Notes on triangular sets and triangulation-decomposition algorithms II: Differential systems. In: Langer, U., Winkler, F. (Eds.), Symbolic and Numerical Scientific Computations. Vol. 2630 of Lecture Notes in Computer Science. Springer, pp. 40–87. URL http://dx.doi.org/10.1007/3-540-45084-X_2 Kolchin, E. R., 1973. Differential algebra and algebraic groups. Academic Press, New York, pure and Applied Mathematics, Vol. 54. León Sánchez, O., Ovchinnikov, A., 2016. On bounds for the effective differential Nullstellensatz. Journal of Algebra 449, 1–21. URL http://dx.doi.org/10.1016/j.jalgebra.2015.10.009 Pierce, D., 2014. Fields with several commuting derivations. Journal of Symbolic Logic 79 (1), 1–19. URL http://dx.doi.org/10.1017/jsl.2013.19 Wu, W., 2005. On the construction of Groebner basis of a polynomial ideal based on Riquier-Janet theory. In: Wang, D., Zheng, Z. (Eds.), Differential Equations with Symbolic Computation. Trends in Mathematics. Birkhäuser Verlag, pp. 351–368. URL http://dx.doi.org/10.1007/3-7643-7429-2_20 Yap, C., 1991. A new lower bound construction for commutative Thue systems with applications. Journal of Symbolic Computation 12, 1–27. URL http://dx.doi.org/10.1016/S0747-7171(08)80138-1 19
0math.AC
1 Figure Figure11 Joint Person Re-identification and Camera Network Topology Inference in Multiple Cameras arXiv:1710.00983v1 [cs.CV] 3 Oct 2017 Yeong-Jun Cho, Su-A Kim*, Jae-Han Park*, Kyuewang Lee, Student Member, IEEE and Kuk-Jin Yoon, Member, IEEE Abstract—Person re-identification is the task of recognizing or identifying a person across multiple views in multi-camera networks. Although there has been much progress in person reidentification, person re-identification in large-scale multi-camera networks still remains a challenging task because of the large spatio-temporal uncertainty and high complexity due to a large number of cameras and people. To handle these difficulties, additional information such as camera network topology should be provided, which is also difficult to automatically estimate, unfortunately. In this study, we propose a unified framework which jointly solves both person re-identification and camera network topology inference problems with minimal prior knowledge about the environments. The proposed framework takes general multi-camera network environments into account and can be applied to online person re-identification in largescale multi-camera networks. In addition, to effectively show the superiority of the proposed framework, we provide a new person re-identification dataset with full annotations, named SLP, captured in the multi-camera network consisting of nine non-overlapping cameras. Experimental results using our person re-identification and public datasets show that the proposed methods are promising for both person re-identification and camera topology inference tasks. Index Terms—Person re-identification, Camera network topology inference, Non-overlapping camera network, Person reidentification dataset I. I NTRODUCTION Nowadays, a large number of surveillance cameras installed at public places (e.g. offices, stations, airports, and streets) are used to prevent untoward incidents, monitor localities, or to track down evidences. In this context, multi-camera networks have been studied to monitor larger areas or specific individuals. Person re-identification, studied extensively over the past decade, is the task of automatically recognizing and identifying a person using multiple views obtained from multi-camera networks. Nevertheless, the re-identification in large-scale multi-camera networks still remains a challenging task because of the large spatio-temporal ambiguity and high complexity due to the large numbers of cameras and people. It becomes even more challenging when camera views do This work was done when all authors were in Gwangju Institute of Science and Technology. * These authors contributed equally to this work. Yeong-Jun Cho, Jae-Han Park and Kuk-Jin Yoon are with the School of Electrical Engineering and Computer Science, Gwangju Institute of Science and Technology, South Korea. Currently, Su-A Kim is with Intel Visual Computing Institute Saarland Informatics Campus, Germany and Kyuewang Lee is with ASRI, Department of Electrical and Computer Engineering, Seoul National University. Kuk-Jin Yoon is a corresponding author. E-mail: [email protected] Cam CamBB Cam CamAA ?? Large Largenumber numberofofcameras cameras Cam CamCC ?? ?? Large Largenumber number of ofobjects objects Cam CamNN (a) Spatio-temporal uncertainties between cameras (b) High complexity due to large numbers of cameras and people Fig. 1. Challenges of large-scale person re-identification not overlap each other. As shown in Fig. 1 (a), spatiotemporal uncertainty due to the unknown geometrical relationship between cameras in a multi-camera network makes re-identification difficult. Unless some prior knowledge about the camera network is given, re-identification should be done by thoroughly matching the person of interest with all the other people who appear in the camera network within the given time interval. This exhaustive search method is slow in general and generates unsatisfactory results in many cases because it is hard to find a correct match among a large number of candidates, as there might be many people having appearances similar to the person of interest. Most of the previous studies [1]–[3] conducted an exhaustive search to re-identify people across multiple cameras, relying solely on the appearance of people. These methods work quite well when the numbers of cameras and people are small, but cannot effectively handle the aforementioned challenges in the large-scale problem illustrated in Fig. 1 (b). To resolve the complexity problem and to improve the accuracy of the large-scale person re-identification, the number of matching candidates should be constrained and reduced by inferring and exploiting the spatio-temporal relation between cameras, referred to as the camera network topology. In recent years, several camera network topology inference methods [4], [5] have been proposed for large-scale person reidentification. These methods infer the topology of a camera network based on the simple occurrence correlation between the people’s entry and exit events. However, no appearancebased validation is performed for topology inference. Hence, the inferred topology can be inaccurate in crowded scenes. Actually, it is a chicken-and-egg situation: the camera network topology can be more accurately inferred from the reidentification results while person re-identification can be im- 2 proved by utilizing the camera network topology information. The main idea of this study is that the camera network topology inference and person re-identification can be achieved jointly while complementing each other. Based on this idea, we propose a unified framework, which automatically solves both the problems together. To the best of our knowledge, this is the first attempt to solve both the problems jointly. In the proposed framework, we first infer the initial camera network topology using only highly reliable re-identification results obtained by the proposed multi-shot matching method. This initial topology is used to improve the person re-identification results, and the improved re-identification results are then used to refine the camera network topology. This procedure is repeated until the estimated camera network topology converges. Once we estimate the reliable camera network topology in the initialization stage, we utilize it for the online person reidentification and update the camera network topology with time. To sum up, we propose a multi-shot person reidentification method that exploits a time-efficient random forest. (Sec. III-A). We also propose a fast and accurate camera network topology inference method in Sec. III-B. In Sec. III-C, we describe a proposed online person re-identification method. The methods are effectively integrated in our framework. It is important to note that our proposed framework runs automatically with minimal prior knowledge about the environments. Besides the proposed methods, we also provide a new Synchronized Large-scale Person re-identification dataset named SLP (Sec. IV) captured in the multi-camera network consisting of nine non-overlapping cameras. To validate our unified framework, we extensively evaluate the performance and compare it with state-of-the art methods. Our previous study is [6]. Differences between the previous study and this study are as follows. In this study, we propose and validate online person re-identification after the camera network topology initialization stage (Sec. III-C). During the online person re-identification, the camera network topology updates itself with time. We describe complete details of the proposed methods and provide more experimental results to explicitly validate our proposed methods. In Sec. VI, we compare our proposed method with state-of-the-art methods in terms of both quantitative and qualitative performances, and show the results using another public dataset. II. P REVIOUS W ORKS Person re-identification methods can be categorized into non-contextual and contextual methods as summarized in [7]. In general, non-contextual methods rely only on appearances of people and measure visual similarities between people to establish correspondences, while contextual methods exploit additional contexts such as human pose, camera parameters, geometry, and camera network topology. A. Non-contextual Methods In order to identify people across non-overlapping views, most studies rely on appearances of people by utilizing appearance-based matching methods with feature learning or metric learning techniques. For feature learning, many studies [1], [8], [9] have tried to design visual descriptors to describe the appearance of people suitably. Regarding the metric learning, several methods such as KISSME [10] and LMNN-R [11] have been proposed and applied to the reidentification problem [2], [12], [13]. Some studies [10], [13] extensively evaluated and compared several metric learning methods and showed the effectiveness of the metric learning for re-identification. In order to utilize more plentiful appearance information, various multi-shot matching methods exploiting multiple appearances were proposed in [1], [14], [15]. In addition, person re-identification methods based on deep learning were proposed in [3], [16], which simultaneously learn both features and distance metrics. Although many non-contextual methods have improved the performance of person re-identification, the challenges such as spatio-temporal uncertainty between non-overlapping cameras and high computational complexity still remain. B. Contextual Methods Several studies [17]–[19] using human pose priors have been proposed recently. These methods calibrate cameras to obtain camera parameters and estimate human poses. Person re-identification with estimated human poses can then be efficiently carried out. The methods mitigate ambiguities by seeking various poses of people. To resolve the spatio-temporal ambiguities, many studies have tried to employ camera network topology and camera geometry. Several studies [20]–[22] assume that the camera network topology information is available and show the effectiveness of the topological information. However, the topology is not available in the real-world scenario. Thus, many studies have tried to infer the camera network topology in an unsupervised manner. Makris et al. [4] proposed a topology inference method that simply observes the entry and exit events of the targets and measures the correlations between the events to establish the camera network topology. This method was applied and extended in [23]–[25]. Similarly, Loy et al. [5], [26] also proposed topology inference methods to understand multi-camera activity by measuring correlation or common information across simple activity patterns. The aforementioned topology inference methods [4], [5], [24]–[26], so-called event-based approaches are practical since they do not require any appearance matching steps such as reidentification or inter-camera tracking for topology inference. However, the topology inferred by the event-based approach can be inaccurate since the topology may be inferred from false event correlations. Actually, false event correlation may easily occur when people pass through blind regions irregularly. On the other hand, a few studies [27], [28] inferred the topology using person re-identification results. These methods tend to be more robust to noise than the eventbased approaches. However, they do not refine or update the initially inferred topology with time while performing reidentification. Thus, these methods may not fully exploit the topology information. 3 label 𝑁 𝑐𝐵 label 𝑗 … … 1 … … 2 𝑙 𝑐 𝐾𝑗 𝐵 1st Tth tree tree 𝑐 𝑦|𝐯𝑗,𝑙𝐵 𝑐 𝑝𝑐𝐴 𝑦|𝐯𝑗 𝐵 𝑐 𝑝Τ𝐴 𝑐 𝑦|𝐯𝑗,𝑙𝐵 Ensemble each tree result & multi-shot test result 𝑦 Zone-to-Zone (Sec III-B2) topology inference Iterative update of person re-id and camera topology Enhance person re-id accuracy using topology information CAM C (Sec III-A) Re-identifying time iterations 𝑝(∆𝑡) 𝜇last Random forest time 2nd Random forest … Iterate until the topology converges T ID #32 ID #32 T 𝑝(∆𝑡) … T … T Updated topology Initial topology time *Edge thickness: connectivity confidence 2T Refine the camera topology using updated re-id results Blind area (Sec. III-C) Re-identify person using online updated camera topology searching reduced matching candidates 0 CAM B Online Person Re-identification (Sec. III-B3) CAM C CAM B CAM-to-CAM topology Valid link Zone CAM A Max probability 𝑦𝑖∗ (Sec III-B1) Blind area … 𝑐 𝑝1 𝐴 CAM-to-CAM topology inference Valid link CAM CAM A Test index 𝑗: 𝐯𝑗,𝑙𝑐𝐵 CAM 𝑐𝐴 Offline Camera Network Topology Initialization Zone to zone topology Re-id based on Random Forest CAM 𝑐𝐵 Update camera topology using re-identified person Fig. 2. The proposed unified framework for person re-identification and camera network topology inference. III. P ROPOSED U NIFIED F RAMEWORK 2nd RF Figure 2 illustrates the proposed unified framework for person re-identification and camera network topology inference. In the proposed framework, we first train random forestbased person classifiers (Sec. III-A) for efficient person reidentification. Subsequently, we jointly estimate and refine the camera network topology and person re-identification results (Sec. III-B) using the trained random forests. Finally, we perform an online person re-identification using the inferred camera topology (Sec. III-C). Most of the previous studies mainly focused on enhancing the re-identification performance. However, when handling a large number of people, time complexity is also very important for building a practical re-identification framework. To this end, we utilize a random forest algorithm [29] for multi-shot person re-identification and incorporate it into our framework. We denote the k-th appearance of person i in the camera cA cA as vi,k . A set of the appearances of people in the camera is expressed as, n  o cA D cA = vi,k , yi |1 ≤ i ≤ N cA , 1 ≤ k ≤ KicA , (1) where yi is the label of person i (normally yi is set to i). N cA is the number of people visible in camera cA and KicA is the number of appearances of person i in camera cA . We then train a random forest classifier using the appearance set DcA . After the random forest classifier is trained, we can estimate the probability distribution of classificationPby aggregating T decision tree outputs as: pcA (y|v) = T1 τ =1 pcτA (y|v), cA where pτ , T denote a trained decision tree and the number of decision trees, respectively. Testing a person j (i.e. probe) in another camera cB to the trained random forest classifier is defined as, p  cB y|vj,l  T 1 X cA  cB  p y|vj,l . = T τ =1 τ T 1st RF time 2T 3rd RF last RF Fig. 3. Training a series of random forest classifiers based on the overlapping time window T . To obtain a multi-shot person re-identification result, we test multiple appearances of each person and average the multiple results as A. Random Forest-based Person Re-identification cA 0 4th RF (2) K cB j 1 X cA cB pcA (y|vjcB ) = cB p (y|vj,l ), Kj (3) l=1 where KjcB is the number of appearances  of the probe. From the probability distribution pcA y|vjcB , we choose a final matched label as: yi∗ = argmax yi ∈{1,2,...,N cA } pcA (yi |vjcB ). (4) As the result of the multiple appearance matching test, we obtain a corresponding pair (vycA∗ , vjcB ) between the camera i cA and cB . Finally, we calculate a similarity score for the matching pair by selecting the smallest matching score as per the following equation [1],   − mink,l S vycA∗ , vjcB = e i c c B vyA ∗ ,k −vj,l i 2 . (5) The similarity score lies on [0, 1] and it is used in Sec. III-B for inferring the topology. The tree structure of the random forest method makes the multi-shot test very fast: its computational complexity is O(N K log N )1 . On the other hand, the conventional exhaustive re-identification approaches comparing every person pair 1 When analyzing the computational complexity, we assume that the number of objects in cA and cB are the same (i, j = {1, 2, .., N }) and each object contains the same number of image patches (k, l = {1, 2, .., K}). Details are described in APPENDIX. 4 0.0771638 0.56574 0.2 0.2 𝑐𝑜𝑛𝑓 𝑝 ∆𝑡 Fitted curve 0.1 𝑐𝑜𝑛𝑓 𝑝 ∆𝑡 = 0.07 50 150 Fitted curve 0.1 0.05 0.05 0 -50 0.15 y y 0.15 = 0.56 0 50 100 150 200 250 time 300 0 -50 0 100 200 250 time 300 x x (a) CAM1 – CAM2 (b) CAM1 – CAM4 Fig. 4. Examples of estimated transition distributions with connectivity confidences involve higher computational cost: O(N 2 K 2 ). Over and above the superiority in terms of the computational cost, our method also delivers a high person re-identification accuracy as shown in Sec. VI-A1. B. Camera Network Topology Initialization Camera network topology represents spatio-temporal relations and connections between the cameras in the network. It involves the inter-camera transition distributions between two cameras, which denote the transition distributions of objects across cameras according to time, and represent the strength of connectivity between the cameras. In general, the topology is represented as a graph G = (V, E), where the vertices V denote the cameras and the edges E denote the inter-camera transition distributions, as shown in Fig. 8 (b). 1) CAM-to-CAM topology inference: To build the CAMto-CAM topology, we first estimate the transition distributions between the cameras. In this study, we estimate the transition distributions based on the person re-identification results. Before performing person re-identification, we select key appearances among the multiple appearances of each person based on the method in [30]. By selecting key appearances uncorrelated with each other, we can efficiently reduce the matching complexity and avoid over-fitting problems. After the key appearance selection, we split a whole group of people into several sub-groups according to their timestamps and train a series of random forest classifiers with overlapping time window T as shown in Fig. 3. Next, we search correspondences of people who disappeared in a camera using the trained random forest classifiers of other cameras. Initially, we have no transition distributions between cameras to utilize. Hence, we consider every pair of cameras in the camera network and search for correspondences within a wide time interval. When a person disappears at time t in a certain camera, we search the correspondence of the person from the other cameras within time range [t − T, t + T ]. If there are multiple random forest classifiers overlapping with the time range, we test all random forest classifiers and select the most reliable one among them as a correspondence. Thanks to our overlapping search scheme, we can alleviate the risk of failure in correspondence search. When these initial correspondences are given, we only use highly reliable correspondences to infer transition distributions between cameras. We regard a correspondence as a reliable one with a high similarity score when S(vycA∗ , vjcB ) > θsim . i The inference procedure of transition distribution is as follows: (1) Calculate the time difference between correspondences and make a histogram of the time difference. (2) Normalize the histogram using the total number of reliable correspondences. We denote the transition distribution as p (∆t). Figure 4 shows two distributions: Fig. 4 (a) is obtained from a pair of cameras having a strong connection, and Fig. 4 (b) from a pair of cameras having a weak or no connection. Connectivity Check Based on the estimated transition distributions, we automatically identify whether a pair of cameras is connected or not. We assume that the transition distribution follows a normal distribution if there is a topological connection. Based on this assumption, we fit a Gaussian model N (µ, σ 2 ) to the distribution p (∆t) and measure the connectivity of a pair of cameras based on the following observations: • Variance of p (∆t): In general, most of the people reappear after a certain transition time µ; therefore, the variance in the transition distribution (σ 2 ) is not extremely large and the distribution shows a clear peak. • Fitting error: Even though the distribution is obtained from a pair of cameras with a weak connection, the variance in the distribution can be small and the distribution can have a clear peak due to noise. In order to measure the connectivity robust to noise, we consider the model fitting error E (p (∆t)) ∈ [0, 1] calculated by R-squared statistics. Based on the above observations, we newly define a connectivity confidence between a pair of cameras as conf (p (∆t)) = e−σ · (1 − E (p (∆t))) . (6) The connectivity confidence lies on [0, 1]. We regard a pair of cameras as a valid link when conf (p (∆t)) > θconf . Compared to a previous method [4], which only takes the variance of a distribution into account, our method is more robust to noise of distributions. Using the defined confidences, we check every pair of cameras and reject invalid links as shown in Fig. 8. We can see that many camera pairs in the camera network have weak connections. Therefore, we can greatly reduce computation time and save resources. Only the valid pairs of cameras proceed to the next step. Through this topology inference procedure, CAM-to-CAM topology is represented as Gcam = (Vcam , Ecam ) , Vcam ∈ {ci |1 ≤ i ≤ Ncam } ,  Ecam ∈ pij (∆t)|1 ≤ i ≤ Ncam , 1 ≤ j ≤ Ncam , i 6= j , (7) where Ncam is the number of cameras in the camera network, ci is a ith camera, and pij (∆t) is a transition distribution between ci and cj . acc 0.235 0.5474 0.6631 5 0.897959 0.4 𝑐𝑜𝑛𝑓 𝑝 ∆𝑡 1 = 0.63 0.4 1 𝑐𝑜𝑛𝑓 𝑝 ∆𝑡 = 0.86 0.3 y y 0.2 0.2 0.2 0.1 0.1 0.1 0 -20 0 20 40 60 time 80 = 0.93 0.3 y 0.3 𝑐𝑜𝑛𝑓 𝑝 ∆𝑡 0.4 0 -20 0 x (a) Iteration 1 20 40 60 time 80 0 -20 x 0 20 40 60 time 80 x (c) Iteration 5 (b) Iteration 2 Fig. 5. Iterative update of the topology and re-identification results. Re-id accuracy is improved from 23.5% to 66.31%. 2) Zone-to-Zone topology inference: In this step, we estimate transition distributions between zones in cameras and build a Zone-to-Zone topology. For each camera, a set of entry and exit zones is automatically learned by [31]. Note that we only consider exit-to-entry zone pairs when two zones belong to different cameras. Other pairs of zones such as exit-to-exit, entry-to-entry, and entry-to-exit are not considered. A person who disappeared at an exit zone at time t is likely to appear at an entry zone in a different camera within a certain time interval T . Therefore, we search the correspondence of the disappeared person from the entry zones in different cameras within the time range [t, t + T ]. Similarly, as in Sec. III-B1, we train a series of random forest classifiers for each entry zone and measure connectivity confidences of all possible pairs of zones using only reliable correspondences. Through this step, many invalid pairs of zones between the cameras can be ignored, and we can formulate Zone-to-Zone topology as: Gzone = (Vzone , Ezone ) ,  Vzone ∈ ci(k) |1 ≤ i ≤ Ncam , 1 ≤ k ≤ Zi , Ezone ∈{pij (kl) (∆t)|1 ≤ i ≤ Ncam , 1 ≤ j ≤ Ncam , (8) Algorithm 1: Camera network topology initialization Data: Image sequences and object identities in each view during initialization stage Result: Re-identification result (people correspondences), Camera network topology for every camera pair do Gcam = CAM-to-CAM topology inference;  if conf pij (∆t) > θconf then Gzone = Zone-to-Zone topology inference;   if conf pij (kl) (∆t) > θconf then while pij do (kl) (∆t) converging   ij ij  1  T ij T(kl) = ij (kl)U − T(kl)L 1−E p(kl) (∆t) Gzone = Topology update; end end end end i 6= j, 1 ≤ k ≤ Zi , 1 ≤ l ≤ Zj } where Ncam is the number of cameras in the camera network, Zi is the number of zones of ith camera. ci(k) is a kth zone of the ith camera. pij (kl) (∆t) is a transition distribution between ci(k) and cj(l) . In the next section, we iteratively update the valid links between zones and build a camera topology map of the camera network. 3) Iterative update of person re-identification and camera network topology: After conducting the Zone-toZone topology inference, we obtain an initial topology map between every pair of zones in the camera network. However, the initial topology map can be inaccurate, because it is inferred from noisy initial re-identification results. Although we consider only highly reliable re-identification results to infer the initial topology, the re-identification results are erroneous because we cannot exploit the topology information initially for re-identification. As mentioned above, camera network topology information and re-identification results can complement each other. The inferred topology of the camera network can enhance the person re-identification performance, and the person reidentification can assist the topology inference. Therefore, we update person re-identification results and the camera network topology in an iterative manner. Assuming that we have a transition distribution p (∆t) ∼ N (µ, σ 2 ) between two zones. Each zone belongs to different cameras. Then, the iterative update procedure is as follows: • Step 1. Update the time window T . The initial time window T was set quite wide, but now we can narrow it down based on the inferred topology. First, we find the lower and upper time bounds (TL , TU ) of the transition distribution p (∆t) with a constant R as, p (TL ≤ ∆t ≤ TU ) = R . 100 (9) We set R as 95 following 3-sigma rule in order to cover a majority of the distribution (95%) and ignore some outliers (5%). Then, using the time bounds obtained, the time window T is updated as, T = 1 (TU − TL ) , 1 − E (p (∆t)) (10) where E (p (∆t)) is a Gaussian model fitting error rate. When the fitting error is high, the time window T becomes large. Thanks to our update strategy, we can avoid the over-fitting of the topology during the update steps. 6 Algorithm 2: Online person re-identification and camera network topology update Data: Image sequences, Object identities in each view, Camera network topology Result: Re-identification result (people correspondences), Camera network topology TABLE I L IST OF PUBLIC PERSON RE - IDENTIFICATION DATASETS . W E REFERRED TO THE LIST OF PERSON RE - IDENTIFICATION DATASETS IN [32]. dataset VIPeR [33] QMUL iLIDS [34] GRID [5] CAVIAR4ReID [35] 3DPeS [36] PRID2011 [37] V47 [38] WARD [39] Softbio [40] CUHK 2 [41] CUHK 3 [42] for every zone  pair do if conf pij (kl) (∆t) > θconf then Find correspondences; p0ij (kl) (∆t) = Transition distribution update;  P  0ij > 0.1 then (∆t) (∆t) − p if ∆t pij (kl) (kl) % Fit Gaussian model to p0ij (kl) (∆t) pij (kl) (∆t) = p0ij (kl) (∆t) year # IDs # cam NLPR MCT [43] 2 ∼ N (µ, σ ); end end end Step 2. Re-train a series of random forests of an entry zone with the updated time window T as shown in the Fig. 3. • Step 3. Find correspondences of the disappeared people at an exit zone. Based on the topology, a person who disappeared at time t at the exit zone is expected to appear around the time (t + µ) at the entry zone of the other camera. Using the topological information, we search the correspondence of the person from a trained random forest having the center of time slot close to (t + µ). • Step 4. Update the transition distribution using reliable correspondences with a high similarity score S(vycA∗ , vjcB ) > θsim . i This procedure (Step 1 – Step 4) is repeated until the transition distribution converges. We perform the procedure for all Zone-to-Zone pairs in the camera network topology Gzone . Consequently, the camera topology map in the camera network is refined. If the topology does not change anymore or shows subtle changes during several iterations, we stop the procedure. The above procedure improves the performance of re-identification as well as the accuracy of the topology inference, as shown in Fig. 5. The overall algorithm of the proposed camera network topology initialization process is summarized in Algorithm. 1. RAiD iLIDS-VID Market1501 PRW MARS DukeMTMC4ReID [48], Airport [44] [14] [45] [46] [47] [49] [32] SLP 2007 632 2009 119 2009 250 2011 72 2011 192 2011 934 2011 47 2012 70 2012 150 2013 1816 2014 1360 235 2014 255 2014 43 2014 300 2015 1501 2016 932 2016 1261 2017 1852 2017 9651 2017 2632 2 2 8 2 8 2 2 4 8 2 2 3 3 4 2 6 6 6 8 6 9 multi back traj. sync -shot ground X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X • C. Online Person Re-identification and Camera Network Topology Update Once we estimate the reliable camera network topology in the initialization stage, we utilize it for the online person reidentification and online camera network topology update. The proposed online process is as follows: • Step 1. Pick out matching candidates of a person based on the initialized camera network topology. When a person disappeared at a time t, a set of people appearing at a different camera within t + TL ≤ t + µ ≤ t + TU are the matching candidates. The lower and upper time bounds • • • (TL , TU ) are evaluated using the method described in Sec. III-B3. Step 2. Find a correspondence among the matching candidates. For efficiency, we only train random forest classifiers where the number of matching candidates is large unless we find the correspondence based on exhaustive search. Step 3. Update the transition distribution. We use the matching result with a high similarity score (> θsim ) to update the transition distribution, adding the new matching result to p(∆t) and normalizing the distribution. The updated transition distribution is represented as p0 (∆t). Step 4. Fit a new Gaussian model to the updated transition distribution p0 (∆t). The cost of model fitting is quite high. Hence, we do not always fit the Gaussian model, but only when the difference between the initial distribution p (∆t) and the updated distribution p0 (∆t) is sufficiently large. P To this end, we measure the distribution difference as ∆t (|p (∆t) − p0 (∆t)|) and fit the model when the value is larger than 0.1 (i.e., 10 % variation). Unless the value is larger than the threshold, p0 (∆t) merely cumulates the update. We perform the aforementioned procedure for all Zone-toZone pairs in Gzone . The overall algorithm of the proposed online process is summarized in Algorithm. 2. The online topology update step is necessary and useful for the following reasons: First, the pose of a camera can change due to vibration, heavy wind, and so on. Even a slight change in pose can cause a considerable viewpoint change, and it makes the initialized topology inaccurate. Second, people transition time between cameras can change temporarily due to many factors such as sidewalk conditions, weather, and unusual movement of crowd (e.g. parade, march). The online topology update can effectively handle the above issues. 7 TABLE II D ETAILS OF OUR NEW DATASET: SLP. Index # ID # frames # annotated box Resolution Duration Building B CAM 1 CAM 2 CAM 3 CAM 4 CAM 5 CAM 6 CAM 7 CAM 8 CAM 9 Total 256 661 1,175 243 817 324 516 711 641 2,632 19,545 65,518 104,639 41,824 78,917 79,974 93,978 53,621 42,347 580,363 47,870 205,003 310,262 65,732 307,156 160,367 78,259 176,406 117,087 1,468,142 720×480 1920×1080 1920×1080 1440×1080 1440×1080 1440×1080 1920×1080 1920×1080 1920×1080 – 2h 13m 2h 12m 2h 22m 2h 2h 21m 2h 2h 38m 2h 29m 2h 28m – 2 3 C4 1 4 C6 3 4 2 1 6 5 2 1 3 Building A C2 1 2 3 5 4 C1 1 C1 51 2 4 3 C5 C3 C7 Building C 3 4 C8 2 1 C9 C2 C3 C4 C5 C6 C7 C8 C9 2 3 1 Sidewalk 2 1 2 (a) Layout of a camera network (b) Example frames of nine cameras (CAM1 – CAM9) CAM 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 256 227 206 0 23 28 19 1 1 227 661 571 2 82 84 43 1 1 206 571 1175 98 568 90 168 57 56 0 2 98 243 155 0 37 16 16 23 82 568 155 817 61 109 55 54 28 84 90 0 61 324 0 0 0 19 43 168 37 109 0 516 281 269 1 1 57 16 55 0 281 711 633 1 1 56 16 54 0 269 633 641 (c) Numbers of true matching pairs Fig. 6. A new synchronized large-scale person re-identification dataset: SLP. Thanks to the accurate topology initialization (Sec. III-B) and the online procedure (Sec. III-C), the camera network topology can be maintained automatically with time. When a new camera is added to an existing camera network during the online stage, the camera network topology initialization operates in parallel and the topology is updated efficiently. IV. N EW P ERSON R E - IDENTIFICATION DATASET: SLP To validate the performance of person re-identification methods, numerous datasets have been published. Table. I shows a list of the public person re-identification datasets with their various characteristics, which have been constructed for specific scenarios. For example, VIPeR [33] was constructed by two cameras and contains 632 people. Each camera provides one single image for one person. On the contrary, Softbio [40] includes 150 people captured from eight cameras. In this dataset, each camera provides multiple images for a person (multi-shot). However, despite the availability of numerous published datasets, none of them reflect practical large-scale surveillance scenarios, in which (1) multiple observations (multi-shot) and moving paths (traj.) for each person from each camera are available, and (2) both the number of people (# IDs) and the cameras (# cam) is large. Most of the public datasets include a small number of people (# IDs < 200) [34]–[36], [38]–[40], [44] or cameras (# cam < 5) [14], [33]–[35], [37], [38], [41]–[44] as shown in Table. I. Some datasets provide just a single shot of each person [5], [33]. Moreover, many datasets do not provide the required annotation with information about people (traj.) such as their movement paths [32], [34]–[36], [38], [41], [42], [45], [46] but only give cropped multi-shot appearances. Furthermore, there are only two datasets that provide camera synchronization information or time stamps of all frames (sync) [43], [48]. Recently, M. Gou et al. [48] provided an re-identification dataset named DukeMTMC4ReID. The dataset covers real large-scale surveillance scenarios (e.g., synchronized cameras, large number of cameras and people). However, it does not give the trajectory of each person but only gives cropped multishot images. If the dataset provides additional information such as background and traj., it will be very helpful for other researchers and can be fully exploited. In this study, we provide a new Synchronized Large-scale Person re-identification dataset called SLP constructed for practical large-scale surveillance scenarios. The main characteristics of our dataset are as follows: • The number of people (# IDs): The total number • • • • of people in the dataset is 2,632. Among them, 1,737 people appear in at least two cameras. The details of the matching pairs are shown in Fig. 6 (c). The number of cameras (# cam): The dataset was captured from nine non-overlapping cameras. The layout of the camera network and the example frames from nine cameras are shown in Fig. 6 (a-b). Multiple appearances availability (multi-shot): SLP provides multiple appearances of each person. In this version, we do not provide the original image appearances but provide pre-computed feature descriptors due to legal restrictions. However, we expect that we will provide the original image appearances of people in the future. Scene background availability (background): SLP provides the scene background. Although it only contains the background of the camera scene, it contains scene structures such as buildings, ground plane, orthogonal lines etc., which are quite useful for understanding the scene. People trajectory availability (traj.): The ground truth tracking information of every person is available. It includes positions (x,y locations) and sizes (height, width) of people in entire image sequences. To annotate and generate people’s trajectories for all video sequences, we 2 TP 0 FP (a) 8 -2 used an annotation tool ‘VATIC’ [50]. The total number 0.5 0.6 is 1,468,142. 0.65 0.7 0.75 of0.55 annotated boxes • Camera synchronization (sync): Each camera is synchronized with a global timestamp. It provides all times2 tamps of video frames. • Camera calibration: Each camera is calibrated and camera parameters are given. 0 • Details of our dataset are summarized in Table II. As mentioned above, our new dataset enables us to test -2 person re-identification methods under practical large-scale 0.5surveillance 0.55 scenarios. 0.6 Compared 0.65 to previous 0.7 datasets, 0.75SLP not only provides competitive number of person IDs and cameras but also additional information such as full annotations, camera synchronization and camera parameters. In addition, SLP is also applicable to other computer vision tasks such as multi-object tracking, multi-camera activity recognition, and so on. It is available on online: https://sites.google.com/view/ yjcho/project-pages/re-id topology. 0.5 0.6 0.7 PRID2011 [19] TP FP 0.5 0.6 0.7 V. S ETTINGS AND M ETHODOLOGY A. Experimental Settings Since we mainly focus on person re-identification and camera topology inference problems, we assume that person detection and tracking results are given. Most person reidentification researches follow this assumption and setting. In order to evaluate each proposed method, we divided our dataset into two subsets according to time. The first subset contains 1-hour data starting from the global start time (AM 11:20). It is used in an initialization stage. The latter subset including the remaining data is utilized in an online test stage. In this study, every person image is resized to 128×48 pixels. We used the LOMO feature [51] to describe the appearances of people. It first divides the image into six horizontal stripes. Then it extracts an HSV color histogram and builds descriptors based on Scale Invariant Local Ternary Pattern (SILTP) from each stripe. The final descriptor from the 128×48 image has 26,960 dimensions. It is worthy to note that the proposed framework does not utilize pre-matched results between cameras. In general, many conventional person re-identification methods exploit the pre-matched pairs for learning distance metrics such as LMNN [12], ITML [2], KISSME [10] and Mahal [13]. The metric learning methods are effective but not appropriate for practical re-identification systems since the matched results are not given at first. On the other hand, the proposed framework runs fully automatically, providing the person detection/tracking results of each camera. B. Evaluation Methodology In general, many previous works plot a Cumulative Match Curve (CMC) [33] representing true match being found within the first n ranks for evaluating person re-identification performances. In practice, however, all ranks (2,3,...,n) except rank1 failed to find the correct correspondences. For this reason, rank-1 value is the most important one among all ranks and several studies mainly measure the rank-1 accuracy. In this occurrence 2 0.8 0.85 Similarity TP 0 FP 0.9 3DPeS -2 0.5 0.5 0.55 0.6 0.6 0.65 0.7 0.7 0.75 0.8 0.85 Similarity 2 TP 10 10 0 PRID2011 -2 0.55 0.6 0.6 0.65 0.7 0.7 0.75 Similarity 0.8 0.85 occurrence 15 5 5 00 00 00 00 0.9 Fig. 2 10 10 0.9 5 FP 0.5 0.5 15 5 0.2 0.4 0.6 0.8 conf 0.2 0.4 0.6 0.8 1 0.2 0.2 0.4 0.4 0.6 0.6 0.8 0.8 conf 1 (a) (b) Fig. 7. Observations for selecting reliable parameters Similarity 0.8 0.85 0.9 study, we measure the rank-1 accuracy by TP Tgt , where T P is the number of true matching results and Tgt is the total number of ground truth pairs in the camera network. The evaluation metric rank-1 accuracy reflects the overall re-identification performance of the camera network. To evaluate the accuracy of the camera network topology, we adopt two evaluation metrics: transition time error and topology distance. When an inferred transition distribution and a ground truth are given as  2 (p(∆t)∼N µ, σ 2 , pgt (∆t)∼N µgt , σgt ), the transition time error is simply measured as |µ − µgt |. We defined the topology distance as Bhattacharyya the distance that measures the difference two probability R between  distributions as p dB (p, pgt )= − ln p(∆t)pgt (∆t) d∆t . If there are multiple links in the camera network, we measure the evaluation metrics for all links and average them to get the final transition time error and topology distance. C. Parameters Selection We used fixed parameters for all steps in the Sec. III and applied the same parameters to all datasets SLP, NLPR MCT [43]. We found that the performance of our framework does not depend on each parameter. The parameters are fixed as follows: • θsim : To determine a proper θsim , we tested several other datasets (3DPeS [36], PRID [37]) and analyzed the results. Figure 7 (a) shows re-identification similarity scores of each dataset. Marks ◦, ∗ denote true and false positives. To estimate the accurate topology, we need to exclude false positives. Based on the test results, we strictly set θsim as 0.7 for selecting only true positives. • θconf : Figure 7 (b) shows a histogram of calculated connectivity confidences between nine cameras (36 pairs) in the CAM-to-CAM topology inference step. Weak connections are easily classified, since they have very low confidences (0 − 0.25). Based on this, we set θconf as 0.4 and fixed the value for topology inference steps and all datasets. • Initial T : We tested various T such as 300, 450, 600, which are sufficiently wide to find correspondences under unknown camera networks. We noticed that the results of topology inference are not significantly affected by T . We set the initial T as 600. * The proposed framework has only one parameter (T ) to be adjusted depending on the environments. However, T does not critically affect the performance of the proposed system. 9 TABLE III I NFERRED VALID Z ONE - TO -Z ONE LINKS AND GROUND - TRUTHS . Exit CAM1-ZONE1 CAM2-ZONE2 CAM3-ZONE2 CAM3-ZONE3 CAM4-ZONE4 CAM7-ZONE1 CAM8-ZONE1 Entry CAM2-ZONE5 CAM3-ZONE1 CAM5-ZONE6 CAM7-ZONE3 CAM5-ZONE2 CAM8-ZONE2 CAM9-ZONE2 PE-LARSCALE 600초 CAM µ 34.4 36.7 -0.42 4.8 30.2 28.2 11.6 µgt 34.7 36.3 -0.57 4.3 30.1 28.4 11.7 σ 6.25 8.03 3.49 4.8 13.4 21.3 4.82 PE-LARSCALE σgt 6.04 5.79 3.23 3.5 12.5 6.36 4.24 Exit CAM2-ZONE5 CAM3-ZONE1 CAM5-ZONE6 CAM7-ZONE3 CAM5-ZONE2 CAM8-ZONE2 CAM9-ZONE2 Entry CAM1-ZONE1 CAM2-ZONE2 CAM3-ZONE2 CAM3-ZONE3 CAM4-ZONE4 CAM7-ZONE1 CAM8-ZONE1 µ 40.4 37.6 0.70 3.75 39.5 31.9 10.5 µgt 40.4 37.0 1.59 4.68 28.6 30.0 10.5 σ 7.62 10.3 3.43 2.16 3.82 2.41 4.03 σgt 5.93 8.90 2.32 3.04 14.8 4.02 4.08 For all the camera pairs, we illustrate a color map of estimated CAM-to-CAM connectivity confidence in Fig. 8(a). 2 3 Each row and column indicates the index of the camera. When 4 5 5 the confidence value is greater than θconf , we regard the 5 2 8 5 2 8 6 corresponding camera pair as a valid link. As a result, the valid 7 8 camera links are drawn as Fig. 8(b). Each vertex indicates 3 6 6 1 6 1 9 9 9 the index of the camera and valid links are represented by (a)7Connectivity confidences (b) Ours (c) DNPR [28] edges. Unfortunately, CAM6 failed to be linked to CAM5. That Ours DNPR is MCT because the size of the person image patches is very small Fig. 8. Results of CAM-to-CAM connectivity check. (a) Connectivity due to the long distance from the camera. Therefore, it is confidence map. (b), (c) Valid camera links of two methods (solid line: true 8 link, dotted line: missing). hard to distinguish the appearances of people. In addition, 2 3 CAM6 is quite isolated from other cameras as we can see 9 125 0.8 125 0.8 500 0.8 500 0.8 500 0.8 500 0.8 500 0.8 500 0.8 125 0.8 125 125 0.8 0.8 500 0.80.8 125 0.8 500 0.8 125 0.8 0.8 125 125 0.8 0.8 500 500 0.8 from0.8the 125 0.8 0.8 125 0.8 125 125 0.8 125 matching pairs of CAM6 in the Fig. 6(c). Compared to 500 500 0.8 sec sec sec sec Accumulated time Accumulated timeComputational Accumulated time Accumulated time Accumulated time Accumulated time Accumulated time Accumulated time Accumulated time Accumulated time Accumulated Accumulated time Accumulated Accumulated time Computational time Computational time time Computational time Computational time Computational time Computational time Computational time Computational time Computational time 1 0.80.8 500 500 450 450 450 450 450 450 Computational time 450 450 Computational time 450 450 450 Accuracy Accuracy 0.7 0.7 0.7 0.7 0.7 Accuracy Accuracy 0.7 Accuracy Accuracy Accuracy Accuracy 0.7 Accuracy Accuracy 0.7 0.7 0.70.7 0.7 0.7 0.7 0.70.7 0.7 0.7 0.7 450 0.7 DNPR Accuracy 0.7 0.7 Accuracy Accuracy Accuracy Accuracy Accuracy Accuracy Accuracy Accuracy Accuracy Accuracy Accuracy 0.7 Accuracy Accuracy 0.7 [28], which also infers the CAM-to-CAM topology, our 0.7 0.7 Accuracy Accuracy Computational time Computational time 450 450 100 100 400 400 400 400 400 100 400 400 100 100 100 400 100 400 100 100 400 100 100 100 100 100 400 400 Accuracy Accuracy 0.70.7 Accuracy Accuracy 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 method provides more accurate results. Our proposed method 0.6 0.6 0.6 400 0.6 400 350 350 Accumulated time 350 350 Accumulated time 350 350 350 0.6 350 350 0.6 350 350 350 0.60.6 350 350 7575 300 300 300 300 300 300 75 300 300 75 7575 75 300 75 75 300 75 75 7575 75 300 300 0.5 0.5 an accuracy of 87.5%, finding 7 links out of 8. The 0.5 0.5 0.5 0.5 0.5 0.5 0.50.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 provides 0.50.5 0.5 0.5 0.50.5 300 300 250 250 250 250 250 250 250 250 250 250 250 250 0.50.5 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 DNPR 0.4 0.4 0.4 0.4 0.4 0.40.4 0.4 0.4200 0.4 0.4 0.4 0.4 0.40.4 [28] method provides an accuracy of 62.5%, finding 5 0.4 0.4 5050 250 250 200 200 50 200 50 5050 50 50 50 200 200 200 200 200 200 200 50 200 50 5050 50 0.40.4 200 200 150 150 links out of 8. 150 150 150 150 150 150 150 150 150 150 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.30.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.30.3 1 1 2 3 4 5 6 7 8 9 4 conf 1 1 1 4 0.9 0.9 3 7 4 3 7 0.8 0.8 0.8 0.7 0.7 0.6 0.6 0.6 0.5 0.5 0.4 0.4 0.4 0.3 0.3 0.2 0.1 0.1 100100 75 75 50 50 2525 150 150 100 100 100 100 100 100 100 100 100 100 100 100 0.2 0.2 0.20.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 100 100 50 50 5050505050 50 50 50 0.80.8 Accuracy of person re-identification Accuracy of person re-identification 400 400 erson son person rson 125125 Accuracy of person re-identification Accuracy of person re-identification 25 25 2525 25 25 25 25 25 2525 25 00 Accuracy of of person person re-identification re-identification Accuracy AccuracyComputational of person person re-identification Accuracy time Accuracy of of person re-identification re-identification Computational time AccuracyComputational of person re-identification time time Accuracy of person re-identification re-identification AccuracyComputational of person re-identification Computational time Computational time Computational time Accuracy of re-identification Accuracy of person person re-identification re-identification Computational time Accumulated computational time Accumulated Accumulated computational computational time time Accumulated computational time computational time time Accumulated computational Accumulated computational time computational time Accumulated computational time Accumulated computational time 0 Accumulated computational time Accumulated computational time 00 2 Accumulated computational time Accumulated computational time 1 0.2 0.2 0.70.7 0.60.6 0.50.5 0.40.4 0.30.3 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.20.2 0.3 0.3 0.20.2 0 0 0.1 0.1 00.1 0.1 00.1 0.1 0.1 00050 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.10.1 0.1 0.1 0 0 00050 0.10.1 00 000 0000000 0.1 0.1 0.1 0.1 CAM ZONE Iter3 Iter4 Iter5 CAM ZONEIter1 Iter1Iter2 Iter2 Iter3 Iter4 Iter5 Ours Exhaustive Ours Exhaustive CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 Iter5 CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 Iter5 CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 Ours Ours Base0.20.2 CAM CAM CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 CAM ZONE Iter1 Iter2 Iter3 Iter4 Iter5 Ours Base Ours Base Ours Base Base Ours Base Ours Base Ours Base Ours Base Ours Base Ours Base Ours Base 0 0 0.10.1 Ours Base Ours Base 0 0 0.10.1 25 25 (a) (b) CAMCAM ZONEZONE Iteration Iteration Iteration Iteration Iteration CAMCAM ZONEZONE Iteration 1 1Iteration 2 2Iteration 3 3Iteration 4 4Iteration 5 5 Fig. 9. Results of the person re-identification through the camera topology initialization. VI. E XPERIMENTAL R ESULTS A. Evaluations using Our Dataset: SLP 1) Camera Network Topology Initialization: As explained in Sec. III, we first inferred the CAM-to-CAM topology between all cameras. We then found the Zone-to-Zone topology and iteratively updated the topology for the topology initialization. During the topology initialization process, we evaluate both tasks: person re-identification and topology inference. CAM-to-CAM topology inference result In order to check the connectivity between two cameras, person re-identification can be carried out bi-directionally. However, for the sake of efficiency, we only used unidirectional re-identification results to check the connectivities between the cameras. To this end, we assigned a camera containing more people as a training camera (gallery) and a camera containing fewer people as a testing camera (query). That is because the problem of reidentifying a small set of people from a large set is easier than the opposite case. In addition, we can reduce the computational cost for checking the connectivity by half. 0.20.2 Camera topology initialization results 0.10.1 Figure 9 (a) represents the accuracy of person reidentification in each of the proposed initialization steps such as CAM-to-CAM, Zone-to-Zone, and iterative update steps (Sec. III-B1–III-B3). The accuracy of person re-identification is 28.54% at the beginning, but it is consistently improved by using inferred and refined camera topology information. As a result, our method reaches 62.55% accuracy at the last step of the topology initialization. In addition, it took only 112.46 seconds to conduct both person re-identification and camera topology inference tasks with a large number of people in the nine cameras (using Intel i7 CPU in MATLAB). Figure 10 shows the connectivity confidences between the linked camera pairs. The connections become stronger during the iterations. In the final iteration, most connections demonstrate a high connectivity confidence (conf (p (∆t)) > 0.7). On the other hand, a connection from Exit (CAM4-Zone4) to Entry (CAM5-Zone2) is not a strong connection, since a small number of people moved from CAM4 to CAM5 during the topology initialization period (AM 11:20 – PM 12:20). Figure 9 (b) shows the comparison of our proposed approach with a conventional approach called an Exhaustive approach, which fully compares the multiple appearances of people and exhaustively searches the correspondences of people between the entry/exit zones without using camera topology information. For the baseline of the exhaustive method, we used a LOMO feature [51] descriptor. It shows a low performance (52.06% person re-id accuracy) compared 10 C6 3 4 2 1 6 5 2 1 3 C2 C1 1 5 2 0.9 0.8 0.8 4 2 1 6 5 2 1 3 0.6 0.6 0.5 0.4 0.4 0.3 0.2 0.2 0.1 2 3 1 C2 C1 2 1 1 1 5 2 C9 2 3 1 3 4 4 2 1 6 5 2 1 3 C8 3 4 2 1 0 1 C2 C1 2 1 1 2 51 2 4 3 3 C5 C3 C7 0 C9 C6 2 3 C4 1 4 51 2 4 3 3 0.7 C8 3 4 2 1 3 4 1 C5 C3 C7 C6 2 3 C4 1 4 1 51 2 4 3 Confidence 2 3 C4 1 4 5 C5 C3 C7 3 4 2 1 2 3 4 C8 C9 2 3 1 2 1 1 2 2 (a) Initial (b) Iteration 1 (c) Iteration 5 Fig. 10. The iterative update of connectivity confidences. The connectivity of each link has strengthened during the iterations. (best viewed in color). TABLE IV P ERFORMANCE COMPARISON WITH OTHER METHODS IN OFFLINE INITIALIZATION STAGE Makris’s [4] 49.4 28.52 0.07 0.06 DNPR [28] 40.9 – Cai’s [27] 47.0 4.84 LOMO [51] – Exhaustive 52.1 11.76 0.25 1 1 1 0.2 0.8 0.8 0.8 0.15 0.6 0.6 0.6 Ours 62.5 1.21 0.05 0.04 0.03 0.4 0.1 0.4 0.4 0.02 0 0 0 20 20 40 40 60 60 80 80 0 100 100 0.08 0 0 20 20 40 40 60 60 80 80 0 100 100 0.3 0.04 0.2 0.02 0.1 0 0 20 20 40 40 60 60 80 80 0 100 100 0.2 0.2 0 0 20 20 40 40 60 60 80 80 0 100 100 0 0 20 20 40 40 60 60 x 80 80 100 0 100 1 1 1 0.8 0.8 0.8 0.6 0.4 0.06 0 0.2 0.05 0.01 CAM8 – ZONE 1 ↓ CAM9 – ZONE 2 Chen’s [25] 50.5 16.29 y CAM3 – ZONE 3 ↓ CAM7 – ZONE 3 Nui’s [23] 50.0 23.94 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0 0 0 20 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 40 60 80 100 y nal version - connection Performances \ Methods Rank-1 accuracy (%) Transition time error (sec) 0 0 20 20 40 40 60 60 80 80 100 100 0.2 0 0 20 20 40 40 60 60 80 80 100 100 0.2 0 0 20 20 40 40 60 60 x 80 80 100 0 100 2.5 1 1 2 0.8 0.8 1.5 0.6 0.6 0 20 40 60 80 100 0.8 0.15 0.6 0.1 y CAM8 – ZONE 2 ↓ CAM7 – ZONE 1 0.4 0.05 al version – no connection 0 0.2 0 0 20 20 40 40 60 60 80 80 100 0 100 0 0 (a) Makris et al. [4] 80 80 0 100 100 0 0 (b) Nui et al. [23] 20 20 40 40 60 60 80 80 0 100 100 0.4 0.2 0 0 20 20 (c) Chen et al. [25] 40 40 60 60 x 80 80 100 0 100 0 (d) Ours 1 1 0.08 0.8 0.8 0.06 0.6 0.6 0.06 0.06 0.05 0.05 0.04 0.04 0.03 0.03 0.04 0.4 0.02 0.02 0.02 0.2 20 40 60 80 100 (e) Ground truth 0.1 0.07 0 0.01 0 0 20 20 40 40 60 60 80 80 100 0 100 0.07 0.07 0.06 0.06 0 0 20 20 40 40 60 60 80 80 100 100 0 0 0 20 20 40 40 60 60 80 80 0 100 100 0.4 0.2 0 0 20 20 40 40 60 60 x 80 80 100 0 100 0.1 1 1 0.08 0.8 0.8 0.05 0.04 0.04 0.06 0.6 0.6 0.03 0.03 0.04 0.4 0.4 0.02 0.02 0.01 0.01 0.02 0.2 0 20 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 40 60 80 100 y 0.05 0 0 0 20 20 40 40 60 60 80 80 100 100 0 0.07 0.07 0.06 0.06 0.05 0.05 0.04 0.04 0.03 0.03 0.02 0.02 0.01 0 0 0 20 20 40 40 60 60 80 80 100 100 0 0 0 20 20 40 40 60 60 80 80 0 100 100 0.2 0 0 20 20 4040 x 6060 8080 100 100 0 0.1 1 1 0.08 0.8 0.8 0.06 0.6 0.6 0 20 40 60 80 100 y CAM7 – ZONE 4 ↓ CAM8 – ZONE 3 60 60 0.2 0.07 0.01 CAM4 – ZONE 1 ↓ CAM5 – ZONE 2 40 40 0.4 y CAM3 – ZONE 1 ↓ CAM7 – ZONE 2 20 20 1 0.5 0.04 0.4 0.02 0.2 0.01 0 0 20 20 40 40 60 60 (f) Makris et al. [4] 80 80 100 100 0 0 0 20 20 40 40 60 60 80 80 (g) Nui et al. [23] 100 100 0 0 0 20 20 40 40 60 60 80 80 (h) Chen et al. [25] 100 100 0 0.4 0.2 0 0 20 20 40 40 60 60 x (i) Ours 80 80 100 100 0 0 20 40 60 80 100 (j) Ground truth Fig. 11. Comparison of inferred transition distributions and ground truth. First three rows are valid links (a-e) and last three rows are invalid links (f-j). to the proposed method. Moreover, it takes a much longer time (337.27 seconds) than our proposed method. shown in Fig. 11 (a-c,f-h). On the other hand, our results are very similar to the ground truth (Fig. 11 (d,e,i,j)). A list of valid Zone-to-Zone links inferred by the proposed methods is summarized in Table. III. Note that the pair of Exit (CAM3-ZONE2) – Entry (CAM5-ZONE6) has the negative value of the transition time because these zones are overlapped.The overall results are close to the ground-truth 2 N µgt , σgt . We expect that the inferred transition distributions of valid links show Gaussian-like distributions and those of invalid links show uniform or arbitrary distributions. However, the previous methods [4], [23], [25] showed unclear and noisy distributions for both valid and invalid links as In Table. IV, we compared several methods in terms of re-identification and topology accuracies. To ensure a fair comparison of the previous methods with our method, we applied the same baseline (e.g. feature descriptor, parameters, experimental settings) to the previous methods except topology inference methods. The inferred topologies of previous methods [4], [23], [25] are used for person re-identification tasks by following the method in [5]. Note that we cannot estimate the transition time error of DNPR [28] since the method only infers CAM-to-CAM connections. As we can 11 see, our method shows superior performances for both reidentification and topology inference than other methods. 2) Online Person Re-identification Results: Based on the inferred camera topology in the initialization stage, we conducted online person re-identification and compared it with two different approaches. The first approach estimates the camera topology based on Exhaustive search in the offline initialization stage and uses the inferred topology for the online re-identification test. Note that this approach exploits the inferred topology but still fully compares multiple appearances of people to find correspondences in the online test stage. The second approach based on True matching estimates the camera topology using ground truth re-identification pairs in the offline initialization stage and performs the online reidentification test in the same way as our method. As shown in Table V, the performance of our online reidentification test is comparable to that of True matching. Our method also outperforms Exhaustive search in terms of both re-identification accuracy and topology distance. Thanks to the online topology update in the online re-identification test stage, the topology distance of our method decreased during the online test stage (0.076 → 0.023). As we can see in the table, our method with the online topology update (i.e., ours) performs better than our method without online topology update (i.e., Ours– no update) in terms of both reidentification accuracy and topology distance in the online test stage. It demonstrates that our online topology update and re-identification methods are effective and complement each other. B. Evaluations using Public Dataset: NLPR MCT In order to validate the proposed method using public datasets, we tested the proposed method using the NLPR MCT [43] dataset. The dataset contains four subsets with different non-overlapping multi-camera networks and different numbers of people. Among them, we used two datasets (i.e., DATA1, DATA2) containing larger numbers of people than others (the number of people – DATA1: 235, DATA2: 255, DATA3: 14, DATA4: 49). DATA1 and DATA2 have the same layout and camera field of views as shown in Fig. 12 (a, b-d). Duration of each dataset is 20 minutes. Since the datasets are not large-scale datasets (the number of people is small), we used whole videos (20min) for our proposed camera network topology initialization method and did not perform the online person re-identification. CAM-to-CAM topology inference Based on our proposed method, we inferred the CAM-toCAM topologies of both datasets (DATA1, 2). We found strong connections between CAM1 and CAM2 in both datasets. Unfortunately, we could not find the connections from CAM2 to CAM3 in both datasets, although there is a uni-directional link from Exit (CAM2-Zone2) to Entry (CAM3-Zone2) because of the severe illumination difference (indoor and outdoor) and different radiometric parameters between the two cameras. In this case, person re-identification methods based on matching should handle these photometric issues, which is 1 2 C1 Sidewalk 1 2 C2 Building C3 2 3 Lawn 1 (a) A layout of the dataset (b) CAM1 (c) CAM2 (d) CAM3 Fig. 12. A public multi-camera person re-identification dataset: NLPR MCT [43] beyond the scope of this study. In this case, even the exhaustive search approaches failed to find the connection between CAM2 and CAM3 because of the same reasons. We expect that by adopting some color correction methods such as [25] before re-identification or exploiting illumination invariant feature descriptors for re-identification, we can find the connection between CAM2 and CAM3. We will try this in future studies. Camera topology initialization results After the CAM-to-CAM topology inference, we infer the topology of entry and exit zones. We found two valid links between CAM1 and CAM2 in both the datasets. The first link is Exit (CAM1-Zone2) – Entry (CAM2-Zone1) and the second link is Exit (CAM2-Zone1) – Entry (CAM1-Zone2). Through this step, invalid pairs of cameras and zones are detected and ignored. In the next step, we iteratively update the valid links between zones and build a final camera topology map of the camera network. After evaluating the Zone-to-Zone topology inference, we iteratively update the valid links between zones. In the case of NLPR MCT dataset [43], valid Zone-to-Zone links converged within the second iteration. Table VI shows the person re-identification accuracy according to each proposed topology initialization step. Our method shows a superior reidentification performances: 93.2% and 91.5%, for the camera pair CAM1-CAM2. We compared our method to several previous topology inference methods [4], [23], [25]. The previous methods showed unclear and noisy transition distributions as shown in Fig. 13 (a-c). Even though the transition distribution inferred by Chen’s method [25] shows a peak of the distribution, the overall distribution is too noisy to utilize. On the other hand, our result is very close to the ground truth and shows a very clear distribution as shown in Fig. 13 (d,e). VII. D ISCUSSIONS The proposed unified framework can infer camera network topology while it performs person re-identification. In this study, we assume that the transition distribution between the two links follows a single-mode Gaussian model since the 12 TABLE V P ERFORMANCE COMPARISON IN ONLINE TEST STAGE . Offline initialization stage Rank-1 accuracy Topology dist 52.1% 5.620 D2 c1z2 –c2z1 c2z1 D2D2 c1z2 – –c2z1 c1z2 method1 method1 method1 0.076 100% 0 0.1 0.04 0.040.04 0.2 0.2 0.2 0.05 0.050.05 0 0 0 0.1 0.1 0.1 2020 60 608080 80 80100 100100 20 40 2020 40 8080 100 40404040 6060 6060 100 100 0 00 00 20 0 0 0 (a) Makris et al. [4] 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 2020 4040 x 6060 8080 100 100 6060 8080 100 100 0.1 0 0 2020 80 80 100 100 0 20 40 2020 40 60 60 80 80 100 40404040 6060 100 60608080 100 0 0 0 20 100 0 0 0 0 0 0 (b) Nui et al. [23] c2z1 D2D2 c2z1 – –c1z2 D2 c2z1 –c1z2 c1z2 4040 y 0.3 0.3 0.3 20 60 60 8080 80 80100 100100 20 40 2020 40 8080 100 4040 6060 100 20 4040 6060 100 0 0000 20 2020 0.7 0.4 0.4 0.4 0.15 0.150.15 0.02 0.020.02 0 method3 method3 method3 0.1 0.10.1 0 0.2 0.5 0.5 0.5 0.06 0.060.06 0 0.4 0 0.2 0.20.2 0.08 0.080.08 0.5 0.3 62.5% method2 method2 method2 0.1 0.10.1 0.6 y LOMO [51] – Exhaustive Ours – no update Ours True matching Online test stage Rank-1 accuracy Topology dist 65.6% 0.046 72.3% 0.093 74.8% 0.023 0 75.6% 0.011 2020 (c) Chen et al. [25] 4040 x 6060 8080 100 100 0 00 (d) Ours (e) Ground truth 0.7 Fig. 13. Comparison of inferred transition distributions and ground truth (DATA2 - Exit: CAM1-ZONE2 , Entry: CAM2-ZONE1). 0.150.15 0.15 0.080.08 0.08 0.060.06 0.06 0.1 0.1 0.1 0.6 0.080.080.08 0.5 0.4 0.1 0.10.1 0.060.060.06 0.3 0.040.04 0.04 0.040.040.04 TABLE VI 0.020.02 0.02 0 0.2 Computational time 0.050.05 0.05 0.1 0.020.020.02 R ANK -1 ACCURACIES AT DIFFERENT STAGES OF CAMERA TOPOLOGY 100 100 100 0 0 0 202020 404040 606060 808080 100 0 0 0 202020 404040 606060 808080 100 0 0 0 202020 404040 606060 808080 100 100 100 100 INITIALIZATION . 0 0 0 0 0 20 20 20 40 40 40 60 60 60 80 80 80 100100100 DATA1 (CAM1 - CAM2) DATA2 (CAM1 - CAM2) 0 0 0 0 0 0 20 20 20 40 40 40 60 60 60 80 80 80 100100100 0 0 0 0 0 0 20 20 20 40 40 40 CAM-to-CAM Zone-to-Zone Iteration 1 72.6% 76.7% 93.2% 69.8% 70.8% 91.5% model works well in most cases. In general, most previous study [4], [23] also follow the same assumption. Although it works well in most cases, it may fail in more complex situations, e.g., multiple paths between two zones. We will consider this issue in further studies. VIII. C ONCLUSIONS In this study, we proposed a unified framework to automatically solve both person re-identification and camera network topology inference problems. In addition, to validate the performance of person re-identification in the practical large-scale surveillance scenarios, we provided a new person re-identification dataset called SLP. We qualitatively and quantitatively evaluated and compared the performance of the proposed framework with state-of-the-art methods using public and our own datasets. The results show that the proposed framework is promising for both person re-identification and camera topology inference and superior to other frameworks in terms of both speed and accuracy. A PPENDIX As we mentioned in the paper, the traditional exhaustive reidentification approaches examine every person pair between two different cameras (cA , cB ). Assuming that the numbers of objects in cA and cB are the same as N and each object contains the same number of appearances as K, it is obvious that the exhaustive approaches need (N 2 K 2 ) time for appearance comparisons for re-identification. Using the BigO notation, the computational complexity of the exhaustive  approach is defined as O N 2 K 2 . On the other hand, in the proposed method, the tree structure of the random forest method makes the multi-shot person reidentification very fast. In return, the random forest containing 60 60 60 80 80 80 2 Total time 0 100100 100 00 2020 4040 6060 8080 (sec) 100 100 1.5 1 0.5 0 100 200 300 400 The number of person Fig. 14. Computation time of the proposed method based on the number of people in each camera We fixed the number of appearances of each person used for multi-shot matching (K = 30). The computation time includes random forest training and testing time. multiple decision trees needs training time. If we denote the number of decision trees and the random forest training time as M and T respectively, we need (M N K log N ) time for the appearance comparisons and T for forest training. Here, note that the number of decision trees is a constant value. We fixed it as 10 in our experiments. Therefore, we can ignore the number of the decision trees M in the Big-O notation since M  N, K. In addition, the random forest training time in the training stage can be also be ignored because the training time T linearly increases when the number of cameras in a camera network increases whereas the test time exponentially increases when the number of cameras increases. Actually, the computational complexity of the test stage is proportional to the number of possible camera pairs: L C2 , where L is the number of cameras in a camera network. For that reason, the training time T can be ignored when the camera network is large. As a result, the complexity of proposed method is approximated as O (N K log N ). Fig. 14 shows the computation time according to the number of people in each camera in the two-camera re-identification case. As we can see, the computation time of the proposed method increases linearly, not exponentially, as the number of people increases. 13 R EFERENCES [1] M. Farenzena, L. Bazzani, A. Perina, V. Murino, and M. Cristani, “Person re-identification by symmetry-driven accumulation of local features,” in IEEE Conference on Computer Vision and Pattern Recognition, 2010. [2] J. V. Davis, B. Kulis, P. Jain, S. Sra, and I. S. Dhillon, “Informationtheoretic metric learning,” in IEEE International Conference on Machine Learning, 2007. [3] E. Ahmed, M. Jones, and T. K. Marks, “An improved deep learning architecture for person re-identification,” Differences, 2015. [4] D. Makris, T. Ellis, and J. Black, “Bridging the gaps between cameras,” in IEEE Conference on Computer Vision and Pattern Recognition, 2004. [5] C. C. Loy, T. Xiang, and S. Gong, “Time-delayed correlation analysis for multi-camera activity understanding,” International Journal of Computer Vision, 2010. [6] Y.-J. Cho, J.-H. Park, S.-A. Kim, K. Lee, and K.-J. Yoon, “Unified framework for automated person re-identification and camera network topology inference in camera networks,” arXiv preprint arXiv:1704.07085, 2017. [7] A. Bedagkar-Gala and S. K. Shah, “A survey of approaches and trends in person re-identification,” Image and Vision Computing, 2014. [8] C. Liu, S. Gong, C. C. Loy, and X. Lin, “Person re-identi-fication: What features are important?” in European Conference on Computer Vision, 2012. [9] R. Zhao, W. Ouyang, and X. Wang, “Learning mid-level filters for person re-identification,” in IEEE Conference on Computer Vision and Pattern Recognition, 2014. [10] M. Koestinger, M. Hirzer, P. Wohlhart, P. M. Roth, and H. Bischof, “Large scale metric learning from equivalence constraints,” in IEEE Conference on Computer Vision and Pattern Recognition, 2012. [11] M. Dikmen, E. Akbas, T. S. Huang, and N. Ahuja, “Pedestrian recognition with a learned metric,” in Asian Conference on Computer Vision, 2011. [12] K. Q. Weinberger, J. Blitzer, and L. K. Saul, “Distance metric learning for large margin nearest neighbor classification,” in Advances in Neural Information Processing Systems, 2005. [13] P. M. Roth, M. Hirzer, M. Köstinger, C. Beleznai, and H. Bischof, “Mahalanobis distance learning for person re-identification,” in Person Re-Identification, 2014. [14] T. Wang, S. Gong, X. Zhu, and S. Wang, “Person re-identification by video ranking,” in European Conference on Computer Vision, 2014. [15] Y. Li, Z. Wu, and R. J. Radke, “Multi-shot re-identification with random-projection-based random forests,” in IEEE Winter Conference on Applications of Computer Vision, 2015. [16] D. Yi, Z. Lei, S. Liao, and S. Z. Li, “Deep metric learning for person re-identification,” in IEEE International Conference on Pattern Recognition, 2014. [17] S. Bak, F. Martins, and F. Bremond, “Person re-identification by pose priors,” in IS&T/SPIE Electronic Imaging, 2015. [18] Z. Wu, Y. Li, and R. J. Radke, “Viewpoint invariant human reidentification in camera networks using pose priors and subjectdiscriminative features,” 2015. [19] Y.-J. Cho and K.-J. Yoon, “Improving person re-identification via poseaware multi-shot matching,” in IEEE Conference on Computer Vision and Pattern Recognition, 2016. [20] O. Javed, Z. Rasheed, K. Shafique, and M. Shah, “Tracking across multiple cameras with disjoint views,” IEEE International Conference on Computer Vision, 2003. [21] Y. Cai and G. Medioni, “Exploring context information for inter-camera multiple target tracking,” in IEEE Winter Conference on Applications of Computer Vision, 2014. [22] A. Rahimi, B. Dunagan, and T. Darrell, “Simultaneous calibration and tracking with a network of non-overlapping sensors,” in IEEE Conference on Computer Vision and Pattern Recognition, 2004. [23] C. Niu and E. Grimson, “Recovering non-overlapping network topology using far-field vehicle tracking data,” in IEEE International Conference on Pattern Recognition, 2006. [24] C. Stauffer, “Learning to track objects through unobserved regions,” 2005. [25] X. Chen, K. Huang, and T. Tan, “Object tracking across non-overlapping views by learning inter-camera transfer models,” Pattern Recognition, 2014. [26] C. C. Loy, T. Xiang, and S. Gong, “Incremental activity modeling in multiple disjoint cameras,” 2012. [27] Y. Cai, K. Huang, T. Tan, and M. Pietikainen, “Recovering the topology of multiple cameras by finding continuous paths in a trellis,” in IEEE International Conference on Pattern Recognition, 2010. [28] N. Martinel, G. L. Foresti, and C. Micheloni, “Person reidentification in a distributed camera network framework,” IEEE transactions on cybernetics, 2016. [29] L. Breiman, “Random forests,” Machine learning, 2001. [30] S. H. Han, K. J. Yoon, and I. S. Kweon, “A new technique for shot detection and key frames selection in histogram space,” 2000. [31] D. Makris and T. Ellis, “Automatic learning of an activity-based semantic scene model.” in IEEE Advanced Video and Signal Based Surveillance, 2003. [32] S. Karanam, M. Gou, Z. Wu, A. Rates-Borras, O. Camps, and R. J. Radke, “A comprehensive evaluation and benchmark for person reidentification: Features, metrics, and datasets,” arXiv:1605.09653, 2016. [33] D. Gray, S. Brennan, and H. Tao, “Evaluating appearance models for recognition, reacquisition, and tracking,” in IEEE International Workshop on Performance Evaluation for Tracking and Surveillance, 2007. [34] W.-S. Zheng, S. Gong, and T. Xiang, “Associating groups of people,” in British Machine Vision Conference, 2009. [35] D. S. Cheng, M. Cristani, M. Stoppa, L. Bazzani, and V. Murino, “Custom pictorial structures for re-identification,” in British Machine Vision Conference, 2011. [36] D. Baltieri, R. Vezzani, and R. Cucchiara, “3dpes: 3d people dataset for surveillance and forensics,” in Proceedings of the 2011 joint ACM workshop on Human gesture and behavior understanding, 2011. [37] M. Hirzer, C. Beleznai, P. M. Roth, and H. Bischof, “Person reidentification by descriptive and discriminative classification,” in IEEE Scandinavian conference on Image analysis, 2011. [38] S. Wang, M. Lewandowski, J. Annesley, and J. Orwell, “Reidentification of pedestrians with variable occlusion and scale,” in IEEE International Conference on Computer Vision Workshops, 2011. [39] N. Martinel and C. Micheloni, “Re-identify people in wide area camera network,” in IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2012. [40] A. Bialkowski, S. Denman, S. Sridharan, C. Fookes, and P. Lucey, “A database for person re-identification in multi-camera surveillance networks,” in IEEE Digital Image Computing: Techniques and Applications, 2012. [41] W. Li and X. Wang, “Locally aligned feature transforms across views,” in IEEE Conference on Computer Vision and Pattern Recognition, 2013. [42] W. Li, R. Zhao, T. Xiao, and X. Wang, “Deepreid: Deep filter pairing neural network for person re-identification,” in IEEE Conference on Computer Vision and Pattern Recognition, 2014. [43] W. Chen, L. Cao, X. Chen, and K. Huang, “An equalised global graphical model-based approach for multi-camera object tracking,” arXiv:1502.03532, 2015. [44] A. Das, A. Chakraborty, and A. K. Roy-Chowdhury, “Consistent reidentification in a camera network,” in European Conference on Computer Vision, 2014. [45] L. Zheng, L. Shen, L. Tian, S. Wang, J. Wang, and Q. Tian, “Scalable person re-identification: A benchmark,” in IEEE International Conference on Computer Vision, 2015. [46] L. Zheng, H. Zhang, S. Sun, M. Chandraker, and Q. Tian, “Person reidentification in the wild,” arXiv preprint arXiv:1604.02531, 2016. [47] L. Zheng, Z. Bie, Y. Sun, J. Wang, C. Su, S. Wang, and Q. Tian, “Mars: A video benchmark for large-scale person re-identification,” in European Conference on Computer Vision, 2016. [48] M. Gou, S. Karanam, W. Liu, O. Camps, and R. J. Radke, “Dukemtmc4reid: A large-scale multi-camera person re-identification dataset,” in IEEE Conference on Computer Vision and Pattern Recognition Workshops, July 2017. [49] E. Ristani, F. Solera, R. Zou, R. Cucchiara, and C. Tomasi, “Performance measures and a data set for multi-target, multi-camera tracking,” in European Conference on Computer Vision Workshops on Benchmarking Multi-Target Tracking, 2016. [50] C. Vondrick, D. Patterson, and D. Ramanan, “Efficiently scaling up crowdsourced video annotation,” International Journal of Computer Vision. [51] S. Liao, Y. Hu, X. Zhu, and S. Z. Li, “Person re-identification by local maximal occurrence representation and metric learning,” in IEEE Conference on Computer Vision and Pattern Recognition, 2015. 14 PLACE PHOTO HERE Yeong-Jun Cho received the B.S. degree in information and communication engineering from Korea Aerospace University and the M.S. degree in information and communications from Gwangju Institute of Science and Technology (GIST), in 2012 and 2014, respectively. He is currently pursuing the ph.D. degree as a member of the Computer Vision Laboratory in GIST. His research interests include computer vision topics such as person reidentification, multi-object tracking, object detection and medical image analysis. estimation, and Su-A Kim received the B.S. degree from the Department of Electronic and IT Media Engineering from Seoul National University of Science and Technology in 2013 and the M.S. degree in School of Information and Communications from Gwangju Institute of Science and Technology (GIST) in 2015. She is currently a scientific researcher at Intel Visual Computing Institute and pursuing the Ph.D. degree in Saarland University. Her research interests include key research topics in computer vision such as person re-identification, 3D object detection and pose 4D light field segmentation. PLACE PHOTO HERE Jae-Han Park received the B.S. degree in electrical engineering and computer science from Gwangju Institute of Science and Technology (GIST) in 2015. He is currently pursuing M.S degree as a member of Computer Vision Laboratory in GIST. His research interests include person re-identification, video summarization and age estimation using deep learning. PLACE PHOTO HERE PLACE PHOTO HERE Kyuewang Lee received the B.S. degree in Electrical Engineering and Computer Science from Gwangju Institute of Science and Technology (GIST) in 2016. He is currently pursuing the integrated M.S./Ph.D. degree as a member of the Perception and Intelligence Laboratory in Seoul National University. His research interests include key research topics in computer vision, such as visual object tracking, multi-object tracking, and person reidentification. Kuk-Jin Yoon received the B.S., M.S., and Ph.D. degrees in Electrical Engineering and Computer Science from Korea Advanced Institute of Science and Technology (KAIST) in 1998, 2000, 2006, PLACE respectively. He was a post-doctoral fellow in the PHOTO PERCEPTION team in INRIAGrenoble, France, for HERE two years from 2006 and 2008 and joined the School of Information and Communications in Gwangju Institute of Science and Technology (GIST), Korea, as an assistant professor in 2008. He is currently an associate professor and a director of the Computer Vision Laboratory in GIST.
1cs.CV
Ref: AAAI Conference on Artificial Intelligence, pages 2839–2845, Quebec City, Canada, July 2014. A Generalized Genetic Algorithm-Based Solver for Very Large Jigsaw Puzzles of Complex Types Dror Sholomon and Eli (Omid) David∗ and Nathan S. Netanyahu† arXiv:1711.06768v1 [cs.CV] 17 Nov 2017 Department of Computer Science Bar-Ilan University Ramat-Gan 52900, Israel [email protected], [email protected], [email protected] Abstract In this paper we introduce new types of square-piece jigsaw puzzles, where in addition to the unknown location and orientation of each piece, a piece might also need to be flipped. These puzzles, which are associated with a number of real world problems, are considerably harder, from a computational standpoint. Specifically, we present a novel generalized genetic algorithm (GA)based solver that can handle puzzle pieces of unknown location and orientation (Type 2 puzzles) and (twosided) puzzle pieces of unknown location, orientation, and face (Type 4 puzzles). To the best of our knowledge, our solver provides a new state-of-the-art, solving previously attempted puzzles faster and far more accurately, handling puzzle sizes that have never been attempted before, and assembling the newly introduced two-sided puzzles automatically and effectively. This paper also presents, among other results, the most extensive set of experimental results, compiled as of yet, on Type 2 puzzles. Introduction Jigsaw puzzles are a popular form of entertainment, first produced around 1760 by John Spilsbury, a Londonian engraver and mapmaker. Given n different non-overlapping pieces of an image, the player has to reconstruct the original image, taking advantage of both the shape and chromatic information of each piece. Despite the popularity and vast distribution of jigsaw puzzles, their assembly is not trivial, from a computational standpoint, as this problem was proven to be NP-hard (Altman 1989; Demaine and Demaine 2007). Nevertheless, a computerized jigsaw solver may have applications in many real-world problems, arising in various domains such as archeology (Koller and Levoy 2006; Brown et al. 2008), biology (Marande and Burger 2007), chemistry (Wang 2000), literature (Morton and Levison 1968), speech descrambling (Zhao et al. 2007), art restoration (Fornasier and Toniolo 2005), image editing (Cho et al. 2008), and the recovery of shredded documents or photographs (Justino, Oliveira, and Freitas 2006; Marques and ∗ www.elidavid.com Nathan Netanyahu is also with the Center for Automation Research, University of Maryland, College Park, MD 20742 (e-mail: [email protected]). † Freitas 2009; Cao, Liu, and Yan 2010; Deever and Gallagher 2012). Besides, as noted in (Goldberg, Malon, and Bern 2004), pursuing this topic may be justified solely due to its intriguing nature. The first to tackle the jigsaw problem, computationally, were Freeman and Garder (1964). Their solver handles up to 9-piece puzzles, using only piece shape information. Kosiba et al. (1994) were the first to facilitate the use of image content by their solver. Subsequent research turned to colorbased square-piece puzzles, instead of the earlier shapebased variants. Cho et al. (2010) presented a probabilistic puzzle solver that can handle up to 432 pieces, given some a priori knowledge of the puzzle (e.g., anchor pieces). Their results were further improved by (Yang, Adluru, and Latecki 2011), who presented a so-called particle filter-based solver and by (Pomeranz, Shemesh, and Ben-Shahar 2011), who made a major contribution to the field by introducing a fully automated jigsaw puzzle solver that handles puzzles of up to 3,000 (square) pieces, without any prior knowledge about the image. The latter solver treats puzzles with unknown piece location but assumes a known orientation. Gallagher (2012) was the first to handle puzzles with unknown piece location and orientation (Type 2 puzzles), where each piece might need to be translated and rotated (by 0, 90, 180, or 270 degrees). This solver was tested on 432- and 1,064piece puzzles and a single 9,600-piece image. More recently, a solver based on genetic algorithms (GA) (Holland 1975), which can handle up to 22,755-piece puzzles, was presented by(Sholomon, David, and Netanyahu 2013). Although capable of solving considerably larger puzzles, their solver is restricted to known piece orientations (i.e., Type 1 puzzles). In its most basic form, every puzzle solver requires an evaluation function for the compatibility of adjacent pieces and a tiling strategy for placing the pieces as accurately as possible. Recent tiling strategies tend to be greedy and thus are subject to the familiar disadvantages of greedy methods, i.e., they are more likely to be affected by local optima. While (Sholomon, David, and Netanyahu 2013) successfully employed a GA-based solver for Type 1 puzzles (unknown piece location only), the question remains whether GAbased solvers could be applied to more challenging types, namely Type 2 puzzles (unknown piece location and orientation) and Type 4 puzzles (two-sided pieces of unknown location and orientation). In this paper, we continue in the same vein of employing genetic algorithms as a strategy for piece placement. We describe a detailed GA scheme for a solver capable of handling both Type 1 and Type 2 puzzles more than twice as large as puzzle sizes that have been attempted before, and present extensive empirical results which demonstrate the efficiency of the presented method in terms of speed and accuracy. We further advance the state-of-the-art with respect to the jigsaw puzzle problem by extending our solver to handle also two-sided puzzles (Type 4 puzzles), i.e., puzzles where the correct face of each piece is also unknown (adding another degree of freedom to each piece). Thus, the solver has to find the correct location for each piece, its correct orientation (out of four possible angles), and its correct face (out of two possible ones). This type of puzzle, which is representative of various real-world applications, is considerably more complex. We present an extensive set of empirical results for all available datasets, establishing the effectiveness of our solver in handling different images of different sizes. Puzzle Types The first discussion on different puzzle types appears in (Gallagher 2012). In all types, n different non-overlapping square pieces of an image are given and there exists a unique tiling (arrangement) which is considered correct. Type 1 is the most common variant handled; it refers to puzzles with only piece location unknown. In Type 2 puzzles, a piece orientation is also unknown, allowing each piece to be rotated by 0, 90, 180 or 270 degrees. As noted by (Gallagher 2012), this puzzle type increases the complexity in several ways. First, a pair of pieces can fit together in any of 16 possible configurations, multiplying the number of possible solutions by 4n in comparison to Type 1 puzzles. Second, an algorithmic solver must consider both translations and rotations. Third, the puzzle reconstruction should be considered in both landscape and portrait orientations. Type 3 puzzles, consisting of pieces with known location and unknown orientation, are listed only for the sake of completeness. We define here Type 4 puzzles, i.e., two-sided puzzles of two images, where each piece face belongs to one of the images. The solver has to determine the correct location of each piece, its correct orientation, and its relevant face (with respect to each of the two images). This problem version is motivated by real-world applications, e.g., a shredded document might have been printed on both sides before being shredded. (This is all the more applicable, in view of current global environmental trends, encouraging doublesided printing.) The computational complexity in this case increases in several ways. First, each pair of pieces might now fit together in any of 64 possible configurations, multiplying the number of possible solutions by 8n , relatively to Type 1 puzzles. Second, the solver has to consider now the possibility of flipping a piece, in addition to its translation and rotation. Third, the solver must always consider the two images (being formed on the fly) when placing new pieces and assessing the results, e.g., whether to assemble each image separately or assemble them simultaneously. For completeness, one can define additional puzzle types with all possibilities of (un)known piece location, orientation, and face. Type 1 2 3 4 5 6 7 Unknown Location 3 3 3 3 Unknown Orientation 3 3 3 3 Unknown Face 3 3 3 3 Table 1: Puzzle types according to different problem specifications. Genetic Algorithms In this section we provide a quick overview of the GA methodology. A GA is a search procedure within a problem’s solution domain. Since examining all possible solutions of a specific problem is virtually infeasible, GAs offer an optimization heuristic inspired by biological natural selection. In GA terms, a solution to the problem (e.g., a suggested arrangement of the puzzle’s pieces) is represented as an individual “organism” (i.e., chromosome) of a large population. Essentially, a GA attempts to reach an optimal solution by mimicking the processes of natural selection and evolution; the “fittest” individuals of each generation reproduce, creating offspring chromosomes. If defined correctly, the crossover operator responsible for offspring creation should allow for ”good” qualities to pass on from parents to children, in an attempt to create better offspring (i.e., solutions). In each iteration (i.e., one generation of the algorithm), the entire population is replaced by the many offspring created by the crossover operation. (The total population size remains fixed throughout all the generations.) In order to imitate natural selection, a chromosome’s reproduction rate, i.e., the number of times it is selected to reproduce (and hence the number of its offspring), is set directly proportionate to its fitness. The fitness, which is a score obtained by a fitness function, represents the quality of a given solution. The crossover should, thus, take place mainly between higher-rated solutions. The successful performance of a GA depends mainly on the appropriate choice of chromosome representation, crossover operator, and fitness function. The chromosome representation and crossover operator should yield an enhanced solution by merging two “promising” chromosomes (i.e., chromosomes representing promising partial solutions) that are passed on to the next generation. Figure 1 provides a pseudo-code of a common GA framework. Puzzle Solving In this section we present our generalized GA-based solver, which is designed to handle more difficult puzzle types. The population = create_random_population(POPULATION_SIZE); for (i = 0; i < NUM_OF_GENERATIONS; ++i) { new_population = NULL; evaluate_population(&population); for (j = 0; j < POPULATION_SIZE; ++j) { parent1 = select_parent(population); parent2 = select_parent(population); child = crossover(parent1, parent2); add_child_to_population(&new_population, child); } population = new_population; } solution = get_best(population); Figure 1: Pseudocode of GA framework GA starts from a fixed-size population of randomly generated solutions. In each iteration, the entire population is evaluated using the fitness function described below, and a new population is (re)produced by employing the crossover operator to the selected chromosome pairs. We use the common selection method of roulette wheel selection, where each chromosome is selected to reproduce, with probability directly proportional to its fitness score. We define each chromosome to be a complete solution to the problem, i.e., a suggested tiling of all pieces, including their orientation and face (if applicable). We now have to supply an appropriate fitness function and a crossover operator. The Fitness Function The fitness function determines the quality of each chromosome (i.e., each solution), and hence the expected number of its children. In every generation, all chromosomes are evaluated for the purpose of selection. For fitness evaluation, we use the dissimilarity measure, which was investigated thoroughly in previous comparative studies (Cho, Avidan, and Freeman 2010; Pomeranz, Shemesh, and Ben-Shahar 2011) and found to be very effective. The dissimilarity measure relies on the premise that adjacent jigsaw pieces in the original image tend to share similar colors along their abutting edges, i.e., the sum (over all neighboring pixels) of squared color differences (over all three color bands) should be minimal. Let pieces pi , pj be represented in normalized L*a*b* space by corresponding W × W × 3 matrices, where W is the height/width of each piece (in pixels). Assuming, for example, that pj is to the right of pi , the piece dissimilarity in this case is given by: v uW 3 uX X D(pi , pj ) = t (pi (k, W, b) − pj (k, 1, b))2 . (1) k=1 b=1 Obviously, to maximize the compatibility of two pieces, their dissimilarity should be minimized. For Type 2 puzzles we set the fitness function of a given chromosome to be the sum of pairwise dissimilarities over all adjacent edges. Given that the puzzle consists of (N ×M ) tiles, we represent each chromosome by an (N ×M ) matrix, where a matrix entry xi,j (i = 1..N, j = 1..M ) corresponds to a single puzzle piece and its orientation, we define its fitness as: N M −1 X X (D(xi,j , xi,j+1 )) + i=1 j=1 N −1 X M X (D(xi,j , xi+1,j )) (2) i=1 j=1 where the D term in each case is the dissimilarity of the two pieces in question about their joint edge, taking into account their actual rotations, as stored in the chromosome. For Type 4 puzzles, we need to consider actually two abutting edges (i.e., an adjacent edge for each piece face), for every neighboring piece in a piece pair. We sum the pairwise dissimilarities over all adjacent edges, computing effectively a fitness score for each image of the two-sided puzzle. Thus, the GA must balance the dissimilarity minimization on both sides of the puzzle to obtain, hopefully, the correct reconstruction of both images. Type 2 Crossover Given a chromosome representation, the crossover operator receives two tile configurations (i.e., two parent chromosomes) and produces a new arrangement of the pieces (i.e., a new offspring chromosome). In general, the crossover operator should encourage “good” qualities to pass on from the parents to their child. In particular, we would like an effective operator to meet the following three requirements. First, it must create a valid child solution, where each piece appears exactly once (i.e., no missing or duplicate pieces). Second, the operator must support position independence of puzzle segments assembled correctly. Namely, if a parent assembles correctly part of the image (i.e., a segment), modulo some spatial offset, the operator should accommodate the required spatial translation and rotation of the entire segment in the resulting child. For example, Figure 2 features a parent chromosome containing a person’s head correctly assembled, albeit spatially misplaced. The idea is to retain the correctly assembled head segment but allow for its translation and rotation. Third, a proper heuristic should be applied to detect correctly assembled segments (as the person’s head in Figure 2). Various works (Gallagher 2012; Sholomon, David, and Netanyahu 2014) use a weighted graph representation for the problem, where each node corresponds to a jigsaw piece and each (graph) edge corresponds to a joint edge of two adjacent puzzle pieces. We denote the edges of piece pi (in a clockwise manner) as pi .a, pi .b, pi .c and pi .d. For example, the graph edge pi .b − pj .d denotes the geometric configuration where edge b of piece pi is adjacent to edge d of piece pj . The weight of each graph edge is the dissimilarity of the two-piece configuration (given by Eq. 1). For Type 2 puzzles, there are 16 possible edges between every two (graph) vertices. This representation lends itself easily to an effective crossover of correctly assembled segments in the parents. The geometric relation pi .b − pj .d is invariant to both the absolute spatial location and orientation of the pieces (e.g., translating and/or rotating both pieces by 90 degrees will not affect this relation). Arriving at a piece arrangement can be viewed analogously to constructing a spanning tree of n − 1 graph edges. (a) Parent1 (b) Parent2 (c) 17 Pieces (d) 91 Pieces (e) 147 Pieces (f) 229 Pieces (g) 347 Pieces (h) Child Figure 2: Illustration of Type 2 crossover operation: (a) Parent1, (b) Parent2, (c)–(g) evolution of kernel growth until (h) a complete child is obtained. Note how the operator manages to locate and compose the skier’s body from all differently located and oriented parts assembled in both parents. Although each jigsaw piece is represented exactly once in this spanning tree, the correct dimensions and geometrical feasibility of the corresponding image might not be satisfied. We propose a crossover procedure, analogous to Prim’s algorithm (Prim 1957), for finding a minimal spanning tree (MST). This procedure meets the required constraints while attempting to construct a tree representing a better child solution. Prim’s algorithm starts from a single vertex and grows the sub-tree, one edge (and vertex) at a time, selecting at each step a minimum-weight edge connecting a sub-tree vertex and an external one. Similarly, we start constructing the puzzle from one piece and grow it by adding a single jigsaw piece (a graph edge) at a time. At every iteration we review all edges emanating from the partially grown piece kernel. In addition to Prim’s basic constraint (of avoiding edge cycles), the following requirements should be met upon adding a new piece (associated with a joint edge of an adjacent piece). First, the known image dimensions must not be breached. Second, each piece edge must be accounted for only once for all selected edges (thus avoiding infeasible geometrical configurations due to piece overlap, e.g., two competing pieces for the same edge of an adjacent third piece). Thus, we ensure that each piece appears exactly once and that the resulting image is geometrically feasible. Finally, the constructed tree is translated to a chromosome by recording the resulting locations and orientations of all the pieces. Also recorded are geometric configurations which are not part of the MST but are implied by it. Unlike Prim, instead of selecting literally the minimumweight edge in each iteration, we employ a heuristic based on intrinsic knowledge of the parents and edge weights. The procedure first selects an edge appearing in both parents; e.g., if p3 is in the current kernel, both parents contain the edge p3 .b − p6 .d, and all of the above constraints are met, this edge will be selected. Second, if no common edge can be added to the kernel, the procedure seeks a best-buddy edge (described below) residing in either parent; e.g., if p3 is in the current kernel, one parent contains the edge p3 .b − p6 .d, which is a best-buddy edge, and all other constraints are met, this edge will be picked. The notion of best-buddy pieces was first introduced by (Pomeranz, Shemesh, and Ben-Shahar 2011); two pieces are said to be best-buddies if each piece considers the other as its most compatible piece according to the compatibility measure defined. Extending this notion to best-buddy edges is straightforward. Finally, if none of the above holds, the procedure follows Prim’s approach and chooses a minimal-weight edge, for which all of the required constraints are satisfied. Note that only edges emanating from the growing piece kernel are considered, in each iteration. Hence, each edge (jigsaw piece) addition introduces additional possible edges (i.e., edges shared amongst the parents or best-buddy edges) that should be considered next. A subtle issue that requires careful consideration is that of image dimensions. Since a piece orientation is unknown, it cannot be determined, in advance, whether an N × M or an M × N frame should be used. Choosing either frame, in advance, could discard all chromosomes trying to assemble correctly rotated instances of the intended image by 90 or 270 degrees. We overcome this problem by maintaining initially a flexible frame. After each piece assignment, we check the farthest boundaries. Assuming M < N , once a length of M + 1 is reached along one of the dimensions, the frame must grow up to N along this same dimension. This allows the images to be assembled in any direction, with no boundary violations. Thus, the crossover operator is invariant to the orientation chosen when creating a child. Experimental results show, indeed, that the GA assembles the images correctly in different orientations in each generation. The above described procedure achieves all its predefined goals. The resulting chromosome (image) is valid, each piece appears exactly once and both image dimensions and geometric feasibility are maintained. Furthermore, segments assembled correctly (through the addition at each step of shared piece edges between parents or best-buddy edges) are copied to the child solution. Since only piece adjacencies are copied, the segments might appear in different spatial positions and orientations in the two parents (see Figure 2), achieving position- and orientation-independence. Type 4 Crossover In this puzzle type each piece is two sided and might need to be flipped. Segments assembled correctly might appear in different absolute locations, different orientations, and opposite sides of the puzzle. For example, the same segment might be located on opposite sides of two different chromosomes while two segments belonging to the same image (e.g., a person’s head and their body) might be located on opposite sides of the same chromosome. Similarly to the discussion on Type 2 puzzles, eight edges are now associated with each piece, four edges on each piece face. We mark the piece edges as a, b, c, d and their opposite counterparts as a0 , b0 , c0 , d0 , respectively (e.g., if b is the right piece edge, b0 is the left edge of the flipped face). All graph edges will be labeled using the augmented edge scheme. There are now 64 possible edges between every two vertices; each piece edge should be considered during every iteration of the crossover procedure (e.g., the procedure considers adding a piece pi , possibly rotated and/or flipped, to the growing kernel). To maintain geometrical validity, we add the following constraint. The flipping side of a piece edge at the joint boundary of a two-piece configuration may not be selected for another two-piece configuration, e.g., if edge pi .b − pj .a0 is selected, then all MST edges incident on pi .b0 or pi .a are prohibited. Choosing an edge such as pi .b − pj .a0 effectively implies flipping one of the pieces. Hence, the operator easily merges correctly assembled segments residing in different image sides (e.g., copying the first segment, flipping one piece from the second segment, and copying and flipping the remaining pieces accordingly). Interestingly, as a result of the above mentioned procedure, the crossover operator actually assembles both images concurrently (this approach is different from how a human would solve such a puzzle, and is considerably superior). Thus, we achieved a concurrent puzzle solver, that exploits “easier” segments in each image for achieving a better score. The solver is completely invariant to the orientation and side of the assembled images. Indeed, our experiments reveal that these parameters change constantly in the best chromosome of each generation. Experimental Results In all experiments we used the same GA parameters. Each generation consists of 1,000 chromosomes, selection is due to the roulette-wheel selection method (as previously mentioned), and the number of generations (for each run) is 30. (Based on our experience, the latter number seems to achieve a good balance between accuracy and efficiency.) Following previous works (Cho, Avidan, and Freeman 2010; Pomeranz, Shemesh, and Ben-Shahar 2011; Gallagher # Pieces 432 540 805 5,015 10,375 22,755 Direct 94.58% 89.57% 87.76% 93.24% 96.18% 77.43% Neighbor 94.86% 91.98% 92.07% 93.66% 97.05% 91.07% Perfect 10 8 6 8 4 1 Run-time 8 sec 11.9 sec 22.1 sec 9.74 min 35.12 min 3.48 hr Table 2: Accuracy results (under direct and neighbor comparison) on Type 2 puzzles, running the generalized GA five times on each image of every 20-image set; average of best result (per image) is shown for each image set. # of Pieces 432 540 805 5,015 10,375 22,755 Avg. Best 94.86% 91.98% 92.07% 93.66% 97.05% 91.07% Avg. Worst 93.79% 90.60% 90.76% 93.19% 96.75% 90.47% Avg. Avg. 94.44% 91.33% 91.45% 93.42% 96.91% 90.80% Avg. Std. Dev. 0.39% 0.49% 0.48% 0.17% 0.11% 0.22% Table 3: Accuracy results (under neighbor comparison) on Type 2 puzzles, running generalized GA five times on each image of every 20-image set; average of best, worst, and average score (and average standard deviation) per image is given for each image set. 2012; Sholomon, David, and Netanyahu 2013), we evaluated our scores using the direct comparison and neighbor comparison measures. Direct comparison returns the fraction of pieces in the assembled puzzle that are in their correct absolute position. Neighbor comparison is the fraction of pairwise piece adjacencies that are correct. We also report the number of images reconstructed perfectly in every set. For Type 2 puzzles we tested our solver on all previously established benchmarks (Pomeranz, Shemesh, and Ben-Shahar 2011; Sholomon, David, and Netanyahu 2013) using standard tile dimensions of 28 × 28 pixels. These benchmark datasets contain 20 images of 432-, 540-, 805-, 5,015-, 10,375-, and 22,755-piece puzzles. The largest Type 2 puzzle that has been attempted before is a single 9,600piece puzzle, i.e., we have tackled 20 puzzles more than twice as large as this size. Due to the stochastic nature of GAs, we ran the solver five times on each image in every set, and recorded the best, worst, and average result over these five runs. The average best results for each image set (with respect to the direct comparison and neighbor comparison measures) is reported in Table 2. Comparing the results achieved on the 432-piece dataset to the best results reported in (Gallagher 2012, Table 6) reveals their algorithm yields a 90.4% accuracy, i.e., we obtained a significant improvement of over 4%. For completeness, we also report set averages (according to the neighbor comparison) of the average and worst results obtained for each image (over its five runs). Table 3 contains these additional results for all image sets experimented with. Despite the random nature of GAs, the results are consistent (i.e., the small standard deviation suggests that a single run could have sufficed). (a) Puzzle - Front (b) Generation 1 - Front (c) Generation 2 - Front (d) Final - Front (e) Puzzle - Back (f) Generation 1 - Back (g) Generation 2 - Back (h) Final - Back Figure 3: Solution process of 432-piece Type 4 puzzle: (a) Given puzzle, and best chromosome obtained by the GA in the (b) first, (c) second, and (d) last generation; (e)–(f) opposite sides of exact same chromosomes. Final chromosome’s accuracy is 100%. Largest Type 4 puzzle solved contains 10,375 pieces. For Type 4 puzzles we did not experiment with the entire benchmark, as each puzzle requires two images so running the entire 400 possible pairs associated with each image set would have been very tedious, if not infeasible. Instead, we composed three two-sided puzzles (each containing two images) from the 5,015- and 10,375-piece puzzle sets. The first (two-sided) puzzle from each set contained two perfectly solved images as Type 2 puzzles, the second contained one perfectly solved image and a different image, and the third contained two images that were not solved perfectly as Type 2 puzzles. All puzzles with at least one perfectly solved side were again solved perfectly. This result is quite remarkable, as it attests to the GA’s power to assemble concurrently the two images by focusing, presumably, on the “easier” one. Even the more challenging puzzles were solved with far greater accuracy than when solved separately, again due to the GA solver’s ability to effectively incorporate the information to the opposite face of a given piece. Finally, to further challenge our generalized GA solver, in terms of handling real-world applications, we also attempted a two-sided, 5,015-piece puzzle whose one side is an image scene and its other side is a scanned document. Trying to solve the document as a Type 1 puzzle, we obtained horrendous accuracy, probably due to the ineffectiveness of the compatibility measure used, as all pieces are mostly white. This experiment is the closest attempt known to us to automatically solve a large jigsaw shredded document. A scenario in which such a document contains an image on its other side is not very frequent but is definitely possible. Given such a puzzle, the generalized GA solver reaches 99.86% accuracy, reassembling almost completely the correct image(s). This was accomplished despite the possible interference of the white piece faces. All test results regarding Type 4 puzzles can be viewed in Table 4. The tests were performed on a modern PC. Average run-time of the solver on the larger, 10,375-piece puzzles was 1.35 hours, a considerable improvement compared to # Pieces 5,015 5,015 5,015 5,015 10,375 10,375 10,375 Images 09, 10 19, 07 05, 14 03, doc 01, 04 15, 11 15, 19 Direct 100% 100% 84.77% 99.92% 100% 100% 99.35% Neigh. 100% 100% 85.73% 99.86% 100% 100% 99.20% Run-time 20.08 min 17.88 min 28.57 sec 27.88 min 76.02 min 81.65 min 85 min Table 4: Results for Type 4 GA on selected puzzles, under direct and neighbor comparisons, including total run-time. the 23.5 hours reported by (Gallagher 2012) for a slightly smaller and far less complex, 9,600-piece Type 2 puzzle. Conclusion In this paper, we introduced a new puzzle type, the two-sided puzzle, where the location, orientation, and face of each piece is unknown. This type of puzzle is likely to stir great interest, as it is supposedly the most complex type known; more importantly, it is highly representative of real-world applications, such as the reconstruction of shredded documents. In addition, we presented the first GA-based solver capable of solving both Type 2 and Type 4 puzzles. Our generalized GA solver outperforms, to a significant extent, current state-of-the-art solvers, as it is capable of solving Type 2 puzzles far more accurately and efficiently. Specifically, our solver can handle Type 2 puzzles of up to 22,755 pieces, i.e., more than twice as large as the size of Type 2 puzzles that have been reported. In addition, our solver is the only Type 4 solver, as of yet, and it manages, among other tasks, to reconstruct perfectly two-sided puzzles of up to 10,375 pieces. We believe our contributions can be further generalized to other, more difficult types of puzzles, in a similar manner. References [Altman 1989] Altman, T. 1989. Solving the jigsaw puzzle problem in linear time. Applied Artificial Intelligence an International Journal 3(4):453–462. [Brown et al. 2008] Brown, B.; Toler-Franklin, C.; Nehab, D.; Burns, M.; Dobkin, D.; Vlachopoulos, A.; Doumas, C.; Rusinkiewicz, S.; and Weyrich, T. 2008. A system for highvolume acquisition and matching of fresco fragments: Reassembling Theran wall paintings. ACM Transactions on Graphics 27(3):84. [Cao, Liu, and Yan 2010] Cao, S.; Liu, H.; and Yan, S. 2010. Automated assembly of shredded pieces from multiple photos. In IEEE International Conference on Multimedia and Expo, 358–363. [Cho, Avidan, and Freeman 2010] Cho, T.; Avidan, S.; and Freeman, W. 2010. A probabilistic image jigsaw puzzle solver. In IEEE Conference on Computer Vision and Pattern Recognition, 183–190. [Cho et al. 2008] Cho, T.; Butman, M.; Avidan, S.; and Freeman, W. 2008. The patch transform and its applications to image editing. In IEEE Conference on Computer Vision and Pattern Recognition, 1–8. [Deever and Gallagher 2012] Deever, A., and Gallagher, A. 2012. Semi-automatic assembly of real cross-cut shredded documents. In International Conference on Image Processing, 233–236. [Demaine and Demaine 2007] Demaine, E., and Demaine, M. 2007. Jigsaw puzzles, edge matching, and polyomino packing: Connections and complexity. Graphs and Combinatorics 23:195–208. [Fornasier and Toniolo 2005] Fornasier, M., and Toniolo, D. 2005. Fast, robust and efficient 2D pattern recognition for re-assembling fragmented images. Pattern Recognition 38(11):2074–2087. [Freeman and Garder 1964] Freeman, H., and Garder, L. 1964. Apictorial jigsaw puzzles: The computer solution of a problem in pattern recognition. IEEE Transactions on Electronic Computers EC-13(2):118–127. [Gallagher 2012] Gallagher, A. 2012. Jigsaw puzzles with pieces of unknown orientation. In IEEE Conference on Computer Vision and Pattern Recognition, 382–389. [Goldberg, Malon, and Bern 2004] Goldberg, D.; Malon, C.; and Bern, M. 2004. A global approach to automatic solution of jigsaw puzzles. Computational Geometry: Theory and Applications 28(2-3):165–174. [Holland 1975] Holland, J. H. 1975. Adaptation in natural and artificial systems. Ann Arbor, MI: University of Michigan Press. [Justino, Oliveira, and Freitas 2006] Justino, E.; Oliveira, L.; and Freitas, C. 2006. Reconstructing shredded documents through feature matching. Forensic Science International 160(2):140–147. [Koller and Levoy 2006] Koller, D., and Levoy, M. 2006. Computer-aided reconstruction and new matches in the forma urbis romae. Bullettino Della Commissione Archeologica Comunale di Roma 103–125. [Kosiba et al. 1994] Kosiba, D. A.; Devaux, P. M.; Balasubramanian, S.; Gandhi, T. L.; and Kasturi, K. 1994. An automatic jigsaw puzzle solver. In International Conference on Pattern Recognition, volume 1, 616–618. IEEE. [Marande and Burger 2007] Marande, W., and Burger, G. 2007. Mitochondrial DNA as a genomic jigsaw puzzle. Science 318(5849):415–415. [Marques and Freitas 2009] Marques, M., and Freitas, C. 2009. Reconstructing strip-shredded documents using color as feature matching. In ACM Symposium on Applied Computing, 893–894. [Morton and Levison 1968] Morton, A. Q., and Levison, M. 1968. The computer in literary studies. In IFIP Congress, 1072–1081. [Pomeranz, Shemesh, and Ben-Shahar 2011] Pomeranz, D.; Shemesh, M.; and Ben-Shahar, O. 2011. A fully automated greedy square jigsaw puzzle solver. In IEEE Conference on Computer Vision and Pattern Recognition, 9–16. [Prim 1957] Prim, R. C. 1957. Shortest connection networks and some generalizations. Bell system technical journal 36(6):1389–1401. [Sholomon, David, and Netanyahu 2013] Sholomon, D.; David, O. E.; and Netanyahu, N. S. 2013. A genetic algorithm-based solver for very large jigsaw puzzles. In IEEE Conference on Computer Vision and Pattern Recognition, 1767–1774. [Sholomon, David, and Netanyahu 2014] Sholomon, D.; David, O. E.; and Netanyahu, N. S. 2014. Genetic algorithm-based solver for very large multiple jigsaw puzzles of unknown dimensions and piece orientation. In Proceeding of the 16th Genetic and Evolutionary Computation Conference. To appear. [Wang 2000] Wang, C.-S. E. 2000. Determining molecular conformation from distance or density data. Ph.D. Dissertation, Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science. [Yang, Adluru, and Latecki 2011] Yang, X.; Adluru, N.; and Latecki, L. J. 2011. Particle filter with state permutations for solving image jigsaw puzzles. In IEEE Conference on Computer Vision and Pattern Recognition, 2873–2880. [Zhao et al. 2007] Zhao, Y.; Su, M.; Chou, Z.; and Lee, J. 2007. A puzzle solver and its application in speech descrambling. In WSEAS International Conference on Computer Engineering and Applications, 171–176.
9cs.NE
Approximate Recovery in Changepoint Problems, from `2 Estimation Error Rates arXiv:1606.06746v2 [stat.ME] 2 Dec 2016 Kevin Lin1 1 James Sharpnack2 Alessandro Rinaldo1 1 Ryan J. Tibshirani Carnegie Mellon University, 2 University of California at Davis Abstract In the 1-dimensional multiple changepoint detection problem, we prove that any procedure with a fast enough `2 error rate, in terms of its estimation of the underlying piecewise constant mean vector, automatically has an (approximate) changepoint screening property—specifically, each true jump in the underlying mean vector has an estimated jump nearby. We also show, again assuming only knowledge of the `2 error rate, that a simple post-processing step can be used to eliminate spurious estimated changepoints, and thus delivers an (approximate) changepoint recovery property—specifically, in addition to the screening property described above, we are assured that each estimated jump has a true jump nearby. As a special case, we focus on the application of these results to the 1-dimensional fused lasso, i.e., 1-dimensional total variation denoising, and compare the implications with existing results from the literature. We also study extensions to related problems, such as changepoint detection over graphs. Keywords: changepoint detection, fused lasso, total variation denoising, approximate recovery 1 Introduction Consider the 1-dimensional multiple changepoint model yi = θ0,i + i , i = 1, . . . , n, (1) where i , i = 1, . . . , n are i.i.d. errors, and θ0,i , i = 1, . . . , n is a piecewise constant mean sequence, having a set of changepoints  S0 = i ∈ {1, . . . , n − 1} : θ0,i 6= θ0,i+1 . This is a well-studied problem, and there is a large body of literature on estimation of the piecewise constant mean vector θ0 ∈ Rn in this model, as well as detection of its changepoints θ0 . Though estimation (of θ0 ) and detection (of its changepoints) are clearly related pursuits, they are different enough that most works on the changepoint problem are focused on one or the other. For example, 1-dimensional total variation denoising (Rudin et al. 1992), i.e., the 1-dimensional fused lasso (Tibshirani et al. 2005), has been primarily studied from the perspective of its estimation properties. Meanwhile, segmentation methods like binary segmentation (Vostrikova 1981, Venkatraman 1992) and wild binary segmentation (Fryzlewicz 2014) have been mostly studied for their detection properties. In this paper, we assert that the estimation and detection problems are very closely linked, in the following sense: any estimator with `2 estimation error guarantees automatically has certain approximate changepoint detection guarantees, and not surprisingly, a faster `2 estimation error rate here translates into a stronger statement about approximate detection. We use this general link to establish new approximate changepoint recovery results for the 1d fused lasso, an estimator that is given central focus in our work. 1 1.1 Background and related work Given a data vector y ∈ Rn from a model as in (1), the 1-dimensional fused lasso (1d fused lasso, or simply fused lasso) estimate is defined by n n−1 X 1X θb = argmin (yi − θi )2 + λ |θi − θi+1 |, 2 i=1 θ∈Rn i=1 (2) where λ ≥ 0 serves as a tuning parameter. This was proposed by Tibshirani et al. (2005)1 , though the same idea had been proposed in signal processing much earlier, under the name total variation (TV) denoising, by Rudin et al. (1992). There has been plenty of statistical theory developed for the fused lasso, e.g., Mammen & van de Geer (1997), Davies & Kovac (2001), Rinaldo (2009), Harchaoui & Lévy-Leduc (2010), Qian & Jia (2012), Rojas & Wahlberg (2014), Dalalyan et al. (2014). In particular, Mammen & van de Geer (1997) and Dalalyan et al. (2014) derived `2 error rates for the fused lasso, under different settings (different assumptions on θ0 ). We review these in Section 2.1, and compare the latter to a new related result that we establish in Section 3. Harchaoui & Lévy-Leduc (2010) and Rojas & Wahlberg (2014) derived approximate changepoint recovery properties for the fused lasso. We review these in Section 2.2, and compare them to our own results on approximate recovery in Section 4. The literature on general approaches in multiple changepoint detection is enormous, and we do not give an extensive overview, but we do summarize some relevant work of Donoho & Johnstone (1994, 1998), Fryzlewicz (2007), Boysen et al. (2009), Fryzlewicz (2014), Frick et al. (2014), Fryzlewicz (2016) in Sections 2.1 and 2.2, and revisit these results in more detail in Section 4 when we compare them to our new approximate changepoint recovery results. Extensions of the fused lasso such as trend filtering and the graph-based fused lasso have been analyzed by, e.g, Sharpnack et al. (2012), Tibshirani (2014), Wang et al. (2016), Hutter & Rigollet (2016), which are discussed later in Section 6. 1.2 Notation For a vector θ ∈ Rn , we write S(θ) for the set of its changepoint indices, i.e.,  S(θ) = i ∈ {1, . . . , n − 1} : θi 6= θi+1 . b for the changepoints of the mean θ0 in (1), and the fused We abbreviate S0 = S(θ0 ) and Sb = S(θ) lasso estimate θb in (2), respectively. Throughout, we will use the words “changepoint” and “jump” interchangeably. We will also make use of the following quantities defined in terms of θ0 . The size of S0 is denoted s0 = |S0 |. For convenience, we write S0 = {t1 , . . . , ts0 }, where 1 ≤ t1 < . . . < ts0 < n, and by convention, t0 = 0, ts0 +1 = n. The smallest distance between jumps in θ0 is denoted by Wn = min i=0,1...,s0 (ti+1 − ti ), (3) and the smallest distance between consecutive levels of θ0 by Hn = min |θ0,i+1 − θ0,i |. i∈S0 (4) Our notation here makes the dependence of Wn , Hn on n explicit (of course stemming from the fact that the mean vector θ0 itself changes with n, though for simplicity we suppress this notationally.) 1 In Tibshirani et al. (2005), the authors actually used an additional ` penalty on θ itself, to induce componentwise 1 sparsity; here we do not consider this extension, and simply refer to the estimator in (2) as the fused lasso. 2 For a matrix D ∈ Rm×n , we write DS to extract rows of D indexed by a subset S ⊆ {1, . . . , m}, and D−S as shorthand for D−S , where −S = {1, . . . , m}\S. Unless otherwise specified, the notation D ∈ R(n−1)×n will be used to denote the difference operator   −1 1 0 ... 0  0 −1 1 ... 0    D= . (5) . . .. ...  ..  0 0 . . . −1 1 √ n For a vector x ∈ R , we define its scaled `2 norm kxkn = kxk2 / n, and its discrete total variation TV(x) = n−1 X |xi − xi+1 | = kDxk1 . (6) i=1 For two discrete sets A, B, we define the metrics  d(A|B) = max min |a − b| and dH (A, B) = max d(A|B), d(B|A)}. b∈B a∈A (7) The former metric can seen as a one-sided screening distance from B to A, measuring the furthest distance of an element in B to its closest element in A. The latter metric is traditionally known as the Hausdorff distance between A and B. Note that if A is empty, then we have d(A|B) = 0, and if B is empty, then d(A|B) = ∞; this makes dH (A, B) = ∞ if either A or B are empty. For deterministic sequences an , bn we write an = O(bn ) to denote that an /bn is bounded for large enough n, an = Ω(bn ) to denote that bn /an is bounded for large enough n, and an = Θ(bn ) to denote that both an = O(bn ) and an = Ω(bn ). We also write an = o(bn ) to denote that an /bn → 0, and an = ω(bn ) to denote that bn /an → 0. Finally, we write An = OP (Bn ) for random sequences An , Bn to denote that An /Bn is bounded in probability, and An = oP (Bn ) to denote that An /Bn → 0 in probability. 1.3 Summary of results A summary of our contributions is as follows. • New `2 error analysis for the fused lasso, under strong sparsity. In Section 3, we give a new `2 estimation error analysis for the fused lasso, in the case s0 = O(1), which we refer to as the “strong sparsity” case. Theorem 4 provides the bound   log n log log n 2 b kθ − θ0 kn = OP , n for the fused lasso estimate θb in (2). This is sharper than the previously established error rate of log2 n/n, from Dalalyan et al. (2014), for the fused lasso under strong sparsity, and quite close to the “oracle” rate of log n/n under strong sparsity, as we discuss in Remark 10. Our theorem also applies beyond the case of a constant sparsity level s0 , and gives an explicit error bound in terms of s0 . We believe that the proof of Theorem 4 is interesting in its own right, as it leverages a new quantity that we call a lower interpolant to approximate the fused lasso estimate in a certain sense using 2s0 + 2 piecewise monotonic segments, which allows for finer control of the sub-Gaussian complexity. • Bound on the screening distance, based on `2 error. In Section 4.1, we derive a bound e of any estimator θ, e given on the sreening distance from S0 to the detected changepoints S(θ) 2 e a bound on its `2 error rate kθ − θ0 kn = OP (Rn ). Specifically, in Theorem 8, we show that    nRn e d S(θ) | S0 = OP . Hn2 3 To emphasize, this bound on the screening distance is agnostic about the details of the estie provided that its `2 error rate Rn is known. As two principal applications, we plug mator θ, in the known error rate Rn for the fused lasso under two different settings—weak and strong sparsity—to derive new screening results on the fused lasso in Corollaries 9 and 10. Perhaps surprisingly (since these screening bounds are not based on fine-grained analysis of the fused lasso, but on achieved `2 rates alone), these results provide interesting conclusions in each of their own settings, as we discuss in Remarks 14 and 15. • Bound on the Hausdorff distance, based on `2 error and a post-processing step. In Section 4.2, we give a bound on the Hausdorff distance between S0 and the detected changee of any estimator θ, e given a bound kθe − θ0 k2 = OP (Rn ) and a simple filtering-based points S(θ) n e that occur far away from elements of S0 . technique to remove spurious changepoints in S(θ) e of changepoints satisfies In particular, Theorem 11 states that the filtered set SF (θ)    e S0 ≤ nRn νn → 1 as n → ∞, P dH SF (θ), Hn2 where νn is any diverging sequence (i.e., diverging as slowly as desirable). As two applications, we consider post-processing the changepoints from the fused lasso estimator, in the weak and strong sparsity settings, in Corollaries 14 and 15. We compare these to existing approximate changepoint recovery results in the literature in Remarks 19 and 20; the summary is that under strong sparsity, our result on the post-processed fused lasso is comparable with the best known recovery results, but under weak sparsity, our result is worse than the guarantees given in Frick et al. (2014), Fryzlewicz (2014, 2016) for other changepoint estimators. It should be reiterated that, unlike other results in the literature which are based on detailed analyses of specific changepoint estimators, our results are generic and based only on `2 error properties, making them widely applicable. Therefore, a lack in sharpness in some cases, such as the weak sparsity case, is perhaps not unexpected. • Practical guidelines for post-processing. In Section 4.3, we present a modification of the aforementioned post-processing rule, which guarantees that the filtered set has at most 3e s+2 e In Section 5, we describe a data-driven procedure to determine an elements, where se = |S(θ)|. appropriate threshold level for the filter, and we also conduct detailed empirical investigations of our proposals. • Extension to piecewise linear segmentation, and graph changepoint detection. In Section 6, we give extensions of our screening results to two related settings: piecewise linear segmentation and changepoint detection over graphs. For piecewise linear segmentation, the main screening result is in Theorem 19, and its specialization to the trend filtering estimator is in Corollary 21; for graph changepoint detection, the main result is in Theorem 23, and its specialization to the 2d fused lasso estimator is in Corollary 24. 2 Preliminary review of existing theory We review existing statistical theory for the fused lasso, first on `2 estimation error, and then on (approximate) changepoint recovery. 2.1 Review: `2 estimation error We begin by describing two major results on the quantity kθb − θ0 k2n , 4 the squared `2 estimation error between the fused lasso estimate θb in (2) and the mean θ0 in (1). In somewhat of an abuse of notation, we will simply refer to the above quantity as the `2 estimation error, or estimation error for short. The first result, from Mammen & van de Geer (1997), studies what may be called the “weak sparsity” case, in which the total variation of θ0 is controlled. Before stating this, we recall that a random variable Z is said to have a mean zero sub-Gaussian distribution provided that  E(Z) = 0 and P(|Z| > t) ≤ M exp − t2 /(2σ 2 ) for t ≥ 0, (8) for some constants M, σ > 0. Theorem 1 (Fused lasso error rate, weak sparsity setting, Theorem 10 of Mammen & van de Geer 1997). Assume the data model in (1), with errors i , i = 1, . . . , n i.i.d. from a subGaussian distribution as in (8). Also assume that TV(θ0 ) ≤ Cn , for a nondecreasing sequence Cn . −1/3 Then for a choice of tuning parameter λ = Θ(n1/3 Cn ), the fused lasso estimate θb in (2) satisfies kθb − θ0 k2n = OP (n−2/3 Cn2/3 ). Remark 1 (Consistency, optimality). This shows that the fused lasso estimator is consistent when Cn = o(n). When Cn = O(1), its estimation error rate is n−2/3 , which is in fact the minimax optimal rate as θ0 varies over the class of signals with bounded total variation, i.e., θ0 ∈ {θ ∈ Rn : TV(θ) ≤ C} for a constant C > 0 (Donoho & Johnstone 1998). For explanations of the above theorem and this minimax result, in notation that is more consistent with that of the current paper, see Tibshirani (2014). The second result, from Dalalyan et al. (2014), studies what may be called the “strong sparsity” case, in which the number of changepoints s0 in θ0 is controlled. Theorem 2 (Fused lasso error rate, strong sparsity setting, Proposition 4 of Dalalyan 2 et al. 2014). Assume the data model in (1), pwith errors i , i = 1, . . . , n drawn i.i.d. from N (0, σ ). Then for a choice of tuning parameter λ = 2n log(n/δ), the fused lasso estimate θb in (2) satisfies   s0 log(n/δ) n kθb − θ0 k2n ≤ c log n + , n Wn with probability at least 1 − 2δ, for all δ > 0 and all n ≥ N , where c, N > 0 are constants, and recall Wn is the minimum distance between jumps in θ0 , as in (3). Remark 2 (The roles of s0 , Wn ). When the number of jumps s0 in θ0 grows quickly enough with n, the error rate in Theorem 2 will become worse than that in Theorem 1. Given s0 jumps, in the best case, the minimum gap Wn between jumps scales as Wn = Θ(n/s0 ), which delivers a rate of s0 log2 n/n + s20 log n/n in Theorem 2. When s0 scales faster than n1/6 (log n)−1/2 , we can see that this is slower than the n−2/3 rate delivered by Theorem 1 (assuming Cn = O(1)). Of course, Theorem 2 is most useful when s0 = O(1). When this is true, and additionally Wn = Θ(n), we see that the theorem implies that the fused lasso has `2 error kθb − θ0 k2n = OP (log2 n/n). This is a very fast rate, nearly equal to the “parametric rate” of 1/n associated with estimating a finite-dimensional parameter. Remark 3 (Alternative fused lasso error rate, strong sparsity setting). When s0 = O(1), Proposition 2 in Harchaoui & Lévy-Leduc (2010) proves that the fused lasso p has estimation error kθb − θ0 k2n = O(log n/n) with probability approaching 1, under a choice λ = Θ( log n/n3 ). But the b which we authors must also assume that the number of changepoints in the fused lasso estimate θ, b might denote as sb = |S|, is bounded with probability tending to 1. This seems to be an unrealistic assumption, given the required scaling for λ. Theoretically, we remark that such a small choice of 5 p λ, on the order of log n/n3 , does not √ match the much larger choices dictated p by Theorems 2 and 4, both on the order of approximately n. Empirically, when λ scales as log n/n3 , we find that the number of estimated changepoints in θb often grows very large, even when θ0 has few jumps and the signal-to-noise ratio is quite high. Remark 4 (Comparable error rates of other estimators). Various other estimators obtain comparable estimation error rates toPthose descibed above for the fused lasso. The Potts estimator, Pn−1 n−1 defined by replacing the `1 penalty i=1 |θi − θi+1 | in (2) with the `0 penalty i=1 1{θi 6= θi+1 }, and denoted say by θbPotts , has been shown to satisfy kθbPotts − θ0 k2n = O((log n/n)2/3 ) a.s. when TV(θ0 ) = O(1), and kθbPotts − θ0 k2n = O(log n/n) a.s. when s0 = O(1), by Boysen et al. (2009). Wavelet denoising (under weak conditions on the wavelet basis), denoted by θbwav , has been shown to satisfy Ekθbwav − θ0 k2n = O(n−2/3 ) when TV(θ0 ) = O(1), by Donoho & Johnstone (1998), and Ekθbwav − θ0 k2n = O(log2 n/n) when s0 = O(1), by Donoho & Johnstone (1994). Combining unbalanced Haar (UH) wavelets with a basis selection method, Fryzlewicz (2007) gave an estimator θbUH with EkθbUH − θ0 k2n = O(log2 n/n2/3 ) when TV(θ0 ) = O(1), and EkθbUH − θ0 k2n = O(log2 n/n) when s0 = O(1). Though they are not written in this form, the results in Fryzlewicz (2016) imply that his “tail-greedy” unbalanced Haar (TGUH) estimator, θbTGUH , satisfies kθbTGUH − θ0 k2n = O(log2 n/n) with probability tending to 1, when s0 = O(1). 2.2 Review: changepoint recovery Next, we review the relevant results on the quantities  b S0 ). d(Sb | S0 or dH (S, b in the fused lasso The former is the screening distance from S0 to the set of changepoints Sb = S(θ) b b estimate θ in (2); the latter is the Hausdorff distance between S0 and S; recall, both metrics were defined in (7). We use the term “approximate screening” to mean that d(Sb | S0 ) is controlled, and b S0 ) is controlled, though often times we will drop the “approximate recovery” to mean that dH (S, word “approximate” from either term, for brevity. Below we summarize two results from Harchaoui & Lévy-Leduc (2010). Theorem 3 (Fused lasso approximate screening and recovery results, strong sparsity setting, Propositions 3 and 4 of Harchaoui & Lévy-Leduc 2010). Assume the data model in (1), where the errors i , i = 1, . . . , n are i.i.d. from a sub-Gaussian distribution as in (8). Assume also that (i) s0 = O(1), (ii) P(b s ≥ s0 ) → 1, and that rn is a sequence satisfying (iii) rn ≤ Wn , (iv) rn = ω(max{log n/Hn2 , λ/Hn }), where, recall, Wn is the minimum distance between changepoints in θ0 , as defined in (3), and Hn is the minimum gap betwen levels of θ0 , as defined in (4). Then the fused lasso estimate θb in (2) with tuning parameter λ satisfies   P d(Sb | S0 ) ≤ rn → 1 as n → ∞. Under assumptions (i), (ii’) P(b s = s0 ) → 1, (iii), and (iv’) rn = ω(max{log n/Hn2 , log (n5 /λ2 )/Hn2 }), we instead have   b S0 ) ≤ rn → 1 as n → ∞. P dH (S, Remark 5 (Stringency of conditions). Assumption (ii’) in the above result, needed for the bound on the Hausdorff distance, states that the number of estimated changepoints sb in θb equals the number of changepoints s0 in θ0 with probability tending to 1, which is of course a very strong assumption. Assumption (ii), needed for the bound on the one-sided screening distance, states that sb ≥ s0 , which is itself fairly strong, though believable if λ is chosen to be small enough. The tuning parameter λ in fact plays an important role in the achieved rates rn in Theorem 3. In order to satisfy condition (iv) on rn , a choice of λ = log n/Hn gives the tightest possible scaling 6 for rn . Then we require rn to grow faster than log n, e.g., at the rate log2 n. This choice is basically the same as that discussed in Harchaoui & Lévy-Leduc (2010); with this choice, their results show that the screening distance achieved by the fused lasso estimator is at most log2 n, with probability tending to 1. However, the choice of λ here is worrisome—it is considerably smaller than the choices known to achieve reasonable error rates, specifically in the strong sparsity setting, with s0 = O(1), √ where we expect λ to scale at something like a n rate (see Theorems 2 and 4). With such a small b choice of λ = log n/Hn , there would likely be a very large number of estimated changepoints in θ, rendering a quantity like the screening distance uninteresting.2 The same critique could made be about condition (iv’), needed for the bound on the Hausdorff distance. In particular, condition (ii’) seems unrealistic unless λ is chosen to be much larger. √ For the reasons just described, we will consider a larger scaling of λ = Θ( n), when comparing Theorem 3 to our new results on changepoint screening and recovery in Sections 4.1 and 4.2. Remark 6 (Other fused lasso recovery results). Several other results have appeared in the literature regarding changepoint recovery for the fused lasso. Rinaldo (2009) studied exact recovery of changepoints (in which the achieved Hausdorff distance would be zero). There is an error in the proof of his Theorem 2.3, which invalidates the result.3 Qian & Jia (2012) studied a modification of the fused lasso defined by transforming the fused lasso problem (2) into a lasso problem with particular design matrix X, and then applying a step that “preconditions” y and X. The authors concluded that exact recovery is possible with probability √ at tending to 1, as long as the minimum on signal gap and tuning parameter satisfy Hn ≥ λ = ω( log n). This is a very strong requirement √ the scaling of the signal gap Hn ; Sharpnack et al. (2012) showed that, when Hn ≥ ω( log n), even simple pairwise thresholding (i.e., thresholding based on the observed absolute differences |yi −yi+1 |, i = 1, . . . , n − 1) achieves exact recovery. Most recently, Rojas & Wahlberg (2014) established an impossibility result for the fused lasso estimator when θ0 exhibits a “staircase” pattern, which means that DS0 θ0 has two consecutive positive or negative values; specifically, these authors proved that for b S0 )/n remains bounded away from zero with nonzero such a staircase pattern, the quantity dH (S, asymptotic probability. For non-staircase patterns in θ0 , the authors also showed, under certain b S0 )/n converges to zero in probability. assumptions, that dH (S, Remark 7 (Comparable recovery properties of other estimators). It is worth describing relevant changepoint recovery properties of various methods in the literature. Boysen et al. (2009) showed that the Potts estimator, denoted by θbPotts , satisfies dH (S(θbPotts ), S0 ) = O(log n) a.s., when s0 = O(1). Frick et al. (2014) proposed a simultaneous multiscale changepoint estimator (SMUCE), using an `0 -penalized optimization problem (like the Potts estimator), and under weak assumptions on Wn , Hn , proved that their estimator θbSMUCE satisfies dH (S(θbSMUCE ), S0 ) = O(log n/Hn2 ) with probability tending to 1. There is quite a large body of literature on binary segmentation (BS). To the best of our knowledge, the sharpest analysis for BS is in Fryzlewicz (2014), who also proposed and analyzed a “wild” (i.e., randomized) variant of the method (WBS). Denoting these two estimators by θbBS and θbWBS , Fryzlewicz (2014) established that dH (S(θbBS ), S0 ) = O(n2 log n/(Wn2 Hn2 )) and dH (S(θbBS ), S0 ) = O(log n/Hn2 ), both with probability tending to 1, and both under certain restrictions on Wn , Hn , these restrictions being stronger for BS than for WBS. Very recently, Fryzlewicz (2016) proved that his tail-greedy unbiased Haar estimator, denoted by θbTGUH , satisfies dH (S(θbTGUH ), S0 ) = O(log2 n) with probability tending to 1, under weak conditions on Wn , Hn . All of these results will be revisited in greater detail in Remarks 19 and 20. Lastly, it should be noted that many of the methods described here also come with a guarantee (under possibly additional conditions) that they correctly identify the number of changepoints s0 in θ0 , with probability tending to 1. We refer the reader to the references above, for details. 2 Of course, with λ = 0, the screening distance achieved by the fused lasso is trivially zero. Hence, when studying screening distance, it is implicitly understood that some other aspect of θb must be kept in balance. In our work, we study screening distances while maintaining that θb must exhibit good estimation performance, as measured by its `2 error rate. 3 See the correction note posted at http://www.stat.cmu.edu/ arinaldo/Fused_Correction.pdf. ~ 7 3 Error analysis under strong sparsity In this section, we derive a new `2 estimation error bound for the fused lasso in the strong sparsity case, improving on the result of Dalalyan et al. (2014) stated in Theorem 2. Our proof is based on the concept of a lower interpolant, which as far as we can tell is a new idea that may be of interest in its own right. We first state our error bound. Theorem 4 (Fused lasso error rate, strong sparsity setting). Assume the data model in (1), with errors i , i = 1, . . . , n i.i.d. from a sub-Gaussian distribution as in (8). Then for a choice of tuning parameter λ = (nWn )1/4 , the the fused lasso estimate θb in (2) satisfies ! r n s 0 (log s0 + log log n) log n + , kθb − θ0 k2n ≤ γ 2 c n Wn with probability at least 1 − exp(−Cγ), for all γ > 1 and n ≥ N , where c, C, N > 0 are constants. Remark 8 (The roles of s0 , Wn ). When s0 grows quickly enough with n, the error rate provided by the above theorem will become worse than the weak sparsity rate in Theorem 1. Given s0 evenly 3/2 spaced jumps, so that Wn = Θ(n/s0 ), the rate in Theorem 4 is (log s0 + log log n)s0 log n/n + s0 /n; 2/9 −2/3 when s0 grows faster than n , this is slower than the n rate in Theorem 1 (assuming Cn = O(1)). Theorem 4 gives the fastest rate when s0 = O(1), Wn = Θ(n), this being (log n log log n)/n), an improvement over the rate in Theorem 2. This comparison, and the comparison to other results in the literature, will be drawn out in more detail in the last remark of this section. Remark 9 (Expectation bound). An expectation bound follows more of less directly from the high probability bound in Theorem 4. Define the random vairable kθb − θ0 k22 M= p , c2 s0 ((log s0 + log log n) log n + n/Wn ) √ which we know has the tail bound P(U > u) ≤ exp(−C u) for u > 1, and observe that Z ∞ Z ∞ √ E(U ) = P(U > u) du ≤ 1 + exp(−C u) du. 0 1 The right-hand side is a finite constant, and this gives the result s0 Ekθb − θ0 k2n ≤ c (log s0 + log log n) log n + n r ! n , Wn where the constant c > 0 is adjusted to be larger, as needed. Here is an overview of the proof of Theorem 4. The details are deferred until Appendix A, and the proofs of the lemmas stated below are given in Appendix B. We consider a decomposition b θb − θ0 = P0 (θb − θ0 ) + P1 θ, where P0 is the projection matrix onto the piecewise constant structure inherent to the mean θ0 , and P1 = I − P1 . To give more detail, recall that we write S0 = {t1 , . . . , ts0 } for the changepoints in θ0 , ordered as in t1 < . . . < ts0 , and we write t0 = 0 and ts0 +1 = n for convenience. Furthermore, define Bj = {tj + 1, . . . , tj+1 }, and write 1Bj ∈ Rn for the indicator of block Bj , for j = 0, . . . , s0 . With this notational setup, we may now define P0 as the projection onto the (s0 + 1)-dimensional linear subspace R = span{1B0 , . . . , 1Bs0 }. It is common practice (e.g., see van de Geer (2000)) to 8 bound the estimation error by bounding the empirical process term > (θb − θ0 ), where  ∈ Rn is the vector of errors in the data model (1). Using the decomposition above, this becomes > (θb − θ0 ) = > δb + > x b, b The parameter δb lies in an (s0 + 1)-dimensional space, where we define δb = P0 (θb − θ0 ) and x b = P1 θ. >b which makes bounding  δ relatively easy. Bounding the term > x b requires a much more intricate argument, which is spelled out in the following lemmas. Lemma 5 is a deterministic result ensuring the existence of what we call the lower interpolant zb to the vector x b. This interpolant approximates x b using roughly 2s0 +2 monotonic pieces, and its empirical process term > zb can be finely controlled, as shown in Lemma 6. The residual from the interpolant approximation, denoted w b=x b − zb, has an empirical process term > w b that is more crudely controlled, in Lemma 7. Put together, as in > x b = > zb + > w, b gives the final control on > x b. Before stating Lemma 5, we define the class of vectors containing the lower interpolant. Given any collection of changepoints t1 < . . . < ts0 (and t0 = 0, ts0 +1 = n), let M be the set of “piecewise monotonic” vectors z ∈ Rn , with the following properties, for each i = 0, . . . , s0 : (i) there exists a point t0i such that ti + 1 ≤ t0i ≤ ti+1 , and the absolute value |zj | is nonincreasing over the segment j ∈ {ti + 1, . . . , t0i }, and nondecreasing over the segment j ∈ {t0i , . . . , ti+1 }; (ii) the signs remain constant on the monotone pieces, sign(zti ) · sign(zj ) ≥ 0, sign(zti+1 ) · sign(zj ) ≥ 0, j = ti + 1, . . . , t0i , j = t0i + 1, . . . , ti+1 . Now we state our lemma that characterizes the lower interpolant. Lemma 5. Given changepoints t0 < . . . < ts0 +1 , and any x ∈ Rn , there exists a vector z ∈ M (not necessarily unique), such that the following statements hold: kD−S0 xk1 = kD−S0 zk1 + kD−S0 (x − z)k1 , √ 4 s0 kzk2 , kDS0 xk1 = kDS0 zk1 ≤ kD−S0 zk1 + √ Wn kzk2 ≤ kxk2 and kx − zk2 ≤ kxk2 , (9) (10) (11) where D ∈ R(n−1)×n is the difference matrix in (5). We call a vector z with these properties a lower interpolant to x. Loosely speaking, the lower interpolant zb can be visualized by taking a string that lies initially on top of x b, is nailed down at the changepoints t0 , . . . ts0 +1 , and then pulled taut while maintaining that it is not greater (elementwise) than x b, in magnitude. Here “pulling taut” means that kDb z k1 is made small. Figure 1 provides illustrations of the interpolant zb to x b for a few examples. Note that zb consists of 2s0 + 2 monotonic pieces. This special structure leads to a sharp concentration inequality. The next lemma is the primary contributor to the fast rate given in Theorem 4. Lemma 6. Given changepoints t1 < . . . < ts0 , there exists constants cI , CI , NI > 0 such that when  ∈ Rn has i.i.d. sub-Gaussian components satisfying (8), ! p  |> z| > γcI (log s0 + log log n)s0 log n ≤ 2 exp − CI γ 2 c2I (log s0 + log log n) , P sup z∈M kzk2 for any γ > 1, and n ≥ NI . 9 ● 8 10 ● ●● ●●● ●● ● ● ●● ●● ● ●●●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●● ● ● ●● ●● ●● ●● ●●●● ●● ● ●● ● ●● ● ●● ● ● ●●● ● ●● ●● ●●● ● ● ●●● ●●● ● ●● ● ● ●● ●●● ● ● ● ●● ● ●● ● ●● ● ● ●●● ● ● ● ●● ●●● ●●●● ●● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●● ●●● ● ●● ● ● ● ● ●●●● ● ● ● ●● ● ●● ●● ●● ● ● ●●●●● ● ●● ●●● ● ● ● ● ● ●● ●● ● ●●● ●● ● ● ●● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ● ● ●●●● ● ●● ●● ● ●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ●●● ●● ● ●● ● ● ●●●●●● ● ●●● ●●● ● ●● ● ● ●● ●●● ●● ● ● ● ● ●●● ● ● ● ●●● ●●● ● ●● ●● ● ●● ● ● ●● ● ●●● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ●●● ●●●●● ● ●●● ● ● ●● ●● ● ● ● ● ●●●●●●● ● ●● ● ● ●●● ● ●● ●●● ● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ●● ● ●● ● ● ● ●● ●● ●●● ●● ● ●●● ● ●● ●● ●● ●● ● ●● ●● ●● ● ● ●● ●●●●● ●● ●● ●● ● ● ● ●● ● ● ●● ●●● ●● ●●●● ● ● ●●●● ● ●● ● ● ● ●● ● ● ●● ●● ●●● ●● ● ● ●●● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● 0 200 400 600 6 4 2 0 −2 800 0 200 400 600 800 600 800 Index −1.5 −3 −2 −0.5 0.0 −1 0.5 0 1.0 Index ● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●●●●● ● ●● ●●● ● ● ● ● ● ● ●● ● ●● ●● ●●● ● ● ●● ●● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ●●●●●● ●● ●●●● ● ●● ● ●●● ●●● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ●●● ●● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●●● ● ●● ●●●● ● ● ● ● ● ●●● ●● ● ● ● ●●● ●● ●● ●●● ● ● ● ●● ● ● ●●●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ●● ●●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●● ● ●●● ● ●● ● ●●● ● ●●●● ● ● ● ●● ●● ●● ●● ●● ● ●● ●● ● ●● ●● ●● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ●● ●● ● ●● ● ● ●● ●● ●●●●● ● ●●●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●●● ●● ● ●●● ● ● ●●● ●●● ● ●● ● ● ● ● ● ● ●●● ●● ● ● ● ● ●●● ● ●●● ●●● ●● ● ● ● ●● ● ● ●● ● ●●● ●● ●● ●●●● ● ● ●● ●● ●● ● ● ● ● 1 −5 0 5 ● 0 200 400 600 800 0 200 400 Figure 1: The lower interpolants for two examples (in the left and right columns), each with n = 800 points. In the top row, the data y (in gray) and underlying signal θ0 (red) are plotted across the locations 1, . . . , n. Also shown is the fused lasso estimate θb (blue). In the bottom row, the error vector x b = P1 θb is plotted (blue) as well as the interpolant (black), and the dotted vertical lines (red) denote the changepoints t1 , . . . ts0 of θ0 . Finally, the following lemma controls the residuals, w b=x b − zb. Lemma 7. Given changepoints t1 < . . . < ts0 , there exists constants cR , CR > 0 such that when  ∈ Rn has i.i.d. sub-Gaussian components satisfying (8),   √ |> w| 1/4 P sup p > γcR (ns0 ) ≤ 2 exp(−CR γ 2 c2R s0 ), ⊥ kD−S0 wk1 kwk2 w∈R for any γ > 1, where R⊥ is the orthogonal complement of R = span{1B0 , . . . , 1Bs0 }. We conclude this section with a remark comparing Theorem 4 to related results in the literature. Remark 10 (Comparison to Theorem 2). We compare Theorem 4 to the strong sparsity result in Dalalyan et al. (2014), as stated p in Theorem 2. For any s0 , Wn , the former rate is sharper than the latter, since log s0 ≤ log n and n/Wn ≤ n/Wn . Moreover, when s0 = O(1) and Wn = Θ(n), the rates are (log n log log n)/n versus log2 n/n, in Theorems 4 and 2 respectively. Furthermore, in this √ setting, we note that the scaling of the tuning parameter investigated by both theorems is λ = Θ( n). As discussed in Remarks 3 and 4, essentially all rates from comparable estimators in the strong sparsity case scale as log2 n/n, with the exception being the Potts estimator, which has a rate of log n/n. Therefore the improvement from log2 n/n to (log n log log n)/n offered by Theorem 4 could certainly be viewed as nontrivial. An error rate faster than log n/n in the strong sparsity case seems likely unattainable by any method, as Donoho & Johnstone (1994) showed that an oracle wavelet estimator (that is allowed the optimal choice of wavelet threshold for each problem instance) still has an expected estimation error on the order of log n/n. 10 4 Approximate changepoint screening and recovery We develop results on approximate screening of changepoints by the fused lasso, and approximate recovery of changepoints after a post-processing step has been applied to the fused lasso estimate. A distinctive feature of our results is that their proofs based on only the `2 estimation error rates achieved by the fused lasso. In fact, in their most general form, our results imply certain changepoint screening and recovery properties for any estimation method that has a known `2 error rate, which clearly has implications well beyond the fused lasso. 4.1 Results on approximate changepoint screening We present a theorem that takes a general estimator θe of θ0 , with a known `2 estimation error rate, e and infers a bound on the screening distance between changepoints of θ0 and those of θ. Theorem 8 (Generic screening result). Let θ0 ∈ Rn be a piecewise constant vector, and θe ∈ Rn be an estimator that satisfies the error bound kθe − θ0 k2n = OP (Rn ). Assume that nRn /Hn2 = o(Wn ), where, recall, Hn is the minimum gap between adjacent levels of θ0 , defined in (4), and Wn is the minimum distance between adjacent changepoints of θ0 , defined in (3). Then    nRn e , d S(θ) | S0 = OP Hn2 e is the set of changepoints in θ, e S0 = S(θ0 ) is the set of changepoints in θ0 , and d( · | · ) where S(θ) is the one-sided screening distance, as defined in (7). Proof. The proof is derived from the `2 rate. Fix any  > 0, C > 0. By assumption, we know that there is an integer N1 > 0 such that   C 2 e P kθ − θ0 kn > Rn ≤ , 4 for all n ≥ N1 . We also know that there is an integer N2 > 0 such that CnRn /Hn2 ≤ Wn for all n ≥ e | S0 ) > rn . N2 . Let N = max{N1 , N2 }, take n ≥ N , and let rn = bCnRn /Hn2 c. Suppose that d(S(θ) e Then, by definition, there is a changepoint ti ∈ S0 such that no changepoints of θ are within rn of ti , which means that θej is constant over j ∈ {ti − rn + 1, . . . , ti + rn }. Denote z = θeti −rn +1 = . . . = θeti = θeti +1 = . . . = θeti +rn . We then form the lower bound t +r iXn 2 2 rn 2 1 rn rn Hn2 C θej − θ0,j = z − θ0,ti + z − θ0,ti +1 ≥ > Rn , n j=t −r +1 n n 2n 4 i (12) n where the first inequality holds because (x − a)2 + (x − b)2 ≥ (a − b)2 /2 for all x (the quadratic in x here is minimized at x = (a + b)/2), and the second because rn = bCnRn /Hn2 c. Therefore, we see e | S0 ) > rn implies that d(S(θ) t +r kθe − θ0 k2n ≥ iXn 2 1 C θej − θ0,j > Rn , n j=t −r +1 4 i n which implies      e | S0 > rn ≤ P kθe − θ0 k2 > C Rn ≤ , P d S(θ) n 4 for all n ≥ N , completing the proof. 11 Remark 11 (Conditions on Wn , Hn ). The condition that nRn /Hn2 = o(Wn ) in Theorem 8 is not strong. Consider the simple case in which Hn = Ω(1) and Wn = Θ(n). This condition reduces to Rn = o(1), requiring only that the estimator θe in question be consistent. The theorem then gives e | S0 ) = OP (nRn ) on the screening distance obtained by θ. e the bound d(S(θ) Remark 12 (Generic setting: no particular assumptions on data model, or estimator). Importantly, Theorem 8 assumes no data model whatsoever, and treats θe as a generic estimator of θ0 . Of course, through the statement kθe − θ0 k2n = OP (Rn ), one sees that θe is random, constructed from data that depends on θ0 , but no specific data model is required, nor are any specific properties of θe (other than its `2 error rate). This flexibility allows for the result to be applied in any problem setting in which one has control of the estimation error of a piecewise constant parameter θ0 . Apart from the applications of Theorem 8 to the fused lasso estimator, where we consider data from a standard model as in (1), with θ0 being the mean, and i.i.d. sub-Gaussian errors (see Corollaries 9 and 10 below), we could instead suppose that data is distributed according to, e.g., a Poisson model with natural parameter θ0 , yi ∼ Pois(eθ0,i ), i = 1, . . . , n. (13) If we knew of an estimate θe for θ0 such that the estimation error kθe − θ0 k2n was analyzable, then we e In could use Theorem 8 to infer a bound on the screening distance between changepoints of θ0 and θ. this paper, we do not describe particular applications of Theorem 8 beyond the sub-Gaussian error model in (1), since we are not aware of estimation error guarantees outside of this model. However, establishing `2 estimation error rates for models like (13) (which may be used to describe say copy number data in genetics), and interpreting the resulting changepoint approximation guarantees would be an interesting topic for future work. (For model (13), and other likelihood-based models with a piecewise constant parameter θ0 , we suspect that the fused lasso provides a basis for a good estimator: simply replace the squared error loss in (2) by the negative log likelihood.) We present two different corollaries of Theorem 8 for the fused lasso. The first is given by using Theorem 1 and the associated rate Rn = n−2/3 Cn in the weak sparsity case, and the second is given by using Theorem 4 and the associated rate Rn = (log n log log n)/n in the strong sparsity case. The proofs are immediate and are hence omitted. Corollary 9 (Fused lasso screening result, weak sparsity setting). Assume the conditions 1/3 √ of Theorem 1, so that TV(θ0 ) ≤ Cn for a sequence Cn . Also assume that Hn = ω(n1/6 Cn / Wn ). −1/3 Let θb be the fused lasso estimate in (2), with λ = Θ(n1/3 Cn ). Then  1/3 2/3   n Cn b d S | S0 = OP . Hn2 Corollary 10 (Fused lasso screening result, strong sparsity setting). Assume the conditions p (log n log log n)/n). of Theorem 2, so that s0 = O(1) and Wn = Θ(n). Also assume that H = ω( n √ Let θb be the fused lasso estimate in (2), with λ = Θ( n). Then    log n log log n d Sb | S0 = OP . Hn2 2 Remark 13 (Conditions on Wn√, Hn ). We have rewritten the condition p that nRn /Hn = o(Wn ) in 1/6 1/3 Theorem 8 as Hn = ω(n Cn / Wn ) in Corollary 9, and Hn = ω( (log n log log n)/n) in Corollary 10 (note that in the latter, we are assuming that Wn = Θ(n)). Remark 14 (Screening under weak sparsity). Corollary 9 handles a difficult setting in which the number of changepoints s0 in θ0 can grow quickly with n, and yet it still provides a reasonable b | S0 ) provided that Cn is not too large (i.e., TV(θ0 ) is not bound on the screening distance d(S(θ) growing too quickly), or Hn is large enough (i.e., the minimum signal gap in θ0 is large enough). As 12 an example, suppose that s0 = Θ(n1/6 ), and the changepoints in θ0 are evenly spread out, so that 1/3 Wn = Θ(n5/6 ). Then Corollary 9 implies, provided that Hn = ω(n−1/4 Cn ),  1/3 2/3   n Cn = oP (n5/6 ), d Sb | S0 = OP Hn2 so for each true changepoint, there is at least one estimated changepoint that is much closer to it than all of the other true changepoints (each of which is at least a distance Wn = Θ(n5/6 ) away). 1/3 From the condition Hn = ω(n−1/4 Cn ), and the fact that we must always have Cn ≥ s0 Hn (recall 1/6 s0 = Θ(n )), we can be more explicit here about the allowable ranges for Hn , Cn : combining the last two relationships gives Cn = ω(n−1/8 ), and then Hn = ω(n−7/24 ). Hence, the minimum signal gap requirement here is very reasonable, allowing Hn to shrink to 0, just not too quickly (this is far √ from a trivial regime, e.g., with Hn = ω( log n), when simple thresholding of pairwise differences achieves perfect recovery, as shown in Sharpnack et al. (2012)). Remark 15 (Comparison to Theorem 3). Corollary 10 provides a similar conclusion to that in Harchaoui & Lévy-Leduc (2010), restated in Theorem 3: in a strong sparsity setting, the fused lasso has a well-controlled screening distance, only slightly larger than log n/Hn2 . However, we note that Corollary 10 guarantees this screening bound under a natural choice for the tuning parameter λ, known to provide good `2 estimation performance (see Theorem 4), whereas Theorem 3 implicitly requires λ to be very small, which seems unnatural (see Remark 5). p Remark 16 (Changepoint detection limit). The restriction √ that Hn = ω( (log n log log n)/n) in Corollary 10 is very close to the optimal limit of Hn = ω(1/ n) for changepoint detection: Duembgen & Walther (2008) showed that in Gaussian changepoint model with a single elevated region, and Wn = √ Θ(n), there is no test for detecting a changepoint that has asymptotic power 1 unless Hn = ω(1/ n). See also Chan & Walther (2013). 4.2 Post-processing for approximate changepoint recovery e in such a way that aims We study a procedure for post-processing the estimated changepoints in θ, to eliminate changepoints of θe that lie far away from changepoints of θ0 . Our procedure is based on convolving θe with a filter that resembles the mother Haar wavelet. Consider e = Fi (θ) i+b 1 Xn e 1 θj − bn j=i+1 bn i X θej , for i = bn , . . . , n − bn , (14) j=i−bn +1 for an integral bandwidth bn > 0. Our result in this subsection asserts that, by evaluating the filter e at all locations i = bn , . . . , n − bn , and retaining only locations at which the filter value is large Fi (θ) (in magnitude), we can approximately recovery the changepoints of θ0 , in the Hausdorff metric. Theorem 11 (Generic recovery result). Let θ0 ∈ Rn be a piecewise constant vector, and θe ∈ Rn be an estimator that satisfies the error bound kθe − θ0 k2n = OP (Rn ). Consider the following procedure: we evaluate the filter in (14) with bandwidth bn at all locations i = bn , . . . , n − bn , and we keep only the locations whose filter value is greater than or equal to a threshold level τn , in magnitude. Denote the resulting “filtered” set by n o e = i ∈ {bn , . . . , n − bn } : |Fi (θ)| e ≥ τn . SF (θ) (15) If the bandwidth and threshold values satisfy bn = ω(nRn /Hn2 ), 2bn ≤ Wn , and τn /Hn → ρ ∈ (0, 1) as n → ∞, then we have    e S0 ≤ bn → 1 as n → ∞, P dH SF (θ), where dH ( ·, · ) is the Hausdorff distance, as defined in (7). 13 Proof. The proof is not complicated conceptually, but requires some careful bookkeeping. Also, we make use of a few key lemmas whose details will be given later. Fix  > 0 and C > 0. Let N1 > 0 be an integer such that for all n ≥ N1 ,    P kθe − θ0 k2n > CRn ≤ . 2 Set  = min{ρ, 1 − ρ}/2. As bn = ω(nRn /Hn2 ), there is an integer N2 > 0 such that for all n ≥ N2 , 2CnRn ≤ (0.99Hn )2 . bn As τn /Hn → ρ ∈ (0, 1), there is an integer N3 > 0 such that for all n ≥ N3 , (ρ − )Hn ≤ τn ≤ (ρ + )Hn . Set N = max{N1 , N2 , N3 }, and take n ≥ N . Note that  ≤ ρ −  and ρ +  ≤ 1 −  by construction, and thus by the last two displays, r r 2CnRn 2CnRn < τn < Hn − . (16) bn bn Now observe          e S0 > bn ≤ P d SF (θ) e | S0 > bn + P d S0 | SF (θ) e > bn . P dH SF (θ), (17) We focus on bounding each term on the right-hand side above separately. For the first term on the e ≥ τn for all ti ∈ S0 , then d(SF (θ) e | S0 ) ≤ bn . By the right-hand side in (17), observe that if Fti (θ) contrapositive,      e | S0 > bn ≤ P |Ft (θ)| e < τn for some ti ∈ S0 P d SF (θ) i r   2CnRn e for some ti ∈ S0 , (18) ≤ P |Fti (θ)| < Hn − bn where in the second line we used the upper bound on τn in (16). Suppose that kθe − θ0 k2n ≤ CRn ; e can be made with this error bound in place. then, for ti ∈ S0 , Lemma 13 tells us how small |Fti (θ)| Specifically, define a = (−1/bn , . . . , −1/bn , 1/bn , . . . , 1/bn ) {z } | {z } | bn times and also r = and c = (θ0,ti −bn +1 , . . . , θ0,ti +bn ), bn times √ CnRn . Then Lemma 13 implies the following: if kθe − θ0 k2n ≤ CRn , then r r 2CnRn 2CnRn > e |Fti (θ)| ≥ |a c| − rkak2 ≥ |θ0,ti +1 − θ0,ti | − ≥ Hn − . bn bn Therefore, continuing on from (18), r      2CnRn e e P d SF (θ) | S0 > bn ≤ P |Fti (θ)| < Hn − for some ti ∈ S0 bn   ≤ P kθe − θ0 k2n > CRn  ≤ . 2 14 It suffices to consider the second term in (17), and show that this is also bounded by /2. Note that      e e P d S0 | SF (θ) > bn ≤ P |Fi (θ)| ≥ τn at some i such that θ0,i−bn +1 = . . . = θ0,i+bn r   e > 2CnRn at some i such that θ0,i−b +1 = . . . = θ0,i+b . ≤ P |Fi (θ)| n n bn (19) In the second inequality we used the lower bound on τn in (16). Similar to the previous argument, suppose that kθe − θ0 k2n ≤ CRn ; for any location i in consideration in (19), Lemma 12 tells us how e can be made with this error bound in place. Defining large |Fi (θ)| a = (−1/bn , . . . , −1/bn , 1/bn , . . . , 1/bn ) {z } | {z } | bn times and r = √ and c = (θ0,i−bn +1 , . . . , θ0,i+bn ), bn times CnRn , as before, the lemma says the following: if kθe − θ0 k2n ≤ CRn , then r 2CnRn > e |Fi (θ)| ≤ |a c| + rkak2 = . bn Hence, continuing on from (19), r      2CnRn e e P d S0 | SF (θ) > bn ≤ P |Fi (θ)| > at some i such that θ0,i−bn +1 = . . . = θ0,i+bn bn   ≤ P kθe − θ0 k2n > CRn  ≤ , 2 completing the proof. Remark 17 (Comparison to Theorem 8). Though they are stated differently, the rates in Theorems 8 and 11 for approximate changepoint screening and recovery, respectively, are comparable. To see this, note that the conclusion in the latter implies    e | S0 ≤ dn → 1 as n → ∞, P d S(θ) for any sequence dn = ω(nRn /Hn2 ), which is in line with Theorem 11. (The original conclusion that e | S0 ) = OP (nRn /H 2 ) is a somewhat stronger statement, though the difference is not major.) d(S(θ) n Remark 18 (Generic setting: no particular assumptions on data model, or estimator). To emphasize a similar point to that in Remark 12, Theorem 11 does not use a specific data model, and considers any estimator θe for which we have `2 error control, kθe − θ0 k2n = OP (Rn ). This makes it a very flexible and broadly applicable result. When the data comes from a model as in (1), where θ0 is the mean and we have i.i.d. sub-Gaussian errors, we can apply Theorem 11 to the fused lasso, given our knowledge of its `2 error rate (see Corollaries 14 and 15 below). It could also be applied, under the same data model, to many other estimators whose `2 error rates are known (such as the Potts estimator, and unbalanced Haar wavelets). Moreover, it could be useful under different data models, like the Poisson model in (13), as it would provide approximate recovery guarantees for any method with a fast enough `2 estimation error rate. (Note that the post-processing step using the filter (14) does not itself require assumptions about the data.) We do not consider such extensions in the current paper, but they suggest interesting directions for future work. 15 The proof of Theorem 11 relied on two lemmas, that we state below. Their proofs are based on simple arguments in convex analysis and deferred until Appendix C. Lemma 12. Given a, c ∈ Rm , r ≥ 0, the optimal value of the (nonconvex) optimization problem max |a> x| subject to kx − ck2 ≤ r (20) x∈Rm is |a> c| + rkak2 . Lemma 13. Given a, c ∈ Rm , r ≥ 0 such that |a> c| − rkak2 ≥ 0, the optimal value of the (convex) optimization problem minn |a> x| subject to kx − ck2 ≤ r (21) x∈R > is |a c| − rkak2 . We finish this subsection with two corollaries of Theorem 11 for the fused lasso estimator, in the weak and strong sparsity cases. The proofs are immediate and are thus omitted. Corollary 14 (Fused lasso recovery result, weak sparsity setting). Assume the conditions of Theorem 1, so that TV(θ0 ) ≤ Cn for a sequence Cn . Let θb be the fused lasso estimate in (2), with −1/3 b as described in Theorem 11, to proλ = Θ(n1/3 Cn ), and consider applying the filter in (14) to θ, b If the bandwidth and threshold satisfy bn = bn1/3 Cn2/3 ν 2 /H 2 c ≤ Wn /2 duce a filtered set SbF = SF (θ). n n for a sequence νn → ∞, and τn /Hn → ρ ∈ (0, 1), then   2/3 n1/3 Cn νn2 b P dH (SF , S0 ) ≤ →1 Hn2 as n → ∞. Corollary 15 (Fused lasso recovery result, strong sparsity setting). Assume the conditions b of Theorem √ 2, so that s0 = O(1) and Wn = Θ(n). Let θb denote the fused lasso estimate in (2), with λ = Θ( n), and consider applying the filter in (14) to θ, as in Theorem 11, to produce a filtered set b If the bandwidth and threshold values satisfy bn = b(log n log log n)ν 2 /H 2 c ≤ Wn /2 for SbF = SF (θ). n n a sequence νn → ∞, and τn /Hn → ρ ∈ (0, 1), then   (log n log log n)νn2 P dH (SbF , S0 ) ≤ → 1 as n → ∞. Hn2 Remark 19 (Recovery under weak sparsity, comparison to BS). Corollary 14 considers a challenging setting in which the number of changepoints s0 in θ0 could be growing quickly with n, and the only control that we have is TV(θ0 ) ≤ Cn . We draw a comparison here to known results on binary segmentation (BS). Corollary 14 on the (filtered) fused lasso and Theorem 3.1 in Fryzlewicz (2014) on the BS estimator θbBS , each under appropriate conditions on Wn , Hn , state that 2/3 n1/3 Cn log n dH (SbF , S0 ) ≤ Hn2 versus  n log n dH S(θbBS ), S0 ≤ c Hn2 respectively, (22) where c > 0 is a constant, and probability approaching 1. The result on SbF √both bounds hold with1/3 2/3 is obtained by choosing νn = log n and then bn = bn Cn log n/Hn2 c in Corollary 14. Examining (22), we see that, when Cn scales more slowly than n, Theorem 11 provides the stronger result: the 2/3 term n1/3 Cn will be smaller than n, and thus the bound on dH (SbF , S0 ) will be sharper than that BS b on dH (S(θ ), S0 ). But we must also examine the specific restrictions that each result in (22) places on s0 , Wn , Hn . Consider the simplification Wn = Θ(n/s0 ), corresponding to a case in which the changepoints in θ0 2/3 are spaced evenly apart. For Corollary 14, starting with the condition n1/3 Cn log n/Hn2 ≤ Wn /2, plugging in the relationship Cn ≥ s0 Hn , and rearranging to derive a lower bound on the minimum 16 5/4 signal gap, gives Hn = Ω(s0 n−1/2 log3/4 n). If s0 = Θ(n2/5 ), then we see that the minimum signal gap requirement becomes Hn = Ω(log3/4 n), which is growing with n and is thus too stringent to be interesting (recall, as discussed previously, that Sharpnack et al. √ (2012) showed simple thresholding of pairwise differences achieves perfect recovery when Hn = ω( log n)). Hence, to accommodate signals for which Hn remains constant or even shrinks with n, we must restrict the number of jumps in θ0 according to s0 = O(n2/5−δ ), for any fixed δ > 0. Meanwhile, inspection of Assumption 3.2 in Fryzlewicz (2014) reveals that his Theorem 3.1 requires s0 = O(n1/4−δ ), for any δ > 0, in order to handle signals such that Hn remains constant or shrinks with n. In short, the (effectively) allowable range for s0 is larger for Theorem 11 than for Theorem 3.1 in Fryzlewicz (2014). Even when we look within their common range, Theorem 11 places weaker conditions on Hn . As an example, consider s0 = Θ(n1/6 ) and Wn = Θ(n5/6 ). The fused lasso result in (22) requires Hn = Ω(n−7/24 log4/3 n), and the BS result in (22) requires Hn = Ω(n−1/6+δ ), for any δ > 0. Finally, to reiterate, the fused lasso result in (22) gives a better Hausdorff recovery bound when Cn is small compared to n; at the extreme end, this is better by a full factor of n2/3 , when Cn = O(1). While the post-processed fused lasso looks favorable compared to BS, based on its approximate changepoint recovery properties in the weak sparsity setting, we must be clear that the analyses for other methods—wild binary segmentation (WBS), the simultaneous multiscale changepoint estimator (SMUCE), and tail-greedy unbiased Haar (TGUH) wavelets—are still much stronger in this setting. Such methods have Hausdorff recovery bounds that are only possible for the post-processed fused lasso (at least, using our current analysis technique) when we assume strong sparsity. This is discussed next. Remark 20 (Recovery under strong sparsity, comparison to other methods). When s = O(1) and Wn = Θ(n), Corollary 10 shows that the post-processed fused lasso estimator delivers a Hausdorff bound of log2 n , (23) dH (SbF , S0 ) ≤ Hn2 on the set Sbp F of filtered changepoints, with probability approaching 1. This is obtained by choosing (say) νn = log n/ log log n and bn = blog2 n/Hn2 c√≤ Wn /2 in the corollary. The effective restriction √ on the minimum signal gap is thus Hn = Ω(log n/ n), which is quite reasonable, as Hn = ω(1/ n) is needed for any method to detect a changepoint with probability tending to 1 (recall Remark 16). Several other methods—the Potts estimator (Boysen et al. 2009), binary segmentation (BS) and wild binary segmentation (WBS) (Fryzlewicz 2014), the simultaneous multiscale changepoint estimator (SMUCE) (Frick et al. 2014), and tail-greedy unbiased Haar wavelets (TGUH) (Fryzlewicz 2016)— all admit Hausdorff recovery bounds that essentially match (23), under similarly weak restrictions on Hn . But, it should be noted that the latter three methods—WBS, SMUCE, and TGUH—continue to enjoy these same sharp Hausdorff bounds outside of the strong sparsity setting, namely, their analyses do not require that s0 = O(1) and Wn = Θ(n), and instead just place weak restrictions on the allowed combinations of Wn , Hn (e.g., the analysis of WBS in Fryzlewicz (2014) only requires Wn Hn2 ≥ log n). These analyses (and those for all previously described estimators) are more refined than that given in Corollary 15: they are based on specific properties of the estimator in question. The corollary, on the other hand, follows from Theorem 8, which uses a completely generic analysis that only assumes knowledge of the `2 error rate. 4.3 Post-processing on a reduced set Recall that the strategy studied in Theorem 11 was to apply the Haar filter in (14) at each location i = bn , . . . , n − bn and then check for large absolute values. Computationally, this not expensive—it only requires O(n) operations—but there is an undesirable feature of this strategy with respect to e it is possible practical usage. Writing the original number of estimated changepoints as se = |S(θ)|, e in practice for the size of the filtered set SF (θ) in (15) to be much larger than se, if the bandwidth 17 and threshold parameters are not set appropriately. Indeed, as the filter is being applied at n − 2bn locations, it is possible for the filtered set to have precisely this many elements. Here we propose a modified strategy that runs the filter on (at most) 3e s + 2 changepoints, and then as usual, keeps only changepoints whose absolute filter values are large. This modified strategy has essentially same the theoretical guarantee of approximate changepoint recovery as the original “exhaustive” strategy from Section 4.2, but enjoys the practical advantage that, no matter how the bandwidth and threshold parameters are chosen, the final set of detected changepoints is bounded in size by 3 times the number of changepoints in θe (plus 2, to be precise). Before stating the main result of this subsection, we introduce a “candidate” set for locations for changepoints, n o e = i ∈ {bn , . . . , n − bn } : i ∈ S(θ), e or i + bn ∈ S(θ), e or i − bn ∈ S(θ) e ∪ {bn , n − bn }. (24) IC (θ) These are estimated changepoints, locations that are at a distance bn from estimated changepoints, or boundary points. Theorem 16 (Generic recovery result, reduced post-processing). Assume the conditions of Theorem 11, but consider a modified strategy in which we only evaluate the filter in (14) at locations e in (24), and define a “reduced” set of filtered points based on the locations in the candidate set IC (θ) whose filter value is at least τn , n o e = i ∈ IR (θ) e : |Fi (θ)| e ≥ τn . SR (θ) (25) Then, subject to the same conditions on bn , τn as in Theorem 11, we have    e S0 ≤ 2bn → 1 as n → ∞. P dH SR (θ), Proof. We will show that n o n o   e S0 ≤ bn ⊆ dH SR (θ), e S0 ≤ 2bn , dH SF (θ), (26) Since the left-hand side occurs with probability tending to 1, by Theorem 11, so will the right-hand side. To show the desired containment, recall that, by the definition of Hausdorff distance, n o n o n o    e S0 ≤ bn = d S0 | SF (θ) e ≤ bn ∩ d SF (θ) e | S0 ≤ bn . dH SF (θ), (27) Inspecting the first term on the right-hand side of (27), we observe n o n o n o    e ≤ bn ⊆ d S0 | SF (θ) e ≤ 2bn ⊆ d S0 | SR (θ) e ≤ 2bn , d S0 | SF (θ) (28) e ⊆ SF (θ). e Inspecting the second term on the right-hand where the last containment holds as SR (θ) e side of (27), we use Lemma 17 which states that for each j ∈ {bn , . . . , n − bn }, there exists i ∈ IC (θ) e ≥ |Fj (θ)|. e Using this, we see such that |i − j| ≤ bn and |Fi (θ)| n o n o  e | S0 ≤ bn = for all ` ∈ S0 , there exists j ∈ SF (θ) e such that |` − j| ≤ bn d SF (θ) n o e such that |` − i| ≤ 2bn ⊆ for all ` ∈ S0 , there exists i ∈ IC (θ) n o  e | S0 ≤ 2bn . = d SR (θ) (29) Above, we have used Lemma 17 for the containment in the second line. Combining (27), (28), and (29), we have established (26), as desired. The proof of Theorem 16 relied on the following lemma. Its proof can be found in Appendix D. e be the candidate set defined in (24). For every location j ∈ {bn , . . . , n − bn } Lemma 17. Let IC (θ) e > 0, there exists a location i ∈ IC (θ) e such that |i − j| ≤ bn and |Fi (θ)| e ≥ |Fj (θ)|. e where |Fj (θ)| 18 5 Implementation considerations and experiments We develop a data-driven procedure to determine the threshold level τn of the filter in (14), used to e from an estimate θ, e as described in (15) in Theoderive a post-processed set of changepoints SF (θ) rem 11. We also present a number of simulation results to support and complement the theoretical developments in this paper. A data-driven procedure for choosing τn . Let A(·) denote a fitting algorithm that, applied to data y, outputs an estimate θe of θ0 (e.g., A(y) could be the minimizer in (2), so that its output is the fused lasso estimate). In Algorithm 1, we present a heuristic but intuitive method for choosing e Aside from the threshold level τn , based on (entrywise) permutations of the residual vector y − θ. the choice of fitting algorithm A(·), we must specify a number of permutations B to be explored, a bandwidth bn for the filter in (14), and a quantile level q ∈ (0, 1). The intuition behind Algorithm 1 is to set τn large enough to suppress “false positive” changepoints 100 · q% of the time (according to the permutations). This is revisited later, in the discussion of the simulation results. Some example settings: we may choose A(·) to be the fused lasso estimator, where the tuning parameter λ is selected to minimize 5-fold cross-validation (CV) error, B = 100, and q = 0.95. The choice of bandwidth bn is more subtle, and unfortunately, there is no specific answer that works for all problems.4 But, the theory in the last section provides some general guidance: e.g., for problems in which we believe there are a small number of changepoints (i.e., s0 = O(1)) of reasonably large magnitude (i.e., Hn = Ω(1)), Theorem 11 instructs us to choose a bandwidth that grows faster than log n log log n, so, choosing bn to scale as log2 n would suffice. We will use this scaling, as well as the above suggestions for A(·), B, and q in all coming experiments, unless otherwise specified. Algorithm 1 Permutation-based approach for choosing τn 0. Input a fitting algorithm A(·), number of permutations B, bandwidth bn , and quantile level q ∈ (0, 1). e denote the changepoints, and r = y − θe the residuals. 1. Compute θe = A(y). Let Se = S(θ) 2. For each b = 1, . . . , B, repeat the following steps: (a) Let r(b) be a randomly-chosen permutation of r, and define auxiliary data y (b) = θe + r(b) . (b) Rerun the fitting algorithm on the auxiliary data to yield θe(b) = A(y (b) ). (c) Apply the filter in (14) to θe(b) (with the specified bandwidth bn ), and record the largest e Formally, magnitude τb(b) of the filter values at locations greater than bn away from S. τb(b) = max i∈{bn ,...,n−bn }: e d(S|{i})>b n Fi (θe(b) ) . 3. Output τbn , the level q quantile of the collection τb(b) , b = 1, . . . , B. e or the After running Algorithm 1 to compute τbn , the idea is to proceed with the full filter SF (θ) e e reduced filter SR (θ), applied at the level τn = τbn , to the estimate θ computed on the original data y at hand. In the experiments that follow, we use the reduced filter, though similar conclusions would hold with the full filter. 4 We note that in some situations, problem-specific intuition can yield a reasonable choice of bandwidth b . Also, n it should be possible to extend Algorithm 1 to choose both τn and bn , but we do not pursue this, for simplicity. 19 0 200 400 600 10 0 5 ● ● ●● ●● ●● ●●● ● ● ● ●●●●● ●● ● ● ●● ● ● ● ●●● ●● ● ● ● ● ● ●● ● ● ● ●● ●● ●● ●● ● ● ●●● ●●● ● ●● ● ●●●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ●●●●● ●● ●● ● ●● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ●●● ● ● ● ●● ●● ● ● ●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ●●●●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ●● ● ●●●● ● ● ●● ●● ● ●● ● ● ●● ●● ● ●● ●● ● ● ● ● ● ● ● ●●● ●●●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●●●● ● ●● ● ●● ● ● ●● ● ● ●● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ●● ● ● ● ● ● ● ● ●● ● ●●● ● ●● ●● ●● ● ●● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ● ●● ● −5 −5 0 5 10 Simulation setup. In our experiments, we use the following simulation setup. For a given n, the mean parameter θ0 ∈ Rn is defined to have s0 = 5 equally-sized segments, with levels 0, 2, 4, 1, 4, from left to right. Data y ∈ Rn is generated around θ0 using i.i.d. N (0, 4) noise. Lastly, the sample size n is varied between 100 and 10, 000, equally-spaced on a log scale. Figure 2 shows example data sets with n = 774 and n = 10, 000. 800 ●●● ● ● ● ●● ●● ● ● ●●● ● ●● ● ● ● ●●●● ● ●● ●●●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ●● ● ●● ● ● ● ● ●●● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ●●●● ● ●● ●● ● ● ● ●●● ● ● 0 2000 4000 6000 8000 10000 Figure 2: An example from our simulation setup for n = 774 (left) and n = 10, 000 (right), where in each panel, the mean θ0 is plotted in red, and the data points in gray. Evaluation of the filter. We demonstrate that the filter in (14), with bn = b0.25 log2 nc, can be effective at reducing the Hausdorff distance between estimated and true changepoint sets. We first illustrate the use of the filter in a single data example with n = 774, in Figure 3. As we can see, the fused lasso originally places a spurious jump around location 250, but this jump is eliminated when we apply the filter, provided that we set the threshold to be (say) τn = 0.5. Figure 4 now reports the results from applying the filter in problems of sizes between n = 100 and n = 10, 000, using 50 trials for each n. We consider three different sets of changepoint estimates: b the original changepoints from fused lasso estimate θb tuned with 5-fold CV tuning; SR (θ), b Sb = S(θ), b with τn chosen by the changepoints after applying the reduced filter as described in Theorem 16 to θ, b an oracle set of changepoints given by trying a wide range of τn values and Algorithm 1; and SO (θ), choosing the value that minimizes the Hausdorff distance after filtering (this assumes knowledge of S0 , and is infeasible in practice). These are labeled as “original”, “data-driven”, and “oracle” in the figure, respectively. As we can see from the left and middle panels, the Hausdorff distance achieved by the original changepoint set grows nearly linearly with n, but after applying the reduced filter, the Hausdorff distance becomes very small, provided that n is larger than 1000 or so. Empirically, the Hausdorff distance associated with the filtered set appears to grow very slowly with n, nearly constant (slower than the the log n log log n rate guaranteed by Corollary 15). The right panel shows that our data-driven choices of τn are not substantially different from those made by the oracle. Screening distances, false positives. Figure 5 examines the outcomes from varying the filter b The results threshold τn in between 0 and 2, and then applying the reduced filter to produce SR (θ). are aggregated over 500 trials when n = 774 (i.e., 500 data instances drawn from the simulation b | S0 ) and “precision distance” d(S0 | SR (θ)) b are plotted setup), and the screening distance d(SR (θ) with τn . The former increases with τn , and the latter decreases; recall, the Hausdorff distance is the maximum of the two. We see that threshold levels from 0.5 to 1 yield a small Hausdorff distance. The left panel of Figure 6 shows the same results, but with the screening distance on the x-axis, and the precision distance on the y-axis. The red dot marks the screening distance and precision distance achieved by the data-driven rule from Algorithm 1, using B = 150 permutations. This lies basically at the “elbow” of the curve, just as we would desire. The middle panel of the figure plots the proportion of false positive detections (out of the 500 repetitions total) on the x-axis, versus the 20 10 ● ● ●● ●● ● ● ● ● ● ● ● ●●● ● ●● ●●● ● ●●● ● ● ● ● ● ●●● ●●● ● ●● ●●● ●● ●●● ●●●● ● ● ●● ●● ●● ● ●● ● ● ● ●● ●● ● ● ● ●● ● ● ● ●● ● ●●●● ●●● ●●● ● ● ● ●● ● ● ●●● ● ●● ● ● ●● ● ●● ●● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ●● ● ●●●●●●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ●●● ● ●● ● ● ●●●● ● ● ●●● ● ● ●● ●● ● ●● ● ● ●● ● ●● ● ● ● ●●● ● ●●● ● ● ● ● ●● ●● ● ●●● ●● ●● ●●● ● ●●●●●●●●● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ●● ●● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ●● ●● ● ●● ● ● ●●●● ● ● ●● ●● ● ● ●● ●●● ●●●● ●● ●● ●● ●● ● ● ● ●● ●● ● ● ●●●●●● ● ● ● ● ●●● ●● ●●●●● ● ● ● ●● ● ● ●●●● ●● ● ● ● ● ●● ● ●● ● ●● ●●●● ● ● ●● ● ●● ● ●●● ●● ● ●● ●● ●● ● ●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ●●●● ● ●● ● ●● ●● ●● ● ●● ●● ●● ●● ● ●● ●● ● ●● ●●● ● ●●● ●● ● ●● ● ●● ●● ●● ●●● ● ● ●● ●● ● ● ● ● ●●●● ● ●● ●●● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ●● ● ●● ●● ● ●●●● ●●● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● −5 0 Data values 5 ● 200 400 2.0 0 600 800 Index ● ● ●● 1.5 Absolute filter values ● ●● ●● 1.0 ● ● ● ●● ● ●● ● ● ● ● ● ● 0.5 ● ● ● ● ● ● 0.0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 200 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 400 ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 600 800 Figure 3: In the top plot, an example with n = 774 is shown from our simulation setup, where the data y is 0 ● ● 2000 4000 6000 8000 1.6 1.4 1.2 1.0 Threshold 0 Data−driven Oracle ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● 0.6 ● ● ● ● ● ● ●●● ● ● 0.8 300 200 Hausdorff distance ● Data−driven Oracle ● ● 2000 4000 6000 8000 n n ● 0.4 ● ● ● ● ● ● ● ● ●●● ● ● 100 ● 0 1000 ● ● 500 0 Hausdorff distance 1500 Original Data−driven Oracle 400 drawn in gray, the mean θ0 in red, and the fused lasso estimate θb in blue. In the bottom plot, the filter values b i = 1, . . . , n are drawn in blue, and the threshold τn is drawn as a horizontal green line. Changepoints Fi (θ), before and after filtering are marked by short black lines along the bottom and top x-axes, respectively. 0 2000 4000 6000 8000 n Figure 4: In the left panel, the Hausdorff distances between original changepoints, filtered changepoints with a data-driven threshold, and filtered changepoints with an oracle threshold, are plotted (in black, blue, and red, respectively). The results are aggregated across 50 trial runs for each sample size n; the solid dots display the median values, and the vertical segments display the interquartile ranges (25th to 75th percentiles). The middle panel zooms in on the Hausdorff distances for the data-driven and oracle filtering procedures, and the right panel displays the choices of τn for these procedures. 21 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 150 0 50 100 Distance 200 250 300 Precision distance Screening distance ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.0 0.5 1.0 1.5 2.0 Filter threshold b | S0 ) (in black) and the precision distance d(S0 | SR (θ)) b (in red) Figure 5: The screening distance d(SR (θ) are shown as functions of the threshold τn used for the filtered set. These were aggregated over 500 trials, in which n = 774; the dots display the median values, and the vertical segments are drawn from the 25th to 75th percentiles. We can see a substantial jump in the screening distance once a bit after τn = 1 and again b suppressing all after τn = 1.5, where the median value is close to one of the quartiles. This is due to SR (θ) of the estimated changepoints near a particular true changepoint, at these critical values of τn . proportion of true positive detections on the y-axis. Here, note, we define a false positive detection to be the event that any estimated changepoint is more than bn away from all true changepoints, or b > bn , and a true positive detection to be the event that all true simply, the event that d(S0 | SR (θ)) b | S0 ) ≤ bn . Therefore, changepoints have estimated changepoints at most bn away, or simply, d(SR (θ) to be perfectly concrete, the x-axis and y-axis are displaying a certain type of false positive and true positive rates (FPR and TPR), defined as FPR = b > bn # trials in which d(S0 | SR (θ)) # of trials and TPR = b | S0 ) ≤ bn # trials in which d(SR (θ) . # of trials The red dot again marks the FPR and TPR achieved by the data-driven rule in Algorithm 1 for choosing the threshold, about 0.26 and 0.7, respectively. We might expect here, having set q = 0.95 in Algorithm 1, to see a FPR close to 0.05 (because the choice of threshold in Algorithm 1 precisely controls the FPR at 0.05 over the permutations encountered in the procedure). However, this is not the case on in our simulation, and the actual FPR is higher. This phenomenon is not specific to the quantile choice of q = 0.95, as shown in the right panel of Figure 6. For a varying quantile level q in between 0 and 1, we ran Algorithm 1, used the corresponding threshold for our filter, and measured the FPR achieved by the filtered changepoint set. As we can see, the actual FPR is generally higher than 1 − q. Fused lasso fast `2 error rate, under strong sparsity. We finish by examining the (squared) `2 error kθb − θ0 k2n as it scales with n, when the fused lasso estimate θb in (2) is tuned appropriately. 22 ●● ● ● ● ● ●●●●●●● ●● ●●● ● ● ● 0.8 ● ● ●● ● ● ● ● ● ● ● ● ● ●● 0 ● 50 100 ● ● ● ● ● ● 200 300 0.2 0.4 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.6 FDR 0.6 0.4 0.2 TPR ● ● 0 ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●● 1.0 1.0 0.8 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.0 80 60 40 20 Precision distance 120 ● ●●●●●●●● ●●●●●●●● ●●●●●●● ●●●●● ●●●● ●●● ●●●● ●●●● ● ● ●● ●● ●● ●●● ●● ●●●● ●● ● ●●● ● ●● ●● ●● ● ● ●● ●● ●● ●● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● 0.0 0.2 0.4 Screening distance 0.6 0.8 1.0 0.0 0.2 0.4 FPR 0.6 0.8 1.0 1−q b and the screening distance d(SR (θ) b | S0 ), Figure 6: The left panel plots the precision distance d(S0 | SR (θ)) as the threshold τn is varied from 0 to 2. Shown are the median distances over 500 trials for a problem with n = 774. The red dot marks the precision and screening distances achieved by the data-driven threshold level chosen by Algorithm 1 with q = 0.95. The middle panel shows the same, but with true positive rate (TPR) against false positive rate (FPR). The right panel shows the achieved FPR against 1−q, as the input quantile level q is varied in Algorithm 1. 150 ● n * MSE 0.4 30 MSE ● 0 ● 0.2 ● ● ● 50 ● ● ● ● ● ● ● ● ● ● ● ● ● 0.0 ● 2000 4000 6000 8000 0 ● ● ● 2000 4000 6000 8000 n n ● 0 ● 0 10 ● ● ● ● 20 λ 40 0.6 ● 100 50 0.8 60 For different sample sizes ranging from n = 100 to n = 10, 000, we generated 50 example data sets from the same setup described previously, and on each data set, computed the fused lasso estimate θb with 5-fold CV to select the tuning parameter λ. Figure 7 reports the median value of λ, and the median achieved `2 error rate kθb − θ0 k2n , over the 50 trials, as functions of n. The results support the theoretical conclusion in Theorem 4, as the achieved `2 error rate scales at about the rate (log √ n log log n)/n. Also, since s0 = O(1), the results support the theoretical result that λ scales with n. 5 6 7 8 9 log(n) Figure 7: The left panel shows the value of λ chosen to minimize 5-fold CV error over the fused lasso path, aggregated over repetitions in our simulation setup, as the sample size n varies. This scales approximately as √ n, which is drawn as a red curve (with a best-fitting constant). The middle panel shows the corresponding (squared) `2 estimation error kθb − θ0 k2n , again aggregated over repetitions, as n varies. The scaling is about (log n log log n)/n (red curve). The right panel plots the median achieved values of nkθb − θ0 k2n against log n; this looks close to linear (red line), which provides empirical support to the claim that the fused lasso error rate is indeed (log n log log n)/n instead of log2 n/n (as this would have appeared as a quadratic trend in the right panel). In each panel, the vertical bars denote ±1 standard deviations. 23 6 Extensions We study screening properties that are implied by `2 error properties in two related problems: first, piecewise linear segmentation, and then, segmentation on graphs. 6.1 Piecewise linear segmentation We now consider data from a model as in (1) but where θ0,i , i = 1, . . . , n is a piecewise linear (rather than a piecewise constant) sequence. The main estimator of interest is linear trend filtering (Steidl et al. 2006, Kim et al. 2009, Tibshirani 2014), which can be seen as an extension of the fused lasso that penalizes second-order (rather than first-order) differences: n n−2 X 1X (yi − θi )2 + λ |θi − 2θi+1 + θi+2 |, θb = argmin 2 i=1 θ∈Rn i=1 (30) for a tuning parameter λ ≥ 0. Several other estimators are available in the piecewise linear segmentation problem, but given its ties to the fused lasso (and our focus on the fused lasso thus far), we focus on linear trend filtering in particular. In terms of detection, we are now interested in the locations of nonzero second-order differences, i.e., the “knots”, which mark the changes in slope across the entries of a parameter θ ∈ Rn :   θi−1 + θi+1 . S2 (θ) = i ∈ {2, . . . , n − 1} : θi 6= 2 b We again write S0,2 = {t1 , . . . , ts }, where We use the abbreviations S0,2 = S2 (θ0 ) and Sb2 = S2 (θ). 0 2 ≤ t1 < . . . < ts0 < n and s0 = |S0,2 |, and for convenience t0 = 0, ts0 +1 = n. We also carry forward analogous definitions for Wn , Hn : Wn = min i=0,1...,s0 (ti+1 − ti ) and Hn = min |θ0,i−1 − 2θ0,i + θ0,i+1 |. i∈S0,2 (31) Lastly, we define the discrete second-order total variation operator, acting on a vector x ∈ Rn , by TV2 (x) = n−1 X |xi−1 − 2xi + xi+1 |. i=2 The following describes the `2 estimation error of linear trend filtering, under weak sparsity. Theorem 18 (Trend filtering error rate, weak sparsity setting, Theorem 10 of Mammen & van de Geer 1997). Assume the data model in (1), with errors i , i = 1, . . . , n i.i.d. from a sub-Gaussian distribution as in (8). Also assume that TV2 (θ0 ) ≤ Cn , for a sequence Cn . Then for −3/5 λ = Θ(n1/5 Cn ), the linear trend filtering estimate θb in (30) satisfies kθb − θ0 k2n = OP (n−4/5 Cn2/5 ). Remark 21 (Consistency, optimality). The lemma shows that linear trend filtering is consistent when Cn = o(n2 ). When Cn = O(1), its error rate is n−4/5 , which is in fact minimax optimal as θ0 varies over the class of signals having bounded second-order total variation, i.e., θ0 ∈ {θ ∈ Rn : TV2 (θ) ≤ C} for a constant C > 0 (Donoho & Johnstone 1998). As in the fused lasso case, we refer the reader to Tibshirani (2014) for explanations of the above theorem and this minimax result, in notation that is more consistent with that of the current paper. 24 Remark 22 (Strong sparsity, higher polynomial degrees). Results for linear trend filtering in the strong sparsity setting, i.e., one in which s0 is assumed to be bounded (so that we are estimating a piecewise linear function with few knots) are not currently available, to the best of our knowledge. However, we suspect that the achieved error rate here will be close to the “parametric” 1/n rate, as in Theorems 2 and 4, on the fused lasso. It is also worth noting that the extension of trend filtering to fit piecewise polynomials of higher degrees (i.e., higher than 1, as in the current piecewise linear case) is covered in Tibshirani (2014), where `2 estimation error rates (under weak sparsity) are also derived. For simplicity, we do not consider the general piecewise polynomial setting in our study of approximate screening, below, though such an extension should be possible. Now we give our generic approximate screening result, analogous to that in Theorem 8. Theorem 19 (Generic screening result, piecewise linear segmentation). Let θ0 ∈ Rn be a piecewise linear vector, and θe ∈ Rn be an estimator satisfying the error bound kθe − θ0 k2n = OP (Rn ). 1/3 −2/3 Assume that n1/3 Rn Hn = o(Wn ), where, recall, Wn , Hn are as defined in (31). Then  1/3 1/3   n Rn e . d S2 (θ) | S0,2 = OP 2/3 Hn Proof. The proof follows that of Theorem 8 closely, but differs in the lower bound asserted in (12). As before, given any  > 0, C > 0, as know that for some integer N1 > 0 and all n ≥ N1 ,   C3 2 e P kθ − θ0 kn > Rn ≤ . 4 1/3 −2/3 ≤ Wn . Let We also know that for some integer N2 > 0 and n ≥ n2 , it holds that Cn1/3 Rn Hn 1/3 −2/3 e | S0,2 ) > rn . N = max{N1 , N2 }, take n ≥ N , and let rn = bCn1/3 Rn Hn c. Suppose that d(S2 (θ) Then there is a knot ti ∈ S0,2 such that there are no knots in θe within rn of ti , which means that θej displays a linear trend over the entire segment j ∈ {ti − rn , . . . , ti + rn }. Hence t +r 1 iXn n j=t −r i θej − θ0,j 2 ≥ 13rn3 ((θ0,ti +1 − θ0,ti ) − (θ0,ti − θ0,ti −1 ))2 13rn3 Hn2 C3 ≥ > Rn . 24n 24n 4 (32) n Here, the first inequality holds due to Lemma 20, the second holds by definition of Hn , and the third e | S0,2 ) > rn implies the estimation error exceeds (C 3 /4)Rn , by definition of rn . We see that d(S2 (θ) an event that we know occurs with probability at most , completing the proof. The proof of Theorem 19 relied on the next lemma, to construct the key lower bound (32). The lemma characterizes how well a piecewise linear function can be approximated by a linear one, and is proved in Appendix E. Lemma 20. Let f (x) be a piecewise linear function, defined over x = −r, . . . , r, by ( a1 x for x ≥ 0 f (x) = . a2 x for x < 0 Let e ax + eb be the optimal linear function for estimating f (x), according to squared error loss, i.e., (e a, eb) = argmin a,b∈R Then r X x=−r r X 2 f (x) − ax − b . x=−r 2 13r3 f (x) − e ax − eb ≥ (a2 − a1 )2 . 24 25 By combining Theorems 18 and 19, we have the following approximate screening result for linear trend filtering. The proof is omitted. Corollary 21 (Trend filtering screening result, weak sparsity setting). Assume the condi1/5 −3/2 tions in Theorem 18, thus T V2 (θ0 ) ≤ Cn for a sequence Cn . Also assume Hn = ω(n1/10 Cn Wn ). −2/3 Let θb denote the linear trend filtering estimate in (30) with λ = Θ(n1/5 Cn ). Then  1/15 2/15   n Cn . d Sb2 | S0,2 = OP 2/3 Hn Remark 23 (Knot screening under weak sparsity). To give an example of a challenging case √ n) knots, that can be accommodated by Corollary 21, consider a setting in which θ has s = Θ( 0 0 √ 1/5 evenly spread apart, so that Wn = Θ( n). Then, provided Hn = ω(n−13/20 Cn ), Corollary 21 says  1/15 2/15   √ n Cn b = oP ( n), d S2 | S0,2 = OP 2/3 Hn so that each true knot has a detected knot that is much closer to it than all other true knots. Note that Cn ≥ s0 Hn , and combining this with the requirement on Hn reveals the implicit requirement Cn = ω(n−3/16 ), which in turn implies that Hn = ω(n−11/16 ). This seems to be a weak requirement on the minimum nonzero change in slopes that is present in θ0 . 6.2 Changepoint detection on a graph We depart from the 1-dimensional setting considered throughout the paper thus far, and study the model (1) in a case where the mean parameter has components θ0,i , i = 1, . . . , n that correspond to nodes V = {1, . . . , n} of a graph G, with edges E = {e1 , . . . , em }. Note that, for each ` = 1, . . . , m, we may write e` = (i, j) for some nodes i, j (and all edges are to be considered undirected, so that (i, j) and (j, i) are equivalent). Moreover, the mean θ0 is assumed to behave in a piecewise constant fashion over the graph, which means that there are clusters of nodes over which θ0 admits constant values, or, equivalently, θ0,i = θ0,j for many edges (i, j) ∈ E. For estimation of θ0 , we focus on the graph fused lasso or graph-based total variation denoising (Tibshirani et al. 2005, Hoefling 2010, Tibshirani & Taylor 2011, Sharpnack et al. 2012), defined by n X 1X (yi − θi )2 + λ |θi − θj |, θb = argmin 2 i=1 θ∈Rn (33) (i,j)∈E for a tuning parameter λ ≥ 0. When G is a 1d chain graph (i.e., E = {(1, 2), (2, 3), . . . , (n − 1, n)}), the estimator in (33) reduces to the “usual” 1d fused lasso estimator in (2). In the current graph-based setting, the “changepoints” of interest are actually edges for which the corresponding nodes display differing values, under a vector θ ∈ Rn :  SG (θ) = (i, j) ∈ E : θi 6= θj . b For an edge (i, j) ∈ E, let Pij denote the We use the abbreviations S0,G = SG (θ0 ) and SbG = SG (θ). set of paths in G centered around (i, j), and embedded within two constant clusters of nodes, i.e., Pij = n (i` , i`−1 ) . . . , (i1 , i), (i, j), (j, j1 ), . . . , (j`−1 , j` ) for any ` = 1, . . . , n : o θ0,i = θ0,i1 = . . . = θ0,i` and θ0,j = θ0,j1 = . . . = θ0,j` . 26 We now define Wn , Hn over the graph G, in an analogous fashion to our notions in the 1d setting, Wn = min max (i,j)∈S0,G p∈Pij |p| − 1 2 and Hn = min (i,j)∈S0,G |θ0,i − θ0,j |, (34) where we write |p| for the number of edges that form a path p. Note that, as defined, 2Wn + 1 is the minimax length of any path centered around a changepoint in S0 ; in other words, by construction, for each changepoint (i, j) ∈ S0 , there exists a path of at least Wn edges embedded entirely within a cluster on either side of (i, j). When Wn is small, this is indicative of one of the constant clusters of nodes in θ0 being small in size. For x ∈ Rn , we define its graph-based discrete total variation to be X TVG (x) = |xi − xj |. (i,j)∈E Finally, we must precisely define our screening distance metric in the graph-based setting. For any two edges e1 = (i1 , j1 ), e2 = (i2 , j2 ) ∈ E, let dG (e1 , e2 ) denote the length of the shortest path that starts either i1 or j1 , and ends at either i2 or j2 . For sets A, B ∈ E, we define the screening distance dG (A|B) = max min e1 =(i1 ,j1 )∈B e2 =(i2 ,j2 )∈A dG (e1 , e2 ). Hence, if dG (A|B) = k, then for any edge in B, there is a path of at most k edges starting from this edge, and ending at an edge in A. Between Wang et al. (2016) and Hutter & Rigollet (2016), various estimation error rates are available for the graph fused lasso. These results take on different forms, depending on the assumptions placed on θ0 and on the graph G. Below we recite a result from Hutter & Rigollet (2016) in the case that G is a 2d grid graph. Here θb in (33) is called the 2d fused lasso estimate. Theorem 22 (2d fused lasso error rate, weak and strong sparsity settings, Corollary 5 of Hutter & Rigollet 2016). Assume the data model in (1), with errors i , i = 1, . . . , n i.i.d. 2 from N √ √(0, σ ). Assume that G is a 2d grid graph, with n nodes (hence the 2d grid is of dimension n × n). Write s0 = |S0,G |, and TVG (θ0 ) ≤ Cn , for some nondecreasing sequence Cn . Then for λ = Θ(log n), the 2d fused lasso estimate θb in (33) satisfies   log2 n 2 b . kθ − θ0 kn = OP min{s0 , Cn } n Remark 24 (Consistency, optimality). According to the theorem, the 2d fused lasso estimator is consistent when either s0 = o(n/ log2 n) or Cn = o(n/ log2 n). Theorem 22 covers both the weak and strong sparsity cases (since it allows us to draw conclusions involving either s0 or Cn ). In the case of weak sparsity, the Cn log2 n/n rate achieved by the 2d fused lasso was recently shown to be essentially minimax optimal (differing only by log factors), over the class of signals having bounded total variation over the 2d grid G, i.e., θ0 ∈ {θ ∈ Rn : TVG (θ) ≤ Cn }, by Sadhanala et al. (2016). Remark 25 (Other graphs). Basically the same result as in Theorem 22 holds for 3d and higherdimensional grids (except with one fewer log factor) (Hutter & Rigollet 2016). Estimation error rates for various types of random graphs, the complete graph, and star graphs are derived in Wang et al. (2016), Hutter & Rigollet (2016). For simplicity, we do not consider any of these cases when we give an application of our generic graph screening result, below; however, given the availability of `2 rates, we remark that results over different graph models (over than the 2d grid) are certainly possible, and are just a matter of plugging in the proper rates in the proper settings. Here is our generic graph screening result, analogous to that in Theorem 8 for the 1d chain. 27 Theorem 23 (Generic screening result, changepoint detection on a graph). Let θ0 ∈ Rn be piecewise constant over a graph G, and θe ∈ Rn be an estimator that satisfies kθe − θ0 k2n = OP (Rn ). Assume that nRn /Hn2 = o(Wn ), where, recall Wn , Hn are as defined in (34). Then    e | S0,G = OP nRn . dG SG (θ) Hn2 Proof. The proof is again very similar to the proof of Theorem 8. Fix  > 0, C > 0, and let N1 > 0 be an integer such that, for n ≥ N1 ,   C P kθe − θ0 k2n > Rn ≤ . 4 Let N2 > 0 be an integer such that, for n ≥ N2 , we have CnRn /Hn2 ≤ Wn . Let N = max{N1 , N2 }, e | S0,G ) > rn . By definition, there take n ≥ N , and define rn = bCnRn /Hn2 c. Suppose that dG (SG (θ) e exists a changepoint (i, j) ∈ S0 such that no changepoints in θ are within rn of (i, j), which in our distance metric, means that θek is constant over all nodes k that are rn away from i or j. Construct an arbitrary path p centered around edge (i, j) with 2rn + 1 edges n o p = (irn , irn −1 ), . . . , (i1 , i), (i, j), (j, j1 ) . . . , (jrn −1 , jrn ) , where θ0,i = θ0,i1 = . . . = θ0,irn and θ0,j = θ0,j1 = . . . = θ0,jrn . (This is possible because rn ≤ Wn .) Denote z = θeirn = . . . = θei = θej = . . . = θejrn . Also let I(p) = {irn −1 , . . . , i1 , i, j, j1 , . . . , jrn −1 } denote the internal nodes of the path p. Then 1 X n k∈I(p) θek − θ0,k 2 = 2 rn 2 rn rn Hn2 C z − θ0,i + z − θ0,j ≥ > Rn , n n 2n 4 where the first inequality holds because, as argued before, (x − a)2 + (x − b)2 ≥ (a − b)2 /2 for all x, and the second by definition of rn . Invoking the assumed `2 error rate for θe completes the proof. Combining Theorems 22 and 23 gives the next and final result, whose proof is omitted. Corollary 24 (2d fused lasso screening result, weak and strong sparsity settings). Assume the conditions in Theorem 22, so that √ G is a 2d grid, and s0 = |S0,G |, TVG (θ0 ) ≤ Cn . Also assume √ √ that Hn = ω(min{ s0 , Cn } log n/ Wn ). Let θb denote the 2d fused lasso estimate in (33), with the choice of tuning parameter λ = Θ(log n). Then    log2 n d SbG | S0,G = OP min{s0 , Cn } . Hn2 Remark 26 (Screening over a 2d grid). Consider, as a concrete example, a case in which θ0 is √ √ piecewise constant with just 2 pieces or clusters, over the 2d grid G (of dimension, recall, n × n). Then s0 = |S0,G | reflects the length of the boundary separating the 2 pieces. In the typical case (in which the √ 2 pieces are of roughly equal size, and both have volume proportional to n), this scales as s0 = Θ( n). Moreover, in the typical √ case, the length Wn of the longest path on either side of this boundary also scales as Wn = Θ( n). Here, Cn ≥ s0 Hn , which is larger than s0 unless Hn is quite small (Hn ≤ 1). Thus when Hn is large (Hn > 1), we can use Corollary 24 to conclude that  d SbG | S0,G = OP 28 √  n log2 n . Hn2 √ Roughly speaking, this says if we were to place a “tube” of radius Bn = OP ( n log2 n/Hn2 ) around the boundary edges S0,G , containing edges that are at distance of at most Bn from S0,G , then each b changepoint in S0,G has a corresponding √ changepoint in SG lying inside this tube. Seeing √ detected as the entire grid itself is of dimension n × n, this statement is not really interesting unless Hn is fairly large, say Hn = Θ(n1/8 log n). Then Bn = OP (n1/4 ), giving a reasonably tight tube around the boundary S0,G . An illustration of the true changepoints versus those detected by the 2d fused lasso, in a simple simulated 2d image example, is given in Figure 8. See the figure caption for details. Mean Data Estimate Figure 8: An example on a 2d grid graph, of dimension 100 × 100 (i.e., n = 10, 000). The left panel displays the mean θ0 ; the middle panel the data y, whose entries were generated by adding i.i.d. N (0, 1) noise to θ0 ; and the right panel displays the 2d fused lasso estimate, whose tuning parameter λ was chosen to minimize the `2 estimation error in retrospect. The mean only has two constant pieces, taking values 0 and 1, denoted by dark gray and light gray colors, respectively, in the left panel. A consistent color scale is used throughout the three plots. The true changepoint set S0,G is drawn in red, and the estimated changepoint set SbG in blue. In this example, dG (SbG | S0,G ) = 1. 7 Discussion We have derived a new `2 error bound for the fused lasso in a strong sparsity setting, which, to the best of our knowledge, yields the sharpest available rate in this setting. We have also undertaken a detailed study of the manner in which `2 error bounds for generic estimators θe can be used to prove e and after simple post-processing, changepoint recovery results changepoint screening results for θ, e for θ. As a prime example, we have derived new changepoint screening and recovery results for the fused lasso estimator, in various settings, based solely on its `2 error guarantees, in these settings. To reiterate, our general technique for analyzing changepoint screening and recovery properties is not specific to the fused lasso, and is potentially much more broadly applicable, as it only assumes knowledge of the `2 error rate of the estimator θe in question. This could be applied even outside of the typical Gaussian data model. We have also presented extensions to the piecewise linear segmentation and graph changepoint detection problems, as well as detailed simulations. The code to run all our simulations is located at https://github.com/linnylin92/fused_lasso, and relies on the R package genlasso. 29 References Boysen, L., Kempe, A., Liebscher, V., Munk, A. & Wittich, O. (2009), ‘Consistencies and rates of convergence of jump-penalized least squares estimators’, The Annals of Statistics 37(1), 157–183. Chan, H. P. & Walther, G. (2013), ‘Detection with the scan and the average likelihood ratio’, Statistica Sinica 23(1), 409–428. Dalalyan, A. S., Hebiri, M. & Lederer, J. (2014), ‘On the prediction performance of the lasso’, arXiv preprint arXiv:1402.1700 . Davies, L. & Kovac, A. (2001), ‘Local extremes, runs, strings and multiresolution’, Annals of Statistics 21(1), 1–65. Donoho, D. L. & Johnstone, I. M. (1994), ‘Ideal spatial adaptation by wavelet shrinkage’, Biometrika 81(3), 425–455. Donoho, D. L. & Johnstone, I. M. (1998), ‘Minimax estimation via wavelet shrinkage’, Annals of Statistics 26(8), 879–921. Duembgen, L. & Walther, G. (2008), ‘Multiscale inference about a density’, The Annals of Statistics 36(4), 1758–1785. Frick, K., Munk, A. & Sieling, H. (2014), ‘Multiscale change point inference’, Journal of the Royal Statistical Society: Series B (Statistical Methodology) 76(3), 495–580. Fryzlewicz, P. (2007), ‘Unbalanced Haar technique for nonparametric function estimation’, Journal of the American Statistical Association 102(480), 1318–1327. Fryzlewicz, P. (2014), ‘Wild binary segmentation for multiple change-point detection’, The Annals of Statistics 42(6), 2243–2281. Fryzlewicz, P. (2016), ‘Tail-greedy bottom-up data decompositions and fast multiple change-point detection’. Available at http://stats.lse.ac.uk/fryzlewicz/tguh/tguh.pdf. Harchaoui, Z. & Lévy-Leduc, C. (2010), ‘Multiple change-point estimation with a total variation penalty’, Journal of the American Statistical Association 105(492). Hoefling, H. (2010), ‘A path algorithm for the fused lasso signal approximator’, Journal of Computational and Graphical Statistics 19(4), 984–1006. Hutter, J.-C. & Rigollet, P. (2016), ‘Optimal rates for total variation denoising’, arXiv preprint arXiv:1603.09388 . Kim, S.-J., Koh, K., Boyd, S. & Gorinevsky, D. (2009), ‘`1 trend filtering’, SIAM Review 51(2), 339– 360. Mammen, E. & van de Geer, S. (1997), ‘Locally adaptive regression splines’, The Annals of Statistics 25(1), 387–413. Qian, J. & Jia, J. (2012), ‘On pattern recovery of the fused lasso’, arXiv preprint arXiv:1211.5194 . Rinaldo, A. (2009), ‘Properties and refinements of the fused lasso’, Annals of Statistics 37(5), 2922– 2952. Rojas, C. R. & Wahlberg, B. (2014), ‘On change point detection using the fused lasso method’, arXiv preprint arXiv:1401.5408 . 30 Rudin, L., Osher, S. & Faterni, E. (1992), ‘Nonlinear total variation based noise removal algorithms’, Physica D: Nonlinear Phenomena 60(1–4), 259–268. Sadhanala, V., Wang, Y.-X. & Tibshirani, R. J. (2016), ‘Total variation classes beyond 1d: Minimax rates, and the limitations of linear smoothers’, arXiv preprint arXiv:1605.08400 . Sharpnack, J., Rinaldo, A. & Singh, A. (2012), Sparsistency of the edge lasso over graphs, in ‘Proceedings of the 15th International Conference on Artificial Intelligence and Statistics’, pp. 1028– 1036. Steidl, G., Didas, S. & Neumann, J. (2006), ‘Splines in higher order TV regularization’, International Journal of Computer Vision 70(3), 214–255. Tibshirani, R. J. (2014), ‘Adaptive piecewise polynomial estimation via trend filtering’, The Annals of Statistics 42(1), 285–323. Tibshirani, R. J. & Taylor, J. (2011), ‘The solution path of the generalized lasso’, Annals of Statistics 39(3), 1335–1371. Tibshirani, R., Saunders, M., Rosset, S., Zhu, J. & Knight, K. (2005), ‘Sparsity and smoothness via the fused lasso’, Journal of the Royal Statistical Society: Series B (Statistical Methodology) 67(1), 91–108. van de Geer, S. (1990), ‘Estimating a regression function’, Annals of Statistics 18(2), 907–924. van de Geer, S. (2000), Empirical Processes in M-Estimation, Cambridge University Press. Venkatraman, E. S. (1992), Consistency results in multiple change-point problems, PhD thesis, Department of Statistics, Stanford University. Vostrikova, L. (1981), ‘Detecting ‘disorder’ in multidimensional random processes’, Soviet Mathematics Doklady 24, 55–59. Wang, Y.-X., Sharpnack, J., Smola, A. & Tibshirani, R. J. (2016), ‘Trend filtering on graphs’, Journal of Machine Learning Research . To appear. 31 A Proof of Theorem 4 Here and henceforth, we write N (r, S, k · k) to denote the covering number of a set S in a norm k · k, i.e., the smallest number of k · k-balls of radius r needed to cover S. We call log N (r, √ S, k · k) the log covering or entropy number. Recall that we define the scaled norm k · kn = k · k2 / n. In the proof of Theorem 4, we will rely on the following result from van de Geer (1990) (which is derived closely from Dudley’s chaining for sub-Gaussian processes). Theorem 25 (Theorem 3.3 of van de Geer 1990). Assume that  = (1 , . . . , n ) ∈ Rn has i.i.d. components drawn from a sub-Gaussian distribution, as in (8). Consider a set X ⊆ Rn with kxkn ≤ 1 for all x ∈ X , and let K(·) be a continuous function upper bounding the k · kn entropy of X , i.e., K(r) ≥ log N (r, X , k · kn ). Then there are constants C1 , C2 , C3 , C4 > 0 (depending only on M, σ, the parameters of the underlying sub-Gaussian distribution in (8)), such that for all t > C1 , with Z t0 p K(r) dr, t > C2 0 2 where t0 = inf{r : K(r) ≤ C3 t }, we have   |> x| P sup √ > t ≤ 2 exp(−C4 t2 ). n x∈X Now we give the proof of Theorem 4. b 2 and the other in Proof of Theorem 4. The proof is given in two parts, one in which we bound kδk 2 2 b b b which we bound kb xk2 . Recall that δ = P0 (θ − θ0 ) and x b = P1 θ. Each part begins with a different “basic inequality”, established by comparing the fused lasso objective at different points. First, we define the following events,   p |> z| Ω0 = sup ≤ γcI (log s0 + log log n)s0 log n , (35) z∈M kzk2   |> w| ≤ γcR (ns0 )1/4 , (36) Ω1 = sup 1/2 1/2 w∈R⊥ kD−S0 wk1 kwk2   √ |> δ| Ω2 = sup ≤ γcS s0 , (37) δ∈R kδk2 where γ > 1 is parameter free to vary in our analysis, cI , cR > 0 are the constants in Lemmas 6, 7, and cS > 0 is a constant to be determined below. Focusing on the third event, we will lower bound its probability by applying Theorem 25 to X = R ∩ {δ : kδkn ≤ 1}. Note that log N (r, R ∩ {δ : kδkn ≤ 1}, k · kn ) ≤ (s0 + 1) log(3/r), as R is (s0 + 1)-dimensional, and it is well-known that in Rd , the number of balls of radius r that are needed to cover the unit ball is at most (3/r)d . The quantity t0 in Theorem 25 may be taken to be t0 = inf{r : (s0 + 1) log(3/r) ≤ C3 C12 } = 3 exp(−C3 C12 /(s0 + 1)). The restrictions on t are hence t > C1 , as well as Z t0 p t > C2 (s0 + 1) log(3/r) dr. 0 But, writing erf(·) for the error function, Z C2 0 t0  r r  p √ 1 1 1 (s0 + 1) log(3/r) dr = ( s0 + 1) · 3C2 r log − erf log r 2 r 32 t0 /3 0 √ ≤ C2 s0 , where the constant C2 > 0 is adjusted to be larger, as needed. Let us define cS = max{C1 , C2 } and √ CS = C4 . Then we have by Theorem 25, for t = γcS s0 and any γ > 1,     √ √ |> δ| |> δ| 2 2 √ 1 − 2 exp(−CS γ cS s0 ) ≤ P sup ≤ γcS s0 = P sup ≤ γcS s0 = P(Ω2 ). (38) nkδkn δ∈R kδk2 δ∈R b Comparing the objective in (2) at θb = P0 θb + P1 θb = θ0 + δb + x Controlling δ. b and at θ0 + x b, we have b 1 ≤ kb kδb + x b − k22 + λkDθk x − k22 + λkD(θ0 + x b)k1 , and by rearranging terms we obtain our basic inequality,   b 2 ≤ 2δb>  + λ kD(θ0 + x b kδk b )k − kD θk 1 1 , 2 (39) which follows from the fact that δb> x b = 0 (as they lie in orthogonal subspaces). Furthermore, since θb = θ0 + δb + x b, b 1 ≤ kDδk b 1 = kDS δk b 1, kD(θ0 + x b)k1 − kDθk 0 where we used the triangle inequality, and the fact that D−S0 δb = 0. So from our basic inequality in (39), we have that b 2 ≤ 2δb>  + λkDS δk b 1, kδk 2 0 b 2 , we get and dividing by kδk b 2≤2 kδk b 1 kDS0 δk |δb> | +λ . b 2 b 2 kδk kδk Now observe that b 1= kDS0 δk s0 X i=1 |δbti+1 −δbti | ≤ 2 sX 0 +1 i=1 v v u u s0 +1 r sX 0 +1 u u X ti − ti−1 s0 b t 2 b b |δti | ≤ 2 (s0 + 1) δti ≤ 4ts0 δbt2i = 4 kδk2 . Wn Wn i=1 i=1 The second inequality used Cauchy-Schwartz, and the last equality used that δb is piecewise constant on the blocks B0 , . . . , Bs0 , as δb ∈ R = span{1B0 , . . . , 1Bs0 }. Hence, on the event Ω2 , we have r √ s0 b . (40) kδk2 ≤ 2γcS s0 + 4λ Wn Controlling x b. We can establish our next basic inequality by comparing the objective in (2) at θb b and θ0 + δ, b 1 ≤ kδb − k2 + λkD(θ0 + δ)k b 1, kb x + δb − k22 + λkDθk 2 or, rearranged,   b 1 − kDS θk b 1 − kD−S x kb xk22 ≤ 2> x b + λ kDS0 (θ0 + δ)k bk1 0 0   ≤ 2> x b + λ kDS0 x bk1 − kD−S0 x bk1 , (41) where the first line used x b> δb = 0 and D−S0 θ0 = D−S0 δb = 0, and the second used θb = θ0 + δb + x b and the triangle inequality. 33 Decompose x b = zb + w, b where zb ∈ M is the lower interpolant to x b, as defined in Lemma 5, and w b=x b − zb is the remainder. Combining the basic inequality in (41) with (9) and (10) from Lemma 5,   kb xk22 ≤ 2> zb + 2> w b + λ kDS0 zbk1 − kD−S0 zbk1 − kD−S0 wk b 1 r s0 kb z k2 + 2> w ≤ 2> zb + 4λ b − λkD−S0 wk b 1. (42) Wn On the event Ω0 in (35) > zb ≤ γcI p (log s0 + log log n)s0 log nkb z k2 . Further, on the event Ω1 in (36), since P1 w b ∈ R⊥ , kD−S0 P1 wk b 1 = kD−S0 wk b 1 , and kP1 wk b 2 ≤ kwk b 2, 1/2 1/2  > P1 w b ≤ γcR (ns0 )1/4 kD−S0 wk b 1 kwk b 2 , Also, on the event Ω2 in (37), since P0 w b ∈ R, √  > P0 w b ≤ γcS s0 kwk b 2. Hence, on the event Ω0 ∩ Ω1 ∩ Ω2 , combining the last three displays with (42),   r p √ s0 kb xk22 ≤ 2 γcI (log s0 + log log n)s0 log n + 2λ b 2+ kb z k2 + 2γcS s0 kwk Wn 1/2 1/2 2γcR (ns0 )1/4 kD−S0 wk b 1 kwk b 2 1/2 − λkD−S0 wk b 1 . (43) 1/2 Consider the first case in which 2γcR (ns0 )1/4 kD−S0 wk b 1 kwk b 2 ≥ λkD−S0 wk b 1 . Then  2 γcR √ kD−S0 wk b 1≤4 ns0 kwk b 2, λ and from (43), on the event Ω0 ∩ Ω1 ∩ Ω2 , kb xk2 ≤ 2γcI p r (log s0 + log log n)s0 log n + 4λ √ 4γ 2 c2R ns0 √ s0 . + 2γcS s0 + Wn λ 1/2 1/2 where in the above we used (11). In the case that 2γcR (ns0 )1/4 kD−S0 wk b 1 kwk b 2 we have from (43), on the event Ω0 ∩ Ω1 ∩ Ω2 , r p √ s0 + 2γcS s0 . kb xk2 ≤ 2γcI (log s0 + log log n)s0 log n + 4λ Wn (44) < λkD−S0 wk b 1, Therefore, the bound (44) always holds on the event Ω0 ∩ Ω1 ∩ Ω2 . b 2 , combining (44) and (40), we see that Putting it all together. As kθb − θ0 k2 ≤ kb xk2 + kδk r √ p 4γ 2 c2R ns0 √ s0 kθb − θ0 k2 ≤ 4γcS s0 + 8λ + 2γcI (log s0 + log log n)s0 log n + , Wn λ on the event Ω0 ∩ Ω1 ∩ Ω2 . We see that there exists a constant c > 0, such that for large enough n, and any γ > 1, ! λ2 n 2 4 b kθ − θ0 k2 ≤ γ cs0 (log s0 + log log n) log n + + 2 , (45) Wn λ 34 on the event Ω0 ∩ Ω1 ∩ Ω2 . Furthermore, using the union bound along with Lemmas 6, 7, and (38), we find that   P (Ω0 ∩ Ω1 ∩ Ω2 )c ≤ 2 exp − CI γ 2 c2I (log s0 + log log n) + √ 2 exp(−CR γ 2 c2R s0 ) + 2 exp(−CS γ 2 c2S s0 ) ≤ exp(−Cγ 2 ), for an appropriately defined constant C > 0. Optimizing the bound in (45) to choose the tuning parameter λ yields λ = (nWn )1/4 . Plugging this in gives the final result. B Proofs of Lemmas 5, 6, 7 Proof of Lemma 5. We give an explicit construction of a lower interpolant z ∈ M to x, given the changepoints 0 = t0 < . . . < ts0 +1 = n. We will use the notation a+ = max{0, a}. For i = 0, . . . , s0 , define z (i+) ∈ Rti+1 −ti by setting gi+ = sign(xti ) and n o (i+) zj = gi+ · min (gi+ xti +1 )+ , . . . , (gi+ xti +j )+ , j = 1, . . . , ti+1 − ti . Similarly, define z (i−) ∈ Rti+1 −ti by setting gi− = sign(xti+1 −1 ) and n o (i−) zj = gi− · min (gi− xti +j )+ , . . . , (gi− xti+1 )+ , j = 1, . . . , ti+1 − ti . (i+) (i+) (i−) t −t i+1 i is a nonincreasing sequence, and Note that z1 = xti +1 and zti+1 −ti = xti+1 ; also, {|zj |}j=1 (i−) ti+1 −ti {|zj |}j=1 is nondecreasing. Furthermore,  (i−)  (i+)  (i+)  (i−) ≥ 0, j = 1, . . . , ti+1 − ti . sign z1 · sign zj ≥ 0 and sign zti+1 −ti · sign zj Lastly, notice that there exists a point j 0 ∈ 1, . . . , ti+1 − ti − 1 (not necessarily unique) such that (i+) = zj 0 +1 = zj (i−) = zj 0 min zk min zk k∈{1,...,ti+1 −ti } k∈{1,...,ti+1 −ti } (i+) (i−) (i+) , j = j 0 + 1, . . . , ti+1 − ti , (46) (i−) , j = 1, . . . , j 0 . (47) = zj (i+) (i−) We construct by zti +j = zj for j = 1, . . . , j 0 , and zti +j = zj for j = j 0 + 1, . . . , ti+1 − ti . Letting 0 0 ti = ti + j and repeating this process for i = 0, . . . , s0 , we have constructed z ∈ M. We now verify the claimed properties for the constructed lower interpolant z. For i = 0, . . . , s0 , and any j = 1, . . . , ti+1 − ti , we have (i+) sign(zj (i+) |zj | ) · sign(xti +j ) ≥ 0, ≤ |xti +j |, Further, for any j = 1, . . . , ti+1 − ti − 1,    sign (Dz (i+) )j · sign (Dx)ti +j ≥ 0, (Dz (i+) )j ≤ (Dx)ti +j . (48) (49) (50) (51) To see why (50) holds, note that sign(Dz (i+) )j ∈ {−1, 0}, (Dz (i+) )j < 0 imply (D(gi+ x)+ )ti +j < 0. To see why (51) holds, if (Dz (i+) )j 6= 0, then we know that n o (i+) (i+) |zj+1 − zj | ≤ min (gi+ xti +j+1 )+ , (gi+ xti +j )+ − (gi+ xti +j )+ ≤ |xti +j+1 − xti +j |, 35 where we used the observation that | min{a, b} − b| ≥ | min{a, b, c} − min{b, c}|. It can be shown by nearly equivalent steps that z (i−) , and z both satisfy properties analogous to (48)–(51). Using (48) and (49) on z gives (11). Using (50) and (51) on z gives (9) (note that if sign(a) = sign(b) and |a| > |b|, then |a| = |b| + |a − b|). Because zti +1 = xti +1 and zti+1 = xti+1 for all i = 0, . . . , s0 , we have the equality in (10) (since Dti z = zti +1 − zti = xti +1 − xti = Dti x). Finally, for each i = 0, . . . , s0 , define t00i = t0i if |zt0i | ≥ |zt0i +1 | and t00i = t0i + 1 otherwise. Observe that by (46) and (47), it holds that |zt00i | = minj=1,...,ti+1 −ti |zti +j |. The inequality in (10) is finally established by the following chain of inequalities: kDS0 zk1 = = s0 X s0 X |zti +1 − zti | ≤ i=1 s0 X |zti +1 | + |zti | i=1   |zti +1 | − |zt00i | + |zti | − |zt00i−1 | + |zt00i−1 | + |zt00i | i=1 ≤ kD−S0 zk1 + 2 s0 X r |zt00i | ≤ kD−S0 zk1 + 4 i=0 s0 kzk2 , Wn where in the second inequality, we used |a| − |c| ≤ |a − c| ≤ |a − b| + |b − c|, and in the last inequality, we used the above property of zt00i and v v u s0 u s0 r X u u X ti+1 − ti √ s0 |zt00i | ≤ 2 s0 t |zt00i |2 ≤ 2ts0 zt200 ≤ 2 kzk2 . i W W n n i=0 i=0 i=0 s0 X This completes the proof. Proof of Lemma 6. We consider  ∈ Rn , an i.i.d. sub-Gaussian vector as referred to in the statement of the lemma, and arbitrary z ∈ M. In this proof, we will also consider E(t) and Z(t), real-valued functions over [0, n], constructed so that E(t) = dte for all t (i.e., E(t) is a step function), Z(t) = zt for t = 1, . . . , n, and Z(t) is smooth and monotone over (ti , t0i ] and (t0i , ti+1 ] for i = 0, . . . , s0 . These functions will also R t satisfy the boundary conditions E(0) = 1 and Z(0) = z1 . Let F (t) = 0 E(u) du. As  is random, E(t) and F (t) are also random. It can be shown that there exists constants cI , CI > 0 such that for any γ > 1, P p |F (t) − F (ti )| p ≤ γcI log s0 + log log n, for t ∈ (ti , ti+1 ], i = 0, . . . , s0 |t − ti | !  ≥ 1 − 2 exp − CI γ 2 c2I (log s0 + log log n) . (52) So as not to distract from the main flow of ideas, we now proceed to prove Lemma 6, and we later provide a proof of (52). Let Ω3 denote the event in consideration on the left-hand side of (52). By integration by parts, Z t0i E(t)Z(t) dt = Z(t0i )(F (t0i ) Z − F (ti )) − ti where Z 0 (t) = Z d dt Z(t). t0i Z 0 (t)(F (t) − F (ti )) dt ti Thus, on the event Ω3 , t0i E(t)Z(t) dt ≤ γcI p log s0 + log log n |Z(t0i )| ti p t0i − ti + Z t0i ti 36 √ Z (t) t − ti dt 0 ! , (53) since Z 0 does not change sign within the intervals (ti , t0i ], (t0i , ti+1 ] (as z ∈ M). For n large enough, we can upper bound the last term in (53) as follows t0i Z √ Z 0 (t) t − ti dt = Z ti +n−1 √ Z 0 (t) t − ti dt + √ Z 0 (t) t − ti dt . (54) ti +n−1 ti ti t0i Z Using integration by parts and the triangle inequality, on the second term in (54), t0i Z t0i p √ Z(ti + n−1 ) Z(t) 1 0 0 √ √ Z (t) t − ti dt = |Z(ti )| ti − ti + + dt . 2 n t − ti −1 −1 ti +n ti +n Z 0 (55) By Cauchy-Schwartz on the last term in (55), Z t0i ti +n−1 Z Z(t) √ dt ≤ t − ti !1/2 t0i t0i Z 2 Z(t) dt ti +n−1 Z ti +n−1 !1/2 1 dt t − ti !1/2 t0i p Z(t)2 dt ≤ 2 log n. (56) ti +n−1 Now examining the first term in (54), ti +n−1 Z √ Z 0 (t) t − ti dt ≤ n−1/2 Z ti ti +n−1 Z 0 (t) dt = ti |Z(ti + n−1 ) − Z(ti )| √ . n But because we only require Z to be a piecewise monotonic and smooth interpolant then we are at liberty to make Z(ti + n−1 ) = Z(ti ), forcing this term to be 0. In order to bound Z(t0i ), notice that because |Z(t)| is non-increasing over the interval (ti , t0i ] we have that Z(t0i )2 |t0i Z t0i Z(t)2 dt. − ti | ≤ (57) ti Combining (53)–(57), we have that on the event Ω3 , Z t0i r E(t)Z(t) dt ≤ αn 2+ ti log n 2 ! Z !1/2 t0i 2 Z(t) dt ti |Z(ti )| + αn √ . n (58) √ where we have abbreviated αn = γcI log s0 + log log n. Through nearly identical steps we can show that on the event Ω3 , Z r ti+1 E(t)Z(t) dt ≤ αn 2+ t0i log n 2 ! Z !1/2 ti+1 |Z(ti+1 )| √ . n (59) 1/2 kzk1 Z(t)2 dt + 2αn √ , n (60) 2 Z(t) dt + αn t0i Therefore Z n E(t)Z(t) dt ≤ 0 s0 X i=0 √ Z t0i Z ! ti+1 E(t)Z(t) dt + E(t)Z(t) dt t0i ti r ≤ αn 2s0 + 2 2 + 37 log n 2 ! Z 0 n where in the second line we applied (58), (59), and the Cauchy-Schwartz inequality. Because we can Rn 2 1/2 choose Z(t) to be arbitrarily close to z over all t, the integral ( Z(t) is approaching kzk2 dte 0 Rn √ dt) and 0 E(t)Z(t) dt is approaching > z. Furthermore, because kzk1 ≤ nkzk2 , the first term in (60) dominates. Hence on the event Ω3 , we have established yet p |> z| ≤ γcI (log s0 + log log n)s0 log nkzk2 , where the constant cI is adjusted to be larger, as needed. Noting that the event Ω3 does not depend on z, the result follows. 0 Vi , where for each i = 0, . . . , s0 , Proof of claim (52). We will construct a covering for V = ∪si=0 r  r  n n Vi = 1A : A = {ti , . . . , t}, t = ti +1, . . . , n ∪ 1A : A = {t, . . . , ti }, t = 1, . . . , ti −1 . |A| |A| p Note that our scaling is such pthat, for any a = n/|A|1A , where A ⊆ {1, . . . , n}, we have kakn = 1. Further, for any other b = n/|B|1B , where B ⊆ {1, . . . , n}, we have   |A ∩ B| |A ∩ B| |A \ B| |B \ A| p ka − bk2n = p + =2 1− p + , (61) |A| |B| ( |A| − |B|)2 |A||B| We first √ construct a covering for each set Vi , i = 0, . . . , s0 , restricting our attention to a radius 0 < r < 2. Let α = d(1 − r2 /2)−2 e, and consider the set Ci = r   n j 1A : A = ti , . . . , min{ti + α , n} , j = 1, . . . , dlog n/ log αe |A| r   n j ∪ 1A : A = max{ti − α , 1}, . . . , ti , j = 1, . . . , dlog n/ log αe . |A| Here, the set Ci has at most 2dlog n/ log αe ≤ 4 log n/ log α elements, and by (61), balls of radius r around elements in Ci cover the set Vi . This establishes that N (r, Vi , k · kn ) ≤ −2 log n . log(1 − r2 /2) (62) √ 0 Vi can be obtained by just taking a For a radius 0 < r < 2, the covering number for V = ∪si=0 union of the covers in (62) over i = 0, . . . , s0 , giving s0 X   − log n N (r, V, k · kn ) ≤ N (r, Vi , k · kn ) ≤ 2(s0 + 1) . log(1 − r2 /2) i=0 (63) √ √ Using (61) once more, the diameter of the set V is 2, hence if r ≥ 1/ 2, then we need only 1 ball to cover V. Combining this fact with (63), we obtain    √ − log n 2(s + 1) if 0 < r < 1/ 2 0 2 log(1 − r /2) N (r, V, k · kn ) ≤ . (64) √  1 if r ≥ 1/ 2 Now let us apply Theorem √ 25, with X = V. First, we remark that the quantity t0 in Theorem 25 may be taken to be t0 = 1/ 2. The bounds on t in the theorem are t > C1 , as well as  Z 1/√2 s  − log n dr. t > C2 log 2(s0 + 1) log(1 − r2 /2) 0 38 Next, we know that the right-hand side above is upper bounded by Z C2 √ 1/ 2 " q s  log 2(s0 + 1) log n + 0 s = C2  log −1 log(1 − r2 /2) # dr v Z 1/2 u u √ log 2(s0 + 1) log n tlog + C2 2 2 0  ! 1 log 1 1−x2  dx. One can verify that the the integral in the second term above converges to a finite √ constant (upper bounded by 1 in fact). Thus the entire expression above is upper bounded by C2 log s0 + log log n, where the constant C2 > 0 is adjusted to √ be larger, as needed. Therefore, letting cI = max{C1 , C2 }, we may restrict our attention to t > cI log s0 + log log n in Theorem 25, and letting CI = C4 , the conclusion reads, for t = γcI and γ > 1,   p  > a P sup √ > γcI log s0 + log log n ≤ 2 exp − CI γ 2 c2I (log s0 + log log n) . n a∈V p Recalling the form of a = n/|A|1A ∈ V, the above may be rephrased as  Pt  p j=t j > γcI log s0 + log log n, for t = 1, . . . , n, i = 0, . . . , s0 P p i |t − ti |  ≤ 2 exp − CI γ 2 c2I (log s0 + log log n) . (65) Finally, consider the following event ) ( p |F (t) − F (ti )| p ≤ γcI log s0 + log log n, for t = 1, . . . , n, i = 0, . . . , s0 . Ω4 = |t − ti | Rt Pt Recalling that E(t) = dte for all t ∈ [0, 1], we have F (t) = 0 E(u) du = j=0 j for t = 1, . . . , n. In 2 2 (65), we have thus shown P(Ω4 ) ≥ 1 − 2 exp(−CI γp cI (log s0 + log log n)). Note that |F (t) − F (ti )| is piecewise linear with knots at t = 1, . . . , n and |t − ti | is concave in between these knots, so if p √ |F (t) − F (ti )|/ |t − ti | ≤ γcI log s0 + log log n for t = 1, . . . , n, then the same bound must hold over all t ∈ [0, n]. This shows that Ω4 ⊇ Ω3 , where Ω3 is the event in question in the left-hand side of (52); in other words, we have verified (52). For the proof of Lemma 7, we will need the following result from van de Geer (1990). Lemma 26 (Lemma 3.5 of van de Geer 1990). Assume the conditions in Theorem 25, and additionally, assume that for some ζ ∈ (0, 1) and K > 0, K(r) ≤ Kr−2ζ , where, recall, K(r) is a continuous function upper bounding the entropy number log N (r, X , k · kn ). Then there exists constants C0 , C1 (depending only on M, σ in (8)) such that for any t ≥ C0 ,   √ |> x| P sup √ > t K ≤ exp(−C1 t2 K). 1−ζ x∈X nkxkn Proof of Lemma 7. Recall that for i = 0, . . . , s0 , we define Bi = {ti + 1, . . . , ti+1 }. For i = 0, . . . , s0 , √ also define ni = |Bi |, the scaled norm k · kni = k · k2 / ni , and n o Xi = w(i) ∈ Rni : (1(i) )> w(i) = 0, kD(i) w(i) k1 ≤ 1, kw(i) kni ≤ 1 . 39 Here, we write 1(i) ∈ Rni for the vector of all 1s, and D(i) ∈ R(ni −1)×n for the difference operator, as in (5) but of smaller dimension. The set Xi is the discrete total variation space in Rni , where all elements are centered and have scaled norm at most 1. From well-known results on entropy bounds for total variation spaces (e.g., from Lemma 11 and Corollary 12 of Wang et al. (2016)), we have C , r for a universal constant C > 0. Hence we may apply Lemma 26 with X = Xi and ζ = 1/2: for the random variable ( ) (i) |> Bi w | (i) : w ∈ Xi , Mi = sup √ 1/2 ni kw(i) kni we may take t = γC0 in the lemma, for any γ > 1, and conclude that  √  P Mi > γC0 C ≤ exp(−C1 γ 2 C02 C). log N (r, Xi , k · kni ) ≤ Notice that we may rewrite Mi as ( Mi = sup and therefore  P (i) |> Bi w | 1/4 1/2 :w 1/2 ni kD(i) w(i) k1 kw(i) k2 (i) |> Bi w | sup 1 w(i) ∈Rni , ( (i) )> w(i) =0 1/2 1/2 kD(i) w(i) k1 kw(i) k2 (i) ∈ R , (1 ) w (i) > ni √ 1/4 > γC0 Cni Using the union bound,   ) (i) =0 , ≤ exp(−C1 γ 2 C02 C).  (i) |>  Bi w | sup P (i) (i) 1/2 (i) 1/2 w(i) ∈Rni , (1(i) )> w(i) =0 kD w k1 kw k2 i=0,...,s0 √ 1/4  > γC0 Cni  ≤ (s0 + 1) exp(−C1 γ 2 C02 C). √ Define the constants cR = max{C0 C, 1} and CR = max{C1 /2, 1}. Then this ensures that we have √ 2CR γ 2 c2R s0 ≥ log(s0 + 1) for any γ > 1 and any s0 , thus    P w (i) |> Bi w | sup (i) , (1 ) w i=0,...,s0 ni ∈R (i) > (i) √  > γcR (ni s0 )1/4  ≤ exp(−CR γ 2 c2R s0 ). (i) (i) 1/2 (i) 1/2 =0 kD w k1 kw k2 The proof is completed by noting the following: if w ∈ R⊥ , then (1(i) )> wBi = 0 for all i = 0, . . . , s0 , and so on the event in consideration in the last display, > | w| ≤ s0 X |> Bi wBi | ≤ 1/4 γcR s0 i=0 ≤ 1/4 γcR s0 s0 X 1/4 1/2 i=0 s0 X !1/2 (i) kD wBi k1 i=0 = 1/2 ni kD(i) wBi k1 kwBi k2 1/4 1/2 γcR s0 kD−S0 wk1 s0 X !1/2 1/2 ni kwBi k2 i=0 s0 X !1/2 1/2 ni kwBi k2 i=0 s0 X !1/4 ≤ 1/4 1/2 γcR s0 kD−S0 wk1 = i=0 1/4 1/2 1/2 γcR s0 kD−S0 wk1 kwk2 n1/4 , 40 kwBi k22 s0 X i=0 !1/4 ni by two successive uses of Cauchy-Schwartz. C Proofs of Lemmas 12, 13 Both proofs follow from standard techniques in convex analysis. Proof of Lemma 12. We first consider the convex optimization problem min a> x subject to kx − ck2 ≤ r, (66) x∈Rm whose Lagrangian may be written as, for a dual variable λ ≥ 0, L(x, λ) = a> x + λ(kx − ck22 − r2 ). The stationarity condition is a + λ(x − c) = 0, thus x = c − a/λ. By primal feasibility, kx − ck2 ≤ r, we see that we can take λ = kak2 /r, which gives a solution x = c − ra/kak2 . The optimal value in (67) is therefore a> x = a> c − rkak2 . By the same logic, the optimal value of the convex problem max a> x subject to kx − ck2 ≤ r (67) x∈Rm is a> c + rkak2 . Now we can read off the optimal value of (20) from those of (66), (67): its optimal value is   max − a> c − rkak22 , a> c + rkak2 = |a> c| + rkak22 , completing the proof. Proof of Lemma 13. The proof is nearly immediate from the proof of Lemma 12, above. Notice that the optimal value of (21) is lower bounded by that of (66), which we already know is a> c − rkak22 . But when the latter is nonnegative, this is also the optimal value of (21). Repeating the argument with −a in place of a gives the result as stated in the lemma. D Proof of Lemma 17 To facilitate the proof, we define the concept of a local maximum among the absolute filter values: e is be greater than or equal to the a location i is a local maximum if its absolute filter value |Fi (θ)| absolute values at neighboring locations, and strictly greater than at least one of these values (where the boundary points are treated as having just one neighboring location). Specifically, a location i must satisfy one of the following conditions e < |Fi (θ)|, e |Fi+1 (θ)| e ≤ |Fi (θ)|, e |Fi−1 (θ)| e ≤ |Fi (θ)|, e |Fi+1 (θ)| e < |Fi (θ)|, e |Fi−1 (θ)| e < |Fi (θ)| e |Fi+1 (θ)| if i ∈ {bn + 1, . . . , n − bn − 1}, (68) if i ∈ {bn + 1, . . . , n − bn − 1}, (69) if i = bn , (70) if i = n − bn . (71) e < |Fi (θ)| e |Fi−1 (θ)| e denote the set of local maximums derived from the filter with bandwidth bn , i.e., the set Let L(θ) of locations i satisfying one of the four conditions (68)–(71). e ⊆ IC (θ). e Fix i ∈ L(θ). e The boundary cases, i = bn or i = n − bn , are We first show that L(θ) e handled directly by the definition of IC (θ). Hence, we may assume that i ∈ {bn + 1, . . . , n − bn − 1}, and without a loss of generality, e > |Fi−1 (θ)| e e ≥ |Fi+1 (θ)|, e |Fi (θ)| and |Fi (θ)| 41 e > 0. This means that as well as Fi (θ) e > |Fi−1 (θ)| e e ≥ |Fi+1 (θ)|, e Fi (θ) and Fi (θ) which of course implies e ≥ Fi+1 (θ). e and Fi (θ) e > Fi−1 (θ) e Fi (θ) Applying the definition of the filter in (14) gives  i+b Xn j=i+1  i+b Xn j=i+1 i X θej −  − θej  i+b n −1 X j=i j=i−bn +1 i X θej − θej −  − θej  i+b n +1 X j=i+2 j=i−bn +1 θej − i−1 X  θej >0 j=i−bn i+1 X  θej ≥ 0, j=i−bn +2 or, after simplification, θei+bn − 2θei + θei−bn > 0 and − θei+bn +1 + 2θei+1 − θei−bn +1 ≥ 0. Adding the above two equations together, we get    − θei+bn +1 − θei+bn + 2 θei+1 − θei − θei−bn +1 − θei−bn > 0, which implies at least one of the three bracketed pairs of terms must be nonzero, i.e., a changepoint e ⊆ IC (θ). e must occur at one of the locations i, i + bn , or i − bn . The proves that L(θ) e Now we show the intended statement. Let j ∈ {bn , . . . , n − bn }, and i ∈ L(θ) be in the direction e where j ≤ i, without a loss of generality (for the case i < j, of ascent from j with respect to F (θ), replace ` + bn below by ` − bn ). That is, the location i is a local maximum where e ≤ |Fj+1 (θ)| e ≤ . . . ≤ |Fi−1 (θ)| e ≤ |Fi (θ)|. e |Fj (θ)| (72) If |i − j| ≤ bn , then we have the desired result, due to (72). If |i − j| > bn , then there must be at e such that |` − j| ≤ bn . (To see this, note that if θej−b +1 = . . . = θej+b , least one location ` ∈ S(θ) n n e = 0.) Thus, at least one of `, ` + bn lies in between j and i, and then again (72) implies then Fj (θ) the result, completing the proof. E Proof of Lemma 20 Our optimization problem may be rewritten as (e a, eb) = argmin b2 + a,b∈R r  X  (ax + b − a1 x)2 + (ax − b − a2 x)2 . x=1 Taking a derivative of the criterion with respect to b and setting this equal to 0 gives 0=b+ r X (ax + b − a1 x − ax + b + a2 x), x=1 i.e., we see that the optimal value is Pr eb = (a1 − a2 ) x r(r + 1) = (a1 − a2 ) . 2r + 1 2(2r + 1) x=1 42 Taking a derivative of the criterion with respect to a and setting this equal to 0 gives 0=b+ r X (ax + b − a1 x + ax − b − a2 x), x=1 i.e., we see that the optimal value is a1 + a2 . 2 Plugging in e a, eb into the criterion, and abbreviating cr = r(r + 1)/(2(2r + 1)), we can compute the optimal criterion value: e a= (a1 − a2 )2 c2r + r  X a2 − a1 x=1 2 2 x + (a2 − a1 )cr  + a1 − a2 x − (a1 − a2 )cr 2 2  r r X X 1 x2 + 2r(a1 − a2 )2 c2r + 2(a1 − a2 )2 cr = (a1 − a2 )2 c2r + (a1 − a2 )2 x 2 x=1 x=1  2  2 r(r + 1)(2r + 1) r3 (r + 1)2 r2 (r + 1)2 2 r (r + 1) = (a1 − a2 ) + + + 4(2r + 1)2 12 2(2r + 1)2 2(2r + 1)  2  3 2 r r(r + 1)(2r + 1) r r (r + 1) + + + ≥ (a1 − a2 )2 16 12 8 4   1 1 1 ≥ (a1 − a2 )2 r3 + + 6 8 4 13r3 = (a1 − a2 )2 . 24 43
10math.ST
arXiv:1405.3792v1 [cs.PL] 15 May 2014 Under consideration for publication in Theory and Practice of Logic Programming 1 Minimum Model Semantics for Extensional Higher-order Logic Programming with Negation∗ Angelos Charalambidis Department of Informatics & Telecommunications, University of Athens, Greece (e-mail: [email protected]) Zoltán Ésik Department of Computer Science, University of Szeged, Hungary (e-mail: [email protected]) Panos Rondogiannis Department of Informatics & Telecommunications, University of Athens, Greece (e-mail: [email protected]) submitted 1 January 2003; revised 1 January 2003; accepted 1 January 2003 Abstract Extensional higher-order logic programming has been introduced as a generalization of classical logic programming. An important characteristic of this paradigm is that it preserves all the well-known properties of traditional logic programming. In this paper we consider the semantics of negation in the context of the new paradigm. Using some recent results from non-monotonic fixed-point theory, we demonstrate that every higher-order logic program with negation has a unique minimum infinite-valued model. In this way we obtain the first purely model-theoretic semantics for negation in extensional higher-order logic programming. Using our approach, we resolve an old paradox that was introduced by W. W. Wadge in order to demonstrate the semantic difficulties of higher-order logic programming. 1 Introduction Extensional higher-order logic programming has been proposed (Wadge 1991; Charalambidis et al. 2010; Charalambidis et al. 2013) as a generalization of classical logic programming. The key idea behind this paradigm is that all predicates defined in a program denote sets and therefore one can use standard extensional set theory in order to understand their meaning and to reason about them. For example, consider the following simple extensional higher-order program (Charalambidis et al. 2013) stating that a band (musical ensemble) is a group that has at least a singer and a guitarist: band(B):-singer(S),B(S),guitarist(G),B(G). ∗ This research is being supported by the Greek General Secretariat for Research and Technology, the National Development Agency of Hungary, and the European Commission (European Regional Development Fund) under a Greek-Hungarian intergovernmental programme of Scientific and Technological collaboration. Project title: “Extensions and Applications of Fixed Point Theory for Non-Monotonic Formalisms”. It is also supported by grant no. ANN 110883 from the National Foundation of Hungary for Scientific Research. 2 A. Charalambidis, Z. Ésik and P. Rondogiannis Suppose that we also have a database of musicians: singer(sally). singer(steve). guitarist(george). guitarist(grace). We can then ask the query ?-band(B). Since predicates denote sets, an extensional higher-order language will return answers such as B = {sally, george} ∪ L, having the meaning that every set that contains at least sally and george is a potential band. A consequence of the set-theoretic nature of extensional higher-order logic programming is the fact that its semantics and its proof theory smoothly extend the corresponding ones for traditional (ie., first-order) logic programming. In particular, every program has a unique minimum Herbrand model which is the greatest lower bound of all Herbrand models of the program and the least fixed-point of an immediate consequence operator associated with the program; moreover, there exists an SLD resolution proof-procedure which is sound and complete with respect to the minimum model semantics. One basic property of all the higher-order predicates that can be defined in the language of (Charalambidis et al. 2013) is that they are monotonic. Intuitively, the monotonicity property states that if a predicate is true of a relation R then it is also true of every superset of R. In the above example, it is clear that if band is true of a relation B then it is also true of any band that is a superset of B. However, there are many natural higher-order predicates that are non-monotonic. Consider for example a predicate single singer band which (apparently) defines a band that has a unique singer: single singer band(B):-band(B),not two singers(B). two singers(B):-B(S1),B(S2),singer(S1),singer(S2),not(S1=S2). The predicate single singer band is obviously non-monotonic since it is satisfied by the set {sally, george} but not by the set {sally, steve, george}. In other words, the semantics of (Charalambidis et al. 2013) is not applicable to this extended higher-order language. We are therefore facing the same problem that researchers faced more than twenty years ago when they attempted to provide a sensible semantics to classical logic programs with negation; the only difference is that the problem now reappears in a much more general context, namely in the context of higher-order logic programming. The solution we adopt is relatively simple to state (but non-trivial to materialize): it suffices to generalize the well-founded construction (van Gelder et al. 1991; Przymusinski 1989) to higher-order programs. For this purpose, we have found convenient to use a relatively recent logical characterization of the well-founded semantics through an infinitevalued logic (Rondogiannis and Wadge 2005) and also the recent abstract fixed-point theory for non-monotonic functions developed in (Ésik and Rondogiannis 2013; Ésik and Rondogiannis 2014). This brings us to the two main contributions of the present paper: • We provide the first model-theoretic semantics for extensional higher-order logic programming with negation. In this way we initiate the study of a non-monotonic formalism that is much broader than classical logic programming with negation. • We provide further evidence that extensional higher-order logic programming is a natural generalization of classical logic programming, by showing that all the well-known properties of the latter also hold for the new paradigm. Minimum Model Semantics for Extensional Higher-order LP with Negation 3 In the next section we provide an introduction to the proposed semantics for higherorder logic programming and the remaining sections provide the formal development of this semantics. The proofs of all the results have been moved to corresponding appendices. 2 An Intuitive Overview of the Proposed Semantics The starting point for the semantics proposed in this paper is the infinite-valued semantics for ordinary logic programs with negation, as introduced in (Rondogiannis and Wadge 2005). In this section we give an intuitive introduction to the infinite-valued approach and discuss how it can be extended to the higher-order case. The infinite-valued approach was introduced in order to provide a minimum model semantics to logic programs with negation. As we are going to see shortly, it is compatible with the well-founded semantics but it is purely model-theoretic1 . The main idea of this approach can be explained with a simple example. Consider the program: p ← r ← ∼p s ← ∼q Under the well-founded semantics both p and s receive the value True. However, p is in some sense “truer” than s. Namely, p is true because there is a rule which says so, whereas s is true only because we are never obliged to make q true. In a sense, s is true only by default. This gave the idea of adding a “default” truth value T1 just below the “real” truth T0 , and (by symmetry) a weaker false value F1 just above (“not as false as”) the real false F0 . We can then understand negation-as-failure as combining ordinary negation with a weakening. Thus ∼ F0 = T1 and ∼ T0 = F1 . Since negations can effectively be iterated, the infinite-valued approach requires a whole sequence . . . , T3 , T2 , T1 of weaker and weaker truth values below T0 but above the neutral value 0; and a mirror image sequence F1 , F2 , F3 , . . . above F0 and below 0. In fact, to capture the well-founded model in full generality, we need a Tα and a Fα for every countable ordinal α. In other words, the underlying truth domain of the infinite-valued approach is: F0 < F1 < · · · < Fω < · · · < Fα < · · · < 0 < · · · < Tα < · · ·< Tω < · · · < T1 < T0 As shown in (Rondogiannis and Wadge 2005), every logic program P with negation has a unique minimum infinite-valued model MP . Notice that MP is minimum with respect to a relation ⊑ which compares interpretations in a stage-by-stage manner (see (Rondogiannis and Wadge 2005) for details). As it is proven in (Rondogiannis and Wadge 2005), if we collapse all the Tα and Fα to True and False respectively, we get the well-founded model. For the example program above, the minimum model is {(p, T0 ), (q, F0 ), (r, F1 ), (s, T1 )}. This collapses to {(p, True), (q, False), (r, False), (s, True)}, which is the well-founded model of the program. As shown in (Rondogiannis and Wadge 2005), one can compute the minimum infinitevalued model as the least fixed point of an operator TP . It can easily be seen that TP is not monotonic with respect to the ordering relation ⊑ and therefore one can not obtain 1 In the same way that the equilibrium logic approach of (Pearce 1996) gives a purely logical reconstruction of the stable model semantics. 4 A. Charalambidis, Z. Ésik and P. Rondogiannis the least fixed point using the classical Knaster-Tarski theorem. However, TP possesses some form of partial monotonicity. More specifically, as it is shown in (Rondogiannis and Wadge 2005; Ésik and Rondogiannis 2014), TP is α-monotonic for all countable ordinals α, a property that guarantees the existence of the least fixed point. Loosely speaking, the property of TP being α-monotonic means that the operator is monotonic when we restrict attention to interpretations that are equal for all levels of truth values that are less than α. In other words, TP is monotonic in stages (but not overall monotonic). The TP operator is a higher-order function since it takes as argument an interpretation and returns an interpretation as the result. This observation leads us to the main concept that helps us extend the infinite-valued semantics to the higher-order case. The key idea is to demonstrate that the denotation of every expression of predicate type in our higherorder language, is α-monotonic for all ordinals α (see Lemma 5). This property ensures that the immediate consequence operator of every program is also α-monotonic for all α (see Lemma 7), and therefore it has a least fixed-point which is a model of the program. Actually, this same model can also be obtained as the greatest lower bound of all the Herbrand models of the program (see Theorem 2, the model intersection theorem). In other words, the semantics of extensional higher-order logic programming with negation preserves all the familiar properties of classical logic programming and can therefore be considered as a natural generalization of the latter. 3 Non-Monotonic Fixed Point Theory The main results of the paper will be obtained using some recent results from nonmonotonic fixed point theory (Ésik and Rondogiannis 2013; Ésik and Rondogiannis 2014). The key objective of this area of research is to obtain novel fixed point results regarding functions that are not necessarily monotonic. In particular, the results obtained in (Ésik and Rondogiannis 2013; Ésik and Rondogiannis 2014) generalize the classical results of monotonic fixed-point theory (namely Kleene’s theorem and also the Knaster-Tarski theorem). In this section we provide the necessary material from (Ésik and Rondogiannis 2013; Ésik and Rondogiannis 2014) that will be needed in the next sections. Suppose that (L, ≤) is a complete lattice in which the least upper bound operation is W denoted by and the least element is denoted by ⊥. Let κ > 0 be a fixed ordinal. We assume that for each ordinal α < κ, there exists a preordering ⊑α on L. We write x =α y iff x ⊑α y and y ⊑α x. We define x ❁α y iff x ⊑α y but x =α y does not hold. Moreover, we write x ❁ y iff x ❁α y for some α < κ. Finally, we define x ⊑ y iff x ❁ y or x = y. Let x ∈ L and α < κ. We define (x]α = {y : ∀β < α x =β y}. A key property that will be used throughout the paper is that if the above preordering relations satisfy certain simple axioms, then the structure (L, ⊑) is a complete lattice; moreover, every function f : L → L that satisfies some restricted form of monotonicity, has a least fixed point. These ideas are formalized by the following definitions and results. Definition 1 Let (L, ≤) be a complete lattice equipped with preorderings ⊑α for all α < κ. Then, L will be called a basic model if and only if it satisfies the following axioms: 1. For all x, y ∈ L and all α < β < κ, if x ⊑β y then x =α y. Minimum Model Semantics for Extensional Higher-order LP with Negation 5 2. For all x, y ∈ L, if x =α y for all α < κ then x = y. F 3. Let x ∈ L and α < κ. Let X ⊆ (x]α . Then, there exists y (denoted by α X) such that X ⊑α y 2 and for all z ∈ (x]α such that X ⊑α z, it holds y ⊑α z and y ≤ z. W W 4. If xj , yj ∈ L and xj ⊑α yj for all j ∈ J then {xj : j ∈ J} ⊑α {yj : j ∈ J}. Lemma 1 Let L be a basic model. Then, (L, ⊑) is a complete lattice. Definition 2 Let A, B be basic models and let α < κ. A function f : A → B is called α-monotonic if for all x, y ∈ A if x ⊑α y then f (x) ⊑α f (y). It should be noted that even if a function f is α-monotonic for all α < κ, then it need not be necessarily monotonic with respect to the relation ⊑ (for a counterexample, see (Rondogiannis and Wadge 2005, Example 5.7, pages 453–454)). Therefore, the standard tools of classical fixed point theory (such as the Knaster-Tarski theorem), do not suffice in order to find the least fixed point of f with respect to the relation ⊑. m Let us denote by [A → B] the set of functions from A to B that are α-monotonic for all α < κ. Theorem 1 m Let L be a basic model and assume that f ∈ [L → L]. Then, f has a ⊑-least pre-fixed point, which is also the ⊑-least fixed point of f . The above theorem will be our main tool for establishing the fact that the immediate consequence operator of any extensional higher order logic program, always has a least fixed point, which is a model of the program. 4 The Syntax of the Higher-Order Language H In this section we introduce the higher-order language H, which extends classical firstorder logic programming to a higher-order setting. The language H is based on a simple type system that supports two base types: o, the boolean domain, and ι, the domain of individuals (data objects). The composite types are partitioned into three classes: functional (assigned to individual constants, individual variables and function symbols), predicate (assigned to predicate constants and variables) and argument (assigned to parameters of predicates). Definition 3 A type can either be functional, predicate, argument, denoted by σ, π and ρ respectively and defined as: σ := ι | ι → σ π := o | ρ → π ρ := ι | π We will use τ to denote an arbitrary type (either functional, predicate or argument one). 2 We write X ⊑α y iff forall x ∈ X it holds x ⊑α y. 6 A. Charalambidis, Z. Ésik and P. Rondogiannis As usual, the binary operator → is right-associative. A functional type that is different than ι will often be written in the form ιn → ι, n ≥ 1 (which stands for ι → ι → · · · → ι (n + 1)-times). Moreover, it can be easily seen that every predicate type π can be written uniquely in the form ρ1 → · · · → ρn → o, n ≥ 0 (for n = 0 we assume that π = o). We can now proceed to the definition of H, starting from its alphabet and continuing with expressions and program clauses: Definition 4 The alphabet of the higher-order language H consists of the following: 1. Predicate variables of every predicate type π (denoted by capital letters such as P, Q, R, . . .). 2. Predicate constants of every predicate type π (denoted by lowercase letters such as p, q, r, . . .). 3. Individual variables of type ι (denoted by capital letters such as X, Y, Z, . . .). 4. Individual constants of type ι (denoted by lowercase letters such as a, b, c, . . .). 5. Function symbols of every functional type σ 6= ι (denoted by lowercase letters such as f, g, h, . . .). 6. The following logical constant symbols: the constants false and true of type o; the equality constant ≈ of type ι → ι → o; the generalized disjunction and V W conjunction constants π and π of type π → π → π, for every predicate type π; the generalized inverse implication constants ←π , of type π → π → o, for every predicate type π; the existential quantifier ∃ρ , of type (ρ → o) → o, for every argument type ρ; the negation constant ∼ of type o → o. 7. The abstractor λ and the parentheses “(” and “)”. The set consisting of the predicate variables and the individual variables of H will be called the set of argument variables of H. Argument variables will be usually denoted by V and its subscripted versions. Definition 5 The set of expressions of the higher-order language H is defined as follows: 1. Every predicate variable (respectively, predicate constant) of type π is an expression of type π; every individual variable (respectively, individual constant) of type ι is an expression of type ι; the propositional constants false and true are expressions of type o. 2. If f is an n-ary function symbol and E1 , . . . , En are expressions of type ι, then (f E1 · · · En ) is an expression of type ι. 3. If E1 is an expression of type ρ → π and E2 is an expression of type ρ, then (E1 E2 ) is an expression of type π. 4. If V is an argument variable of type ρ and E is an expression of type π, then (λV.E) is an expression of type ρ → π. W V 5. If E1 , E2 are expressions of type π, then (E1 π E2 ) and (E1 π E2 ) are expressions of type π. 6. If E is an expression of type o, then (∼E) is an expression of type o. 7. If E1 , E2 are expressions of type ι, then (E1 ≈ E2 ) is an expression of type o. Minimum Model Semantics for Extensional Higher-order LP with Negation 7 8. If E is an expression of type o and V is a variable of type ρ then (∃ρ V E) is an expression of type o. To denote that an expression E has type τ we will write E : τ . The notions of free and bound variables of an expression are defined as usual. An expression is called closed if it does not contain any free variables. Definition 6 A program clause is a clause p ←π E where p is a predicate constant of type π and E is a closed expression of type π. A program is a finite set of program clauses. Example 1 The subset predicate can be defined in H as follows: subset ←π→π→o λP.λQ. ∼∃X((P X)∧ ∼(Q X)) The subset predicate is defined by a λ-expression (which obviates the need to have the formal parameters of the predicate in the left-hand side of the definition). Moreover, in the right-hand side we have an explicit existential quantifier for the variable X (in Prolog, if a variable appears in the body of a clause but not in the head, then it is implicitly existentially quantified). 5 The Semantics of the Higher-Order Language H In this section we specify the semantics of H. We start with the semantics of types and proceed to the semantics of expressions. The meaning of the boolean type o is equal to a partially ordered set (V, ≤) of truth values. The number of truth values of V will be specified with respect to an ordinal κ > 0. All the results of the paper hold for every initial selection of κ. The set (V, ≤) is therefore F0 < F1 < · · · < Fα < · · · < 0 < · · · < Tα < · · · < T1 < T0 where α < κ. Definition 7 The order of a truth value is defined as follows: order(Tα ) = α, order(Fα ) = α and order(0) = +∞. We can now define the meaning of all the types of our language as well as the corresponding relations ≤ and ⊑α . This is performed in the following definitions: Definition 8 We define the relation ⊑α on the set V for each α < κ as follows: 1. x ⊑α x if order(x) < α; 2. Fα ⊑α x and x ⊑α Tα if order(x) ≥ α; 3. x ⊑α y if order(x), order(y) > α. Notice that x =α y iff either x = y or order(x) > α and order(y) > α. 8 A. Charalambidis, Z. Ésik and P. Rondogiannis Definition 9 Let D be a nonempty set. Then: • • • • [[ι]]D = D, and ≤ι is the trivial partial order such that d ≤ι d, for all d ∈ D; [[ιn → ι]]D = Dn → D. A partial order in this case will not be needed; [[o]]D = V , and ≤o is the partial order of V ; [[ι → π]]D = D → [[π]]D , and ≤ι→π is the partial order defined as follows: for all f, g ∈ [[ι → π]]D , f ≤ι→π g iff f (d) ≤π g(d) for all d ∈ D; m • [[π1 → π2 ]]D = [[[π1 ]]D → [[π2 ]]D ], and ≤π1 →π2 is the partial order defined as follows: for all f, g ∈ [[π1 → π2 ]]D , f ≤π1 →π2 g iff f (d) ≤π2 g(d) for all d ∈ [[π1 ]]D . The subscripts in the above partial orders will often be omitted when they are obvious from context. Definition 10 Let D be a nonempty set and α < κ. Then: • The relation ⊑α on [[o]]D is the relation ⊑α on V . • The relation ⊑α on [[ρ → π]]D is defined as follows: f ⊑α g iff f (d) ⊑α g(d) for all d ∈ [[ρ]]D . Moreover, f ❁α g iff f ⊑α g and f (d) ❁α g(d) for some d ∈ [[ρ]]D . The following lemma expresses the fact that all the predicate types correspond to semantic domains that are both complete lattices and basic models: Lemma 2 Let D be a nonempty set and π be a predicate type. Then, ([[π]]D , ≤π ) is a complete lattice and a basic model. We now proceed to formally define the semantics of H: Definition 11 An intepretation I of H consists of: 1. 2. 3. 4. a nonempty set D called the domain of I; an assignment to each individual constant symbol c, of an element I(c) ∈ D; an assignment to each predicate constant p : π of an element I(p) ∈ [[π]]D ; an assignment to each function symbol f : ιn → ι of a function I(f) ∈ Dn → D. Definition 12 Let D be a nonempty set. A state s of H over D is a function that assigns to each argument variable V of type ρ of H, of an element s(V) ∈ [[ρ]]D . Definition 13 Let I be an interpretation of H, let D be the domain of I, and let s be a state over D. Then, the semantics of expressions of H with respect to I and s, is defined as follows: 1. 2. 3. 4. 5. [[false]]s (I) = F0 [[true]]s (I) = T0 [[c]]s (I) = I(c), for every individual constant c [[p]]s (I) = I(p), for every predicate constant p [[V]]s (I) = s(V), for every argument variable V Minimum Model Semantics for Extensional Higher-order LP with Negation 9 6. [[(f E1 · · · En )]]s (I) = I(f) [[E1 ]]s (I) · · · [[En ]]s (I), for every n-ary function symbol f 7. [[(E1 E2 )]]s (I) = [[E1 ]]s (I)([[E2 ]]s (I)) 8. [[(λV.E)]]s (I) = λd.[[E]]s[V/d] (I), where d ranges over [[type(V)]]D W W W 9. [[(E1 π E2 )]]s (I) = π {[[E1 ]]s (I), [[E2 ]]s (I)}, where π is the least upper bound function on [[π]]D V V V 10. [[(E1 π E2 )]]s (I) = π {[[E1 ]]s (I), [[E2 ]]s (I)}, where π is the greatest lower bound function  on [[π]]D   Tα+1 if [[E]]s (I) = Fα 11. [[(∼E)]]s (I) = Fα+1 if [[E]]s (I) = Tα   0 if [[E]]s (I) = 0  T0 , if [[E1 ]]s (I) = [[E2 ]]s (I) 12. [[(E1 ≈ E2 )]]s (I) = F0 , otherwise W 13. [[(∃V E)]]s (I) = d∈[[type(V)]] [[E]]s[V/d] (I) D For closed expressions E we will often write [[E]](I) instead of [[E]]s (I) (since, in this case, the meaning of E is independent of s). Lemma 3 Let E : ρ be an expression and let D be a nonempty set. Moreover, let s be a state over D and let I be an interpretation over D. Then, [[E]]s (I) ∈ [[ρ]]D . Definition 14 Let P be a program and let M be an interpretation over a nonempty set D. Then M will be called a model of P iff for all clauses p ←π E of P, it holds [[E]](M ) ≤π M (p), where M (p) ∈ [[π]]D . 6 Minimum Herbrand Model Semantics for H In this section we demonstrate that every program of H has a unique minimum Herbrand model which is the greatest lower bound of all the Herbrand models of the program, and also the least fixed point of the immediate consequence operator of the program. We start with the relevant definitions. Definition 15 Let P be a program. The Herbrand universe UP of P is the set of all terms that can be formed out of the individual constants3 and the function symbols of P. Definition 16 A Herbrand interpretation I of a program P is an interpretation such that: 1. the domain of I is the Herbrand universe UP of P; 2. for every individual constant c of P, I(c) = c; 3. for every predicate constant p : π of P, I(p) ∈ [[π]]UP ; 3 As usual, if P has no constants, we assume the existence of an arbitrary one. 10 A. Charalambidis, Z. Ésik and P. Rondogiannis 4. for every n-ary function symbol f of P and for all t1 , . . . , tn ∈ UP , I(f) t1 · · · tn = f t1 · · · tn . A Herbrand state of a program P is a state whose underlying domain is UP . We denote the set of Herbrand interpretations of a program P by IP . Definition 17 A Herbrand model of a program P is a Herbrand interpretation that is a model of P. Definition 18 Let P be a program. We define the following partial order on IP : for all I, J ∈ IP , I ≤IP J iff for every π and for every predicate constant p : π of P, I(p) ≤π J(p). Definition 19 Let P be a program. We define the following preorder on IP for all α < κ: for all I, J ∈ IP , I ⊑α J iff for every π and for every predicate constant p : π of P, I(p) ⊑α J(p). The following two lemmas play a main role in establishing the two central theorems. Lemma 4 Let P be a program. Then, IP is a complete lattice and a basic model. Lemma 5 (α-Monotonicity of Semantics) Let P be a program and let E : π be an expression. Let I, J be Herbrand interpretations and s be a Herbrand state of P. For all α < κ, if I ⊑α J then [[E]]s (I) ⊑α [[E]]s (J). Since by Lemma 4 the set IP is a basic model (and thus by Lemma 1 is a complete d lattice with respect to ⊑), every M ⊆ IP has a greatest lower bound M with respect to ⊑. We have the following theorem which generalizes the familiar model intersection theorem for definite first-order logic programs (Lloyd 1987), the model intersection theorem for normal first-order logic programs (Rondogiannis and Wadge 2005, Theorem 8.6) and the model intersection theorem for definite higher-order logic programs (Charalambidis et al. 2013, Theorem 6.8). Theorem 2 (Model Intersection Theorem) d Let P be a program and M be a nonempty set of Herbrand models of P. Then, M is also a Herbrand model of P. Definition 20 Let P be a program. The mapping TP : IP → IP is defined for every p : π and for every W I ∈ IP as TP (I)(p) = {[[E]](I) : (p ←π E) ∈ P}. The mapping TP will be called the immediate consequence operator for P. The following two lemmas are crucial in establishing the least fixed point theorem. Lemma 6 Let P be a program. For every predicate constant p : π in P and I ∈ IP , TP (I)(p) ∈ [[π]]UP . Lemma 7 Let P be a program. Then, TP is α-monotonic for all α < κ. Minimum Model Semantics for Extensional Higher-order LP with Negation 11 Theorem 3 (Least Fixed Point Theorem) Let P be a program and let M be the set of all its Herbrand models. Then, TP has a d least fixed point MP . Moreover, MP = M. The construction of the least fixed point in the above theorem is similar to the one given for (potentially infinite) propositional programs in (Rondogiannis and Wadge 2005, Section 6). Due to space limitations, we provide a short outline of this procedure. In order to calculate the least fixed point, we start with an interpretation, say I0 , which for every predicate constant p of type ρ1 → · · · ρn → o, and for all d1 ∈ [[ρ1 ]]UP , . . . , dn ∈ [[ρn ]]UP , I0 (p) d1 · · · dn = F0 . We start iterating TP on this interpretation until we get to a point where the additional iterations do not affect the F0 and T0 values. At this point, we reset all the remaining values (regarding predicate constants and arguments that have not stabilized) to F1 , getting an interpretation I1 . We start iterating TP on I1 , until we get to a point where the additional iterations do not affect the F1 and T1 values. We repeat this process for higher ordinals. In particular, when we get to a limit ordinal, say α, we reset all the values that have not stabilized to a truth value of order less than α, to Fα . The whole process is repeated for κ times. If the value of certain predicate constants applied to certain arguments has not stabilized after the κ iterations, we assign to them the intermediate value 0. The resulting interpretation is the least fixed point MP . 7 Resolving a Semantic Paradox of Higher-Order Logic Programming One deficiency of extensional higher-order logic programming is the inability to define rules (or facts) that have predicate constants in their heads. The reason of this restriction is a semantic one and will be explained shortly. However, not all programs that use predicate constants in the heads of clauses are problematic. For example, the program computer scientist(john). good profession(computer scientist). has a clear declarative reading: the denotation of the computer scientist predicate is the relation {john}, while the denotation of good profession is the relation {{john}}. In (Wadge 1991), W. W. Wadge argued that allowing rules to have predicate constants in their heads, creates tricky semantic problems to. Wadge gave a simple example (duplicated below) that revealed these problems; the example has since been used in other studies of higher-order logic programming (such as for example in (Bezem 2001)). We present the example in almost identical phrasing as it initially appeared. Example 2 Consider the program: p(a). q(a). phi(p). q(b):-phi(q). One candidate for minimum Herbrand model is the one in which p and q are true only of a, and phi is true only of p. However, this means that p and q have the same extension, and so themselves are equal. But since p and q are equal, and phi holds for p, it must also hold for q. The fourth rule forces us to add q(b), so that the model becomes 12 A. Charalambidis, Z. Ésik and P. Rondogiannis {p(a), phi(p), q(a), q(b)} (in ad hoc notation). But this is problematic because p and q are no longer equal and q(b) has lost its justification. Problems such as the above led Wadge to disallow such clauses from the syntax of the language proposed in (Wadge 1991). Similarly, the higher-order language introduced in (Charalambidis et al. 2013) also disallows this kind of clauses. However, under the semantics presented in this paper, we can now assign a proper meaning to programs such as the above. Actually, higher order facts such as phi(p). above, can be seen as syntactic sugar in our fragment. A fact of this form simply states that phi is true of a relation if this relation is equal to p. This can simply be written as: phi(P):-equal(P,p). where equal is a higher-order equality relation that can easily be axiomatized in H using the subset predicate (see Example 1): equal ← λP.λQ.(subset P Q) ∧ (subset Q P). One can compute the minimum model of the resulting program using the techniques presented in this paper. The paradox of Example 2 is no longer valid since in the minimum infinite-valued model the atom q(b) has value 0. Intuitively, this means that it is not possible to decide whether q(b) should be true or false. The above discussion leads to an easy way of handling rules with predicate constants in their heads. The predicate constants are replaced with predicate variables and higherorder equality atoms are added in the bodies of clauses. Then, appropriate clauses defining the equal predicates for all necessary types, are added to the program. The infinite valued semantics of the resulting program is taken as the meaning of the initial program. 8 Future Work We have presented the first, to our knowledge, formal semantics for negation in extensional higher-order logic programming. The results we have obtained generalize the semantics of classical logic programming to the higher order setting. We believe that the most interesting direction for future work is the investigation of implementation techniques for (fragments of) H, based on the semantics introduced in this paper. One possible option would be to examine the implementation of a higher order extension of Datalog with negation. We are currently examining these possibilities. References Bezem, M. 2001. An improved extensionality criterion for higher-order logic programs. In Proceedings of the 15th International Workshop on Computer Science Logic (CSL). SpringerVerlag, London, UK, 203–216. Charalambidis, A., Handjopoulos, K., Rondogiannis, P., and Wadge, W. W. 2010. Extensional higher-order logic programming. In JELIA, T. Janhunen and I. Niemelä, Eds. Lecture Notes in Computer Science, vol. 6341. Springer, 91–103. Charalambidis, A., Handjopoulos, K., Rondogiannis, P., and Wadge, W. W. 2013. Extensional higher-order logic programming. ACM Transactions on Computational Logic 14, 3, 21:1–21:40. Minimum Model Semantics for Extensional Higher-order LP with Negation 13 Ésik, Z. and Rondogiannis, P. 2013. A fixed point theorem for non-monotonic functions. In Proceedings of 13th Panhellenic Logic Symposium, Athens, Greece. Ésik, Z. and Rondogiannis, P. 2014. A fixed point theorem for non-monotonic functions. CoRR abs/1402.0299. Lloyd, J. W. 1987. Foundations of Logic Programming. Springer Verlag. Pearce, D. 1996. A new logical characterisation of stable models and answer sets. In NMELP, J. Dix, L. M. Pereira, and T. C. Przymusinski, Eds. Lecture Notes in Computer Science, vol. 1216. Springer, 57–70. Przymusinski, T. C. 1989. Every logic program has a natural stratification and an iterated least fixed point model. In PODS, A. Silberschatz, Ed. ACM Press, 11–21. Rondogiannis, P. and Wadge, W. W. 2005. Minimum model semantics for logic programs with negation-as-failure. ACM Transactions on Computational Logic 6, 2, 441–467. van Gelder, A., Ross, K. A., and Schlipf, J. S. 1991. The well-founded semantics for general logic programs. J. ACM 38, 3, 620–650. Wadge, W. W. 1991. Higher-order Horn logic programming. In ISLP. 289–303. Appendix A Proof of Lemma 2 We will make use of certain facts established in (Ésik and Rondogiannis 2014). F Suppose that L is a basic model. For each x ∈ L and α < κ, we define x|α = α {x}. It was shown in (Ésik and Rondogiannis 2014) that x =α x|α and x|α =α x|β , x|α ≤ x|β for W all α < β < κ. Moreover, x = α<κ x|α . Also, for all x, y ∈ L and α < κ, it holds x =α y iff x|α =α y|α iff x|α = y|α , and x ⊑α y iff x|α ⊑α y|α . And if x ⊑α y, then x|α ≤ y|α . It is also not difficult to prove that for all x ∈ L and α, β < κ, (x|α )|β = x|min{α,β} . More F F generally, whenever X ⊆ (z]α and β ≤ α < κ, it holds ( α X)|β = β X. And if α < β, F F then ( α X)|β = α X. Finally, we will make use of the following two results from (Ésik and Rondogiannis 2014): Proposition 8 Let A, B be basic models and let α < κ. If fj : A → B is an α-monotonic function for W W each j ∈ J, then so is f = j∈J fj defined by f (x) = j∈J fj (x). Lemma 9 Let Z be an arbitrary set and L be a basic model. Then, Z → L is a basic model with the pointwise definition of the order of relations ≤ and ⊑α for all α < κ. Suppose that A, B are basic models. By Lemma 9 the set A → B is also a model, where the relations ≤ and ⊑α , α < κ, are defined in a pointwise way (see (Ésik and Rondogiannis 2014, Subsection 5.3) for details). It follows that for any set F of functions W A → B, F can be computed pointwisely. Also, when F ⊆ (f ]α for some f : A → B, F α F for α < κ can be computed pointwisely. We want to show that whenever f : A → B, β < κ and F ⊆ (f ]β is a set of functions F m m such that F ⊆ [A → B], then β F ∈ [A → B]. We will make use of a lemma. Lemma 10 Let L be a basic model. For all x, y ∈ L and α, β < κ with α 6= β, x|β ⊑α y|β iff either β < α and x|β = y|β (or equivalently, x =β y), or β > α and x|α ⊑α y|α . 14 A. Charalambidis, Z. Ésik and P. Rondogiannis Proof Let x|β ⊑α y|β . If β < α then x|β = (x|β )|β = (y|β )|β = y|β . If β > α then x|α = (x|β )|α ⊑α (y|β )|α = y|α . Suppose now that β < α and x|β = y|β . Then (x|β )|α = x|β = y|β = (y|β )|α and thus x|β =α y|β . Finally, let β > α and x|α ⊑α y|α . Then (x|β )|α = x|α ⊑α y|α = (y|β )|α and thus x|β ⊑α y|β . Remark 1 Under the above assumptions, if β < α, then x|β ⊑α y|β iff x|β =α y|β iff x|β = y|β . Corollary 1 F F F F For all X, Y ⊆ L and α 6= β, β X ⊑α β Y iff β < α and β X = β Y , or β > α and F F αY. α X ⊑α Proof F F F F F Let x = β X and y = β Y . Then x = β X = β { β X} = x|β and y = y|β . Let β < α. Then x ⊑α y iff x = y. Let β > α. Then x ⊑α y iff x|α ⊑α y|α . But F F F x|α = α { β X} = α X and similarly for Y . Lemma 11 Let A and B be basic models. Suppose that f : A → B and F ⊆ (f ]β (where β < κ) is a F m set of functions in [A → B]. Then β F is also α-monotonic for all α < κ. Proof F F Suppose that α, β < κ and x ⊑α y in A. Then ( β F )(x) = β {f (x) : f ∈ F } and F F ( β F )(y) = β {f (y) : f ∈ F }. We have that f (x) ⊑α f (y) for all f ∈ F . Thus, if F F α = β, then clearly ( β F )(x) ⊑α ( β F )(y). F F Suppose that β < α. Then β {f (x) : f ∈ F } = β {f (y) : f ∈ F } since f (x) =β f (y) F F for all f ∈ F . Thus, by Corollary 1, ( β F )(x) ⊑α ( β F )(y). F F Suppose that β > α. Then ( β F )(x) ⊑α ( β F )(y) follows by Corollary 1 from F F α {f (x) : f ∈ F } ⊑α α {f (y) : f ∈ F }. m We equip [A → B] with the order relations ≤ and ⊑α inherited from A → B. We have the following lemma: Lemma 12 m If A and B are basic models, then so is [A → B] with the pointwise definition of the order of relations ≤ and ⊑α for all α < κ. Proof It is proved in (Ésik and Rondogiannis 2014) that the set of functions A → B is a basic model with the pointwise definition of the relations ≤ and ⊑α , so that for all f, g : A → B and α < κ, f ≤ g iff f (x) ≤ g(x) for all x ∈ A and f ⊑α g iff f (x) ⊑α g(x) for all x ∈ A. It W F follows that for any F ⊆ B A and α < κ, F and α F can also be computed pointwise: F W W F ( F )(x) = {f (x) : x ∈ A} and ( α F )(x) = α {f (x) : f ∈ F }. By Proposition 8 and W Lemma 11, for all F ⊆ B A , if F is a set of functions α-monotonic for all α, then F and F m β F are also α-monotonic for all α. Since the relations ≤ and ⊑α , α < κ on [A → B] are the restrictions of the corresponding relations on B A , in view of Proposition 8 and m m Lemma 11, [A → B] also satisfies the axioms in Definition 1, so that [A → B] is a basic model. Minimum Model Semantics for Extensional Higher-order LP with Negation 15 The following lemma is shown in (Ésik and Rondogiannis 2014, Subsection 5.2) and will be used in the proof of the basis case of the next lemma: Lemma 13 (V, ≤) is a complete lattice and a basic model. Lemma 2 Let D be a nonempty set and π be a predicate type. Then, ([[π]]D , ≤π ) is a complete lattice and a basic model. Proof Let π be a predicate type. We prove that [[π]]D is a basic model by induction on the structure of π. When π = o, [[π]]D = V , a basic model. Suppose that π is of the sort ι → π ′ . Then [[π]]D = D → [[π ′ ]]D , which is a basic model, since [[π ′ ]]D is a model by the induction hypothesis. Finally, let π be of the sort π1 → π2 . By the induction hypothesis, m [[πi ]]D is a model for i = 1, 2. Thus, by Lemma 12, [[π]]D = [[[π1 ]]D → [[π2 ]]D ] is also a basic model. Remark 2 Let C denote the category of all basic models and α-monotonic functions. The above results show that C is cartesian closed, since for all basic models A, B, the evaluation function eval : (A × B) × A → B is α-monotonic (in both arguments) for all α < κ. m Indeed, suppose that f, g ∈ [A → B] and x, y ∈ A with f ⊑α g and x ⊑α y. Then eval(f, x) = f (x) ⊑α g(x) = eval(g, x) by the pointwise definition of f ⊑α g. Also, eval(f, x) = f (x) ⊑α f (y) = eval(f, y) since f is α-monotonic. m m m Since C is cartesian closed, for all f ∈ [B×A → C] there is a unique Λf ∈ [B → [A → C]] in with f (y, x) = eval(Λf (y), x) for all x ∈ A and y ∈ B. Appendix B Proofs of Lemmas 3, 4 and 5 Lemma 3 Let E : ρ be an expression and let D be a nonempty set. Moreover, let s be a state over D and let I be an interpretation over D. Then, [[E]]s (I) ∈ [[ρ]]D . Proof If ρ = ι then the claim is clear. Let E be of a predicate type π. We prove simultaneously the following auxiliary statement. Let α < κ, V : π, x, y ∈ [[π ′ ]]D . If x ⊑α y then [[E]]s[V/x] (I) ⊑α [[E]]s[V/y] (I). The proof is by structural induction on E. We will cover only the nontrivial cases. Case (E1 E2 ): The main statement follows directly by the induction hypothesis of E1 and E2 . There are two cases. Suppose that E1 : π1 → π and E2 : π1 . Then [[E1 ]]s (I) ∈ m [[π1 → π]]D = [[[π1 ]]D → [[π]]D ] and [[E2 ]]s (I) ∈ [[π1 ]]D by the induction hypothesis. Thus, [[E1 ]]s (I) ([[E]]s (I)) ∈ [[π]]D . Suppose now that E1 : ι → π and E2 : ι. Then [[E1 ]]s (I) ∈ [[ι → π]]D = D → [[π]]D by the induction hypothesis and [[E2 ]]s (I) ∈ [[ι]]D = D. It follows again that [[E1 ]]s (I) ([[E]]s (I)) ∈ [[π]]D . Auxiliary statement: Let x, y ∈ [[π ′ ]]D and assume x ⊑α y. We have by definition 16 A. Charalambidis, Z. Ésik and P. Rondogiannis [[(E1 E2 )]]s[V/x] (I) = [[E1 ]]s[V/x] (I) ([[E2 ]]s[V/x] (I)), and similarly for [[(E1 E2 )]]s[V/y] (I). We have E1 : π1 → π and E2 : π1 or E1 : ι → π and E2 : ι. In the first case, by induction hypothesis [[E1 ]]s[V/x] (I) ∈ [[π1 → π]]D , and thus is α-monotonic. Also, [[E1 ]]s[V/x] (I) ⊑α [[E1 ]]s[V/y] (I) and [[E2 ]]s[V/x] (I) ⊑α [[E2 ]]s[V/y] (I) by the induction hypothesis. It follows that [[E1 ]]s[V/x] (I) ([[E2 ]]s[V/x] (I)) ⊑α [[E1 ]]s[V/x] (I) ([[E2 ]]s[V/y] (I)) ⊑α [[E1 ]]s[V/y] (I) ([[E2 ]]s[V/y] (I)). The second case is similar. We have [[E1 ]]s[V/x] (I) ⊑α [[E1 ]]s[V/y] (I) by the induction hypothesis, moreover, [[E2 ]]s[V/x] (I) = [[E2 ]]s[V/y] (I). Therefore, [[E1 ]]s[V/x] (I) ([[E2 ]]s[V/x] (I)) ⊑α [[E1 ]]s[V/y] (I) ([[E2 ]]s[V/y] (I)). Case (λV.E): Assume V : ρ1 and E : π2 . We will show that [[λV.E]]s (I) ∈ [[ρ1 → π2 ]]D . If ρ1 = ι then the result follows easily from the induction hypothesis of the first statement. Assume ρ1 = π1 . We show that [[λV.E]]s (I) ∈ [[π1 → π2 ]]D , that is, λd.[[E]]s[V/d] (I) is α-monotonic for all α < κ. That follows directly by the induction hypothesis of the auxiliary statement. Auxiliary statement: It suffices to show that [[(λU.E)]]s[V/x] (I) ⊑α [[(λU.E)]]s[V/y] (I) and equivalently for every d, [[E]]s[V/x][U/d] (I) ⊑α [[E]]s[V/y][U/d] (I) which follows from induction hypothesis. Lemma 4 Let P be a program. Then, IP is a complete lattice and a basic model. Proof From Lemma 2 we have that for all predicate types π, [[π]]UP is a complete lattice and a basic model. It follows, by Lemma 9, that for all predicate types π, Pπ → [[π]]UP is also a complete lattice and a model, where Pπ is the set of predicate constants of type π. Then, Q IP is π Pπ → [[π]]UP which is also a basic model (proved in (Ésik and Rondogiannis 2014)). Lemma 5 (α-Monotonicity of Semantics) Let P be a program and let E : π be an expression. Let I, J be Herbrand interpretations and s be a Herbrand state of P. For all α < κ, if I ⊑α J then [[E]]s (I) ⊑α [[E]]s (J). Proof The proof is by structural induction on E. Induction Base: The cases V, false, true are straightforward since their meanings do not depend on I. Let I ⊑α J. If E is a predicate constant p then we have I(p) ⊑α J(p). Induction Step: Assume that the statement holds for expressions E1 and E2 and let I ⊑α J. Case (E1 E2 ): It holds [[(E1 E2 )]]s (I) = [[E1 ]]s (I)([[E2 ]]s (I)). By induction hypothesis we have [[E1 ]]s (I) ⊑α [[E1 ]]s (J) and therefore [[E1 ]]s (I)([[E2 ]]s (I)) ⊑α [[E1 ]]s (J)([[E2 ]]s (I)). We perform a case analysis on the type of E2 . If E2 is of type ι and since I, J are Herbrand interpretations, it is clear that [[E2 ]]s (I) = [[E2 ]]s (J) and therefore [[E1 ]]s (I)([[E2 ]]s (I)) ⊑α [[E1 ]]s (J)([[E2 ]]s (J)). By definition of application we get [[(E1 E2 )]]s (I) ⊑α [[(E1 E2 )]]s (J). If E2 is of type π then by induction hypothesis we have [[E2 ]]s (I) ⊑α [[E2 ]]s (J) and since Minimum Model Semantics for Extensional Higher-order LP with Negation 17 [[E1 ]]s (J) is α-monotonic we get that [[E1 ]]s (J)([[E2 ]]s (I)) ⊑α [[E1 ]]s (J)([[E2 ]]s (J)). By transitivity of ⊑α and by the definition of application we conclude that [[(E1 E2 )]]s (I) ⊑α [[(E1 E2 )]]s (J). Case (λV.E1 ): It holds by definition that [[(λV.E1 )]]s (I) = λd.[[E1 ]]s[V/d] (I). It suffices to show that λd.[[E1 ]]s[V/d] (I) ⊑α λd.[[E1 ]]s[V/d] (J) and equivalently that for every d, [[E1 ]]s[V/d] (I) ⊑α [[E1 ]]s[V/d] (J) which holds by induction hypothesis. W W W Case (E1 π E2 ): It holds [[(E1 π E2 )]]s (I) = {[[E1 ]]s (I), [[E2 ]]s (I)}. It suffices to show W W that {[[E1 ]]s (I), [[E2 ]]s (I)} ⊑α {[[E1 ]]s (J), [[E2 ]]s (J)} which holds by induction hypothesis and Axiom 4. V V V Case (E1 π E2 ): It holds [[(E1 π E2 )]]s (I) = {[[E1 ]]s (I), [[E2 ]]s (I)}. Let π = ρ1 → · · · → V ρn → o, it suffices to show for all di ∈ [[ρi ]]UP , {[[E1 ]]s (I) d1 · · · dn , [[E2 ]]s (I) d1 · · · dn } ⊑α V {[[E1 ]]s (J) d1 · · · dn , [[E2 ]]s (J) d1 · · · dn }. We define xi = [[Ei ]]s (I) d1 · · · dn and yi = V [[Ei ]]s (J) d1 · · · dn for i ∈ {1, 2}. We perform a case analysis on v = {x1 , x2 }. If v < Fα V V V V or v > Tα then {x1 , x2 } = {y1 , y2 } and thus {x1 , x2 } ⊑α {y1 , y2 }. If v = Fα then V V V V Fα ≤ {y1 , y2 } ≤ Tα and therefore {x1 , x2 } ⊑α {y1 , y2 }. If v = Tα then {y1 , y2 } = V V V Tα and thus {x1 , x2 } ⊑α {y1 , y2 }. If Fα < v < Tα then Fα < {y1 , y2 } ≤ Tα and V V therefore {x1 , x2 } ⊑α {y1 , y2 }. Case (∼ E1 ): Assume order([[E1 ]]s (I)) = α. Then, by induction hypothesis [[E1 ]]s (I) ⊑α [[E1 ]]s (J) and thus order([[E1 ]]s (J)) ≥ α. It follows that order([[(∼ E1 )]]s (I)) > α and order([[(∼ E1 )]]s (J)) > α and therefore [[(∼ E1 )]]s (I) ⊑α [[(∼ E1 )]]s (J). W Case (∃V.E1 ): Assume V is of type ρ. It holds [[(∃V.E1 )]]s (I) = d∈[[ρ]] [[E1 ]]s[V/d] (I). It UP W W suffices to show d∈[[ρ]] [[E1 ]]s[V/d] (I) ⊑α d∈[[ρ]] [[E1 ]]s[V/d] (J) which holds by inducUP tion hypothesis and Axiom 4. UP Appendix C Proof of Theorem 2 We start by providing some necessary background material from (Ésik and Rondogiannis d 2014) on how the operation on a set of interpretations is actually defined. d d Let x ∈ V . For every X ⊆ (x]α we define α X as follows: if X = ∅ then α X = Tα , otherwise (V V l X order( X) ≤ α X= α Tα+1 otherwise Let P be a program, I ∈ IP be a Herbrand interpretation of P and X ⊆ (I]α . For all predicate constants p in P of type ρ1 → · · · → ρn → o and di ∈ [[ρi ]]UP and for all d d d i = {1, . . . , n}, it holds α X as ( α X)(p) d1 · · · dn = α {I(p) d1 · · · dn : I ∈ X}. Let X be a nonempty set of Herbrand interpretations. By Lemma 4 we have that IP is a complete lattice with respect to ≤ and a basic model. Moreover, by Lemma 1 it follows that IP is also a complete lattice with respect to ⊑. Thus, there exist the least upper bound and greatest lower bound of X for both ≤ and ⊑. We denote the greatest lower V d d bound of X as X and X with respect to relations ≤ and ⊑ respectively. Then, X can be constructed in an symmetric way to the least upper bound construction described in (Ésik and Rondogiannis 2014). More specifically, for each ordinal α < κ we define the d sets Xα , Yα ⊆ X and xα ∈ IP , which are then used in order to obtain X. 18 A. Charalambidis, Z. Ésik and P. Rondogiannis d Let Y0 = X and x0 = 0 Y0 . For every α, with 0 < α < κ we define Xα = {x ∈ d T X : ∀β ≤ α x =α xα }, Yα = β<α Xβ ; moreover, xα = α Yα if Yα is nonempty and V xα = β<α xβ if Yα is empty. V Finally, we define x∞ = α<κ xα . In analogy to the proof of (Ésik and Rondogiannis d 2014) for the least upper bound it can be shown that x∞ = X with respect to the relation ⊑. Moreover, it is easy to prove that by construction it holds xα =α xβ and xβ ≥ xα for all β < α. Lemma 14 Let P be a program, α < κ and Mα be a Herbrand model of P. Let M ⊆ (Mα ]α be a d nonempty set of Herbrand models of P. Then, α M is also a Herbrand model of P. Proof d Assume α M is not a model. Then, there exists a clause p ← E in P and di ∈ d d [[ρi ]]D such that [[E]]( α M) d1 · · · dn > ( α M)(p) d1 · · · dn . Since for every N ∈ M d d we have α M ⊑α N , using Lemma 5 we conclude [[E]]( α M) ⊑α [[E]](N ). Let x = d d α {N (p) d1 · · · dn : N ∈ M}.VBy definition, x = ( α M)(p) d1 · · · dn . If order(x) = α then x = {N (p) d1 · · · dn : N ∈ M}. If x = Tα then for all N ∈ M d we have N (p) d1 · · · dn = Tα . Moreover, [[E]]( α M) d1 · · · dn > Tα and by α-monotonicity we have [[E]](N ) d1 · · · dn > Tα for all N ∈ M. Then, N (p) d1 · · · dn < [[E]](N ) d1 · · · dn and therefore N is not a model (contradiction). If x = Fα then there exists N ∈ M such that N (p) d1 · · · dn = Fα and since N is a model we have [[E]](N ) d1 · · · dn ≤ Fα . But d d then, it follows [[E]]( α M) d1 · · · dn ≤ Fα and [[E]]( α M) d1 · · · dn ≤ x (contradiction). d If order(x) < α then x = Mα (p) d1 · · · dn . If x = Tβ then [[E]]( α M) d1 · · · dn > Tβ and [[E]](Mα ) d1 · · · dn > Tβ . Then, we have Mα (p) d1 · · · dn < [[E]](Mα ) and thus Mα is not a model of P (contradiction). If x = Fβ then [[E]](Mα ) d1 · · · dn ≤ Fβ and by α-monotonicity d d [[E]]( α M) d1 · · · dn ≤ Fβ . Therefore, [[E]]( α M) d1 · · · dn ≤ x (contradiction). If order(x) > α then x = Tα+1 and there exists model N ∈ M such that N (p) d1 · · · dn < d Tα . Moreover, we have [[E]]( α M) d1 · · · dn ≥ Tα and by α-monotonicity we conclude [[E]](N ) d1 · · · dn ≥ Tα . But then, [[E]](N ) d1 · · · dn > N (p) d1 · · · dn and therefore N is not a model of P (contradiction). In the following, we will make use of the following lemma that has been shown in (Ésik and Rondogiannis 2014, Lemma 3.18): Lemma 15 If α ≤ κ is an ordinal and (xβ )β<α is a sequence of elements of L such that xβ =β xγ V W and xβ ≤ xγ (xβ ≥ xγ ) whenever β < γ < α, and if x = β<α xβ (x = β<α xβ ), then xβ =β x holds for all β < α. Lemma 16 Let (Mα )α<κ be a sequence of Herbrand models of P such that Mα =α Mβ and Mβ ≤ Mα V for all α < β < κ. Then, α<κ Mα is also a Herbrand model of P. Minimum Model Semantics for Extensional Higher-order LP with Negation 19 Proof V Let M∞ = α<κ Mα and assume M∞ is not a model of P. Then, there is a clause p ← E and di ∈ [[ρi ]]D such that [[E]](M∞ ) d1 · · · dn > M∞ (p) d1 · · · dn . We define xα = Mα (p) d1 · · · dn , x∞ = M∞ (p) d1 · · · dn , yα = [[E]](Mα ) d1 · · · dn and y∞ = [[E]](M∞ ) d1 · · · dn for all α < κ. It follows from Lemma 15 that M∞ =α Mα and thus x∞ =α xα for all α < κ. Moreover, using α-monotonicity we also have [[E]](M∞ ) =α [[E]](Mα ) and thus y∞ =α yα for all α < κ. We distinguish cases based on the value of x∞ . Assume x∞ = Tδ for some δ < κ. It follows by assumption that y∞ > Tδ . Then, since x∞ =δ xδ it follows xδ = Tδ . Moreover, since y∞ =δ yδ and order(y∞ ) < δ it follows yδ = y∞ > Tδ . But then, yδ > xδ (contradiction since Mδ is a model by assumption). Assume x∞ = Fδ for some δ < κ. Then, since x∞ =δ xδ it follows xδ = Fδ . Then, since Mδ is a model it follows yδ ≤ xδ and thus yδ ≤ Fδ . But then, since y∞ =δ yδ it follows yδ = y∞ ≤ Fδ . Therefore, y∞ ≤ x∞ that is a contradiction to our assumption that y∞ > x∞ . Assume x∞ = 0. Then, y∞ > x∞ = 0. Let y∞ = Tβ for some β < κ. Then, since yβ =β y∞ it follows yβ = Tβ . Since Mβ is a model of P it holds Tβ = yβ ≤ xβ , that is xβ = Tγ for some γ ≤ β. Moreover, since x∞ =β xβ it follows that x∞ = Tγ that is a contradiction to our assumption that x∞ = 0. Theorem 2 (Model Intersection Theorem) d Let P be a program and M be a nonempty set of Herbrand models of P. Then, M is also a Herbrand model of P. Proof d We use the construction for M described in the beginning of this appendix. More d specifically, we define sets Mα , Yα ⊆ M and Mα ∈ IP . Let Y0 = M and M0 = 0 Y0 . T For every α > 0, let Mα = {M ∈ M : ∀β ≤ α M =α Mα } and Yα = β<α Mβ ; V d moreover, Mα = α Yα if Yα is nonempty and Mα = β<α Mβ if Yα is empty. Then, d V M = α<κ Mα . It is easy to see that Mα =α Mβ and Mβ ⊇ Mα for all β < α. We distinguish two cases. First, consider the case when Yα is nonempty for all α < κ. d Then, Mα = α Yα and by Lemma 14 it follows that Mα is a model of P. Moreover, by V Lemma 16 we get that M∞ = α<κ Mα is also a model of P. Consider now the case that there exists a least ordinal δ < κ such that Yδ is empty. V It holds (see (Ésik and Rondogiannis 2014)) that M∞ = α<δ Mδ . Suppose M∞ is not a model of P. Then, there is a clause p ← E, a Herbrand state s and di ∈ [[ρi ]]D such that [[E]](M∞ ) d1 · · · dn > M∞ (p) d1 · · · dn . We define xα = Mα (p) d1 · · · dn , x∞ = M∞ (p) d1 · · · dn , yα = [[E]](Mα ) d1 · · · dn , and y∞ = [[E]](M∞ ) d1 · · · dn for all β ≤ α. We distinguish cases based on the value of x∞ . Assume x∞ = Tβ for some β < δ. It follows by assumption that y∞ > x∞ = Tβ . Then, by Lemma 15 it holds that M∞ =β Mβ and we get x∞ =β xβ and therefore xβ = Tβ . Moreover, by α-monotonicity we get [[E]](M∞ ) d1 · · · dn =β [[E]](Mβ ) d1 · · · dn and it follows that y∞ =β yβ . Moreover, since y∞ > Tβ it follows yβ = y∞ > Tβ d and yβ > xβ . Since Yβ is not empty by assumption we have that Mβ = β Yβ and by Lemma 14 we get that Mβ is a model of P (contradiction since yβ > xβ ). Assume x∞ = Fβ for some β < δ. Then, by Lemma 15 it holds M∞ =β Mβ and therefore x∞ =β xβ . It follows xβ = Fβ . Moreover, since Yβ is nonempty by assumption 20 A. Charalambidis, Z. Ésik and P. Rondogiannis d and by Lemma 14 it follows that Mβ = β Yβ is a model of P and thus yβ ≤ xβ = Fβ . By α-monotonicity we get [[E]](M∞ ) =β [[E]](Mβ ) and therefore y∞ =β yβ ≤ Fβ . It follows y∞ ≤ Fβ = x∞ (contradiction to the initial assumption y∞ > x∞ ). Assume x∞ = Tδ . By assumption we have y∞ > x∞ = Tδ . Then, let y∞ = Tγ for some γ < δ. By Lemma 15 it holds M∞ =γ Mγ and by α-monotonicity it follows [[E]](M∞ ) =γ [[E]](Mγ ) and thus y∞ =γ yγ . It follows that yγ = Tγ . Moreover, since d γ < δ we know by assumption that Yγ is nonempty and therefore Mγ = Yγ and by Lemma 14 Mγ is a model of P. It follows Tγ = yγ ≤ xγ , that is, xγ = Tβ for some β ≤ γ < δ. Moreover, since x∞ =γ xγ it follows x∞ = Tβ that is a contradiction (since by assumption x∞ = Tδ ). Assume x∞ = Fδ . This case is not possible. Recall that Yα is not empty for all α < δ d d d and thus Mα = Yα . By the definition of α we observe that either α Yα ≤ Fα or V d α<δ Mα it is not possible to have x∞ = Fδ . α Yα ≥ Tα+1 . Then, since M∞ = Assume x∞ = 0. This case does not arise. Again, Yα is not empty for all α < δ and d d thus Mα = α Yα . Moreover, by definition of α , xα 6= 0 for all α < δ. Moreover, since V M∞ = α<δ Mα and since δ < κ it follows that the limit can be at most Tδ . Appendix D Proofs of Lemmas 6, 7 and Theorem 3 Lemma 6 Let P be a program. For every predicate constant p : π in P and I ∈ IP , TP (I)(p) ∈ [[π]]UP . Proof It follows from the fact that [[π]]UP is a complete lattice (Lemma 2). Lemma 7 Let P be a program. Then, TP is α-monotonic for all α < κ. Proof Follows directly from Lemma 5 and Proposition 8. Lemma 17 Let P be a program. Then, M ∈ IP is a model of P if and only if TP (M ) ≤IP M . Proof An interpretation I ∈ IP is a model of P iff [[E]](I) ≤π I(p) for all clauses p ←π E in P iff W (p←E)∈P [[E]](I) ≤IP I(p) iff TP (I) ≤IP I. Proposition 18 Let D be a nonempty set, π be a predicate type and x, y ∈ [[π]]D . If x ≤π y and x =β y for all β < α then x ⊑α y. Minimum Model Semantics for Extensional Higher-order LP with Negation 21 Proof The proof is by structural induction on π. Induction Basis: If x =β y for all β < α then either x = y or order(x), order(y) ≥ α. If x = y then x ⊑α y. Suppose x 6= y. If order(x), order(y) > α then x =α y. If x = Fα then clearly x ⊑α y. If x = Tα then Tα ≤ y and therefore y = Tα . The case analysis for y is similar. Induction Step: Assume that the statement holds for π. Let f, g ∈ [[ρ → π]]D and α < κ. For all x ∈ [[ρ]]D and β < α, f (x) ≤ g(x) and f (x) =β g(x). It follows that f (x) ⊑α g(x). Therefore, f ⊑α g. Proposition 19 Let P be a program and I, J be Herbrand interpretations of P . If I ≤IP J and I =β J for all β < α then I ⊑α J. Proof Let I, J ∈ IP and α < κ. For all predicate constants p and β < α, I(p) ≤ J(p) and I(p) =β J(p). It follows by Proposition 18 that I(p) ⊑α J(p) and therefore, I ⊑α J. Lemma 20 Let P be a program. If M is a model of P then TP (M ) ⊑ M . Proof It follows from Lemma 17 that if M is a Herbrand model of P then TP (M ) ≤IP M . If TP (M ) = M then the statement is immediate. Suppose TP (M ) <IP M and let α denote the least ordinal such that TP (M ) =α M does not hold. Then, TP (M ) =β M for all β < α. Since TP (M ) <IP M , by Proposition 19 it follows that TP (M ) ⊑α M . Since TP (M ) =α M does not hold, it follows that TP (M ) ❁α M . Therefore TP (M ) ⊑ M . Theorem 3 (Least Fixed Point Theorem) Let P be a program and let M be the set of all its Herbrand models. Then, TP has a d least fixed point MP . Moreover, MP = M. Proof It follows from Lemma 7 and Theorem 1 that TP has a least pre-fixed point with respect to ⊑ that is also a least fixed point. Let MP be that least fixed point of TP , i.e., TP (MP ) = MP . It is clear from Lemma 17 that MP is a model of P, i.e., MP ∈ M. Then, it follows d d M ⊑ MP . Moreover, from Theorem 2 it is implied that M is a model and thus d from Lemma 20, M is a pre-fixed point of TP with respect to ⊑. Since MP is the least d d pre-fixed point of P, MP ⊑ M and thus MP = M.
6cs.PL
Ref: ACM Genetic and Evolutionary Computation Conference (GECCO), pp. 189—190, Berlin, Germany, July 2017. A Two-Phase Genetic Algorithm for Image Registration Sarit Chicotay Bar-Ilan University Ramat-Gan, Israel [email protected] Eli (Omid) David1 Bar-Ilan University Ramat-Gan, Israel [email protected] ABSTRACT Image Registration (IR) is the process of aligning two (or more) images of the same scene taken at different times, different viewpoints and/or by different sensors. It is an important, crucial step in various image analysis tasks where multiple data sources are integrated/fused, in order to extract high-level information. Registration methods usually assume a relevant transformation model for a given problem domain. The goal is to search for the "optimal" instance of the transformation model assumed with respect to a similarity measure in question. In this paper we present a novel genetic algorithm (GA)-based approach for IR. Since GA performs effective search in various optimization problems, it could prove useful also for IR. Indeed, various GAs have been proposed for IR. However, most of them assume certain constraints, which simplify the transformation model, restrict the search space or make additional preprocessing requirements. In contrast, we present a generalized GA-based solution for an almost fully affine transformation model, which achieves competitive results without such limitations using a twophase method and a multi-objective optimization (MOO) approach. We present good results for multiple dataset and demonstrate the robustness of our method in the presence of noisy data. CCS CONCEPTS • Computing methodologies~Search methodologies Computing methodologies~Computer vision • KEYWORDS Computer Vision, Genetic Algorithms, Image Registration, MultiObjective Optimization, Normalized Cross Correlation 1 INTRODUCTION Image registration (IR) is an important, significant component in many practical problem domains. Due to the enormous diversity of IR applications and methodologies, automatic IR remains a challenge to this day. A broad range of registration techniques has been developed for various types of datasets and problem domains [1], where typically, domain-specific knowledge is taken into account and certain a priori assumptions are made to simplify the model in question. 1 www.elidavid.com Nathan Netanyahu is also with the Center for Automation Research, University of Maryland, College Park, MD 20742. 2 Nathan S. Netanyahu2 Bar-Ilan University Ramat-Gan, Israel [email protected] An affine transformation is one of the most commonly used models. Since the search space is too large for a feasible exhaustive search through the entire parameter space, the major challenge is to avoid getting stuck at a local optimum when there are multiple extrema in the similarity metric search space. In order to overcome this problem, we present in this paper a novel two-phase genetic algorithm (GA)-based approach for IR. We devise a GA-based framework coupled with image processing techniques to search efficiently for an optimal transformation with respect to a given similarity measure. Due to our two-phase strategy and a unique simultaneous optimization of two similarity measures based on a multi-objective optimization (MOO) strategy, we obtain good results over a relatively large search space assuming an almost fully affine transformation model. 2 TWO-PHASE GA-BASED IR This section describes briefly our two-phase GA-based approach to optimize the devised similarity measures by utilizing common IR tools. For a detailed presentation of this work see [2]. Our IR scheme searches for a transformation that generates a maximal match in the overlap between the reference image and the transformed sensed image, thus, the GA chromosome is defined by six genes reflecting the effects represented by an affine transformation; translation along the -and- axis, rotation, scale factor, and shear along the -and- axis. Two similarity measures are used in this work: (1) Euclidean distance measure, which is applied to geometric feature points extracted from both images, and (2) normalized cross correlation (NCC) [3], which is an intensity-based measure. The Euclidean distance measure computes the similarity between two feature point sets, and , extracted from the reference and sensed image. We first tested our scheme using manually selected features and showed that without assuming correspondences our algorithm gives good registration results. We then applied the measure to wavelet features obtained in a fullyautomatic mode from Simoncelli's steerable filters [4] based on a wavelet transform. The Euclidean distance measure is calculated for the two extracted feature sets as follows: First, the feature points extracted from the sensed image are warped according to the transformation assumed. For each warped point ⃗ we determine its corresponding point ⃗ among the unassigned reference feature points ⊆ , by finding its nearest neighbor with respect to Euclidean distance ( ⃗, ⃗) , i.e., ( )= ⃗ min ( , ) ⃗ Finally, the similarity value is the value of the median Euclidean distance among the correspondences found, i.e., ( , )= ⃗ ⃗, ( ⃗) The second measure used is the normalized cross correlation (NCC), which has been commonly applied to evaluate the degree of similarity between two images. For image and the warped image it is defined as: ∑ , ( ( , ) − ̅ )( ( , ) − ) ( , )= ∑ , ( ( , ) − ̅) ∑ , ( ( , ) − ) where ̅ and are the average gray levels of images and . Having performed several tests using each of these measures, independently, as the fitness function, we noticed that the GA fails to obtain consistent results with a single measure. In an attempt to obtain a more robust IR scheme, we combined, therefore, the two measures as part of our two-phase strategy. 2.1 Phase 1: Coarse Estimation The goal of the first phase is to obtain an initial coarse estimate. This is achieved using the Euclidean distance measure which is expected to yield consistent candidate solutions that are "relatively" close to the optimal solution. The first phase completes when there is no "significant" update for a predefined number of changes or when converging to some predefined minimal distance measure. 2.2 Phase 2: Multi-Objective Optimization The second phase starts with the population at the end of the first phase. The Euclidean distance measure is combined with the NCC measure which makes use of the full image data. Ideally, we would like to optimize simultaneously the two objective functions, however, in practice, they may not be optimized simultaneously. Thus, we use a multi-objective optimization approach that gives a partial ordering of solutions based on Pareto dominance. The second phase completes when there is no "significant" update. We select among the pareto-optimal set the individual with the best NCC value as the suggested solution. (affected by contrast relationships). Table 1 and Figure 1 present several results in a fully-automatic mode. We compared also our results on multiple datasets to other methods assuming a simpler transformation model and performed additional tests on real images from INRIA database [5] that underwent affine transformations. See [2] for full details. 4 CONCLUSIONS In this paper we presented a novel two-phase GA-based image registration algorithm, whose main advantage over existing evolutionary IR techniques is that it provides a robust and automatic solution for a (quasi) fully affine transformation which is one of the most commonly used models for image registration. We used the Euclidean distance measure and the NCC measure as part of a two-phase strategy, supported by a novel MOO design, which is used to optimize the two similarity measures simultaneously. We have tested extensively the proposed scheme, and demonstrated its robustness to noisy data and consistency on multiple datasets over successive runs. Further research should be done to achieve a robust, fullyautomatic registration in more challenging scenarios. REFERENCES [1] J. Santamaría, O. Cordón, and S. Damas. A comparative study of state-ofthe art evolutionary image registration methods for 3D modeling, Computer Vision and Image Understanding, vol. 115(9), pp. 1340–1354, 2011. [2] http://u.cs.biu.ac.il/~nathan/GAImgReg/Two-Phase_GA_for_IR.pdf [3] Y.R. Rao, N. Prathapani, and E. Nagabhooshanam. Application of normalized cross correlation to image registation, International Journal of Research in Engineering and Technology, vol. 3(5), pp. 12-16, 2014. [4] A. Karasaridis and E.P. Simoncelli. A filter design technique for steerable pyramid image transforms. Proceedings of the IEEE Inernational Conference on Acoustics, Speech and Signal Processing, vol. 4(7-10), pp. 2387–2390, 1996. [5] https://lear.inrialpes.fr/people/mikolajczyk/Database, INRIA, Mikolajczyk evaluation database. Table 1: Fully-automatic registration results of the images in Figure 1 (RMSE in pixels). Image Boat House Avg. RMSE 1.37 1.34 σ RMSE 0.2 0.24 3 EMPIRICAL RESULTS We tested our algorithm on a few dozens of synthetic and real image datasets, including various satellite and outdoor scenes, in both a semi-automatic and a fully-automatic mode. The correctness of the final transformation is evaluated by the root mean square error (RMSE) for manually selected points. We consider RMSE value < 1.5 pixels as a good registration. The semi-automatic mode yields good results in all of the cases considered. The tests in a fully-automatic mode achieved successful registration in RMSE terms in about 75% of the test cases. Some of the failed cases can be recovered, though, if additional measures/constraints are applied to the transformation's parameters, e.g., using mutual information (MI) instead of NCC 2 Figure 1: (a), (d) Reference, (b), (e) sensed, and (c), (f) registered images of "boat" and "house" pairs from [5].
1cs.CV
THE SYMMETRIC SIGNATURE arXiv:1602.07184v2 [math.AC] 5 Sep 2016 HOLGER BRENNER AND ALESSIO CAMINATA Abstract. We define two related invariants for a d-dimensional local ring (R, m, k) called syzygy and differential symmetric signature by looking at the maximal free splitting of reflexive symmetric powers of two modules: the top dimensional syzygy module SyzdR (k) of the residue field and the module of Kähler differentials ΩR/k of R over k. We compute these invariants for two-dimensional ADE singularities obtaining 1/|G|, where |G| is the order of the acting group, and for cones over elliptic curves obtaining 0 for the differential symmetric signature. These values coincide with the F-signature of such rings in positive characteristic. Introduction Let (R, m, k) be a Noetherian local ring of prime characteristic p and dimension d which is F-finite, and with algebraically closed residue field k. For every e ∈ N, let q = pe , and let eR be the R-module which is equal to R as abelian group and has scalar multiplication twisted via the e-th Frobenius homomorphism, that is r ◦ s := rq s for r ∈ R and s ∈ eR. We decompose it as e R = Raq ⊕ Mq , where the module Mq has no free direct summands. The number aq is also called the free rank of eR and denoted by frkR (eR), while if R is a domain, one has that qd = rankR (eR), the usual rank of an R-module. Huneke and Leuschke [HL02] defined the F-signature of R as the limit aq s(R) := lim d . e→+∞ q They proved that the limit defining the F-signature exists assuming that R is Gorenstein and in other cases. Watanabe and Yoshida [WY04] introduced the minimal relative Hilbert-Kunz multiplicity. Then, Yao [Yao06] proved it actually coincides with the F-signature. Finally, Tucker [Tuc12] proved that the F-signature exists for every reduced F-finite Noetherian local ring. The F-signature is a real number between 0 and 1 and provides delicate information about the singularities of R. Two principal results in this direction are the fact that s(R) = 1 if and only if the ring is regular [WY00], and that s(R) > 0 if and only if R is strongly F-regular [AL03]. The main motivation for this paper is given by the following question. Question. Does there exist an invariant analogous to the F-signature which is independent of the characteristic and can be used to study singularities also in characteristic zero? A possible natural attempt to define a characteristic zero version of the F-signature is the following. If R is a reduced Z-algebra such that Spec R → Spec Z is dominant, then for every prime number p we consider its reduction mod p, Rp := R ⊗Z (Z/pZ), and compute the F-signature s(Rp ). One may ask whether the limit lim s(Rp ) p→+∞ exists, and use this limit to define a characteristic 0 version of the F-signature. Unfortunately, it is difficult to find an appropriate meaning and compute the previous limit, or even determine whether it exists at all. If p1 and p2 are distinct prime numbers, the two Frobenius homomorphisms are difficult to compare. If R is a domain then the rank of eRp1 and the rank of eRp2 are different, the first one being pe1 . Mathematics Subject Classification (2010): 13A35, 13A50. Keywords: F-signature, ADE singularities, free resolutions, Kähler differentials. 1 2 HOLGER BRENNER AND ALESSIO CAMINATA In this paper we define a new invariant called symmetric signature which works in any characteristic. As inspiration for our construction, we considered two important properties of the modules eR which we would like to keep. The first fact is a result of Kunz [Kun69] which states that eR is a free module (for all or for some e ∈ N) if and only if R is a regular ring. Next, if the ring R is Cohen-Macaulay then eR is a maximal Cohen-Macaulay (MCM for short) module. Let (R, m, k) be a Noetherian local k-algebra of dimension d. We look for an R-module with the property that it is free if and only if R is regular. We have at least two modules with this property: the top-dimensional syzygy module of the residue field SyzdR (k), and the module of (Kähler) differentials ΩR/k of R over k or its dual. If R is Cohen-Macaulay, then the module SyzdR (k) is MCM by the depth lemma, on the other hand ΩR/k is not even reflexive in general. For this reason we prefer to work with its reflexive hull, Ω∗∗ , R/k which is called module of Zariski differentials of R over k. The sign (−)∗ stands for the functor HomR (−, R). We want to study an asymptotic behaviour, so we construct two classes of modules (one for SyzdR (k), and one for Ω∗∗ ) indexed by a natural number q. To do this we introduce the functor of q-th reflexive R/k  ∗∗ q symmetric powers SymR (−) , that is ordinary q-th symmetric powers of R-modules composed with the reflexive hull. The choice of studying symmetric powers is motivated by an unpublished work of Brenner and Fischbacher-Weitz [BF09]. Symmetric powers of cotangent bundles on projective varieties have been studied also by other authors such as Bogomolov and De Oliveira[BDO08], and Sakai [Sak78]. Instead, the reflexive hull is motivated by the fact that we want to stay inside the category of reflexive modules, which coincides with the category of MCM R-modules if R is a normal two-dimensional domain. More precisely, we procede as follows. We consider SyzdR (k) (for Ω∗∗ the situation is analogous) R/k and we apply to it the q-th reflexive symmetric powers functor for a natural number q. We obtain a reflexive R-module   ∗∗ q Sq := SymR SyzdR (k) We decompose the module Sq as Sq = Raq ⊕ Mq , with the module Mq containing no free direct summands, so that aq = frkR Sq the free rank of Sq . For ease of notation we fix also bq := rankR Sq , and we introduce the following (Definition 1.11). Definition. The real number PN q=0 aq sσ (R) := lim PN N→+∞ q=0 bq is called (syzygy) symmetric signature of R, provided the limit exists. Replacing the module SyzdR (k) with Ω∗∗ in the previous construction we define also the differential R/k symmetric signature of R, which we denote by sdσ (R). In order to understand the behaviour of these new invariants in comparison with the F-signature we concentrate on two important classes of examples: two-dimensional Kleinian singularities, and coordinate rings of plane elliptic curves. Two-dimensional Kleinian or ADE singularities are the rings of invariants R = SG of a power series ring in two variables S = k~u, v under the linear action of certain finite subgroups G of SL(2, k), called Klein groups. The field k is algebraically closed and such that its characteristic does not divide the order of the acting group G. Watanabe and Yoshida [WY04] proved that if the characteristic of k is a 1 . We prove that the same holds for the symmetric prime number then the F-signature of R is s(R) = |G| and the differential symmetric signature in any characteristic (Corollary 3.18), that is sσ (R) = sdσ (R) = 1 . |G| Our main tool to prove this result is the so-called Auslander correspondence (Theorem 2.4). This states that for a Kleinian singularitiy R = SG there is a functorial one to one correspondence between THE SYMMETRIC SIGNATURE 3 irreducible k-representations of G and indecomposable maximal Cohen-Macaulay R-modules. The module corresponding to a k-representation V is given by A(V) := (S ⊗k V)G . We prove that this construction commutes with q-th reflexive symmetric powers (Theorem 2.12), that is we have    ∗∗ q q A Symk (V)  SymR (A(V)) . q q Here, SymR (−) denotes the q-th symmetric power of an R-module, and Symk (V) is the q-th symmetric power of the representation V. This result is the key to translate the problem of computing the symmetric signature into a problem in representation theory of finite groups. In fact, it turns out that the free rank of some MCM Rmodule M = A(V) is equal to the multiplicity of the trivial representation into V, and the latter can be more easily computed using tools from representation theory, such as characters. The symmetric signature of two-dimensional cyclic quotient singularities k~u, vG , with G cyclic, is also 1/|G| and is computed by Katthän and the second author in the paper [CK16]. Let R be the coordinate ring of a plane elliptic curve over an algebraically closed field k. Then R is not strongly F-regular, therefore its F-signature is s(R) = 0. We prove that the differential symmetric signature of R is sdσ (R) = 0 (Theorem 4.14), provided that char k is not 2 or 3. For the syzygy symmetric signature we give an upper bound, that is sσ (R) ≤ 21 (Corollary 4.18), provided that the limit exists. The methods we use in this situation are geometric. We use the correspondence between graded MCM R-modules and vector bundles over the smooth projective curve Y = Proj R, and we translate the problem of computing sσ (R) and sdσ (R) into an analogous problem in the category VB(Y) of vector bundles over Y. The main advantage of this approach is that over an elliptic curve Y the indecomposable vector bundles have been classified and described by Atiyah [Ati57]. The structure of this paper is the following. In Section 1 we give a short review of the F-signature and its properties. Then, we define the symmetric and differential symmetric signatures, together with some other variants: a generalized version for modules (Definition 1.16), and one for graded rings (Definition 1.17). Some easy properties and consequences of the symmetric signature are also stated in this section. In Section 2 we review the theory of the Auslander correspondence and we prove that the Auslander functor commutes with reflexive symmetric powers (Theorem 2.12). Section 3 is dedicated to the computation of the symmetric signatures of two-dimensional Kleinian singularities, and Section 4 to the computation of the symmetric signature for coordinate rings of plane elliptic curves. 1. F-signature and Symmetric signature 1.1. F-signature. We recall some general facts about rings of prime characteristic, and the definition and basic properties of the F-signature. Let R be a commutative ring containing a field of prime characteristic p. With the letter e we always denote a natural number, and with q = pe a power of the characteristic. The Frobenius homomorphism is the ring homomorphism F : R → R, F(r) = rp , we often consider also its iterates Fe : R → R, Fe (r) = rq . For any finitely generated R-module M, we denote by e M the R-module M, whose multiplicative structure is pulled back via Fe . The scalar multiplication on eM is given by r · m := rq m, for any r ∈ R, m ∈ eM. We say that R is F-finite if 1R is a finitely generated R-module, and we say that R is F-split if the Frobenius map F : R → 1R splits. If (R, m, k) is a complete Noetherian local ring, then R is F-finite if and only if [k1/p : k] is finite. We will always assume that our rings are F-finite, and that k is perfect, that is [k1/p : k] = 1. The latter is not a strong restriction, but it is done simply to avoid that numbers like [k1/p : k] appear in the definitions and in the results. Remark 1.1. If R is F-finite and Cohen-Macaulay, then eR is a maximal Cohen-Macaulay module for every e ∈ N. Actually, if x1 , . . . , xn is a maximal R-regular sequence, then it is also an eR-regular sequence for every e ∈ N. 4 HOLGER BRENNER AND ALESSIO CAMINATA Let (R, m, k) be a d-dimensional Noetherian reduced local ring of prime characteristic p, which is F-finite and such that k is perfect. We recall the definition of free rank of an R-module M frkR (M) := max{n : ∃ a split surjection ϕ : M ։ Rn }. Since the cancellation property holds for finitely generated modules over a local ring (cf. [LW12, Corollary 1.16]), frkR (M) is the unique integer such that we have a decomposition M  RfrkR (M) ⊕ N, and the module N contains no free R-direct summands. Definition 1.2 (Huneke-Leuschke, [HL02]). The F-signature of R, denoted by s(R) is the limit frkR (eR) . e→+∞ qd s(R) := lim Tucker [Tuc12] proved that the F-signature exists for every reduced F-finite Noetherian local ring. Remark 1.3. If R is a domain of dimension d, then rankR (eR) = qd . So we can write the limit defining the F-signature as frkR (eR) s(R) = lim . e→+∞ rankR (eR) The F-signature is always a real number in the interval [0, 1]. Using a result of Watanabe and Yoshida [WY00], Huneke and Leuschke [HL02] proved that if R is Cohen-Macaulay then the extreme value 1 is obtained if and only if the ring is regular. Then, Yao [Yao06] removed the Cohen-Macaulay assumption. Theorem 1.4. Let (R, m, k) be a reduced F-finite local ring of prime characteristic such that k is infinite and perfect. Then s(R) = 1 if and only if R is regular. Also the value s(R) = 0 has a special meaning in terms of the singularities of the ring, it is equivalent to the ring being not strongly F-regular, an important notion in tight closure theory. Theorem 1.5 (Aberbach-Leuschke, [AL03]). Let (R, m, k) be a reduced excellent F-finite local ring of prime characteristic such that k is perfect. Then s(R) > 0 if and only if R is strongly F-regular. Remark 1.6. If the ring R has dimension 0 or 1, then it is normal if and only if it is regular if and only if it is strongly F-regular. So by Theorem 1.4 and Theorem 1.5 we have only two possibilities for the F-signature of R. We have s(R) = 1 if R is regular, and s(R) = 0 otherwise. Theorem 1.4 and Theorem 1.5 justify the statement that F-signature measures singularities. Roughly speaking, the closer the F-signature to 1 is, the nicer the singularity. An important example is the F-signature of quotient singularities computed by Watanabe and Yoshida. Theorem 1.7 (Watanabe-Yoshida, [WY04]). Let R = k~x1 , . . . xn G be a quotient singularity over a field k of prime characteristic p. Assume that the acting group G ⊆ GL(n, k) is a small finite group such that (p, |G|) = 1. Then the F-signature of R is 1 . s(R) = |G| We conclude with the notion of generalized F-signature, introduced by Hashimoto and Nakajima [HN15]. Let C be a full subcategory of mod(R), the category of finitely generated R-modules, such that C has the Krull-Remak-Schmidt property (KRS property for short) and eR ∈ C for every e ∈ N. For example, if R is complete we may choose C = mod(R). Let M be an indecomposable object in C, for each e ∈ N and q = pe we can consider the multiplicity aq of M inside eR. In other words, we can write eR = Maq ⊕ Nq , with the module Nq containing no copies of M as direct summands. Definition 1.8 (Hashimoto-Nakajima, [HN15]). The generalized F-signature of R with respect to M is aq s(R, M) := lim d , e→+∞ q provided the limit exists. THE SYMMETRIC SIGNATURE 5 Remark 1.9. If the ring R has finite F-representation type, then the generalized F-signature exists. This is a consequence of [SVB96, Proposition 3.3.1] and of [Yao05, Theorem 3.11]. Moreover, Seibert [Sei97] proved that in this situation the F-signature and the Hilbert-Kunz multiplicity of R are rational numbers. Theorem 1.10 (Hashimoto-Nakajima, [HN15]). Let R = k~x1 , . . . xn G be a quotient singularity over an algebraically closed field k of prime characteristic p. Assume that the acting group G ⊆ GL(n, k) is a small finite group such that that (p, |G|) = 1. Let Vt be an irreducible k-representation of G and let Mt = A(Vt ) = (S⊗k Vt )G be the corresponding R-module via Auslander functor. Then the generalized F-signature of R with respect to Mt is rankR Mt s(R, Mt ) = . |G| The definition of the Auslander functor A and the relation between k-representations of G and reflexive modules over the invariant ring R will be reviewed in Section 2. 1.2. Symmetric signature. For this section, let (R, m, k) be a local Noetherian k-domain of dimension d (of any characteristic) and let q be a natural number. We consider the top-dimensional syzygy module SyzdR (k) of the residue field, coming from a minimal free resolution of k, and the module of (Kähler) differentials of R over k, denoted by ΩR/k . It is an easy consequence of the Auslander-Buchsbaum-Serre theorem, and of Auslander-Buchsbaum formula that SyzdR (k) is R-free if and only if R is regular. Similarly, under some mild conditions we have that ΩR/k is R-free if and only if R is regular (see e.g. [Har77, Chapter II, Theorem 8.8]). Moreover from the depth lemma follows that if R is Cohen-Macaulay then SyzdR (k) is maximal Cohen-Macaulay, and in particular reflexive. On the other hand ΩR/k is not even reflexive in general (see e.g. [Her78a]), so it is convenient to work with its reflexive hull Ω∗∗ , which is called module of Zariski (or regular) R/k differentials of R over k. Let q be a natural number, we define the following two classes of R-modules.   ∗∗ q Sq : = SymR SyzdR (k) ,     ∗∗  ∗∗ q q Cq : = SymR Ω∗∗ = Sym . Ω R/k R/k R Definition 1.11. The real numbers PN q=0 sσ (R) := lim PN N→+∞ and q=0 PN frkR Sq rankR Sq q=0 sdσ (R) := lim PN N→+∞ q=0 , frkR Cq rankR Cq are called (syzygy) symmetric signature of R, and differential symmetric signature of R respectively, provided the limits exist. In the rest of the paper we will study both the symmetric signature and the differential symmetric signature. For the clarity of exposition we will focus sometimes on one definition and we will say what applies also to the other. We don’t know whether the limit defining the symmetric signature always exists. To obtain an invariant which is for sure well defined and exists, one may replace the limits in Definition 1.11 with limits inferior. Moreover one may ask why should we consider the limits of Definition 1.11, insted of the simpler limit frkR Sq . (1) lim q→+∞ rankR Sq The main reason is that the limit (1) does not exist even in simple cases, as we see in Example 3.19. However, when the simpler limit (1) exists, then also the symmetric signature exists and they coincide. 6 HOLGER BRENNER AND ALESSIO CAMINATA Lemma 1.12. LetP(an )n∈N , (bn )n∈N be sequences of real numbers such that bn > 0 for all n ∈ N. Assume that the infinite series n∈N bn diverges. If the limit limn→+∞ abnn exists, then also the limit Pn ak lim Pnk=0 n→+∞ k=0 bk exists and the two limits coincide. Remark 1.13. The modules Sq and Cq are reflexive for every q ≥ 0. If R is Cohen-Macaulay of dimension ≤ 2, then Sq and Cq are also MCM. Example 1.14. If R is a regular ring of dimension d, then SyzdR (k) and Ω∗∗ are free modules. Then Sq R/k q q q q q and C are also free, therefore frkR S = rankR S and frkR C = rankR C for every q. It follows that the symmetric signatures are sσ (R) = 1 and sdσ (R) = 1. In particular, this happens if R is of dimension 0, since it is forced to be a field, being a domain. Remark 1.15. If (R, m, k) has dimension 1, then the first syzygy of the residue field Syz1R (k) is just the maximal ideal m. Since m is an ideal it has rank 1, therefore also all its symmetric powershave rank 1,  ∗∗ q and the same holds for the reflexive hull. In other words, we have rankR SymR (Syz1R (k) = 1 for all q ∈ N. Therefore, for each q we have only two possibilities: either Sq  R and frkR Sq = rankR Sq = 1 or Sq is not free and frkR Sq = 0. Now assume in addition that the category Ref(R) of finitely generated reflexive modules has the KRS property. We fix an indecomposable object M in Ref(R), then for every q ∈ N we have a unique decomposition Sq = Maq ⊕ Nq , where the module Nq contains no copy of M as direct summand. The natural number aq is called the multiplicity of M in Sq . Definition 1.16. The number sσ (R, M) := lim PN N→+∞ PN q=0 q=0 aq rankR Sq is called generalized symmetric signature of R with respect to M, provided the limit exists. We can define the symmetric signature also for N-graded rings. Let R be a standard graded Noetherian k-domain of dimension d. We work in the category modZ (R) of finitely generated graded R-modules. In this category we consider the graded module SyzdR (k) coming from a minimal graded free resolution of k as R-module, and the differential module ΩR/k , which is also naturally graded. Their q-th reflexive symmetric powers Sq and Cq are again graded modules. We also introduce a graded version of the free rank. For any finitely generated graded R-module M, we define the graded free rank of M as gr frkR (M) := max{n : ∃ a homogeneous of degree 0 split surjection ϕ : M ։ F, with F free graded R-module of rank n}. The main reason to introduce this definition is that we want work in the Krull-Schmidt category modZ (R) of finitely generated graded R-modules, whose maps are R-linear homomorphisms of degree 0. Thus, the previous definition is more natural in this setting. Definition 1.17. The graded (syzygy) symmetric signature of R is defined by the limit PN gr q q=0 frkR S , sσ (R) := lim PN q N→+∞ q=0 rankR S provided it exists. Replacing the module Sq with Cq in the definition above, we define also the graded version of the differential symmetric signature. THE SYMMETRIC SIGNATURE 7 Remark 1.18. Notice that in the definition of sσ (R) for graded rings we consider the graded free rank instead of the free rank as in the local setting. Therefore some differences may occur. For example, one should remind that all direct summands of the form R(a) for some integer a contribute to the graded free rank part of the module. 2. Auslander correspondence and reflexive symmetric powers We fix the setting for this section. Let S = k~u, v be a power series ring in two variables over an algebraically closed field k. Let G ⊆ GL(2, k) be a finite group which is small, i.e. it contains no pseudo-reflections, and such that the characteristic of k and the order |G| of G are coprime. The group G acts on S via linear changes of variables, and we denote by R := SG the invariant ring under this action. The invariant ring R is called quotient singularity and has the following properties: it is a Noetherian local domain of dimension 2, normal, Cohen-Macaulay, complete, and an isolated singularity (see e.g. [BD08, Theorem 4.1]). Moreover, Watanabe [Wat74a, Wat74b] proved that R is Gorenstein if and only if G ⊆ SL(2, k). In this case R is called special quotient singularity. If G is a cyclic group R is called cyclic quotient singularity. The Kleinian singularities, or ADE singularities are special quotient singularities, which actually coincides with them if the base field has characteristic zero. In Section 3 we will compute the symmetric signature of Kleinian singularities. In this section we will review the theory of Auslander correspondence between linear k-representations of G and MCM R-modules, and we will prove that the Auslander functor commutes with reflexive symmetric powers. For a more detailed survey of these facts the reader may consult the books of Yoshino [Yos90], and of Leuschke and Wiegand [LW12], or the second author’s Ph.D. thesis [Cam16]. 2.1. The Auslander correspondence. We denote by k[G] the group ring of G over k, that is the kvector space with basis {e g : g ∈ G}, and with multiplication given on the basis elements by group multiplication e g eh = e gh and extended linearly to arbitrary elements. The category mod(k[G]) of finitely generated left modules over the group ring can be identified with the category of linear k-representations of G. For this reason we will use indifferently the terminology of representation theory or the terminology of module theory over k[G]. The skew M group ring of G and S is denoted by S ∗ G and it is a free S-module on the elements of G Sg, with a multiplicative structure given by (sg)(th) := sg(t) · gh for all s, t ∈ S, g, h ∈ G. S∗G= g∈G The group ring and the skew group ring are in general non-commutative, so by k[G]-module and S ∗ G-module we will always mean left module. We point out that an S ∗ G-module is just an S-module with a compatible action of G: g(sm) = g(s)g(m) for all g ∈ G, s ∈ S and m ∈ M. The ring S is clearly an S ∗ G-module, but not every S-module has a natural S ∗ G-module structure. There is a natural functor F between the category mod(k[G]) and the category Proj(S ∗ G) of finitely generated projective S ∗ G-modules, namely F (V) := S ⊗k V for every object V in mod(k[G]). The functor F has a right adjoint given by F ′ (P) := P ⊗S k. The functors F and F ′ are an adjoint pair [Yos90, Lemma 10.1], but in general they are not an equivalence of categories. We remark that an S ∗ G-module is S ∗ G-projective if and only if it is S-projective, hence S-free, since S is local. We define two other functors G : Proj(S ∗ G) → Ref(R), G(M) = MG , and G′ : Ref(R) → Proj(S ∗ G), G (N) = (S ⊗R N)∗∗ , where (−)∗ := HomS (−, S), and Ref(R) denotes the category of finitely generated reflexive R-modules. Since R has dimension 2 the category Ref(R) coincides with the category MCM(R) of maximal Cohen-Macaulay R-modules, and also with the category AddR (S) of R-direct summands of S by a result of Herzog [Her78b], that is Ref(R) = MCM(R) = AddR (S). ′ Auslander [Aus86b] proved that the functors G and G′ are an equivalence of categories. We will give a geometric proof of this fact, based on the following ring version of the Speiser’s Lemma of Galois theory due to Auslander and Goldman [AG60], and Chase, Harrison, and Rosenberg [CHR65]. Lemma 2.1 (Speiser’s Lemma). Let A be a commutative domain, G a finite group of ring automorphisms of A and denote by B = AG the invariant ring. Then the following facts are equivalent. 1) A is a separable B-algebra. 8 HOLGER BRENNER AND ALESSIO CAMINATA 2) For every g , idG in G, and every maximal ideal p in A, there exists a ∈ A such that a − g(a) < p. 3) The map ϕ : A ⊗B MG → M given by ϕ(a ⊗ m) = am is an isomorphism for every A ∗ G-module M. Lemma 2.2. Let S = k~u, v, let G ⊆ GL(2, k) be a finite small group such that (char k, |G|) = 1, and let R = SG . Let M be a projective S ∗ G-module and consider the canonical map δ : S ⊗R MG → M, given by δ(s ⊗ m) = sm. Then the following facts hold. ∼ e on the punctured spectrum U′ = Spec S\{m}, 1) δ induces an isomorphism of coherent sheaves S ⊗R MG → M where m = (u, v). 2) δ induces an isomorphism of S ∗ G-modules (S ⊗R MG )∗∗  M. Proof. The ring S is a Cohen-Macaulay isolated singularity, so coherent sheaves associated to MCM S-modules are locally free on the punctured spectrum. Moreover we recall that projective S-modules are MCM in this case. Therefore it follows that property 1) implies property 2). p We prove 1). Let f1 , . . . , fµ be elements in R which generate m up to radical, that is ( f1 , . . . , fµ ) = m as ideals in S. These elements exist, since the ring extension R ֒→ S is finite. Thus, we have an open S covering U′ = i D( fi ). We claim that for every f = fi the induced map δ f : S f ⊗R f MGf → M f is an isomorphism. We prove the claim, then the Lemma will follow from it. In fact, because we have a global homomorphism, we get a sheaf homomorphism defined on U′ which is locally an isomorphism, so it is forced to be an isomorphism on U′ . To prove the claim, let f be one of the fi ’s. We check that condition 2) of Lemma 2.1 is true for A = S f and B = R f . Let p be a maximal ideal of A. If a − g(a) ∈ p for every a ∈ A and every g ∈ G, then we have a ∈ p if and only if g(a) ∈ p, which is equivalent to say that p is a fix point for the action of G on A. On the other hand, since G is small, its action on U′ is fixpoint-free, so we get a contradiction. Therefore δ f is an isomorphism by Lemma 2.1 above.  Theorem 2.3. The functors G : Proj(S ∗ G) → Ref(R) and G′ : Ref(R) → Proj(S ∗ G) give an equivalence of categories Proj(S ∗ G)  Ref(R). Proof. See [Yos90, Proposition 10.9].  We compose the functors F and G and we obtain a functor A : mod(k[G]) → Ref(R), A(V) := (S ⊗k V)G called Auslander functor. The Auslander functor has a right adjoint given by A′ (N) := (S ⊗R N)∗∗ ⊗S k, for every reflexive R-module N. These functors give a one-one correspondence between k-representations of G and maximal Cohen-Macaulay modules over R called Auslander correspondence. We collect the properties of the functor A and of the Auslander correspondence in the following theorem and corollary. Theorem 2.4 (Auslander correspondence). The functors A : mod(k[G]) → Ref(R) and A′ : Ref(R) → mod(k[G]) have the following properties. 1) 2) 3) 4) 5) 6) A(V)  A(W) if and only if V  W. A(V) is indecomposable in Ref(R) if and only V is an irreducible representation. A(Homk (V, W))  HomR (A(V), A(W)) for every V, W ∈ mod(k[G]). A(V ⊗k W)  (A(V) ⊗R A(W))∗∗ for every V, W ∈ mod(k[G]). If V0 is the trivial representation then A(V0 ) = R. rankR A(V) = dimk V for every k[G]-module V. THE SYMMETRIC SIGNATURE 9 Corollary 2.5. Let V1 , . . . , Vr be a complete set of non-isomorphic irreducible k-representations of G, and fix Ni = A(Vi ) = (S ⊗k Vi )G . Then N1 , . . . , Nr is a complete set of non-isomorphic indecomposable MCM R-modules. Moreover let V be a k-representation which decomposes as V = V1n1 ⊕ · · · ⊕ Vrnr , for some natural numbers ni . Then the MCM R-module N := A(V) = (S ⊗k V)G decomposes as N = N1n1 ⊕ · · · ⊕ Nrnr . Example 2.6. Let Cn =< g > be the cyclic group of order n, with irreducible representations (Vt , ρt ) over an algebraically closed field k given by ρt (g) = ξt , for a fixed primitive n-th root of unity ξ ∈ k. Assume that char k does not divide |G|. We can embed G into GL(2, k) via the representation V1 ⊕ Va , where a is a natural number such that (a, n) = 1, otherwise the representation is not faithful. In other words, we consider the cyclic group generated by ! ξ 0 . 0 ξa This group acts linearly on S = k~u, v and the invariant subring R is generated by monomials ui v j such that i + aj  0 mod n. For each irreducible representation Vt, we have an indecomposable MCM R-module Mt = (S⊗k Vt )G . A straightforward computation shows that this is given by   Mt = R ui v j : i + aj  −t mod n . 2.2. Auslander functor and reflexive symmetric powers. We want to prove that the Auslander functor commutes with q-th reflexive symmetric powers Symq (−)∗∗, that is q q A(Symk (V))  (SymR (A(V)))∗∗ for every k[G]-module V. Since the Auslander functor is the composition of the functors F and G we will split the proof of this fact in two propositions. Remark 2.7. Observe that in the categories mod(k[G]) and Proj(S ∗ G) the reflexive symmetric powers coincide with the usual symmetric powers. In fact, every finitely generated k[G]-module V is reflexive, so it is canonically isomorphic to its double dual V ∗∗ . Since S is regular, for every finitely generated q projective S ∗ G-module N the symmetric powers SymS (N) are S-free, hence reflexive. Proposition 2.8. For every k[G]-module V we have an isomorphism of S ∗ G-modules q q SymS (S ⊗k V)  S ⊗k Symk (V). q q Proof. From [Nor84, (6.5.1)] we have an isomorphism of S-modules ψ : SymS (S ⊗k V) → S ⊗k Symk (V) given by ψ((a1 ⊗ v1 ) ◦ · · · ◦ (aq ⊗ vq )) = (a1 · · · aq ) ⊗ (v1 ◦ · · · ◦ vq ). The only thing that we have to check is that ψ is compatible with the action of G, and this is shown by the following commutative diagram ψ (a1 ⊗ v1 ) ◦ · · · ◦ (aq ⊗ vq ) g  (a1 · · · aq ) ⊗ (v1 ◦ · · · ◦ vq ) g  g(a1 ) ⊗ g(v1 ) ◦ · · · ◦ g(aq ) ⊗ g(vq )  ψ g(a1 . . . aq ) ⊗ g(v1 ◦ · · · ◦ vq ) =     g(a1 ) · · · g(aq ) ⊗ g(v1 ) ◦ · · · ◦ g(vq ) .  We will use often the following well-known lemma. We write it here for ease of reference. Lemma 2.9. Let (R, m, k) be a normal two-dimensional local domain, and let U = Spec R\{m} be the punctured spectrum of R. For a torsion-free finitely generated R-module M we have an isomorphism e M∗∗  Γ(U, M). 10 HOLGER BRENNER AND ALESSIO CAMINATA Remark 2.10. Let S = k~u, v and R = SG be as in the rest of the section. Consider the following commutative diagram U′ −−−−−→ Spec S       π π y y U −−−−−→ Spec R where the map π is induced by the inclusion R ֒→ S, U is the punctured spectrum of R, and U′ = π−1 (U) is the pull-back of U to Spec S, which is actually the punctured spectrum of S. For every R-module M this gives us the following identification of sheaves on U′ e U)  ∼ π∗ (M| S ⊗R M (2) U′ . Proposition 2.11. Let N be a projective S ∗ G-module, then we have an isomorphism of R-modules  ∗∗ q q (SymS (N))G  SymR (NG ) . Proof. Let G′ (−) = (S ⊗R −)∗∗ be the right adjoint of the G-invariants functor G(−) = (−)G . Since G and G′ are an equivalence of categories (Theorem 2.3), it is enough to show that    ∗∗  q q G′ (SymS (N))G  G′ SymR (NG ) , that is   ∗∗ ∗∗  G ∗∗  q q ,  S ⊗R SymR (NG ) S ⊗R SymS (N) (3) as S ∗ G-modules. Notice that the two double duals on the right hand side of (3) are different: the first one is the double dual in mod(R) and the second is the double dual in mod(S). In order to prove (3), we consider the left hand side  and the right hand  side separately. From the G ∗∗ q q  SymS (N). second part of Lemma 2.2, the left hand side of (3) is S ⊗R SymS (N) For the S-module on the right hand side of (3) we use Lemma 2.9, and we interpret it as the evaluation of the sheaf  ∗∗ q S ⊗R SymR (NG ) ∼ U′ ′ on the punctured spectrum U of S. From the commutative diagram of Remark 2.10 we get the isomorphism ! !  ∗∗ q q q = π∗ SymR (NG ) , S ⊗R SymR (NG )  π∗ SymR (NG )∗∗ ∼ ∼ ∼ U U U′ where we can remove the double dual over U, thanks to Lemma 2.9. Since taking symmetric powers commute with sheafification and with the restriction map of sheaves we get !       q q f q f ∗ G G) G| π SymR (N )  π∗ SymX (N  π∗ SymX N U , ∼ U U where the second and the third symmetric powers are sheaf symmetric powers taken over X = Spec R. We set Y = Spec S. Since sheaf symmetric powers commute with pullback we have       q q f fG |U . G|  SymY π∗ N π∗ SymX N U We apply again (2) and Lemma 2.9 to obtain q SymY ∼    fG |U  Symq S ⊗R NG π∗ N Y U′ ! = q SymY ∼ G ∗∗ (S ⊗R N ) U′ ! . THE SYMMETRIC SIGNATURE 11 Since taking symmetric powers commutes with sheafification and with the restriction map of sheaves we get !  ∗∗  q q q G ∗∗  SymS S ⊗R NG SymY (S ⊗R N )  SymS (N) , ∼ ∼ U′ ∼ U′ U′ where the last isomorphism follows from Lemma 2.2. Taking global sections on U′ we obtain that q the right hand side of (3) is also isomorphic to SymS (N). Therefore we have an isomorphism of S-modules as in (3). This is actually an isomorphism of S ∗ G-modules. In fact, the natural map of  G  G q q q q R-modules SymR (NG ) → SymS (N) induces a natural map S ⊗R SymR (NG ) → S ⊗R SymS (N) , which is G-compatible since the action is just on S.  From Proposition 2.8 and Proposition 2.11 we immediately obtain the following. Theorem 2.12. Let V be a k[G]-module, and let M = (S ⊗k V)G be the corresponding MCM R-module via Auslander functor. Then we have  G q q SymR (M)∗∗  S ⊗k Symk (V) . q q In other words SymR (A(V))∗∗  A(Symk (V)). 3. Symmetric signature of Kleinian singularities In this section we will compute the generalized symmetric signature (and differential symmetric signature) of two-dimensional Kleinian singularities. These are invariant rings R := k~u, vG , where k is an algebraically closed field, and G is one of the following finite small subgroups of SL(2, k): the cyclic group Cn of order n, the binary dihedral group BDn of order 4n, the binary tetrahedral group BT of order 24, the binary octahedral group BO of order 48, and the binary icosahedral group BI of order 120. We always assume that the characteristic of k does not divide the order of the group G. It is an old result of Klein that if k has characteristic zero, then every finite subgroup of SL(2, k) is isomorphic to one of these groups. For this reason these groups are also called Klein groups. The Kleinian singularities are hypersurface rings, that is they are isomorphic to a quotient ring k~x, y, z/( f ) for some polynomial f , according to the following table. G singularity name An−1 Dn+2 E6 E7 E8 cyclic binary dihedral binary tetrahedral binary octahedral binary icosahedral |G| n 4n 24 48 120 f n y − xz x2 + yn+1 + yz2 x 2 + y 3 + z4 x2 + y3 + yz3 x 2 + y 3 + z5 3.1. The fundamental module of Kleinian singularities. Let (R, m, k) be a complete two-dimensional normal non-regular domain with canonical module KR . In this setting Auslander [Aus86b] proved that in the category Ref(R) there exists a unique non-split short exact sequence of the form 0 → KR → E → m → 0, which is called the fundamental sequence of R. The module E appearing in the middle term is also unique up to isomorphism and is called the fundamental module or Auslander module of R (cf. [Yos90, Chapter 11]). It isa reflexive (hence MCM) V2 ∗∗ module of rank 2. Moreover we have an isomorphism of R-modules E  KR . The following example (cf. [Yos90, Example 11.8]) clarifies the name fundamental module. Example 3.1. Let V be a k-vector space of dimension 2 with basis u, v and let G ⊆ GL(2, k) be a finite subgroup. Then, G acts on the power series ring S = k~u, v and we consider the invariant ring R = SG , which is a two-dimensional quotient singularity. The fundamental module of R is the image via Auslander functor of the fundamental representation V of G, that is E = (S ⊗k V)G . 12 HOLGER BRENNER AND ALESSIO CAMINATA Theorem 3.2 (Yoshino-Kawamoto, [YK88]). Let R = k~x, y, z/( f ) be a complete two-dimensional normal non-regular domain with canonical module, with f ∈ k~x, y, z. Then the fundamental module E is isomorphic to the third syzygy of k, i.e. E  Syz3R (k). Moreover, the following facts are equivalent. (1) The fundamental module E is decomposable. (2) R is a cyclic quotient singularity. Observe that the Kleinian singularities satisfy the condition of the previous Theorem 3.2. Now we prove that also the second syzygy of the residue field is isomorphic to the fundamental module. Theorem 3.3. Let (R, m, k) be a two-dimensional Kleinian singularity. Then the second syzygy of the residue field k is isomorphic to the fundamental module, that is Syz2R (k)  E. From Example 3.1, it is clear that Theorem 3.3 is equivalent to the following statement. Theorem 3.4. Let (R, mR , k) be a two-dimensional Kleinian singularity, and let V1 be the two-dimensional fundamental representation of the acting group G of R. Then, the second syzygy of the residue field k is isomorphic to the image of V1 via Auslander functor, that is Syz2R (k)  A(V1 ) Theorem 3.4 can be proved by case considerations. We illustrate the general strategy and we apply it to the singularity An−1 in Example 3.5. The reader interested to the computations for Dn+2 , E6 , E7 and E8 may consult [Cam16]. Proof. Let S = k~u, v be the powers series ring over an algebraically closed field k, and let G be one of the Klein subgroups of SL(2, k) acting on S through a faithful representation V1 . Assume that char k and |G| are coprime. Then we have R = SG , and we denote by mR the maximal ideal of R. Let p1 , p2 , p3 be a minimal system of generators of mR as ideal in S. We consider the following short exact sequence of S-modules, which is the beginning of an S-free resolution of S/mR S (4) p1 ,p2 ,p3 0 → Syz1S (p1 , p2 , p3 ) → S3 −−−−−→ S → S/mR S → 0. The group G acts linearly on S through the fundamental representation V1 , and this action extends naturally to S3 , and its submodule Syz1S (p1 , p2 , p3 ). In other words, the sequence (4) is an exact sequence of S ∗ G-modules. We apply the functor G(N) = NG , which is exact, to the sequence (4) and we obtain an exact sequence 0 → M → R3 → R → R/mR → 0. Since p1 , p2 , p3 are a system of generators for the maximal ideal mR of R, the last non-zero module on the right is the residue field. It follows that the module M appearing on the left of the last sequence is just the second syzygy of k, that is M = Syz2R (k). In other words we have that Syz1S (p1 , p2 , p3 )G = Syz2R (k). So, to understand which R-module Syz2R (k) is, we need to understand which is the action of G on Syz1S (p1 , p2 , p3 ), that is its S ∗ G-module structure. We know that as S-module Syz1S (p1 , p2 , p3 )  S2 and it is therefore generated by two elements s1 (u, v), s2 (u, v) ∈ S3 . We need to keep track of the action of G through this isomorphism. The action of G on Syz1S (p1 , p2 , p3 ) is inherited by the action on S, which is linear and given by matrices M = M g in SL(2, k). In order to understand how these matrices act on the generators s1 (u, v) and s2 (u, v) we procede as follows. For each matrix M we apply the linear transformation (u, v) 7→ M(u, v)T to s1 (u, v) and THE SYMMETRIC SIGNATURE 13 s2 (u, v). We obtain two elements s′1 (u, v) and s′2 (u, v) in S3 which belong to Syz1S (p1 , p2 , p3 ). Therefore we can write them as linear combination of s1 and s2 ! ! s′1 s1 =N s2 s′2 for some matrix N. In this way we obtain a collection of matrices N = N g for g ∈ G, which gives us the representation corresponding to Syz1S (p1 , p2 , p3 ). Then one has to check that this is actually isomorphic to the fundamental representation V1 .  Example 3.5. Let ξ be a primitive n-th root of unity in k, and consider the cyclic group Cn generated by ! ξ 0 A= . 0 ξ−1 The maximal ideal mR of the invariant ring R = k~u, vCn is generated by polynomials p1 = un , p2 = vn , p3 = uv. Their syzygy module Syz1S (p1 , p2 , p3 ) is generated by      0   −v   −u   0  s1 =   and s2 =  .  n−1   n−1  v u We apply the linear transformation given by A: u 7→ ξu, v 7→ ξ−1 v, to s1 and s2     0    0      −ξu s1 7→ s′1 =   = ξ  −u  = ξs1 ;  −1 n−1 n−1   n−1  (ξ ) v v     −1  −v   −ξ v    = ξ−1  0  = ξ−1 s2 . 0 s2 7→ s′2 =     n−1 n−1  un−1 ξ u Thus, the representation corresponding to Syz1S (p1 , p2 , p3 ) is exactly the fundamental representation. The referee suggested to us an alternative proof of Theorem 3.4 which works for the singularities Dn+2 , E6 , E7 and E8 . We sketch it in the following remark. Remark 3.6. We use the same notation as in the proof of Theorem 3.4. First, we observe that by Auslander correspondence the isomorphism Syz2R (k)  A(V1 ) is equivalent to say that the top of Ext2S (S/mR S, S) is V1∗ . By the equivariant local duality (cf. [HO10, (5.5)]), this is equivalent to say that the socle of S/mR S is V1 . Now let x, y, z ∈ S be a minimal system of generators of mR as in the table at page 11, and consider the quotient Λ = S/(y, z). Since y and z are invariants, Λ inherits a natural G-action. By the relation f in the table, Λ is Artinian and hence it is a complete intersection. Moreover, the degree relation deg x = deg y + deg z − 1 holds and implies that x · u = x · v = 0, because deg(x · u) = deg(x · u) = deg y + deg z. So x must sit in the socle of Λ, which is one-dimensional and is therefore equal to Λdeg x , the degree deg x component of Λ. Since x is invariant, the socle of Λ is the trivial representation. The natural multiplication Λi × Λdeg x−i → Λdeg x  k forces Homk (Λ, k)  Λ as S ∗ G-modules, and moreover we have isomorphisms in each degree, i.e. Λi  Homk (Λ, k)deg x−i . We quotient by x, and we have that the socle of Λ/xΛ  S/mR S, which is two-dimensional, must agree with Λdeg x−1 , which is also two-dimensional. So we obtain Λdeg x−1  Homk (Λ, k)1  Homk (V1 , k)  V1 , since the fundamental representation of the Klein groups is self-dual, and we are done. For Kleinian singularities, also the module of Zariski differentials Ω∗∗ is isomorphic to the fundaR/k mental module. Theorem 3.7 (Martsinkovsky, [Mar90]). Let (R, m, k) be a two-dimensional quotient singularity over an algebraically closed field k, and assume that the characteristic of k does not divide the order of the acting group. Then the module of Zariski differentials Ω∗∗ of R over k is isomorphic to the fundamental module E. R/k 14 HOLGER BRENNER AND ALESSIO CAMINATA 3.2. The decomposition of Symq (V). Let G be a finite group of order n and let k be an algebraically closed field such that char k does not divide n. Let µn (k) be the group of n-th roots of unity in k and let µn (C) be the group of complex n-th roots of unity. Both µn (k) and µn (C) are cyclic groups of order n, so we can fix an isomorphism φ : µn (k) → µn (C), which we name a lift. In the same way, we say that a complex root of unity z ∈ µn (C) is a lift of a ∈ µn (k) if z = φ(a). Let (V, ρ) be a k-representation of G of dimension r ≥ 1 and let g be an element of G. Then the matrix ρ(g) is diagonalizable in k and its eigenvalues are elements of µn (k), since the order of g divides n. Let λ1 , . . . , λr be these eigenvalues, counted with multiplicity. The Brauer character or simply the character of (V, ρ) is the function χ : G → C given by χV (g) = φ(λ1 ) + · · · + φ(λr ). This definition depend on the choice of the isomorphism φ. Since there are in general many choices for φ, we have a certain degree of arbitrariness. However once chosen φ, it will never be changed and sometimes we will simply say that we lift the eigenvalues to C, meaning that the isomorphism φ is fixed. For a proof of the following classical results of character theory the reader may consult the books of Feit [Fei82, Chapter IV], and of Fulton and Harris [FH91, Chapter 2]. Proposition 3.8. Let V and W be k-representations of G with characters χV and χW . Then the following facts hold: (1) (2) (3) (4) (5) χV (e) = dimk V, where e is the identity of G; χV (g−1 ) = χV (g), the complex conjugate of χV (g), for every g ∈ G; χV (hgh−1) = χV (g) for every g, h ∈ G; χV⊕W (g) = χV (g) + χW (g) for every g ∈ G; χV⊗W (g) = χV (g) · χW (g) for every g ∈ G. We define an Hermitian inner product on the set of characters of G by 1 X hϕ, ψi := ϕ(g)ψ(g), |G| g∈G for every ϕ, ψ characters, where ϕ(g) denotes the complex conjugation. This bilinear form satisfies 1 X hχ, ψi = χ(g)ψ(g) = hψ, χi, |G| g∈G for every characters χ, ψ. The characters of the irreducible representations of G are orthonormal with respect to this inner product. Theorem 3.9. Let G be a finite group and let k be an algebraically closed field such that char k does not divide |G|. Then the following facts hold. (1) A representation V over k is irreducible if and only if hχV , χV i = 1. (2) If χ and ψ are the characters of two non-isomorphic irreducible k-representations then hχ, ψi = 0. Corollary 3.10. Let k and G be as in Theorem 3.9. Let V be a k-representation of G and let V = V1n1 ⊕ · · · ⊕ Vrnr be its decomposition into irreducible representations Vi . If χV is the character of V and χVi is the character of Vi then ni = hχV , χVi i. In particular, two representations are isomorphic if and only if they have the same character. Thanks to Corollary 3.10, characters are an important tool to understand the decomposition of a representation into irreducible representations. We will use them to obtain the decomposition of the q q-th symmetric powers Symk (V) of a two-dimensional faithful representation V of a Klein group. We begin with an elementary statement. THE SYMMETRIC SIGNATURE 15 Lemma 3.11. Let λ , 1 be a root of unity in C, and let f : N → C be the function f (N) := q N X X λ2t−q . q=0 t=0 2 Then f (N) = o(N ), that is | f (N)| = 0. N→+∞ N 2 lim Proof. We have P   P PN Pq N+1 q PN+1 −q 2t−N−1 2t−q − N+1 q=0 λ q=0 λ t=0 λ | f (N)| 2 q=0 t=0 λ ≤ = 0≤ N2 N2 N2 2 4/|1 − λ| + N + 2 ≤ , N2 which goes to 0 for N → +∞.  Example 3.12. Let (V, ρ) be a two-dimensional representation of a finite group G over an algebraically closed field k. Since k is algebraically closed, for every element g ∈ G the matrix ρ(g) can be diagonalized ! λ 0 ρ(g) = , 0 µ with λ, µ ∈ k. The representation Symq (V) evaluated at the element g is given by the matrix  q  0 ··· ··· 0  λ  0 λq−1 µ 0 ··· 0    . ..  . ..  .. . .     q−1 ··· · · · λµ 0     0 ··· ··· 0 µq In other words, if λ and µ are the eigenvalues of V at the element g, then the eigenvalues of Symq (V) at g are {λt µq−t : t = 0, . . . , q}. Lemma 3.13. Let k be an algebraically closed field and let G be finite group such that char k and |G| are coprime. Let (V, ρ) be a two-dimensional representation of G whose image is contained in SL(2, k), then the (Brauer) character of the representation Symq (V) is given by χSymq (V) (g) = q X 2t−q λg , t=0 where λ g is the lift to C of an eigenvalue of the matrix ρ(g). Proof. Let g ∈ G and let λ g and µ g be the lift to C of the eigenvalues of ρ(g). Since ρ(g) ∈ SL(2, k), we q have µ g = λ−1 g . Then the lift of the eigenvalues of g in the representation Sym (V) are q−t 2t−q {λtg · µ g : t = 0, . . . , q} = {λ g : t = 0, . . . , q}, q so the formula for the character of Sym (V) follows immediately.  q Remark 3.14. The character of the symmetric representation Sym (V) can be computed also using Molien’s formula (cf. [Stu08, Theorem 2.2.1]) (5) +∞ X q=0 χSymq (V) (g)tq = 1 . det(I − tρ(g)) Here t is an indeterminate, and the determinant on the right hand side is of a matrix with entries conveniently lifted to the polynomial ring C[t]. Expanding the rational function on the right, we obtain a formal power series which is equal to the formal power series on the left, and we can use this equality to compute the character χSymq (V) . Notice that Molien’s formula holds also if dimk V > 2. 16 HOLGER BRENNER AND ALESSIO CAMINATA Theorem 3.15. Let k be an algebraically closed field and let G be a Klein subgroup of SL(2, k), such that char k does not divide |G|. Let (V, ρ) be a two-dimensional faithful k-representation of G with image contained in SL(2, k) and let (Vi , ρi ) be an irreducible k-representation of G. We denote by αi,q (V) the multiplicity of Vi in Symq (V) and by βq (V) = dimk Symq (V). Then PN dimk Vi q=0 αi,q (V) = . lim PN N→+∞ |G| q=0 βq (V) Proof. Since dimk V = 2, the dimension of Symq (V) is q + 1. So the denominator in the limit above is PN 1 q=0 βq (V) = 2 (N + 1)(N + 2). From Corollary 3.10 and Lemma 3.13 we have X |G|αi,q (V) = hχSymq (V) , χVi i = χSymq (V) (g) · χVi (g) g∈G = X g∈G  q  X 2t−q   χVi (g)  λ g  , t=0 where λ g is the lift to C of an eigenvalue of ρ(g). The order m g of the root of unity λ g coincides with the order of ρ(g) in SL(2, k). Since V is faithful, this coincides also with the order of the group element g in G. In particular, λ g = 1 if and only if g is the identity I of G. Thus, we can write the previous sum as  q   q  q   X X  X X 2t−q  X 2t−q  χVi (I)  χVi (g)  χVi (g)  1 + λ g  = dimk (Vi )(q + 1) + λ g  . t=0 t=0 g∈G g,I g∈G g,I t=0 We sum for q running from 0 to a fixed natural number N and we obtain |G| N X αi,q (V) = q=0 1 dimk (Vi )(N + 1)(N + 2) + o(N2 ), 2 thanks to Lemma 3.11. Therefore, the numerator of the limit is N X αi,q (V) = q=0 so the limit is equal to dimk Vi |G| (N + 1)(N + 2) dimk Vi + o(N2 ) 2|G| as desired.  Remark 3.16. The multiplicity αi,q (V) can be computed also using Molien’s formula (5), as showed by Springer in [Spr87]. One obtains +∞ X q=0 αi,q (V)tq = 1 X χVi (g−1 ) . |G| det(I − tρ(g)) g∈G 3.3. Symmetric signature of Kleinian singularities. Theorem 3.17. Let k be an algebraically closed field and let G be a Klein subgroup of SL(2, k) such that char k does not divide |G|. Let R be the corresponding Kleinian singularity and let Mi be an indecomposable MCM R-module. Then the generalized symmetric signature and the generalized differential symmetric signature of R with respect to Mi are rankR Mi sσ (R, Mi ) = sdσ (R, Mi ) = . |G| Proof. Let E be the fundamental module of R. By Theorem 3.3, and by Theorem 3.7 we have E  Syz2R (k)  Ω∗∗ R/k . Therefore the two symmetric signatures, differential and syzygy, coincide for Kleinian singularities. THE SYMMETRIC SIGNATURE 17 Let Vi be the irreducible k-representation of G such that Mi = A(Vi ), and let V be the fundamental representation of G, that is the k-representation such that A(V) = E. Let αi,q (E) be the multiplicity of q q Mi into SymR (E)∗∗ and let βq (E) = rankR SymR (E)∗∗. From Theorem 2.12 we have   q A′ SymR (E)∗∗ = Symq (V). It follows that βq (E) = dimk Symq (V) and αi,q (E) equals the multiplicity of the representation Vi in Symq (V). Since V is the fundamental representation of a Klein group, it is faithful and its image is contained in SL(2, k), so we can apply Theorem 3.15 to conclude the proof.  Corollary 3.18. Let k be an algebraically closed field and let G be a Klein subgroup of SL(2, k) such that char k does not divide |G|. The symmetric signature and the differential symmetric signature of the corresponding Kleinian singularity R are 1 . sσ (R) = sdσ (R) = |G| Example 3.19. Consider the An−1 -singularity R = k~u, vCn over an algebraically closed field k, and ∗∗ q let Sq = SymR (Syz2R (k)) as in the definition of symmetric signature. From the proofs of Theorem 3.15 and Theorem 3.17, we have that rankR Sq = q + 1, and  2(q+1)   q+1  n + O(1) for q even q q (1 + (−1) ) + O(1) =  frkR S =  O(1) n for q odd. This shows that the limit frkR Sq q→+∞ rankR Sq does not exist. Specifically, in this setting the syzygy module splits as Syz2R (k)  M1 ⊕ Mn−1 (with notation as in Example 2.6). Therefore we have lim Sq  q M t=0 ⊗q−t M⊗t 1 ⊗ Mn−1  q M ⊗2t−q M1 . t=0 4. Symmetric signature of cones over elliptic curves In this section we prove that the differential symmetric signature of the coordinate ring R of a plane elliptic curve over an algebraically closed field of characteristic different from 2 and 3 is zero. Our intention is motivated by the following remark, which shows that the F-signature of such rings (over a field of positive characteristic) is zero. Remark 4.1. We consider R = k[x, y, z]/( f ), with k an algebraically closed field of positive characteristic, and f a homogeneous non-singular polynomial of degree 3. In other words, R is the coordinate ring of a plane elliptic curve over k. The ring R is not strongly F-regular, and in particular its Fsignature s(R) is 0 by the result of Aberbach and Leuschke (Theorem 1.5). To see this, assume for simplicity that f is in Weierstrass normal form, that is f = y2 z − x3 − axz2 − bz3 for some a, b ∈ k. This is always possible if the characteristic of k is different from 2 and 3. Then the ideal I = (x, z) is not tightly closed in R, since y2 < I, but y2 ∈ I∗ . Therefore R is not strongly F-regular and s(R) = 0. The methods we use in this situation are different from those of previous sections, and are of geometric nature. We will use the correspondence between graded MCM R-modules and vector bundles over the smooth projective curve Y = Proj R to translate the problem into geometric language. We will not make a general assumption on the characteristic of the base field k in this section, but we will restrict to characteristic , 2, 3 only when needed. The letter q is used to denote a positive integer. 4.1. Generalities on vector bundles. We recall some preliminary facts concerning vector bundles over curves, and in particular over elliptic curves. For further details and the proofs of these facts, we refer to the books of Hartshorne [Har77], Le Potier [LeP97], and Mukai [Muk03, Chapter 10]. Let Y be a smooth projective curve over an algebraically closed field k. We denote by VB(Y) the category whose objects are vector bundles over Y, and whose maps are morphisms between them. The category VB(Y) is a Krull-Schmidt category (cf. [Ati56, Theorem 3]). Moreover there is an 18 HOLGER BRENNER AND ALESSIO CAMINATA equivalence of categories between the category of vector bundles over Y and the category of locally free sheaves on Y which respects the rank (cf. [Har77, Ex. II 5.18]). Having this identification in mind, we will use indifferently the words vector bundle and locally-free sheaf. For example, we will use the notation for the structure sheaf OY of Y also to denote the trivial bundle of rank one corresponding to it. Let S be a locally free sheaf of rank r over X. The V degree of S is defined as the degree of the corresponding determinant line bundle degS = deg r S. The slope of S is µ(S) = deg S/r. The degree is additive on short exact sequences and moreover µ(S ⊗ T ) = µ(S) + µ(T ). The sheaf S is called semistable if for every locally free subsheaf T ⊆ S the inequality µ(T ) ≤ µ(S) holds. If the strict inequality µ(T ) < µ(S) holds for every proper subsheaf T ⊂ S, then S is called stable. Stable vector bundles are indecomposable, but the converse does not hold in general. The usual operations on vector spaces like direct sum, tensor product, symmetric and wedge powers extend naturally to vector bundles and correspond to the same constructions in the category of locally free sheaves. The dual of a vector bundle E is the bundle E∨ := Hom(E, OY ). Remark 4.2. Since every vector bundle E is canonically isomorphic to its double dual E∨∨ , reflexive symmetric powers Symq (−)∨∨ coincide with ordinary symmetric powers Symq (−) in the category VB(Y). The following are standard properties of symmetric powers of vector bundles (see also [Laz04, Corollary 6.4.14]). Proposition 4.3. Let Y be a smooth projective curve, let E be a vector bundle and L a line bundle over Y. Then the following facts hold. 1) Symq (E ⊗ L)  Symq (E) ⊗ L⊗q . 2) µ(Symq (E)) = q · µ(E). 3) If the field k has characteristic 0 and E is semistable, then Symq (E) is also semistable. Let R be a normal standard-graded domain of dimension 2 over an algebraically closed field k, that is R0 = k and R is generated by finitely many elements of degree 1. The normal assumption on R implies that Rp is a regular ring for every prime ideal p , R+ . It follows that the projective variety e the Y = Proj R is a smooth projective curve over k. For every graded module M we denote by M g are invertible (cf. [Har77, Proposition II.5.12]) corresponding coherent sheaf on Y. The sheaves R(n) and denoted by OY (n). Moreover, every MCM graded R-module M is locally free on the punctured e is in fact a vector bundle over Y. If we denote by spectrum, so the associated coherent sheaf M MCMZ (R) the category of finitely generated graded MCM R-modules, then we have a functor e: MCMZ (R) → VB(Y), whose properties we collect in the following proposition. Proposition 4.4. Let R be a normal standard graded domain of dimension 2 over a field k, let Y = Proj R, and let M and N be finitely generated graded MCM R-modules. Then the following facts hold. e ⊕ N; e 1) M] ⊕N M ∼∗∗ e e 2) (M ⊗R N)  M ⊗OY N; ∼ q q e 3) SymR (M)∗∗  SymY (M). Now we give an appropriate definition of free rank for the category of vector bundles over Y. Definition 4.5. Let E be a vector bundle over Y with a fixed very ample invertible sheaf OY (1). We define the free rank of E as n M n frkOY (1) (E) := max n : ∃ a split surjection ϕ : E ։ F, with F = OY (−di ) o a splitting vector bundle of rank n . i=1 THE SYMMETRIC SIGNATURE 19 Since the category VB(Y) has the KRS property, to compute the free rank of a bundle E, one should count how many copies of twisted structure sheaves OY (−di ) appear in the decomposition of E into indecomposable bundles. For this reason, the free rank of vector bundles frkOY (1) agrees with the gr graded free rank frkR and not with the free rank, as explained in the following corollary. Corollary 4.6. Let R be a normal standard graded domain of dimension 2 over a field k, let Y = Proj R, and let M be a finitely generated graded MCM R-module. Then the following facts hold. e (1) rankR M = rankOY M. gr e (2) frkR M = frkOY (1) M. Remark 4.7. Let I be an R+ -primary homogeneous ideal with homogeneous generators f1 , . . . , fn of degrees di . The following presentation of R/I n M f1 ,..., fn R(−di ) −−−−→ R → R/I → 0 i=1 induces a short exact sequence of sheaves on Y 0→S→ n M OY (−di ) → OY → 0, i=1 Ln where R/I corresponds to 0 because I is R+ -primary. Since OY and i=1 OY (−di ) are locally free, the sheaf S is also locally free. The sheaf S is the kernel of the sheaf morphism f1 , . . . , fn and is denoted by Syz( f1 , . . . , fn ) and called syzygy bundle. In fact, it is nothing but the vector bundle corresponding to the MCM graded R-module Syz2R (R/I) = Syz1R ( f1 , . . . , fn ). Syzygies of the irrelevant maximal ideal R+ play a special role, they correspond to the restriction of the cotangent bundle ΩPn of Pn to the curve. In fact, it follows from the Euler sequence on Pn [Har77, Theorem 8.13] n M 0 → ΩPn → OPn (−1) → OPn → 0, i=0 that ΩPn is a syzygy bundle. So if x0 , . . . , xn is a system of generators for OPn (1), we have the isomorphism Syz(x0 , . . . , xn )  ΩPn . If we restrict these bundles to the curve Y, we obtain isomorphic bundles. In fact, we have just proved the following proposition. Proposition 4.8. Let Y be a smooth projective curve with an embedding in Pn given by ϕ : Y → Pn . Let x0 , . . . , xn be a system of generators of OPn (1) and denote by ΩPn the cotangent bundle of Pn and by ΩPn |Y its restriction to Y. Then, we have the following isomorphism of vector bundles on Y Syz(x0 , . . . , xn )|Y  ΩPn |Y . It is a classical result, usually ascribed to Grothendieck, that the only indecomposable vector bundles over a curve of genus zero are of the form OY (a) for some integer a. Therefore the structure of the category VB(Y) is quite easy for such a curve. The next interesting case concerns a curve of genus 1, an elliptic curve. This case was treated by Atiyah [Ati57], who was able to give a description of all indecomposable vector bundles of fixed rank and degree. Moreover he gave explicit formulas for the multiplicative structure of the monoid VB(Y) with the tensor product operation if the base field has characteristic zero. In the following theorem we collect some results of Atiyah that we will need later on. Theorem 4.9 (Atiyah, [Ati57]). Let Y be an elliptic curve over an algebraically closed field k with structure sheaf OY . For every positive integer r there exists a unique (up to isomorphism) indecomposable vector bundle Fr of rank r and degree 0 with Γ(Y, Fr ) , 0. Moreover, the following facts hold. (1) Fr has only one section up to scalar multiplication, i.e. Γ(Y, Fr )  k. (2) Fr  F∨r . 20 HOLGER BRENNER AND ALESSIO CAMINATA (3) There is a non-split exact sequence 0 → OY → Fr → Fr−1 → 0. (4) Symq (F2 )  Fq+1 . (5) If E is an indecomposable vector bundle of rank r and degree 0 then E  L ⊗ Fr , where L is a line bundle of degree zero, unique up to isomorphism and such that L  det E. We call the bundle Fr Atiyah bundle of rank r. Clearly we have that F1 = OY , the structure sheaf is the unique line bundle of degree 0 with non-zero sections. The bundle F2 is given by the unique non-trivial extension 0 → OY → F2 → OY → 0. In other words, F2 is the non-zero element of Ext1 (OY , OY ). The following two results are well known to experts. However, since we are unable to locate a proof in the literature, for the sake of completeness we add a proof here. Lemma 4.10. Let Y be an elliptic curve over an algebraically closed field k with structure sheaf OY . Then for every positive integers r and q the vector bundle Symq (Fr ) is semistable. Proof. Indecomposable bundles over an elliptic curve are semistable (cf. [Tu93, Lemma 29]), so if char k = 0 the result follows from Proposition 4.3. Now assume that char k = p > 0. The Atiyah bundle Fr is defined inductively by a non-split short exact sequence 0 → OY → Fr → Fr−1 → 0, hence by a non-zero cohomology class c ∈ H1 (Y, F∨r−1 )  H1 (Y, Fr−1 ). By [Bre05, Lemma 2.4] the pe -multiplication [pe ] : Y → Y on the elliptic curve kills this cohomology class for a suitable choice of e, that is [pe ]∗ (c) = 0. Therefore the pullback via [pe ] of the previous sequence splits, and inductively this shows that [pe ]∗ (Fr ) is free. Hence its symmetric powers are also free and in particular semistable. Then the semistability of [pe ]∗ (Symq (Fr ))  Symq ([pe ]∗ (Fr )) implies that Symq (Fr ) is semistable.  Lemma 4.11. Let Y be an elliptic curve over an algebraically closed field k, and let E be a semistable vector bundle, then Symq (E) is semistable. Proof. If char k = 0, then the result follows from Proposition 4.3. So we assume that char k = p > 0, and we denote by r the rank of E. By a result of Oda [Oda71] (see also [Tu93]) the bundle E is strongly semistable, so by [Miy87, Proposition 5.1] it follows that [n]∗ E is semistable for every integer n, where [n] : Y → Y is the standard multiplication on the elliptic curve. We consider the semistable bundle [r]∗ E. Its degree is a multiple of r, so by tensoring with an appropriate line bundle L, we obtain a semistable vector bundle E′ = [r]∗ E ⊗ L of degree 0. It follows that the indecomposable direct summands of E′ must have degree 0 too, so they are of the form Fs ⊗ L, with L line bundle. With the help of a further multiplication map as in the proof of Lemma 4.10 we may achieve that [n]∗ (E) is a direct sum of line bundles of degree 0. Hence its symmetric powers are semistable and this descends to the symmetric powers of E.  4.2. Symmetric signature of cones over elliptic curves. Let f be a homogeneous non-singular polynomial f of degree 3 in k[x, y, z], and let R = k[x, y, z]/( f ). Then R is a normal standard graded k-domain of dimension 2 and the projective curve Y = Proj R is a plane elliptic curve over k. To compute the symmetric signature of R one should consider reflexive symmetric powers of the second syzygy of the residue field, Syz2R (k). Thanks to Remark 4.7 and Proposition 4.4 this is equivalent to consider the syzygy bundle Syz(x, y, z) over Y and taking ordinary symmetric powers in the e and frkgr M = frkO (1) M e category VB(Y). We recall that by Corollary 4.6 we have rankR M = rankOY M Y R for every MCM graded R-module. Therefore, we have that sσ (R) exists if and only if the limit PN q q=0 frkOY (1) Sym (Syz(x, y, z)) lim PN q N→+∞ q=0 rankOY Sym (Syz(x, y, z)) exists, and in this case they coincide. THE SYMMETRIC SIGNATURE 21 The same reasoning applies to the differential symmetric signature. In this case, we should consider the sheaf associated to the module of Zariski differentials Ω∗∗ on Y and then take ordinary symmetric R/k powers in the category VB(Y). In other words, we consider the vector bundles   q g SymY Ω R/k . q Notice that we can forget about the double dual inside SymY (−), thanks to Proposition 4.4. The differential symmetric signature of the coordinate ring R exists if and only if the limit   PN q g q=0 frkOY (1) SymY ΩR/k   (6) lim P q g N N→+∞ rankO Sym Ω R/k q=0 Y Y exists, and in this case they coincide. Proposition 4.12. Let Y be a plane elliptic curve over a field k of characteristic , 2, 3 with coordinate ring k[x, y, z]/( f ), where f is a homogeneous polynomial of degree 3. Then we have ! ∂f ∂f ∂f Syz , , (3)  F2 . ∂x ∂y ∂z ∂f ∂f ∂f  Proof. It is enough to show that Syz ∂x , ∂y , ∂z (3) corresponds to a non-zero element of Ext1 (OY , OY ) with global sections, then the uniqueness of F2 will imply the desired isomorphism. We consider the following injective map of sheaves, ϕ : OY → OY (1)⊕3 , given by ϕ(1) = (x, y, z). From the Euler formula ∂f ∂f ∂f x+ y+ z = 3 f, ∂x ∂y ∂z ∂f ∂f ∂f  which vanishes on Y, we obtain that the image of ϕ is contained in the syzygy bundle Syz ∂x , ∂y , ∂z (3). Actually, since this image does not vanish anywhere, it defines a subbundle and hence also a quotient bundle, which is by rank and degree reasons the structure sheaf. In other words, we have the following short exact sequence of vector bundles ! ∂f ∂f ∂f ϕ (7) 0 → OY − → Syz , , (3) → OY → 0, ∂x ∂y ∂z It remains to prove that the sequence (7) is non-split, equivalently (x, y, z) is the unique non-zero global section. This can be done easily by explicit computations, for example assuming that f is in Weierstrass normal form.  g Corollary 4.13. Let char k , 2, 3, and let Ω R/k be the sheaf version of the cotangent module ΩR/k of the cone R of Y, then we have an isomorphism of vector bundles g Ω R/k (−1)  F2 . Proof. We recall that the cotangent module ΩR/k is the graded R-module ! ∂f ∂f ∂f ΩR/k =< dx, dy, dz > / dx + dy + dz . ∂x ∂y ∂z In other words, ΩR/k can be defined by the following short exact sequence of graded R-modules ψ (8) where ψ(1) = ∂f ϕ 0 → R(−2) − → R⊕3 − → ΩR/k → 0, ∂f ∂x , ∂y , ∂f ∂z  , and ϕ sends the canonical basis to dx, dy, dz. Sequence (8) induces a short exact sequence of locally free sheaves on Y g 0 → OY (−2) → O⊕3 Y → ΩR/k → 0. We dualize this sequence and we get ∨ ⊕3 g 0→Ω R/k → OY → OY (2) → 0, 22 HOLGER BRENNER AND ALESSIO CAMINATA where the last map is given by ψ. We obtain that g Ω R/k ! ∂f ∂f ∂f , , (2).  Syz ∂x ∂y ∂z ∨ ∨ g So by the previous Proposition 4.12 we have Ω R/k (1)  F2 on Y, but the Atiyah bundle F2 is self-dual, ∨ g so we have Ω (−1)  F  F .  2 R/k 2 We can compute the differential symmetric signature of the cone R. Theorem 4.14. Let Y be a plane elliptic curve over an algebraically closed field k of characteristic , 2, 3 with coordinate ring R. Then the differential symmetric signature of R is sdσ (R) = 0. Proof. By the previous observations we should compute the limit (6). From Corollary 4.13, we have g Ω R/k  F2 ⊗ OY (1). Therefore from part 4) of Theorem 4.9 and from Proposition 4.3 we obtain   q q g SymY Ω R/k  SymY (F2 ) ⊗ OY (q)  Fq+1 ⊗ OY (q)   q g for all q ≥ 1. So the module SymY Ω R/k is indecomposable, and in particular it has free rank 0 and the claim follows.  Proposition 4.15. The vector bundle Syz(x, y, z) is stable of rank 2 and degree −9. Moreover det Syz(x, y, z) = OY (−3). Proof. The syzygy bundle fits into a short exact sequence 0 → Syz(x, y, z) → (9) 3 M x,y,z OY (−1) −−−→ OY → 0. i=1 So from the additivity of rank and degree, we immediately get that Syz(x, y, z) has rank 2 and degree   3 M   deg Syz(x, y, z) = deg OY (−1) − deg OY  deg Y = −3 deg Y = −9. i=1 For the indecomposable property, we have that Syz(x, y, z) equals the restriction of the cotangent bundle ΩP2 of P2 to Y by Proposition 4.8. This bundle is stable, and in particular indecomposable, by the result of Brenner and Hein [BH06, Theorem 1.3]. Finally, taking determinants of sequence (9) yields det Syz(x, y, z) = OY (−3).  Remark 4.16. Since Syz(x, y, z) has rank 2, we have that rankOY Symq (Syz(x, y, z)) = q + 1. The difficult part is to determine the free rank of Symq (Syz(x, y, z)). Corollary 4.17. Let q be odd, then the bundle Symq (Syz(x, y, z)) contains no direct summand of rank one. In particular, frkOY (1) Symq (Syz(x, y, z)) = 0. Proof. From Proposition 4.3, Proposition 4.15 and Lemma 4.11 we know that Symq (Syz(x, y, z)) is semistable of slope − 29 q. Let L be a direct summand of rank one. Since Symq (Syz(x, y, z)) is semistable, we have µ(L) = − 29 q, but µ(L) = deg L must be an integer. Since q is odd we get a contradiction.  Corollary 4.18. If the symmetric signature of R exists, then sσ (R) ≤ 21 . Proof. For every q ∈ N, let aq = frkOY (1) Symq (Syz(x, y, z)), and let bq = rankOY Symq (Syz(x, y, z)). From the previous Corollary 4.17 and Remark 4.16, we have aq = 0 for q odd, and bq = q + 1 for all q. For every even q we have the following inequalities aq + aq+1 = aq ≤ bq = It follows that PN q=0 aq PN q=0 bq 1 2 PN 1 1 (bq + bq ) ≤ (bq + bq+1 ). 2 2 q=0 bq ≤ PN q=0 bq + φ(N) = 1 + φ(N), 2 THE SYMMETRIC SIGNATURE where φ(N) = proved. b PN N q=0 bq 23 if N is even, and 0 otherwise. In both cases φ(N) → 0 if N → +∞, so the claim is  Question 4.19. Is it true that also sσ (R) = 0? Acknowledgements We would like to thank Winfried Bruns, Ragnar-Olaf Buchweitz, Helena Fischbacher-Weitz, Lukas Katthän, and Yusuke Nakajima for their interest and many valuable comments. We thank the referee for showing us how to simplify the proof of Theorem 3.15 and pointing out Remark 3.6. References [AL03] Ian Aberbach and Graham Leuschke, The F-signature and strong F-regularity, Math. Res. Lett., vol. 10, no. 1, pp. 51–56, 2003. [Ati56] Michael Atiyah, On the Krull-Schmidt theorem with application to sheaves, Bull. Soc. Math. France, vol. 84, pp. 307–317, 1956. [Ati57] Michael Atiyah, Vector bundles over an elliptic curve, Proc. London Math. Soc. (3), vol. 7, pp. 414–452, 1957. [Aus86b] Maurice Auslander, Rational singularities and almost split sequences, Trans. Amer. Math. Soc., vol. 293, no. 2, pp. 511–531, 1986. [AG60] Maurice Auslander and Oscar Goldman, The Brauer group of a commutative ring, Trans. Amer. Math. Soc., vol. 97, pp. 367–409, 1997. [BDO08] Fedor Bogomolov and Bruno De Oliveira, Symmetric tensors and geometry of PN subvarieties, Geom. Funct. Anal. vol. 18, no. 3, 637–656, 2008. [Bre05] Holger Brenner, Tight closure and plus closure for cones over elliptic curves, Nagoya Math. J., vol. 177, pp. 31–45, 2005. [BF09] Holger Brenner and Helena Fischbacher-Weitz, Symmetric powers of vector bundles and Hilbert-Kunz theory, unpublished paper, 2009. [BH06] Holger Brenner and Georg Hein, Restriction of the cotangent bundle to elliptic curves and Hilbert-Kunz functions, Manuscripta Math., vol. 119, no. 1, pp. 17–36, 2006. [BD08] Igor Burban and Yuriy Drozd, Maximal Cohen-Macaulay modules over surface singularities, Trends in representation theory of algebras and related topics, pp. 101–166, EMS Ser. Congr. Rep., Eur. Math. Soc., Zürich, 2008. [Cam16] Alessio Caminata, The symmetric signature, Ph.D. Thesis, Universität Osnabrück, 2016. [CK16] Alessio Caminata and Lukas Katthän, The symmetric signature of cyclic quotient singularities, preprint arXiv:1603.06427. [CHR65] Stephen Chase, David Kent Harrison, and Alex Rosenberg, Galois theory and Galois cohomology of commutative rings, Mem. Amer. Math. Soc., no. 52, pp. 15–33, 1965. [Fei82] Walter Feit, The representation theory of finite groups, North-Holland Mathematical Library, vol. 25, 1982. [FH91] William Fulton and Joe Harris, Representation theory. A first course, Graduate Texts in Mathematics, vol. 129, Springer, 1991. [Har77] Robin Hartshorne, Algebraic geometry, Graduate Texts in Mathematics, vol. 52, Springer, 1977. [HN15] Mitsuyasu Hashimoto and Yusuke Nakajima, Generalized F-signature of invariant subrings, J. Algebra, vol. 443, pp. 142–152, 2015. [HO10] Mitsuyasu Hashimoto and Masahiro Ohtani, Equivariant Matlis and the local duality, J. Algebra, vol. 324, pp. 1447– 1470, 2010. [Her78a] Jürgen Herzog, Ein Cohen-Macaulay-Kriterium mit Anwendungen auf Konormalenmodul und den Differentialmodul, Math. Z., vol. 163, no. 2, pp. 149–162, 1978. [Her78b] Jürgen Herzog, Ringe mit nur endlich vielen Isomorphieklassen von maximalen, unzerlegbaren Cohen-Macaulay-Moduln, Math. Ann., vol. 233, pp. 21–34, 1978. [HL02] Craig Huneke and Graham Leuschke, Two theorems about maximal Cohen-Macaulay modules, Math. Ann., vol. 324, no. 2, pp. 391–404, 2002. [Kun69] Ernst Kunz, Characterizations of regular local rings for characteristic p, Amer. J. Math., vol. 91, pp. 772–784, 1969. [Laz04] Robert Lazarsfeld, Positivity in Algebraic Geometry II, Positivity for Vector Bundles, and Multiplier Ideals, Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge / A Series of Modern Surveys in Mathematics, vol. 49, Springer, 2004. [LeP97] Joseph Le Potier, Lectures on vector bundles, Cambridge Studies in Advanced Mathematics, vol. 54, Cambridge University Press, 1997. [LW12] Graham Leuschke and Roger Wiegand, Cohen-Macaulay representations, Mathematical Surveys and Monographs, vol. 181, American Mathematical Society, 2012. [Mar90] Alex Martsinkovsky, Almost split sequences and Zariski differentials, Trans. Amer. Math. Soc., vol. 319, pp. 285–307, 1990. [Miy87] Yoichi Miyaoka, The Chern class and Kodaira dimension of a minimal variety, Algebraic Geometry, Sendai 1985, Adv. Stud. Pure Math., vol. 10, pp. 449–476, 1987. [Muk03] Shigeru Mukai, An introduction to invariants and moduli, Cambridge Studies in Advanced Mathematics, vol. 81, Cambridge University Press, 2003. [Nor84] Douglas G. Northcott, Multilinear Algebra, Cambridge University Press, 1984. [Oda71] Tadao Oda, Vector bundles on a elliptic curve, Nagoya Math. J., vol. 43, pp. 41–72, 1971. 24 HOLGER BRENNER AND ALESSIO CAMINATA [Sak78] Fumio Sakai, Symmetric powers and the cotangent bundle and classification of algebraic varieties, Lecture Notes in Math., vol. 732, pp. 545–563, 1978. [Sei97] Gerhard Seibert, The Hilbert-Kunz function of rings of finite Cohen-Macaulay type, Arch. Math. (Basel), vol. 69, no. 4, pp. 286–296, 1997. [SVB96] Karen Smith and Michel Van Den Bergh, Simplicity of rings of differential operators in prime characteristic, Proc. London Math. Soc. (3), vol. 75, no. 1, pp. 32–62, 1997. [Spr87] Tonny Albert Springer, Poincaré Series of Binary Polyhedral Groups and McKay’s Correspondence, Math. Ann., vol. 278, pp. 99–116, 1987. [Stu08] Bernd Sturmfels, Algorithms in invariant theory. Second edition, Texts and Monographs in Symbolic Computation, Springer, Vienna, 2008. [Tu93] Loring W. Tu, Semistable bundles over an elliptic curve, Adv. Math., vol. 98, no. 1, pp. 1–26, 1993. [Tuc12] Kevin Tucker, F-signature exists, Invent. Math., vol. 190, no. 3, pp. 743–765, 2012. [Wat74a] Kei-ichi Watanabe, Certain invariant subrings are Gorenstein. I, Osaka J. Math., vol. 11, pp. 1–8, 1974. [Wat74b] Kei-ichi Watanabe, Certain invariant subrings are Gorenstein. II, Osaka J. Math., vol. 11, pp. 379–388, 1974. [WY00] Kei-ichi Watanabe and Ken-ichi Yoshida, Hilbert-Kunz multiplicity and an inequality between multiplicity and colength, J. Algebra, vol. 230, no. 1, pp. 295–317, 2000. [WY04] Kei-ichi Watanabe and Ken-ichi Yoshida, Minimal relative Hilbert-Kunz multiplicity, Illinois J. Math., vol. 48, pp. 273–294, 2004. [Yao05] Yongwei Yao, Modules with finite F-representation type, J. London Math. Soc. (2), vol. 72, pp. 53–72, 2005. [Yao06] Yongwei Yao, Observations on the F-signature of local rings of characteristic p, J. Algebra, vol. 299, no. 1, pp. 198–218, 2006. [Yos90] Yuji Yoshino, Cohen-Macaulay modules over Cohen-Macaulay rings, London Mathematical Society Lecture Note Series, vol. 146, Cambridge University Press, Cambridge, 1990. [YK88] Yuji Yoshino and Takuji Kawamoto, The fundamental module of a normal local domain of dimension 2, Trans. Amer. Math. Soc., vol. 309, no. 1, pp. 425–431, 1988. Holger Brenner, Institut für Mathematik, Universität Osnabrück, Albrechtstrasse 28a, 49076 Osnabrück, Germany E-mail address: [email protected] Alessio Caminata, Institut für Mathematik, Universität Osnabrück, Albrechtstrasse 28a, 49076 Osnabrück, Germany Current address: Institut de Mathématiques, Université de Neuchâtel, Rue Emile-Argand 11, CH-2000 Neuchâtel, Switzerland E-mail address: [email protected]
0math.AC
arXiv:1709.06286v1 [math.GR] 19 Sep 2017 A note on the normal subgroup lattice of ultraproducts of finite quasisimple groups Jakob Schneider and Andreas Thom Abstract. In [3] it was stated that the lattice of normal subgroups of an ultraproduct of finite simple groups is always linearly ordered. This is false in this form in most cases for classical groups of Lie type. We correct the statement and point out a version of ‘relative’ bounded generation results for classical quasisimple groups and its implications on the structure of the lattice of normal subgroups of an ultraproduct of quasisimple groups. Contents 1. 2. 3. Introduction Auxiliary geometric results Relative bounded generation in universal finite quasisimple groups 4. The lattice of normal subgroups of an algebraic ultraproduct of classical finite quasisimple groups Acknowledgments References 1 3 5 8 14 14 1. Introduction The purpose of this note is to correct statements from the work of Stolz and the second author in [3] and generalize to a setting of quasisimple groups. As stated, [3, Theorem 3.9] is not correct and our main result (Theorem 1) should replace it. Note that already in [1], it was pointed out that some of the techniques and results of [3] were flawed. Some corrections on results about bounded generation in the setting of unitary groups on finite-dimensional Hilbert spaces can be found in [1]. The statement of [3, Theorem 4.20] should be considered as open problem at the moment. In this note we focus entirely on the case of finite groups. 1 2 JAKOB SCHNEIDER AND ANDREAS THOM Let G be a group, g ∈ G and L ⊂ G. We write gG := {hgh−1 | h ∈ G} for the conjugacy class of g and call N normal if g ∈ L implies g G ⊂ L. We denote by L∗k the set of k-fold products of elements in L, i.e. L∗k = {l1 · · · lk | l1 , . . . , lk ∈ L}. Using the results of [2] it is a simple matter to prove the following result about bounded ‘relative’ generation for the alternating groups An with n ≥ 5: Lemma 1. There exists c > 0 such that for any S, T ⊆ An normal subsets with |S|, |T | ≥ 1, T 6= {1} for any integer k ≥ c max{log|S|/ log|T |, 1} it holds that S ⊆ (T An )∗k . A straightforward consequence of this fact is that for any σ, τ ∈ An either σ ∈ (τ An )∗k or τ ∈ (σ An )∗k for an integer k ≥ c which easily implies that the normal subgroups of an algebraic ultraproduct of alternating groups are linearly ordered. However, in the case of finite classical simple groups of Lie type, all of the above is false in general. The prototype of a counterexample is given by the following families of elements. ∼ PSLq (q) be the elements given Example 1. Let h1 , h2 ∈ H := SLq (q) = by h1 = diag(1, λ, . . . , λ) and h2 = diag(1, µ, . . . , µ) where λ, µ ∈ F∗q are arbitrary such that λ 6∈ hµi and µ 6∈ hλi, e.g. take λ = ζ a and µ = ζ b where hζi = F∗q and a, b > 1 are coprime with q − 1 = ab. Then it is −1 H ∗k easy to show by induction that each h ∈ (hH has at least 1 ∪ (h1 ) ) q − k non-trivial eigenvalues in hλi. From the assumptions it follows that −1 H ∗k h2 6∈ (hH for any such k ≤ q − 1. Similarly, it follows that 1 ∪ (h1 ) ) −1 H ∗k H h1 6∈ (h2 ∪ (h2 ) ) for k ≤ q − 1. This example already implies that the normal subgroups of an algebraic ultraproduct of finite simple groups of type SLq (q) are not linearly ordered. In this note, we shall prove the ‘best possible’ result on bounded relative generation in classical quasisimple groups of Lie type. Recall, a quasisimple group is a perfect central extension of a simple group. Every finite non-abelian simple group has a universal quasisimple extension which is called the Schur covering group. We will also describe the lattice of normal subgroups of an algebraic ultraproduct of the universal finite quasisimple groups. In the study of ultraproducts of finite quasisimple groups, we may ignore exceptional finite non-abelian simple groups, abelian groups, and families of bounded rank. Indeed, in those cases the ultraproduct yields a finite group or a quasisimple group defined over a pseudofinite field. Those groups and their lattice of normal subgroups are much easier to analyse. Assuming the classification of non-abelian finite simple groups, it follows that the remaining cases consist only of ultraproducts of the covering groups of alternating groups with increasing rank and of ultraproducts of quasisimple groups of ON THE NORMAL SUBGROUP LATTICE 3 Lie type with increasing rank. We will show (see Remark 10) that the lattice of normal subgroups in the case of universal covers of alternating groups is still a linear order. It remains to study ultraproducts of universal quasisimple finite groups of Lie type. Each of the groups of Lie type appearing as factors in the ultraproduct is endowed with its natural rank function ℓrk and projective rank function ℓpr , as discussed later in the paper. We will prove the following theorem. Theorem 1. Let (Hi )i∈I be a sequence of universal quasisimple finite Q groups of Lie type of increasing rank. Set G := i Hi and define subgroups N rk := {(gi ) ∈ G | limU ℓrk (gi ) = 0} and N pr := {(gi ) ∈ G | limU ℓpr (gi ) = 0} of G. We also define N0 := {(gi ) ∈ G | gi = 1Hi along U } and suitable subgroups N1 , A1 ≤ G, defined in Section 4. Then, (i) The subgroup N pr contains all proper normal subgroups of G containing N0 . Especially, G/N pr is non-abelian simple and N pr /N0 is a characteristic subgroup of G/N0 . (ii) The normal subgroups of G lying between N0 and N rk are linearly ordered. Moreover, each such normal subgroup is perfect. (iii) Define mappings between the following two sets {N E G | N1 ≤ N ≤ N pr } Ψ Φ {M | M E G, N1 ≤ M ≤ N rk } × {A | A E G, N1 ≤ A ≤ A1 } by Φ : N 7→ (N ∩ N rk , N ∩ A1 ) and Ψ : (M, A) 7→ M A. Then Φ and Ψ are isomorphisms of posets and mutually inverse to each other. Throughout, we use the notation and basic facts from [4]. 2. Auxiliary geometric results In this section we provide the necessary geometric results for the rest of the article. In the following let H be a quasisimple group from the following list: (i) linear: SLn (q), n ≥ 2, (n, q) 6= (2, 2), (2, 3); (ii) symplectic: Sp2m (q), m ≥ 2, (m, q) 6= (2, 2); (iii) unitary: SUn (q), n ≥ 3, (n, q) 6= (3, 2); (iv) orthogonal: Ω2m+1 (q), m ≥ 3, q odd; Ω± 2m (q), m ≥ 4. Here we omit the groups Ω2m+1 (q) with q even as they are isomorphic to the groups Sp2m (q). We have also omitted to mention the spin groups, i.e. the double covers of Ω± 2n (q) and Ω2n+1 (q), as they can be treated directly in a way similar to the double cover of the alternating groups, see Remark 10. Let V be the natural representation of H (there are two such representations when H = Ω2n+1 (q) for q odd, corresponding to the two equivalence classes of non-degenerate symmetric bilinear forms in this dimension) and 4 JAKOB SCHNEIDER AND ANDREAS THOM n := dim V . For (ii)–(iv), denote by f the corresponding non-degenerate alternating, conjugate-symmetric sesquilinear, or symmetric bilinear form. In (iv) for q even, denote by Q the corresponding quadratic form inducing the non-degenerate alternating form f . A subspace U of V is called non-singular if f |U is non-degenerate. In this case U ⊕ U ⊥ = V . The following fact will be used in the Section 4. Lemma 2. If U ≤ V is a non-singular subspace with 2 ≤ dim U < n/2, then there exists a decomposition W1 ⊕ W2 = U ⊥ and an element h ∈ H such that h is the identity on W2 and interchanges U and W1 . Proof. Explicit computations with standard bases show that U ⊥ always contains a subspace W1 isometric to U via an isometry θ : U → W1 with respect to f or Q in the orthogonal case in characteristic two (here we need dim U ⊥ > dim U ). Set W2 := (U ⊕ W1 )⊥ . Then h1 : V = U ⊕ W1 ⊕ W2 → U ⊕ W1 ⊕ W2 = V given by (u, w1 , w2 ) 7→ (θ −1 (w1 ), θ(u), w2 ) is an isometric involution of V . Hence, in the symplectic case (ii) we may take h := h1 . In the unitary case (iii), if det(h1 ) = ε ∈ {±1}, letting h2 be the linear map which scales a non-isotropic vector of U by ε and fixes its perpendicular complement, then h := h1 h2 works. In the orthogonal case (iv) for q odd, define h2 as in the unitary case. If the spinor norm of h1 h2 is ε ∈ {±1}, find an element s ∈ SO(U ) of spinor norm ε and set h3 := s ⊕ idU ⊥ (for the existence of s we use that dim U ≥ 2). Then h := h1 h2 h3 works. In the orthogonal case for q even (forcing dim V to be even), if the quasideterminant of h1 is ε ∈ {±1}, find an element s ∈ GO(U ) of quasideterminant ε and set h4 := s ⊕ idU ⊥ (again using dim U ≥ 2). Then h := h1 h4 is an appropriate choice. The proof is complete.  The following simple result about the existence of certain non-singular subspaces will also be used in later sections. Lemma 3. Let U ≤ V , dim U = l. Then there exists W ≤ U nonsingular such that dim W ≥ 2l − n. Proof. Chose W ≤ U maximal non-singular. If there were two vectors u, v ∈ W ⊥ ∩ U with f (u, v) 6= 0, then W ⊕ hu, vi > W would still be nonsingular. Hence f is zero on this subspace. Moreover, for dimension reasons U = W ⊕ (W ⊥ ∩ U ). Together this implies U ⊥ ∩ U = W ⊥ ∩ U . Hence dim(W ⊥ ∩ U ) = dim U − dim W ≤ dim U ⊥ = n − l, so dim W ≥ 2l − n as desired.  ON THE NORMAL SUBGROUP LATTICE 5 We introduce the group of quasiscalars S(H) of H by S(SLn (q)) := F∗ ∼ = Cq−1 ; q S(SUn (q)) := {x ∈ F∗q2 | xq+1 = 1} ∼ = Cq+1 ; S(Sp2m ) := {±1}; S(Ω2m+1 (q)) := {±1} (q odd); S(Ω± 2m (q)) := {±1}. Of course −1 = 1 if char(Fq ) = 2. Our last auxiliary result will be used in Section 4: Lemma 4. For any λ ∈ S(H) there is a diagonalizable element in h ∈ H with respect to V and a suitable basis such that all but two of its diagonal entries are equal to λ. Proof. Clearly, we may assume that λ 6= 1, since otherwise we can always take h = id. If H = SLn (q), take h = diag(λ, . . . , λ, λ−(n−1) ) with respect to any basis of V . If H = Sp2m (q), q odd, and λ = −1, take − idV . If H = SUn (q), take h = diag(λ, . . . , λ, λ−(n−1) ) with respect to an orthonormal basis e1 , . . . , en for f , i.e. f (ei , ej ) = δij for i, j = 1, . . . , n. For Ω2m+1 (q), q odd, and λ = −1, take diag(−1, . . . , −1, 1) with respect to a basis e1 , . . . , e2m+1 such that f (ei , ej ) = 0 if i 6= j and f (ei , ei ) = 1 for i = 1, . . . , 2m and f (e2m+1 , e2m+1 ) = 1 or a non-square α ∈ F∗q (there are two equivalence classes of such forms both giving a natural representation of Ω2n+1 (q)). Clearly h has determinant and spinor norm equal to one. For H = Ω± 2n (q), q odd, and λ = −1, we find a basis e1 , . . . , e2n such that either f (ei , ej ) = δij for all i, j = 1, . . . , 2n, or f (ei , ej ) = 0 for i 6= j, f (ei , ei ) = 1 for i = 1, . . . , 2n − 1 and f (e2n , e2n ) = α ∈ F∗q a non-square (there are two equivalence classes of non-degenerate symmetric bilinear forms corresponding to the two non-isomorphic groups Ω+ 2n (q) and − Ω2n (q)). In either case we can take h = diag(−1, . . . , −1, 1, 1) with respect to this basis, which has determinant and spinor norm one. In all remaining cases we have S(H) = 1, so the proof is complete.  3. Relative bounded generation in universal finite quasisimple groups In this section we keep the notation from Section 2. In addition, we define the following three length functions on our group H: The rank length function ℓrk (h) := rk(1 − h)/n, the projective rank length function ℓpr (h) := min{ℓrk (λ−1 h) | λ ∈ F∗q or F∗q2 } (q 2 when H is unitary), and the conjugacy length function ℓc (h) := log|hH |/ log|H|. In the following we will prove a version of ‘relative bounded generation’ for all universal quasisimple groups from families of unbounded rank (for the others there is no such notion). We start with the alternating case. Recall that the normalized Hamming length defined by ℓH (σ) := |supp(σ)|/n for 6 JAKOB SCHNEIDER AND ANDREAS THOM σ ∈ An is Lipschitz equivalent to ℓc by [3, Theorem 2.11]. We denote the en . universal central extension of An by A en , Lemma 5. There exists a constant c > 0 such that for any σ ∈ A e en ) for any integer k ≥ c max{ℓH (σ)/ℓH (τ ), 1} we have σ ∈ (τ An )∗k . τ 6∈ Z(A en under the canonical map. Here σ, τ ∈ An are the images of σ, τ ∈ A Proof. We prove the lemma for An (n ≥ 5) and derive the corresponding result for its Schur covering group. Let σ, τ ∈ An , τ 6= 1. After conjugating σ, we may assume that either supp(σ) ⊆ supp(τ ) or the opposite inclusion holds. In the first case, σ ∈ Alt(supp(τ )) = (τ An )∗c1 for some integral constant c1 > 0 and in the second case σ ∈ Alt(supp(σ)) = (τ An )∗k H H for any integer k ≥ c2 /ℓH Alt(supp(σ)) (τ ) = c2 ℓ (σ)/ℓ (τ ) with some constant c2 > 0; both times we use [2, Lemma 3.2]. So we may take c := max{c1 , c2 }. en by the following arThe statement now extends to the Schur cover A gument. Without loss of generality, we may assume n > 7 (we may neglect en is a twofold cover. It follows from the standard conthis finite data), so A struction of the two double covers of Sn that when a and b are lifts of the transposition (12) and (34), then (ab)2 = z is the unique non-trivial central en ) ⊆ (τ Aen )∗c3 for any nonelement in one of these. This shows that Z(A en and some absolute integer constant c3 > 0, which implies the central τ ∈ A e claim for An .  Now we turn to the universal quasisimple groups from families of unbounded rank. The proof of ‘relative bounded generation’ for these is actually very similar as for the Schur covering groups of the alternating groups. We need the following fact which can be deduced by adapting the proof of Lemma 4.1 of [2] to quasisimple groups and looking at Lemma 5.4, 6.4, and the end of Section 7 of the same article. Lemma 6. There is an absolute constant c > 0 (independent of H) such that for h 6∈ H \ Z(H), for any k ≥ c/ℓpr (h) it holds that H = (hH )∗k . Remark 1. It follows from Lemma 5.3, 6.3, and the end of Section 7 of [2] that ℓpr and ℓc are Lipschitz equivalent by a universal Lipschitz constant, so putting ℓc in place of ℓpr in the Lemma 6 would also yield a valid statement. Here is now the promised result for almost all other universal quasisimple groups from families of unbounded rank: Lemma 7. Let ε > 0 be arbitrary. There exists an absolute constant C > 0 and a constant D > 0 only depending on ε such that the following ∗k for holds: Let h1 ∈ H \ Z(H), h2 ∈ H, ℓrk (h1 ) ≤ 1 − ε. Then h2 ∈ (hH 1 ) rk rk all integers k ≥ max{Cℓ (h2 )/ℓ (h1 ), D}. Proof. First assume that ε ≤ ℓrk (h1 ) ≤ 1 − ε. Then by Proposition 2.13 of [3] it holds that ℓpr (h1 ) ≥ ε, so by Lemma 6 there is D ∈ N only ∗D = H. depending on ε such that (hH 1 ) ON THE NORMAL SUBGROUP LATTICE 7 So we may assume w.l.o.g. that ℓrk (h1 ) < ε ≤ 1/8. Assume additionally that ℓrk (h2 ) ≤ 1/8 as well (we will remove this assumption at the end). Set Ui := ker(1 − hi ) ≤ V and li := dim Ui (i = 1, 2). At first we treat the special linear case, i.e. H = SLn (q): Replace h1 , h2 ∈ H by conjugates in Jordan normal form (where one off-diagonal entry might be different from 0 or 1) as matrices with respect to a suitable basis e1 , . . . , en with all 1×1 Jordan blocks corresponding to eigenvalue one in the upper left corner. Assuming there are mi of these for hi , i.e. hi e1 = e1 , . . . , hi emi = emi , it is easy to see that mi ≥ 2li − n (i = 1, 2). Set m := min{m1 , m2 } and W ′ := hem+1 , . . . , en i. Choose n − m ≤ j ≤ m minimal such that for X := hem−j+1 , . . . , em i, the space Y := X ⊕ W ′ gives rise to a quasisimple group K := SL(Y ). This is possible since by assumption on l1 and l2 we have m ≥ 3n/4 > n/2 and SL(V ) is quasisimple. Since dim W ′ ≥ 1, there is an absolute constant d > 1 such that j ≤ d dim W ′ = d(n − m). Then set Y ′ := he1 , . . . , em−j i. The operators h1 , h2 write as hi = idY ′ ⊕ idX ⊕Ai = idY ′ ⊕Bi (i = 1, 2) with respect to te decompositions V = Y ′ ⊕ X ⊕ W ′ = Y ′ ⊕ Y . Assuming m1 ≤ m2 gives (1 + d)−1 /2 ≤ ℓrk (B1 ) ≤ 1/2, so by Proposition 2.13 of [3] we have ℓpr (B1 ) ≥ (1 + d)−1 /2 implying the existence ∗D (by of a constant D ∈ N with B2 ∈ (B1K )∗D which yields h2 ∈ (hH 1 ) Lemma 6). If m2 < m1 the same computation shows (1 + d)−1 /2 < ℓrk (B2 ) and ℓrk (B1 ) ≤ 1/2, so as previously ℓpr (B1 ) = ℓrk (B1 ). By Lemma 6 there is c > 0 such that for all integers k ≥ c/ℓpr (B1 ) we have K = (B1K )∗k . Then it holds that h2 ∈ (H1H )∗k and by 2(1 + d)cℓrk (h2 )/ℓrk (h1 ) = 2(1 + d)cℓrk (B2 )/ℓrk (B1 ) > c/ℓpr (B1 ) we are done in this case with C := 2(1 + d)c. In the other cases, i.e. H 6= SLn (q), the proof is almost identical: Define U := U1 ∩ U2 and l := dim U ≥ l1 + l2 − n. From Lemma 3 we get W ≤ U non-singular with dim W ≥ 2l − n. Then we infer dim W ⊥ ≤ 2(n − l) from dim W ≥ 2l − n. This implies dim W ⊥ ≤ 2(n − l) ≤ 2(2n − (l1 + l2 )) ≤ 4(n − min{l1 , l2 }) and 4 min{l1 , l2 } − 3n ≤ 2(l1 + l2 ) − 3n ≤ 2l − n ≤ dim W. As by assumption ℓrk (h1 ), ℓrk (h2 ) ≤ 1/8, implying that 7/8n ≤ l1 , l2 , we obtain dim W ⊥ ≤ dim W . Now take X ≤ W a non-singular subspace such that dim X ≥ dim W ⊥ is as small as possible such that Y := X ⊕ W ⊥ gives rise to a classical quasisimple group K from the beginning of Section 2. As dim W ⊥ ≥ 1, then dim X ≤ d dim W ⊥ for some absolute d > 1. With respect to the decompositions V = Y ⊥ ⊕ X ⊕ W ⊥ = Y ⊥ ⊕ Y , the operators h1 , h2 write as hi = idY ⊥ ⊕ idX ⊕Ai = idY ⊥ ⊕Bi with isometric automorphism Ai of W ⊥ and Bi of Y (i = 1, 2). Now assume l1 ≤ l2 . Then ℓrk (B1 ) = rk(1 − A1 ) , dim W ⊥ + dim X 8 JAKOB SCHNEIDER AND ANDREAS THOM which can be bounded from above by 1/2 and from below by the chain n − l1 n − l1 1 n − l1 ≥ ≥ = . 2(1 + d)(n − l) 2(1 + d)(2n − (l1 + l2 )) 4(1 + d)(n − l1 ) 4(1 + d) Hence by Proposition 2.13 of [3] we get that ℓpr (B1 ) ≥ (1 + d)−1 /4, so by Lemma 6 there is a constant D ∈ N such that B2 ∈ (B1K )∗D implying that ∗D h2 ∈ (hH 1 ) . On the other hand, if l2 < l1 , by the same computation as above, 0.25(1 + d)−1 < ℓrk (B2 ) and ℓrk (B1 ) ≤ 1/2, so by Proposition 2.13 of [3] ℓpr (B1 ) = ℓrk (B1 ). Applying Lemma 6 gives c > 0 such that for all ∗k for such integers k ≥ c/ℓpr (B1 ) we have K = (B1K )∗k . But then h2 ∈ (hH 1 ) k, and since 4(1 + d)cℓrk (h2 )/ℓrk (h1 ) = 4(1 + d)cℓrk (B2 )/ℓrk (B1 ) > c/ℓpr (B1 ) we are done in this case with C := 4(1 + d)c. We still need to eliminate the condition ℓrk (h2 ) ≤ 1/8. But this is again just another straightforward application of Lemma 6, since the elements h ∈ H with ℓrk (h) > 1/8 generate H ‘quickly’.  Remark 2. The condition ℓrk (h1 ) ≤ 1 − ε for a fixed ǫ > 0 cannot be removed by Example 1. In that sense, the previous result is best possible. Remark 3. The only universal quasisimple groups from families of unbounded rank which are not covered by Lemma 5 and 7 are the double covers of the orthogonal groups in odd characteristic. Defining ℓrk (h) := ℓrk (h) for h an element of the twofold cover of Ω± 2m (q) or Ω2m+1 (q) (q odd), the statement of Lemma 7 also holds for these. This e5 is embedded in both of them as the group of products of is true since A an even number of the reflections with respect to the vectors e1 − e2 , e2 − e3 , e3 − e4 , e4 − e5 ∈ V , where e1 , . . . , e5 is an orthonormal system for f . So we can argue as at the end of the proof of Lemma 5 to see that the two-element kernel of the covering map is generated ‘quickly’ by conjugates of any non-central element. 4. The lattice of normal subgroups of an algebraic ultraproduct of classical finite quasisimple groups Let (Hi )i∈I be a sequence of groups from the list at the beginning of Q Section 2 and set G := i∈I Hi . Let ni be the dimension of the ‘natural’ representation Vi of Hi . Note that the sequence (ni ) is Lipschitz equivalent to the sequence of Lie ranks of the Hi by a universal Lipschitz constant. For some ultrafilter U on I for which limU ni = ∞, define the normal subgroup N0 := {(gi ) ∈ G | gi = 1Hi along U } of G. In this section we give a complete description of the lattice of normal subgroups of the algebraic ultraproduct G/N0 of the groups Hi (i ∈ I) with respect to U . Define the subgroups N rk := {(gi ) ∈ G | lim ℓrk (gi ) = 0} and U N pr := {(gi ) ∈ G | lim ℓpr (gi ) = 0} U ON THE NORMAL SUBGROUP LATTICE 9 of G where ℓrk and ℓpr are the length functions defined at the beginning of Section 3. As they are invariant length functions, it is clear that N rk and N pr are normal in G and contain N0 . Moreover, as ℓpr ≤ ℓrk , we get that N rk ≤ N pr . The following result is an immediate consequence of Lemma 6: Lemma 8. The subgroup N pr contains all proper normal subgroups of G containing N0 . Especially, G/N pr is non-abelian simple and N pr /N0 is a characteristic subgroup of G/N0 . Proof. When g = (gi ) ∈ G\N pr , there exist ε > 0 and U ∈ U such that ℓpr (gi ) ≥ ε for i ∈ U . Hence from Lemma 6 it follows that there is k ∈ N such that (giHi )∗k = Hi for i ∈ U . This implies hhgiiN0 = G as wished.  Hence from now on, we may restrict to the normal subgroups above N0 which are contained in N pr . Let us first characterize N pr among the subgroups of G containing N rk . For this recall the definition of S(H) from the end of Section 2. Q Lemma 9. The map ϕ : N pr → Z := U S(Hi ) defined by (gi ) 7→ (λi ), where λi is arbitrary (from S(Hi )) if ℓpr (gi ) ≥ 1/4 and λi is the unique λ ∈ F∗qi for which ℓrk (λ−1 gi ) < 1/4 otherwise, is a surjective homomorphism with kernel N rk . Moreover, Z ∼ = N pr /N rk = Z(G/N rk ). Proof. At first we check that λi is always in S(Hi ): This is clear when ℓpr (gi ) ≥ 1/4. In the special linear case there is nothing to check, so consider the remaining cases. Set Ui to be the eigenspace corresponding to eigenvalue λi of gi and set dim Ui := li > 3/4ni . Then by Lemma 3 there is Wi ≤ Ui non-singular such that dim Wi ≥ 2li − ni > ni /2 ≥ 1. The restriction gi |Wi is a scalar from the group GI(Wi , fi |Wi ), so it must lie in S(Hi ). Let us now show that ϕ is a homomorphism. So let (gi ), (hi ) ∈ N pr and Q pick U ∈ U and sequences (λi ), (µi ) from i S(Hi ) such that rk −1 ℓrk (λ−1 i gi ), ℓ (µi hi ) < 1/8 for i ∈ U (this is possible by the definition of N pr ). Then it follows that ℓrk ((λi µi )−1 gi hi ) < 1/4 for i ∈ U by the triangle inequality, establishing that ϕ is a homomorphism. Also ϕ is surjective: Let λ = (λi ) ∈ Z. In any case, by Lemma 4 there is a diagonal matrix in Hi with all but at most two entries of the diagonal equal to λi . This is the desired preimage of λ. Moreover, the kernel of ϕ consists of sequences g = (gi ) such that when (λi ) is the image of g under ϕ, then λi = 1 for i ∈ U and some U ∈ U . But this means precisely that g ∈ N rk , since then 0 = limU ℓpr (gi ) = rk limU ℓrk (λ−1 i gi ) = limU ℓ (gi ). Lastly, we have to show that N pr /N rk is the center of G/N rk . Since by Lemma 8 the quotient G/N pr is non-abelian simple, it suffices to show that [G, N pr ] ⊆ N rk . So let g = (gi ) ∈ G and h = (hi ) ∈ N pr and let (λi ) be 10 JAKOB SCHNEIDER AND ANDREAS THOM rk sequence in F∗qi such that (λ−1 i hi ) ∈ N . Let Ui be the eigenspace of hi corresponding to eigenvalue λi and set Wi := Ui ∩ gi−1 Ui . Then for w ∈ Wi one computes that [gi , hi ]w = gi−1 h−1 i gi hi w = w. As dim Wi /ni tends to one along U , this verifies that [g, h] ∈ N rk . The proof is complete.  To describe the normal subgroups N of N pr containing N0 accurately, we need some definitions: Define L to be the set of null sequences (ri ) along U with ri ∈ [0, 1] (i ∈ I). Two such sequences (ri ) and (si ) are said to be equivalent (write (ri ) ∼ (si ) and (ri ) for the corresponding equivalence class) if limU ri /si ∈ (0, ∞). For two elements r and s of the quotient L/∼ write r ≤ s if an only if limU ri /si < ∞, where (ri ) and (si ) are representatives for r and s, respectively. It is routine to check that this is a definition and turns (L/∼, ≤) into a linear order. Now define the function ct : N pr → L/∼ by g = (gi ) 7→ (ℓpr (gi )) and call it the convergence type of g. Denote by L the subset of elements r of L/∼ for which either r ≥ (1/ni ) or r = (0). Lemma 10. The image of the function ct : N pr → L/∼ is equal to L. Proof. At first we prove that the image of ct lies in L: Namely when r = (ri ) ∈ N pr and r 6= (0), then ri 6= 0 for all i ∈ U for some U ∈ U . But then it follows that ri ≥ 1/ni for these i and hence r ≥ (1/ni ). The surjectivity is a bit more subtle. We prove it here only for the case that Hi = SLni (qi ); the other cases are analogous. Choose a nontrivial element g ∈ SL2 (q). Then if r = (ri ) satisfies ri ≥ 1/ni along U , set gi := g⊕⌊ni ri ⌋ ⊕ idni −2⌊ni ri ⌋ if ni ≥ 2 ⌊ni ri ⌋ and choose an arbitrary element otherwise. Letting g = (gi ), one sees immediately that ct(g) = r. Finally,  ct(1G ) = (0) completes the proof. Remark 4. The rank length function ℓrk does not attain any possible value on the classical quasisimple groups even for large ranks: E.g. 2nℓrk (g) for g ∈ GOε2n (q) is even if and only if g ∈ Ωε2n (see [4, p. 77] at the end of Section 3.8.1). Due to the previous lemma, henceforth we shall consider ct as a function with domain N pr and codomain L. We extend this function to subsets S ⊆ N pr by setting ct(S) := {ct(g) | g ∈ S}. For a normal subgroup N of G between N0 and N pr the set ct(N ) is then called the associated order ideal (see Lemma 12 below). Lemma 11. For such a subgroup it holds that ct(N ) = ct(N ∩ N rk ). Proof. It is clear that ct(N ) ⊇ ct(N ∩ N rk ). Let us prove the converse containment to finish the proof: Let g = (gi ) ∈ N ≤ N pr . Then there is U ∈ U and λi ∈ F∗qi (i ∈ I) such that ℓpr (gi ) = ℓrk (λ−1 i gi ) < 1/4 for i ∈ U and so when Ui is the eigenspace to λi for such an i, then li := dim Ui > 3/4ni . By Lemma 3 there is a non-singular subspace Wi ≤ Ui with dim Wi ≥ 2li − ni > ni /2. Moreover, for all large ni we may also ON THE NORMAL SUBGROUP LATTICE 11 assume that ni − dim Wi = dim Wi⊥ ≥ 2 (by modifying Wi a little). Now Lemma 2 implies the existence of hi ∈ Hi (i ∈ I) and Wi1 , Wi2 ≤ Wi (i ∈ U ) non-singular such that Wi⊥ ⊕ Wi1 ⊕ Wi2 is a perpendicular direct sum and hi restricts to the identity on Wi2 while it interchanges Wi⊥ and Wi1 . Then −1 −1 −1 −1 −1 hi −1 it holds that [gi , hi ](h−1 i w) = gi hi gi w = λi hi gi w = λi gi (hi w) and −1 ⊥ [gi , hi ]w = gi−1 h−1 i gi hi w = λi gi w for w ∈ Wi and i ∈ U . This implies that ℓrk ([gi , hi ]) = 2ℓpr (gi ) < 1/2. But then by Proposition 2.13 of [3] we have ℓpr ([gi , hi ]) = ℓrk ([gi , hi ]) and by the end of Lemma 9, setting h := (hi ), the commutator [g, h] is in N rk (and of course in N ). This element has the same convergence type as g.  Remark 5. In view of Lemma 10, this implies that even the restriction ct|N rk : N rk → L is surjective. Now we are ready to justify the name ‘associated order ideal’ for ct(N ) for N normal in G lying between N0 and N pr . Lemma 12. Let N be a normal subgroup between N0 and N pr . Then ct(N ) is an order ideal of L. Moreover, the mappings {N E G | N0 ≤ N ≤ N rk } α {order ideals of (L, ≤)} β defined by α : N 7→ ct(N ) and β : I 7→ {g ∈ N rk | ct(g) ∈ I} are isomorphisms of posets and mutually inverse to each other. Proof. By Lemma 11, we may restrict to the case N ≤ N rk . Clearly, ct(N ) is not empty as 1G ∈ N . If r ∈ ct(N ), Lemma 7 implies that if s ≤ r then s ∈ ct(N ). As (L, ≤) was a linear order, ct(N ) is an order ideal. Concerning the second part: Obviously, both maps are inclusion preserving. To show that β ◦ α : N 7→ ct(N ) 7→ {g ∈ N rk | ct(g) ∈ ct(N )} is the identity, i.e. that ct(g) ∈ ct(N ) iff g ∈ N , is just another straightforward application of Lemma 7. The map α ◦ β : I 7→ {g ∈ N rk | ct(g) ∈ I} 7→ {ct(g) ∈ L | ct(g) ∈ I} is the identity by Remark 5.  Remark 6. Similarly, one can prove that for g ∈ N rk and S ⊆ N rk it holds that ct(g) is in the order ideal of (L, ≤) generated by ct(S) if and only if g ∈ hhSiiN0 . Corollary 1. The normal subgroups of G lying between N0 and N rk are linearly ordered. Proof. This holds by the correspondence of Lemma 12 as (L, ≤) is linear and so its ideals are linearly ordered by inclusion.  Corollary 2. For N E N rk containing N0 it holds that N is perfect, i.e. N = N ′ . Proof. Pick g ∈ N and proceed as in the proof of Lemma 11. The construction of h shows that ct(h) ≤ ct(g), so Remark 6 implies h ∈ 12 JAKOB SCHNEIDER AND ANDREAS THOM hhgiiN0 ⊆ N . Hence the commutator [g, h] lies in N ′ and ct([g, h]) = ct(g), so ct(N ′ ) = ct(N ). To apply Lemma 12 to deduce that N = N ′ , we still need that N0 ≤ N ′ . It is therefore enough to show that N0 is perfect. This follows from the following simple application of Lemma 6: Let h ∈ H be an element with ℓpr (h) ≥ ε for some fixed ε > 0, where H is one of the Hi . Then the previously mentioned result implies that H ′ ⊇ (hH )∗k h−k = H for a fixed integer k only depending on ε. Hence, if g = (gi ) ∈ N0 , applying this in every component i for which gi 6= 1Hi yields that g ∈ N0′ as wished.  Remark 7. The argument at the end of the proof also shows that G itself is perfect. Remark 8. Especially, this implies that for N ≤ N pr it holds that N ∩ N rk = [G, N ] = N ′ by the end of Lemma 9 and Corollary 2. Hence N rk = (N pr )′ and so N rk /N0 is characteristic in G/N0 as well. Using the correspondence of Lemma 12, we introduce the normal subgroup N1 as the normal subgroup of N rk such that ct(N1 ) = I1 , where I1 := {(ri ) ∈ L | ni ri < C for some C > 0 along U }. It is obvious that I1 covers the trivial ideal I0 = {(0)} corresponding to N0 , i.e. there is no ideal properly between them. Hence N1 covers N0 . Let us mention here that for M, N normal subgroups of G between N0 and N rk it holds that M is covered by N if and only if the corresponding order ideals I and J of (L, ≤) are of the form I = {r ∈ L | r < s} and J = {r ∈ L | r ≤ s} for some s 6= (0). Because we will need them later, we introduce the normal subgroups A0 := {g ∈ N pr | ct(g) ∈ I0 } and A1 := {g ∈ N pr | ct(g) ∈ I1 }. Now we complete the picture of the lattice of normal subgroups of G/N0 by looking at an arbitrary N E N pr with N0 ≤ N . Let us at first assume that N1 ≤ N . Then the following lemma applies: Lemma 13. Define mappings between the following two sets {N E G | N1 ≤ N ≤ N pr } Ψ Φ {M | M E G, N1 ≤ M ≤ N rk } × {A | A E G, N1 ≤ A ≤ A1 } by Φ : N 7→ (N ∩ N rk , N ∩ A1 ) and Ψ : (M, A) 7→ M A. Then Φ and Ψ are isomorphisms of posets and mutually inverse to each other. Proof. Obviously, both maps are inclusion preserving. Moreover, Φ ◦ Ψ(M, A) = Φ(M A) = (M A ∩ N rk , M A ∩ A1 ) = (M (A ∩ N rk ), A(M ∩ A1 )) by Dedekind’s modular law. However, it is easy to see from the definitions that A ∩ N rk = M ∩ A1 = N1 , so Φ ◦ Ψ = id as N1 ≤ M, A. Similarly, we compute Ψ ◦ Φ(N ) = Ψ(N ∩ N rk , N ∩ A1 ) = (N ∩ N rk )(N ∩ A1 ) ⊆ N . So it is enough to show that every element g = (gi ) ∈ N can be written as a product of elements from N ∩N rk and N ∩A1 . Choose λi (i ∈ I) pr such that ℓrk (λ−1 i g) = ℓ (gi ). Let hi ∈ Hi be an element which has all but ON THE NORMAL SUBGROUP LATTICE 13 two diagonal entries equal to λi (which exists by Lemma 4). Then setting f := (gi h−1 i ) and h := (hi ), g = f h is the desired product decomposition.  Remark 9. Essentially, Lemma 13 (in combination with Lemma 12) says that the lattice of normal subgroups of G/N1 is isomorphic to the product of the linear order of ideals of (L, ≤) different from I0 and the subgroup lattice of the abelian group Z ∼ = A1 /(A1 ∩ N rk ) = = N pr /N rk = N rk A1 /N rk ∼ A1 /N1 from Lemma 9. If Φ : N 7→ (M, A), then N 7→ (ct(M ), ϕ(A)) is the described isomorphism of lattices, where ϕ is the map from Lemma 9. In this situation, M = N ′ is the abelianization (by Remark 8 above) and ϕ(A) = ϕ(M A) = ϕ(N ) ∼ = N/(N ∩ N rk ) = N/N ′ is the = N N rk /N rk ∼ universal abelian quotient. Now assume that N1 6≤ N . Then it follows from Lemma 11 that ct(N ) = ct(N ∩ N rk ) = ct(N0 ) = {(0)} = I0 (as by assumption N0 ≤ N ). Hence we have established the following result. Lemma 14. If N is normal in G containing N0 and N1 6≤ N , then N ≤ A0 . Finally, we describe when a normal subgroup as in Lemma 14 is contained in a normal subgroup as in Lemma 13: Lemma 15. A normal subgroup N containing N0 but not N1 is contained in a normal subgroup K ≤ N pr containing N1 if and only if N ≤ A (or equivalently ϕ(N ) ≤ ϕ(A), with ϕ the map from Lemma 9), where Φ(K) = (M, A) is from Lemma 13. Proof. Assume N ≤ K. Then by Lemma 14 it holds that N ≤ K ∩ A0 ≤ K ∩ A1 = A implying ϕ(N ) ≤ ϕ(A). Conversely, by Lemma 9, the assumption ϕ(N ) ≤ ϕ(A) implies N N rk ≤ AN rk . Thus N N rk ∩ A1 = N (N rk ∩A1 ) = N N1 ≤ AN rk ∩A1 = A(N rk ∩A1 ) = AN1 = A by Dedekind’s modular law. So N ≤ A ≤ K, completing the proof.  We will end the article with a few remarks. Remark 10. Again, we have not yet covered the case that the Hi (i ∈ I) are double covers of Ω± odd). In this case, define N0 2m (q) or Ω2m+1 (q) (q Q as above and let A0 be the elements of G = i Hi which are central along the ultrafilter U . Then G/N0 is a twofold cover of an ultraproduct G/M0 of orthogonal groups with kernel M0 /N0 ∼ = C2 . It follows from Remark 3 that if N0 ≤ N E G contains an element non-central modulo N0 , i.e. it is not contained in A0 , then M0 ≤ N , so it corresponds to a normal subgroup of G/M0 , which we have described. Finally, when N0 ≤ N ≤ A0 with M0 6≤ N and M0 ≤ K ≤ G, then N ≤ K iff N M0 ≤ K and this again can be decided by considering the lattice of normal subgroups of G/M0 , which we discussed. Using the same argument, one can show that the normal subgroups of an ultraproduct of the double covers of simple alternating groups are still linearly ordered by inclusion (since here A0 = M0 ). 14 JAKOB SCHNEIDER AND ANDREAS THOM Acknowledgments The results of this article are part of the PhD thesis of the first author. This research was supported by ERC Consolidator Grant No. 681207. References [1] Philip Dowerk and Andreas Thom, Bounded Normal Generation and Invariant Automatic Continuity, arXiv:1506.08549 (2015), submitted. ↑1 [2] Martin W. Liebeck and Aner Shalev, Diameters of finite simple groups: sharp bounds and applications, Annals of Mathematics (2001), 383–406. ↑2, 6 [3] Abel Stolz and Andreas Thom, On the lattice of normal subgroups in ultraproducts of compact simple groups, Proceedings of the London Mathematical Society 108 (2014), no. 1, 73–102. ↑1, 6, 7, 8, 11 [4] Robert Wilson, The finite simple groups, Vol. 251, Springer Science & Business Media, 2009. ↑3, 10 J. Schneider, TU Dresden, 01062 Dresden, Germany E-mail address: [email protected] A. Thom, TU Dresden, 01062 Dresden, Germany E-mail address: [email protected]
4math.GR
Static Analysis for Regular Expression Denial-of-Service Attacks James Kirrage Asiri Rathnayake Hayo Thielecke arXiv:1301.0849v1 [cs.PL] 4 Jan 2013 University of Birmingham, UK Abstract. Regular expressions are a concise yet expressive language for expressing patterns. For instance, in networked software, they are used for input validation and intrusion detection. Yet some widely deployed regular expression matchers based on backtracking are themselves vulnerable to denial-of-service attacks, since their runtime can be exponential for certain input strings. This paper presents a static analysis for detecting such vulnerable regular expressions. The running time of the analysis compares favourably with tools based on fuzzing, that is, randomly generating inputs and measuring how long matching them takes. Unlike fuzzers, the analysis pinpoints the source of the vulnerability and generates possible malicious inputs for programmers to use in security testing. Moreover, the analysis has a firm theoretical foundation in abstract machines. Testing the analysis on two large repositories of regular expressions shows that the analysis is able to find significant numbers of vulnerable regular expressions in a matter of seconds. 1 Introduction Regular expression matching is a ubiquitous technique for reading and validating input, particularly in web software. While pattern matchers are among the standard techniques for defending against malicious input, they are themselves vulnerable. The root cause of the vulnerability is that widely deployed regular expression matchers, like the one in the Java libraries, are based on backtracking algorithms, rather than the construction of a Deterministic Finite Automaton (DFA), as used for lexers in compiler construction [11,2]. One reason for relying on backtracking rather than a DFA construction is to support a more expressive pattern specification language commonly referred to as “regexes”. Constructs such as back-references supported by such regex languages go beyond regular and even context-free languages and are known to be computationally expensive [1]. However, even if restricted to purely regular constructs, backtracking matchers may have a running time that is exponential in the size of the input [6], potentially causing a regular expression denial-of-service (ReDoS) attack [17]. It is this potentially exponential runtime on pure regular expressions (without backreferences) that we are concerned about in this paper. Part of our motivation is that, for purely regular expressions, the attack could be defended against by avoiding backtracking matchers and using more efficient techniques [7,24] instead. For a minimalistic example [6], consider matching the regular expression a** against the input string a. . . a b, with n repetitions of a. A backtracking matcher takes an exponential time [6] in n when trying to find a match; all matching attempts fail in the end due to the trailing b. For such vulnerable regular expressions, an attacker can craft an input of moderate size which causes the matcher to take so long that for all practical purposes the matcher fails to terminate, leading to a denial-of-service attack. Here we assume that the regular expression itself cannot be manipulated by the attacker but that it is matched against a string that is user-malleable. While the regular expression a** as above is contrived, one of the questions we set out to answer is how prevalent such vulnerable expressions are in the real world. As finding vulnerabilities manually in code is time consuming and error-prone, there is growing interest in automated tools for static analysis for security [12,5], motivating us to design an analysis for ReDoS. Educating and warning programmers is crucial to defending against attacks on software. The standard coverage of regular expressions in the computer science curriculum, covering DFAs in courses on computability [11] or compiler construction [2], is not necessarily sufficient to raise awareness about the possibility of ReDoS. Our analysis constructs a series of attack strings, so that developers can confirm the exponential runtime for themselves. This paper makes the following contributions: 1. We present an efficient static analysis for DoS on pure regular expressions. 2. The design of the tool has a firm theoretical foundation based on abstract machines [18] and derivatives [4] for regular expressions. 3. We report finding vulnerable regular expressions in the wild. In Section 2, we describe backtracking regular expression matchers as abstract machines, so that we have a precise model of what it means for a matching attempt to take an exponential number of steps. We build on the abstract machine in designing our static analysis in Section 3, which we have implemented in OCaml as described in Section 4. Experimental results in testing the analysis on two large corpora of regular expressions are reported in Section 5. Finally, Section 6 concludes with a discussion of related work and directions of further research. The code of the tool and data sets are available at this URL: http://www.cs.bham.ac.uk/~hxt/research/rxxr.shtml 2 Regular expression matching by backtracking This and the next section present the theoretical basis for our analysis. Readers primarily interested in the results may wish to skim them. We start with the following minimal syntax for regular expressions: e ::= e1 | e2 Alternation e∗ Kleene star e1 · e2 Concatenation a Constant, where a is an input symbol The · in concatenation e1 · e2 is usually omitted, except when it is useful for emphasis, as in a syntax tree. Following the usual parser construction methods [2], we can define a parser which is capable of transforming (parsing) a given regular expression into an AST (abstract syntax tree) which complies with the above grammar. As an example, the AST constructed by such a parser for the regular expression (a | b)∗c can be visualized in the following manner: p0 p · p1 p5 ∗ c p2 | p3 p4 a b π(p) p0 p1 · p5 p1 p2 ∗ p2 p3 | p4 p3 a p4 b p5 c Notice that we have employed a pointer notation to illustrate the AST structure; this is quite natural given that in most programming languages, such an AST would be defined using a similar pointer-based structure definition. Each node of this AST corresponds to a unique sub-expression of the original regular expression, the relationships among these nodes are given on the table to the right. We have used the notation π(p) to signify the dereferencing of the pointer p with respect to the heap π in which the above AST is constructed. A formal definition of π was avoided in order to keep the notational clutter to a minimum, interested readers may refer [18] for a more precise definition of π. Having parsed the regular expression into an AST, the next step is to construct an NFA structure that allows us to define a backtracking pattern matcher. While there are several standard NFA construction techniques [2], we opt for a slightly different construction which greatly simplifies the rest of the discussion. The idea is to associate a continuation pointer cont with each of the nodes in the AST such that cont points to the following (continuation) expression for each of the sub-expressions in the AST. In other words, cont identifies the “next subexpression” which must be matched after matching the given sub-expression. More formally, cont is defined as follows: Definition 1. Let cont be a function cont : dom(π) → (dom(π) ∪ {null}) Such that, – – – – If π(p) = (p1 | p2 ), then cont p1 = cont p and cont p2 = cont p If π(p) = (p1 · p2 ), then cont p1 = p2 and cont p2 = cont p If π(p) = (p1 )∗, then cont p1 = p cont p0 = null, where p0 is the pointer to the root of the AST. The following example illustrates the NFA constructed this way for the regular expression (a | b)∗c: null p p0 · p1 p5 ∗ c p2 | p3 p4 a π(p) p0 p1 · p5 p1 p2 ∗ p2 p3 | p4 p3 a p4 b p5 c cont p null p5 p1 p1 p1 null b Here the dashed arrows identify the cont pointer for each of the AST nodes. Readers familiar with Thompson’s construction [24,2] will realize that the resulting NFA is a slightly pessimized version of that resulting from Thompson’s algorithm. The reason for this pessimization is purely of presentational nature; it helps to visualize the NFA as an AST with an overlay of a cont pointer mesh so that the structure of the original regular expression is still available in the AST portion. Furthermore, this presentation allows the definitions and proofs to be presented in an inductive fashion with respect to the structure of the expressions. With the NFA defined, we present a simple non-deterministic regular expression matcher in the form of an abstract-machine called the PWπ machine: Definition 2. A configuration of the PWπ machine consists of two components: hp ; wi The p component represents the current sub-expression (similar to a code pointer) while w corresponds to the rest of the input string that remains to be matched. The transitions of this machine are as follows: hp ; wi → hp1 ; wi if π(p) = (p1 | p2 ) hp ; wi → hp2 ; wi if π(p) = (p1 | p2 ) hp ; wi → hq ; wi if π(p) = p1 ∗ ∧ cont p = q hp ; wi → hp1 ; wi if π(p) = p1 ∗ hp ; wi → hp1 ; wi if π(p) = (p1 · p2 ) hp ; awi → hq ; wi if π(p) = a ∧ cont p = q hp ; wi → hq ; wi if π(p) = ε ∧ cont p = q The initial state of the PWπ machine is hp0 ; wi, where p0 is the root of the AST corresponding to the input expression and w is the input string. The machine may terminate in the state hnull ; w′′ i where it has matched the original regular expression against some prefix w′ of the original input string w such that w = w′ w′′ . Apart from the successful termination, the machine may also terminate if it enters into a configuration where none of the above transitions apply. The PWπ machine searches for a matching prefix by non-deterministically making a choice whenever it has to branch at alternation or Kleene nodes. While this machine is not very useful in practice, it allows us to arrive at a precise model for backtracking regular expression matchers. Backtracking matchers operate by attempting all the possible search paths in order; this allows us to model them with a stack of PWπ machines. We call the resulting machine the PWFπ machine: Definition 3. The PWFπ machine consists of a stack of PWπ machines. The transitions of the PWFπ machine are given below: hp ; wi → hq ; w′ i ′ hp ; wi :: f → hq ; w i :: f hp ; wi → hq1 ; wi hp ; wi 6→ hp ; wi :: f → f hp ; wi → hq2 ; wi hp ; wi :: f → hq1 ; wi :: hq2 ; wi :: f The initial state of the PWFπ machine is [hp0 ; wi]. The machine may terminate if one of the PWπ machines locates a match or if none of them succeeds in finding a match. In the latter case the PWFπ machine has exhausted the entire search space and determined that the input string cannot be matched by the regular expression in question. The PWFπ machine allows us to analyze backtracking regular expression matchers at an abstract level without concerning ourselves about any implementation specific details. More importantly, it gives an accurate cost model of backtracking matchers; the number of steps executed by the PWFπ machine corresponds to the amount of work a backtracking matcher has to perform when searching for a match. In the following sections we employ these ideas to develop and implement our static analysis. 3 Static analysis for exponential blowup The problem we are aiming to solve is this: given a regular expression e, represented as in Section 2, are there input strings x, y, and z, such that: 1. Reading x takes the machine to a pointer p0 that is the root of a Kleene star expression. 2. Reading the input w takes the machine from p0 back to p0 , and in at least two different ways, that is, along two different paths in the NFA. 3. Reading the input z when starting from p0 causes the match to fail. r x p0 w w p0 w p0 w p0 w w p0 p0 p0 z z z z fail fail fail fail Fig. 3.1. The search tree for x w w y We call x the prefix, w the pumpable string by analogy with pumping lemmas in automata theory [11], and z the failure suffix. From these three strings, malicious inputs can be constructed: the n-th malicious input is x wn z. Figure 3.1 illustrates the search tree that a backtracking matcher has to explore when w is pumped twice. Because w can be matched in two different ways, the tree branches every time a w is read from the input. All branches fail in the end due to the trailing z, so that the matcher must explore the whole tree. To state the analysis more formally, we will need to define paths in the matcher. w Definition 4. A path of pointers, t : p −→ q is defined according to the following inductive rules: ε – For each pointer p, [p] : p −→ p is a path (identity). w – If t : p −→ q is a path and there exists a PWπ transition such that: hq ; w′ w1 i → hq ′ ; w1 i ww ′ Then t · [q ′ ] : p −→ q ′ is also a path. w Lemma 1. The path t : p −→ q (q 6= p) exists if and only if a PWπ run exists such that: hp ; ww′ i → · · · → hq ; w′ i Lemma 1 associates a unique string w with each path of pointers (the substring matched by the corresponding PWπ run). However, note that the inverse of this implication does not hold; there can be input strings for which we may find more than one PWπ run. In fact, it is this property of paths that leads us to the main theorem of this paper: Theorem 1. For a given Kleene expression p0 where π(p0 ) = p1 ∗, if at least w w two paths exist such that t1 : p1 −→ p0 , t2 : p1 −→ p0 and t1 6= t2 , then a n regular expression involving p0 exhibits o(2 ) runtime on a backtracking regular expression matcher for input strings of the form xwn z where x is a sub-string matching the prefix of p0 and z is such that xwn z fails to match the overall expression. While a formal proof of Theorem 1 is outside of the scope of this paper, we sketch its proof with reference to Figure 3.1. The prefix x causes the PWFπ machine to advance into a state where it has to match p0 against the remainder of the input string, which leads to the branching of the search tree. Finally, the suffix z at the end of the input causes each search path to fail, which in turns forces the PWFπ machine to backtrack and explore the entire search tree before concluding that a match cannot be found. For the complexity, note that each additional pumping increases the size of the input by a constant (the length of w) whereas it doubles the size of the binary subtree given by the w branches, as well as the number of failed attempts to match z at the end. If there are more than 2 ways to match the pumpable string, say b, then b rather than 2 becomes the base of the exponent, but 2 is still a lower bound. The matching of the prefix x at the beginning contributes a constant to the runtime, which can be disregarded relative to the exponential growth. Thus the lower bound for the number of steps is exponential. 3.1 Generating the pumpable string The most important step in generating an attack string for a vulnerable regular expression is to generate the pumpable string w in xwn z (for some Kleene subexpression). In order to arrive at the machine for building the pumpable string, we must first introduce several utility definitions. Note that in the remainder of this discussion, p0 refers to a Kleene expression such that π(p0 ) = p1 ∗. Definition 5. For a given pointer p, the operation  p (called evolve) is defined as: ε  p = [q | ∃t.t : p −→ q ∧ ∃a.π(q) = a] Notice that the result of  p is a list of pointers. Definition 6. The function Da (P ), (called derive) is defined on a list of pointers P and an input symbol a according to the following rules: Da ([ ]) = [ ]   Da (t) Da (h :: t) = q :: Da (t)   Da ( h · t) if π(h) = b, b 6= a if π(h) = a ∧ cont h = q otherwise. The definition Da (P ) is analogous to Brzozowski’s derivatives of regular expressions [4]. In essence, the analysis computes derivatives of a Kleene expression in order to find two different matcher states for the same input string. Definition 7. A wP frame is defined as a pair (w, P ) where w is a string and P is a list of pointers. A non-deterministic transition relation is defined on wP frames as follows: Da (P ) 6= [ ] (w, P ) → (w a, Da (P )) Definition 8. The HFπ machine has configurations of the following form: hH ; f i Here H (history) represents a set of (sorted) pointer lists and f is a list of wP frames. A deterministic transition relation defines the behavior of this machine as follows: (w, P ) → (wx0 , P0 ) ... (w, P ) → (wxn , Pn ) ∀i.xi ∈ Σ Pi ∈ /H hH ; (w, P ) :: f i → hH ∪ {P0 , . . . , Pn } ; f · [(wx0 , P0 ), . . . , (wxn , Pn )]i The initial configuration of the HFπ machine is h∅ ; [(ε, [p1 ])]i and the machine can terminate in either of the following two configurations: hH ; [ ]i ε ε hH ; (w, P ) :: f i where ∃p′ , p′′ ∈ P. ∃t′ , t′′ . t′ : p′ −→ p0 ∧ t′′ : p′′ −→ p0 In the former configuration the machine has determined the Kleene expression in question to be non-vulnerable while in the latter it has derived the pumpable string w. 3.2 Generating the Prefix and the Suffix For a regular expression of the form e1 (e2 ∗) e3 , apart from a pumpable string w, we must also generate a prefix x and a suffix z. The intention is that x would lead the matcher to the point where it has to match e2 ∗, after which we can pump many copies of w to increase the search space of the matcher. However, a successful exploit also needs a suffix z which forces the matcher to fail and so to traverse the entire search space. Generating the prefix is quite straightforward since a depth-first search for Kleene sub-expressions (on the AST) can be augmented such that a (minimal) prefix is generated for each search-path. On the other hand, the suffix generation is more involved. One would think z should be generated such that it fails to match the continuation expression e3 of the original expression, but this intuition is flawed since there is a possibility that z could be matched by e2 itself (while it was meant for e3 ). Depending on e2 , it could be the case that no failure suffix exists. One example we found is that e2 ends in .*, so that it can match anything. In other cases, a failure suffix may exists, but depend in complicated ways on e2 . We chose not to solve this problem in full generality, but rather to employ heuristics that find failure suffixes for many practical expressions, as illustrated in the results section. 4 Implementation of the static analysis We implemented the HFπ machine described in Section 3 using the OCaml programming language. OCaml is well suited to programming abstract syntax, and hence a popular choice for writing static analyses. One of the major obstacles faced with the implementation is that in order to be able to analyze real-world regular expressions, it was necessary to build a sophisticated parser. In this regard, we decided to support the most common elements of the Perl / PCRE standards, as these seem to be the most commonly used (and adapted) syntaxes. It should be noted that the current implementation does not support back-references or look-around expressions due to their inherent complexity; it remains to be seen if the static analysis proposed in this work can be adapted to handle such “regexes”. However, as it was explained earlier, exponential vulnerabilities in pattern specifications are not necessarily dependent on the use of back-references or other advanced constructs (although one would expect such constructs to further increase the search space of a backtracking matcher). A detailed description of the pattern specification syntax currently supported by the implementation has been included in the resources accompanying this paper. The implementation closely follows the description of the HFπ machine presented in Section 3. The history component H is implemented as a set of sorted integer lists, where a single sorted integer list corresponds to a list of nodes pointed by the pointer list P of a wP frame (w, P ). This representation allows for quick elimination of looping wP frames. While the size of H is potentially exponential in the number of nodes of a given Kleene expression, for practical regular expressions we found this size to be well within manageable levels (as evidenced in the results section). A matter not addressed in the current work is that the PWFπ machine (and naive backtracking matching algorithms in general) can enter into infinite loops for Kleene expressions when the enclosed sub-expression matches the empty string (i.e the sub-expression is nullable). Although a complete treatment of this issue and its solution (implemented by most of the well known backtracking matchers) is beyond the scope of this paper, it should be mentioned that a similar problem occurs in the HFπ machine during the  p operation. We have incorporated a method for detecting and terminating such infinite loops into the OCaml code for the  p function so that it terminates in all cases. 5 Experimental results The analysis was tested on two corpora of regexes (Figure 1). The first of these was extracted from an online regex library called RegExLib [19], which is a community-maintained regex archive; programmers from various disciplines submit their solutions to various pattern matching tasks, so that other developers can reuse these expressions for their own pattern matching needs. The second corpus was extracted from the popular intrusion detection and prevention system Snort [23], which contains regex-based pattern matching rules for inspecting IP RegExLib Snort Total patterns 2994 12499 Analyzable (only regular constructs) 2213 9408 Uses Kleene star 1103 2741 127 20 15 4 2066 9389 Pumpable Kleene and suffix found Pumpable Kleene only No pumpable Kleene Max HFπ steps 509 256 Total classification time (Intel Core 2 Duo 1.8 MHz, 4 GB RAM) 40 s 10 s Table 1. Experimental results with RegExLib and Snort packets across network boundaries. The contrasting purposes of these two corpora allow us to get a better view of the seriousness of exponential vulnerabilities in practical regular expressions. The regex archive for RegExLib was only available through the corresponding website [19]. Therefore, as the first step the expressions had to be scraped from their web source and adapted so that they can be fed into our tool. These adaptations include removing unnecessary white-space, comments and spurious line breaks. A detailed description of these adjustments as well as copies of both adjusted and un-adjusted data sets have been included with the resources accompanying this paper (also including the Python script used for scraping). The regexes for Snort, on the other hand, are embedded within plain text files that define the Snort rule set. A Python script (also included in the accompanying resources) allowed the extraction of these regexes, and no further processing was necessary. The results of the HFπ static analysis on these two corpora of regexes are presented in Table 1. The figures show that we can process around 75% of each of the corpora with the current level of syntax support. Out of these analyzable amounts, it is notable that regular expressions from the RegExLib archive use the Kleene operator more frequently (about 50% of the analyzable expressions) than those from the Snort rule set (close to 30%). About 11.5% of the Kleenebased RegExLib expressions were found to have a pumpable Kleene expression as well as a suitable suffix, whereas for Snort this figure stands around 0.55%. The vulnerabilities reported range from trivial programming errors to more complicated cases. For an example, the following regular expression is meant to validate time values in 24-hour format (from RegExLib): ^(([01][0-9]|[012][0-3]):([0-5][0-9]))*$ Here the author has mistakenly used the Kleene operator instead of the ? operator to suggest the presence or non-presence of the value. This pattern works perfectly for all intended inputs. However, our analysis reports that this expression is vulnerable with the pumpable string “13:59” and the suffix “/”. This result gives the programmer a warning that the regular expression presents a DoS security risk if exposed to user-malleable input strings to match. For a moderately complicated example, consider the following regular expression (again from RegExLib): ^([a-zA-z]:((\\([-*\.*\w+\s+\d+]+)|(\w+)\\)+)(\w+.zip)|(\w+.ZIP))$ This expression is meant to validate file paths to zip archives. Our tool identifies this expression as vulnerable and generates the prefix “z:\ ”, the pumpable string “\zzz\” and the empty string as the suffix. This is probably an unexpected input in the author’s eye, and this is another way in which our tool can be useful in that it can point out potential mis-interpretations which may have materialized as vulnerabilities. It is worth noting that the HFπ machine manages to classify both the corpora (the analyzable portions) in a matter of seconds on modest hardware. This shows that our static analysis is usable for most practical purposes, with the average classification time for an expression in the range of micro-seconds. The two extreme cases for which the machine took several seconds for the classification are given below (only the respective Kleene expressions): ([\d\w][-\d\w]{0,253}[\d\w]\.)+ ([^\x00]{0,255}\x00)* Here counting expressions [-\d\w]{0,253} and [^\x00]{0,255} were expanded out during the parsing phase. The expansion produces a large Kleene expression, which naturally requires more analysis during the HFπ simulation. However, it should be noted that such expressions are the exception rather than the norm. Finally, it should be mentioned that all the vulnerabilities reported above were individually verified using a modified version of the PWFπ machine (which counts the number of steps taken for a particular matching operation). A sample of those vulnerabilities was also tested on the Java regular expression matcher. 6 Conclusions We have presented a static analysis to help programmers defend against regular expression DoS attacks. Large numbers of regular expressions can be analysed quickly, and developers are given feedback on where in their regular expressions the problem has been identified as well as examples of malicious input. As illustrated in Section 5, the prefix, pumpable string and failure suffix can be quite short. If their length is, say, 3, 5 and 0 characters, then an attacker only needs to spend a very small amount of effort in providing a malicious input of length 3+5*100 characters to cause a matching time in excess of 2100 steps. Even if a matching step takes only a nanosecond, such a running time takes, for all intents and purposes, forever. The attacker can still scale up the attack by pumping a few times more and thereby correspondingly multiplying the matching time. The fact that the complexity of checking a regular expression for exponential runtime may be computationally expensive in the worst case does not necessarily imply that such an analysis is futile. Type checking in functional languages like ML and Haskell also has high complexity [14,21], yet works efficiently in practice because the worst cases rarely occur in real-world code. There are even program analyses for undecidable problems like termination [3], so that the worst-case running time is infinite; what matters is that the analysis produces results in enough cases to be useful in practice. It is a common situation in program analysis that tools are not infallible (having false positives and negatives), but they are nonetheless useful for identifying points in code that need attention by a human expert [9]. 6.1 Related work A general class of DoS attacks based on algorithmic complexities has been explored in [8]. In particular, the exponential runtime behavior of backtracking regular expression matchers has been discussed in [6] and [20]. The seriousness of this issue is further expounded in [22] and [16] where the authors demonstrate the mounting of DoS attacks on an IDS/IPS system (Snort) by exploiting the said vulnerability. The solutions proposed in these two works involve modifying the regular expressions and/or the matching algorithm in order to circumvent the problem in the context of IDS/IPS systems. We consider our work to be quite orthogonal and more general since it is based on a compile-time static analysis of regular expressions. However, it should be noted that both of those works concern of regexes with back-references, which is a feature we are yet to explore (known to be NP-hard [1]). While the problem of ReDoS has been known for at least a decade, we are not aware of any previous static analysis for defending against it. A handful of tools exist that can assist programmers in finding such vulnerable regexes. Among these tools we found Microsoft’s SDL Regex Fuzzer [15] and the RegexBuddy [13] to be the most usable implementations, as other tools were too unstable to be tested with complex expressions. While RegexBuddy itself is not a security oriented software, it offers a debug mode, which can be used to detect what the authors of the tool refer to as Catastrophic Backtracking [10]. Even though such visual debugging methods can assist in detecting potential vulnerabilities, it would only be effective if the attack string is known in advance—this is where a static analysis method like the one presented on this paper has a clear advantage. SDL Fuzzer, on the other hand, is aimed specifically at analyzing regular expression vulnerabilities. While details of the tool’s internal workings are not publicly available, analyzing the associated documentation reveals that it operates fuzzing, i.e., by brute-forcing a sequence of generated strings through the regular expression in question to detect long running times. The main disadvantage of this tool is that it can take a very long time for the tool to classify a given expression. Tests using some of the regular expressions used in the results section above revealed that it can take up to four minutes for the Fuzzer to classify certain expressions. It is an inherent limitation of fuzzers for exponential runtime DoS attacks that the finding out if something takes a long time by running it takes a long time. By contrast, our analysis statically analyzes an expression without ever running it. It is capable of classifying thousands of regular expressions in a matter of seconds. Furthermore, the output produced by the SDL Fuzzer only reports the fact that the expression in question failed to execute within a given time limit for some input string. Using this generated input string to pin-point the exact problem in the expression would be quite a daunting task. In contrast, our static analysis pin-points the exact Kleene expression that causes the vulnerability and allows programmers to test their matchers with a sequence of malicious inputs. 6.2 Directions for further research In further work, we aim to broaden the coverage of our tool to include more regexes. Given its basis in our earlier work on abstract machines [18] and derivatives [4], we aim for a formal proof of the correctness of our analysis. We intend to release the source code of the tool as an open source project. More broadly, we hope that raising awareness of the dangers of backtracking matchers will help in the adoption of superior techniques for regular expression matching [7,24,18]. References 1. Alfred V. Aho. Algorithms for Finding Patterns in Strings. In Jan van Leeuwen, editor, Handbook of theoretical computer science (vol. A), pages 255–300. MIT Press, Cambridge, MA, USA, 1990. 2. Alfred V. Aho, Monica Lam, Ravi Sethi, and Jeffrey D. Ullman. Compilers Principles, Techniques and Tools. Addison Wesley, second edition, 2007. 3. J. Berdine, B. Cook, D. Distefano, and P. OHearn. Automatic termination proofs for programs with shape-shifting heaps. In Computer Aided Verification, pages 386–400. Springer, 2006. 4. Janusz A. Brzozowski. Derivatives of Regular Expressions. J. ACM, 11(4):481–494, 1964. 5. B. Chess and G. McGraw. Static analysis for security. Security & Privacy, IEEE, 2(6):76–79, 2004. 6. Russ Cox. Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, Php, Python, Ruby, ...). Available at http://swtch.com/~rsc/regexp/ regexp1.html, January 2007. 7. Russ Cox. Regular expression matching: the virtual machine approach. Available at http://swtch.com/~rsc/regexp/regexp2.html, December 2009. 8. Scott A. Crosby and Dan S. Wallach. Denial of Service via Algorithmic Complexity Attacks. In Proceedings of the 12th USENIX Security Symposium, Washington, DC, August 2003. 9. Mark Dowd, John McDonald, and Justin Schuh. The Art of Software Security Assessment: Identifying and Preventing Software Vulnerabilities. Addison Wesley, 2006. 10. Jan Goyvaerts. Runaway Regular Expressions: Catastrophic Backtracking. Available at http://www.regular-expressions.info/catastrophic.html, 2009. 11. John E. Hopcroft and Jeffrey D. Ullman. Introduction to Automata Theory, Languages and Computation. Addison-Wesley, 1979. 12. V.B. Livshits and M.S. Lam. Finding security vulnerabilities in java applications with static analysis. In Proceedings of the 14th conference on USENIX Security Symposium, volume 14, pages 18–18, 2005. 13. Just Great Software Co. Ltd. RegexBuddy. Available at http://www.regexbuddy. com/, 2012. 14. H.G. Mairson. Deciding ML typability is complete for deterministic exponential time. In Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 382–401. ACM, 1989. 15. Microsoft. SDL Regex Fuzzer. Available at http://www.microsoft.com/en-gb/ download/details.aspx?id=20095, 2011. 16. Kedar Namjoshi and Girija Narlikar. Robust and Fast Pattern Matching for Intrusion Detection. In Proceedings of the 29th conference on Information communications, INFOCOM’10, pages 740–748, Piscataway, NJ, USA, 2010. IEEE Press. 17. The Open Web Application Security Project (OWASP). Regular Expression Denial of Service - ReDoS. Available at https://www.owasp.org/index.php/Regular_ expression_Denial_of_Service_-_ReDoS, 2012. 18. Asiri Rathnayake and Hayo Thielecke. Regular Expression Matching and Operational Semantics. In Structural Operational Semantics (SOS 2011), Electronic Proceedings in Theoretical Computer Science, 2011. 19. RegExLib.com. Regular Expression Library. Available at http://regexlib.com/, 2012. 20. Alex Roichman and Adar Weidman. Regular Expression Denial of Service. Available at http://www.checkmarx.com/white_papers/ redos-regular-expression-denial-of-service/, 2012. 21. H. Seidl et al. Haskell overloading is DEXPTIME-complete. Information Processing Letters, 52(2):57–60, 1994. 22. Randy Smith, Cristian Estan, and Somesh Jha. Backtracking Algorithmic Complexity Attacks Against a NIDS. In Proceedings of the 22nd Annual Computer Security Applications Conference, ACSAC ’06, pages 89–98, Washington, DC, USA, 2006. IEEE Computer Society. 23. Sourcefire. Snort (IDS/IPS). Available at http://www.snort.org/, 2012. 24. Ken Thompson. Programming Techniques: Regular Expression Search Algorithm. Communications of the ACM, 11(6):419–422, June 1968.
6cs.PL
Risk Minimization and Optimal Derivative Design in a Principal arXiv:0710.5512v1 [cs.CE] 29 Oct 2007 Agent Game∗ Ulrich Horst Santiago Moreno-Bromberg Department of Mathematics Department of Mathematics Humboldt University Berlin University of British Columbia Unter den Linden 6 1984 Mathematics Road 10099 Berlin Vancouver, BC, V6T 1Z2 [email protected] [email protected] March 15, 2018 Abstract We consider the problem of Adverse Selection and optimal derivative design within a Principal-Agent framework. The principal’s income is exposed to non-hedgeable risk factors arising, for instance, from weather or climate phenomena. She evaluates her risk using a coherent and law invariant risk measure and tries minimize her exposure by selling derivative securities on her income to individual agents. The agents have mean-variance preferences with heterogeneous risk aversion coefficients. An agent’s degree of risk aversion is private information and hidden to the principal who only knows the overall distribution. We show that the principal’s risk minimization problem has a solution and illustrate the effects of risk transfer on her income by means of two specific examples. Our model extends earlier work of Barrieu and El Karoui (2005) and Carlier, Ekeland and Touzi (2007). Preliminary - Comments Welcome AMS classification: 60G35, 60H20, 91B16, 91B70. Keywords: Optimal derivative design, structured securities, adverse selection, risk transfer. ∗ We thank Guillaume Carlier, Pierre-Andre Chiappori, Ivar Ekeland, Andreas Putz and seminar participants at various institutions for valuable comments and suggestions. Financial support through an NSERC individual discovery grant is gratefully acknowledged. 1 1 Introduction In recent years there has been an increasing interest in derivative securities at the interface of finance and insurance. Structured products such as risk bonds, asset-backed securities and weather derivatives are end-products of a process known as securitization that transforms non-tradable risk factors into tradable financial assets. Developed in the U.S. mortgage markets, the idea of pooling and underwriting risk that cannot be hedged through investments in the capital markets alone has long become a key factor driving the convergence of insurance and financial markets. Structured products are often written on non-tradable underlyings, tailored to the issuers specific needs and traded “over the counter”. Insurance companies, for instance, routinely sell weather derivatives or risk bonds to customers that cannot go to the capital markets directly and/or seek financial securities with low correlation with stock indices as additions to diversified portfolios. The market for such claims is generally incomplete and illiquid. As a result, many of the standard paradigms of traditional derivative pricing theory, including replication arguments do not apply to structured products. In an illiquid market framework, preference-based valuation principles that take into account characteristics and endowment of trading partners may be more appropriate for designing, pricing and hedging contingent claims. Such valuation principles have become a major topic of current research in economics and financial mathematics. They include rules of Pareto optimal risk allocation ([11], [16]), market completion and dynamic equilibrium pricing ([14], [15]) and, in particular, utility indifference arguments ([2], [3], [5], [6], [9], ...). The latter assumes a high degree of market asymmetry. For indifference valuation to be a pricing rather than valuation principle, the demand for a financial security must come from identical agents with known preferences and negligible market impact while the supply must come from a single principal. When the demand comes from heterogeneous individuals with hidden characteristics, indifference arguments do not always yield an appropriate pricing scheme. In this paper we move away from the assumption of investor homogeneity and allow for heterogeneous agents. We consider a single principal with a random endowment whose goal is to lay off some of her risk with heterogeneous agents by designing and selling derivative securities on her income. The agents have mean variance preferences. An agent’s degree of risk aversion is private information and hidden to the principal. The principal only knows the distribution of risk aversion coefficients which puts her at an informational disadvantage. If all the agents were homogeneous, the principal, when offering a structured product to a single agent, could (perhaps) extract the indifference (maximum) price from each trading partner. In the presence of agent heterogeneity this is no longer possible, either because the agents would hide their characteristics from the principal or prefer another asset offered by the principal but designed and priced for another customer. The problem of optimal derivative design in a Principal-Agent framework with informed agents and an uninformed principal has first been addressed in a recent paper by of Carlier, Ekeland 2 and Touzi [7]. With the agents being the informed party, theirs is a screening model. The literature on screening within the Adverse Selection framework can be traced back to Mussa and Rosen [18], where both the principal’s allocation rule and the agents’ types are one-dimensional. Armstrong [1] relaxes the hypothesis of agents being characterized by a single parameter. He shows that, unlike the one-dimensional case, “bunching” of the first type is robust when the types of the agents are multi-dimensional. In their seminal paper, Rochet and Choné [19] further extend this analysis. They provide a characterization of the contracts, determined by the (nonlinear) pricing schedule, that maximize the principal’s utility under the constraints imposed by the asymmetry of information in the models. Building on their work, Carlier, Ekeland and Touzi [7] study a Principal-Agent model of optimal derivative design where the agents’ preferences are of mean-variance type and their multi-dimensional types characterize their risk aversions and initial endowments. They assume that there is a direct cost to the principal when she designs a contract for an agent, and that the principal’s aim is to maximize profits. We start from a similar set-up, but substitute the idea that providing products carries a cost for the idea that traded contracts expose the principal to additional risk - as measured by a convex risk measure - in exchange for a known revenue. This may be viewed as a partial extension of the work by Barrieu and El Karoui ([2],[3]) to an incomplete information framework. The principal’s aim is to minimize her risk exposure by trading with the agents subject to the standard incentive compatibility and individual rationality conditions on the agents’ choices. In order to prove that the principal’s risk minimization problem has a solution we first follow the seminal idea of Rochet and Choné [19] and characterize incentive compatible catalogues in terms of U -convex functions. When the impact of a single trade on the principal’s revenues is linear as in Carlier, Ekeland and Touzi [7], the link between incentive compatibility and U -convexity is key to establish the existence of an optimal solution. In our model the impact is non-linear as a single trade has a non-linear impact on the principal’s risk assessment. Due to this non-linearity we face a non-standard variational problem where the objective cannot be written as the integral of a given Lagrangian. Instead, our problem can be decomposed into a standard variational part representing the aggregate income of the principal, plus the minimization of the principal’s risk evaluation, which depends on the aggregate of the derivatives traded. We state sufficient conditions that guarantee that the principal’s optimization problem has a solution and illustrate the effect of risk transfer on her exposure by means of two specific examples. The remainder of this paper is organized as follows. In Section 2 we formulate our PrincipalAgent model and state the main result. The proof is given in Section 3. In Section 4 we illustrate the effects of risk transfer on the principal’s position by two examples. In the first we consider a situation where the principal restricts itself to type-dependent multiples of some benchmark claim. This case can be solved in closed form by means of a standard variational problem. The second example considers put options with type-dependent strikes. In both cases we assume that 3 the principal’s risk measure is Average Value at Risk. As a consequence the risk minimization problem can be stated in terms of a min-max problem; we provide an efficient numerical scheme for approximating the optimal solution. The code is given in an appendix. 2 The Microeconomic Setup We consider an economy with a single principal whose income W is exposed to non-hedgeable risk factors rising from, e.g., climate or weather phenomena. The random variable W is defined on a standard, non-atomic, probability space (Ω, F, P) and it is square integrable: W ∈ L2 (Ω, F, P). The principal’s goal is to lay off parts of her risk with individual agents. The agents have heterogenous mean-variance preferences1 and are indexed by their coefficients of risk aversion θ ∈ Θ. Given a contingent claim Y ∈ L2 (Ω, F, P) an agent of type θ enjoys the utility U (θ, Y ) = E[Y ] − θ Var[Y ]. (1) Types are private information. The principal knows the distribution µ of types but not the realizations of the random variables θ. We assume that the agents are risk averse and that the risk aversion coefficients are bounded away from zero. More precisely, Θ = [a, 1] for some a > 0. The principal offers a derivative security X(θ) written on her random income for any type θ. The set of all such securities is denoted by  X := X = {X(θ)}θ ∈Θ | X ∈ L2 (Ω × Θ, P ⊗ µ), X is σ(W ) × B(Θ) measurable . (2)  v(θ) = sup U (θ, X(θ ′ )) − π(θ ′ ) . θ ′ ∈Θ (3) We refer to a list of securities {X(θ)} as a contract. A catalogue is a contract along with prices π(θ) for every available derivative X(θ). For a given catalogue (X, π) the optimal net utility of the agent of type θ is given by Remark 2.1 No assumption will be made on the sign of π(θ); our model contemplates both the case where the principal takes additional risk in exchange of financial compensation and the one where she pays the agents to take part of her risk. 1 Our analysis carries over to preferences of mean-variance type with random initial endowment as in [7]; the assumption of simple mean-variance preferences is made for notational convenience. 4 A catalogue (X, π) will be called incentive compatible (IC) if the agent’s interests are best served by revealing her type. This means that her optimal utility is achieved by the security X(θ): U (θ, X(θ)) − π(θ) ≥ U (θ, X(θ ′ )) − π(θ ′ ) for all θ, θ′ ∈ Θ. (4) We assume that each agent has some outside option (“no trade”) that yields a utility of zero. A catalogue is thus called individually rational (IR) if it yields at least the reservation utility for all agents, i.e., if U (θ, X(θ)) − π(θ) ≥ 0 for all θ ∈ Θ. (5) Remark 2.2 By offering only incentive compatible contracts, the principal forces the agents to reveal their type. Offering contracts where the IR constraint is binding allows the principal to exclude undesirable agents from participating in the market. It can be shown that under certain conditions, the interests of the Principal are better served by keeping agents of “lower types” to their reservation utility; Rochet and Choné [19] have shown that in higher dimensions this is always the case. R If the principal issues the catalogue (X, π), she receives a cash amount of Θ π (θ) dµ(θ) and is R subject to the additional liability Θ X(θ)µ(dθ). She evaluates the risk associated with her overall position Z (π(θ) − X(θ))dµ(θ) W+ Θ via a coherent and law-invariant risk measure ̺ : L2 (Ω, F, P) → R ∪ {∞} that has the Fatou property. It turns out that such risk measures can be represented as robust mixtures of Average Value at Risk.2 The principal’s risk associated with the catalogue (X, π) is given by   Z (π(θ) − X(θ))dµ(θ) . (6) ̺ W+ Θ Her goal is to devise contracts (X, π) that minimize (6) subject to the incentive compatibility and individual rationality condition:     Z (π(θ) − X(θ))dµ(θ) | X ∈ X , X is IC and IR . (7) inf ̺ W + Θ We are now ready to state the main result of this paper. The proof requires some preparation and will be carried out in the following section. Theorem 2.3 If ̺ is a coherent and law invariant risk measure on L2 (P) and if ̺ has the Fatou property, then the principal’s optimization problem has a solution. For notational convenient we establish our main result for the spacial case dµ(θ) = dθ. The general case follows from straight forward modifications. We review properties of coherent risk measures on Lp spaces in the appendix and refer to the textbook by Föllmer and Schied [12] and the paper of Jouini, Schachermayer and Touzi [17] for detailed discussion of law invariant risk measures. 2 5 3 Proof of the Main Theorem Let (X, π) be a catalogue. In order to prove our main result it will be convenient to assume that the principal offers any square integrable contingent claim and to view the agents’ optimization problem as optimization problems over the set L2 (P). This can be achieved by identifying the price list {π(θ)} with the pricing scheme π : L2 (P) → R that assigns the value π(θ) to an available claim X(θ) and the value E[Y ] to any other claim Y ∈ L2 . In terms of this pricing scheme the value function v defined in (3) satisfies v(θ) = sup {U (θ, Y ) − π(Y )} . (8) Y ∈L2 (P) for any individually rational catalogue. For the remainder of this section we shall work with the value function of the (8). It is U -convex in the sense of the following definition; it actually turns out to be convex and non-increasing as we shall prove in Proposition 3.2 below. Definition 3.1 Let two spaces A and B and a function U : A × B → R be given. (i) The function f : A → R is called U -convex if there exists a function p : B → R such that f (a) = sup {U (a, b) − p(b)} . b∈B (ii) For a given function p : B → R the U -conjugate pU (a) of p is defined by pU (a) = sup {U (a, b) − p(b)} . b∈B (iii) The U-subdifferential of p at b is given by the set  ∂U p(b) := a ∈ A | pU (a) = U (a, b) − p(b) . (iv) If a ∈ ∂U p(b), then a is called a U-subgradient of p(b). Our goal is to identify the class of IC and IR catalogues with a class of convex and nonincreasing functions on the type space. To this end, we first recall the link between incentive compatible contracts and U -convex functions from Rochet and Choné [19] and Carlier, Ekeland and Touzi [7]. Proposition 3.2 ([19], [7]) If a catalogue (X, π) is incentive compatible, then the function v defined by (3) is proper and U-convex and X(θ) ∈ ∂U v(θ). Conversely, any proper, U-convex function induces an incentive compatible catalogue. 6 Proof. Incentive compatibility of a catalogue (X, π) means that U (θ, X(θ)) − π(θ) ≥ U (θ, X(θ ′ )) − π(θ ′ ) for all θ, θ′ ∈ Θ, so v(θ) = U (θ, X(θ)) − π(θ) is U-convex and X(θ) ∈ ∂U v(θ). Conversely, for a proper, U-convex function v and X(θ) ∈ ∂U v(θ) let π(θ) := U (θ, X(θ)) − v(θ). By the definition of the U-subdifferential, the catalogue (X, π) is incentive compatible. ✷ The following lemma is key. It shows that the U -convex function v is convex and non-increasing and that any convex and non-increasing function is U -convex, i.e., it allows a representation of the form (8). This allows us to rephrase the principal’s problem as an optimization problem over a compact set of convex functions. Lemma 3.3 (i) Suppose that the value function v as defined by (8) is proper. Then v is convex and non-increasing. Any optimal claim X ∗ (θ) is a U -subgradient of v(θ) and almost surely −Var[X ∗ (θ)] = v ′ (θ). (ii) If v̄ : Θ → R+ is proper, convex and non-increasing, then v̄ is U -convex, i.e., there exists a map π̄ : L2 (P) → R such that v̄(θ) = sup {U (θ, Y ) − π̄(Y )} . Y ∈L2 (P) Furthermore, any optimal claim X̄(θ) belongs to the U -subdifferential of v̄(θ) and satisfies −Var[X̄(θ)] = v̄ ′ (θ). Proof. (i) Let v be a proper, U -convex function. Its U -conjugate is: v U (Y ) = sup {E[Y ] − θVar[Y ] − v(θ)} θ∈Θ = E[Y ] + sup {θ(−Var[Y ]) − v(θ)} θ∈Θ = E[Y ] + v ∗ (−Var[Y ]), where v ∗ denotes the convex conjugate of v. As a U -convex function, the map v is characterized by the fact that v = (v U )U . Thus v(θ) = (v U )U (θ) = sup {U (θ, Y ) − E[Y ] − v ∗ (−Var[Y ])} Y ∈L2 (P) = sup {E[Y ] − θVar[Y ] − E[Y ] − v ∗ (−Var[Y ])} Y ∈L2 (P) = sup {θ · y − v ∗ (y)} y≤0 7 where the last equality uses the fact that the agents’ consumption set contains claims of any variance. We deduce from the preceding representation that v is non-increasing. Furthermore v = (v ∗ )∗ so v is convex. To characterize ∂U v(θ) we proceed as follows:  ∂U v(θ) = Y ∈ L2 | v(θ) = U (θ, X) − v U (Y )  = Y ∈ L2 | v(θ) = E[Y ] − θVar[Y ] − v U (Y )  = Y ∈ L2 | v(θ) = E[Y ] − θVar[Y ] − E[Y ] − v ∗ (−Var[Y ])  = Y ∈ L2 | v(θ) = θ(−Var[Y ]) − v ∗ (−Var[Y ])  = Y ∈ L2 | −Var[Y ] ∈ ∂v(θ) The convexity of v implies it is a.e. differentiable so we may write  ∂U v(θ) := Y ∈ L2 | v ′ (θ) = −Var[Y ]) . (ii) Let us now consider a proper, non-negative, convex and non-increasing function v̄ : Θ → R. There exists a map f : R → R such that v̄(θ) = sup {θ · y − f (y)} . y≤0 Since v̄ is non-increasing there exists a random variable Y (θ) ∈ L2 (P) such that −Var[Y (θ)] ∈ ∂v̄(θ) and the definition of the subgradient yields v̄(θ) = sup {θ(−Var[Y ]) − f (−Var[Y ])} . Y ∈L2 With the pricing scheme on L2 (P) defined by π̄(Y ) := −E[Y ] − f (−Var[Y ]) this yields v̄(θ) = sup {U (θ, Y ) − π̄(Y )} . Y ∈L2 The characterization of the subdifferential follows by analogy to part (i). ✷ The preceding lemma along with Proposition 3.2 shows that any convex, non-negative and non-increasing function v on Θ induces an incentive compatible catalogue (X, π) via X(θ) ∈ ∂U v(θ) and π(θ) = U (θ, X(θ)) − v(θ). Here we may with no loss of generality assume that E[X(θ)] = 0. In terms of the principal’s choice of v her income is given by Z  θv ′ (θ) − v(θ) dθ. I(v) = Θ 8 Since v ≥ 0 is decreasing and non-negative the principal will only consider functions that satisfy the normalization constraint v(1) = 0. We denote the class of all convex, non-increasing and non-negative real-valued functions on Θ that satisfy the preceding condition by C: C = {v : Θ → R | v is convex, non-increasing, non-negative and v(1) = 0.} Conversely, we can associate with any IC and IR catalogue (X, π) a non-negative U -convex function of the form (8) where the contract satisfies the variance constraint −Var[X(θ)] = v ′ (θ). In view of the preceding lemma this function is convex and non-increasing so after normalization we may assume that v belongs to the class C. We therefore have the following alternative formulation of the principal’s problem. Theorem 3.4 The principal’s optimization problem allows the following alternative formulation:     Z ′ X(θ)dθ − I(v) | v ∈ C, E[X(θ)] = 0, −Var[X(θ)] = v (θ) . inf ̺ W − Θ In terms of our alternative formulation we can now prove a preliminary result. It states that a principal with no initial endowment will not issue any contracts. Lemma 3.5 If the principal has no initial endowment, i.e., if W = 0, then (v, X) = (0, 0) solves her optimization problem. Proof. Since ̺ is a coherent, law invariant risk measure on L2 (P) that has the Fatou property it satisfies ̺(Y ) ≥ −E[Y ] for all Y ∈ L2 (P). (9) For a given function v ∈ C the normalization constraint E[X(θ)] = 0 therefore yields   Z  Z X(θ)dθ − I(v) = −I(v). X(θ)dθ − I(v) ≥ E ̺ − Θ Θ Since v is non-negative and non-increasing −I(v) ≥ 0. Taking the infimum in the preceding inequality shows that v ≡ 0 and hence X(θ) ≡ 0 is an optimal solution. ✷ 3.1 Minimizing the risk for a given function v In the general case we approach the principal’s problem in two steps. We start by fixing a function v from the class C and minimize the associated risk   Z X(θ)dθ ̺ W− Θ 9 subject to the moment conditions E[X(θ)] = 0 and −Var[X(θ)] = v ′ (θ). To this end, we shall first prove the existence of optimal contracts Xv for a relaxed optimization where the variance constraint is replaced by the weaker condition Var[X(θ)] ≤ −v ′ (θ). In a subsequent step we show that based on Xv the principal can transfer risk exposures among the agents in such a way that (i) the aggregate risk remains unaltered; (ii) the variance constraint becomes binding. We assume with no loss of generality that v does not have a jump at θ = a. 3.1.1 The relaxed optimization problem For a given v ∈ C let us consider the convex set of derivative securities  X v := X ∈ X | E[X(θ)] = 0, Var[X(θ)] ≤ −v ′ (θ) µ − a.e. . Lemma 3.6 (10) (i) All functions v ∈ C that are acceptable for the principal are uniformly bounded. (ii) Under the conditions of (i) the set X v is closed and bounded in L2 (P ⊗ µ). More precisely, kXk22 ≤ v(a) for all X ∈ X v. Proof. (i) If v is acceptable for the principal, then any X ∈ X v satisfies   Z X(θ)dθ − I(v) ≤ ̺(W ). ̺ W− Θ From (9) and that fact that E[X(θ)] = 0 we deduce that   Z X(θ)dθ − I(v) ≤ ̺(W ) −E[W ] − I(v) ≤ ̺ W − Θ so −I(v) ≤ E[W ] + ̺(W ) =: K. Integrating by parts twice and using that v is non-increasing and v(1) = 0 we see that Z 1 v(θ)dθ ≥ av(a). K ≥ −I(v) = av(a) + 2 a This proves the assertion because a > 0. (ii) For X ∈ X v we deduce from the normalization constraint v(1) = 0 that Z Z Z 2 2 kXk2 = X (θ, ω)dP dθ ≤ − v ′ (θ)dθ ≤ v(a) so the assertion follows from part (i). 10 ✷ Since ̺ is a convex risk measure on L2 and because the set Xv of contingent claims is convex, closed and bounded in L2 a general result from the theory of convex optimization yields the following proposition. Proposition 3.7 If the function v is acceptable for the principal, then there exists a contract {Xv (θ)} such that     Z Z Xv (θ)dθ . X(θ)dθ = ̺ W − inf ̺ W − X∈X v Θ Θ The contract Xv along with the pricing scheme associated with v does not yield an incentive compatible catalogue unless the variance constraints happen to be binding. However, as we are now going to show, based on Xv the principal can find a redistribution of risk among the agents such that the resulting contract satisfies our IC condition. 3.1.2 Redistributing risk exposures among agents Let  ∂X v = X ∈ X v | E[X(θ)] = 0, Var[X(θ)] = −v ′ (θ), µ − a.e. be the set of all contracts from the class X v where the variance constraint is binding. Clearly,     Z Z X(θ)dθ . Xv (θ)dθ ≤ inf ̺ W − ̺ W− X∈∂ X v Θ Θ Let us then introduce the set of types  Θv := θ ∈ Θ | Var[Xv (θ)] < −v ′ (θ) , for whom the variance constraint is not binding. If µ(Θv ) = 0, then Xv yields an incentive compatible contract. Otherwise, we consider a random variable Ỹ ∈ X v , fix some type θ ∈ Θ and define Ỹ (θ) . (11) Y := q Var[Ỹ (θ)] We may with no loss of generality assume that Y is well defined for otherwise the status quo is optimal for the principal and her risk minimization problem is void. The purpose of introducing Y is to offer a set of structured products Zv based on Xv , such that Zv together with the pricing scheme associated with v yields an incentive compatible catalogue. To this end, we choose constants α̃(θ) for θ ∈ Θv such that Var[Xv (θ) + α̃(θ)Y ] = −v ′ (θ). 11 This equation holds for α̃± (θ) = −Cov[Xv (θ), Y ] ± q Cov2 [Xv (θ), Y ] − v ′ (θ) − Var[Xv (θ)]. For a type θ ∈ Θv the variance constraint is not binding. Hence −v ′ (θ) − Var[Xv (θ)] > 0 so that α+ (θ) > 0 and α− (θ) < 0. An application of Jensen’s inequality together with the fact that kXv k2 is bounded shows that α± are µ-integrable functions. Thus there exists a threshold type θ∗ ∈ Θ such that Z Z + α− (θ)dθ = 0. α (θ)dθ + Θv ∩(θ ∗ ,1] Θv ∩(a,θ ∗ ] In terms of θ∗ let us now define a function ( α(θ) := α̃+ (θ), if α̃− (θ), if θ ≤ θ∗ θ > θ∗ and a contract Zv := Xv + αY ∈ ∂X v . (12) R Since αdθ = 0 the aggregate risks associated with Xv and Zv are equal. As a result, the contract Zv solves the risk minimization problem   Z X(θ)µ(dθ) . (13) inf ̺ W + X∈∂ X v Θ Remark 3.8 In Section 4 we shall consider a situation where the principal restricts itself to a class of contracts for which the random variable Xv can be expressed in terms of the function v. In general such a representation will not be possible since v only imposes a restriction on the contracts’ second moments. 3.2 Minimizing the overall risk In order to finish the proof of our main result it remains to show that the minimization problem     Z Zv (θ)µ(dθ) − I(v) inf ̺ W − v∈C Θ has a solution and the infimum is obtained. To this end, we consider a minimizing sequence {vn } ⊂ C. The functions in C are locally Lipschitz continuous because they are convex. In fact they are uniformly locally Lipschitz: by Lemma 3.6 (i) the functions v ∈ C are uniformly bounded and non-increasing so all the elements of ∂v(θ) are uniformly bounded on compact sets of types. As a result, {vn } is a sequence of uniformly bounded and uniformly equicontinuous functions when restricted to compact subsets of Θ. Thus there exists a function v̄ ∈ C such that, passing to a subsequence if necessary, lim vn = v̄ n→∞ uniformly on compact sets. 12 A standard 3ǫ-argument shows that the convergence properties of the sequence {vn } carry over to the derivatives so that lim v ′ n→∞ n = v̄ ′ almost surely uniformly on compact sets. Since −θvn′ (θ) + vn (θ) ≥ 0 it follows from Fatou’s lemma that −I(v̄) ≤ lim inf n→∞ −I(vn ) so     Z lim inf ̺ W − Zvn (θ)µ(dθ) − I(vn ) n→∞ Θ   Z Zvn (θ)µ(dθ) + lim inf −I(vn ) ≥ lim inf ̺ W − n→∞ n→∞   ZΘ Zvn (θ)µ(dθ) − I(v̄) ≥ lim inf ̺ W − n→∞ Θ and it remains to analyze the associated risk process. For this, we first observe that for Zvn ∈ ∂Xvn Fubini’s theorem yields Z Z Z 2 2 kZvn k2 = Zvn dPdθ = − vn′ (θ)dθ = vn (a). (14) Since all the functions in C are uniformly bounded, we see that the contracts Zvn are contained in an L2 bounded, convex set. Hence there exists a square integrable random variable Z such that, after passing to a subsequence if necessary, w − lim Zn = Z (15) n→∞ Let Zv̄ ∈ Xv̄ . Convergence of the functions vn implies kZvn k2 → kZv̄ k2 . Thus (15) yields kZk2 = kZv̄ k2 along with convergence of aggregate risks: Z Z Z(θ, ω)dθ weakly in L2 (P). Zn (θ, ω)dθ → kZk2 = kZv̄ k2 and Θ Θ By Corollary I.2.2 in Ekeland and Témam (1976) [10], a lower semi-continuous convex function f : X → R remains ,so with respect to the weak topology σ(X, X ∗ ), the Fatou property of the risk measure ̺ guarantees that     Z Z Z(θ)µ(dθ) Zv̄ (θ)µ(dθ) ≤ ̺ W− ̺ W− Θ  Θ Z ≤ lim inf ̺ W − n→∞ We conclude that (Zv̄ , v̄) solves the Principal’s problem. 13 Θ Z(θ)µ(dθ) . 4 Examples Our main theorem states that the principal’s risk minimization problem has a solution. The solution can be characterized in terms of a convex function that specifies the agents’ net utility. Our existence result is based on a min-max optimization scheme whose complexity renders a rather involved numerical analysis . In this section we consider some examples where the principal’s choice of contracts is restricted to class of numerically more amenable securities. The first example studies a situation where the principal offers type-dependent multiplies of some benchmark claim. In this case the principal’s problem can be reduced to a constraint variational problem that can be solved in closed form. A second example comprises put options with type dependent strikes. Here we provide a numerical algorithm for approximating the optimal solution. 4.1 A single benchmark claim In this section we study a model where the principal sells a type-dependent multiple of a benchmark claim f (W ) ≥ 0 to the agents. More precisely, the principal offers contracts of the form X(θ) = α(θ)f (W ). (16) In order to simplify the notation we shall assume that the T-bond’s variance is normalized: Var[f (W )] = 1. 4.1.1 The optimization problems Let (X, π) be a catalogue where the contract X is of the form (16). By analogy to the general case it will be convenient to view the agents’ optimization problem as an optimization problem of the set of claims {γf (W ) | γ ∈ R} so the function α : Θ → R solves sup {U (θ, γf (W )) − π(θ)} . γ∈R In view of the variance constraint on the agents’ claims the principal’s problem can be written as Z p inf {̺ (W − C(v)f (W )) − I(v) | v ∈ C} where C(v) = −v ′ (θ)dθ. Θ p Note that E[f (W )] > 0, so the term E[f (W )] −v ′ (θ) must be included in the income. Before proceeding with the general case let us first consider a situation where in addition to being coherent and law invariant, the risk measure ̺ is also comonotone. In this case each security the principal sells to some agent increases her risk by the amount   p  ̺ −(f (W ) − E[f (W )]) −v ′ (θ) + v(θ) − θv ′ (θ) ≥ 0. This suggests that it is optimal for the principal not to sell a bond whose payoff moves into the same direction as her initial risk exposure. 14 Proposition 4.1 Suppose that ̺ is comonotone additive. If f (W ) and W are comonotone, then v = 0 is a solution to the principal’s problem. Proof. If W and f (W ) are comonotone, then the risk measure in equation (4.1.1) is additive and the principal needs to solve Z   p v(θ) + ̺ (f (W ) − E[f (W )]) −v ′ (θ) − θv ′ (θ) dθ. ̺ (W ) + inf v∈C Θ Since ̺ (f (W ) − E[f (W )]) ≥ 0 and −θv ′ (θ) ≥ 0 we see that Z   p v(θ) + ρ (F (W )) −v ′ (θ) − θv ′ (θ) dθ ≥ 0 Θ and hence v ≡ 0 is a minimizer. ✷ In view of the preceding proposition the principal needs to design the payoff function f in such a way that W and f (W ) are not comonotone. We construct an optimal payoff function in the following subsection. 4.1.2 A solution to the principal’s problem Considering the fact that ̺(·) is a decreasing function the principal’s goal must be to make the quantity C(v) as small as possible while keeping the income as large as possible. In a first step we therefore solve, for any constant A ∈ R the optimization problem Z   p (17) E[f (W )] −v ′ (θ) − v(θ) + θv ′ (θ) dθ = A. sup C(v) subject to v∈C Θ The constraint variational problem (17) captures the problem of risk minimizing subject to an income constraint. It can be solved in closed form. The associated Euler-Lagrange equation is given by ! λE[f ] − 1 d −λθ + p , (18) λ= dθ 2 −v ′ (θ) where λ is the Lagrange multiplier. The income constraint and boundary conditions are: v ′ (a) = − (λ′ )2 4λ2 a2 and v(1) = 0 where λ′ = (λE[f ] − 1). Integrating both sides of equation (18) and taking into account the normalization condition v(1) = 0, we obtain     1 λ′ 2 1 1 v(θ) = − . 8 λ 2θ − a 2 − a Inserting this equation into the constraint yields s   ′ 2 Z 1     Z λ θ 1 1 1 1 λ′ 2 1 dθ − − dθ. A = E[f ] + λ λ 8 2θ − a 2 − a 4 (2θ − a)2 a 2θ − a a 15 In terms of M := Z a 1    1 θ 1 1 1 − dθ + 8 2θ − a 2 − a 4 (2θ − a)2 and N := Z a 1 dθ 2θ − a we have the quadratic equation −M which has the solution s  λ′ λ λ′ λ 2 2 = s  λ′ 2 + N E[f ] − A = 0, λ N E[f ] − p (N E[f ])2 − 4AM 2M We have used the root with alternating signs, as we require the problem to reduce to ̺(W ) for A = 0. Remark 4.2 We notice that the constraint variational problem (17) is independent of the risk measure employed by the principal. This is because we minimized the risk pointwise subject to a constraint on aggregate revenues. In view of the preceding considerations the principal’s problem reduces to a one-dimensional minimization problems over the Reals:   N p N 2 E[f ] 2 + f (W ) inf ̺ W − f (W ) (N E[f ]) − 4AM − A. A 2M 2M Once the optimal value A∗ has been determined, the principal offers the securities   λE[f ] − 1 f (W ) 4θλ − 2λa at a price λE[f ] − 1 2  3Eλ(2θ − a) − a λE − 1 1 + (4θλ − 2λa)2 λ2 2 − a  . Example 4.3 Assume that the principal measures her risk exposure using Average Value at Risk at level 0.05. Let W̃ be a normally distributed random variable with mean 1/2 and variance 1/20. One can think that W̃ represents temperature. Suppose that the principal’s initial income is exposed to temperature risk and it is given by W = 0.1(W̃ − 1.1) with associated risk ̺(W ) = 0.0612. Suppose furthermore that the principal sells units of a put option on W̃ with strike 0.5, i.e., f (W ) = (W − 0.5)+ 16 By proceeding as above we approximated the principal’s risk as −0.6731 and she offers the security X(θ) = 0.5459 f (W ) 2θ − a to the agent of type θ for a price π(θ) = 4.2 1.1921 (1.1921)θ − (0.22)(2θ − a) √ − . 8(2 − a) 2(2θ − a)2 Put options with type dependent strikes In this section we consider the case where the principal underwrites put options on her income with type-dependent strikes. We assume that W ≤ 0 is a bounded random variable and consider contracts of the form X(θ) = (K(θ) − |W |)+ with 0 ≤ K(θ) ≤ kW k∞ . The boundedness assumption on the strikes is made with no loss of generality and each equilibrium pricing scheme is necessarily non-negative. Note that in this case the risk measure can be defined on L(P), so we only require convergence in probability to use the Fatou property. We deduce that both the agents’ net utilities and the variance of their positions is bounded from above by some constants K1 and K2 , respectively. Thus, the principal chooses a function v and contract X from the set {(X, v) | v ∈ C, v ≤ K1 , −Var[K(θ) − |W |] = v ′ (θ), |v ′ | ≤ K2 , 0 ≤ K(θ) ≤ kW k∞ }. The variance constraint v ′ (θ) = −Var[(K(θ) − W )+ ] allows us to express the strikes in terms of a continuous function of v ′ , i.e., K(θ) = F (v ′ (θ)). The Principal’s problem can therefore be written as     Z  ′ + ′ + (F (v (θ)) − |W |) − E[(F (v (θ)) − |W |) ] d − I(v) inf ̺ W − Θ where the infimum is taken over the set of all functions v ∈ C that satisfy v ≤ K1 and |v ′ | ≤ K2 . Remark 4.4 Within our current framework the contracts are expressed in terms of the derivative of the principal’s choice of v. This reflects the fact that the principal restricts itself to typedependent put options and is not always true in the general case. 17 4.2.1 An existence result Let {vn } be a minimizing sequence for the principal’s optimization problem. The functions vn are uniformly bounded and uniformly equicontinuous so we may with no loss of generality assume that vn → v uniformly. Recall this also implies a.s. convergence of the derivatives. By dominated convergence and the continuity of F, along with the fact that W is bounded yields Z Z ′ + (F (v ′ (θ)) − |W |)+ d P-a.s. (F (vn (θ)) − |W |) d −→ Θ Θ and lim n→∞ Z E[(F (vn′ (θ)) − |W |)+ dθ = Z E[(F (v ′ (θ)) − |W |)+ dθ Θ Θ This shows that the principal’s positions converge almost surely and hence in probability. Since ̺ is lower-semi-continuous with respect to convergence in probability we deduce that v solves the principal’s problem. 4.2.2 An algorithm for approximating the optimal solution We close this paper with a numerical approximation scheme for the principal’s optimal solution within the pit option framework. We assume the set of states of the World is finite with cardinality m. Each possible state ωj can occurs with probability pj . The realizations of the principal’s wealth are denoted by W = (W1 , . . . , Wm ). Note that p and W are treated as known data. We implement a numerical algorithm to approximate a solution to the principal’s problem when she evaluates risk via the risk measure m X X(ωj )pj qj , ̺(X) = − sup q∈Qλ j=1 where  −1 Qλ := q ∈ Rm . + | p · q = 1, qj ≤ λ We also assume the set of agent types is finite with cardinality n, i.e. θ = (θ 1 , . . . , θn ). The density of the types is given by M := (M1 , . . . , Mn ). In order to avoid singular points in the principal’s objective function, we approximate the option’s payoff function f (x) = (K − x)+ by the differentiable function   if x ≤ K − ǫ,  0, T (x, K) = S(x, K), if K − ǫ < x < K + ǫ,   x − K, if x ≥ K + ǫ. where S(x, K) = x2 ǫ − K K 2 − 2Aǫ + ǫ2 + x+ . 4ǫ 2ǫ 4ǫ 18 The algorithm uses a penalized Quasi-Newton method, based on Zakovic and Pantelides [20], to approximate a minimax point of     n n n n n−1 X X X 1 X X 1  Wi p i q i + F (v, K, q) = − T (Kj − |Wi |) pi qi − T (Kj − |Wi |) pi n n i=1 i=1 i=1 j=1 j=1     n 1X 1 vn − vn−1 vi+1 − vi + + vn − vi − θ i n θi+1 − θi n 1 − θ n−1 i=1 where v = (v1 , . . . , vn ) stands for the values of a convex, non-increasing function, K = (K1 , . . . , Kn ) denotes the vector of type dependent strikes and the derivatives v ′ (θi ) are approximated by v ′ (θ i ) = vi+1 − vi . θi+1 − θ i The need for a penalty method arises from the fact that we face the equality constraints = −V ar[(K(θ) − |W |)+ ] and p · q = 1. In order to implement a descent method, these constraints are relaxed and a penalty term is added. We denote by ng the total number of constraints. The principal’s problem is to find v ′ (θ) min max F (v, K, q) (v,K) q∈Qλ subject to G(v, K, q) ≤ 0 where G : R2n+m → Rng determines the constraints that keep (v, K) within the set of feasible contracts and q ∈ Qλ . The Maple code for our procedure is given in the appendix for completeness. Example 4.5 Let us illustrate the effects of risk transfer on the principal’s position in two model with five agent types and two states of the world. In both cases W = (−1, −2), θ = (1/2, 5/8, 3/4, 7/8, 1) and λ = 1.1 The starting values v0 , q0 and K0 we set are (4, 3, 2, 1, 0), (1, 1) and (1, 1, 1, 1, 1) respectively. i) Let p = (0.5, 0.5) and the types be uniformly distributed. The principal’s initial evaluation of her risk is 1.52. The optimal function v and strikes are: V1 0.1055 K1 1.44 V2 0.0761 K2 1.37 V3 0.0501 K3 1.07 V4 0.0342 K4 1.05 V5 0.0195 K5 1.05 The Principal’s valuation of her risk after the exchanges with the agents decreases to 0.2279. ii) In this instance p = (0.25, 0.75) and M = (1/15, 2/15, 3/15, 4/15, 5/15). The principal’s initial evaluation of her risk is 1.825. The values for the discretized v the type-dependent strikes are: 19 1.5 0.11 0.1 1.45 0.09 1.4 0.08 1.35 0.07 1.3 0.06 1.25 0.05 1.2 0.04 1.15 0.03 1.1 1.05 0.02 1 1.5 2 2.5 3 3.5 4 4.5 0.01 5 1 1.5 (a) The type-dependent strikes. 2 2.5 3 3.5 4 4.5 5 (b) The optimal function v. Figure 1: Optimal solution for underwriting put options, Case 1. V1 0.0073 K1 1.27 V2 0.0045 K2 1.16 V3 0.0029 K3 1.34 V4 0.0026 K4 0.11 V5 0.0025 K5 0.12 The Principal’s valuation of her risk after the exchanges with the agents is 0.0922. −3 1.4 7 x 10 6.5 1.2 6 1 5.5 0.8 5 0.6 4.5 4 0.4 3.5 0.2 0 3 1 1.5 2 2.5 3 3.5 4 4.5 2.5 5 (a) The type-dependent strikes. 1 1.5 2 2.5 3 3.5 4 4.5 (b) The optimal function v. Figure 2: Optimal solution for underwriting put options, Case 2. 20 5 5 Conclusions In this paper we analyzed a screening problem where the principal’s choice space is infinite dimensional. Our motivation was to present a nonlinear pricing scheme for over-the-counter financial products, which she trades with a set of heterogeneous agents with the aim of minimizing the exposure of her income to some non-hedgeable risk. In order to characterize incentive compatible and individually rational catalogues, we have made use of U-convex analysis. To keep the problem tracktable we have assumed the agents have mean-variance utilities, but this is not necessary for the characterization of the problem. Considering more general utility functions is an obvious extension to this work. Our main result is a proof of existence of a solution to the principal’s risk minimization problem in a general setting. The examples we have studied suggest that the methodologies for approaching particular cases are highly dependent on the choice of risk measure, as well as on the kinds of contracts the principal is willing (or able) to offer. In most cases obtaining closed form solutions is not possible and implementations must be done using numerical methods. As a work in progress we are considering agents with heterogenous initial endowments (or risk exposures), as well as a model that contemplates an economy with multiple principals. A Coherent risk measures on L2. In this appendix we recall some properties and representation results for risk measures on L2 spaces; we refer to the textbook of Föllmer and Schied [12] for a detailed discussion of convex risk measures on L∞ and to Cheridito and Tianbui [8] for risk measures on rather general state spaces. Bäuerle and Müller [4] establish representation properties of risk law invariant risk measures on Lp spaces for p ≥ 1. We assume that all random variables are defined on some standard non-atomic probability space (Ω, F, P). Definition A.1 (i) A monetary measure of risk on L2 is a function ̺ : L2 → R ∪ {∞} such that for all X, Y ∈ L2 the following conditions are satisfied: • Monotonicity: if X ≤ Y then ̺(X) ≥ ̺(Y ). • Cash Invariance: if m ∈ R then ̺(X + m) = ̺(X) − m. (ii) A risk measure is called coherent if it is convex and homogeneous of degree 1, i.e., if the following two conditions hold: • Convexity: for all λ ∈ [0, 1] and all positions X, Y ∈ L2 : ̺(λX + (1 − λ)Y ) ≤ λ̺(X) + (1 − λ)̺(Y ) 21 • Positive Homogeneity: For all λ ≥ 1 ̺(λX) = λ̺(X). (iii) The risk measure is called coherent and law invariant, if, in addition, ρ(X) = ρ(Y ) for any two random variables X and Y which have the same law. (iv) The risk measure ̺ on L2 has the Fatou property if for any sequence of random variables X1 , X2 , . . . that converges in L2 to a random variable X we have ρ(X) ≤ lim inf ρ(Xn ). n→∞ Given λ ∈ (0, 1], the Average Value at Risk of level λ of a position Y is defined as 1 AV @Rλ (Y ) := − λ Z λ qY (t)dt, 0 where qY (t) is the upper quantile function of Y . If Y ∈ L∞ , then we have the following characterization AV @Rλ (Y ) = sup −EQ [Y ] Q∈Qλ where   dQ 1 Qλ = Q << P | ≤ . dP λ Proposition A.2 For a given financial position Y ∈ L2 the mapping λ 7→ AV @Rλ (Y ) is decreasing in λ. It turns out the Average Value of Risk can be viewed as a basis for the space of all lawinvariant, coherent risk measures with the Fatou property. More precisely, we have the following result. Theorem A.3 The risk measure ̺ : L2 → R is law-invariant, coherent and has the Fatou Property if and only if ̺ admits a representation of the following form:  Z 1 ̺(Y ) = sup AV @Rλ (Y )µ(dλ) µ∈M 0 where M is a set of probability measures on the unit interval. As a consequence of Proposition A.2 and Theorem A.3 we have the following Corollary: 22 Corollary A.4 If ̺ : L2 → R is a law-invariant, coherent risk measure with the Fatou Property then ̺(Y ) ≥ −E[Y ]. An important class of risk measures are comonotone risk measures risk. Comonotone risk measures are characterized by the fact that the risk associated with two position whose payoff “moves in the same direction” is additive. Definition A.5 A risk measure ̺ is said to be comonotone if ̺(X + Y ) = ρ(X) + ρ(Y ) whenever X and Y are comonotone, i.e., whenever (X(ω) − X(ω ′ ))(Y (ω) − Y (ω ′ )) ≥ 0 P-a.s. Comonotone, law invariant and coherent risk measures with the Fatou property admit a representation of the form Z 1 ̺(Y ) = AV @Rλ (Y )µ(dλ). 0 B Maple code for the example of Section 4.2.2 with(LinearAlgebra) n := 5: m := 2: ng := 2*m+4*n+1: This section constructs the objective function f and its gradient. x := Vector(2*n, symbol = xs): q := Vector(m, symbol = qs): f := add(−G[j] ∗ p[j] ∗ q[j], j = 1..m)+ add(add(T (x[i + n], W [j]) ∗ M [i] ∗ p[j] ∗ q[j], i = 1..n), j = 1..m)− add(add(T (x[i + n], W [j]) ∗ M [i] ∗ p[j], i = 1..n), j = 1..m)+ add((x[i] − t[i] ∗ (x[i + 1] − x[i])/(t[i + 1] − t[i])) ∗ M [i], i = 1..n − 1)+ x[n] − t[n] ∗ (x[n] − x[n − 1]) ∗ M [n]/(t[n] − t[n − 1]) : T T := (x, K)− > 1/4 ∗ x2 /eps + 1/2 ∗ (eps − K) ∗ x/eps + 1/4 ∗ (K 2 − 2 ∗ K ∗ eps + eps2 )/eps : T := (x, K)− > piecewise(x ≤ K − eps, 0, x < K + eps, T T (x, K), K + eps ≤ x, x − K) : gradfx := 0: gradfq := 0: 23 for i from 1 do gradfx[i] end do: for i from 1 do gradfq[i] end do: to 2*n := diff(f, x[i]) to m := diff(f, q[i]) This section constructs the constraint function g and its gradient. g := Vector(ng, symbol = tt): for j from 1 to n do g[j] := -x[j] end do: for j from 1 to n-1 do g[j+n] := x[j+1]-x[j] end do: for i from 1 to n-1 do g[i+2*n-1] := add(T(x[i+n], W [j])2 ∗ p[j], j = 1..m) − add(T (x[i + n], W [j]) ∗ p[j], j = 1..m)2 + (x[i + 1] − x[i])/(t[i + 1] − t[i]) − eps2 end do: g[3 ∗ n − 1] := add(T (x[2 ∗ n], W [j])2 ∗ p[j], j = 1..m) − add(T (x[2 ∗ n], W [j]) ∗ p[j], j = 1..m)2 + (x[n] − x[n − 1])/(t[n] − t[n − 1]) − eps2 : for i from 1 to n-1 do g[i + 3 ∗ n − 1] := −add(T (x[i + n], W [j])2 ∗ p[j], j = 1..m) + add(T (x[i + n], W [j]) ∗ p[j], j = 1..m)2 − (x[i + 1] − x[i])/(t[i + 1] − t[i]) − eps2 end do: g[4 ∗ n − 1] := −add(T (x[2 ∗ n], W [j])2 ∗ p[j], j = 1..m) + add(T (x[2 ∗ n], W [j]) ∗ p[j], j = 1..m)2 − (x[n] − x[n − 1])/(t[n] − t[n − 1]) − eps2 : g[4*n] := add(p[i]*q[i], i = 1 .. m)-1+eps3: g[4*n+1] := -add(p[i]*q[i], i = 1 .. m)-1-eps3: for i from 1 to m do g[i+4*n+1] := -q[i] end do: for i to m do g[i+m+4*n+1] := q[i]-lambda end do: gradgx := 0: gradgq := 0: for i from 1 to ng do for j from 1 to 2*n do gradgx[i, j] := diff(g[i], x[j]) end do: end do: 24 for i from 1 to ng do for j from 1 to m do gradgq[i, j] := diff(g[i], q[j]) end do: end do: This section constructs the slackness structures. e := Vector(ng, 1): s := Vector(ng, symbol = si): z := Vector(ng, symbol = zi): S :=DiagonalMatrix(s): Z := DiagonalMatrix(z): This section initializes the variable and parameter vectors. x := Vector(2*n, symbol = xs): q := Vector(m, symbol = qs): p :=Vector(m, symbol = ps): W := Vector(m, symbol = ws): G := Vector(m,symbol = gs): t := Vector(n, symbol = ts): M := Vector(n, symbol = ms): chi := convert([x, q, s, z], Vector): This section constructs the Lagrangian and its Hessian matrix. F :=convert([gradfx+(VectorCalculus[DotProduct])(Transpose(gradgx), z), gradfq-(VectorCalculus[DotProduct])(Transpose(gradgq), z), (VectorCalculus[DotProduct])((VectorCalculus[DotProduct])(Z, S), e)-mu*e, g+s], Vector): DF := 0: for i from 1 to 2*n+m+2*ng do for j from 1 to 2*n+m+2*ng do DF[i, j] :=diff(F[i], chi[j]) end do: end do: This section inputs the initial values of the variables and the values of the parameters. xinit := (4,3, 2, 1, 0, 1, 1, 1, 1, 1): qinit := (1, 1): 25 sinit := (.1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1): zinit := (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1): tinit := (1/2, 5/8, 3/4, 7/8,1): pinit := (.5, .5): ginit := (-1, -2): minit := (1,1, 1, 1, 1): winit := (1, 2): tau := .1; mu := .1; rho := .5: lambda := 1.1: eps := .1: eps2 := .1: eps3 := .2: xo := xinit; qo :=qinit; so := sinit; zo := zinit; po := pinit; go := ginit; mo := minit; wo := winit; xs := xinit; qs := qinit; si := sinit; zi := zinit; ps := pinit; gs := ginit; ms := minit; ws := winit; ts := tinit: The following section contains the executable code. i := 0; j := 0 normF:=Norm(F,2): while (normF > mu and j < 40) do printf(” Inner loop: #Iteration = %g /n”,j); printf(” - Solve Linear System (11) ...”); d := LinearSolve(DF, -Transpose(F)): printf(”doneN”); printf(” - Update Params ...”); alphaS:=min(seq(select(type,-s[k]/d[2*n+m+k],positive), k = 1 .. Dimension(s))); alphaZ:=min(seq(select(type,-z[k]/d[2*n+m+ng+k],positive), k = 1 .. Dimension(z))); alphamax:=min(alphaS,alphaZ): alphamax:=min(tau*alphamax,1); printf(”done/n”); chiold := chi; chinew := chiold+alphamax*d; xs := chinew[1 .. 2*n]: ys := chinew[2*n+1 .. 2*n+m]: si := chinew[2*n+m+1 .. 2*n+m+ng]: zi := chinew[2*n+m+ng+1 .. 2*n+m+2*ng]: normF:=Norm(F,2); printf(”doneN”); j:=j+1; end do: 26 References [1] Armstrong, M.: Multiproduct Nonlinear Pricing, Econometrica, 64, 51-75, 1996. [2] Barrieu, P. & N. El Karoui: Optimal Design of Derivatives in Illiquid Framework, Quantitative Finance, 2, 1-8, 2005. [3] Barrieu, P. & N. El Karoui: Inf-convolution of risk measures and optimal risk transfer, Finance and Stochastics, 9, 269-298, 2005. [4] Bäuerle, N. & A. Müller: Stochastic Orders and Risk Measures: Consistency and Bounds, Insurance: Mathematics & Economics,38, 132-148, 2006. [5] Becherer, D.: Utility indifference Hedging and Valuation via Reaction Diffusion Systems, Proceedings of the Royal Society, Series A, 460, 27-51, 2004. [6] Becherer, D.: Bounded Solutions to Backward SDE’s with Jumps for Utility Optimization and Indifference Hedging, Annals of Applied Probability, to appear. [7] Carlier, G., Ekeland, I & N. Touzi: Optimal Derivatives Design for Mean-Variance Agents under Adverse Selection, Preprint, 2006. [8] Cheridito, P. & L. Tianhui: Monetary Risk Measures on Maximal Subspaces Of Orlicz Classes, Preprint, 2006. [9] Davis, M.: Pricing Weather Derivatives by Marginal Value, Quantitative Finance, 1, 305–308, 2001. [10] Ekeland, I., Témam, R., Convex Analysis and Variational Problems, Classics in Applied Mathematics, 28, SIAM, 1976. [11] Filipović, D. & M. Kupper: Equilibrium and Optimality for Monetary Utility Functions under Constraints, Preprint, 2006. [12] Föllmer, H. & A. Schied: Stochastic Finance. An Introduction in Discrete Time, de Gruyter Studies in Mathematics, 27, 2004. [13] Guesnerie, R.: A contribution to the Pure Theory of Taxation, Econometrica, 49, 33-64, 1995. [14] Horst U. & M. Müller: On the Spanning Property of Risk Bonds Priced by Equilibrium, Mathematics of Operations Research, to appear. [15] Horst U., Pirvu, T. & G. Nunes dos Reis: On Securitization, Market Completion and Equilibrium Risk Transfer, Working Paper, 2007. 27 [16] Hu, Y., Imkeller, P. & M. Müller: Market Completion and Partial Equilibrium, International Journal of Theoretical & Applied Finance, to appear. [17] Jouini, E., Schachermeyer, W. & N. Touzi: Law Invariant Risk Measures have the Fatou Property, Advances in Mathematical Economics 9, 49-71, 2006. [18] Mussa M. & S. Rosen: Monopoly and Product Quality, Journal of Economic Theory, 18, 301-317, 1978. [19] Rochet, J.-C. & P. Choné: Iroining, Sweeping and Multidimensional Screening, Econometrica,66, 783-826, 1988. [20] Zakovic, S. & C. Pantelides: An Interior Point Algorithm for Computing Saddle Points of Constrainde Continuous Minimax, Annals of Operations Research, 99, 59-77, 2000. 28
5cs.CE
Experience-based Optimization: A Coevolutionary Approach arXiv:1703.09865v1 [cs.NE] 29 Mar 2017 Shengcai Liua , Ke Tanga,∗, Xin Yaob a USTC-Birmingham Joint Research Institute in Intelligent Computation and Its Applications (UBRI), School of Computer Science and Technology, University of Science and Technology of China, Hefei, Anhui, China b Department of Computer Science and Engineering, Southern University of Science and Technology, Shenzhen, China Abstract This paper studies improving solvers based on their past solving experiences, and focuses on improving solvers by offline training. Specifically, the key issues of offline training methods are discussed, and research belonging to this category but from different areas are reviewed in a unified framework. Exsiting training methods generally adopt a two-stage strategy in which selecting the training instances and training instances are treated in two independent phases. This paper proposes a new training method, dubbed LiangYi, which addresses these two issues simultaneously. LiangYi includes a training module for a population-based solver and an instance sampling module for updating the training instances. The idea behind LiangYi is to promote the population-based solver by training it (with the training module) to improve its performance on those instances (discovered by the sampling module) on which it performs badly, while keeping the good performances obtained by it on previous instances. An instantiation of LiangYi on the Travelling Salesman Problem is also proposed. Empirical results on a huge testing set containing 10000 instances showed LiangYi could train solvers that perform significantly better than the solvers trained by other state-of-the-art training method. Moreover, empirical investigation of the be∗ Corresponding author Email addresses: [email protected] (Shengcai Liu), [email protected] (Ke Tang), [email protected] (Xin Yao) Preprint submitted to Journal of LATEX Templates March 30, 2017 haviours of LiangYi confirmed it was able to continuously improve the solver through training. Keywords: experience, combinatorial optimization, offline training, coevolution, dynamic sampling, parallel solvers 1. Introduction Hard optimization problems (e.g., NP-hard problems) are ubiquitous in AI research and real-world applications. To tackle them, numerous problem solvers have been proposed over the last few decades [? ]. In general, such a solver is designed for a certain problem domain rather than a single instance, because when used in practice, it usually needs to solve many different instances belonging to that domain. Besides, many of such problem solvers are heuristic methods, the performance (e.g., time complexity required to obtain the optimal solution) of which can hardly be rigorously proved. As a result, the development of these solvers typically involves repeatedly testing it against a number of problem instances and adjusting it based on the testing results [? ]. Given that both the design and the applications of a solver would involve many problem instances, a natural question is whether a solver could leverage on the experience acquired from solving previous problem instances to grow/enhance its capacity in solving new coming problem instances. For the sake of brevity, a solver whose performance can improve as it solves more and more problem instances is termed as an Experience-based Optimizer (EBO) in this work. The intuitions behind EBO are two-fold. First, any human expert in a specific domain starts as a novice and his/her path to an expert mainly relies on the gradual accumulation of problem-solving experience in this domain. Second, exploiting past experience to facilitate the solving of new problems, from a more technical point of view, concerns the generalization of past experience, which lies in the heart of AI research, particularly the machine learning sub-area. The past few decades have witnessed great progress on this issue, while most successes 2 were achieved on building a learner that can correctly map an input signal (e.g., an image) to a predefined output (e.g., a label). It is interesting to ask whether similar idea could be developed to encompass more complex problem such as NP-hard optimization problems, which may introduce new challenges as the desired output will no longer be a label (or other types of variables), but a solution to the optimization problem. EBO could offer three advantages in practice. First, it enables an automated process analogous to life-long learning of we human beings and thus alleviate the tedious step-by-step fine-tuning or upgrade work that is now mostly done by human experts. Second, as an EBO can improve its performance automatically, it would be able to better exploit nowadays high-performance computing facilities to generate and test much more problem instances than a domain expert can do manually, such that the risk of over-tuning the solver to a small set of problem instances can be reduced. Finally, the underlying properties of realworld hard optimization problem instances, even if they are from exactly the same problem class, may change over time. Since EBO dynamically updates itself when solving more and more problem instances, it would better fit the changing world. Analogous to many machine learning techniques, an EBO may run in two manners, i.e., the offline and online modes. For the offline mode, a set of problem instances is fed to the EBO at a time and the solver is updated after collecting the solutions it obtained on all the instances. For the online mode, problem instances are fed to EBO one at a time and the solver is updated immediately after solving an instance. Being conceptually different, the offline mode might play a more important role in EBO since a set of training instances are usually available when designing a solver. On comparison, the online mode is more likely to occur after the EBO is deployed in a real-world application. Even in this case, offline mode could also be adopted since EBO simply needs to postpone its update until collecting more instances. For these considerations, we focus on the offline mode as the first step to investigate EBO. Specifically, this work consists of three main parts, as summarized below: 3 (1) An overview on the key issues of EBO: In the literature, there have been several pioneer attempts to design mechanisms that enhance a solver based on past experience. For examples, Transfer methods [? ? ? ], as the name implies, transfer the useful information extracted from solved instances to unsolved problem instances. Automatic algorithm configuration [? ? ], Portfolio-based algorithm selection [? ? ? ], and Automatic portfolio construction [? ? ? ? ] seek to identify better parameter settings, algorithm selectors, and portfolios of algorithms, respectively, based on historical data. Although all these methods are within the scope of EBO and thus relevant to one another, they were developed through independent paths and have never been discussed in a unified context. We first bring together the existing literature on the offline scenario of EBO, and review them under the unified umbrella of EBO, so as to make the key issues for EBO clearer. (2) A new offline training approach for EBO. A (and probably the most fundamental) form of EBO is to train it with many instances of the problem of interests, so as to obtain a well-developed solver before deployment. This scenario involves at least two questions, i.e., where comes the training instances and how the solver is adapted (trained) to the training instances. These two issues were usually treated through two independent phases and seldom addressed simultaneously in the literature. We argue that they are inter-correlated and propose a co-evolutionary framework, namely LiangYi to address them as a whole. (3) A case study of LiangYi on Travelling Salesman Problem (TSP). To assess the potential of LiangYi, a specific instantiation of it is implemented based on the Chained Lin-Kernighan (CLK) algorithm for the TSP. Empirical studies are conducted to compare LiangYi to other state-of-the-art methods for fine-tuning CLK algorithm, as well as to investigate the properties of LiangYi. The rest of this paper is structured as follows. Section 2 first gives a definition 4 of the offline training in EBO and presents the key issues for describing the offline training methods, and then review the existing methods. Section 3 presents the approach LiangYi. Section 4 instantiates LiangYi on the TSP and reports the empirical results. Section 5 concludes the paper and outlines directions for future research. 2. Offline Training Methods in EBO Given an optimization task T and a performance metric m, the training in EBO is defined as making a solver s improve at optimization task T with respect to performance metric m through experience E. This definition borrows some basic concepts (i.e., T , m, E) from the definition of machine learning by Mitchell [? ], yet each of them has a concrete meaning here. Specifically, the optimization task T is conceptually an instance set containing all the target instances to which the output solver is expected to be applied. The performance metric m is userspecified and it is often related to the computational resources consumed by the solver (such as runtime or memory) or the quality of the solution found. Basically, the experience E that is produced in the training is the processes of the solver s solving training instances. To improve the solver s at task T , a training method must consider two things: How to use the solver s and the training instances to produce useful experience and how to exploit the experience so as to enhance the solver s. Generally, a solver s is comprised of multiple different parts (for example, a search-based solver includes at least an initialization module and a search operator). It is conceivable that if the solver s is improved by the training, some parts of s are necessarily changed during the training process. Based on these analyses, we consider that an offline training method in EBO consists of three essential parts: • the form of the solver being trained; • the settings of the training instances; 5 • the training algorithm that manipulates the solver and the training instances to produce experience, and exploits the experience to improve the solver. With this framework, we can describe offline training methods in EBO in a unified way. In the combinatorial optimization field, there have been various attempts by different communities to obtain solvers through training ways. The next few sections review these researches with the presented framework in turn. 2.1. Automatic Algorithm Configuration Methods The first class of methods are automatic algorithm configuration (AAC) methods [? ? ]. AAC methods improve the solver (a parameterized algorithm) at the optimization task by finding parameter values under which the solver achieves high performance on the target instances. Specifically, AAC methods adopt a two-stage strategy. They first build a training set containing the training instances that are representative of the target instances, and then run the training algorithms to find high-performance parameter values on the training set. Due to the similarity between the training instances and the target instances, the found parameter configurations are expected to perform well on the target instances as well. A number of efficient methods have been developed in the field of AAC, such as CALIBRA [? ], ParamILS [? ], GGA [? ], SMAC [? ] and irace [? ]. With the framework presented previously, AAC methods are expressed as follows: • The solver s being trained is a parameterized algorithm. 1 • The efficacy of AAC methods depends greatly on the selection of the training instances, that is, the training instances should represent the target 1 Although there may be some significant differences between the parameterized algorithms (in the aspects such as the types of the parameters, or the number of the parameters) that different AAC methods can handle, we choose to ignore these details because what we want to clarify here is which part of the solver is changed by the training, and the solver description, i.e., a parameterized algorithm, is enough for this purpose. Such a simplicity principle also applies in the reviews of other kinds of methods. 6 instances well so that the optimized performance on the training instances could be favourably transferred to the target instances. The usual practice in setting training instances for AAC methods [? ? ? ? ] is that the training instances are directly selected from some benchmarks, or are randomly generated through some instance generators. Such practice is based on the assumption that the selected benchmarks and generators could represent the target scenarios to which the output solver will be applied to, particularly some practical application scenarios. This assumption however has sparked some controversy [? ? ], which we will discuss more in Section 3. • Essentially, in the training process, AAC methods run training algorithms that keep testing different parameter configurations with the training set and obtaining the testing results. The experience E produced in the training process is actually those tested parameter configurations and the corresponding testing results. The way of exploiting E so as to enhance the solver is straightforward — using the best-performing one as the parameter configuration of the output solver (so the parameter configuration of the solver is the part that is changed by the training). When producing the experience, the training algorithms mainly need to address such a problem: Which parameter configurations should be evaluated? Various AAC methods have proposed different solutions to this problem. Among them the most notable ones include using the experimental design methods to generate candidate parameter configurations, such as the case in CALIBRA [? ], searching the parameter space with a meta-heuristic, such as the case in ParamILS [? ] (which uses an iterated local search) and GGA [? ] (which uses a genetic algorithm), and adopting a model to bias the generation of candidate parameter configurations, such as the case in SMAC [? ] (which builds an explicit regression model to describe the dependence of algorithm performance on parameter settings) and irace [? ] (which builds a probability model over the parameter space). In addition to determining the candidate parameter configurations 7 to be evaluated, some other important issues need to be addressed include which instances are used to evaluate a parameter configuration and when to terminate the evaluation of those poorly performing configurations. A detailed review of these aspects in this area is beyond the scope of this paper and one may refer to [? ? ] for a more comprehensive treatment on the subject. 2.2. Portfolio-based Algorithm Selection Methods The second class of methods are portfolio-based algorithm selection (P AS) methods [? ? ? ]. Although there are different interpretations of this term ”portfolio” in the literature, we use it here to denote a solver that contains several candidate algorithms and always selects one of them when solving a problem instance. To improve the solver (an algorithm portfolio), unlike AAC methods, P AS methods do not change the algorithms that constitute the solver, but build a selector that can accurately select the best from the candidate algorithms for each instance. P AS methods adopt the same two-stage strategy as AAC methods, except that the second-stage training algorithms in P AS methods are used to establish the selector. With the framework presented previously, P AS methods are expressed as follows: • The solver s being trained is an algorithm portfolio. • The training instance settings for P AS methods are the same as AAS methods. • Although the training algorithms adopted by different P AS methods are different in detail, their basic ideas are mostly the same. In the training process, the training algorithms first gather performance data of the candidate algorithms on the training instances, and then build an algorithm selector based on the gathered data. The experience E produced in the training is the performance data, which is obtained by running each candidate algorithm on all training instances. The exploitation of E is carried out in this way: First suitable features that characterize problem 8 instances are identified, and then the feature values of training instances are computed; Once each training instance is represented by a vector of feature values, the performance data is transformed into a set of training data, and based on these training data, machine learning techniques are used to learn a mapping from instance features to algorithms. This mapping is exactly the algorithm selector that will be used in the output portfolio (so the algorithm selector of the solver is the part that is changed by the training). Various P AS methods build different models to do the mapping (selection), such as regression models [? ? ? ? ? ? ] (so-called empirical performance models), classification models [? ? ? ? ? ? ] and ranking models [? ]. 2 For additional information one may refer to [? ] which presents a survey of many approaches for algorithm selection from crossdisciplinary perspectives and [? ] which presents a survey focusing on the contributions made in the area of combinatorial search problems. 2.3. Automatic Portfolio Construction Methods The third class of methods are automatic portfolio construction (AP C) methods, which seek to automatically build an algorithm portfolio based on a parameterized algorithm from scratch. An AP C method can be seen as a combination of an AAC method and a P AS method, that is, AP C methods simultaneously change the member algorithms and build the algorithm selectors. There are two representative methods, dubbed Hydra [? ? ] and ISAC [? ? ], of this category. Another class of portfolio construction methods, called automatic parallel portfolio construction (AP P C) methods, differ from AP C methods in that they seek to construct a parallel algorithm portfolio that runs all candidate algorithms in parallel when solving an instance. In other words, AP P C methods also change the member algorithms of the solver, which makes them closely 2 Although many of the methods cited here are not originally proposed for combinatorial optimization problems, the ideas behind them are very general and apply to the combinatorial optimization problems as well. 9 related to AAC methods, but do not involve any algorithm selection. The representative methods of this category is ParHydra [? ]. Like AAC methods and P AS methods, both AP C methods and AP P C methods also adopt a two-stage strategy. With the framework presented previously, AP C methods and AP P C methods are expressed as follows: • The solver s being trained by AP C methods is an algorithm portfolio, while the solver s being trained by AP P C methods is a parallel algorithm portfolio. • The training instance settings for AP C methods and AP P C methods are the same as AAC methods. • During the training process, AP C methods call an AAC method and a P AS method as subroutines, while AP P C methods only call an AAC method as a subroutine. Thus the experience collection and exploitation in AP C methods and AP P C methods are done by their respective subroutines. Different AP C methods mainly differ in how they specifically arrange the calls of the AAC algorithm and the P AS algorithm. Hydra [? ] iteratively runs them to build the portfolio. In the first iteration, it uses the AAC algorithm to identify a parameter configuration with the best overall performance on the training set, and in each subsequent iteration, it uses the AAC algorithm to find a parameter configuration that maximizes marginal performance contribution across the configurations identified in the previous iterations. These marginal contributions are calculated relative to the current algorithm selector, which is built by the P AS algortihm. A later version of Hydra [? ] aims to find multiple algorithm configurations at each iteration to speed up the training process. Unlike Hydra, ISAC [? ] runs the P AS algorithm and the AAC algorithm sequentially. It first uses a clustering algorithm (the P AS algorithm) to divide training instances into clusters based on normalized instance features, thus building an algo- 10 rithm selector that is actually a 1-Nearest Neighbor model (this means at runtime, for each instance the nearest cluster is determined and the corresponding algorithm is invoked). Then ISAC applies the AAC algorithm to find a good algorithm configuration for each cluster. The later version of ISAC [? ] extends ISAC by using the AAC algorithm on a set of different parameterized algorithms to find a good algorithm configuration for each instance cluster. The representative AP P C method ParHydra [? ], like Hydra, also calls the AAC algorithm iteratively. In each iteration ParHydra aims to find an algorithm configuration that maximizes marginal contribution. Unlike Hydra, ParHydra has no P AS algorithm involved and the marginal contribution is calculated relative to the current portfolio running in parallel. A variant of ParHydra, dubbed ParHydrab , which is also proposed by [? ], extends ParHydra by using the AAC algorithm on a set of different parameterized algorithms to identify an algorithm configuration in each iteration. 2.4. Transfer Methods The last class of methods are transfer methods, which explicitly extract useful information from solving processes of the training instances, and use it to improve the performance of the solver on the target instances. The biggest difference between transfer methods and the methods reviewd above is that the formaer collect experience based on every single instance, while the latetr collect based on a set of instances. Recall that AAC methods run the candidate algorithms on a set of instances to evaluate them, and P AS methods run the member algorithms on all training instances to collect the training data. On comparasion, transfer methods extract information from each individual training instance, and the extraction of different instances is independent of each other. Two specific transfer methods, dubbed XSTAGE [? ] and MEMETrans 11 [? ], are reviewed here 3 . Both of them enhance search-based solvers by introducing high-quality solutions during the solving processes. With the framework presented previously, they are expressed as: • The solver s being trained by XSTAGE is a multi-restart local search algorithm in which a value function is used to determine the starting point for each local search process. The solvers s being trained by MEMETrans are search-based meta-heuristics. • XSTAGE collects training instances and target instances from the same benchmark, implicitly assuming these instances are similar enough to make the transfer useful. MEMETrans collects training instances and target instances from multiple heterogeneous benchmarks, and uses an instance similarity measure to determine given a target instance, which training instances will be used. • Both XSTAGE and MEMETrans first run the solvers to solve the training instances, producing the experience that is actually the solving processes of the training instances. They differ in the exploitation of the experience. XSTAGE extracts a value functions from the solving process of each training instance, and combine all of them into one value function that determines starting solution for the solver. MEMETrans learns a mapping from each solved training instance to corresponding optimal solution, and then combines all of them to be an initialization module that helps generate high-quality initial solutions for the solver. 3. LiangYi The two main issues of offline training are selecting the training instances and training the solvers. The two-stage strategy, which is widely adopted by 3 In the paper [? ] that proposed XSTAGE, the term XSTAGE is used to denote the composition of the training method and the solver. We use XSTAGE here only to denote the training method. The term MEMETrans is created by us to denote the transfer method proposed by [? ] since the paper does not give a term for this method. 12 existing training methods such as AAC methods [? ? ? ? ? ], P AS methods [? ? ? ? ? ? ? ? ? ? ? ? ? ], AP C methods [? ? ? ? ? ] and transfer methods [? ? ], treat them in two independent phases. However, intrinsically, these two issues are correlated. From the perspective of developing solvers, the greatest chance of the solver getting improved is on those problem instances which the current solver cannot solve well 4 . Thus those hard instances for the solver are best suited as the training instances. On the other hand, during the training process, the solver is being adapted to the training instances; thereby as the training proceeds, instances that are previously appropriate for the solver may not be appropriate any more, in which case fixing the training instances (as two-stage strategy methods do) is actually not helpful in improving the solver, but will result in the waste of computing resources. A better strategy is to dynamically changing the training instances during the training process to keep them always appropriate (hard) for the solver, so that the solver can be continuously improved. As aforementioned, usually the training instances for two-stage methods are directly selected from some benchmarks [? ? ], or are randomly generated through some instance generators [? ? ? ? ? ? ? ? ? ? ], based on an assumption that the benchmarks and generators could represent the target scenarios to which the solver is expected to be applied. However, such assumption is not always tenable. On the contrary, in many cases, the commonly studied benchmark instances and randomly generated instances lack diversity, are too simple and rarely resemble real-world instances [? ? ]. Such risks could be avoided by dynamically changing the training instances. First, this strategy selects training instances that are never easy for the solver. Second, this strategy keeps changing the training instances, which naturally introduces the diversity. Based on the above considerations, we propose a new training method, 4 This is also the key idea behind Hydra [? ? ], in which the training instances are given different importance according to their hardness to the solver. However, such adjustment of instance importance is still within a fixed training set. 13 dubbed LiangYi 5 . Basically, LiangYi is a competitive co-evolutionary [? ] framework that alternately trains the solver and searches for new training instances. It maintains a set of algorithms and a set of instances, and each set strives to improve itself against the other during the evolutionary process. The details of this framework are elaborated below. 3.1. Design Principles 3.1.1. Basic Solver The form of the solver being trained by LiangYi is a parallel portfolio that runs all candidate algorithms in parallel when solving an instance 6 . In the coevolutionary framework, the parallel portfolio is called an algorithm population. The reason for choosing an algorithm population other than a single algorithm as the solver is simple: An algorithm population has the potential to achieve better overall performance than a single algorithm [? ? ? ? ], since it is often the case that for a problem domain there is no single best algorithm for all possible instances, but different algorithms perform well on different problem instances. 3.1.2. General Framework Overall LiangYi consists of two components — The first component is a training module for training the solver, and the second component is a sampling module which samples the target instance space for updating the training instances. These two modules are coupled in a co-evolutionary framework. Specifically, LiangYi maintains two populations in which one population is an algorithm population (the solver) and the other is an instance population (the 5 The name ”LiangYi” comes from the Taoism of Chinese philosophy. Generally, it means two opposite elements of the world that interact and co-evolve with each other. 6 Employing parallel solvers to problem instances is an emerging area in training solvers [? ]. Note that running all algorithms in parallel is different from an algorithm portfolio [? ? ? ], which typically involves some mechanism (e.g., selection [? ? ] or scheduling [? ]) to allocate computational resource to different algorithms. Running multiple algorithms in parallel does not require any resource allocation as all involved algorithms are assigned with the same amount of resource. This may lead to the waste of resource to some extent but can keep the implementation simple. 14 training set). The training module and the sampling module are as two subprocedures that are performed alternatively by LiangYi to train the algorithm population and to adjust the instance population, respectively. From the perspective of evolution, LiangYi is a process in which two populations are evolved alternatively. At each iteration, LiangYi first evolves the algorithm population (using the training module) to improve the performance of the algorithm population on the instance population while keeping the good performances obtained by the algorithm population in previous iterations, and then evolves the instance population (using the sampling module) to discover and include those instances that cannot be solved well by the algorithm population, and then enters the next iteration. Intuitively, if we consider an instance in the target instance space ”covered” by a solver as it can be solved well by the solver, the essence of LiangYi is to enlarge the algorithm population’s coverage on the target instance space by a) making the algorithm population cover the area that has not been covered yet and b) keeping the algorithm population covering the area that has already been covered. Figure 1 gives an intuitive visual example. In the example the algorithm population before training contains member algorithms that are neither good nor complementary, and after training, the algorithm population obtain new member algorithms that are both individually better and more complementary, which enlarges the coverage of the algorithm population a lot on the basis of the original one. 3.2. Implementation Details For the sake of brevity, henceforth we use abbreviations for the frequently used terms. All the used abbreviations and corresponding terms are listed in Table 1. The pseudo code of LiangYi is outlined in Algorithm Framework 1. LiangYi first randomly initializes AP as AP1 and IP as IP1 (Lines 1-2) and then enters the iteration in which AP and IP are evolved alternatively (Lines 4-8). During the k-th iteration, LiangYi first evolves AP from APk to APk+1 , then evolves 15 Coverage after training Coverage before training Training by CoEA Target Instance Space Target Instance Space Figure 1: An example of LiangYi enlarging the coverage of the algorithm population on the target instance space. The target instance space is the solid square. The algorithm population contains 3 member algorithms. The coverage of each algorithm on the target insatnce space is indicated by a black circle. Table 1: Aberrations and corresponding terms AP IP APk IPk alg ins EvolveAlg EvolveIns NAP NIP paramsAP paramsIP paramsR P (solver, instanceset) Aggr() M fAP (alg) fIP (ins) Algorithm population Instance population Algorithm population at the initial stage of the k-th iteration of LiangYi Algorithm population at the initial stage of the k-th iteration of LiangYi An algorithm belonging to the algorithm population An instance belonging to the instance population Training module of LiangYi Sampling module of LiangYi Number of algorithms in algorithm population Number of instances in instance population Parameter set that controls training module Parameter set that controls sampling module Parameter set that controls RemoveW orst procedure Performance of the solver on the instance set Aggregate function Performance matrix of algorithm population on instance population Fitness of algorithm alg Fitness of instance Ins 16 IP from IPk to IPk+1 . After the k-th iteration, LiangYi enters the (k + 1)th iteration with AP as APk+1 and IP as IPk+1 . Finally, when LiangYi is terminated, the AP is returned as the output solver (Line 9). Algorithm Framework 1: LiangYi(NAP , NIP , paramsAP , paramsIP ) Input: Number of algorithms in AP , NAP , number of instances in IP , NIP , set of the parameters which control EvolveAlg, paramsAP , set of the parameters which control Evolveins, paramsIP Output: Algorithm population APk 1. AP1 ← Randomly generate an algorithm population with NAP algorithms 2. IP1 ← Randomly generate an instance population with NIP instances 3. k ← 1 4. while not LiangY iT ermination() do 5. APk+1 ← EvolveAlg(APk , IPk , k, paramsAP ) 6. IPk+1 ← EvolveIns(APk+1 , IPk , paramsIP ) 7. k ←k+1 8. end while 9. return APk The training module and the sampling module in LiangYi are implemented as two evolutionary procedures EvolveAlg and EvolveIns, respectively. In general, any search method can be used in these two procedure. In this work, evolutionary algorithms (EAs) are employed as the off-the-shelf tools, because EAs are directly suitable for handling populations (of either algorithms or instances) and are less restricted by the properties of objective functions [? ] (in comparison to other search methods such as gradient descent that requires differentiable objective functions). Note that, in the process of LiangYi, when training algorithm population or adjusting the instance population, the objective functions are a priori unknown and are changing in every iteration, so it is a must that the two modules are able to cope with whatever objective landscape encountered. The behaviors of EvolveAlg and EvolveIns are controlled by parameter sets paramsAP and paramsIP , respectively. 3.2.1. Preliminaries Now we address three issues before going into the details of EvolveAlg and EvolveIns. First of all, we explain how algorithms and instances are repre17 sented. Generally, when applying EAs, the choice of individual representation would determine which genetic operators are applicable. In this paper. a fixedsize linear integer representation is chosen for both algorithms and instances, namely, each algorithm and each instance is represented by an array of integers. Although such representation might restrict the application scope of LiangYi, it makes simple genetic operators [? ] (e.g., uniform crossover and uniform mutation) directly applicable without any customization. For specific types of algorithms and problems, more complex representations (e.g., tree-based representation) and corresponding genetic operators are needed, which will be a subject of future research. The second issue that needs to be addressed is to define the algorithms in AP . Similar with automatic portfolio construction methods (see Section 2.3) , LiangYi builds solver (the algorithm population) based on a parameterized algorithm. In other words, each algorithm in AP is actually a parameter configuration which is a sample of the configuration space consisting of all possible configurations of the parameterized algorithm. The last issue that needs to be addressed is how to measure performance of AP . For simplicity henceforth we use P (solver, instance set) to denote the performance of a solver on the instance set according to a given performance metric m, in which the solver could be a single algorithm or an algorithm population and the instance set could be a single instance or an instance population. Since a population-based solver runs all member algorithms in parallel when solving an instance, the performance of AP on an instance ins is the best performance achieved by its member algorithms on ins (we assume a larger value is better for m without loss of generality), i.e, P (AP, ins) = max P (alg, ins). alg∈AP (1) The performance of AP on IP is an aggregated value of the performance of AP 18 on each instance of IP , i.e., P (AP, IP ) = Aggr (P (AP, ins)) (2) ins∈IP where Aggr() is an aggregate function. The performance metric m and the aggregate function Aggr() are user-specified. 3.2.2. Evolution of the Algorithm Population The pseudo code of EvolveAlg is shown in Procedure 2. First of all, APk is Procedure 2: EvolveAlg(APk , IPk , k, paramsAP ) Memory is a global cache which stores the final AP and final performance matrix M of EvolveAlg of each iteration of LiangYi Input: Algorithm population APk , instance population IPk , number of current iteration of LiangYi, k, parameter set paramsAP containing: crossover probability croalg , mutation rate mualg , set of parameters which control RemoveW orst, paramsR Output: Algorithm population APk+1 1. M ← Test APk on IPk 2. while not EvolveAlgT ermination() do 3. a1 , a2 ← Randomly select two individuals from APk 4. anew ← Use a1 , a2 to generate an offspring by uniform crossover with probability croalg and uniform mutation with rate mualg 5. Mnew ← Test anew on IPk 6. APk0 ← APk ∪ {anew } 7. M 0 ← Concatenate M and Mnew 8. APk , M ← RemoveW orst(APk0 , M 0 , k, paramsR ) 9. end while 10. Add APk and M to M emory 11. APk+1 ← APk 12. return APk+1 tested on IPk and the result is represented by a NAP ×NIP matrix M (NAP and NIP are the number of the algorithms in AP and the number of the instances in IP , respectively), in which each row corresponds to an algorithm in APk and each column corresponds to an instance in IPk , so peach entry in M is the performance of the corresponding algorithm in APk on the corresponding instance in IPk (Line 1). Then at each generation, two individuals are randomly selected from APk and an offspring is generated by using uniform crossover and 19 mutation [? ] (Lines 3-4). The generated algorithm anew is then tested on IPk and the result is represented by a 1 × NIP matrix Mnew (Line 5). The last step is to decide the survivors of this generation (Lines 6-8). Together with all the algorithms in APk , anew is put into a temporary algorithm population AP 0 . The corresponding performance matrix M 0 to AP 0 , of which the size is (NAP + 1) × NIP , is constructed by concatenating M and Mnew . Then the procedure RemoveW orst is run to decide which algorithm in AP 0 will be removed. Basically, RemoveW orst firstly calculates the fitness of each algorithm in AP 0 and then selects the algorithm with the lowest fitness to be removed. The core of RemoveW orst is its fitness evaluation. The idea is that an algorithm will be preferred only if it contributes to the algorithm population, and the more it contributes, the more it is preferred. The contribution of a member algorithm is actually the performance improvement it brings to the population, which can be calculated as the population’s performance loss caused by removing the algorithm. Formally, let C(AP, IP, alg) denote the contribution of algorithm alg to the performance of AP on IP . If |AP | > 1, which means AP contains other algorithms besides alg, C(AP, IP, alg) is calculated via Equation (3): C(AP, IP, alg) = |P (AP, IP ) − P (AP − {alg}, IP )|, (3) where P (AP, IP ) and P (AP − {alg}, IP ) are calculated via Equation (2). If |AP | = 1, which means AP only contains one algorithm (i.e., alg), then removing alg from AP will cause complete performance loss on IP . In this case, C(AP, IP, alg) is calculated via Equation (4): C(AP, IP, alg) = α|P (AP, IP )|, (4) where the parameter α > 0. Based on Equation (4), for each member algorithm alg of the temporary algorithm population APk0 , the performance contribution on instance popula- 20 tion IPk is C(APk0 , IPk , alg). A high contribution indicates that alg should be reserved to next generation. However, directly using C(APk0 , IPk , alg) as the fitness of alg is not appropriate. As aforementioned (see Section 3.1), the evolution of APk should not only improve the performance of APk on IPk , but also keep the good performances obtained in previous iterations (on IP1 , ..., IPk−1 ). Using C(APk0 , IPk , alg) to evaluate alg only considers the first target. Hence the fitness of alg is calculated based on two types of contributions: The first one is the current performance contribution, i.e., C(APk0 , IPk , alg), and the second one is the historical performance contribution of alg on IP1 , ..., IPk−1 (if there are). To calculate the historical performance contribution of a member algorithm, the concept age is introduced to describe how long the algorithm has been in AP . Suppose a member algorithm alg was added to AP in the j-th iteration of LiangYi (and now is in the k-th iteration), the age of alg is k − j. The performances of alg on IPj ,...,IPk are known because alg has been tested on them in corresponding iterations 7 . To calculate the historical performance contribution of alg on IPr (j ≤ r ≤ k − 1), the algorithms that satisfy the condition age ≥ (k − r) are selected from the temporary algorithm population APk0 (our target algorithm alg is also selected, since its age is k − j, which satisfies the condition) to form a virtual algorithm population virtualAPr . The condition age ≥ (k − r) indicates that these selected algorithms were added to AP during or before the r-th iteration of LiangYi, so they have been tested on IPr . The performances of these algorithms on IPr are represented by a |virtualAPr |×NIP matrix virtualMr . If |virtualAPr | > 1, which means virtualAPr contains other algorithms besides alg, the performance contribution of alg on IPr is calculated 7 Note that the performance contributions of alg on IP ,...,IP 1 j−1 are not considered in this paper because the performances of alg on them are unknown. To obtain these performances, we can store IP1 ,...,IPj−1 and test alg on them. However, this would make the computational cost and the storage cost increase fast over time. 21 via Equation (3): C(virtualAPr , IPr , alg) = |P (virtualAPr , IPr ) − P (virtualAPr − {alg}, IPr )|. If |virtualAPr | = 1 , which means virtualAPr only contains alg, then removing alg from virtualAPr will cause complete loss of performance on IPr . In this case, C(virtualAPr , IPr , alg) is calculated via Equation (4): C(virtualAPr , IPr , alg) = α|P (virtualAPr , IPr )|. Now we have all the performance contributions of alg on IPj ,...,IPk . The fitness of alg, denoted as fAP (alg), is calculated via Equation (5) fAP (alg) = βΣj≤r≤k−1 C(virtualAPr , IPr , alg) + C(APk0 , IPk , alg) k−j+1 (5) where k is the index of the current iteration of pLiangY i, j is the age of alg, and β is a nonnegative parameter. The terms C(virtualAPr , IPr , alg)(j ≤ r ≤ k − 1) are historical performance contributions on IPj ,...,IPk−1 , while C(APk0 , IPk , alg) is the current performance contribution on IPk . Thereby the numerator in the fraction is actually a weighted sum of (k − j + 1) performance contributions, in which the parameter β is used to balance between historical performance contributions(on IP1 , ..., IPk−1 ) and current performance contribution (on IPk ). The pseudo code of RemoveW orst is demonstrated in Procedure 3. First the fitness of each member algorithm in APk0 is calculated (Lines 1-15). Specifically, for an algorithm alg which was added to AP in the j-th iteration of LiangYi, k − j virtual algorithm populations, i.e., virtualAPj , ..., virtualAPk−1 , are constructed (according to the global cache Memory) to calculate its historical performance contributions on IPj , ..., IPk−1 , via Equation (3) or Equation (4) (Lines 2-12). Together with the current performance contribution calculated via Equation (3) (Line 13), the historical contributions are used to calculate the fitness of alg via Equation (5) (Line 14). After the fitness of each algorithm in 22 APk0 has been calculated, the algorithm with the lowest fitness will be removed (Line 16). Procedure 3: RemoveW orst(APk0 , M 0 , k, paramsR ) Input: Temporary algorithm population APk0 , temporary performance matrix M 0 , number of current iteration of LiangYi, k, parameter set paramsR containing α (used in Equation (4)) and β (used in Equation (5)) Output: Algorithm population APk , performance matrix M 1. for each algorithm alg in APk0 do 2. age ← Query M emory for how many iterations alg has been staying 3. j ← k − age 4. for r ← j to k − 1 do 5. V irtualAPr ← Select algorithms which satisfy the condition age ≥ (k − r) (according to M emory) from APk0 to form a virtual algorithm population 6. Mr ← Construct corresponding performance matrix to V irtualAPr according to M emory 7. if |virtualAPr | > 1 then 8. C(virtualAPr , IPr , alg) ← Calculate the algorithm contribution of alg on IPr via Equation (3) 9. else 10. C(virtualAPr , IPr , alg) ← Calculate the algorithm contribution of alg on IPr via Equation (4) 11. end if 12. end for 13. C(APk0 , IPk , alg) ← Calculate the algorithm contribution of alg on IPk via Equation (3) 14. fAP (alg) ← Calculate the fitness of alg via Equation (5) 15. end for 16. APk ← Remove the algorithm with the lowest fitness from APk0 17. M ← Remove the corresponding row in M 0 to the removed algorithm 18. return APk , M 3.2.3. Evolution of the Instance Population As aforementioned (see Section 3.1) the evolution of IP aims at discovering those instances that cannot be solved well by AP ; thus the fitness of an instance in IP is measured by how AP performs on it — the worse the performance, the higher the fitness. The pseudo code of EvolveIns is demonstrated in Procedure 4. First of all, APk+1 is tested on the IPk and the result is represented by a NAP ×NIP matrix 23 M (Line 1), and the fitness of each instance is calculated (Lines 2-4). The fitness of an instance ins, denoted as fIP (ins), is calculated via Equation (6): fIP (ins) = −P (APk+1 , ins), (6) where P (APk+1 , ins) is the performance of APk+1 on instance ins, calculated via Equation (1). At each generation, NIP ∗ re new instances are generated by repeatedly selecting two instances from IPk and creating two offsprings using uniform crossover with probability croins and uniform mutation with rate muins [? ](Lines 6-11). These offsprings are then tested against the algorithm population APk+1 and the fitness of each offspring is calculated (Lines 12-15). At the end of this generation, all instances in IPk and the offsprings are put into a candidate pool and the worst NIP ∗ re instances are removed (Lines 16-19). 4. Case Study: the Travelling Salesman Problem The main purpose of this section is to empirically verify whether LiangYi is an effective method for training solvers. We evaluated LiangYi on the Travelling Salesman Problem (TSP) [? ], one of the most well-known computationally hard optimization problem. Specifically, the symmetric TSP, i.e., the distance between two cities is the same in each opposite direction, with Euclidean distances in a two-dimensional space is considered here. In the remainder of this section, we first give the target scenario (including the optimization task and the performance metric) where LiangYi is applied, and then instantiates LiangYi for the scenario. After that, we first compare LiangYi with other existing training methods, and then we investigate the properties of LiangYi to see whether it is able to perform as expected in design. 4.1. Target Scenario The optimization task T considered here are all TSP instances with problem size equal to 500, i.e., the number of cities equals to 500. The number of the 24 Procedure 4: EvolveIns(APk+1 , IPk , paramsIP ) Input: Algorithm population APk+1 , instance population IPk , parameter set paramsIP containing crossover probability mualg , mutation rate muins and replacement ratio res Output: Instance population IPk+1 1. M ← Test APk+1 on IPk 2. for each instance ins in IPk do 3. fIP (ins) ← Calculate the fitness of ins via Equation (6) 4. end for 5. while not EvolveInsT ermination() do 6. of f springs ← ∅ 7. for i ← 1 to NIP2∗res do 8. ins1 , ins2 ← Select two parents from IPk with tournament selection 9. insnew1 , insnew2 ← Use ins1 , ins2 to generate two offsprings by using uniform crossover with probability croins and uniform mutation with rate muins 10. of f springs ← of f springs ∪ {insnew1 , insnew2 } 11. end for 12. Mof f springs ← Test APk+1 on of f springs 13. for each instance ins in of f springs do 14. fIP (ins) ← Calculate the fitness of ins via Equation (6) 15. end for 16. candidates ← IPk ∪ of f springs 17. Mcandidates ← Concatenate M and Mof f spring 18. IPk ← Remove the worst NIP ∗ re instances from candidates 19. M ← Remove the corresponding columns to those removed instances from Mcandidates 20. end while 21. IPk+1 ← IPk 22. return IPk+1 25 target instances are theoretically infinite. Training solvers on such kind of tasks have not been studied before. This work focuses on optimizing the applicability on the target instances, i.e., the performance metric m is applicability. A solver is said to be applicable to an instance if it can find a good enough solution to this instance within a given time. For TSP, the goodness of a solution sol is measured by the percentage by which the tour length of sol exceeds the tour length of the optimum sol? 8 , abbreviated as PEO(percentage excess optimum): P EO = lengh(sol) − lengh(sol? ) ∗ 100%. lengh(sol? ) With the definition of PEO, given a cut-off time t, a solver is said to be applicable to an instance ins if the P EO of the best solution found by the solver in time t is below a threshold θ. With the definition of the applicability of a solver to a single instance, the applicability of a solver to an instance set is defined as the proportion of the instances to which the solver is applicable. In this paper very radical values for the cut-off time t and the PEO threshold θ are adopted (t = 0.1s and θ = 0.05%) to see whether LiangYi is able to train solvers that can work well under such harsh conditions. 4.2. Instantiating LiangYi In order to instantiate LiangYi for the above scenario, there are several issues to be addressed. The first issue is to specify the performance function P (solver, instance set) used by LiangYi (see Section 3.2.1) so that LiangYi can optimize the applicability appropriately. The performance of an algorithm alg on an instance ins, i.e., P (alg, ins) in Equation (1), is specified as follow: P (alg, ins) =   1, if alg is applicable to ins  0, otherwise. 8 The optimum sol? is obtained using Concorde [? ], a branch-and-cut based exact TSP solver. 26 Table 2: The parameters of the CLK used Parameters Initialization Strategy Perturbation Strategy Search Depth Search Width Backtrack Strategy Parameter Type Categorical Categorical Numerical Numerical Categorical # of Candidate Values 4 4 6 8 14 Intuitively, an algorithm population AP is said to be applicable to an instance ins if any member algorithm of AP is applicable to ins. With P (alg, ins) specified as above, this definition is equivalent to the definition given by Equation (1), namely, AP is applicable to ins if the best member algorithm of AP is applicable to ins. The aggregate function aggr() in Equation (2) is specified as returning mean value of the aggregated terms: P P (AP, IP ) = P (AP, ins) , |IP | ins∈IP which essentially calculates the proportion of the instances to which AP is applicable. The second issue is to choose a parameterized algorithm for LiangYi to build an algorithm population based on it. The choice of the parameterized algorithm in this work is Chained Lin-Kernighan (CLK) [? ]. It is a variant of the LinKernighan heuristic [? ], one of the best heuristics for solving symmetric TSP. CLK chains multiple runs of the Lin-Kernighan algorithm to introduce more robustness in the resulting tour. Each run starts with a perturbed version of the final tour of the previous run. We extended the original implementation of CLK to allow a more comprehensive control on its components. The parameters of the resulting algorithm are summarized in Table 2. To handle the randomness of CLK, we adopt a simple way - fixing the random seed of CLK and turning it into a deterministic algorithm. The third issue is to concretely represent the algorithms and the instances 27 Table 3: The parameter settings of the instantiation of LiangYi for TSP EvolveAlg croalg = 0.6 mualg = 0.6 α=2 β=2 EvolveIns croins = 1 muins = 0.8 res = 0.3 with fixed-size integer arrays (see Section 3.2.1). Each algorithm in AP is represented by a list containing 5 integers, each of which indicates its value for the corresponding parameter. Each instance in IP is represented by a list of 500 (x, y) coordinates on a 106 × 106 grids. The random initialization, uniform crossover, and mutation are implemented as conventional ways for fixed-sizelist based representations [? ]. Specifically, the random initialization works by uniform randomly selecting a value (i.e., two coordinates for the instance, a parameter value for the algorithm) from candidate values for each entry of the individual (the algorithm or the instance). The uniform crossover operates by choosing for each entry of the offspring with equal probability either the value of the entry from the first or the second parent. The mutation consists of replacing the value of each entry of the offspring, with a probability, with uniform randomly chosen one from the candidate values. The last issue is to set the termination conditions and the parameters of LiangYi. The termination condition for LiangYi is the number of iterations reaching 3. In each iteration, procedure EvolveAlg will be run for 500 generations and EvolveIns will be run for 10 generations. The number of algorithms in AP , i.e., NAP , is set to 6, and the number of instances in IP , i.e., NIP , is set to 150. The parameter settings of LiangYi are listed in Table 3. In order to build an algorithm population with complementary algorithms, the diversity between these member algorithms need to be kept on a high level. For this reason, the mutation rate in evolvealg is set to a high value (0.4). For evolveins, it is important to keep the instance population exploring the target instance space instead of stagnating in some local areas, and therefore the mutation rate 28 Procedure 𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬 Procedure 𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬 𝐴𝐴𝐴𝐴1 𝐼𝐼𝐼𝐼1 𝐴𝐴𝐴𝐴2 𝐴𝐴𝐴𝐴2 𝐴𝐴𝐴𝐴2 𝐼𝐼𝐼𝐼1 𝐼𝐼𝐼𝐼2 𝐴𝐴𝐴𝐴3 𝐴𝐴𝐴𝐴3 𝐼𝐼𝐼𝐼2 1 𝐴𝐴𝐴𝐴3 𝐼𝐼𝐼𝐼2 𝐼𝐼𝐼𝐼3 𝐴𝐴𝐴𝐴4 𝐴𝐴𝐴𝐴4 𝐼𝐼𝐼𝐼3 2 # of iterations of CoEA 𝐼𝐼𝐼𝐼3 𝐼𝐼𝐼𝐼4 3 Figure 2: The training process of LiangYi in which AP and IP are evolved alternatively. Dotted rectangle and dashed rectangle represent procedure EvolveAlg and procedure EvolveIns, respectively. in evolveins is also set to a high value (0.7). We applied the instantiation of LiangYi described above to the considered scenario. The training process of LiangYi in which AP and IP are evolved alternatively is depicted in Figure 2. 4.3. Comparative Study In this section we compare LiangYi with other existing training methods in the considered scenario. Since the algorithm population built by LiangYi is actually a parallel portfolio, we chose ParHydra [? ] (see Section 2.3) , the state-of-the-art automatic parallel portfolio construction method, as the method to compare with. 4.3.1. Settings of ParHydra ParHydra accepts a parameterized algorithm to be configured, a set of training instances, and a performance metric to be optimized. For the target scenario considered, the performance metric is applicability. The parameterized algorithm fed to ParHydra is CLK, same as LiangYi. We used two different ways to construct the training sets for ParHydra. The first training set IPrandom 29 was built according to the usual practice for two-stage methods — randomly generating a set of instances. Specifically, each instance in IPrandom was generated by randomly choosing two coordinates for each city on a 106 × 106 grids. The second training set IPtraining was built by collecting the instance populations which were produced by LiangYi and once served as the training instances during the training process, i.e., IPtraining = IP1 ∪ IP2 ∪ IP3 . Since LiangYi produces instance populations as by-products, it is interesting to see, how good these instance populations are as training instances for existing methods like ParHydra. Both sets contain 450 instances. ParHydra is an iterative method, which builds the portfolio from scratch and adds an algorithm to it in each iteration (See Section 2.3). Thus we set the iteration number of ParHydra as 6 to keep in line with LiangYi in terms of algorithm number. At each iteration of ParHydra, 15 copies of ParamILS [? ] were run with different random seeds in parallel to identify an algorithm that maximizes marginal performance contribution across the algorithms identified in the previous iterations. The solvers output by ParHydra based on IPrandom and IPtraining , are denoted as P Hrandom and P HLiangY i respectively. 4.3.2. Experimental Protocol Since LiangYi and ParHydra are both stochastic methods, we ran each comparative method 20 times. Specifically, first we ran LiangYi 20 times. Then we obtained 20 IPtraining from the 20 runs of LiangYi and randomly generated 20 different IPrandom , and then based on each of these 40 training set, we ran ParHydra to obtain a solver. Finally we obtained 20 AP4 (the algorithm population output by LiangYi), 20 P Hrandom and 20 P HLiangY i . In order to adequately test the output solvers on target instance space, we generated a huge testing set, denoted as IPtesting , which contains 10000 TSP instances with the number of cities equal to 500. Specifically, each instance was generated by randomly choosing two coordinates for each city from the interval [0, 106 ). To our knowledge, this is the first time that a testing set of such a large size (10000) is used to test TSP solvers. 30 All of our experiments were carried out on a workstation of a Xeon CPU with 12 cores and 24 threads at 2.50GHz, running Ubuntu Linux 16.04. The runtime requirements in CPU days were as follows: 120 days for CoEA training (including 20 runs); 600 days for ParHydra training (including 20 runs); 4 days for testing. 4.3.3. Experiment Results The averaged testing results of each type of solvers are presented in Table 4. We performed 2-sample t-test to compare the results each type of solvers, considering p-values below 0.05 to be statistically significant. The ranking in Table 4 is AP4 , P HLiangY i , P Hrandom . P HLiangY i obtained better results than P Hrandom , which indicates the training instances produced by LiangYi are more diverse than random generated ones. It is a little surprising to see AP4 obtained better results than P HLiangY i at first sight. Different from AP4 , P HLiangY i was trained based on the whole IPtraining , which was produced by LiangYi iteration by iteration; thus it is expected that P HLiangY i would obtain better results than AP4 on IPtraining (actually, their performances on IPtraining , i.e., P (AP4 , IPtraining ) and P (P HLiangY i , IPtraining ), are 0.6063 and 0.6644). The reason why AP4 obtained better results than P HLiangY i on IPtesting is as follow: The dynamic instance sampling strategy used by LiangYi is actually a filter that only keeps those hard instances for AP to make the training focus on them , which makes the actual coverage of AP on the target instances far greater than its coverage on IPtraining (0.7001 > 0.6063) because those easy target instances which are sampled by EvolveIns and are actually covered by AP are all filtered out. Compared to LiangYi, ParHydra accepts all the training instances and only focuses on the training set. The lack of the instance dynamic sampling makes the performance of the output solver greatly depend on how much the training set can represent the target instance space. 31 Table 4: Averaged performances of AP4 , P Hrandom , P HLiangY i on IPtesting . All results are presented in terms of applicability, i.e., the proportion of the instances to which the solver is applicable. We performed 2-sample t-test to compare their results, considering p-values below 0.05 to be statistically significant. The second row provide the results of the test, where 0 W − D − L0 indicates how many competitors the corresponding solver is superior to, not significantly different from or inferior to. AP4 0.7001 2-0-0 P Hrandom 0.6600 0-0-2 P HLiangY i 0.6719 1-1-0 4.4. Investigating the Properties of LiangYi As aforementioned, the idea behind LiangYi is to optimize the performance of AP on target instances by a) improving its performances on those instances on which it performs badly and b) keeping its good performances on those instances on which it performs well. The main purpose of this section is to investigate whether LiangYi is able to accomplish the two objectives listed above. Specifically, the verification is divided into two parts — the training part and the testing part. In the training part we investigate that, in the training process, whether LiangYi gives satisfactory answers to the following three questions: (1) Whether is procedure evolvealg able to improve the performance of AP on current IP ? (2) Whether is procedure evolveins able to degrade the performance of AP on current IP ? (3) Whether is procedure evolvealg able to keep the performance of AP on previous IP s? The second question indicates whether the evolution of IP is able to discover and include hard-to-solve instances to AP , and the first question indicates whether the evolution of AP is able to improve the performance of AP on the hard instances included in the current IP . The combination of these two checks the whether LiangYi is able to accomplish the first objective. The third question checks whether LiangYi is able to accomplish the second objective. In addition to focusing on the three specific aspects, we also directly check if LiangYi is 32 1 0.9 0.8 Applicability 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.5 1 1.5 2 2.5 3 # of iterations of CoEA Figure 3: The performance of AP on IP at the beginning (EvolveAlg begins), the middle (EvolveAlg ends) and the end (EvolveIns ends) of each iteration of LiangYi. The performances are represented in terms of applicability, i.e., the proportion of the instances to which AP is applicable, and are averaged over 20 runs. able to continuously improve AP in the training part. Specifically, we check whether the performances of AP on IPtraining that are produced in the training are improved by LiangYi. Similarly, in the testing part we also directly check whether the performance of AP at the optimization task is being improved by LiangYi. 4.4.1. Training Part To answer the first question and the second question, the performances of AP on IP during the training process averaged over 20 runs are plotted in Figure 3. The results depicted in Figure 3 clearly show that, at each iteration of LiangYi, EvolveAlg improves the performance of APk on IPk , and evolveins degrades the performance of APk+1 on IPk , which gives positive answers to the first two questions, thus confirming the first aspect of the idea behind LiangYi. The third question is answered in this way: Since procedure evolvealg evolved APk to APk+1 to improve the performance on IPk , we checked whether the improvement from P (APk , IPk ) to P (APk+1 , IPk ), i.e., |P (APk , IPk ) − P (APk+1 , IPk )|, was kept in subsequent iterations of LiangYi. Specifically, 33 Table 5: Performances of APk ,...AP4 on IPk . All the results are presented in terms of applicability, i.e., the proportion of the instances to which AP is applicable, and are averaged over 20 runs. AP1 AP2 AP3 AP4 IP1 0.3800 0.8121 0.7421 0.6867 IP2 IP3 0.1456 0.6590 0.5667 0.1735 0.5654 we tested APk+2 , ..., AP4 on IPk to obtain their performances on IPk , i.e., P (APk+2 , IPk ), ..., P (A4 , IPk ), and calculated the performance drops from P (APk+1 , IPk ) to these performances, i.e., |P (APk+1 , IPk )−P (APk+2 , IPk )|,..., |P (APk+1 , IPk )− P (A4 , IPk )|, then these performance drops were compared to the performance improvement. The averaged performances (over 20 runs) of APk , ..., AP4 on IPk are presented in Table 5. The averaged performance improvement on IP1 is P (AP2 , IP1 ) − P (AP1 , IP1 ) = 0.4321, and the two averaged performance drops on IP1 are P (AP3 , IP1 ) − P (AP2 , IP1 ) = 0.0700 and P (AP4 , IP1 ) − P (AP2 , IP1 ) = 0.1254, so the ratios between the performance drops and the performance improvements on IP1 are 16.20% and 29.02%. Calculated in the same way, the ratio on IP2 is 17.98%. All the ratios between the performance drops and the corresponding performance improvements are below 30%. In order to check whether the performances of AP on IPtraining are improved by LiangYi, the algorithm populations obtained from each iteration of LiangYi, i.e., AP1 , AP2 , AP3 , AP4 , were tested on IPtraining . The testing results averaged over 20 runs are depicted in Figure 4. A constant improvement of the performances of APk on IPtraining , according to the increase of k, is shown. 4.4.2. Testing Part The algorithm population obtained from each iteration of LiangYi, i.e., AP1 , ..., AP4 was tested on IPtesting . The testing results averaged over 20 runs are depicted in Figure 5. Once again, a constant improvement of the performances of APk on IPtesting according to the increase of k is shown. 34 1 0.9 0.8 Applicability 0.7 0.6 0.5 0.4 0.3 0.2 0.1 AP 1 AP 2 AP 3 AP 4 Algorithm population Figure 4: The performances of AP1 , AP2 , AP3 , AP4 on IPtraining . The performances are represented in terms of applicability, i.e., the proportion of the instances to which AP is applicable, and are averaged over 20 runs. 0.7 0.65 Aplicability 0.6 0.55 0.5 0.45 0.4 AP 1 AP 2 AP 3 AP 4 Algorithm population Figure 5: The performances of AP1 , AP2 , AP3 , AP4 on IPtesting . The performances are represented in terms of applicability, i.e., the proportion of the instances to which AP is applicable, and are averaged over 20 runs. 35 5. Conclusion This paper first put forward the concept of Experience-based optimizer (EBO) whose performance can improve as it solves more and more problem instances, and summarized several previous research in a unified context, i.e., offline training of EBO. A new training method, dubbed LiangYi, was proposed. The most novel feature of LiangYi is that, different from existing methods, it addresses selecting training instances and training solvers simultaneously. A specific instantiation of LiangYi on TSP was also proposed. Empirical results showed the advantages of LiangYi in comparison to ParHydra, the state-ofthe-art AP C method, on a huge testing set containing 10000 instances. Moreover, through empirically investigating behaviours of LiangYi, we confirmed that Liangyi is able to continuously improve the solver through training. As discussed in the introduction, EBO is a far more broad direction than merely offline training of problem solvers. Further investigations may include: (1) Further improvements to LiangYi. Diversity preservation scheme, such as speciation [? ] or negatively correlated search [? ] can be introduced into LiangYi to explicitly promote cooperation between different algorithms in AP . Another tack is to use machine learning techniques to accelerate LiangYi. Specifically, regression models and classification models can be used to predict the performances of algorithms in AP or instances in IP , without actually evaluating them, which is vary time-consuming. (2) Online mode of EBO. Situations in which a solver faces a series of different problem instances coming sequentially pose new challenges. For example, the objective in online mode is to maximize the cumulative performances on all the instances. Thus methods designed for this scenario must consider making solvers perform well on current instances and improving solvers for future instances simultaneously. Besides, in a dynamic environment, the underlying properties of instances may change overtime; therefore the solvers may keep detecting the changes of environment and adapt to new instances. 36 (3) Deep understanding of the fundamental issues of EBO is also worthy of exploration. For example, LiangYi actually maintains two adversary sets competing with one another, which is a typical scenario where game theory can be applied. Besides, other more general issues in EBO include the similarity measure between instances, a unified approach to information extraction from solved instances, and theoretical proofs of the usefulness of transmitting information between similar instances. 6. Acknowledgements References 37
9cs.NE
Asymptotically Stable Drift and Minorization for Markov Chains arXiv:1712.08867v1 [math.ST] 24 Dec 2017 with Application to Albert and Chib’s Algorithm Qian Qin and James P. Hobert Department of Statistics University of Florida December 2017 Abstract The use of MCMC algorithms in high dimensional Bayesian problems has become routine. This has spurred so-called convergence complexity analysis, the goal of which is to ascertain how the convergence rate of a Monte Carlo Markov chain scales with sample size, n, and/or number of covariates, p. Recent work suggests that, while often useful for establishing convergence rates when n and p are fixed, techniques based on drift and minorization may not be versatile enough to handle the more delicate task of convergence complexity analysis. This article provides some general ideas for sharpening drift and minorization conditions, particularly in cases where n and/or p are large. The key ideas include developing an appropriately “centered” drift function, and suppressing high-dimensionality in the construction of minorization conditions. These concepts are employed in a thorough convergence complexity analysis of Albert and Chib’s (1993) data augmentation algorithm for the Bayesian probit model. The main result is that the geometric convergence rate of the underlying Markov chain is bounded below 1 both as n → ∞ (with p fixed), and as p → ∞ (with n fixed). Furthermore, the first computable bounds on the total variation distance to stationarity are byproducts of the asymptotic analysis. 1 Introduction Markov chain Monte Carlo (MCMC) has become an indispensable tool in Bayesian analysis, and it is now well known that the ability to utilize an MCMC algorithm in a principled manner (with regard to choosing Key words and phrases. Bayesian probit regression, Convergence complexity, Geometric ergodicity, High dimensional inference, Large p - small n, Markov chain Monte Carlo 1 the Monte Carlo sample size, for example) requires an understanding of the convergence properties of the underlying Markov chain (see, e.g., Flegal et al., 2008). Taking this a step further, in modern high dimensional problems, it is also important to understand how the convergence properties of the chain change as the sample size, n, and/or number of covariates, p, increases. Denote the data (i.e., responses and covariates) by D. If we imagine n or p (or both) increasing, this leads to consideration of a sequence of data sets, {Dj }, and corresponding sequences of posterior distributions and Monte Carlo Markov chains. A natural question to ask is “What can we say about the convergence properties of the Markov chains as j → ∞?” There is currently a great deal of interest in questions like this in the MCMC community (see, e.g. Rajaratnam and Sparks, 2015; Durmus and Moulines, 2016; Johndrow et al., 2016; Yang et al., 2016; Yang and Rosenthal, 2017). Rajaratnam and Sparks (2015) call this the study of convergence complexity, and we will follow their lead. Asymptotic analysis of the convergence properties of a sequence of Markov chains associated with increasingly large finite state spaces has a long history in the computer science literature, dating back at least to Sinclair and Jerrum (1989). While the techniques developed in computer science have been successfully applied to a few problems in statistics (see, e.g. Yang et al., 2016), they are generally not applicable in situations where the state space is high-dimensional and uncountable, which is the norm for Monte Carlo Markov chains in Bayesian statistics. In this paper, we show how methods based on drift and minorization can be used to study the convergence complexity of such Markov chains. Let π : X → [0, ∞) denote an intractable probability density function (pdf), where X ⊂ Rd , and let R Π(·) denote the corresponding probability measure, i.e., for measurable A, Π(A) = A π(x) dx. (More general spaces will be considered later.) Let K(x, ·), x ∈ X, denote the Markov transition function (Mtf) of an irreducible, aperiodic, Harris recurrent Markov chain with invariant probability measure Π. (See Meyn and Tweedie (2012) for definitions.) The chain is called geometrically ergodic if there exist M : X → [0, ∞) and ρ ∈ [0, 1) such that kK m (x, ·) − Π(·)kTV ≤ M (x)ρm for all x ∈ X and all m ∈ N , (1) where k·kTV denotes total variation norm, and K m (x, ·) is the m-step Mtf. The important practical benefits of basing one’s MCMC algorithm on a geometrically ergodic Markov chain have been well-documented by, e.g., Roberts and Rosenthal (1998), Jones and Hobert (2001), Flegal et al. (2008) and Łatuszyński et al. (2013). Define the geometric convergence rate of the chain as  ρ∗ = inf ρ ∈ [0, 1] : (1) holds for some M : X → [0, ∞) . Clearly, the chain is geometrically ergodic if and only if ρ∗ < 1. 2 Establishing the convergence rate of a practically relevant Monte Carlo Markov chain can be quite challenging. A key tool for this purpose has been the technique developed by Rosenthal (1995), which allows for the construction of an upper bound on ρ∗ using drift and minorization conditions. This method, which is described in detail in Section 2, has been used to establish the geometric ergodicity of myriad Monte Carlo Markov chains (see, e.g., Fort et al., 2003; Marchev and Hobert, 2004; Roy and Hobert, 2010; Vats, 2017). Since the drift and minorization (hereafter, d&m) method is still the most (and arguably the only) reliable tool for bounding ρ∗ for practically relevant Monte Carlo Markov chains on uncountable state spaces, it is important to know whether it remains useful in the context of convergence complexity analysis. Unfortunately, it turns out that most of the upper bounds on ρ∗ that have been produced using techniques based on d&m converge to 1 (often exponentially fast), becoming trivial, as n and/or p grow (see, e.g., Rajaratnam and Sparks, 2015). One example of this is Roy and Hobert’s (2007) analysis of Albert and Chib’s (1993) data augmentation algorithm for the Bayesian probit model, which establishes geometric ergodicity of the underlying Markov chain, but also leads to an upper bound on ρ∗ that converges to 1 as n → ∞. There are, of course, many possible explanations for why the d&m-based upper bounds on ρ∗ converge to 1. It could be that the associated Monte Carlo Markov chains actually have poor asymptotic properties, or, if not, perhaps Rosenthal’s (1995) method is simply not up to the more delicate task of convergence complexity analysis. We show that, in the case of Albert and Chib’s (1993) chain, neither of these potential explanations is correct. Indeed, our careful d&m analysis of Albert and Chib’s (1993) chain (hereafter, A&C’s chain) leads to upper bounds on ρ∗ that are bounded away from 1 in both the large n, small p case, and the large p, small n case. We believe that this is the first successful convergence complexity analysis of a practically relevant Monte Carlo Markov chain using Rosenthal’s (1995) method. Recently, Yang and Rosenthal (2017) used a modified version of Rosenthal’s (1995) technique to successfully analyze the convergence complexity of a Gibbs sampler for a simple Bayesian linear mixed model. We note that, because one of the variance components in their model is assumed known, it is actually straightforward to sample directly from the posterior distribution using a univariate rejection sampler (Jones, 2001, Section 3.9). Thus, while Yang and Rosenthal’s (2017) results are impressive, and their methods may suggest a way forward, the Monte Carlo Markov chain that they analyzed is not practically relevant. One of the main contributions of this article is a general approach for sharpening the upper bounds that are produced via d&m, particularly in cases where n and/or p is large. The key ideas include “centering” the drift function to a region in the state space that the chain visits frequently, and suppressing high-dimensionality in the construction of minorization conditions. In addition, for two-block Gibbs chains, we introduce a technique for constructing asymptotically stable minorization conditions that is based on 3 the well known fact that the two marginal Markov chains and the joint chain all share the same geometric convergence rate. Before describing our results for A&C’s chain, we introduce an alternative definition of geometric ergodicity. Let L2 (Π) denote the set of signed measures µ that are absolutely continuous with respect to Π, R and satisfy X (dµ/dΠ)2 dΠ < ∞. As in Roberts and Rosenthal (1997), we say that the Markov chain with Mtf K is L2 -geometrically ergodic if there exists ρ < 1 such that for each probability measure ν ∈ L2 (Π), there exists a constant Mν < ∞ such that kνK m (·) − Π(·)kTV ≤ Mν ρm for all m ∈ N , where νK m (·) = R XK m (x, ·) ν(dx). We define the L2 -geometric convergence rate, ρ∗∗ , to be the infimum of all ρ ∈ [0, 1] that satisfy this definition. Not surprisingly, ρ∗ and ρ∗∗ are closely related (see, e.g., Roberts and Tweedie, 2001). We now provide an overview of our results for Albert and Chib’s (1993) Markov chain, starting with a brief description of their algorithm. Let {Xi }ni=1 be p-dimensional covariates, and let {Yi }ni=1 be a corresponding sequence of binary random variables such that Yi |Xi , B ∼ Bernoulli(Φ(XiT B)) independently, where B is a p × 1 vector of unknown regression coefficients, and Φ is the standard normal distribution function. Consider a Bayesian analysis using a prior density for B given by ω(β) ∝ exp n o 1 − (β − v)T Q(β − v) , 2 where v ∈ Rp , and Q ∈ Rp×p is either a positive definite matrix (proper Gaussian prior), or a zero matrix (flat improper prior). Assume for now that the posterior is proper. (Propriety under a flat prior is discussed in Section 3.) As usual, let X denote the n × p matrix whose ith row is XiT , and let Y = (Y1 Y2 · · · Yn )T denote the vector of responses. The intractable posterior density is given by ) ( n Y   Y 1−Y i i ω(β) . Φ(XiT β) 1 − Φ(XiT β) πB|Y,X (β|Y, X) ∝ (2) i=1 The standard method for exploring (2) is the classical data augmentation algorithm of Albert and Chib (1993), which simulates a Harris ergodic (irreducible, aperiodic, and Harris recurrent) Markov chain, {Bm }∞ m=0 , that has invariant density πB|Y,X . In order to state the algorithm, we require a bit of notation. For θ ∈ R, σ > 0, and i ∈ {0, 1}, let TN(θ, σ 2 ; i) denote the N(θ, σ 2 ) distribution truncated to (0, ∞) if i = 1, and to (−∞, 0) if i = 0. The matrix Σ := X T X + Q is necessarily non-singular because of propriety. If the current state of A&C’s Markov chain is Bm = β, then the new state, Bm+1 , is drawn using the following two steps: 4 Iteration m + 1 of the data augmentation algorithm: 1. Draw {Zi }ni=1 independently with Zi ∼ TN(XiT β, 1; Yi ), and let Z = (Z1 Z2 · · · Zn )T . 2. Draw    Bm+1 ∼ Np Σ−1 X T Z + Qv , Σ−1 . The convergence rate of A&C’s chain has been studied by several authors. Roy and Hobert (2007) proved that when Q = 0, the chain is always geometrically ergodic. (Again, we’re assuming posterior propriety.) A similar result for proper normal priors was established by Chakraborty and Khare (2017). Both results were established using a technique that does not require construction of a minorization condition (see Meyn and Tweedie, 2012, Lemma 15.2.8), and, consequently, does not yield an explicit upper bound on ρ∗ . Thus, neither paper addresses the issue of convergence complexity. However, in Section 5 we prove that Roy and Hobert’s (2007) drift function cannot be used to construct an upper bound on ρ∗ that is bounded away from 1 as n → ∞. Johndrow et al. (2016) recently established a convergence complexity result for the intercept only version of the model (p = 1 and Xi = 1 for i = 1, 2, . . . , n) with a proper (univariate) normal prior, under the assumption that all the responses are successes (Yi = 1 for i = 1, 2, . . . , n). Their results, which are based on Cheeger’s inequality, imply that ρ∗∗ → 1 as n → ∞, indicating that the algorithm is inefficient for large samples. The results established herein provide a much more complete picture of the convergence behavior of A&C’s chain. Three different regimes are considered: (i) fixed n and p, (ii) large n, small p, and (iii) large p, small n. Our analysis is based on two different drift functions that are both appropriately centered (at the posterior mode). One of the two drift functions is designed for case (ii), and the other for case (iii). We establish d&m conditions for both drift functions, and these are used in conjunction with Rosenthal’s (1995) result to construct two explicit upper bounds on ρ∗ . They are also used to construct two computable upper bounds on the total variation distance to stationarity (as in (1)), which improves upon the analyses of Roy and Hobert (2007) and Chakraborty and Khare (2017). The goal in case (ii) is to study the asymptotic behavior of the geometric convergence rate as n → ∞, when p is fixed. To this end, we consider a sequence of data sets, Dn := {(Xi , Yi )}ni=1 . So, each time n increases by 1, we are are given a new p × 1 covariate vector, Xi , and a corresponding binary response, Yi . To facilitate the asymptotic study, we assume that the (Xi , Yi ) pairs are generated according to a random mechanism that is governed by very weak assumptions (that are consistent with the probit regression model). 5 We show that there exists a constant ρ < 1 such that, almost surely, lim supn→∞ ρ∗ (Dn ) ≤ ρ. Apart from this general result, we are also able to show that, in the intercept only model considered by Johndrow et al. (2016), the A&C chain is actually quite well behaved as long as the proportion of successes is bounded away from 0 and 1. To be specific, let {Yi }∞ i=1 denote a fixed sequence of binary responses, and let p̂n = P n−1 ni=1 Yi . Our results imply that, as long as 0 < lim inf n→∞ p̂n ≤ lim supn→∞ p̂n < 1, there exists ρ < 1 such that both ρ∗ (Dn ) and ρ∗∗ (Dn ) are eventually bounded above by ρ, and there is a closed form expression for ρ. In case (iii), n is fixed and p → ∞. There are several important differences between cases (ii) and (iii). First, in case (ii), since p is fixed, only a single prior distribution need be considered. In contrast, when p → ∞, we must specify a sequence of priors, {(Qp , vp )}∞ p=1 , where vp is a p × 1 vector, and Qp is a p × p positive definite matrix. (When p > n, a positive definite Q is required for posterior propriety.) Also, in case (iii), there is a fixed vector of responses (of length n), and it is somewhat unnatural to consider the new columns of X to be random. Let Dp := {(vp , Qp , Xp , Y )} denote a fixed sequence of priors and data sets, where Y is a fixed n × 1 vector of responses, and Xp is an n × p matrix. We show that, under a natural T regularity condition on Xp Q−1 p Xp , there exists a ρ < 1 such that ρ∗ (Dp ) ≤ ρ for all p. The remainder of the paper is laid out as follows. In Section 2, we formally introduce the concept of stable d&m conditions, and describe our general ideas for constructing such. The centered drift functions that are used in our analysis of A&C’s chain are described in Section 3. In Section 4, we provide results for A&C’s chain in the case where n and p are both fixed. Two sets of d&m conditions are established, and corresponding exact total variation bounds on the distance to stationarity are provided. The heart of the paper is Section 5 where it is shown that the geometric convergence rate of A&C’s chain is bounded away from 1 as n → ∞ for fixed p, and as p → ∞ for fixed n. A good deal of technical material is relegated to an Appendix. 2 Asymptotically Stable Drift and Minorization Let X be a set equipped with a countably generated σ-algebra B(X). Suppose that K : X × B(X) → [0, 1] R is an Mtf with invariant probability measure Π(·), so that Π(A) = X P (x, A)Π(dx) for all measurable A. Assume that the corresponding Markov chain is Harris ergodic. Recall the definitions of geometric ergodicty and geometric convergence rate from Section 1. The following result has proven extremely useful for establishing geometric ergodicity in the context of Monte Carlo Markov chains used to study complex Bayesian posterior distributions. 6 Theorem 1 (Rosenthal (1995)). Suppose that K(x, ·) satisfies the drift condition Z V (x′ )K(x, dx′ ) ≤ λV (x) + L, x∈X (3) X for some V : X → [0, ∞), λ < 1 and L < ∞. Suppose that it also satisfies the minorization condition K(x, ·) ≥ εQ(·) whenever V (x) < d (4) for some ε > 0, probability measure Q(·) on X, and d > 2L/(1 − λ). Then assuming the chain is started according to the probability measure ν(·), for any 0 < r < 1, we have kνK m (·) − Π(·)kTV ≤ (1 − ε)rm #m  "   Z 1 + 2L + λd 1−r L r V (x)ν(dx) + . {1 + 2(λd + L)} + 1+ 1−λ 1+d X The function V is called the drift (or Lyapunov) function, and {x ∈ X : V (x) < d} is called the small set associated with V . We will refer to ε as the minorization number. Manipulation of the total variation bound in Theorem 1 leads to m kνK (·) − Π(·)kTV  ≤ 2+ L + 1−λ where r ρ̂ := (1 − ε) ∨  1 + 2L + λd 1+d 1−r Z X   V (x)ν(dx) ρ̂m , 1 + 2(λd + L) r , (5) and r ∈ (0, 1) is arbitrary. Then, ρ̂ is an upper bound on the geometric convergence rate ρ∗ . It’s easy to verify that when λ < 1, L < ∞, and ε > 0, there exists r ∈ (0, 1) such that ρ̂ < 1. The bound ρ̂ has a reputation for being too conservative. This is partly due to the fact that there are toy examples where the true ρ∗ is known, and ρ̂ is quite far off (see, e.g., Rosenthal, 1995). There also exist myriad analyses of practical Monte Carlo Markov chains where the d&m conditions (3) and (4) have been established (proving that the underlying chain is indeed geometrically ergodic), but the total variation bound of Theorem 1 is useless because ρ̂ is so near unity. Of course, the quality of the bound ρ̂ depends on the choice of drift function, and the sharpness of (3) and (4). Our results for the A&C chain suggest that poorly chosen drift functions and/or loose inequalities in the d&m conditions are to blame for (at least) some of the unsuccessful applications of Theorem 1. We now introduce the concept of asymptotically stable d&m. Consider a sequence of geometrically ergodic Markov chains, {Ψ(j) }∞ j=1 , with corresponding geometric (j) convergence rates given by ρ∗ . (In practice, j is usually the sample size, n, or number of covariates, p.) We are interested in the asymptotic behavior of the rate sequence. For example, we might want to know if it 7 is bounded away from 1. Suppose that for each chain, Ψ(j) , we have d&m conditions defined through λ(j) , (j) L(j) , and ε(j) , and thus an upper bound on the convergence rate, ρ̂(j) ∈ [ρ∗ , 1). The following simple result provides conditions under which these upper bounds are unstable, that is, lim supj→∞ ρ̂(j) = 1. (jl ) }∞ , that satisfies one Proposition 2. Suppose that there exists a subsequence of {Ψ(j) }∞ j=0 , call it {Ψ l=0 or more of the following three conditions: (i) λ(jl ) → 1, (ii) L(jl ) → ∞, while ε(jl ) is bounded away from 1 and λ(jl ) is bounded away from 0, (iii) ε(jl ) → 0. Then the corresponding subsequence of the upper bounds, ρ̂(jl ) , converges to 1. Proof. Throughout the proof, we drop the superscripts on λ, L, and ε. If (i) holds, then 1 + 2L + λd ≥λ→1. 1+d Since 1 + 2(λd + L) ≥ 1, regardless of the asymptotic behavior of r ∈ (0, 1), we have   1 + 2L + λd 1−r lim inf {1 + 2(λd + L)}r ≥ 1. j→∞ 1+d Hence, ρ̂(jl ) → 1. Now assume that (ii) holds. Then 1 + 2(λd + L) → ∞. Meanwhile, for large enough l, 1 + 2L + λd ≥ λ > c, 1+d where c is a positive constant. Hence, to ensure that   1 + 2L + λd 1−r {1 + 2(λd + L)}r 1+d is bounded, one must let r → 0. However, this would result in (1 − ε)r → 1. Finally, assume that (iii) holds. Then (1 − ε)r → 1 regardless of the asymptotic behavior of r ∈ (0, 1). If one (or more) of the conditions in Proposition 2 holds for some subsequence of {Ψ(j) }∞ j=0 , then we say that the d&m conditions are (asymptotically) unstable (in j). On the other hand, if (i′ ) λ(j) is bounded away from 1, (ii′ ) L(j) is bounded above, and (iii′ ) ε(j) is bounded away from 0, then the sequence ρ̂(j) can (j) be bounded away from 1, thus giving an asymptotically nontrivial upper bound on ρ∗ . We say that the drift conditions are stable if (i′ ) and (ii′ ) hold, and likewise, that the minorization conditions are stable if (iii′ ) holds. Before proceeding to discuss techniques for achieving stability, we note that there exist some elementary transformations on V that could affect the quality of ρ̂, and even the stability of d&m. For instance, if (3) is satisfied, then Z L−1 V (x′ )K(x, dx′ ) ≤ λL−1 V (x) + 1 . X 8 Thus, if L → ∞, we can simply re-scale each drift function by its corresponding L−1 , which results in L ≡ 1. However, such re-scaling cannot be used to stabilize minorization conditions. In the above example, suppose that for some d′ > 2/(1 − λ), K(x, ·) ≥ εQ(·) whenever L−1 V (x) > d′ . Then K(x, ·) ≥ εQ(·) whenever V (x) > Ld′ , where Ld′ > 2L/(1 − λ). Thus, if one cannot establish a stable minorization condition associated with V (x), then there is no hope of finding a stable minorization associated with L−1 V (x). Stability could also be affected by adding a scalar to the drift function, i.e., replacing V (x) with some V (x) + c. One can easily show that subtracting a positive number from V (while preserving the positiveness of V ) decreases the volume of the small set, and thus increases the minorization number, ε. In fact, it always improves the quality of ρ̂. Needless to say, we will only deal with instability that cannot be prevented by these trivial transformations. In particular, throughout the paper, we consider only drift functions whose infimums are 0, that is, we make the elementary transformation of V (x) 7→ V (x) − inf x′ ∈X V (x′ ). Choosing an appropriate drift function is extremely important for establishing stable d&m conditions. The total variation bound in Theorem 1 is based on a theoretical coupling argument that involves two (dependent) copies of the Markov chain in question, one started in stationarity, and the other started from an arbitrary initial distribution. The total variation distance between the two chains after m iterations is bounded above by P (T > m), where T is the coupling time. In the coupling construction, there is a chance to couple each time the chains enter the small set, {x ∈ X : V (x) ≤ d}. Loosely speaking, we want the chains to visit the small set as often as possible since each visit provides a chance to couple, and fast coupling means small values for P (T > m), which, in turn, leads to small total variation distance. This argument suggests that one should choose a drift function that is “centered” with respect to the Markov chain in the sense that the drift function should take small values in the part of the state space where the chain is likely to spend the bulk of its time. Of course, if the chain is well suited to the problem, it should spend the bulk of its time in the high posterior probability regions of X. A properly centered drift function is likely to give a small L, and in turn a small d, which is often necessary for a large ε. This intuition is not new, and many authors do attempt to center their drift functions in some way. (Although, in many cases, the centering is not delicate enough to ensure that the drift function reflects the dynamics of the chain.) However, we believe that our work is one of the first to illustrate the importance of centering in a quantitative fashion through a genuinely non-trivial example. Indeed, in Section 5 we show that, for A&C’s chain, in the large n, small p case, the un-centered drift function employed by Roy and Hobert (2007) cannot possibly lead to stable d&m, while a centered version of the same drift function does. Suppose now that V is properly centered and stable drift has been established. Obtaining stable minorization can still be difficult due to the intractability of K(x, ·). We now describe a common difficulty 9 encountered in the convergence analysis of two-block Gibbs samplers and data augmentation algorithms. For simplicity, we’ll investigate Mtfs that admit density functions with respect to the Lebesgue measure, but most of the material in the remainder of this section can be easily generalized. Suppose that X ⊂ Rp , and K(x, ·) is associated with a Markov transition density (Mtd) of the form k(x, x′ ) = Z s(x′ |z)h(z|x) dz , (6) Rn where n is the sample size, z = (z1 , z2 , . . . , zn )T ∈ Rn is a vector of latent data, and s : X × Rn → [0, ∞) and h : Rn × X → [0, ∞) are conditional densities associated with some joint density on X × Rn . In practice, it is often the case that h(z|x) can be factored as follows: h(z|x) = n Y hi (zi |x) , i=1 where, for each i, hi : R × X → [0, ∞) is a univariate (conditional) pdf. Usually, s(·|z) and hi (·|x) are tractable, but there is no closed form for k(x, x′ ). However, there is a well-known argument for establishing a minorization condition in this case. Suppose that whenever V (x) < d, hi (t|x) > ǫi νi (t) , i = 1, 2, . . . , n where ǫi > 0 and νi : R → [0, ∞) is a pdf. Then, whenever V (x) < d, we have !Z n n Y Y ′ ′ νi (zi ) dz . s(x |z) ǫi k(x, x ) > Rn i=1 Since R Rn s(x′ |z) Qn i=1 νi (zi ) dz (7) i=1 is a pdf on X, (7) gives a minorization condition with ε = Qn i=1 ǫi . Un- fortunately, this quantity will almost always converge to 0 as n → ∞. Consequently, if our sequence of Markov chains is indexed by n, then we have unstable minorization. This problem is well known (see, e.g., Rajaratnam and Sparks, 2015). The instability of the minorization described above is due to the fact that the dimension of z is growing with n. However, it is often the case that s(x|z) depends on z only through f (z), where f : Rn → Y is a function into some fixed space Y, say Y ⊂ Rq , where q does not depend on n. Then integrating along f (z) = γ in (6) yields ′ k(x, x ) = where s̃(x′ |f (z)) = s(x′ |z), Z Y and Z C h̃(γ|x) dγ =   s̃ x′ |γ h̃ γ|x dγ , Z h(z|x) dz {z:f (z)∈C} 10 for all x ∈ X and any measurable C ⊂ Y. Note that this new representation of k(x, x′ ) no longer contains n explicitly, and the high dimensionality problem for z is resolved. However, we now have a new problem. Namely, h̃(γ|x) is likely to be quite intractable. Fortunately, there is also a way to circumvent this difficulty. Consider a Markov chain driven by the Mtd k̃(γ, γ ′ ) = Z h̃(γ ′ |x)s̃(x|γ) dx , γ, γ ′ ∈ Y . X We call this the “flipped” version of the chain defined by k(x, x′ ). It is well known that these two chains share the same geometric convergence rate (see, e.g., Roberts and Rosenthal, 2001; Diaconis et al., 2008). Thus, we can analyze the original sequence of Markov chains indirectly through the corresponding flipped chains. Recall that the drift condition for the original chain is Z Define Ṽ (γ) = R XV V (x′ ) X Z s̃(x′ |γ ′ )h̃(γ ′ |x) dγ ′ dx′ ≤ λV (x) + L . (8) Y (x)s̃(x|γ) dx. Multiplying both sides of (8) by s̃(x|γ), and integrating out x yields the following drift condition for the flipped chain: Z Ṽ (γ ′ )k̃(γ, γ ′ ) dγ ′ ≤ λṼ (γ) + L . Y Moreover, since λ and L are the same as before, this drift is stable. Now, as mentioned above, s̃(x|f (z)) = s(x|z) is often tractable. Suppose that there exists some ε̃ > 0 and pdf ν̃ : X → [0, ∞) such that s̃(x|γ) ≥ ε̃ν̃(x) when Ṽ (γ) < d, then we have the following minorization condition for the flipped chain: ′ k̃(γ, γ ) ≥ ε̃ Z h̃(γ ′ |x)ν̃(x) dx whenever Ṽ (γ) < d . X This minorization is stable as long as ε̃ is bounded away from 0 asymptotically. The flipped chain argument is not always applicable, but when it is, it simplifies calculations greatly. Furthermore, we will demonstrate that the flipped chain argument can also be useful for establishing minorization conditions that are stable in p. We end this section with a result that allows us to use information about a flipped chain to get total variation bounds for the original. Obviously, if we have d&m conditions for a flipped chain, then this provides us with an upper bound on the geometric convergence rate of the corresponding original chain. However, using the information about the flipped chain to get total variation bounds for the corresponding original chain requires a bit of work. The following result follows immediately from Proposition 24, which is stated and proven in Subsection B.1. 11 Corollary 3. Suppose we have d&m conditions for a flipped chain (which is driven by k̃). Let λ, L, and ε denote the drift and minorization parameters, and let ρ̂f denote the corresponding bound on the geometric convergence rate. Then, if the original chain is started at x ∈ X, we have, for m ≥ 1,   Z L m . Ṽ (γ)h̃(γ|x) dγ ρ̂m−1 + kK (x, ·) − Π(·)kTV ≤ 2 + f 1−λ Y In the next section, we begin our analysis of the A&C chain. 3 Albert and Chib’s Markov Chain and the Centered Drift Functions 3.1 Basics As in the introduction, let {Xi }ni=1 be p-dimensional covariates and let {Yi }ni=1 be a sequence of binary random variables such that Yi |Xi , B ∼ Bernoulli(Φ(XiT B)) independently, where B is a p × 1 vector of unknown regression coefficients. Suppose that, having observed the data, D := {(Xi , Yi )}ni=1 , we wish to perform a Bayesian analysis using a prior density for B given by ω(β) ∝ exp n o 1 − (β − v)T Q(β − v) , 2 where v ∈ Rp , and Q is a p × p inverse covariance matrix that is either positive definite, or vanishing. Let X denote the n × p matrix whose ith row is XiT , and let Y = (Y1 Y2 · · · Yn )T denote the vector of responses. The posterior distribution (2) is proper precisely when c(X, Y ) := Z n Y Rp i=1  Yi 1−Yi ω(β) dβ < ∞ . Φ(XiT β) 1 − Φ(XiT β) When Q is positive definite, ω(β) is a proper normal density, and the posterior is automatically proper. If Q = 0, then propriety is not guaranteed. Define X∗ as the n × p matrix whose ith row is −XiT if Yi = 1, and XiT if Yi = 0. Chen and Shao (2000) proved that when the prior is flat, i.e., Q = 0, the following two conditions are necessary and sufficient for posterior propriety: (C1) X has full column rank; (C2) There exists a vector a = (a1 a2 · · · an )T ∈ Rn such that ai > 0 for all i, and X∗T a = 0. Until further notice, we will assume that the posterior is proper. 12 A&C’s algorithm to draw from the intractable posterior is based on the following latent data model. Given X and B, let {(Yi , Zi )}ni=1 be a sequence of independent random vectors such that Yi |Zi , X, B is a point mass at 1R+ (Zi ) Zi |X, B ∼ N (XiT B, 1) . Clearly, under this hierarchical structure, Yi |Xi , B ∼ Bernoulli(Φ(XiT B)), which is consistent with the original model. Thus, if we let πB,Z|Y,X (β, z|Y, X) denote the corresponding (augmented) posterior density (where Z = (Z1 Z2 · · · Zn )T ), then it’s clear that Z πB,Z|Y,X (β, z|Y, X) dz = πB|Y,X (β|Y, X) , Rn which is the target posterior from (2). Albert and Chib’s algorithm is simply a two-variable Gibbs sampler based on πB,Z|Y,X (β, Z|Y, X). Indeed, the Mtd, k : Rp × Rp → R+ , is defined as Z ′ ′ πB|Z,Y,X (β ′ |z, Y, X)πZ|B,Y,X (z|β, Y, X) dz . kAC (β, β ) := kAC (β, β ; Y, X) = Rn One can show that   B|Z, Y, X ∼ Np Σ−1 X T Z + Qv , Σ−1 , where, again, Σ = X T X + Q. Moreover, the density πZ|B,Y,X (z|β, Y, X) is a product of n univariate densities, where Zi |B, Y, X ∼ TN(XiT B, 1; Yi ). Obviously, these are the conditional densities that appear in the algorithm described in the Introduction. 3.2 A centered drift function Roy and Hobert (2007) and Chakraborty and Khare (2017) both used the drift function V0 (β) = kΣ1/2 βk2 . While this drift function is certainly amenable to analysis, it is not “centered” in any practical sense. Indeed, V0 (β) takes on it’s minimum when β = 0, but, in general, there is no reason to expect A&C’s Markov chain to make frequent visits to the vicinity of the origin. This heuristic is borne out by a result in Section 5 showing that V0 cannot lead to stable d&m in the large n, small p case. As an alternative to V0 (β), we consider drift functions of the form V (β) = kM (β − β ∗ )k2 , (9) where M = M (X, Y ) is a matrix with p columns, and β ∗ = β ∗ (X, Y ) is a point in Rp that is “attractive” to A&C’s Markov chain. A candidate for β ∗ would be a fixed point for the chain, that is, a value BF satisfying Z β kAC (BF , β) dβ = BF . (10) Rp 13 Indeed, this equation suggests that the chain tends to “stay around” the point BF , and hence BF might be an effective point at which to center the drift function. The following result shows that there is, in fact, a unique solution to (10). Proposition 4. The posterior density, πB|Y,X (β|Y, X), possesses a unique mode, and this mode is the unique solution to (10). Proof. Note that log πB|Y,X (β|Y, X) = log πY |B,X (Y |β, X) + log ω(β) + constant. It is well-known that log ω(β) is concave, and that log πY |B,X (Y |β, X), as a function of β, is strictly concave. Therefore, since the posterior density is proper, it must possess a unique mode in Rp . Now, the mode is the solution to the following equation:  d log ω(β) + log πY |B,X (Y |β, X) = 0 , dβ where (11) 1 log ω(β) = − (β − v)T Q(β − v) + constant , 2 and log πY |B,X (Y |β, X) = n X i=1   log Φ(XiT β)1{1} (Yi ) + 1 − Φ(XiT β) 1{0} (Yi ) + constant . Thus, (11) is equivalent to the following equation  n  X φ(XiT β) φ(XiT β) 1{1} (Yi ) − 1{0} (Yi ) Xi − (Qβ − Qv) = 0 . Φ(XiT β) 1 − Φ(XiT β) i=1 (12) On the other hand, a fixed point solves the following equation in β: Z Rp Z Rn β ′ πB|Z,Y,X (β ′ |z, Y, X)πZ|B,Y,X (z|β, Y, X) dz dβ ′ = β . (13) Recall that B|Z, Y, X ∼ Np (Σ−1 (Qv + X T Z), Σ−1 ). Thus, (13) is equivalent to Qv + n X Xi E(Zi |B = β, Y, X) = Σβ . (14) i=1 By (27) in Subsection A.2, we have E(Zi |B = β, Y, X) = XiT β + φ(XiT β) φ(XiT β) 1 (Y ) − 1{0} (Yi ) , i {1} Φ(XiT β) 1 − Φ(XiT β) where φ(·) is the pdf of the standard normal distribution. Routine calculation shows that (14) is equivalent to (12). 14 Remark 5. The posterior density, πB|Y,X (β|Y, X), is invariant for A&C’s Markov chain, so it shouldn’t be too surprising that the chain tends to “hang around” the posterior mode. On the other hand, the fact that the posterior mode is an exact (unique) fixed point for the chain is a bit unexpected. We will consider two different versions of (9), both centered at BF . The first, which will be used in the large n-small p case, is simply a centered version of V0 given by V1 (β) = Σ1/2 (β − BF ) 2 . In the large p-small n case, we assume that Q is positive definite (which is necessary for posterior propriety) and that X is full row rank, and we use the following drift function V2 (β) = XΣ−1 X T −1/2 X(β − BF ) 2 . In the next section, we establish two sets of d&m conditions for the A&C chain based on V1 and V2 . 4 Results for the Albert and Chib Chain Part I: Fixed n and p 4.1 Drift inequalities for V1 and V2 Define g : R → R as θφ(θ) + g(θ) = Φ(θ)  φ(θ) Φ(θ) 2 . For any β ∈ Rp , let D(β) denote an n × n diagonal matrix with ith diagonal element   1 − g XiT β 1{1} (Yi ) − g − XiT β 1{0} (Yi ) . Lemma 6. If V (β) = kM (β − BF )k2 , where M is any matrix with p columns, then Z o n 2 V (β ′ )kAC (β, β ′ ) dβ ′ ≤ sup M Σ−1 X T D(BF + t(β − BF ))X(β − BF ) + 2 tr M Σ−1 M T . Rp t∈(0,1) Proof. Note that Z V (β ′ ) πB|Z,Y,X (β ′ |z, Y, X) dβ ′ = M Σ−1 (X T z + Qv) − M BF Rp Moreover, Z Rn 2  + tr M Σ−1 M T . kM Σ−1 (X T z + Qv) − M BF k2 πZ|B,Y,X (z|β, Y, X) dz  2 = M Σ−1 X T E (Z|B = β, Y, X) + Qv − M BF  + tr M Σ−1 X T var (Z|B = β, Y, X) XΣ−1 M T 15 . (15) For two symmetric matrices of the same size, M1 and M2 , we write M1 ≤ M2 if M2 − M1 is non-negative definite. By Lemma 23 in Subsection A.2, var(Z|B = β, Y, X) ≤ In . It follows that M Σ−1 X T var (Z|B = β, Y, X) XΣ−1 M T ≤ M Σ−1 X T XΣ−1 M T ≤ M Σ−1 M T . (16) Therefore, Z ′ Rp ′ ′ V (β )kAC (β, β ) dβ = Z ′ V (β ) Rp Z Rn πB|Z,Y,X (β ′ |z, Y, X)πZ|B,Y,X (z|β, Y, X) dz dβ ′  ≤ M Σ−1 X T E (Z|B = β, Y, X) + Qv − M BF 2  + 2 tr M Σ−1 M T . (17) Now, for α ∈ Rp , define  µ(α) = M Σ−1 X T E (Z|B = BF + α, Y, X) + Qv − M BF . Since BF is a fixed point, we have µ(0) = M Z Rp βkAC (BF , β) dβ − M BF = 0 . By the mean value theorem for vector-valued functions (see, e.g., Rudin, 1976, Theorem 5.19), for any α ∈ Rp , kµ(α)k2 ≤ sup t∈(0,1) ∂µ(tα) ∂t !2 . Now, by (27) in Subsection A.2, n X ∂ ∂µ(tα) Xi E(Zi |B = BF + tα, Y, X) = M Σ−1 ∂t ∂t = M Σ−1 i=1 n X i=1 ∂  T Xi (BF + tα) ∂t   d φ(θ) φ(θ) × − 1{0} (Yi ) θ + 1{1} (Yi ) dθ Φ(θ) 1 − Φ(θ) Xi θ=XiT (BF +tα) = M Σ−1 X T D(BF + tα) Xα . Hence, kµ(α)k2 ≤ sup M Σ−1 X T D(BF + tα)Xα 2 . t∈(0,1) The result then follows from (17) and (18) by taking α = β − BF . We now use Lemma 6 to establish explicit drift inequalities for V1 and V2 . We begin with V1 . 16 (18) Proposition 7. For all β ∈ Rp , we have   Z kΣ−1/2 X T D(BF + tα)Xαk2 ′ ′ ′ V1 (β) + 2p . V1 (β )kAC (β, β ) dβ ≤ sup sup kΣ1/2 αk2 t∈(0,1) α6=0 Rp Proof. Taking M = Σ1/2 in Lemma 6 yields Z Rp V1 (β ′ )kAC (β, β ′ ) dβ ′ ≤ sup Σ−1/2 X T D(BF + t(β − BF ))X(β − BF ) 2 + 2p t∈(0,1) ≤   kΣ−1/2 X T D(BF + tα)Xαk2 sup sup V1 (β) + 2p . kΣ1/2 αk2 t∈(0,1) α6=0 In Subsection B.2, we prove that kΣ−1/2 X T D(BF + tα)Xαk2 <1. kΣ1/2 αk2 t∈(0,1) α6=0 sup sup For a symmetric matrix M , let λmin (M ) and λmax (M ) denote the smallest and largest eigenvalues of M , respectively. Here is the analogue of Proposition 7 for V2 . Proposition 8. Assume that X has full row rank. Then for all β ∈ Rp , we have Z Rp   V2 (β ′ )kAC (β, β ′ ) dβ ′ ≤ λ2max XΣ−1 X T V2 (β) + 2n . Proof. Taking M = XΣ−1 X T Z Rp −1/2 X in Lemma 6 and applying Lemma 23 yields V2 (β ′ )kAC (β, β ′ ) dβ ′ ≤ sup XΣ−1 X T t∈(0,1) ≤ sup λ2max t∈(0,1)  1/2 D(β + t(β − BF ))X(β − BF ) XΣ−1 X T 1/2 2 + 2n D(BF + t(β − BF )) XΣ−1 X T   ≤ λ2max XΣ−1 X T V2 (β) + 2n . 1/2 V2 (β) + 2n 4.2 Drift and minorization for the Albert and Chib chain based on V1 In this subsection, we exploit the flipped chain idea described in Section 2. In particular, V1 is used to establish d&m conditions for a flipped chain that has the same geometric convergence rate as A&C’s chain. Later, in Section 5, we will use these results to prove asymptotic stability as n → ∞. 17 Note that πB|Z,Y,X (β|Z, Y, X) depends on the n-dimensional vector Z only through X T Z, which is a one-to-one function of the following p-dimensional vector:   Γ := Σ1/2 Σ−1 X T Z + Qv − BF . Hence, we can represent the Mtd of the A&C chain as follows: Z ′ kAC (β, β ) = Rp πB|Γ,Y,X (β ′ |γ, Y, X)πΓ|B,Y,X (γ|β, Y, X) dγ . Recalling the discussion in Section 2, this maneuver seems to represent progress since we have replaced n with p. However, it is difficult to establish a minorization condition using this version of kAC (β, β ′ ) because πΓ|B,Y,X (γ|β, Y, X) lacks a closed form. On the other hand, this chain has the same geometric convergence rate as the flipped chain defined by the following Mtd: ′ ′ k̃AC (γ, γ ) := k̃AC (γ, γ ; Y, X) = Z Rp πΓ|B,Y,X (γ ′ |β, Y, X)πB|Γ,Y,X (β|γ, Y, X) dβ . Constructing a minorization condition for this Mtd is much less daunting since  B|Γ, Y, X ∼ N Σ−1/2 Γ + BF , Σ−1 . Here is the main result of this subsection. Proposition 9. Let Ṽ1 (γ) = kγk2 . The Mtd k̃AC satisfies the drift condition Z Rp Ṽ1 (γ ′ )k̃AC (γ, γ ′ ) dγ ′ ≤ λṼ1 (γ) + L , where L = p(1 + λ), and kΣ−1/2 X T D(BF + tα)Xαk2 . kΣ1/2 αk2 t∈(0,1) α6=0 λ = sup sup Moreover, for d > 2L/(1 − λ), k̃AC satisfies k̃AC (γ, γ ′ ) ≥ εq(γ ′ ) , where q : Rp → [0, ∞) is a pdf, and ε = 2−p/2 e−d . Proof. We begin with the drift. It’s easy to verify that Z Rp V1 (β)πB|Γ,Y,X (β|γ, Y, X) dβ = Ṽ1 (γ) + p . 18 We now use the techniques described at the end of Section 2 to convert the drift inequality in Proposition 7 into a drift inequality for the flipped chain. We know that Z  Z ′ ′ ′ ′ ′ πB|Γ,Y,X (β |γ , Y, X) πΓ|B,Y,X (γ |β, Y, X) dγ dβ ′ ≤ λV1 (β) + 2p . V1 (β ) Rp Rp Multiplying both sides of the above inequality by πB|Γ,Y,X (β|γ, Y, X) and integrating with respect to β yields Z Rp Ṽ1 (γ ′ )k̃AC (γ, γ ′ ) dγ ′ ≤ λṼ1 (γ) + p(1 + λ) . As explained in Section 2, to establish the minorization condition, it suffices to show that there exists a pdf ν(β) := ν(β|Y, X) such that πB|Γ,Y,X (β|γ, Y, X) ≥ εν(β) (19) whenever Ṽ1 (γ) ≤ d. Recall that  B|Γ, Y, X ∼ N Σ−1/2 Γ + BF , Σ−1 . Define ν1 (β) = inf γ:Ṽ1 (γ)≤d πB|Γ,Y,X (β|γ, Y, X)    2 1 |Σ|1/2 1/2 −1/2 exp − Σ β − BF − Σ γ . = inf p/2 2 γ:Ṽ1 (γ)≤d (2π) Then ν(β) = ν1 (β)/ R Rp ν1 (β ′ ) dβ ′ is a pdf, and whenever Ṽ1 (γ) ≤ d, Z  ′ ′ ν1 (β ) dβ ν(β) . πB|Γ,Y,X (β|γ, Y, X) ≥ Rp This is (19) with ε= Z Rp −p/2 ν1 (β) dβ = (2π)  1 inf exp − kβ − γk2 2 2 Rp γ:kγk ≤d Z  dβ . Finally, since kβ − γk2 ≤ 2(kβk2 + kγk2 ), ε ≥ (2π)−p/2 Z inf 2 Rp γ:kγk ≤d   exp − kβk2 − kγk2 dβ = 2−p/2 e−d . Mainly, Proposition 9 will be used to establish asymptotic stability results for A&C’s chain in the large n, small p case. Indeed, since the Markov chains defined by kAC and k̃AC have the same geometric convergence rate, ρ̂ calculated using (5) with λ, L, and ε from Proposition 9 is an upper bound on ρ∗ = ρ∗ (X, Y ) for the 19 A&C chain. On the other hand, Proposition 9 can also be used in conjunction with Theorem 1 and Corollary 3 to get computable bounds on the total variation distance to stationarity for the A&C chain for fixed n and p. (m) In order to state the result, we require a bit of notation. For an integer m ≥ 1, let kAC : Rp × Rp → R+ be the chain’s m-step Mtd. For β ∈ Rp , let ϕ(β) = E (Z|B = β, Y, X) ∈ Rn . Then results in Subsection A.2 show that the ith element of ϕ(β) is given by XiT β + φ(XiT β) φ(XiT β) 1 (Y ) − 1{0} (Yi ) . {1} i Φ(XiT β) 1 − Φ(XiT β) Proposition 10. If ρ̂ is calculated using (5) with λ, L, and ε from Proposition 9, then for m ≥ 1 and β ∈ Rp , Z (m) kAC (β, β ′ ; Y, X) − πB|Y,X (β ′ |Y, X) dβ ′ ≤ H(β) ρ̂m−1 , Rp where H(β) = 2 +    L + tr XΣ−1 X T + Σ1/2 Σ−1 X T ϕ(β) + Qv − BF 1−λ Proof. We simply apply Corollary 3. First, putting M = Σ1/2 in (15), we have Z Z   Σ1/2 Σ−1 X T z + Qv − BF Ṽ1 (γ) πΓ|B,Y,X (γ|β, Y, X) dγ = Rn Rp 2 2 . πZ|B,Y,X (z|β, Y, X) dz 2   = Σ1/2 Σ−1 X T ϕ(β) + Qv − BF o n + tr Σ−1/2 X T var(Z|B = β, Y, X)XΣ−1/2 . Finally, a calculation similar to (16) shows that o n  tr Σ−1/2 X T var(Z|B = β, Y, X)XΣ−1/2 ≤ tr XΣ−1 X T , and the result follows. Calculating λ in Proposition 9 calls for maximization of a function on (0, 1)×Rp , which may be difficult. p Here we provide an upper bound on λ that’s easy to compute when p is small. Let {Sj }2j=1 denote the open orthants of Rp . For instance, if p = 2, then S1 , S2 , S3 and S4 are the open quadrants of the real plane. Define W (Sj ) = W (Sj ; X, Y ) as follows W (Sj ) = X Xi 1{0} (Yi )XiT + Xi ∈Sj X Xi 1{1} (Yi )XiT . Xi ∈−Sj The following result is proven in Subsection B.3. Proposition 11. An upper bound on λ1/2 in Proposition 9 is  2    λmax Σ−1/2 X T XΣ−1/2 − min p λmin Σ−1/2 W (Sj )Σ−1/2 . π 1≤j≤2 If this upper bound is strictly less than 1 (which is always true when Q is positive definite), then one can replace λ with its square in Proposition 9. 20 4.3 Drift and minorization for the Albert and Chib chain based on V2 The A&C chain has the same convergence rate as the flipped chain defined by the following Mtd: Z ′ ′ πZ|B,Y,X (z ′ |β, Y, X)πB|Z,Y,X (β|z, Y, X) dβ . ǩAC (z, z ) := ǩAC (z, z ; Y, X) = Rp In this subsection, we use V2 to establish d&m conditions for this chain, and these will be used later to prove asymptotic stability as p → ∞. First, for z ∈ Rn , define w(z) = XΣ−1 X T −1/2  −1 T X Σ (X z + Qv) − BF . Now define V̌2 : Rn → [0, ∞) as V̌2 (z) = kw(z)k2 . Proposition 12. The Mtd ǩAC satisfies the drift condition Z V̌2 (z ′ )ǩAC (z, z ′ )dz ′ ≤ λV̌2 (z) + L , (20) Rn  where λ = λ2max XΣ−1 X T and L = n(1 + λ). Moreover, for d > 2L/(1 − λ), ǩAC satisfies ǩAC (z, z ′ ) ≥ εq(z) , where q : Rn → [0, ∞) is a pdf, and ε = 2−n/2 e−d . Proof. It’s easy to verify that Z Rp V2 (β ′ )πB|Z,Y,X (β ′ |z, Y, X) dβ ′ = V̌2 (z) + n . We know from Proposition 8 that  Z Z   ′ ′ ′ ′ ′ πB|Z,Y,X (β |z , Y, X) πZ|B,Y,X (z |β, Y, X) dz dβ ′ ≤ λ2max XΣ−1 X T V2 (β)+2n . V2 (β ) Rn Rp Multiplying both sides of the above inequality by πB|Z,Y,X (β|z, Y, X) and integrating with respect to β yields (20). We now move on the the minorization condition. Note that πZ|B,Y,X (z|B, Y, X) depends on B only through XB, which is a one-to-one function of the n-dimensional vector A := XΣ−1 X T −1/2 X(B − BF ) . Hence, ǩAC (z, z ′ ) can be re-expressed as Z ′ πZ|A,Y,X (z ′ |α, Y, X)πA|Z,Y,X (α|z, Y, X) dα , ǩAC (z, z ) = Rn 21 where A|Z, Y, X ∼ N (w(Z), In ). To get the minorization condition, we will construct a pdf ν(α) := ν(α|Y, X) such that πA|Z,Y,X (α|z, Y, X) ≥ εν(α) whenever V̌2 (z) ≤ d. Define ν1 (α) = Then ν(α) = ν1 (α)/ −n/2 ε = (2π) inf z:V̌2 (z)≤d R Rn πA|Z,Y,X (α|z, Y, X) =   1 inf (2π)−n/2 exp − kα − wk2 . 2 w:w 2 ≤d ν1 (α′ ) dα′ is a pdf, and  1 inf exp − kα − wk2 dα ≥ (2π)−n/2 e−d 2 2 Rn w:w ≤d Z  Z exp(−kαk2 ) dα = 2−n/2 e−d . Rn The next result is the analogue of Proposition 10. The proof is omitted as it is essentially the same as the proof of the said proposition. Proposition 13. Assume that X has full row rank. Let λ, L, and ε be as in Proposition 12. If ρ̂ is calculated using (5), then for m ≥ 1 and β ∈ Rp , Z Rp (m) kAC (β, β ′ ; Y, X) − πB|Y,X (β ′ |Y, X) dβ ′ ≤ H(β) ρ̂m−1 , where H(β) = 2 +  L + tr XΣ−1 X T + 1−λ XΣ−1 X T −1/2   X Σ−1 X T ϕ(β) + Qv − BF 2 . Let ρ∗ = ρ∗ (X, Y ) denote the geometric convergence rate of the A&C chain. In the next section, which is the heart of the paper, we develop general convergence complexity results showing that, under weak regularity conditions, ρ∗ is bounded away from 1 both as n → ∞ (for fixed p), and as p → ∞ (for fixed n). 5 Results for the Albert and Chib Chain Part II: Asymptotics 5.1 Large n, small p In this section, we consider the case where p is fixed and n grows. In particular, we are interested in what happens to the geometric convergence rate of the A&C chain in this setting. Recall that the prior on B is ω(β) ∝ exp{−(β − v)T Q(β − v)/2} . 22 Since p is fixed, so is the prior. Hence, the hyperparameters v and Q will remain fixed throughout this subsection. In Subsection 3.1, we introduced the data set D := {(Xi , Yi )}ni=1 . We now consider a sequence of data sets, Dn := {(Xi , Yi )}ni=1 . So, each time n increases by 1, we are are given a new p × 1 covariate vector, Xi , and a corresponding binary response, Yi . In order to study the asymptotics, we assume that the (Xi , Yi ) pairs are generated according to a random mechanism that is consistent with the probit regression model. In particular, we make the following assumptions: p (A1) The pairs {(Xi , Yi )}∞ i=1 are iid random vectors such that Yi |Xi ∼ Bernoulli(G(Xi )), where G : R → (0, 1) is a measurable function; (A2) EX1 X1T is finite and positive definite; (A3) For j ∈ {1, 2, . . . , 2p } and β 6= 0,    P 1Sj (X1 ) + 1Sj (−X1 ) X1T β 6= 0 > 0 . Assumption (A1) contains the probit model as a special case. Thus, our results concerning the asymptotic behavior of A&C’s Markov chain do not require strict adherence of the data to the probit regression model. The only reason for assuming (A2) is to guarantee that, almost surely, X will eventually have full column rank. This is a necessary condition for posterior propriety when Q = 0. While (A3) is rather technical, it is clearly satisfied if X1 follows a distribution admitting a pdf (with respect to Lebesgue measure) that is positive over some open ball {γ ∈ Rp : kγk2 ≤ c}, where c > 0. It is shown in Subsection B.4 that (A3) also allows for an intercept. That is, even if the first component of X1 is 1 (constant), then as long as the remaining p − 1 components satisfy the density condition described above, (A3) is still satisfied. It was assumed throughout Section 3 that the posterior distribution is proper. Of course, for a fixed data set, this is check-able. All we need in the large n, small p regime is a guarantee that the posterior is proper for all large n, almost surely. The following result is proven in Subsection B.5. Proposition 14. Under assumptions (A1)-(A3), almost surely, the posterior distribution is proper for all sufficiently large n. For fixed n, Dn := {(Xi , Yi )}ni=1 represents the first n (random) covariate vectors and responses. Let ρ∗ (Dn ) denote the (random) geometric convergence rate of the corresponding A&C chain. Here is one of our main results. Theorem 15. If (A1)-(A3) hold, then there exists a constant ρ < 1 such that, almost surely, lim sup ρ∗ (Dn ) ≤ ρ . n→∞ 23 Proof. Let ρ̂(Dn ) denote the upper bound on ρ∗ (Dn ) that is based on λ, L, and ε from Proposition 9. We prove the result by showing that, almost surely, lim supn→∞ ρ̂(Dn ) ≤ ρ < 1. Note that L = p(1 + λ) and ε = 2−p/2 e−d (where d > 2L/(1 − λ)). Thus, control over λ provides control over L and ε as well. In particular, to prove the result it suffices to show that there exists a constant c ∈ [0, 1), such that, almost surely, lim sup λ(Dn ) ≤ c . (21) n→∞ Noting that Σ−1/2 X T XΣ−1/2 ≤ Ip , we have, by Proposition 11, (  !  ) −1/2 −1/2 X X 2 1 Σ Σ 1 λ1/2 ≤ 1− Xi 1{0} (Yi )XiT + Xi 1{1} (Yi )XiT . min λmin π 1≤j≤2p n n n n Xi ∈Sj Xi ∈−Sj (22) Fix j ∈ {1, 2, . . . , 2p }. By (A1) and the strong law, almost surely, !   −1/2 X Σ −1/2 1 1 X Σ Xi 1{0} (Yi )XiT + Xi 1{1} (Yi )XiT lim n→∞ n n n n Xi ∈Sj Xi ∈−Sj  −1/2  −1/2 = EX1 X1T EX1 X1T 1Sj (X1 )1{0} (Y1 ) + EX1 X1T 1Sj (−X1 )1{1} (Y1 ) EX1 X1T o −1/2 n −1/2 = EX1 X1T EX1 X1T 1Sj (X1 )(1 − G(X1 )) + EX1 X1T 1Sj (−X1 )G(X1 ) EX1 X1T . It follows from (26) and Lemma 22 that, almost surely, !  ) (  −1/2 X Σ 1 Σ −1/2 1 X Xi 1{0} (Yi )XiT + Xi 1{1} (Yi )XiT lim λmin n→∞ n n n n Xi ∈Sj Xi ∈−Sj n o  T T T ≥ λ−1 EX X EX X 1 (X )(1 − G(X )) + EX X 1 (−X )G(X ) . (23) λ 1 1 1 1 Sj 1 1 1 1 Sj 1 1 min max  T By (A2), λ−1 max EX1 X1 > 0. Hence by (22) and (23), to show that (21) holds, almost surely, it is enough to show that n o λmin EX1 X1T 1Sj (X1 )(1 − G(X1 )) + EX1 X1T 1Sj (−X1 )G(X1 ) > 0 . By (A3), for any β 6= 0,   P 1Sj (X1 )X1T β 6= 0 or 1Sj (−X1 )X1T β 6= 0 > 0 . (24) Since 0 < G(X1 ) < 1, (24) implies that, for any β 6= 0,      P β T X1 X1T 1Sj (X1 ) 1 − G(X1 ) β + β T X1 X1T 1Sj (−X1 )G(X1 ) β > 0 > 0 As a result, for any β ∈ Rp such that kβk2 = 1, o n β T EX1 X1T 1Sj (X1 )(1 − G(X1 )) + EX1 X1T 1Sj (−X1 )G(X1 ) β > 0 . 24 (25) It follows from (A2) that the left-hand side of (25) is continuous in β. Hence, we can take infimum on both sides of the inequality with respect to β and retain the greater-than symbol, which yields n o λmin EX1 X1T 1Sj (X1 )(1 − G(X1 )) + EX1 X1T 1Sj (−X1 )G(X1 ) > 0 , and the result follows. Theorem 15 shows that, under weak regularity conditions on the random mechanism that generates Dn := {(Xi , Yi )}ni=1 , A&C’s MCMC algorithm scales well with n. Johndrow et al. (2016) studied the convergence rate of the A&C chain as n → ∞ for a particular fixed sequence of covariates and responses. Suppose that p = 1, Q > 0 is a constant, v = 0, and X1 = X2 = · · · = Xn = 1. Johndrow et al. (2016) showed that if all the Bernoulli trials result in success, i.e., Y1 = Y2 = · · · = Yn = 1, then limn→∞ ρ∗∗ (Dn ) = 1. That is, in terms of L2 -geometric convergence rate, the convergence is arbitrarily slow for sufficiently large n. As we now explain, our results can be used to show that, in Johndrow et al.’s (2016) setting, almost any other sequence of responses leads to well behaved convergence rates. Let {Yi }∞ i=1 Pn −1 denote a fixed sequence of binary responses, and define p̂n = n i=1 Yi . It follows from Propositions 9 and 11 that the A&C chain satisfies d&m conditions with  2  2 n 2 n  2 λ= − ≤ 1 − {p̂n ∧ (1 − p̂n )} , p̂n ∧ (1 − p̂n ) n+Q πn+Q π L = 1 + λ, and ε = 2−1/2 e−d for d > 2L/(1 − λ). For any fixed n, suppose that there exist c1 , c2 ∈ (0, 1) such that c1 ≤ p̂n ≤ c2 , then (using (5)) one can find ρ < 1, which depends only on c1 ∧ (1 − c2 ), such that ρ∗ (Dn ) ≤ ρ . It now follows that the geometric convergence rates, ρ∗ (Dn ), are eventually bounded away from 1 so long as 0 < lim inf n→∞ p̂n ≤ lim supn→∞ p̂n < 1. (It is important to note that Dn is not random here.) Moreover, an analogous result holds for ρ∗∗ (Dn ). Here’s a formal statement. Corollary 16. For the intercept-only model described above, if 0 < lim inf n→∞ p̂n ≤ lim supn→∞ p̂n < 1, then for any δ∈  2 0, 1 − 1 − π   2 ! lim inf p̂n ∧ 1 − lim sup p̂n , n→∞ n→∞ lim supn→∞ ρ∗ (Dn ) ≤ ρ < 1, and lim supn→∞ ρ∗∗ (Dn ) ≤ ρ < 1, where ρ equals ρ̂ in (5) with    2 2 λ= 1− lim inf p̂n ∧ 1 − lim sup p̂n +δ , π n→∞ n→∞ L = 1 + λ , and ε = 2−1/2 e−d , where d > 2L/(1 − λ). 25 Proof. It suffices to prove the result for ρ∗∗ , since the argument for ρ∗ has already been provided. Fix an arbitrary δ. By Proposition 10, when n is sufficiently large, for any β ∈ R and m ≥ 1, Z (m) kAC (β, β ′ ; Y, X) − πB|Y,X (β ′ |Y, X) dβ ′ ≤ H(β) ρm−1 , R where H(β) is given in the said proposition. Let Π be the probability measure corresponding to the posterior density, πB|Y,X (β|Y, X). Then for any probability measure ν ∈ L2 (Π) and m ≥ 1, Z Z (m) kAC (β, β ′ ; Y, X)ν(dβ)−πB|Y,X (β ′ |Y, X) dβ ′ R R Z Z (m) kAC (β, β ′ ; Y, X) − πB|Y,X (β ′ |Y, X) dβ ′ ν(dβ) ≤ R R  Z H(β) ν(dβ) ρm−1 . ≤ R One can verify that H(β) can be bounded by polynomial functions. As a result, by Theorem 2.3 in R R Chen and Shao (2000), R H 2 (β)πB|Y,X (β|Y, X) dβ < ∞. Then by Cauchy-Schwarz, R H(β)ν(dβ) < ∞. Therefore, ρ∗∗ (Dn ) ≤ ρ for all sufficiently large n . Recall that the convergence rate analyses of Roy and Hobert (2007) and Chakraborty and Khare (2017), which establish the geometric ergodicity of the A&C chain for fixed n and p, are based on an un-centered drift function. We end this subsection with a result showing that, while this un-centered drift may be adequate for non-asymptotic results, it simply does not match the dynamics of the A&C chain well enough to get a result like Theorem 15. The following result is proven is Subsection B.6. Proposition 17. Assume that (A1) and (A2) hold, and that there exists β∗ ∈ Rp such that β∗ 6= 0 and G(γ) = G∗ (γ T β∗ ) for all γ ∈ Rp , where G∗ : R → (0, 1) is a strictly increasing function such that G∗ (0) = 1/2. Then, almost surely, any drift and minorization based on V0 (β) = kΣ1/2 βk2 is necessarily unstable in n. Remark 18. In the above proposition, if G∗ (θ) = Φ(θ) for all θ ∈ R, then the probit model is correctly specified, and the true parameter is β∗ . 5.2 Large p, small n In this subsection, we consider the case where n is fixed and p grows. In contrast with the strategy of the previous subsection, here we consider a deterministic sequence of data sets. Also, since p is changing, we need to specify a sequence of prior parameters {(Qp , vp )}∞ p=1 . Let Dp := {(vp , Qp , Xp , Y )} denote a sequence of priors and data sets, where Y is a fixed n × 1 vector of responses, Xp is an n × p matrix, vp is 26 a p × 1 vector, and Qp is a p × p positive definite matrix. (Note that positive definite-ness of Qp is required for posterior propriety.) So, each time p increases by 1, we are are given a new n × 1 column vector to add to the current design matrix. For the rest of this subsection, we omit the p subscript. We also assume that the following conditions hold for all p: (B1) X has full row rank; (B2) There exists a finite, positive constant, c, such that λmax (XQ−1 X T ) < c . Assumption (B1) is equivalent to XΣ−1 X T being non-singular. Assumption (B2) regulates the eigenvalues of the prior variance, Q−1 . More specifically, it requires that the prior drives B towards v. For illustration, if X = (1, 1, . . . , 1), then (B2) holds if for some τ > 0, Q−1 = diag(τ /p, τ /p, . . . , τ /p), or Q−1 = diag(τ, τ /22 , . . . , τ /p2 ). Assumption (B2) is satisfied by the generalized g-priors used by, e.g., Gupta and Ibrahim (2007), Ai-Jun and Xin-Yuan (2009), and Baragatti and Pommeret (2012). It can be shown (see, e.g., Chakraborty and Khare, 2017) that (B2) is equivalent to the existence of a constant c < 1 such that  λmax XΣ−1 X T < c . While (B2) may seem like a strong assumption, we will provide some evidence later in this subsection suggesting that it may actually be necessary. Here is our main result concerning the large p, small n case. Theorem 19. If (B1) and (B2) hold, then there exists a constant ρ < 1 such that ρ∗ (Dp ) ≤ ρ for all p. Proof. The proof is based on Proposition 12. Indeed, as in the proof of Theorem 15, it suffices to show that  there exists a c < 1 such that λ(Dp ) = λ2max XΣ−1 X T < c for all p. But this follows immediately from (B2). An important feature of Theorem 19 is that it holds for any sequence of prior means, {vp }∞ p=1 . This is achieved by adopting a drift function that is centered around a point that adapts to the prior mean. Although Gaussian priors with non-vanishing means are not commonly used in practice, it is interesting to see that Albert and Chib’s algorithm can be robust under location shifts in the prior, even when the dimension of the state space is high. The following result, which is proven in Subsection B.7, shows that (B2) is not an unreasonable assumption. Proposition 20. If n = 1 and v = 0, then as XΣ−1 X T tends to 1,  1 − ρ∗∗ = O 1 − XΣ−1 X T . 27 In particular, ρ∗∗ is not bounded away from 1 if (B2) does not hold. Acknowledgment. The second author’s work was supported by NSF Grant DMS-15-11945. Appendices A Useful Results A.1 Hermitian matrices For a Hermitian matrix M , let λmin (M ) and λmax (M ) denote the smallest and largest eigenvalues of M , respectively. The following result is part of a famous result due to H. Weyl (see, e.g., Horn and Johnson, 2012, Section 4.3). Lemma 21. [Weyl’s Inequality] Let M1 and M2 be Hermitian matrices of the same size, then λmax (M2 ) + λmin (M1 − M2 ) ≤ λmax (M1 ) ≤ λmax (M2 ) + λmax (M1 − M2 ) , and λmin (M2 ) + λmin (M1 − M2 ) ≤ λmin (M1 ) ≤ λmin (M2 ) + λmax (M1 − M2 ) . Let M1 and M2 be non-negative definite matrices of the same size. It is well known that λmax (M1 M2 M1 ) ≤ λ2max (M1 ) λmax (M2 ) , and λmin (M1 M2 M1 ) ≥ λ2min (M1 ) λmin (M2 ) . (26) The following result follows immediately from Lemma 21. Lemma 22. Let {Mj }∞ j=1 be a sequence of Hermitian matrices of the same size such that Mj → M . Then M is Hermitian, limj→∞ λmax (Mj ) = λmax (M ), and limj→∞ λmin (Mj ) = λmin (M ). A.2 Truncated normal distributions Fix θ ∈ R. Let Z+ ∼ TN(θ, 1; 1) and Z− ∼ TN(θ, 1; 0). Then we have EZ+ = θ + φ(θ) Φ(θ) and 28 EZ− = θ − φ(θ) . 1 − Φ(θ) (27) Also, θφ(θ) − varZ+ = 1 − Φ(θ)  φ(θ) Φ(θ) 2 θφ(θ) varZ− = 1 + − 1 − Φ(θ) and  φ(θ) 1 − Φ(θ) 2 . (28) Note that dEZ+ = varZ+ dθ and dEZ− = varZ− , dθ which shows that both expectations are increasing in θ. Recall that   φ(θ) 2 θφ(θ) . + g(θ) = Φ(θ) Φ(θ) Thus, we have the shorthand varZ+ = 1 − g(θ) and varZ− = 1 − g(−θ). The following result is Theorem 3 in Horrace (2015). Lemma 23 (Horrace (2015)). The function g(θ) is decreasing in θ. When θ < 0, g(θ) ∈ (2/π, 1), and when θ > 0, g(θ) ∈ (0, 2/π). In particular, varZ+ , varZ− ∈ (0, 1). B Proofs B.1 Corollary 3 via Proposition 24 We begin by resetting the stage from Section 2. Let X ⊂ Rp , Y ⊂ Rq , and let s̃ : X × Y → [0, ∞) and h̃ : Y × X → [0, ∞) be the conditional pdfs defined in Section 2. Let {Ψm }∞ m=0 be a Markov chain on X whose Mtd is given by ′ k(x, x ) = and let {Ψ̃m }∞ m=0 Z   s̃ x′ |γ h̃ γ|x dγ , Y be a Markov chain on Y whose Mtd is given by Z  ′ h̃ γ ′ |x s̃ (x|γ) dx . k̃(γ, γ ) = X Let K(x, ·) and Π denote the Mtf and invariant probability measure for {Ψm }∞ m=0 , respectively, and define K̃(γ, ·) and Π̃ analogously. Assume that both chains are Harris ergodic (i.e., irreducible, aperiodic, and Harris recurrent). The following result provides a total variation distance connection between the two chains. Proposition 24. Suppose that there exists R : Y × Z+ → (0, ∞) such that for Ψ̃0 ∼ ν̃ and m ≥ 0, we have kν̃ K̃ m (·) − Π̃(·)kTV ≤ Eν̃ R(Ψ̃0 , m) . Then for Ψ0 ∼ ν and m ≥ 1, we have m kνK (·) − Π(·)kTV ≤ Eν Z Y 29 R(γ, m − 1)h̃(γ|Ψ0 ) dγ  . Proof. Denote the m-step Mtds of the two chains as k(m) (x, x′ ) and k̃(m) (γ, γ ′ ), respectively. Moreover, let π(x) and π̃(γ) be the respective stationary densities for the two chains, and note that π(x) = Z s̃(x|γ)π̃(γ) dγ . Y The key is to relate the two m-step Mtds. Indeed, for m ≥ 1, we have k (m) ′ (x, x ) = Z s̃(x′ |γ ′ )k̃(m−1) (γ, γ ′ )h̃(γ|x) dγ dγ ′ . Y2 It follows that for any m ≥ 1, kνK m (·) − Π(·)kTV = Z Eν k(m) (Ψ0 , x′ ) − π(x′ ) dx′ XZ k(m) (Ψ0 , x′ ) − π(x′ ) dx′ ≤ Eν  Z ZX Z (m−1) ′ ′ ′ ′ = Eν k̃ (γ, γ )h̃(γ|Ψ0 ) dγ − π̃(γ ) dγ ′ dx′ s̃(x |γ ) X Y Y Z Z k̃(m−1) (γ, γ ′ )h̃(γ|Ψ0 ) dγ − π̃(γ ′ ) dγ ′ . ≤ Eν Y Y Letting ν̃ be the probability measure associated with h̃(γ|Ψ0 ) yields  Z m m−1 kνK (·) − Π(·)kTV ≤ Eν kν̃K − Π̃kTV ≤ Eν R(γ, m − 1)h̃(γ|Ψ0 ) dγ . Y B.2 An inequality related to Proposition 7 Let kΣ−1/2 X T D(BF + tα)Xαk2 . kΣ1/2 αk2 t∈(0,1) α6=0 λ = sup sup Proposition 25. λ < 1. Proof. If Q is positive definite, then by Lemmas 23 and 21, λ ≤ sup λ2max (Σ−1/2 X T D(β)XΣ−1/2 ) ≤ λ2max (Ip − Σ−1/2 QΣ−1/2 ) < 1 . β∈Rp For the remainder of the proof, assume that Q = 0. We begin by introducing some notations. For i = 1, 2, . . . , n, let Xi∗ = Xi 1{0} (Yi )−Xi 1{1} (Yi ). Define A1 , A2 , . . . , A2n to be the subsets of {1, 2, . . . , n}. For each Aj , define  Tj = α 6= 0 : (Xi∗ )T α ≥ 0 for all i ∈ Aj , (Xi∗ )T α ≤ 0 for all i ∈ Acj . 30 Let C = {j : Tj 6= ∅}. It’s easy to see that S j∈C Tj = Rp \ {0}. Note that XΣ−1 X T ≤ In . Thus, for any α ∈ Rp and t ∈ (0, 1), kΣ−1/2 X T D(BF + tα)Xαk2 ≤ kD(BF + tα)Xαk2 . Suppose that α ∈ Tj , then by Lemma 23, for all i ∈ Aj and t > 0, the ith diagonal of D(BF + tα) satisfies 1 − g(XiT (BF + tα))1{1} (Yi ) − g(−XiT (BF + tα))1{0} (Yi ) = 1 − g((−Xi∗ )T (BF + tα)) ∈ (0, 1 − c0 ], where c0 = min g(−(Xi∗ )T BF ) ∈ (0, 1) . 1≤i≤n As a result, whenever α ∈ Tj , kD(BF + tα)Xαk2 ≤ kXαk2 − c0 (2 − c0 ) X kXiT αk2 i∈Aj for all t ∈ (0, 1). It follows that X kX T αk2 i . 1/2 αk2 α∈Tj kΣ i∈A λ ≤ 1 − c0 (2 − c0 ) min inf j∈C j Let Rj (α) = P i∈Aj kXiT αk2 /kΣ1/2 αk2 . Note that for any constant c 6= 0, Rj (cα) = Rj (α). Hence, to show that λ < 1, it suffices to verify that for each j ∈ C, inf α∈Tj∗ Rj (α) > 0, where Tj∗ = {α ∈ Tj : kαk = 1}. Since Tj∗ is compact, and Rj (α) is continuous in Tj∗ , it’s enough to show that for all α ∈ Tj∗ , Rj (α) > 0. Lesaffre and Kaufmann (1992) showed that BF exists if and only if the following condition holds: (C0) For every α ∈ Rp \ {0}, there exists an i ∈ {1, 2, . . . , n} such that either XiT α 1{1} (Yi ) < 0 or XiT α1{0} (Yi ) > 0. Hence, for any α ∈ Rp , there exists i ∈ {1, 2, . . . , n} such that (Xi∗ )T α > 0. This implies that for any j ∈ C and α ∈ Tj∗ , there exists i ∈ Aj such that kXiT αk > 0. As a result, Rj (α) > 0 for any α ∈ Tj∗ . B.3 Proposition 11 Proposition 11. An upper bound on λ1/2 in Proposition 9 is    2  min p λmin Σ−1/2 W (Sj )Σ−1/2 . λmax Σ−1/2 X T XΣ−1/2 − π 1≤j≤2 31 Proof. For θ ∈ {0, 1} and γ, β ∈ Rp , define u(γ; θ, β) = By Lemma 23, for any β ∈ Rp , By Lemma 21,   1 if θ = 1 and γ T β > 0    1 if θ = 0 and γ T β < 0    0 otherwise .    2 1 − u(Xi ; Yi , β) . 1 − 1{1} (Yi )g XiT β − 1{0} (Yi )g −XiT β ≤ 1 − π kΣ−1/2 X T D(BF + tα)Xαk kΣ1/2 αk t∈(0,1) α6=0   ≤ sup λmax Σ−1/2 X T D(β)XΣ−1/2 λ1/2 = sup sup β∈Rp  ≤ λmax Σ−1/2 X T XΣ−1/2  2 − inf λmin π β∈Rp ( Σ−1/2 Now, since u(Xi ; Yi , 0) = 0, n X i=1  Xi 1 − u(Xi ; Yi , β) XiT ! Σ−1/2 ) . 1 − u(Xi ; Yi , 0) ≥ 1 − u(Xi ; Yi , β) for any β ∈ Rp . Therefore, # ) ( n " X  2 Xi 1 − u(Xi ; Yi , β) XiT Σ−1/2 inf λmin Σ−1/2 π β∈Rp i=1 # ) ( n " X  T 2 −1/2 −1/2 = inf λmin Σ . Xi 1 − u(Xi ; Yi , β) Xi Σ π β6=0 i=1 For j = 1, 2, . . . , 2p , let Sj′ be the closure of Sj . Note that if a vector β ∈ Sj′ \ {0} for some j, then for any θ ∈ {0, 1} and γ ∈ Sj ∪ (−Sj ), u(γ; θ, β) =  1 {1} (θ) {0} (θ) S2p if γ ∈ −Sj . = Rp , by Lemma 21, # ) ( n " X  T 2 −1/2 −1/2 Xi 1 − u(Xi ; Yi , β) Xi Σ inf λmin Σ π β6=0 i=1 # ) ( n " X  2 = Xi 1 − u(Xi ; Yi , β) XiT Σ−1/2 min inf λmin Σ−1/2 π 1≤j≤2p β∈Sj′ \{0} i=1       X X 2 min p λmin Σ−1/2  Xi 1{0} (Yi )XiT + Xi 1{1} (Yi )XiT  Σ−1/2 . ≥   π 1≤j≤2 Since ′ j=1 Sj 1 if γ ∈ Sj Xi ∈Sj Xi ∈−Sj The result follows immediately. 32 B.4 Assumption (A3) allows for an intercept Suppose that X1 is a p-dimensional random vector with p > 1, such that the first component of X1 is 1, and the remaining p − 1 components follow a distribution that admits a pdf with respect to Lebesgue measure that is positive over the open ball Bc := {γ ∈ Rp−1 : kγk2 < c}, where c > 0. We will demonstrate that (A3) is satisfied. Let β ∈ Rp \ {0} be arbitrary. The set   γ ∈ Rp : γ T β = 0 ∩ (1, γ T )T : γ ∈ Bc is in a hyperplane, whose dimension is at most p−2. Meanwhile, the support of X1 ’s distribution has positive  Lebesgue measure on the (p − 1)-dimensional hyperplane (1, γ T )T : γ ∈ Rp−1 . Thus P(X1T β 6= 0) = 1.  On the other hand, it’s easy to verify that P X1 ∈ Sj ∪ (−Sj ) > 0. Thus,       P 1Sj (X1 ) + 1Sj (−X1 ) X1T β 6= 0 = P 1Sj (X1 ) + 1Sj (−X1 ) 6= 0 and X1T β 6= 0 > 0 , so (A3) holds. B.5 Proposition 14 Proposition 14. Under assumptions (A1)-(A3), almost surely, the posterior distribution is proper for sufficiently large n. Proof. It suffices to consider the case that Q = 0. Fix n and p. Chen and Shao (2000) proved that the posterior is proper if the following two conditions are satisfied: (C1) X has full column rank; (C3) The maximum likelihood estimator of β exists in Rp . (These two conditions are equivalent to (C1) and (C2) in Subsection 3.1.) As mentioned in Subsection B.2, (C3) holds if and only if the following condition is satisfied: (C0) For every β ∈ Rp \ {0}, there exists an i ∈ {1, 2, . . . , n} such that either XiT β 1{1} (Yi ) < 0 or XiT β1{0} (Yi ) > 0. We can therefore prove the result by showing that, almost surely, (C1) and (C0) will hold for all sufficiently large n. As mentioned previously, (A2) ensures that, almost surely, (C1) will hold for all sufficiently large n. p Now recall that {Sj }2j=1 denotes the set of open orthants in Rp . As before, let Sj′ denote the closure of Sj . It follows from (A1) and (A3) that, for every j ∈ {1, 2, . . . , 2p }, at least one of the following two statements must hold: 33   • P X1 ∈ Sj , Y1 = 1 > 0 and P X1 ∈ Sj , Y1 = 0 > 0 ,   • P X1 ∈ −Sj , Y1 = 1 > 0 and P X1 ∈ −Sj , Y1 = 0 > 0 . Thus, almost surely, when n is sufficiently large (say n > N ), for each j ∈ {1, 2, . . . , 2p } there exists i′ , i′′ ∈ {1, 2, . . . , n} such that either Xi′ , Xi′′ ∈ Sj , (Yi′ , Yi′′ ) = (1, 0), or Xi′ , Xi′′ ∈ −Sj , (Yi′ , Yi′′ ) = p (1, 0). Now suppose that n > N , and let β ∈ Rp \ {0} be arbitrary. Since ∪2j=1 (Sj′ \ {0}) = Rp \ {0}, there ′ exists an integer j(β) such that β ∈ Sj(β) \ {0}. One can pick i′ and i′′ such that either Xi′ , Xi′′ ∈ Sj(β) , (Yi′ , Yi′′ ) = (1, 0), or Xi′ , Xi′′ ∈ −Sj(β) , (Yi′ , Yi′′ ) = (1, 0). Note that for any γ ∈ Sj(β) , γ T β > 0. Depending on whether Xi′ , Xi′′ ∈ Sj(β) or Xi′ , Xi′′ ∈ −Sj(β), (C0) holds with either i = i′′ or i = i′ . B.6 Proposition 17 Proposition 17. Assume that (A1) and (A2) hold, and that there exists β∗ ∈ Rp such that β∗ 6= 0 and G(γ) = G∗ (γ T β∗ ) for all γ ∈ Rp , where G∗ : R → (0, 1) is a strictly increasing function such that G∗ (0) = 1/2. Then, almost surely, any drift and minorization based on V0 (β) = kΣ1/2 βk2 is necessarily unstable in n. Proof. We prove the result for the flat prior, and leave the extension to the reader. Note that V0 (β) = β T X T Xβ, and assume that there exist λ := λ(Dn ) < 1 and L := L(Dn ) < ∞ such that Z V0 (β ′ )kAC (β, β ′ ) dβ ′ ≤ λV0 (β) + L . Rp Suppose further that there exists d := d(Dn ) > 2L/(1 − λ) such that, for all β with V0 (β) < d, kAC (β, β ′ ) ≥ εq(β ′ ) , where ε := ε(Dn ) > 0, and q(β ′ ) := q(β ′ |Y, X) is a pdf on Rp . We will show that ε → 0 as n → ∞ almost surely. Our first step is to show L → ∞. Let β = 0, then V0 (β) = 0, and Z  V0 (β ′ )kAC (β, β ′ ) dβ ′ = p+tr (X T X)−1 X T var(Z|B = 0, Y, X)X(X T X)−1 Rp + E(Z T |B = 0, Y, X)X(X T X)−1 X T E(Z|B = 0, Y, X) . Hence, when β = 0, a lower bound for R Rp V0 (β ′ )kAC (β, β ′ ) dβ ′ is given by !T  −1 n 1X XT X V0 (β) + p + n Xi E(Zi |B = 0, Y, X) n n i=1 34 ! n 1X Xi E(Zi |B = 0, Y, X) . n i=1 (29) Note that {Xi E(Zi |B = 0, Y, X)}ni=1 are iid. By (27), we have r   r r   2 2 2  1{1} (Y1 )− 1{0} (Y1 ) X1 = E 2G∗ (X1T β∗ ) − 1 X1 . E X1 E(Z1 |B = 0, Y, X) = E π π π Now, since EX1 X1T is positive definite and β∗ 6= 0, β∗T EX1 X1T β∗ > 0, indicating that P(X1T β∗ 6= 0) > 0. It’s easy to see that (2G∗ (X1T β∗ ) − 1)β∗T X1 > 0 whenever X1T β∗ 6= 0, which implies that     β∗T E 2G∗ (X1T β∗ ) − 1 X1 > 0. As a result, E 2G∗ (X1T β∗ ) − 1 X1 6= 0. Then, by the strong law and (A2), almost surely, lim n→∞ !T  ! −1 n n 1X XT X 1X Xi E(Zi |B = 0, Y, X) Xi E(Zi |B = 0, Y, X) n n n i=1 i=1   −1  2  T EX1 X1T E 2G∗ (X1T β∗ ) − 1 X1 > 0 . = E 2G∗ (X1T β∗ ) − 1 X1 π It then follows from (29) that there exists a positive constant c such that almost surely, L > cn for any large enough n. Note that d > 2L. By (A2), X T X is of order n. Thus, almost surely, there exists a positive constant b such that for all sufficiently large n,   β ∈ Rp : kβk2 ≤ b2 ⊂ β ∈ Rp : V0 (β) < d .  Let γ ∈ Rp be a fixed vector such that 0 < kγk2 ≤ b2 . Then both γ and −γ are in the small set β ∈ Rp : V0 (β) < d for all sufficiently large n. We now investigate the conditional densities kAC (γ, β ′ ) and kAC (−γ, β ′ ). Let (B1 , B2 ) be a random vector such that the conditional distribution of B2 given B1 = β is precisely the Mtd kAC (β, β ′ ). Then T −1 E(B2 |B1 = β) = (X X) n X Xi E(Zi |B = β, Y, X) . i=1 Thus, 2 E(B2 |B1 = γ) − E(B2 |B1 = −γ)  T −1  X  n  X X 1 = Xi E(Zi |B = γ, Y, X) − E(Zi |B = −γ, Y, X) n n 2 . (30) i=1 Now using (27), we have E(Zi |B = γ, Y, X) − E(Zi |B = −γ, Y, X)     φ(XiT γ) φ(XiT γ) φ(XiT γ) φ(XiT γ) T T − + 1{1} (Yi ) + 2Xi γ − 1{0} (Yi ) = 2Xi γ + Φ(XiT γ) 1 − Φ(XiT γ) 1 − Φ(XiT γ) Φ(XiT γ) = 2XiT γ + φ(XiT γ) φ(XiT γ) − . Φ(XiT γ) 1 − Φ(XiT γ) 35 Another appeal to the strong law yields n  1X Xi E(Zi |B = γ, Y, X) − E(Zi |B = −γ, Y, X) lim n→∞ n i=1    φ(X1T γ) φ(X1T γ) T − X1 . = E 2X1 γ + Φ(X1T γ) 1 − Φ(X1T γ) As in Subsection A.2, let Z+ ∼ TN(θ, 1; 1) and Z− ∼ TN(θ, 1; 0). Note that 2θ + φ(θ) φ(θ) − = EZ+ + EZ− . Φ(θ) 1 − Φ(θ) Since both expectations on the right-hand side are (strictly) increasing functions of θ, it follows that the left-hand side is positive when θ > 0 and negative when θ < 0. Thus,   φ(X1T γ) φ(X1T γ) T 2X1 γ + − γ T X1 > 0 Φ(X1T γ) 1 − Φ(X1T γ) (31) whenever X1T γ 6= 0. Since EX1 X1T is positive definite and γ 6= 0, P(X1T γ 6= 0) > 0. Taking expectation on both sides of (31) yields T γ E  2X1T γ   φ(X1T γ) φ(X1T γ) − X1 > 0 , + Φ(X1T γ) 1 − Φ(X1T γ) and it follows that E  2X1T γ   φ(X1T γ) φ(X1T γ) − X1 6= 0 . + Φ(X1T γ) 1 − Φ(X1T γ) By (30) and (A2), almost surely, lim n→∞ 2 E(B2 |B1 = γ) − E(B2 |B1 = −γ)     φ(X1T γ) φ(X1T γ) T −1 T = EX1 X1 E 2X1 γ + − X1 Φ(X1T γ) 1 − Φ(X1T γ) 2 =: cγ > 0 . Next, consider var(B2 |B1 = γ) and var(B2 |B1 = −γ). Note that for any β ∈ Rp , var(B2 |B1 = β) = (X T X)−1 + (X T X)−1 X T var(Z|B = β, Y, X) X(X T X)−1 . It follows from Lemma 23 that var(Zi |B = β, Y, X) < 1 for all i ∈ {1, 2, . . . , n}. Therefore, var(B2 |B1 = β) ≤ 2(X T X)−1 . Then by Chebyshev’s inequality, for any δ > 0, P  B2 − E(B2 |B1 = γ) 2  2  > δ B1 = γ ≤ tr (X T X)−1 , δ 36 and P  2 B2 − E(B2 |B1 = −γ)  2  > δ B1 = −γ ≤ tr (X T X)−1 . δ Note that by (A2), almost surely, tr {(X T X)−1 } = O(n−1 ). We have shown in the previous paragraph that with probability 1, kE(B2 |B1 = γ) − E(B2 |B1 = −γ)k2 converges to a positive constant cγ . Now, fix   δ ∈ (0, cγ /4), and let C1 = β ∈ Rp : kβ − E(B2 |B1 = γ)k2 > δ , C2 = β ∈ Rp : kβ − E(B2 |B1 = −γ)k2 > δ . With probability 1, for all sufficiently large n, C1 ∪ C2 = Rp . As a result, almost surely,  Z Z Z  min kAC (γ, β), kAC (−γ, β) dβ ≤ lim kAC (−γ, β) dβ = 0 . kAC (γ, β) dβ + lim n→∞ n→∞ Rp C2 C1 Therefore, ε≤ Z inf Rp {β:V0 (β)<d} with probability 1.  kAC (β, β ′ ) dβ ′ → 0 B.7 Proposition 20 Proposition 20. If n = 1 and v = 0, then as XΣ−1 X T tends to 1,  1 − ρ∗∗ = O 1 − XΣ−1 X T . In particular, ρ∗∗ is not bounded away from 1 if (B2) does not hold. Proof. Without loss of generality, assume that Y = Y1 = 1. The A&C chain has the same convergence rate as the flipped chain defined by the following Mtd: ′ ′ ǩAC (z, z ) := ǩAC (z, z ; Y, X) = Z Rp πZ|B,Y,X (z ′ |β, Y, X)πB|Z,Y,X (β|z, Y, X) dβ . The flipped chain is reversible with respect to πZ|Y,X (z|Y, X). Roberts and Rosenthal’s (1997) Theorem 2 and Liu et al.’s (1994) Lemma 2.3 imply that ρ∗∗ ≥ γ0 := cov(Z, Z ′ |Y, X) , var(Z|Y, X) where Z ′ |Z = z, Y, X ∼ ǩAC (z, ·), and Z|Y, X ∼ πZ|Y,X (·|Y, X). Hence, it suffices to show that 1 − γ0 = O 1 − XΣ−1 X T 37  . We begin by giving an explicit form of πZ|Y,X (z|Y, X). Note that Z πZ|B,Y,X (z|β, Y, X)πB|Y,X (β|Y, X) dβ   Z 1 T 1 2 exp − (z − Xβ) − β Qβ dβ ∝ 1(0,∞) (z) 2 2 Rp   1 ∝ 1(0,∞) (z) exp − (1 − ψ)z 2 , 2 πZ|Y,X (z|Y, X) = Rp where ψ = XΣ−1 X T . Thus, Z|Y, X ∼ TN(0, (1 − ψ)−1 ; 1). It follows immediately from (27) and (28) that ′ E(Z|Y, X) = E(Z , Y, X) = r 2 (1 − ψ)−1/2 and var(Z|Y, X) = π   2 1− (1 − ψ)−1 . π To calculate cov(Z, Z ′ |Y, X), first note that cov(Z, Z ′ |Y, X) = E(ZZ ′ |Y, X) − 2 (1 − ψ)−1 . π Now Z|B, Y, X ∼ TN(XB, 1; 1) and XB|Z, Y, X ∼ N (ψZ, ψ). Therefore,    φ(XB) ′ 2 Y, X E(ZZ |Y, X) = ψE Z |Y, X + E Z Φ(XB)  ≥ ψE Z 2 |Y, X = ψ(1 − ψ)−1 . Hence, Collecting terms, we have  2 cov(Z, Z ′ |Y, X) ≥ 1 − (1 − ψ)−1 − 1 . π γ0 ≥ 1 − (1 − ψ) , (1 − 2/π) and the result follows. References A I -J UN , Y. and X IN -Y UAN , S. (2009). Bayesian variable selection for disease classification using gene expression data. Bioinformatics 26 215–222. A LBERT, J. H. and C HIB , S. (1993). Bayesian analysis of binary and polychotomous response data. Journal of the American statistical Association 88 669–679. 38 BARAGATTI , M. and P OMMERET, D. (2012). A study of variable selection using g-prior distribution with ridge parameter. Computational Statistics & Data Analysis 56 1920–1934. C HAKRABORTY, S. and K HARE , K. (2017). Convergence properties of Gibbs samplers for Bayesian probit regression with proper priors. Electronic Journal of Statistics 11 177–210. C HEN , M. H. and S HAO , Q. M. (2000). Propriety of posterior distribution for dichotomous quantal response models. Proceedings of the American Mathematical Society 129 293–302. D IACONIS , P., K HARE , K. and S ALOFF -C OSTE , L. (2008). Gibbs sampling, exponential families and orthogonal polynomials (with discussion). Statistical Science 23 151–200. D URMUS , A. and M OULINES , E. (2016). High-dimensional Bayesian inference via the unadjusted Langevin algorithm. arXiv:1605.01559 . F LEGAL , J. M., H ARAN , M. and J ONES , G. L. (2008). Markov chain Monte Carlo: Can we trust the third significant figure? Statistical Science 23 250–260. F ORT, G., M OULINES , E., ROBERTS , G. and ROSENTHAL , J. (2003). On the geometric ergodicity of hybrid samplers. Journal of Applied Probability 40 123–146. G UPTA , M. and I BRAHIM , J. G. (2007). Variable selection in regression mixture modeling for the discovery of gene regulatory networks. Journal of the American Statistical Association 102 867–880. H ORN , R. A. and J OHNSON , C. R. (2012). Matrix Analysis. 2nd ed. Cambridge University Press. H ORRACE , W. C. (2015). Moments of the truncated normal distribution. Journal of Productivity Analysis 43 133–138. J OHNDROW, J. E., S MITH , A., P ILLAI , N. and D UNSON , D. B. (2016). Inefficiency of data augmentation for large sample imbalanced data. arXiv:1605.05798 . J ONES , G. L. (2001). Convergence Rates and Monte Carlo Standard Errors for Markov Chain Monte Carlo Algorithms. Ph.D. thesis, University of Florida. J ONES , G. L. and H OBERT, J. P. (2001). Honest exploration of intractable probability distributions via Markov chain Monte Carlo. Statistical Science 312–334. Ł ATUSZY ŃSKI , K., M IASOJEDOW, B. and N IEMIRO , W. (2013). Nonasymptotic bounds on the estimation error of MCMC algorithms. Bernoulli 19 2033–2066. 39 L ESAFFRE , E. and K AUFMANN , H. (1992). Existence and uniqueness of the maximum likelihood estimator for a multivariate probit model. Journal of the American Statistical Association 87 805–811. L IU , J. S., W ONG , W. H. and KONG , A. (1994). Covariance structure of the Gibbs sampler with applications to the comparisons of estimators and augmentation schemes. Biometrika 81 27–40. M ARCHEV, D. and H OBERT, J. P. (2004). Geometric ergodicity of van Dyk and Meng’s algorithm for the multivariate student’s t model. Journal of the American Statistical Association 99 228–238. M EYN , S. P. and T WEEDIE , R. L. (2012). Markov Chains and Stochastic Stability. 2nd ed. Cambridge University Press. R AJARATNAM , B. and S PARKS , D. (2015). MCMC-based inference in the era of big data: A fundamental analysis of the convergence complexity of high-dimensional chains. arXiv:1508.00947 . ROBERTS , G. O. and ROSENTHAL , J. S. (1997). Geometric ergodicity and hybrid Markov chains. Electronic Communications in Probability 2 13–25. ROBERTS , G. O. and ROSENTHAL , J. S. (1998). Markov chain Monte Carlo: Some practical implications of theoretical results (with discussion). Canadian Journal of Statistics 26 5–31. ROBERTS , G. O. and ROSENTHAL , J. S. (2001). Markov chains and de-initializing processes. Scandinavian Journal of Statistics 28 489–504. ROBERTS , G. O. and T WEEDIE , R. L. (2001). Geometric L2 and L1 convergence are equivalent for reversible Markov chains. Journal of Applied Probability 38A 37–41. ROSENTHAL , J. S. (1995). Minorization conditions and convergence rates for Markov chain Monte Carlo. Journal of the American Statistical Association 90 558–566. ROY, V. and H OBERT, J. P. (2007). Convergence rates and asymptotic standard errors for Markov chain Monte Carlo algorithms for Bayesian probit regression. Journal of the Royal Statistical Society, Series B 69 607–623. ROY, V. and H OBERT, J. P. (2010). On Monte Carlo methods for Bayesian multivariate regression models with heavy-tailed errors. Journal of Multivariate Analysis 101 1190–1202. RUDIN , W. (1976). Principles of Mathematical Analysis. 3rd ed. McGraw-Hill Publishing Co. 40 S INCLAIR , A. and J ERRUM , M. (1989). Approximate counting, uniform generation and rapidly mixing Markov chains. Information and Computation 82 93–133. VATS , D. (2017). Geometric ergodicity of Gibbs samplers in Bayesian penalized regression models. Electronic Journal of Statistics 11 4033–4064. YANG , J. and ROSENTHAL , J. S. (2017). Complexity results for MCMC derived from quantitative bounds. arXiv:1708.00829 . YANG , Y., WAINWRIGHT, M. J. and J ORDAN , M. I. (2016). On the computational complexity of highdimensional Bayesian variable selection. The Annals of Statistics 44 2497–2532. 41
10math.ST
Intelligent Computer Numerical Control Unit for Machine Tools Joze BALIC University of Maribor, Faculty of Mechanical Engineering Laboratory for Intelligent Manufacturing Post: SI-2000, City: Maribor Country: Slovenia E-mail: [email protected] http://www.uni-mb.si Abstract The paper describes a new CNC control unit for machining centres with learning ability and automatic intelligent generating of NC programs on the bases of a neural network, which is built-in into a CNC unit as special device. The device performs intelligent and completely automatically the NC part programs only on the bases of 2D, 2,5D or 3D computer model of prismatic part. Intervention of the operator is not needed. The neural network for milling, drilling, reaming, threading and operations alike has learned to generate NC programs in the learning module, which is a part of intelligent CAD/CAM system. Keywords: Intelligent CNC & CAD/CAM, Neural Networks, Machining Centres 1. Description of the problem Figure 1 shows the conventional CNC unit, connected with the machining centre [1]. The input of data respectively NC program of the part is usually done through DNC (Direct Numerical Control) connection, with punched tape through the tape reader, or manual, through interface for manual input. The manual input is used only for corrections of NC program and for changing technological parameters. DNC Manual input Interface Reader Processor Decoding CNC machine tool Position memory X, Y, Z Function memory M, S, T Interpolation program Function program Comparison Position measuring Interface Position meter Tools W Motor M Position loop Amplifier Geometric data Conventional CNC unit Figure 1: The conventional CNC unit for machine tool Extended and advanced version of this paper appears in Neural-Network-Based Numerical Control for Milling Machine, Journal of Intelligent and Robotic System, Volume 40, Issue 4, Aug 2004; Pages: 343358 1 For each individual part the new NC part program must be set up, as the control does not remember already performed operations and can not automatically change program parameters (except some technological parameters, as are cutting conditions, corrections of lengths of tools, displacement of offset and zero points). Also the use of modern CAD/CAM systems does not solve this problem. These systems enable that a new NC part program can be performed faster and more reliable. Some systems enable also saving of certain processing strategies, but the intervention of skilled NC programmer is still necessary. The programs performed on such way are not possible to use directly in CNC control of the machine tool, however they must be adapted in so-called post-processor phase. The task of this phase is that generally valid file of the tool path (CLDATA) is modified for each individual machine tool respectively CNC control. Each NC part program and each change must go over this post-processor phase. 2. State of the art and existing solutions There are only some solutions known from the literature, which describe the broader field of research presenting in this paper. Literature [2] describes the NC control unit with integrated function of learning. The NC control unit performs the teaching NC part program, which is compared with the inserted NC part program and performs then the resulting NC part program. On this way the operator of the machine tool can choose the “teaching mode” and changes the actual NC part program according to the suggestion from teaching program. The solution requires the intervention of the skilled worker during the NC programming. Literature [3] describes a device for generating the tool path on NC machine tools and adequate NC control. The device at first recognizes the geometric feature characteristics of CAD model of the part and on the base of preserved processing procedures (machining cycles, sub-programs) chooses the most suitable tool path. The device can choose only that machining procedures, which have been previously defined as typical processing for particularly sub-programs. Literature [4] describes the dialog orientated program system for programming of CNC machine tools. Hereby it is possible to choose interactively different control programs and procedures, which are then automatically composed into a NC part program. The intervention of the operator, programmer is necessary. Literature [5] describes a learning method of a purpose made device. For this reason a special man-machine interface, which enables a dialog with the user and learning, is built-in into the control unit of the machine. Literature [6] describes a device and a method for generating of NC programs. A special device saves the data about parts, belonging coordinates, characteristically junctions and time of assembly for single electronic components. The solution enables shortening of the time for the composition of NC programs and reduction of mistakes at preparing of programs. In the paper [7] an adaptive controller with optimisation function of the milling process is described. It used neural network to adjust the learning procedure and for online modelling of the milling process. The efficiency of NN based controller is higher than of the conventional CNC controller. In the paper [8] the new concept of CNC control unit is proposed. It consists from feature based NC unit and a basic control unit. The feature-based unit is used as exchange for geometrical data between basic NC unit and CAD/CAM system. It can be connected in Internet and used in virtual manufacturing. 2 Common for all described solutions is, that manual intervention of skilled operator, programmer is still necessary for preparing of NC part program for CNC machine tools. The systems can’t prepare NC programs for parts, which are not saved in the databases and can’t choose and use the machining strategies automatically. 3. Intelligent computer numerical control unit 3.1 Description The new control unit for CNC machining centres - milling, drilling and operations like drilling is shown on Figure 2. It has the capability of learning and intelligent, automated generating of NC part programs on the bases of neural network, which is built-in into a Conventional CAD/CAM system NN teaching module CAD part model NN device Manual input Internal interface Decoding Position memory X, Y, Z Function memory M, S, T Interpolation program Function program Comparison Position measuring Interface W M Amplifier Figure 2: Neural Network Based CNC Machine Tool Control Unit The neural network for milling, drilling, reaming, threading and operations like this have learned to generate NC part programs in system for learning, which is not a constituent part of a new CNC control unit, and works independent. The new control unit then completely automatically, without any intervention of the operator, on the bases of a CAD model of a part, generate NC part programs for different products, which are designed for the production on CNC machining centres and for which previously NC part programs have not been done. CNC control unit consists of a modified microcomputer, which includes a module for decoding and a module for manual input of commands, which are mostly of technological nature (feed rate, revolution speed, switch on/off of cooling liquid etc.). Computer includes also the internal interface, which has the function of data transmission from the NN device into the position memory. 3.2 Description of the NN device NN device (Figure 3) consist of: - A module for recognizing of geometric and technological features from CAD model of the part, 3 - Computer CAD model of the part, which contains geometric and technological features, - NN device for milling, which has been learned for NC programming of milling, drilling and machining operations like drilling and - NC control program for the part, which has been sent to control device, as a CAD model of the part. Conventional CAD/CAM system NN teaching module CAD part model Identification of geometrical and technological features Features based CAD model of the part NN milling module NC control program Figure 3: Schematic lay-out of NN device In the phase of learning the NN device is connected to the module for learning of the neural network, which takes the data from the usual, commercial available CAD/CAM system, which is used for programming of NC/CNC machine tools. NN device automatically generates NC programs for CAD models of each individual product, which it becomes from the commercial CAD/CAM programming system. CNC control unit after this invention can receive the data for teaching of NN device from a special module for teaching, which is not the constituent part of the control unit. The task of the module for teaching is to teach the neural network, which is built-in into NN device, the principles and the technology of NC programming of all machining operations on CNC machining centres, mostly milling, drilling and operations alike. In principle for this purpose different systems of neural network and different, also commercial developed software, can be used [9,10,11]. If we want to meet special criteria at machining (costs, time, quality of cutting, tool life, high speed cutting etc.) special developed neural network must be used. 4. Mode of operation 4.1 Intelligent automatic mode In the mode of intelligent, completely automated processing the CNC control unit receives the data about CAD model of the product from the usual, commercially available CAD/CAM system for programming of CNC machines [13,14,15]. The model is then transmitted to NN device, which first of all recognizes geometric and technological features of CAD model of the part [16,17]. After recognizing the geometric and technological features are classified. On this way the new CAD model of 4 the part is built again, which is now based on this characteristic features. Such model is then transmitted to NN device for milling, which on the base of learned intelligent procedures determines the most suitable machining operations and cutting parameters (cutting speed, feed-rate and the depth of cutting), with respect to chosen conditions (machining time, surface quality, machining costs). The exit from the NN device for milling is NC part program for the processed part, which includes all geometric data about the mode (linear G01 or circular G02/G03 interpolation, etc.) and coordinates of cutting tool path (for instance milling cutter), technological data (revolution speed Sxxxx, feed-rate Fxx, depth of cutting) and auxiliary data (coordinates of reference, zero and starting points, direction of rotation of the main spindle M02/M03, change of cutting tools M06, etc.). The data are then transmitted to internal interface, which split the data in NC program on tool path data (coordinates of movement in axis X, Y, Z and/or rotation A, B, C around coordinate axis X, Y, Z and on data about functions (M, S, T). The geometrical data are obtained from the NC part program for each individual part and are treated in the position control circuit. 4.2 Neural network learning mode In the learning mode the learned NC programming system, which is based on the principle of neural network, is put into the NN device, through the system for learning. The method of teaching the NN device is performed in a special NN device for teaching. The operation principle of NN device is shown more detailed on Figure 4. Engineering drawings of parts 1,2,3,...n Conventional CAD/CAM system Teaching NC program NN teaching module Testing NO IF YES NN device Figure 4: Procedure of learning and generation of neural network In the learning phase, the NN device is connected to the teaching module designed for instructing the neural network (NN). The teaching module takes the data from conventional, commercially available CAD/CAM system for programming the NC/CNC machine tools. By means of a conventional CAD/CAM system, the teaching NC programs are prepared for different parts, defined in engineering drawings module, 5 and are sent to the teaching module. In the decision module, subsequent to the testing module, the decision is taken on the success of teaching. In case that the decision is NO the repetition of the teaching process takes place. If on the other hand the NN device has learned enough the generated neural network is sent to the NN device. The neural network built-in in the NN device consists of three layers: the input layer, the hidden layer and the output layer [12]. On the input layer, the X-Y-Z sets of coordinate points appear, representing the coordinate point values obtained from the modified CAD model for individual machining operations types. The coordinate point values are determined according to special procedure. Through the intermediate hidden layer the input coordinates are transposed into output layer in a form of a set of coordinate points Xi, Yi, Zi, representing the position values of the tool path for individual machining operations. 4.3 Machining operations The control unit can learn how to generate the NC part programs for the following machining procedures: milling (rough face milling, rough contour milling, final milling after the contour and in Z-plane, final contour milling, final contour 3D milling, milling on Z-plane, final contour milling on equidistant and milling of pockets), drilling (normal drilling, deep drilling and centering), reaming, sinking and threading. 5. Industrial applicability The NN device can be built-in into each CNC control unit of the milling machine as shown in Figure 1. The standard parallel transmission of data is used. If it is not possible to programming the internal interface the NN device must be connected to existing DNC interface, which each CNC control possess. The NN device for teaching is connected to NN device with standard serial interface. The CAD model of the part is sends to NN device through standard communication interface. For teaching of NN device through the module for teaching different commercial available CAD/CAM programming systems can be used as are Unigraphics Solution, IDeas, Catia, HyperMill etc. [13,14,15]. 6. Conclusion The new control unit solves the problem of automatic and intelligent generating of NC programs for CNC machining centres. It describes the control device of a CNC machining centre for face milling (rough), contour milling (rough), final milling after the contour and in Z-plain, final contour 3D milling, contour final milling, milling on Z-plain, final contour milling on equidistant, milling of pockets, normal drilling, deep drilling, centering, reaming, sinking and threading with the capability of teaching and automatic intelligent generating of NC part programs on the bases of neural network, which is built-in into a special NN device. The neural network for milling, drilling and operations alike can learn to generate NC part programs in module for learning. The device then completely automatically, without the intervention of the operator, only on the bases of 2D, 2,5D or 3D computer model of prismatic part, which has not been previously programmed, generate NC part programs. In solving the machining problems, the NN can serve as ideal tool, for helping NC programmer making the right decision, or at least serve as an orientation tool. Time saving could be also achieved, because not so many post-machining operations would be necessary. 6 References 1. M. Weck. M., Werkzeugmaschinen Fertigungssystem, Berlin [etc.], Springer, 1998. 2. Kato. K., Momochi. T., Numerical controller for machining tool with learning function - combines learning program with entered program to produce resulting process, Patent DE4011591 (JP19890098177), 1989. 3. Kadono. M., Tool path data generation apparatus for NC machine tool and numerical controller provided with it, Patent Nr. US2001/0000805 A1, 2001. 4. Waldenmaier. P., Wirth. H., Monz. J., Dialogue orientated programming system for a CNC machine tool, Patent EP0726509A1, 1996. 5. Kamioka T., Mochizuki. H., Learning promotion method on tool and learning promotion type machine, Patent JP2001034155, 2001. 6. Nemoto. K., Kyoichi. M., Yamaguchi. M., Sugimoto. H., Hasegawa. H., NC data generation device and its method, Patent JP11242510, 1999. 7. Liu. Y., Wang. C., Neural network adaptive control and optimisation in the milling process, Int. J. Adv. Manuf. Technol., 15 (1999), 791-795. 8. Chang. I., Deng. J., Chan. S., A next generation machining system based on NC feature unit and real-time tool path generation, Int. J. Adv. Manuf. Technol., 16 (2000) 889-901. 9. NeuroSolutions, NeuroSolutions for Excel, Custom Solution Wizard, Neuro Dimension, Inc., Gainesville, FL, URL: http://www.nd.com/, 2000. 10. aiNet V1.25 Neural Network Application, Celje, Slovenia, Europe, 1997 11. NeuroShell Predictor, Ward Systems Group, Inc. Frederick, MD http://www.wardsystems.com/products.asp?p=predictor, 2000. 12. Balic. J., Korosec. M., Intelligent tool path generation for milling of free surfaces using neural networks, Int. j. mach. tools manuf., [Print ed.], 10 (2002), 1171-1179. 13. Unigraphics, http://www.eds.com/products/plm/unigraphics, 2000. 14. Parametric Technology and Corporation, Pro/MFG&Pro/NC-CHECK User's Guide Release 2000i, http://www.ptc.com, 2000. 15. HyperMill, OPEN MIND Technologies AG, http://www.openmind.de/, 2003. 16. Brezocnik. M., Pahole. I., Balic. J, Feature recognition from boundary model of a part (intelligent CAD-CAP interface), International Conference Design to Manufacture in Modern Industry, Bled, Slovenia, Proceedings. Maribor, Faculty of Mechanical Engineering, 1995, 395-404. 17. Balic. J., Brezocnik. M., A model of intelligent CAD/CAM interface in CIM, Proceedings of the 13th International conference on production research, Jerusalem, Israel, Freund Publishing House, Ltd, London, 1995, 29-31, 1995. 7
5cs.CE
arXiv:1711.08228v1 [cs.AI] 22 Nov 2017 November 2016 An influence-based fast preceding questionnaire model for elderly assessments Weiping Li a,3 , Jingbo Zhang a,4 , Zhonghai Wu a,5 and Wei Tan b,6 a School of Software and Microelectronics, Peking University, Beijing, China b IBM T. J. Watson Research Center, Yorktown Heights, NY, USA Tong Mo a,1 , Rong Zhang a,2 , AbstractTo improve the efficiency of elderly assessments, an influence-based fast preceding questionnaire model (FPQM) is proposed. Compared with traditional assessments, the FPQM optimizes questionnaires by reordering their attributes. The values of low-ranking attributes can be predicted by the values of the high-ranking attributes. Therefore, the number of attributes can be reduced without redesigning the questionnaires. A new function for calculating the influence of the attributes is proposed based on probability theory. Reordering and reducing algorithms are given based on the attributes’ influences. The model is verified through a practical application. The practice in an elderly-care company shows that the FPQM can reduce the number of attributes by 90.56% with a prediction accuracy of 98.39%. Compared with other methods, such as the Expert Knowledge, Rough Set and C4.5 methods, the FPQM achieves the best performance. In addition, the FPQM can also be applied to other questionnaires. Keywords. Questionnaire, reorder, reduce, fast preceding questionnaire model, elderly assessment 1. Introduction Questionnaires have been widely used in various fields, including elderly assessments. Several questionnaires have been developed and are currently in extensive use to assess health-related quality of life (HRQOL) [20]. Aging is an increasingly serious social phenomenon in China, and there is a strong need for care services. Assessments of the el1 Corresponding Author: Tong Mo, School of Software and Microelectronics, Peking University, Beijing 100086, China; E-mail: [email protected] 2 Rong Zhang, School of Software and Microelectronics, Peking University, Beijing 100086, China; E-mail: [email protected] 3 Weiping Li, School of Software and Microelectronics, Peking University, Beijing 100086, China; E-mail: [email protected] 4 Jingbo Zhang, School of Software and Microelectronics, Peking University, Beijing 100086, China; E-mail: [email protected] 5 Zhonghai Wu, School of Software and Microelectronics, Peking University, Beijing 100086, China; E-mail: [email protected] 6 Wei Tan, IBM T. J. Watson Research Center, Yorktown Heights, NY, USA; E-mail: [email protected] T. Mo et al. / An influence-based fast preceding questionnaire model derly are essential for providing personalized services. Existing assessment methods are usually based on the Barthel Index [18] and the national industry standard for the ability assessment of elderly adults [28]. Many investigation attributes are needed to systematically obtain information about the elderly. The elderly are asked about multiple attributes in succession. These assessment methods are inefficient, and the order of the attributes is not reasonable. When there is a relationship between attributes, some unknown attributes can be predicted by known attributes, and a more reasonable order should be determined [8, 9, 19]. Classical Test Theory (CTT), Rasch Analysis (RA), decision rule, and experts [4, 10, 15, 21, 22, 25] have been applied to reduce the length of health questionnaires. However, actually, these removed attributes have provided additional information. A reasonable order of these attributes of the questionnaires can also be considered. Correlation, multiple regression, factor analysis, cluster analysis and structural equation modelling, and hierarchical multiple regression [2, 7, 24, 27] can be used to determine the relationships among the attributes of health questionnaires. Certain attributes can indeed be predicted by other attributes using hierarchical logistic regression, correlation analysis, and binary logistic stepwise regression [1, 3, 6, 11, 14]. However, only one attribute, not multiple attributes simultaneously, could be predicted in one study. Meanwhile, the involved attributes in each study are incomplete. A solid mathematical definition of the question is given. The fast preceding questionnaire model (FPQM) is proposed to solve the problem in five steps. First, the influence of one attribute on all other attributes is defined and calculated. Second, we traverse every investigation attribute and chooses the attribute with the largest influence as the best attribute to split. Third, we create the FPQM with the best attribute. We traverse every value of the attribute, and the sub-dataset corresponding to the value can be used to obtain the sub-model recursively. Then, the sub-model is attached to the full model, and the full model is obtained when the recursion ends. Fourth, the created FPQM is used for the real investigation. The value is directly asked for at the beginning of the real investigation because there is no prior information about the respondent. Certain investigation attributes can be inferred after sufficient information has been accumulated. At that time, the confidence level is greater than the given threshold, which means that questions about the attribute do not need to be asked. Fifth, we calculate the evaluation metrics and evaluate the model FPQM. This paper is organized as follows. Section 2 reviews related work. The fast preceding questionnaire model (FPQM) is introduced in Section 3. First, a solid mathematical definition of the question is given. Then, an influence calculation formula, the best attribute to split choosing algorithm (BASCA), the fast preceding questionnaire model creating algorithm (FPQMCA), the model used for real investigation algorithm (MURIA), and the model evaluation algorithm (MEA) are presented. Section 4 shows the experimental results, therein presenting the experimental data;, evaluation metrics; the overall results of the FPQM; the comparison experiment with Expert Knowledge, Rough Set, and C4.5; and the factor analysis, which includes the number of elderly, number of investigation attributes, and threshold. Section 5 concludes the paper. T. Mo et al. / An influence-based fast preceding questionnaire model 2. Related work 2.1. Attribute reduction Luis Prieto [22] presents a parallel reduction in a 38-attribute questionnaire, the Nottingham Health Profile (NHP), to empirically compare Classical Test Theory (CTT) and Rasch Analysis (RA) results. The CTT results in 20 attributes (4 dimensions), whereas RA results in 22 attributes (2 dimensions). Moreover, the attribute-total correlation ranges from 0.45-0.75 for NHP20 and from 0.46-0.68 for NHP22, while the reliability ranges from 0.82-0.93 and from 0.87-94, respectively. Ephrem Fernandez [10] reduces and reorganizes the McGill Pain Questionnaire (MPQ) using a 3-step decision rule for affective and evaluative descriptors of Pain. With a minimum absolute frequency of 17 and a minimum relative frequency of 1/2 as the threshold values, the words of the MPQ are reduced from 78 to less than 20 on average. This reduction leads to a negligible loss of information transmitted. Moreover, Wasuwat Kitisomprayoonkul [15] develops the Thai Short-Form McGill Pain Questionnaire (Th-SFMPQ). RC Rosen [25] develops an abridged five-attribute version (IIEF-5) of the 15attribute International Index of Erectile Function (IIEF) to diagnose the presence and severity of erectile dysfunction (ED). The five attributes are selected based on the ability to identify the presence or absence of ED and on adherence to the National Institute of Health’s definition of ED. The IIEF-5 possesses favorable properties for detecting the presence and severity of ED. X. Badia [4] achieves a qualitative and quantitative reduction in the 179 expressions of the bone metastasis quality of life questionnaire (BOMET-QOL) with respect to clarity, frequency and importance with 15 experts. This phase, which is performed in two steps, results in the 35-attribute version of the BOMET-QOL. The initial reduction yields a 25-attribute questionnaire via factorial analysis. Similarly, the BOMET-QOL-25 is reduced to an integrated version of 10 attributes through a sample of 263 oncology patients. The BOMET-QOL is an accurate, reliable and precise 10-attribute instrument for assessing HRQOL. Tamar E.C. Nijsten [21] tests and reduces Skindex-29 to Skindex-17 using Rasch Analysis. The Rasch Analysis of the combined emotion and social functioning subscale of Skindex-29 results in a 12-attribute psychosocial subscale. A total of five of the seven attributes are retained in a symptom subscale. Classical psychometric properties, such as the response distribution, attribute–rest correlation, attribute complexity, and internal consistency, of the two subscales of Skindex-17 are at least adequate. Skindex-17 is a Rasch-reduced version of Skindex-29, with two independent scores that can be used for the measurement of health-related quality of life (HRQOL) for dermatological patients. [4, 10, 15, 21, 22, 25] remove some attributes directly and develop qualitative and quantitative reductions in questionnaires about health using Classical Test Theory (CTT), Rasch Analysis (RA), decision rules, or experts. These questionnaires include the Nottingham Health Profile (NHP), McGill Pain Questionnaire (MPQ), 15-attribute International Index of Erectile Function (IIEF), bone metastasis quality of life questionnaire (BOMET-QOL), and Skindex-29. However, these removed attributes can provide additional information, and their values can be predicted by the remaining attributes with reduction methods. Meanwhile, a more reasonable order of these attributes is not considered. T. Mo et al. / An influence-based fast preceding questionnaire model 2.2. Relationships among attributes Alexandra-Lelia Dima [7] studies the interrelations between acceptance, emotions, illness perceptions and health status. The confirmatory analysis (employing a variety of statistical procedures, from correlation to multiple regression, factor analysis, cluster analysis and structural equation modelling) largely confirms the expected relations within and between domains and is also informative regarding the most suitable data reduction methods. An additional exploratory analysis focuses on identifying the comparative characteristics of acceptance, emotions, and illness perceptions in predicting health status metrics. Arnow, Bruce A [2] provides estimates of the prevalence and strength of association between major depression and chronic pain in a primary care population and examines the clinical burden associated with the two conditions alone and together. Data are collected by questionnaires assessing major depressive disorder (MDD), chronic pain, pain-related disability, somatic symptom severity, panic disorder, other anxiety, probable alcohol abuse, and health-related quality of life (HRQL). The instruments include the Patient Health Questionnaire, SF-8, and the Graded Chronic Pain Questionnaire. The conclusions are that chronic pain is common among those with MDD, and Comorbid MDD and disabling chronic pain are associated with greater clinical burden than is MDD alone. A. Elizabeth Rippentrop [24] seeks to better understand the relationships among religion/spirituality and physical health, mental health, and pain in 122 patients with chronic musculoskeletal pain. Hierarchical multiple regression analyzes reveal significant associations between components of religion/spirituality and physical and mental health. Forgiveness, negative religious coping, daily spiritual experiences, religious support, and self-rankings of religious/spiritual intensity significantly predict mental health status. Religion/spirituality is unrelated to pain intensity and life interference due to pain. Religion/spirituality may have both costs and benefits for the health of those with chronic pain. Susan W. Vines [27] determines the relationships between pain perceptions, immune function, depression and health behaviors and examines the effects of chronic pain on immune function using depression and health behaviors as covariates. Pain perceptions show positive significant correlations with depression (P = 0.01) and total percent of NK cells (P = 0.04). Depression and health behaviors are negatively correlated (P = 0.01). Positive associations are observed for depression and 2 PHA mitogen levels (P<0.05). The immune function of patients with chronic pain is significantly higher than in the nopain comparison group. Pain perceptions may have a deleterious effect on enumerative NK cell measures and depression levels. Most of the attributes mentioned in [2, 7, 24, 27] are included in Table 4, such as acceptance, emotions, illness perceptions, and health status; depression, chronic pain, and clinical burden; religion/spirituality and physical health, mental health, and pain; and pain perceptions, immune function, depression and health behaviors. The only two differences between the investigation attributes in Table 4 and the attributes mentioned in the literature are the expressions. The attributes mentioned in the literature are more conceptual. Applied methods include correlation, multiple regression, factor analysis, cluster analysis, structural equation modelling, and hierarchical multiple regression. The literature proves that relationships among these attributes do exist. However, the attributes T. Mo et al. / An influence-based fast preceding questionnaire model covered by the relationships in each study are incomplete, and the relationships have not been well utilized to provide results of interest such as in prediction. 2.3. Prediction Kersh, BC [14] uses psychosocial and health status variables independently to predict health care seeking for fibromyalgia. Subjects are administered 14 measures, which produce six domains of variables: background demographics and pain duration; psychiatric morbidity; and personality, environmental, cognitive, and health status factors. These domains are input into 4 different hierarchical logistic regression analyzes to predict the status as patient or non-patient. The full regression model is statistically significant (P<0.0001) and correctly identifies 90.7% of the subjects, with a sensitivity of 92.4% and a specificity of 87.2%. Maki Aoyama [1] uses physical and functional factors in activities of daily living to predict falls in community-dwelling older women. Correlation analysis investigating associations among the scores of assessment scales and actual measurements of muscle strength and balance shows that there are significant correlations between handgrip strength and the Falls Efficacy Scale, Functional Reach test, Timed Up and Go test, Berg Balance Scale, Motor Fitness Scale, and Motor Functional Independence Measure in fallers and non-fallers. A binary logistic stepwise regression analysis reveals that only an inability of “being able to go up and down the staircase” in the Motor Fitness Scale remains a significant variable to predict falls. Aydeniz, Ali [3] predicts falls in the elderly with physical, functional and sociocultural parameters. Falls are common in patients with weakness, fatigue, dizziness, and swelling in the legs and in subjects with appetite loss. Fallers have lower functional status than do non-fallers (p=0.028). In addition, fallers have more depressive symptoms than do non-fallers (p=0.019). Quality of life (NHP), especially physical activity, energy level and emotional reaction, subgroups are different (p=0.016, 0.015, and 0.005, respectively). Disability and mental status are similar in groups (p=0.006). Musculoskeletal problems, functional status and social status might be contributors to falls. Jennifer L. Gatz [11] uses depressive symptoms to predict Alzheimer’s disease and dementia. The Total Center for Epidemiologic Studies Depression (CES-D) score is a significant predictor of AD and dementia when categorized as a dichotomous variable according to the cutoff scores of 16 and 17; a CES-D cutoff of 21 is a significant predictor of AD and a marginally significant predictor of dementia. When analyzed as a continuous variable, the CES-D score is marginally predictive of AD and dementia. Neither participant-reported history of depression nor participant-reported duration of depression is significant in predicting AD or dementia. Madeline Cruice [6] predicts social participation in older adults with personal factors, communication and vision. Assessments are individually conducted in a face-toface interview situation with the primary researcher, who is a speech pathologist. Social participation is shown to be associated with vision, communication activities, age, education and emotional health. Naming and hearing impairments are not reliable predictors of social participation. It is concluded that professionals interested in maintaining and improving the social participation of older people should strongly consider these predictors in community-directed interventions. Most of the attributes mentioned in [1,3,6,11,14] are also included in Table 4 such as psychosocial and health status variables and health care; physical, functional and socio- T. Mo et al. / An influence-based fast preceding questionnaire model cultural parameters and falls; depressive symptoms, Alzheimer’s disease and dementia; and personal factors, communication and vision, and social participation. Health care, falls, Alzheimer’s disease, dementia, and social participation are predicted using hierarchical logistic regression, correlation analysis, and binary logistic stepwise regression, respectively. The literature here is illustrative of the fact that certain attributes can indeed be predicted by other attributes. However, one study only predicts one attribute, not multiple attributes simultaneously. Meanwhile, the involved attributes in each study are also incomplete. A sufficient prediction between complete attributes can be studied. The relation and motivation between all the related works and this research are emphasized and explained here. [4, 10, 15, 21, 22, 25] show that certain attributes in Table 4 can be reduced directly. The information of these attributes is redundant and contained in other attributes. [2, 7, 24, 27] provide further evidence that there is an inherent relationship between these attributes. [1, 3, 6, 11, 14] further show that certain attributes can be predicted by other attributes because of the underlying relationship. All the related works form the foundation of this research. The proposed fast preceding questionnaire model (FPQM) can achieve state-of-the-art performance only when there is an inherent relationship between attributes. If the relationship does not exist at all, no methods can predict certain attributes by others. The relationship is the foundation of all possible methods, including the FPQM. [4,10,15,21,22,25] reduce some attributes directly, while the FPQM predicts the values of the attributes and preserves these attributes. In addition, In [1, 3, 6, 11, 14], one study only predicts one attribute, while the FPQM can predict multiple attributes simultaneously. 3. Fast preceding questionnaire model (FPQM) A solid mathematical definition of question is given, and the fast preceding questionnaire model (FPQM) is proposed to solve the problem in five steps. Step 1: Calculate the influence We calculate, in order, the confidence level of the attribute by taking a value under the condition of another attribute taking a value, the influence of the attribute taking a value on another attribute, the influence of the attribute on another attribute, the influence of the attribute on all other attributes, and the attribute that has the largest influence on all other attributes. Step 2: Choose the best attribute to split We traverse every investigation attribute, every other attribute, every value of the attribute, and every value of the other attribute to calculate every influence. Finally, the influence of the investigation attribute on all other attributes can be calculated. Then, we logically choose the best attribute that has the largest influence on all other attributes. Step 3: Create the FPQM After the best attribute to split is chosen, we traverse every value of the attribute, and the sub-model can be obtained with sub-dataset corresponding to the value recursively. Then, we attach the sub-model to the full model, and the full model is obtained when the recursion ends. Step 4: Use the FPQM for real investigation Now, the FPQM can be used to investigate a new respondent. At the beginning of the real investigation, there is no prior information about the respondent; therefore, T. Mo et al. / An influence-based fast preceding questionnaire model we ask for the value directly. After sufficient information has been accumulated, some investigation attributes can be inferred. If the confidence level is larger than the given threshold, then the attribute does not need to be asked about. Step 5: Evaluate the model After the FPQM is used to investigate the new respondent, the evaluation metrics can be calculated. The FPQM can be evaluated based on these metrics. The five steps are also presented in the form of a graph, as shown in Figure 1. Step 1: Calculate the influence with Eq. (1)-(5). Step 2: Choose the best attribute to split with Algorithm 1 and the calculated influence in Step 1. Step 3: Create the FPQM with Algorithm 2, and at every recursion step, call Algorithm 1 to choose the best attribute to split. Step 4: Use the FPQM for the real investigation with Algorithm 3 after the FPQM is created in Step 3. Step 5: Evaluate the model with Algorithm 4. Figure 1. Illustration of the five steps. 3.1. Problem definition Definition 3.1. Let U = {U1 ,U2 , ...,Um } be the collection of all individuals who are investigated in the training dataset, where Ui (1 6 i 6 m) is the i-th individual being investigated. Definition 3.2. Let Ũ = {U˜1 , U˜2 , ..., U˜m̃} be the collection of all individuals in the testing dataset, where Ũi (1 6 i 6 m̃) is the i-th individual and Ũ ∩U = φ . Definition 3.3. Let V = {V1 ,V2 , ...,Vn } be the collection of investigation attributes, where V j is the j-th investigation attribute. Definition 3.4. Let W = {W1 ,W2 , ...,Wn } be the collection of all possible values on all investigation attributes, where W j is the collection of all possible values on V j . Definition 3.5. N = {N1 , N2 , ..., Nn }, where N j is the number of W j . N will be used in the time complexity analysis of the following four algorithms. Definition 3.6. Let D = {Di j }(1 6 i 6 m, 1 6 j 6 n) be the matrix of all real values of all individuals, and D is the training dataset, where Di j is the real value of individual Ui on the investigation attribute V j and Di j ∈ W j . T. Mo et al. / An influence-based fast preceding questionnaire model Definition 3.7. Let R = {Ri j }(1 6 i 6 m̃, 1 6 j 6 n) be the matrix of all real values, where R is the testing dataset, in which Ri j is the real value of Ũi on V j and Ri j ∈ W j . R can also be represented as R = {Ri }(1 6 i 6 m̃); Ri = {Ri j }(1 6 j 6 n), where Ri is the vector of real values of Ũi . Definition 3.8. Let R0 = {R0i j }(1 6 i 6 m̃, 1 6 j 6 n) be the matrix of all final values, where R0i j is the final value of Ũi on V j and R0i j ∈ W j . R0 can also be represented as R0 = {R0i j }(1 6 i 6 m̃); R0i = {R0i j }(1 6 j 6 n), where R0i is the vector of the final values of Ũi . Definition 3.9. Let K = {Ki j }(1 6 i 6 m̃, 1 6 j 6 n) be the matrix of indication values showing whether the final value R0i j is equal to the real value Ri j . Ki j ∈ {0, 1}, where Ki j = 1 when R0i j = Ri j and Ki j = 0 when R0i j 6= Ri j . Definition 3.10. Let P = {Pi j }(1 6 i 6 m̃, 1 6 j 6 n) be the matrix of the confidence levels of Ũi taking the final values R0i j . Pi j ∈ [0, 1], where Pi j is the confidence level of Ũi taking R0i j on V j . P can also be represented as P = {Pi }(1 6 i 6 m̃); Pi = {Pi j }(1 6 j 6 n), where Pi is the vector of the confidence levels of Ũi . Definition 3.11. Let I = {Ii j }(1 6 i 6 m̃, 1 6 j 6 n) be the matrix of indication values showing whether the value R0i j is predicted from other already known attributes. Ii j ∈ {0, 1}, where Ii j = 1 denotes that R0i j is predicted and Ii j = 0 denotes that R0i j = Ri j by asking Ũi on V j directly. Note that Ii j = 1 when Pi j > σ , and Ii j = 0 when Pi j < σ , where σ is the given threshold. I can also be represented as I = {Ii }(1 6 i 6 m̃); Ii = {Ii j }(1 6 j 6 n), where Ii is the vector of the indication values of Ũi . Definition 3.12. Let O = {O1 , O2 , ..., Om̃ } be the collection of all reasonable orders in which individuals should be investigated, where Oi is a reasonable order in which Ũi should be investigated. Oi = { j1 , j2 , ..., jn } is a single substitution of {1, 2, ..., n}. Oi1 is different from Oi2 (which it most likely is) when i1 is different from i2 . Definition 3.13. Let M be the fast preceding questionnaire model. M is a tree structure, and M will determine R0 , I, and O. Definition 3.14. Let C be the collection of all appearing confidence levels when creating M, where C will determine P. Definition 3.15. Let S = {U,V,W, D, R, R0 , K, P, I, O, M,C} be the system of the fast preceding questionnaire model. Definition 3.16. Let S̄ be the space of all possible questionnaire models. Definition 3.17. Average accuracy rate (AAR): AAR = 1 m̃ ∑m̃ i=1 ∑nj=1 Ki j ∗Ii j . ∑nj=1 Ii j AAR describes how accurate the model can be. AAR can also be represented as AAR = ARi = ∑nj=1 Ki j ∗Ii j ∑nj=1 Ii j 1 m̃ ∑m̃ i=1 ARi ; , where ARi is the accuracy rate of Ũi . ∑n Ii j j=1 Definition 3.18. Average reduction rate (ARR): ARR = m̃1 ∑m̃ . ARR describes i=1 n how well the model can accelerate the questionnaire. ARR can also be represented as ARR = 1 m̃ ∑m̃ i=1 RRi ; RRi = ∑nj=1 Ii j , n where RRi is the reduction rate Ũi . T. Mo et al. / An influence-based fast preceding questionnaire model 2 (β +1)∗ARi ∗RRi Definition 3.19. Average Fβ -Measure: AFβ = m̃1 ∑m̃ i=1 β 2 ∗ARi +RRi , where β is a given parameter. AFβ describes a balance between AAR and ARR. Definition 3.20. The problem is defined as the following. max AFβ sub ject to S ∈ S̄ 3.2. Influence calculation formula To create the model from the training dataset D, the influence of one investigation attribute on all others should be calculated. The influence calculation formula is given in Definition 3.21-3.25 when the depth of the created model reaches t. The influence of the investigation attribute depends on the influence of the values. Definition 3.21. The confidence level of the investigation attribute V jtk taking the value 2 vtjk under the condition of the investigation attribute V jtk taking the value vtjk when the 2 1 1 previous k-1 layer values V 1 ,V 2 , ...,V t−1 are already known. P(V jtk = vtjk |V jtk = v jk ;V 1 ,V 2 , ...,V t−1 ) 2 = 2 1 1 N(V jt =vtj ,V jt =v jk ;V 1 ,V 2 ,...,V t−1 ) k2 k2 k1 1 N(V jt =vtj ;V 1 ,V 2 ,...,V t−1 ) k1 (1) k1 where V jtk ∈ V , V jtk ∈ V , vtjk ∈ W jk , and vtjk ∈ W jk . V 1 is the 1st-layer value of 1 1 1 2 2 2 all investigation attributes V , V 2 is the 2nd layer value of V , etc. N(V jtk = vtjk ,V jtk = 2 2 1 v jk ;V 1 ,V 2 , ...,V t−1 ) is the number of individuals in U who take the value vtjk , vtjk on 1 1 2 the investigation attributes V jtk , V jtk , respectively. N(V jtk = vtjk ;V 1 ,V 2 , ...,V t−1 ) is the 1 1 2 1 number of individuals in U who take the value vtjk on V jtk . Definition 3.22. The influence of values V 1 ,V 2 , ...,V t−1 V jtk 1 taking 1 1 vtjk 1 V jtk 2 on when the previous k-1 layer are already known. INF(V jtk |V jtk = v jk ;V 1 ,V 2 , ...,V t−1 ) 2 = 1 1 ∑ vtj ∈W jk k P(V jtk = vtjk |V jtk = v jk ;V 1 ,V 2 , ...,V t−1 )2 2 2 (2) 1 1 2 2 where P(V jtk = vtjk |V jtk = v jk ;V 1 ,V 2 , ...,V t−1 ) is defined in Definition 3.21. 2 2 1 1 Notice that INF(V jtk |V jtk = v jk ;V 1 ,V 2 , ...,V t−1 ) is not defined as INF(V jtk |V jtk = 1 1 2 v jk ;V 1 ,V 2 , ...,V t−1 ) = ∑vtj 1 ∑vtj k2 ∈W jk 2 k2 2 ∈W jk 2 2 2 1 1 P(V jtk = vtjk |V jtk = v jk ;V 1 ,V 2 , ...,V t−1 ) = 1 is always true. 2 2 1 1 1 P(V jtk = vtjk |V jtk = v jk ;V 1 ,V 2 , ...,V t−1 ) because T. Mo et al. / An influence-based fast preceding questionnaire model Definition 3.23. The influences of V jtk on V jtk when the previous k-1 layer values 2 1 V 1 ,V 2 , ...,V t−1 are already known. INF(V jtk |V jtk ;V 1 ,V 2 , ...,V t−1 ) 2 1  P(V jtk = vtjk ;V 1 ,V 2 , ...,V t−1 )∗ = ∑ 1 vtj ∈W jk k1 1 1  INF(V jtk |V jtk = vtjk ;V 1 ,V 2 , ...,V t−1 ) 2 1 (3) 1 where P(V jtk = vtjk ;V 1 ,V 2 , ...,V t−1 ) is the confidence level of V jtk taking vtjk . 1 1 1 1 Definition 3.24. The influence of V jtk on all other investigation attributes ∆ when the 2 previous k-1 layer values V 1 ,V 2 , ...,V t−1 are already known. INF(∆|V jtk ;V 1 ,V 2 , ...,V t−1 ) 1 = ∑ V jt ∈V,k2 6=k1 k2 INF(V jtk |V jtk ;V 1 ,V 2 , ...,V t−1 )2 2 1 (4) where ∆ = V − {V jtk }. 1 Definition 3.25. The investigation attribute V∗t that has the largest influence on all other investigation attributes ∆. V∗t = arg max INF(∆|V jtk ;V 1 ,V 2 , ...,V t−1 ) V jt ∈V 1 (5) k1 3.3. Best attribute to split choosing algorithm (BASCA) When creating the FPQM, it is necessary to choose the best attribute to split. When the depth of the created model reaches t, we traverse every investigation attribute; then, we traverse every other investigation attribute and calculate the influence of the investigation attribute on all other attributes. Lines 5, 9, 11, 13, and 14 are calculated with Eqs (1)-(5). Then, we logically choose V∗t as the best attribute that has the largest influence on ∆. The pseudocode is shown in Algorithm 1 when the depth of the created model reaches t. V∗t = BASCA(D,V ). The BASCA returns the investigation attribute V∗t that has the largest influence on ∆. C is a global variable, and the BASCA can also be called to obtain C. T. Mo et al. / An influence-based fast preceding questionnaire model Algorithm 1 Best attribute to split choosing algorithm (BASCA) Input: D, V Output: V∗t 1: for (V jtk ∈ V ) do 1 2: for (V jtk ∈ V & V jtk 6= V jtk ) do 2 3: 1 2 for each value vtjk of V jtk do 1 4: 1 for each value vtjk of V jtk do 2 2 5: Calculate P(vtjk |vtjk ;V 1 ,V 2 , ...,V t−1 ) 6: Add P(vtjk |vtjk ;V 1 ,V 2 , ...,V t−1 ) to C 2 1 end for Calculate INF(V jtk |vtjk ;V 1 ,V 2 , ...,V t−1 ) 1 2 end for Calculate INF(V jtk |V jtk ;V 1 ,V 2 , ...,V t−1 ) 2 1 end for Calculate INF(∆|V jtk ;V 1 ,V 2 , ...,V t−1 ) 1 end for Calculate V∗t return V∗t 2 7: 8: 9: 10: 11: 12: 13: 14: 15: 1 3.4. Fast preceding questionnaire model creating algorithm (FPQMCA) Now, the FPQM can be created with the above groundwork. After V∗ is chosen as the best attribute to split, we traverse every value v∗ of V∗ , and the sub-model can be obtained with the sub-dataset corresponding to v∗ recursively. Then, we attach the sub-model to the full model. Algorithm 2 is the pseudocode. L = List(0), and L is initialized with a zero vector. Then, the FPQMCA can be called to obtain the fast preceding questionnaire model M. M = FPQMCA(D,V, L). 3.5. Model used for real investigation algorithm (MURIA) With the created FPQM, the new person in the testing dataset can be investigated quickly. At the beginning of the real investigation, there is no information about the respondent; therefore, all we can do is ask about the attribute directly. After sufficient information has been accumulated, some investigation attributes can be inferred; otherwise, we continue asking about attributes. Let Ind be the index indicating whether the current investigation attribute is the top attribute. Ind = 0 indicates that it is the top attribute, and Ind = 1 indicates that it is not. If the current investigation attribute is the top attribute, there is no information about the respondent; therefore, the attribute cannot be predicted. R0 , I, O, and P are global variables that have be defined in Definitions 3.8, 3.11, 3.12, and 3.10, respectively. The pseudocode is shown in Algorithm 3. Ind = 0 is the initial value. We traverse every testing dataset in R as Ri , and we call the algorithm LN = MURIA(Ri ,V, M, σ , Ind) to obtain R0 , I, O, and P. T. Mo et al. / An influence-based fast preceding questionnaire model Algorithm 2 Fast preceding questionnaire model creating algorithm (FPQMCA) Input: D, V , Index list: L, β Output: Fast preceding questionnaire model: M 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: Create a node M Let N(L(0)) be the number of 0s in L if N(L(0)) == 1 then Let V (L(0)) be the investigation attribute whose corresponding index in L is 1 return M as a leaf node labeled with V (L(0)) else V∗ = BASCA(D,V ) Label node M with V∗ Let L(V −1 (V∗ )) be the corresponding index in L of V∗ L(V −1 (V∗ )) = 1 for each value v∗ of V∗ do Let Dv∗ be the set of data tuples in D satisfying v∗ on V∗ Mv∗ = FPQMCA(Dv∗ ,V, L) Attach the node Mv∗ to node M end for end if return M 3.6. Model evaluation algorithm (MEA) Now, the FPQM should be evaluated to determine its performance. Various evaluation metrics are calculated by the model evaluation algorithm (MEA). First, K can be calculated with R and R0 . Then, AAR, AAR, and AFβ can be obtained with K and I. A larger AFβ indicates a better FPQM. Algorithm 4 is the pseudocode. When β is given, (AAR, ARR, AFβ ) = MEA(R, R0 , I, β ). AAR, ARR, AFβ can be obtained by calling the MEA. 3.7. An example Here is an example to illustrate the Definitions 3.1-3.25 and Algorithms 1-4. Table 1. Example Training Dataset Investigation attributes Education Income Social Skills Work Ability Communication U1 U2 U3 U4 0 1 1 1 1 2 0 0 0 0 1 1 1 0 0 1 1 1 1 0 U = {U1 ,U2 ,U3 ,U4 ,U5 } V = {V1 ,V2 ,V3 ,V4 ,V5 } = {Education, Income, Social Skills,Work Ability,Communication} W = {W1 ,W2 ,W3 ,W4 ,W5 } = {{0, 1}, {0, 1, 2}, {0, 1}, {0, 1}, {0, 1}} N = {N1 , N2 , N3 , N4 , N5 } = {2, 3, 2, 2, 2} T. Mo et al. / An influence-based fast preceding questionnaire model Algorithm 3 Model used for real investigation algorithm (MURIA) Input: Ri , V , M, threshold of confidence level: σ , Index: Ind Output: Last node: LN 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: Let M(1) be the top investigation attribute index of M. Let V (M(1)) be the top investigation attribute of M. Let Ri (M(1)) be the real value of Ri on V (M(1)). Let Ri 0 (M(1)) be the final value of Ri 0 on V(M(1)). Let Ii (M(1)) be the indication value of Ii on V (M(1)). Let Pi (M(1)) be the confidence level of Pi on V (M(1)). Let Oi ( j1 ) be the current attribute of Oi . if Ind == 0 then Ri 0 (M(1)) = Ri (M(1)) Ii (M(1)) = 0 Pi (M(1)) = 1 Ind = 1 end if Oi ( j1 ) = M(1) Let Ms be the sub-model of M when Ũi takes Ri 0 (M(1)). Let Ms (1) be the top investigation attribute index of Ms . Let V (Ms (1)) be the top investigation attribute of Ms . Let Ri (Ms (1)) be the real value of Ri on V (Ms (1)). Let Ri 0 (Ms (1)) be the final value of Ri 0 on V (Ms (1)). Let Ii (Ms (1)) be the indication value of Ii on V (Ms (1)). Let Pi (Ms (1)) be the confidence level of Pi on V (Ms (1)). Let Oi ( j2 ) be the next attribute of Oi . Let W (Ms (1)) be possible values on Ms (1). Let C(v(Ms (1)) | Ri 0 (M(1))) be the confidence level of Ms (1) taking v(Ms (1)) under the condition of M(1) taking Ri 0 (M(1)). C∗ = max C(v(Ms (1)) | Ri 0 (M(1))) v(Ms (1))∈W (Ms (1)) 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: if C∗ > σ then Ri 0 (Ms (1)) = v(Ms (1)) Ii (Ms (1)) = 1 Pi (Ms (1)) = C∗ Oi ( j2 ) = Ms (1) else Ri 0 (Ms (1)) = Ri (Ms (1)) Ii (Ms (1)) = 0 Pi (Ms (1)) = 1 Oi ( j2 ) = Ms (1) end if if Ms ! = a tree then return Ms else return MURIA(Ri ,V, Ms , σ , Ind) end if   01011 1 2 0 0 1  D= 1 0 1 0 1 10110 When t = 1, no values of the investigation attributes are known yet. By Eq. (1), T. Mo et al. / An influence-based fast preceding questionnaire model Algorithm 4 Model evaluation algorithm (MEA) Input: R, R0 , I, β Output: AAR, ARR, AF β 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: for i ← 1 to m̃ do for j ← 1 to n do if Ri j 0 6= Ri j then Ki j = 0 else Ki j = 1 end if end for end for Let Sum1, Sum2, Sum3, and Sum4 be temporary variables Sum1 = 0 Sum2 = 0 Sum3 = 0 for i ← 1 to m̃ do Sum4 = 0 Sum5 = 0 for j ← 1 to n do Sum4 = Sum1 + Ki j ∗ Ii j Sum5 = Sum2 + Ii j end for ARi = Sum4/Sum5 RRi = Sum5/n 2 23: 24: 25: 26: 27: 28: 29: 30: 31: i ∗RRi Fi = (ββ +1)∗AR 2 ∗AR +RR i i Sum1 = Sum1 + ARi Sum2 = Sum2 + RRi Sum3 = Sum3 + Fi end for AAR = Sum1/m̃ ARR = Sum2/m̃ AFβ = Sum3/m̃ return AAR, ARR, AFβ Table 2. Example Testing Dataset Investigation attributes Education Income Social Skills Work Ability Communication U˜1 U˜2 1 0 1 1 0 1 1 0 0 1 P(V21 = 0|V11 = 0) = N(V21 = 0,V11 = 0) 0 = =0 1 N(V11 = 0) (6) T. Mo et al. / An influence-based fast preceding questionnaire model P(V21 = 1|V11 = 0) = N(V21 = 1,V11 = 0) 1 = =1 1 N(V11 = 0) (7) P(V21 = 2|V11 = 0) = N(V21 = 2,V11 = 0) 0 = =0 1 N(V11 = 0) (8) By Eq. (2), P(V21 |V11 = 0) = P(V21 = 0|V11 = 0)2 + P(V21 = 1|V11 = 0)2 + P(V21 = 2|V11 = 0)2 = 02 + 12 + 02 = 1 (9) Similar to Eqs (6)-(9), P(V21 |V11 = 1) = P(V21 = 0|V11 = 1)2 + P(V21 = 1|V11 = 1)2 + P(V21 = 1|V11 = 1)2 = 12 5 22 + 02 + = 3 3 9 (10) By Eq. (3), P(V21 |V11 ) = P(V11 = 0) ∗ P(V21 |V11 = 0) + P(V11 = 1) ∗ P(V21 |V11 = 1) = 1 3 5 2 ∗1+ ∗ = 4 4 9 3 (11) Similar to Eqs (6)-(11), P(V31 |V11 ) = 2 3 P(V41 |V11 ) = 2 3 P(V51 |V11 ) = 2 3 (12) By Eq. (4), P(∆|V11 ) = P(V21 |V11 ) + P(V31 |V11 ) + P(V41 |V11 ) + P(V51 |V11 ) = 2 2 2 2 8 + + + = 3 3 3 3 3 (13) Similar to Eqs (6)-(13), 7 2 5 P(∆|V41 ) = 2 P(∆|V21 ) = 11 4 5 P(∆|V51 ) = 2 P(∆|V31 ) = (14) T. Mo et al. / An influence-based fast preceding questionnaire model By Eq. (5), V∗1 = arg max INF(∆|V j1k ) = V21 V j1 ∈V 1 (15) k1 Eqs (6)-(15) also shows how Algorithm 1 performs. As for Algorithm 2, a node M is created at the beginning. L is initialized as a zero vector: L = List(0). N(L(0)) = n and not 1, and V∗1 = BASCA(D,V ) with Algorithm 1. We label node M as V∗1 , L(V −1 (V∗1 )) = 1. V∗1 = V21 (Income) and W2 = {0, 1, 2}; therefore,  thereare three branches from the attribute Income. On the branch Income = 0, 1101 Dv ∗ = , Mv∗ = FPQMCA(Dv∗ ,V, L). Attach the node Mv∗ to node M. When 1110 N(L(0)) == 1, Algorithm 2 terminates, and the fast preceding questionnaire model is created. Notice that only the first recursion step is shown here to ensure that the example is not too long. The created model is shown in Figure 2. Figure 2. The obtained FPQM for the example training dataset.   11010 . 10110 After the model is created, Algorithm 3 can be used for a real investigation on   the testing dataset. V∗1 = V21 ; therefore, M(1) = 2 and V (M(1)) = V21 . R1 = 1 1 0 1 0 . Ind = 0, then R1 0 (M(1)) = R1 0 (2) = R1 (2) = 1, I1 (2) = 0, P1 (2) = 1, Ind = 1. O1 (1) = 2. Ms (1) = 1, V (Ms (1)) = V11 . C∗ = max C(v(Ms (1)) | R1 0 (2)) = 1 and Ũ = {U˜1 , U˜2 }, R = v(Ms (1))∈W (Ms (1)) v(Ms (1)) = 0. C∗ > σ = 0.8, then R1 0 (1) = 0, I1 (1) = 1, P1 (1) = 1, O1 (2) = 1. Ms = a tree; therefore,  return MURIA(R1 ,V, Ms , σ , 1). When Algorithm 3 terminates, we obtain R01 = 0 1 0 1 1 , P1 , I1 , and O1 . AfterAlgorithm 3 finishes the  investigating   testingdatasetR, we canobtain 0 1 0 1 1 1 1 1 1 1 10111 21345 R0 = ,P= ,I= ,O= . 10110 1 1 1 0.5 1 10101 13024 M is the fast preceding questionnaire model, C is the collection of all confidence levels that appear when creating M. S = {U,V,W, D, R, R0 , K, P, I, O, M,C}, where S̄ is the space of all possible questionnaire models. T. Mo et al. / An influence-based fast preceding questionnaire model AAR, ARR, and AFβ can be calculated by Algorithm 4, which can be applied for   11110 model evaluation. With Lines 1-9, K = . With Lines 10-30, AAR = 0.7, ARR = 11111 0.75, and AF0.5 = 0.7114 with β = 0.5. The problem is defined as the following. max AFβ sub ject to S ∈ S̄ 3.8. The comparison with Decision Tree The fast preceding questionnaire model (FPQM) is similar to Decision Tree to some extent, but they are different models. There are many types of Decision Tree algorithms. The notable models include ID3, C4.5, C5.0, CART, CHAID, MARS, and Conditional Inference Trees. ID3, C4.5 and CART are chosen as representative Decision Tree algorithms. The FPQM is compared with these three Decision Tree algorithms in all aspects [5, 13, 26]. 3.8.1. The comparison on measures The algorithms for constructing decision trees choose an attribute at each step that best splits the dataset. Different Decision Tree algorithms use different metrics for determining the ”best”. ID3 uses information gain, C4.5 uses a gain ratio, and CART uses the Gini index, whereas the FPQM uses Influence, which is defined in Definitions 3.21-3.25. 3.8.2. The comparison on solved problems ID3, C4.5, and CART can solve both classification and regression problems. On the other hand, the FPQM is designed to optimize questionnaires by reordering the attributes and reducing the number of attributes by predicting the low-ranking attributes. The solved problems between the FPQM and Decision Tree are entirely different. 3.8.3. The comparison on model forms The model form of the FPQM looks very similar to that of Decision Tree algorithms; both are in tree forms, as shown in Figure 3. 3.8.4. The comparison on attribute types The attribute types that the FPQM and Decision Tree can handle are different. ID3 can only handle nominal types, C4.5 and CART can handle both nominal and numeric types, and the FPQM can only handle nominal attribute types. 3.8.5. The comparison on splits The split methods of the FPQM and Decision Tree are different. ID3 and C4.5 split the data in multiple ways, CART splits the data as a 2-way split, and the FPQM splits the data in multiple ways. CART can only create binary trees, whereas ID3, C4.5 and the FPQM can create general trees. The comparisons between the FPQM with Decision Tree in all aspects are listed in Table 3. T. Mo et al. / An influence-based fast preceding questionnaire model Table 3. The comparison with Decision Tree Decision Tree Aspect ID3 C4.5 CART FPQM Measure Solved problem Model form Attribute type Split Information gain Classification Tree Nominal Multi-way Gain ratio Classification Tree Nominal/Numeric Multi-way Gini index Classification/Regression Tree Nominal/Numeric 2-way Influence Reorder & Reduce Tree Nominal Multi-way 3.9. The time complexity of the FPQM There are many loops and recursive steps in the four algorithms constituting the FPQM; the time complexity of the FPQM is analyzed below. The derivation process of the time complexity is described in detail in Appendices. 3.9.1. The time complexity of the BASCA The time complexity of the BASCA is TBASCA (n, N̄) = O(n2 N̄ 2 ) (16) where N̄ is the average of N j in N, N̄ = 1n ∑nj=1 N j , and n is the number of V . 3.9.2. The time complexity of the FPQMCA The time complexity of the FPQMCA is TFPQMCA (n, N̄) = O(N̄ n+1 + n2 N̄) (17) 3.9.3. The time complexity of the MURIA The time complexity of the MURIA is TMURIA (n, N̄) = O(nN̄) (18) 3.9.4. The time complexity of the MEA The time complexity of the MEA is TMEA (n, m̃) = O(m̃n) where m̃ is the number of Ũ. (19) T. Mo et al. / An influence-based fast preceding questionnaire model 3.9.5. The time complexity of the FPQM The time complexity of the FPQM is TFPQM (n, N̄, m̃) = TBASCA (n, N̄) + TFPQMCA (n, N̄) + TMURIA (n, N̄) + TMEA (n, m̃) = O(n2 N̄ 2 ) + O(N̄ n+1 + n2 N̄) + O(nN̄) + O(m̃n) = O(n2 N̄ 2 ) + O(N̄ n+1 ) + O(m̃n) (20) 4. Experiments 4.1. Experimental data The experiments are based on actual data from the Lime Family Limited Company (Lime Family). Lime Family focuses on the pension service field and is the nationwide leading provider of high-quality home care services. Lime Family originally required 45 investigation attributes to assess a newcomer. The investigation attributes are based on the Barthel Index [18] and an ability assessment for elderly adults [28]. A total of 45 investigation attributes seems excessive for the elderly individuals who are asked to give the value of the attributes one by one, and the order of the attributes is not reasonable. Therefore, every assessment requires approximately 15-20 minutes, which is also excessive, resulting in customer churn in practice. 4.1.1. Noise There are three main classes of noise: spurious readings, measurement error, and background data. Some values of the Height and Weight attributes are 0, and some values of the Age attribute are 2015. These are the spurious reading type of noise data; it is easy for people to see that they are incorrect values. Height, Weight and Age are numeric attributes, and thus, these noise data are replaced with a sample mean. 4.1.2. Missing values Certain values of the Religion, Ground Walking, and Up Down Stairs attributes are missing. Religion is a nominal attribute, and Ground Walking and Up Down Stairs are ordinal attributes; thus, these missing values are replaced with a sample mode. After preprocessing, including discretization, handling missing values, addressing noise data, and textual data processing, all data are converted into nominal data. The investigation attributes can be observed in Table 4. The entire experiment is performed using the 64-bit Python language on a MacBook Pro, with a 2.2 GHz Intel Core i7 CPU and 16 GB of 1600 MHz DDR3 memory. 4.2. Evaluation metrics To evaluate the performance of the FPQM, the accuracy rate, average accuracy rate, standard deviation of the accuracy rate, reduction rate, average reduction rate, and standard deviation of the reduction rate are defined as follows. T. Mo et al. / An influence-based fast preceding questionnaire model Table 4. Investigation attributes No. Attribute Name No. Attribute Name No. Attribute Name 0 Sex 15 Transfer Bed Chair 30 Financial Affairs Capability 1 Age 16 Ground Walking 31 Cognitive Function 2 Ethnic 17 Up Down Stairs 32 Attacks 3 Education 18 Witted 33 Depressive Symptoms 4 Religion 19 Height 34 Consciousness Level 5 Marital Status 20 Weight 35 Vision 6 Housing Condition 21 Glasses 36 Hearing 7 Income 22 Hearing Aid 37 Communication 8 Eating 23 Go Shopping 38 Life Skills 9 Bathe 24 Outings 39 Work Ability 10 Modify 25 Food Cooking 40 Time Spatial Orientation 11 Clothing 26 Maintain Housework 41 People Orientation 12 Stool Control 27 Washing Clothes 42 Social Skills 13 Pee Control 28 Use Phone Ability 43 Event 14 Toilet 29 Medication 44 Occurrences Times Accuracy rate (AR): ARi = ∑nj=1 Ki j ∗Ii j ∑nj=1 Ii j (21) ARi is the accuracy rate of individual Ũi . Average accuracy rate (AAR): m̃ AAR = 1 m̃ ∑ i=1 ∑nj=1 Ki j ∗Ii j ∑nj=1 Ii j (22) AAR is the average accuracy rate of Ũ and describes how accurate the model can be. Standard deviation of the accuracy rate (SAR): s SAR = m̃ 1 m̃ ∑ (ARi − AAR)2 (23) i=1 SAR is the standard deviation of the accuracy rate and describes the volatility of the accuracy rate. Reduction rate (RR): RRi = RRi is the reduction rate of Ũi . ∑nj=1 Ii j n (24) T. Mo et al. / An influence-based fast preceding questionnaire model Average reduction rate (ARR): m̃ ARR = 1 m̃ ∑ ∑nj=1 Ii j n (25) i=1 ARR is the average reduction rate of Ũ and describes how the model can accelerate the questionnaire. Standard deviation of the reduction rate (SRR): s m̃ 1 m̃ SRR = ∑ (RRi − ARR)2 (26) i=1 SRR is the standard deviation of the reduction rate and describes the volatility of the reduction rate. Fβ -Measure (F): Fβi = (β 2 +1)∗ARi ∗RRi β 2 ∗ARi +RRi (27) Fβi is the Fβ -Measure of Ũi . Average Fβ -Measure (AF): m̃ AFβ = 1 m̃ 2 i ∗RRi 2 ∗AR +RR ∑ (ββ +1)∗AR i i (28) i=1 AFβ is the average Fβ -Measure of Ũ and describes a balance between AAR and ARR. When Ii j = 0 ∀i, j, ARR = 0 and AAR = 1; therefore, AFβ = 0. When Ii j = 1 ∀i, j, ARR = 1, and both AAR and AFβ will be low. A proper Ii j should be chosen to maximize AFβ with proper AAR and ARR. AFβ describes a balance between AAR and ARR. β = 0.5 is chosen in this experiment because ARR is as important as AAR, and the goal is to improve ARR and AAR simultaneously. Standard deviation of Fβ -Measure (SF): s SF = m̃ 1 m̃ ∑ (Fβi − AFβ )2 (29) i=1 SF is the standard deviation of the Fβ -Measure and describes the volatility of the Fβ -Measure, which is the volatility of the overall performance. T. Mo et al. / An influence-based fast preceding questionnaire model Figure 3. A part of the obtained FPQM. 4.3. The overall results The depth of the obtained FPQM is 45 because there are 45 investigation attributes in total. There is a corresponding rule with every node in the FPQM, and there are a total of 6072 rules. A part of the obtained FPQM is shown in Figure 3. A reasonable order for the investigation attributes can be obtained from the FPQM. Transfer Bed Chair is the first investigation attribute. When there is a new individual Ũi of Ũ, if the Transfer Bed Chair value of Ũi equals 1, we enter the corresponding branch of the FPQM, and the second investigation attribute is Outings. This will continue recursively until the last investigation attribute and a reasonable order for Ũi are obtained during this process. The order will be as follows: Transfer Bed Chair, Outings etc. Every elderly man has his own exclusive reasonable questionnaire order, which is made especially for that individual [16]. The FPQM is evaluated using the metrics AR, RR, and F, which are calculated with Eqs (21), (24), and (27), respectively. The AR, RR, and F of the FPQM are shown in Figure 4. The Y-axis indicates the values of AR, RR, and F, and the x-axis indicates the id of the elderly individual, thereby representing each investigated person. AR is more volatile; accordingly, F is also volatile. The FPQM is only a preceding questionnaire model, and the time required to obtain the pre-result is very short. To ensure 100% accuracy, the obtained pre-result needs to be verified by the elderly individual, but verification is certainly much faster than asking directly. 4.4. Comparison experiments To demonstrate that the FPQM is a good model for fast preceding questionnaires, Expert Knowledge, Rough Set [12,17], and C4.5 [13,23] are applied to solve the same problem. The results of the FPQM and those from these three methods are compared. 4.4.1. Expert Knowledge AR, RR and F are shown in Figure 5 when using the Expert Knowledge method. Expert Knowledge achieves a high AR, but the RR is very low. This result conforms with the characteristics of experts, who ensure high AR but do not greatly affect RR. AR is more volatile than RR between elderly individuals; accordingly, F is also volatile. T. Mo et al. / An influence-based fast preceding questionnaire model Figure 4. AR, RR and F of the FPQM. Figure 5. AR, RR and F of the Expert Knowledge method. 4.4.2. Rough Set The Rough Set method is also applied to solve the same problem in four steps. Step 1: First, take one attribute as the decision attribute and the other directions as the condition attributes. The correlation degree between each condition attribute and the decision attribute is calculated, and then, the attribute for which its correlation degree is less than a given threshold is deleted. Second, calculate the correlation degree between each T. Mo et al. / An influence-based fast preceding questionnaire model condition with all the other conditions. Delete the condition attributes whose correlation degree with this particular condition attribute is larger than the degree with the decision attribute. Step 2: Generate the decision rules with the reliability and coverage degrees. Let the decision equivalent class (DEC) be the collection of elderly individuals who have the same assessment result. Calculate the reliability and coverage degree for each DEC and delete those classes whose degree is less than a given threshold. The classes that may generate rarely appearing rules and uncertain rules can be deleted in this manner. The decision rules can be created using each of the remaining decision equivalent classes. Step 3: Sort the investigation attributes with the coverage degree. Merge the rules according to the coverage degree and create the assessment sequence of attributes by sorting the coverage degrees in descending order. Step 4: Use the merged rules and assessment sequence to simulate the assessment process for the new elderly individual in Ũ. When using the Rough Set method, AR, RR and F are shown in Figure 6. Rough Set achieves a high AR, but RR is slightly low. Both AR and RR are very volatile; therefore, F is also quite volatile. Figure 6. AR, RR and F of the Rough Set method. 4.4.3. C4.5 Now, we solve the same problem by applying the C4.5 method. We choose each investigation attribute of the 45 attributes in total of V as the terminal node, and other attributes are internal nodes. Using the C4.5 method, a decision tree is obtained, and there are 45 decision trees with 45 attributes. Then, we evaluate the new individual Ũi of Ũ with the 45 obtained decision trees. Initially, there are no attributes that can be inferred, and we ask the elderly individual Ũi for the real value Ri j directly. After accumulating sufficient real values {Ri j }, j ∈ {1, 2, ..., j∗ }, some attributes can be inferred as the leaf nodes of some of the 45 obtained decision trees; then, we can infer their final values R0i j . Other- T. Mo et al. / An influence-based fast preceding questionnaire model wise, we continue to ask about Ri j directly. Finally, all final values R0i j of the 45 attributes can be obtained. AR, RR and F using the C4.5 method are shown in Figure 7. C4.5 achieves very low AR, RR and F. The volatility of AR is slightly high, but C4.5 achieves a significantly lower volatility in RR and F. Figure 7. AR, RR and F of the C4.5 method. 4.4.4. Comparison results The FPQM, Expert Knowledge, Rough Set, and C4.5 methods are compared with respect to AR, RR and F individually to demonstrate which method achieves the best result. Figure 8 shows the AR comparison for the FPQM, Expert Knowledge, Rough Set, and C4.5 methods. The FPQM achieves the best AR performance, and the volatility is the lowest. Expert Knowledge achieves a slightly better AR than the Rough Set and C4.5 methods, but these three methods have almost the same volatility. The RR comparison of the FPQM, Expert Knowledge, Rough Set, and C4.5 methods is shown in Figure 9. Apparently, the FPQM also achieves the best RR, which is far higher than those of the other three methods. The Rough Set method achieves the second best value and has the greatest volatility. By comparison, RR of the Expert Knowledge and C4.5 methods are the worst and approximately equal. F is an integrated measurement of AR and RR. Figure 10 shows the F comparison for the FPQM, Expert Knowledge, Rough Set, and C4.5 methods. The FPQM achieves the best AR and RR, as will F naturally, and the volatility is the lowest. Because the other three methods have almost the same AR volatility, the F volatility is mainly determined by RR. The F performance of the Rough Set method is the second best but is the most volatile. The Expert Knowledge and C4.5 methods are the worst and approximately equal, but they do not exhibit a very high volatility. T. Mo et al. / An influence-based fast preceding questionnaire model Figure 8. The AR comparison for the FPQM, Expert Knowledge, Rough Set, and C4.5 methods. Figure 9. The RR comparison of the FPQM, Expert Knowledge, Rough Set, and C4.5 methods. Table 5 shows the mean and standard deviation of the four methods with respect to AR, RR, and F. The mean reflects the overall performance, and the standard deviation reflects the volatility in digital form. The mean of AR is denoted as AAR, as mentioned previously; similar notation is used for RR and F. These values can be calculated with Eqs (22), (25), and (28). The standard deviation of AR is denoted as SAR; similar notation is used for RR and F. These values can be calculated with Eqs (23), (26), and (29). T. Mo et al. / An influence-based fast preceding questionnaire model Figure 10. The F comparison of the FPQM, Expert Knowledge, Rough Set, and C4.5 methods. Table 5. Mean and standard deviation of the results under the four methods Metric Method Mean Standard deviation AR FPQM Expert Knowledge Rough Set C4.5 0.9839 0.9203 0.7589 0.6850 0.0560 0.1993 0.2223 0.2072 RR FPQM Expert Knowledge Rough Set C4.5 0.9056 0.0769 0.3335 0.0916 0.0221 0.0262 0.1003 0.0312 F FPQM Expert Knowledge Rough Set C4.5 0.9666 0.2800 0.5984 0.2778 0.0461 0.0870 0.1758 0.0637 The FPQM has the largest mean and the smallest standard deviation with respect to AR, RR and F. This means that the FPQM achieves the best performance and has the lowest volatility. The Expert Knowledge method has the second best mean for AR, 0.9203, and it has the smallest mean for RR, which conforms to the characteristics of expert knowledge. The Rough Set method is the most volatile with respect to AR, RR and F, and it achieves the second best mean for F and RR. The performance of the C4.5 method is almost the worst. 4.4.5. Result analysis Some of the improvements in the results are not highly significant when the FPQM is compared with other methods, such as the Rough Set method. We can explain this as T. Mo et al. / An influence-based fast preceding questionnaire model follows. The Rough Set method is also an excellent method for attribute reduction. Both the Rough Set and FPQM methods can capture the internal relationships among the attributes listed in Table 4, and predict multiple attributes simultaneously. Therefore, the FPQM does not achieve highly significant improvements compared with the Rough Set method. 4.5. Factor analysis Three factors are analyzed: the number of elderly individuals, the number of investigation attributes, and the threshold σ . The evaluation metrics AAR, ARR, AF, SAR, SRR, and SF are used to show the changes in the results. AAR, ARR, and AF can be calculated with Eq. (22), (25), and (28), respectively. Eq. (23), (26), and (29) can be used to calculate SAR, SRR, and SF, respectively. As illustrated in Figure 11, ARR decreases steadily and with minimal volatility when the number of the elderly individuals increases. AAR and AF are volatile and present a slight wavelike decrease overall. SRR increases continuously with a small slope. SF is highly similar to SAR because SRR is so small that SF is mainly determined by SAR. Figure 11. AAR, ARR, AF, SAR, SRR, and SF with increasing number of elderly individuals. With increasing number of investigation attributes, AAR, ARR, and AF present a fluctuating increasing trend, as shown in Figure 12. The increased level of ARR is higher than that of AAR and AF, and ARR shows slightly larger volatility. SAR, SRR, and SF decrease with some volatility, and SRR falls fairly steadily in the second half of the curve. SRR has minimal impact on SF, and SF has the same general trend as SAR. Briefly, more investigation attributes produce better results. Notice that some parts of the AAR, ARR, AF, SAR, SRR, and SF curves are flat, which simply embodies the intermittent nature of the threshold, as illustrated in Figure 13. Only the threshold σ achieves a level whereby a significant change can oc- T. Mo et al. / An influence-based fast preceding questionnaire model Figure 12. AAR, ARR, AF, SAR, SRR, and SF with increasing number of investigation attributes. cur. Changes mainly occur when σ is in the range of 0.3-0.65. If σ is too small, Ii j = 1 ∀1 6 i 6 m̃, 1 6 i 6 n. On the other hand, Ii j = 0 ∀1 6 i 6 m̃, 1 6 i 6 n when σ is too large. When the threshold σ increases, AAR, AF, and SRR present an increasing trend, whereas ARR, SAR and SF decrease. SRR simply shows a slow growth. ARR and SRR have minimal impact on AF and SF, respectively. Therefore, AF and SF show the same general trends as AAR and SAR, respectively. Therefore, to achieve better results, it is suggested to choose a slightly larger threshold σ . 5. Conclusion Traditional questionnaires are used in a manner whereby respondents are asked one question after another. The main two problems are inefficiency and that the order of the questions is not reasonable. In this paper, the fast preceding questionnaire model (FPQM) is proposed to solve these problems in five steps, as shown in Figure 1. The influence calculation formula, best attribute to split choosing algorithm (BASCA), fast preceding questionnaire model creating algorithm (FPQMCA), model used for real investigation algorithm (MURIA), and model evaluation algorithm (MEA) are all presented. The experimental section presents the experimental data; the evaluation metrics; the overall results of the FPQM; the comparison experiments with the Expert Knowledge, Rough Set, and C4.5 methods; and factor analysis, which includes the number of elderly individuals, the number of investigation attributes, and the threshold. When the FPQM is applied by the Lime Family company, after asking about certain attributes, most of the remaining attributes could be inferred automatically with a high accuracy and reduction rate and low volatility. To ensure 100% correctness, the model can be considered as a preceding questionnaire. Then, the elderly individual can perform verification, which is much faster than asking questions directly. T. Mo et al. / An influence-based fast preceding questionnaire model Figure 13. AAR, ARR, AF, SAR, SRR, and SF with increasing threshold σ . Further work will focus on three points. After the elderly individual is well assessed, a thorough study should be performed on determining an appropriate health care plan to be recommended automatically according to the assessment result. Then, the effect of the health care plan should be assessed as well. Moreover, as the amount data on elderly individuals continues increasing, certain distributed platforms, such as Hadoop and Spark, will be considered. Acknowledgements This work is supported by the National High Technology Research and Development Program (“863” Program) of China under Grant No. 2015AA016009 and the National Natural Science Foundation of China under Grant No. 61232005 The authors wish to thank Lei Yang from the Lime Family Company, who provided us with the evaluation data for the elderly individuals. Declaration: The data presented herein were only used for academic research. The customer ids have been anonymized, and the privacy of the elderly will not be invaded. References [1] M. Aoyama, Y. Suzuki, J. Onishi and M. Kuzuya, Physical and functional factors in activities of daily living that predict falls in community-dwelling older women, in: Geriatrics & Gerontology International 11(3) (2011), 348–357. [2] B. A. Arnow, E. M. Hunkeler, C. M. Blasey, J. Lee, M. J. Constantino, B. Fireman, H. C. Kraemer, R. Dea, R. Robinson and C. Hayward, Comorbid depression, chronic pain, and disability in primary care, in: Psychosomatic Medicine 68(2) (2006), 262–268. [3] A. Aydeniz, Ö. Altındağ, J. İrdesel, E. Madenci, F. Toraman, N. Turhan, İ. Yağcı, N. Eskiyurt, P. Yazgan and Y. G. Kutsal, Physical, functional and sociocultural parameters that predict fall in elderly: Multicen- T. Mo et al. / An influence-based fast preceding questionnaire model [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] ter study., in: Journal of Physical Medicine & Rehabilitation Sciences/Fiziksel Tup ve Rehabilitasyon Bilimleri Dergisi 18(3). X. Badia, A. Vieta and M. Gilabert, The bone metastases quality of life questionnaire, in: Handbook of Disease Burdens and Quality of Life Measures, Springer (2010), 195–207. S. Cinaroglu, Comparison of Performance of Decision Tree Algorithms and Random Forest: An Application on OECD Countries Health Expenditures, in: . M. Cruice, L. Worrall and L. Hickson, Personal factors, communication and vision predict social participation in older adults, in: Advances in Speech Language Pathology 7(4) (2005), 220–232. A.-L. Dima, Living with chronic pain-a longitudinal study of the interrelations between acceptance, emotions, illness perceptions and health status, Ph.D. thesis (2010). F. J. Drummond, L. Sharp, A.-E. Carsin, T. Kelleher and H. Comber, Questionnaire order significantly increased response to a postal survey sent to primary care physicians, in: Journal of Clinical Epidemiology 61(2) (2008), 177–185. K. K. Faulkner and R. Cogan, Measures of shame and conflict tactics: Effects of questionnaire order, in: Psychological Reports 66(3 suppl) (1990), 1217–1218. E. Fernandez and G. J. Boyle, Affective and evaluative descriptors of pain in the McGill pain questionnaire: Reduction and reorganization, in: The Journal of Pain 2(6) (2001), 318–325. J. L. Gatz, S. L. Tyas, P. S. John and P. Montgomery, Do depressive symptoms predict Alzheimer’s disease and dementia?, in: The Journals of Gerontology Series A: Biological Sciences and Medical Sciences 60(6) (2005), 744–747. A. Gyorgy and T. Linder, Codecell convexity in optimal entropy-constrained vector quantization, in: IEEE Transactions on Information Theory 49(7) (2003), 1821–1828. J. Han, J. Pei and M. Kamber, Data Mining: Concepts and Techniques, Elsevier (2011). B. C. Kersh, L. A. Bradley, G. S. Alarcón, K. R. Alberts, A. Sotolongo, M. Y. Martin, L. A. Aaron, D. F. Dewaal, M. L. Domino, W. F. Chaplin et al., Psychosocial and health status variables independently predict health care seeking in fibromyalgia, in: Arthritis Care & Research 45(4) (2001), 362–371. W. Kitisomprayoonkul, J. Klaphajone and A. Kovindha, Thai short-form McGill pain questionnaire, in: Journal-Medical Association of Thailand 89(6) (2006), 846. M. Kroh, F. Winter and J. Schupp, Using person-fit measures to assess the impact of panel conditioning on reliability, in: Public Opinion Quarterly (2016), nfw025. Y. Liu and W. Zhu, On three types of covering-based rough sets via definable sets, in: 2014 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE), IEEE, 1226–1233. F. I. Mahoney, Functional evaluation: The Barthel index, in: Maryland State Medical Journal 14 (1965), 61–65. E. Mccoll, M. P. Eccles, N. S. Rousseau, I. N. Steen, D. W. Parkin and J. M. Grimshaw, From the generic to the condition-specific? Instrument order effects in quality of life assessment, in: Medical Care 41(7) (2003), 777–790. I. McDowell, Measuring Health: A Guide to Rating Scales and Questionnaires, Oxford University Press (2006). T. E. Nijsten, F. Sampogna, M.-M. Chren and D. D. Abeni, Testing and reducing skindex-29 using Rasch analysis: Skindex-17, in: Journal of Investigative Dermatology 126(6) (2006), 1244–1250. L. Prieto, J. Alonso and R. Lamarca, Classical test theory versus Rasch analysis for quality of life questionnaire reduction, in: Health and Quality of Life Outcomes 1(1) (2003), 1. J. R. Quinlan, C4. 5: Programs for Machine Learning, Elsevier (2014). A. E. Rippentrop, E. M. Altmaier, J. J. Chen, E. M. Found and V. J. Keffala, The relationship between religion/spirituality and physical health, mental health, and pain in a chronic pain population, in: Pain 116(3) (2005), 311–321. R. Rosen, J. Cappelleri, M. Smith, J. Lipsky and B. Pena, Development and evaluation of an abridged, 5-item version of the international index of erectile function (IIEF-5) as a diagnostic tool for erectile dysfunction, in: International Journal of Impotence Research 11(6) (1999), 319–326. S. Singh and P. Gupta, Comparative study ID3, cart and C4. 5 decision tree algorithm: a survey, in: Int J Adv Inf Sci Technol [Internet] 27 (2014), 97–103. S. W. Vines, S. Gupta, T. Whiteside, D. Dostal-Johnson and A. Hummler-Davis, The relationship between chronic pain, immune function, depression, and health behaviors, in: Biological Research for Nursing 5(1) (2003), 18–29. S. Wang, X. Feng and Y. Liu, MZ/T 039-2013, Ability Assessment for Elder Adults, Standards Press of T. Mo et al. / An influence-based fast preceding questionnaire model China (2014). Appendices A. The time complexity of the FPQM A.1. The time complexity of the BASCA As shown in Algorithm 1, there are two loops on the attributes (Line 1 and Line 2) and two loops on the values of the attributes (Line 3 and Line 4) in the BASCA. As shown in Definition 3.3, V = {V1 ,V2 , ...,Vn }; therefore, there are n investigation attributes in V . V jtk has N jk1 possible values, where N jk1 is defined in Definition 3.5. Therefore, the time 1 complexity of Lines 1-13 is 1 TBASCA (n, N̄) = O(n2 N̄ 2 ) (30) where N̄ is the average of N j in N, N̄ = n1 ∑nj=1 N j , and n is the number of V . Line 14 calculates V∗t with Eq. (5), and there are n investigation attributes in V ; therefore, the time complexity of Line 14 is 2 TBASCA (n, N̄) = O(n) (31) Thus, the time complexity of the BASCA is 1 2 TBASCA (n, N̄) = TBASCA (n, N̄) + TBASCA (n, N̄) = O(n2 N̄ 2 ) (32) A.2. The time complexity of the FPQMCA The time complexity of Lines 1-5 is 1 (n, N̄) = O(1) TFPQMCA (33) The time complexity of Line 7 is 2 TFPQMCA (n, N̄) = O(n2 N̄ 2 ) (34) The time complexity of Lines 8-10 is 3 TFPQMCA (n, N̄) = O(1) (35) T. Mo et al. / An influence-based fast preceding questionnaire model The time complexity of Lines 11-15 is 4 TFPQMCA (n, N̄) = N̄ ∗ TFPQMCA (n − 1) (36) The time complexity of the FPQMCA is 1 2 3 4 TFPQMCA (n, N̄) = TFPQMCA (n, N̄) + TFPQMCA (n, N̄) + TFPQMCA (n, N̄) + TFPQMCA (n, N̄) = O(1) + O(n2 N̄ 2 ) + O(1) + N̄ ∗ TFPQMCA (n − 1, N̄) = O(n2 N̄ 2 ) + N̄ ∗ TFPQMCA (n − 1, N̄) (37) Eq. (37) is the recursion formula of TFPQMCA (n, N̄). TFPQMCA (n, N̄) = O(n2 N̄ 2 ) + N̄ ∗ TFPQMCA (n − 1, N̄)   = O(n2 N̄ 2 ) + N̄ ∗ O (n − 1)2 N̄ 2 + N̄ ∗ TFPQMCA (n − 2, N̄)  = O(n2 N̄ 2 ) + O (n − 1)2 N̄ 3 + N̄ 2 ∗ TFPQMCA (n − 2, N̄)  = O(n2 N̄ 2 ) + O (n − 1)2 N̄ 3 ) + ... + O(12 N̄ n+1 ) + N̄ n−1 ∗ T (1, N̄) n = ∑ O(i2 N̄ n−i+2 ) + N̄ n−1 ∗ T (1, N̄) i=1 n =O ∑ (i2 N̄ n−i+2 )  + N̄ n−1 ∗ T (1, N̄) (38) i=1 Let S = ∑ni=1 (i2 N̄ n−i+2 ). n−1  (N̄ − 1)S = N̄ n+2 + ∑ (i + i + 1)N̄ n−i+2 − n2 N̄ 2 (39) i=1 n+2 N̄(N̄ − 1)S − (N̄ − 1)S = N̄ n+3 + 2 ∑ N̄ i − (n2 + 2n − 1)N̄ 3 + n2 N̄ 2 (40)  n+3 2N̄ 4 (1 − N̄ n−1 )  1 N̄ + − (n2 + 2n − 1)N̄ 3 + n2 N̄ 2 2 (N̄ − 1) 1 − N̄ (41) i=4 S= Plugging Eq. (41) into Eq. (38), T (1, N̄) = O(1); thus, T. Mo et al. / An influence-based fast preceding questionnaire model TFPQMCA (n, N̄)    n+3 2N̄ 4 (1 − N̄ n−1 ) 1 2 3 2 2 + N̄ n−1 ∗ T (1, N̄) =O N̄ N̄ + − (n + 2n − 1) N̄ + n (N̄ − 1)2 1 − N̄    n+3 2N̄ 4 (1 − N̄ n−1 ) 1 2 3 2 2 =O + O(N̄ n−1 ) N̄ N̄ + − (n + 2n − 1) N̄ + n (N̄ − 1)2 1 − N̄  1   N̄ 4 N̄ n−1 = O 2 N̄ n+3 + − n2 N̄ 3 + n2 N̄ 2 + O(N̄ n−1 ) N̄ N̄ = O(N̄ n+1 + n2 N̄) (42) The time complexity of the FPQMCA is TFPQMCA (n, N̄) = O(N̄ n+1 + n2 N̄) (43) A.3. The time complexity of the MURIA The time complexity of Lines 1-10 is 1 TMURIA (n, N̄) = O(1) (44) The time complexity of Line 11 is 2 (n, N̄) = O(N̄) TMURIA (45) The time complexity of Lines 12-24 is 3 TMURIA (n, N̄) = O(1) (46) The time complexity of Lines 25-27 is 4 TMURIA (n, N̄) = TMURIA (n − 1, N̄) (47) The time complexity of the MURIA is 1 2 3 4 (n, N̄) + TMURIA (n, N̄) + TMURIA (n, N̄) TMURIA (n, N̄) = TMURIA (n, N̄) + TMURIA = O(1) + O(N̄) + O(1) + TMURIA (n − 1, N̄) = O(N̄) + TMURIA (n − 1, N̄) Eq. (48) is the recursion formula of TMURIA (n, N̄). (48) T. Mo et al. / An influence-based fast preceding questionnaire model TMURIA (n, N̄) = O(N̄) + TMURIA (n − 1, N̄) = 2O(N̄) + TMURIA (n − 2, N̄) = (n − 1)O(N̄) + TMURIA (1, N̄) (49) TMURIA (1, N̄) = O(1); therefore, the time complexity of the MURIA is TMURIA (n, N̄) = (n − 1)O(N̄) + O(1) = O(nN̄) (50) A.4. The time complexity of the MEA The time complexity of Lines 1-9 is 1 TMEA (n, m̃) = O(m̃n) (51) The time complexity of Lines 14-27 is 2 TMEA (n, m̃) = O(m̃n) (52) The time complexity of Lines 10-13 and 28-30 is 3 TMEA (n, m̃) = O(1) (53) Thus, the time complexity of the MEA is 1 2 3 TMEA (n, m̃) = TMEA (n, m̃) + TMEA (n, m̃) + TMEA (n, m̃) = O(m̃n) (54) A.5. The time complexity of the FPQM The time complexity of the FPQM is TFPQM (n, N̄, m̃) = TBASCA (n, N̄) + TFPQMCA (n, N̄) + TMURIA (n, N̄) + TMEA (n, m̃) = O(n2 N̄ 2 ) + O(N̄ n+1 + n2 N̄) + O(nN̄) + O(m̃n) = O(n2 N̄ 2 ) + O(N̄ n+1 ) + O(m̃n) (55)
2cs.AI
Longest Common Prefixes with k-Errors and Applications arXiv:1801.04425v1 [cs.DS] 13 Jan 2018 Lorraine A.K. Ayad, Panagiotis Charalampopoulos, Costas S. Iliopoulos, and Solon P. Pissis Department of Informatics, King’s College London, London, UK [lorraine.ayad,panagiotis.charalampopoulos, costas.iliopoulos,solon.pissis]@kcl.ac.uk Abstract. Although real-world text datasets, such as DNA sequences, are far from being uniformly random, average-case string searching algorithms perform significantly better than worst-case ones in most applications of interest. In this paper, we study the problem of computing the longest prefix of each suffix of a given string of length n over a constantsized alphabet that occurs elsewhere in the string with k-errors. This problem has already been studied under the Hamming distance model. Our first result is an improvement upon the state-of-the-art average-case time complexity for non-constant k and using only linear space under the Hamming distance model. Notably, we show that our technique can be extended to the edit distance model with the same time and space complexities. Specifically, our algorithms run in O(n logk n log log n) time on average using O(n) space. We show that our technique is applicable to several algorithmic problems in computational biology and elsewhere. 1 Introduction The longest common prefix (LCP) array is a commonly used data structure alongside the suffix array (SA). The LCP array stores the length of the longest common prefix between two adjacent suffixes of a given string as they are stored (in lexicographical order) in the SA [20]. A typical use combining the SA and the LCP array is to simulate the suffix tree functionality using less space [2]. However, there are many practical scenarios where the LCP array may be applied without making use of the SA. The LCP array provides us with essential information regarding repetitiveness in a given string and is therefore a useful data structure for analysing textual data in areas such as molecular biology, musicology, or natural language processing (see [21] for some applications). It is also quite common to account for potential alterations within textual data (sequences). For example, they can be the result of DNA replication or sequencing errors in DNA sequences. In this context, it is natural to define the longest common prefix with k-errors. Given a string x[0 . . n − 1], the longest common prefix with k-errors for every suffix x[i . . n − 1] is the length of the longest common prefix of x[i . . n − 1] and any x[j . . n − 1], where j 6= i, with applying up to k substitution operations [21]. Some applications are given below. Interspersed Repeats. Repeated sequences are a common feature of genomes. One type in particular, interspersed repeats, are known to occur in all eukaryotic genomes. These repeats have no repetitive pattern and appear irregularly within DNA sequences [15]. Single nucleotide polymorphisms result in the existence of interspersed repeats that are not identical [19]. Identifying these repeats has been linked to genome folding locations and phylogenetic analysis [24]. Genome Mappability Data Structure. In [3] the authors showed that using the longest common prefixes with k-errors they can construct, in O(n) worst-case time, an O(n)-sized data structure answering the following type of queries in O(1) time per query: find the smallest m such that at least µ of the substrings of x of length m do not occur more than once in x with at most k errors. This is a data structure version of the genome mappability problem [8, 21, 4]. Longest Common Substring with k-Errors. The longest common substring with k-errors problem has received much attention recently, in particular due to its applications in computational biology [27, 18, 26]. We are asked to find the longest substrings of two strings that are at distance at most k. The notion of longest common prefix with k-errors is thus closely related to the notion of longest common substring with k-errors. We refer the interested reader to [1, 10, 11, 14, 25]. All-Pairs Suffix/Prefix Overlaps with k-Errors. Finding approximate overlaps is the first stage of most genome assembly methods. Given a set of strings and an error-rate ǫ, the goal is to find, for all pairs of strings, their suffix/prefix matches (overlaps) that are within distance k = ⌈ǫℓ⌉, where ℓ is the length of the overlap [23, 28, 16]. By concatenating the strings to form one single string x and then computing longest common prefixes with k-errors for x only against the prefixes of the strings we have all the information we need to solve this problem. Our Model. We assume the standard word-RAM model with word size w = Ω(log n). Although real-world text datasets are far from being uniformly random, average-case string searching algorithms perform significantly better than worstcase ones in most applications of interest. We are thus interested in the averagecase behaviour of our algorithms. When we state average-case time complexities for our algorithms, we assume that the input is a string x of length n over an alphabet Σ of size σ > 1 with the letters of x being independent and identically distributed random variables, uniformly distributed over Σ. In the context of molecular biology we typically have Σ = {A,C,G,T} and so we assume σ = O(1). Related Works. The problem of computing longest common prefixes with kerrors was first studied by Manzini for k = 1 in [21]. We distinguish the following techniques that can be applied to solve this and other related problems. Non-constant k and ω(n) space: In this case, we can make use of the wellknown data structure by Cole et al [7]. The size of the data structure is n)k O(n (c log ), where c > 1 is a constant. k! 2 Constant k and O(n) space: In this case, we can make use of the technique by Thankachan et al [25] which builds heavily on the data structure by Cole et al. The working space is exponential in k but O(n) for k = O(1). Non-constant k and O(n) space: In this case, there exists a simple O(n2 k)time worst-case algorithm to solve the problem. The best-known averagecase algorithm was presented in [3]. It requires O(n(σR)k log log n(log k + log log n)) time on average, where R = ⌈(k + 2)(logσ n + 1)⌉. Other related works: In [14] it was shown that a strongly subquadratic-time algorithm for the longest common substring with k-errors problem, for k = Ω(log n) and binary strings, refutes the Strong Exponential Time Hypothesis. Thus subquadratic-time solutions for approximate variants of the problem have been developed [14]. A non-deterministic algorithm is also known [1]. Our Contribution. In this paper, we continue the line of research for non-constant k and O(n) space to investigate the limits of computation in the average-case setting; in particular in light of the worst-case lower bound shown in [14]. We make the following threefold contribution. 1. We first show a non-trivial upper bound of independent interest: the expected length of the maximal longest common prefix with k-errors between a pair of suffixes of x is O(logσ n) when k ≤ logloglogn n . 2. By applying this result, we significantly improve upon the state-of-the-art algorithm for non-constant k and using O(n) space [3]. Specifically, our algorithm runs in O(n logk n log log n) time on average using O(n) space. 3. Notably, we extend our results to the edit distance model with no extra cost thus solving the genome mappability data structure problem, the longest common substring with k-errors problem, and the all-pairs suffix/prefix overlaps with k-errors problem in strongly sub-quadratic time for k ≤ logloglogn n . 2 Preliminaries We begin with some basic definitions and notation. Let x = x[0]x[1] . . . x[n−1] be a string of length |x| = n over a finite ordered alphabet Σ of size |Σ| = σ = O(1). For two positions i and j on x, we denote by x[i . . j] = x[i] . . . x[j] the substring (sometimes called factor ) of x that starts at position i and ends at position j. We recall that a prefix of x is a substring that starts at position 0 (x[0 . . j]) and a suffix of x is a substring that ends at position n − 1 (x[i . . n − 1]). Let y be a string of length m with 0 < m ≤ n. We say that there exists an occurrence of y in x, or, more simply, that y occurs in x, when y is a substring of x. Every occurrence of y can be characterised by a starting position in x. We thus say that y occurs at the starting position i in x when y = x[i . . i + m − 1]. The Hamming distance between two strings x and y, with |x| = |y|, is defined as dH (x, y) = |{i : x[i] 6= y[i], i = 0, 1, . . . , |x|−1}|. If |x| 6= |y|, we set dH (x, y) = ∞. The edit distance between x and y is the minimum total cost of a sequence of edit operations (insertions, deletions, substitutions) required to transform x into y. It is known as Levenshtein distance for unit cost operations. We consider 3 this special case here. If two strings x and y are at (Hamming or edit) distance at most k we say that x and y have k-errors or have at most k errors. We denote by SA the suffix array of x. SA is an integer array of size n storing the starting positions of all (lexicographically) sorted non-empty suffixes of x, i.e. for all 1 ≤ r < n we have x[SA[r − 1] . . n − 1] < x[SA[r] . . n − 1] [20]. Let lcp(r, s) denote the length of the longest common prefix between x[SA[r] . . n − 1] and x[SA[s] . . n − 1] for positions r, s on x. We denote by LCP the longest common prefix array of x defined by LCP[r] = lcp(r − 1, r) for all 1 ≤ r < n, and LCP[0] = 0. The inverse iSA of the array SA is defined by iSA[SA[r]] = r, for all 0 ≤ r < n. It is known that SA, iSA, and LCP of a string of length n, over a constant-sized alphabet, can be computed in time and space O(n) [22, 9]. It is then known that a range minimum query (RMQ) data structure over the LCP array, that can be constructed in O(n) time and O(n) space [5], can answer lcp-queries in O(1) time per query [20]. The lcp queries are also known as longest common extension (LCE) queries. The permuted LCP array, denoted by PLCP, has the same contents as the LCP array but in different order. Let i− denote the starting position of the lexicographic predecessor of x[i . . n−1]. For i = 0, . . . , n−1, we define PLCP[i] = LCP[iSA[i]] = lcp(iSA[i− ], iSA[i]]), that is, PLCP[i] is the length of the longest common prefix between x[i . . n − 1] and its lexicographic predecessor. For the starting position j of the lexicographically smallest suffix we set PLCP[j] = 0. For any k ≥ 0, we define lcpk (y, z) as the largest ℓ ≥ 0 such that y[0 . . ℓ − 1] and z[0 . . ℓ − 1] exist and are at Hamming distance at most k; note that this is defined for a pair of strings. We analogously define the permuted LCP array with k-errors, denoted by PLCPk . For i = 0, . . . , n − 1, we have that PLCPk [i] = max j=0,...,n−1, j6=i lcpk (x[i . . n − 1], x[j . . n − 1]). The main computational problem in scope can be formally stated as follows. PLCP with k-Errors Input: A string x of length n and an integer 0 < k < n Output: PLCPk and Pk ; Pk [i] 6= i, for i = 0, . . . , n − 1, is such that x[i . . i + ℓ − 1] ≈k x[Pk [i] . . Pk [i] + ℓ − 1], where ℓ = PLCPk [i] We assume that k ≤ log n log log n throughout, since all relevant time-complexities k contain an n log n factor and any larger k would force this value to be Ω(n2 ): n logk n ≤ cn2 ⇔ k log log n ≤ log(cn) ⇔ k ≤ 3 log c + log n , c ≥ 1. log log n Computing PLCPk In this section we propose a new algorithm for the PLCP with k-Errors problem under both the Hamming and the edit distance (Levenshtein distance) 4 models. This algorithm is based on a deeper look into the expected behaviour of the longest common prefixes with k-errors. This in turn allows us to make use of the y-fast trie, an efficient data structure for maintaining integers from a bounded domain. We already know the following result for errors under the Hamming distance model. Theorem 1 ([3]). Problem PLCP with k-Errors for 1 ≤ k ≤ logloglogn n can be solved in average-case time O(n(σR)k log2 log n), where R = ⌈(k+2)(logσ n+1)⌉, using O(n) extra space. In the rest of this section, we show the following result for errors under both the Hamming and the edit distance models. Theorem 2. Problem PLCP with k-Errors can be solved in average-case k time O(n ck! logk n log log n), where c is a constant, using O(n) extra space. For clarity of presentation, we first do the analysis and present the algorithm under the Hamming distance model in Sections 3.1 and 3.2. We then show how to extend our technique to work under the edit distance model in Section 3.3. 3.1 Expectations The expected maximal value in the LCP array is 2 logσ n + O(1) [13]. We can thus obtain a trivial O(k logσ n) bound on the expected length of the maximal longest common prefix with k-errors for arbitrary k and σ. By looking deeper into the expected behaviour of the longest common prefixes with k-errors we show the following result of independent interest for when k ≤ logloglogn n . Theorem 3. Let x be a string of length n over an alphabet of size σ > 1 and 1 ≤ k ≤ logloglogn n be an integer. (a) The expected length of the maximal longest common prefix with k-errors between a pair of suffixes of x is O(logσ n). (b) There exists a constant α such that the expected number of pairs of suffixes of x with a common prefix with k-errors of length at least α logσ n is O(1). Proof (a). Let us denote the ith suffix of x by xi = x[i . . n − 1]. Further let us define the following random variables: Xi,j = lcpk (xi , xj ) and Y = Claim. Pr(Xi,j ≥ m) ≤ max 0≤i<j≤n−1 Xi,j .   m 1 m−k . k σ Proof (of Claim). Each possible set of positions where a substitution is allowed  is a subset of one of the m subsets of m of size k. For each of these subsets, we k can disregard what happens in the k chosen positions; in order to yield a match with k-errors, the remaining m − k positions must match and each of them matches with probability σ1 . The claim follows by applying the Union-Bound (Boole’s inequality). ⊓ ⊔ 5 By applying the Union-Bound again we have that Pr(Y ≥ m) = Pr( [ i<j {Xi,j ≥ m}) ≤ X Pr(Xi,j i<j   m 1 ≥ m) ≤ n , m−k k σ 2 for m ≥ k and Pr(Y ≥ m) = 1 for m ≤ k. The expected value of Y is given by: ∞ X E[Y ] = m=1 α(logσ +k) Pr(Y ≥ m) = X m=1 | Pr(Y ≥ m) + {z ≤α(logσ n+k) } ∞ X m=α(logσ n+k)+1 Pr(Y ≥ m). (Note that we bound the first summand using that Pr(Y ≥ m) ≤ 1 for all m.)   m rm,k ≤ 23 for m ≥ 6k. Claim. Let rm,k = . We have that rm−1,k k Proof (of Claim). rm,k m 6k 6k 3 = ≤ = ≤ . rm−1,k (m − k − 1) (6k − k − 1) (5k − 1) 2 ⊓ ⊔ By assuming β = α(logσ n + k) + 1 ≥ 6k, for some α > 1, we apply the above claim to bound the second summand as follows.    m−6k   ∞ ∞ ∞ X X X 1 3 1 2 6k 2 m ≤ n Pr(Y ≥ m) ≤ n 2 σ m−k k k σ m−k m=β = ∞ X m=β n2 m=β m=β    5k  β−k X m    5k  m−k ∞  3 6k 3 3 2 6k 2 ≤ n2 3 2σ 3 2σ 2σ k k m=0 ≤ An6  3 2σ β−k ≤ An6  3 2σ α logσ n = An6 n α(1−1/ log3/2 σ) for some constant A since σ ≥ 2 and (6k)k ≤ 23 log n k k ≤ n3 logk n = O(n4 ). Then 1 − 1/ log3/2 σ > 0 and we can thus pick an α large enough such that this sum is O(n−ǫ ) for any ǫ > 0. ⊓ ⊔ Proof (b). Let Ii,j,m be the indicator random variable for the event {Xi,j ≥ m}. We then have that X X X Pr(Xi,j ≥ m), E[Ii,j,m ] = Ii,j,m ] = E[ i<j i<j i<j which we have already shown is O(1) if m = α logσ n for some α > 1. 6 ⊓ ⊔ p i a0 j0 ae je X X X X i+m−1 Fig. 1: The (e+1)th error is any possible substitution at a position je < p ≤ i+m. 3.2 Improved Algorithm for Hamming Distance The y-fast trie, introduced in [29], supports insert, delete and search (exact, predecessor and successor queries) in time O(log log U ) with high probability, using O(n) space, where n is the number of stored values and U is size of the universe. We consider each substring of x of length at most λ = α log n for a constant α satisfying Theorem 3 (b) as a λ-digit number; note that by our assumptions this number fits in a computer word. We thus have U = σ λ and hence log log U = O(log log n + log α) = O(log log n). We initialise PLCPk and Pk for each i based on the longest common prefix of x[i . . n − 1] (i.e. not allowing any errors) that occurs elsewhere using the SA and the LCP array; this can be done in O(n) time. For each pair of suffixes that share a prefix of at least λ we perform (at most) k LCE queries to find their longest common prefix allowing for k-errors; by Theorem 3 these pairs are O(1). We then initialise the y-fast trie by inserting x[i . . i + λ − 1] to it for each position i of x with i ≤ n − λ. (For the rest of the positions, for which we reach the end of x, we insert x[i . . n − 1] after some trivial technical considerations.) This procedure takes time O(n log log n) in total.  We then want to find a longest prefix of the σ k λk strings of length at most λ that are at Hamming distance at most k from x[i . . i + λ − 1] that occurs elsewhere in x as well as an occurrence of it. If this prefix is of length λ, we find all positions t in x for which dH (x[i . . i + λ − 1], x[t . . t + λ −1]) ≤ k and treat each of them individually. We generate a subset of the σ k λk strings; we avoid generating some that we already know do not occur in x. We only want to allow the first error at position p, where i ≤ p ≤ i + PLCP0 [i]. Let us denote the substitution at position j with letter a by (j, a). Suppose that the longest prefix of x[i . . n − 1] after substitutions (j0 , a0 ), . . . , (je , ae ) that occurs elsewhere in the string is of length m. We then want to allow the (e + 1)th error at positions je < p ≤ i + m; inspect Figure 1 for an illustration. It should be clear that we obtain each possible sequence of substitutions at most once. We view each string z created after at most k substitution operations as a number; the aim is to find its longest prefix that occurs elsewhere in x. To this end we perform at most three queries over the y-fast trie: an exact; a predecessor; and a successor query. If the exact query is unsuccessful, then either the predecessor or the successor query will return a factor z ′ of x that attains the maximal longest common prefix that any factor of x has with z. Note that it may be the case that z ′ only occurs at position i; however in this case lcpk (z, z ′ ) will be smaller 7 or equal than the value currently stored at PLCPk [i] due to how we generate each such string z. Hence we do not perform an invalid update of PLCPk [i]. Having found z ′ , we can then compute the length of the longest common prefix between z and z ′ in constant time using standard bit-level operations. For clarity of presentation we assume |z| = |z ′ | = λ. An XOR operation between z and z ′ provides us with an integer d specifying the positions of errors (bits set on when d is viewed as binary). If d 6= 0, we take δ = ⌊log d⌋, which provides us with the index of the leftmost bit set on which in turn specifies the length of the σ⌉−δ−1 longest common prefix between z and z ′ ; specifically lcp0 (z, z ′ ) = ⌊ λ⌈log ⌋. ⌈log σ⌉ ′ If z = z we perform LCE queries between all suffixes of the text that have z as a prefix and x[j . . j + λ − 1]; by Theorem 3 we expect this to happen O(1) times in total, so the cost is immaterial. We have α log n positions where we need to consider the k errors, yielding an  k k n overall time complexity of O(nσ k α log log log n) = O(n (ασ) k! log n log log n). k We thus obtain the following result. Theorem 2. Problem PLCP with k-Errors can be solved in average-case k time O(n ck! logk n log log n), where c is a constant, using O(n) extra space. k ≤ (ασ)ασ = O(1) and hence the required time Remark 1. We have that (ασ) k! is bounded by O(n logk n log log n). Remark 2. If α log n > w, where w is the word size in the word-RAM model, we can make use of the deterministic data structure presented in [6] (Theorem 1 therein), which can be built in O(n) time for a string x of length n and answers predecessor queries (i.e. given a query string p, it returns the lexicographically σ largest suffix of x that is smaller than p) in time O( |p| log +log |p|+log log σ). In w particular, the queries in scope can be answered in time O(log log n) per query. 3.3 Edit Distance We next consider computing PLCPk under the edit distance model; however in this case we observe that x[i . . n − 1] and x[i + j . . n − 1] are at edit distance j for i − k ≤ j ≤ i + k. We hence alter the definition so that PLCPk [i] refers to the longest common prefix of x[i . . n − 1] with k-errors occurring at a position j∈ / Si,k = {i − k, . . . , i + k}. The proof of Theorem 3 can be extended to allow for k-errors under the  3k edit distance. In this case we have that Pr(Xi,j ≥ m) ≤ m k σm−k ; this can be seen by following the same reasoning as in the first claim of the proof with two extra considerations: (a) each deletion/insertion operation conceptually shifts the letters to be matched (giving the 3k factor); (b) the letters to be matched are m minus the number of deletions and substitutions and hence at least √ m − k. The extra 3k factor gets consumed by (2/3)5k later in the proof since 2 5 3/3 < 1. On the technical side, we modify the algorithm of Section 3.2 as follows: 8 x[j . . n − 1] j j+k n−1 i i+k x[i . . n − 1] n−1 Fig. 2: We need to perform k extension steps in 2k + 1 diagonals of the dynamic programming matrix for x[i . . n − 1] and x[j . . n − 1]. 1. At each position, except for σ − 1 substitutions, we also consider σ insertions and 1 deletion. This yields a multiplicative 2k factor in the time complexity. We keep counters ins for insertions and del for deletions; for each length we obtain, we add del and subtract ins. 2. When querying for a string z while processing position i we now have to check that we do not return a position j ∈ Si,k . We can resolve this by spending O(k) time for each position i; when we start processing position i, we create an array of size O(k) that stores for each position j ∈ Si,k a position fj ∈ / Si,k with the maximal longest common prefix with x[j . . n − 1] using the SA and the LCP array. When a query returns a position j ∈ Si,k we instead consider fj . 3. We replace the LCE queries used to compute values in PLCPk longer than λ (that required O(k) time in total) by the Landau-Vishkin technique [17] to perform extensions. For an illustration inspect Figure 2. We initiate 2k + 1 diagonal paths in the classical dynamic programming matrix for x[i . . n − 1] and x[j . . n−1]. The ith diagonal path above and the ith diagonal path below the main diagonal are initialised to i errors. The path starting at the main diagonal is initialised to 0 errors. We first perform an LCE query between x[i . . n − 1] and x[j + d . . n − 1], for all 0 ≤ d ≤ k, and an LCE query between x[i + d . . n − 1] and x[j . . n − 1], for all 1 ≤ d ≤ k. Then, for all 1 ≤ d ≤ k, we try to extend a path with exactly d− 1 errors to a path with exactly d errors. We perform an insertion, a deletion, or a substitution with a further LCE query and pick the farthest reaching extension. The bottom-most extension of any diagonal when d = k specifies the length of the longest common prefix with k-errors. The whole process takes time O(k 2 ). 9 4 Genome Mappability Data Structure The genome mappability problem has already been studied under the Hamming distance model [8, 21, 4]. We can also define the problem under the edit distance model. Given a string x of length n and integers m < n and k < m, we are asked to count, for each length-m substring x[i . . i + m − 1] of x, the number occ of other substrings of x occurring at a position j ∈ / Si,k = {i − k, . . . , i + k} that are at edit distance at most k from x[i . . i + m − 1]. We then say that this substring has k-mappability equal to occ. Specifically, we consider a data structure version of this problem [3]. Given x and k, construct a data structure, which, for a query value µ given on-line, returns the minimal value of m that forces at least µ length-m substrings of x to have k-mappability equal to 0. Theorem 4 ([3]). An O(n)-sized data structure answering genome mappability queries in O(1) time per query can be constructed from PLCPk in time O(n). By combining Theorem 2 with Theorem 4 we obtain the first efficient algorithm for the genome mappability data structure under the edit distance model. 5 Longest Common Substring with k-Errors In the longest common substring with k-errors problem we are asked to find the longest substrings of two strings that are at distance at most k. The Hamming distance version has received much attention due to its applications in computational biology [27, 18, 26]. Under edit distance, the problem is largely unexplored. The average k-error common substring is an alignment-free method based on this notion for measuring string dissimilarity under Hamming distance; we denote the induced distance by Distk (x, y) for two strings x and y (see [27] for the definition). Distk (x, y) can be computed in time O(|x| + |y|) from arrays Λx,y and Λy,x , defined as Λx,y [i] = max (lcpk (x[i . . |x| − 1], y[j . . |y| − 1])). 0≤j≤|y|−1 A worst-case and a more practical average-case algorithm for the computation of Λx,y have been presented in [25, 26]. This measure was extended to allow for wildcards (don’t care letters) in the strings in [12]. Here we provide a natural generalisation of this measure: the average k-error common substring under the edit distance model. The sole change is in the definition of Λx,y [i]: except for substitution, we also allow for insertion and deletion operations. The algorithm of Section 3.3 can be applied to compute Λx,y under the edit distance model within the same complexities. We start by constructing the y-fast trie for y. We then do the queries for the suffixes of x; we now also check for an exact match (i.e. for x[i . . i + α log(|x| + |y|) − 1]). We obtain the following result. Theorem 5. Given two strings x and y of length at most n and a distance threshold k, arrays Λx,y and Λy,x and Distk (x, y) can be computed in averagek case time O(n ck! logk n log log n), where c is a constant, using O(n) extra space. 10 Remark 3. By applying Theorem 5 we essentially solve the longest common substring with k-errors for x and y within the same complexities. 6 All-Pairs Suffix/Prefix Overlaps with k-Errors Given a set of strings and an error-rate ǫ, the goal is to find, for all pairs of strings, their suffix/prefix matches (overlaps) that are within distance k = ⌈ǫℓ⌉, where ℓ is the length of the overlap [23, 28, 16]. Using our technique but only inserting prefixes of the strings in the y-fast trie and querying for all starting positions (suffixes) in a similar manner as in Section 3.1, we obtain the following result. Theorem 6. Given a set of strings of total length n and a distance threshold k, the length of the maximal longest suffix/prefix overlaps of every string against all other strings within distance k can be computed in average-case time k O(n ck! logk n log log n), where c is a constant, using O(n) extra space. References 1. Amir Abboud, Ryan Williams, and Huacheng Yu. More applications of the polynomial method to algorithm design. In SODA, SODA ’15, pages 218–230. Society for Industrial and Applied Mathematics, 2015. 2. Mohamed Ibrahim Abouelhoda, Stefan Kurtz, and Enno Ohlebusch. Replacing suffix trees with enhanced suffix arrays. Journal of Discrete Algorithms, 2(1):53– 86, 2004. 3. Hayam Alamro, Lorraine A. K. Ayad, Panagiotis Charalampopoulos, Costas S. Iliopoulos, and Solon P. Pissis. Longest common prefixes with k-mismatches and applications. In SOFSEM, volume 10706 of LNCS, pages 636–649. Springer International Publishing, 2018. 4. Mai Alzamel, Panagiotis Charalampopoulos, Costas S. Iliopoulos, Solon P. Pissis, Jakub Radoszewski, and Wing-Kin Sung. Faster algorithms for 1-mappability of a sequence. In COCOA, volume 10628 of LNCS, pages 109–121. Springer International Publishing, 2017. 5. Michael A. Bender and Martín Farach-Colton. The LCA problem revisited. In LATIN, volume 1776 of LNCS, pages 88–94. Springer-Verlag, 2000. 6. Philip Bille, Inge Li Gørtz, and Frederik Rye Skjoldjensen. Deterministic indexing for packed strings. In CPM, volume 78 of LIPIcs, pages 6:1–6:11. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2017. 7. Richard Cole, Lee-Ad Gottlieb, and Moshe Lewenstein. Dictionary matching and indexing with errors and don’t cares. In STOC, STOC ’04, pages 91–100. ACM, 2004. 8. Thomas Derrien, Jordi Estellé, Santiago Marco Sola, David Knowles, Emanuele Raineri, Roderic Guigó, and Paolo Ribeca. Fast computation and applications of genome mappability. PLoS ONE, 7(1), 2012. 9. Johannes Fischer. Inducing the LCP-array. In WADS, volume 6844 of LNCS, pages 374–385. Springer-Verlag, 2011. 10. Tomás Flouri, Emanuele Giaquinta, Kassian Kobert, and Esko Ukkonen. Longest common substrings with k mismatches. Inf. Process. Lett., 115(6-8):643–647, 2015. 11 11. Szymon Grabowski. A note on the longest common substring with k-mismatches problem. Inf. Process. Lett., 115(6-8):640–642, 2015. 12. Sebastian Horwege, Sebastian Lindner, Marcus Boden, Klas Hatje, Martin Kollmar, Chris-Andre Leimeister, and Burkhard Morgenstern. Spaced words and kmacs: fast alignment-free sequence comparison based on inexact word matches. Nucleic Acids Research, 42(Webserver-Issue):7–11, 2014. 13. S. Karlin, G. Ghandour, F. Ost, Tavare S., and L. J. Korn. New approaches for computer analysis of nucleic acid sequences. In Proceedings of the National Academy of Sciences USA, volume 80, pages 5660–5664, 1983. 14. Tomasz Kociumaka, Jakub Radoszewski, and Tatiana A. Starikovskaya. Longest common substring with approximately k mismatches. CoRR, abs/1712.08573, 2017. 15. Roman Kolpakov, Ghizlane Bana, and Gregory Kucherov. mreps: efficient and flexible detection of tandem repeats in DNA. Nucleic Acids Research, 31(13):3672– 3678, 2003. 16. Gregory Kucherov and Dekel Tsur. Improved filters for the approximate suffixprefix overlap problem. In SPIRE, volume 8799 of LNCS, pages 139–148. Springer, 2014. 17. Gad M. Landau and Uzi Vishkin. Efficient string matching in the presence of errors. In IEEE, editor, FOCS, pages 126–136. IEEE Computer Society, 1985. 18. Chris-Andre Leimeister and Burkhard Morgenstern. Kmacs: the k -mismatch average common substring approach to alignment-free sequence comparison. Bioinformatics, 30(14):2000–2008, 2014. 19. Kung-Hao Liang. Bioinformatics for Biomedical Science and Clinical Applications. Woodhead Publishing Series in Biomedicine. Woodhead Publishing, 2013. 20. Udi Manber and Eugene W. Myers. Suffix arrays: A new method for on-line string searches. SIAM J. Comput., 22(5):935–948, 1993. 21. Giovanni Manzini. Longest common prefix with mismatches. In SPIRE, volume 9309 of LNCS, pages 299–310. Springer, 2015. 22. Ge Nong, Sen Zhang, and Wai Hong Chan. Linear suffix array construction by almost pure induced-sorting. In DCC, IEEE, pages 193–202, 2009. 23. Kim R. Rasmussen, Jens Stoye, and Eugene W. Myers. Efficient q-gram filters for finding all epsilon-matches over a given length. Journal of Computational Biology, 13(2):296–308, 2006. 24. Arian FA Smit. Interspersed repeats and other mementos of transposable elements in mammalian genomes. Current Opinion in Genetics & Development, 9(6):657– 663, 1999. 25. Sharma V. Thankachan, Alberto Apostolico, and Srinivas Aluru. A provably efficient algorithm for the k -mismatch average common substring problem. Journal of Computational Biology, 23(6):472–482, 2016. 26. Sharma V. Thankachan, Sriram P. Chockalingam, Yongchao Liu, Alberto Apostolico, and Srinivas Aluru. ALFRED: A practical method for alignment-free distance computation. Journal of Computational Biology, 23(6):452–460, 2016. 27. Igor Ulitsky, David Burstein, Tamir Tuller, and Benny Chor. The average common substring approach to phylogenomic reconstruction. Journal of Computational Biology, 13(2):336–350, 2006. 28. Niko Välimäki, Susana Ladra, and Veli Mäkinen. Approximate all-pairs suffix/prefix overlaps. Inf. Comput., 213:49–58, 2012. 29. Dan E. Willard. Log-logarithmic worst-case range queries are possible in space theta(n). Inf. Process. Lett., 17(2):81–84, 1983. 12
8cs.DS
Article A Cost/ Speed/ Reliability Tradeoff to Erasing† Manoj Gopalkrishnan Received: date ; Accepted: date ; Published: date Academic Editor: name 1 arXiv:1410.1710v3 [cs.SY] 22 Apr 2016 † Tata Institute of Fundamental Research; [email protected] This paper is an extended version of the paper entitled ”Cost / speed / reliability tradeoff in erasing a bit”, presented at the 14th International Conference on Unconventional and Natural Computation, Auckland, New Zealand Abstract: We present a KL-control treatment of the fundamental problem of erasing a bit. We introduce notions of reliability of information storage via a reliability timescale τr , and speed of erasing via an erasing timescale τe . Our problem formulation captures the tradeoff between speed, reliability, and the Kullback-Leibler (KL) to erase a bit. We show that rapid erasing of   cost required τe a reliable bit costs at least log 2 − log 1 − e− τr r > log 2, which goes to 12 log 2τ τe when τr >> τe . Keywords: Erasing; Information; Thermodynamics; Kullback-Leibler; Optimal control; Reliability; Speed; Tradeoff 1. Motivation Biological systems are remarkably ordered at multiple scales and dimensions, from the spatial order witnessed in the packing of DNA inside the nucleus, the arrangement of cells to form tissues, and organs, and whole organisms, to the temporal order witnessed in the execution of various cellular processes. Superficially such order might appear to violate the second law of thermodynamics which requires an increase in disorder with overwhelmingly high probability. In fact, there is no violation since biological systems expend energy to bring about and maintain this increase in order. We would like to understand this “energy to order” conversion quantitatively. What are the fundamental limits to this conversion? Order can be measured in terms of information, by counting the number of bits required to describe that order. From this point of view, understanding how much energy is required to create order becomes an instance of the investigation of the connection between information processing and thermodynamics. The basic information processing operation that increases order is the operation of “erasing” or resetting a bit to state 0. To fix ideas, imagine erasing random chalk marks from a blackboard, to leave it in a neat and ordered state. Szilard [1] and later Landauer [2] have argued from the second law of thermodynamics that erasing at temperature T requires at least k B T log 2 units of energy, where k B is Boltzmann’s constant. The Szilard engine is a simple illustration of this result. Imagine a single molecule of ideal gas in a cylindrical vessel. If this molecule is in the left half of the vessel, think of that as encoding the bit “0,” and the bit “1” otherwise. Erasing this Brownian bit corresponds to ensuring that the molecule lies on the left half, for example by compressing the ideal gas to half its volume. For a heuristic analysis we may use the ideal gas law PV = k B T, integrating the expression dW = − PdV for work from limits V to V/2 to obtain W = k B T log 2. More rigorous and general versions of this calculation are known, which also clarify why this is a lower bound [3–5]. In practice, one finds that both man-made and biological instrumentation often require energy substantially more than k B T log 2 to perform erasing [6,7]. John von Neumann remarked on this large gap in his 1949 lectures at the University of Illinois [8]. (Bennett [9] has remarked that DNA polymerases come close to the k B T log 2 bound. To copy a single base, a DNA polymerase hydrolyzes Entropy 2016, xx, 1–x; doi:10.3390/—— www.mdpi.com/journal/entropy Entropy 2016, xx, 1–x a triphosphate molecule to a monophosphate, which provides close to 18k B T at temperature T = 300K. Note that this is still almost two orders of magnitude away from k B T log 2. Further, it is not clear whether the comparison is valid at all since copying and erasing are different operations.) How does one explain this large gap? Note that the result of k B T log 2 holds only in the isothermal limit, which takes infinite time. In practice, we want erasing to be performed rapidly, say in time τe , which requires extra entropy production. For intuition, suppose one wants to compress a gas in finite time τe . The gas heats up, and pushes back, increasing the work required. Several groups [10–12] have recognized that rapid erasing requires entropy production which pushes up the cost of erasing beyond k B T log 2, and have obtained bounds for this problem. A grossly oversimplified, yet qualitatively accurate, sketch of these various results is obtained by considering the energy cost of compressing the Szilard engine rapidly. Specializing a result from finite-time thermodynamics [13] to the case of the Szilard engine, one obtains an energy cost   k log 2 1 + στe −B k log 2 k B T log 2 where σ is the coefficient of heat conductivity of the vessel. B The bounds obtained by such considerations depend on technological parameters like the heat conductivity σ, and not just on fundamental constants of physics and the requirement specifications of the problem. If one varies over the technological parameters as well, e.g. allowing σ → ∞, the energy cost tends to k B T log 2. Does there exist a more fundamental analysis for the cost of erasing that is independent of technological parameters, and improves on k B T log 2? This is the open question we address in this paper. Our contribution: We follow up on von Neumann’s suggestion [8] that the gap was “due to something like a desire for reliability of operation.” Swanson [14] and Alicki [15] have also looked into issues of reliability. We introduce the notion of “reliability timescale” τr , and explicitly consider the three-way trade-off between speed, reliability, and cost. The other novelty of our approach is in bringing the tools of Kullback-Leibler (KL) control [16,17] to bear on the problem of erasing a bit. The intuitive idea is that the control can reshape the dynamics as it pleases, but pays for the deviation from the uncontrolled dynamics. The cost of reshaping the dynamics is a relative entropy or KL divergence between the controlled and the uncontrolled dynamics, expressed as measures on path space. We find theoptimal control for rapid erasing of a reliable bit, and argue that it requires cost of at  τe r least log 2 − log 1 − e− τr > log 2, which goes to 21 log 2τ τe when τr >> τe . Importantly, our answer does not depend on any technological parameters, but only on the requirement specifications τr and τe of the problem. 2. The Erasing Problem As a model of a bit, consider a two-state continuous-time Markov chain with states 0 and 1 and the passive or uncontrolled dynamics given by transition rates k01 from state 0 to state 1 and k10 from state 1 to state 0. 0 k01 k10 1 The transition rates k01 and k10 model spontaneous transitions between the states when no one is looking at the bit or trying to erase it. The time independence of these rates represents the physical fact that the system is not being driven. Such finite Markov chain models often arise in physics by “coarse-graining.” For example, for the case of the Szilard engine, the transition rate k10 models the rate at which the molecule enters the left side, conditioned on it currently being on the right side. Apart from their importance in approximating the behavior of real physical systems, finite Markov chains are also important to thermodynamics from a logical point of view. They may be viewed as finite models of a mathematical theory of thermodynamics. The terms “theory” and 2 Entropy 2016, xx, 1–x “model” are to be understood in their technical sense as used in mathematical logic. We develop this remark no further here since doing so would take us far afield. Suppose the distribution at time t is ( p0 (t), p1 (t)) with p1 (t) = 1 − p0 (t). Then the time evolution of the bit is described by the ODE ṗ0 (t) = −k01 p0 (t) + k10 (1 − p0 (t)). (1) Setting π0 = k10 /(k01 + k10 ) and the reliability timescale τr := 1/(k01 + k10 ), this admits the solution p0 (t) = π0 + e−t/τr ( p0 (0) − π0 ) (2) Here τr represents the time scale on which memory is preserved. The smaller the rates k01 and k10 , the larger is the value of τr , and the slower the decay to equilibrium, so that the system remembers information for longer. Fix a required erasing time τe . Fix p(0) = π0 . We want to control the dynamics with transition rates u01 (t) and u10 (t) to achieve p(τe ) = (1, 0), where ṗ0 (t) = −u01 (t) p0 (t) + u10 (t)(1 − p0 (t)) (3) ∗ ( t ) and u∗ ( t ) to achieve this objective, according We want to find the cost of the optimal protocol u01 10 to a cost function which we introduce next. In particular, when k01 = k10 , the equilibrium distribution π = (π0 , 1 − π0 ) takes the value (1/2, 1/2) and we can interpret this task as erasing a bit of reliability τr = 1/(k01 + k10 ) in time τe . 2.1. Kullback Leibler Cost Define the path space P := {0, 1}[0,τe ] of the two-state Markov chain. This is the set of all paths in the time interval [0, τe ] that jump between states 0 and 1 of the Markov chain. Each path can also be succinctly described by its initial state, and the times at which jumps occur. We can also effectively think of the path space as the limit as h → 0 of the space Ph := {0, 1}{0,h,2h,...,Nh=τe } corresponding to the discrete-time Markov chain that can only jump at clock ticks of h units. Once the rates u01 (t), u10 (t) and the initial distribution p(0) = p for the Markov chain are fixed, there is a unique probability measure µu,p on path space which intuitively assigns to every path the probability of occurrence of that path according to the Markov chain evolution (Equation 3) with initial conditions p. h for a single path i = For pedagogic reasons, we first describe the discrete-time measure µu,p (i0 , i1 , . . . , i N ) ∈ Ph . First we describe the transition probabilities of the discrete-time Markov chain. For a, b ∈ {0, 1} with a 6= b, for all times t, define uhaa (t) := 1 − hu ab (t) and uhab (t) := hu ab (t) as the probability of jumping to a and to b respectively in the time step t, conditioned on being in state a. Then the probability of the path i under control u is given by: N −1 µu,p (i ) := pi0 ∏ uihj ,ij+1 ( jh) j =0 3 Entropy 2016, xx, 1–x Figure 1. The discrete-time path space Ph . A specific path is labeled in red. h by sending We describe the continous-time case now. We could obtain the measure µu,p from µu,p h → 0, but it can also be described more directly. Fix i0 ∈ {0, 1}, and consider the set of paths S = Si0 ,t1 ,t2 ,...,tn starting at i0 with jumps occurring around times t1 < t2 < · · · < tn within infinitesimal intervals dt1 , dt2 , . . . , dtn and leading to the trajectory (i0 , i1 , . . . , in ) ∈ {0, 1}n+1 . Setting t0 = 0: µu,p (S) := pi0 n −1 − R t j +1 u i t ∏e j j i j +1 (s)ds ui j i j+1 (t j+1 )dt j+1 j =0 R t1 where pi0 is the probability of starting at i0 , e− 0 ui0 i1 (s)ds is the probability of not jumping in the time interval (0, t1 ), ui0 i1 (t1 )dt1 is the probability of jumping from i0 to i1 in the interval (t1 , t1 + dt1 ) and so on. This is the well-known Feynam-Kac formula for this Markov chain. Specializing to u01 (t) = k01 and u10 (t) = k10 , we obtain the probability measure µk,p induced on P by the passive dynamics (Equation 1) with initial conditions p. We declare the Kullback Leibler (KL) cost D (µu,p k µk,p ) as the cost for implementing the control u. More generally, for a physical system with path space P , passive dynamics corresponding to a measure ν on P , and a controlled dynamics with a control corresponding to a measure µ on P , we declare D (µkν) as the cost for implementing the control. This cost function has been widely used in control theory [16–27]. In Section 4 we will explore some other interpretations of this cost function. 3. Solution to the Erasing Problem Out of all controls u(t), we want to find a control u∗ (t) that starts from   k10 k01 p (0) = π = , (k01 + k10 k01 + k10 and achieves p(τe ) = (1, 0) while minimizing the relative entropy D (µu∗ ,π k µk,π ). To find: u∗ = arg inf D (µu,π k µk,π ) u Subject to: µu,π (τe ) = (1, 0) Question ?? can be described within the framework of a well-studied problem in optimal control theory that has a closed-form solution [16,17,28]. Following Todorov [16], we introduce the optimal cost-to-go function v(t) = (v0 (t), v1 (t)). We intend vi (t) to denote the expected cumulative cost for starting at state i at time t < τe , and reaching a distribution close to (1, 0) at time τe . To discourage the system from being in state 1 at time τe , define v1 (τe ) = +∞ and v0 (τe ) = 0. Suppose the control performs actions u01 (t) and u10 (t) at time t. Fix a small time h > 0. Define the transition probability uijh (t) as the probability that a trajectory starting in state i at time t will be found 4 Entropy 2016, xx, 1–x in state j at time t + h. When i 6= j, uijh (t) ≈ huij (t), whereas uiih (t) ≈ 1 − uijh (t) ignoring terms of size O(h2 ). We define k hij similarly. Let “log” denote the natural logarithm. To derive the law satisfied by the optimal cost-to-go v(t), we approximate v(t) by the backward recursion relations: " v0 (t) = min E vi (t + h) + log u01 (t) " v1 (t) = min E vi (t + h) + log u10 (t) h (t) u0i # h k0i h (t) u1i (4) # h k1i h ( t ), u h ( t )), and the second is over i ∼ h h where the first expectation is over i ∼law (u00 law ( u10 ( t ), u11 ( t )), 01 and the approximation ignores terms of size O(h2 ). As h → 0 the second terms E log uhji (t) k hji approach the relative entropy cost in path space over the time interval (t, t + h). In words, Equation 4 says that the cost-to-go from state 0 at time t equals the cost of the control u(t) plus the expected cost-to-go in the new state i reached at time t + h. The cost of the control is measured by relative entropy of the control dynamics relative to the passive dynamics, over the time interval (t, t + h). Define the desirability z0 (t) = e−v0 (t) and z1 (t) = e−v1 (t) . Define h h G0 [z](t) = k00 z0 (t) + k01 z1 ( t ), h h G1 [z](t) = k10 z0 (t) + k11 z1 ( t ). We can rewrite Equation 4 as " log z0 (t) = log G0 [z](t + h) − min E log h ( t ) G [ z ]( t + h ) u0i 0 h z (t + h) k0i i u01 (t) " log z1 (t) = log G1 [z](t + h) − min E log # h ( t ) G [ z ]( t + h ) u1i 1 u10 (t) # (5) h z (t + h) k1i i Since the last term is the relative entropy of (uhj0 (t), uhj1 (t)) relative to the probability distribution (khj0 z0 (t + h)/Gj [z](t + h), khj1 z1 (t + h)/Gj [z](t + h)), its minimum value is 0, and is achieved by the protocol u∗ given by: u∗ji (t) k ji = lim h →0 e− v i ( t + h ) e− v i ( t ) = −v (t) Gj [z](t + h) e j (6) when i 6= j. It remains to solve for z(t) and the optimal cost. From Equation 5, at the optimal control u∗ the desirability z(t) must satisfy the equation − log z(t) = − log G [z](t + h) + 0, so that: z0 ( t ) z1 ( t ) ! = 1 − k01 h k10 h k01 h 1 − k10 h 5 ! z0 ( t + h ) z1 ( t + h ) ! Entropy 2016, xx, 1–x which simplifies to dz dt = −Kz in the limit h → 0, where K =  −k01 k10 k10 −k10  is the infinitesimal Kt generator  of the Markov chain. This equation has the formal solution z(τe − t) = e z(τe ) where 1 z(τe ) = 0 . In the symmetric case k01 = k10 , 1/2 1/2 z(t) = ! +e t − τeτ− r 1/2 −1/2 ! where τr = 1/(k01 + k10 ). Substituting t = 0 and taking logarithms, we find the cost-to-go function at time 0:    !  −τe /τr log 1 + e log 2    v (0) = − log 2 log 1 − e−τe /τr When ν(0) = (1/2, 1/2) with k01 = k10 , the cost Cerase (τr , τe , T ) required for erasing a bit of reliability τr = 1/(k01 + k10 ) in time τe is at least: log 2 −   1 log 1 − e−2τe /τr 2 (7) Note that Cerase ≥ log 2 with equality when τe /τr → ∞, since 1 − e−2τe /τr ≤ 1. r From Equation 7, Cerase ≥ 21 log 2τ τe when τr >> τe . 4. Interpreting the KL cost One motivation for our cost function comes from the field of KL control theory. We now compare other possible meanings to this cost function. 4.1. Path space Szilard-Landauer correspondence The correspondence between information and thermodynamics was revealed in the work of Szilard, and clarified by Landauer. More rigorous and general treatments of this correspondence have been worked out recently [3–5]. We first recall this result, and then show how our cost function is a formal extension of this result. Consider a physical system with finite state space S and energy E : S → R. (More general state spaces S can be handled by replacing the sum by an appropriate integral. For our present purposes, it suffices to assume S is finite.) Define the Gibbs distribution π at temperature T by π (i ) = e− Ei /k B T ∑ j∈S e − Ej /k B T for all i ∈ S. Define the free energy F ( p) := 1 ∑ pi Ei − k B T ∑ pi log pi i ∈S i ∈S where p is a probability distribution. p Define the relative entropy D ( pkq) = ∑i∈S pi log q i with Euler’s constant for the base of i the logarithm. Following Jaynes [29], assume that equilibrium π corresponds to a maximally uninformative state of the system, so that we have zero information about the system when it is at equilibrium. Recall that a nat is the unit of information when logarithms are taken to the base of Euler’s constant. 1 bit = log 2 nats. Then the relative entropy D ( pkπ ) has an axiomatic identification with the amount of information in nats that we know about the system when it is in a nonequilibrium state p [4]. 6 Entropy 2016, xx, 1–x The following identity is easily verified: F ( p) − F (π ) = k B TD ( pkπ ). (8) The conceptual significance of this simple identity is that it supplies a dictionary between thermodynamics and information theory [4]. In particular, erasing a bit corresponds to increasing relative entropy which in turn corresponds — via the identity — to increasing available free energy F ( p) − F (π ) by k B T log 2, recovering the classical result of Szilard as an alternative statement of the second law of thermodynamics. In the other direction, charging a battery corresponds to increasing available free energy which in turn corresponds — via Identity 8 — to erasing of information. This relates the energy efficiency of charging a battery to the energy required to erase a bit. Now consider our cost function D (µkν). The relative entropy D (µkν) counts the number of nats erased by the control in path space, relative to the passive dynamics. Since the Szilard-Landauer principle asserts that erasing one bit requires at least k B T log 2 units of energy, our cost function may be viewed as a Path Space Szilard-Landauer Principle, formally extending Identity 8 to path space. 4.2. Thermodynamic interpretation We wish to compare the cost D (µkν) with the usual thermodynamic expected work ∆W. We will quickly outline how thermodynamic quantities can be defined for a two-state Markov chain. 4.2.1. Thermodynamics on a two-state Markov chain The ideas we present here are well-known in the nonequilibrium thermodynamics community, for example see Propp’s thesis [30]. The construction can be carried out more generally, but the generalization is not necessary for our present purposes. 1. Consider again the two-state continuous-time Markov chain with passive dynamics given by transition rates k01 and k10 . k01 0 1 k10 Let E0 and E1 denote the internal energy of states “0” and “1” respectively. Then the equilibrium distribution is given by π0 ∝ e− E0 /k B T and π1 ∝ e− E1 /k B T . We also have k01 π0 = k10 π1 from detailed balance. Together this yields E0 − E1 = k B T log k01 . k10 (9) 2. Now consider the same two-state system with a control applied to it by means of a field of potential φ(t) = (φ0 (t), φ1 (t)) so that the potential energy in state i becomes Ei + φi (t). The transition rates due to the control become u01 (t) and u10 (t). By a reasoning similar to how we derived Equation 9, we get E0 + φ0 − E1 − φ1 = k B T log u01 . u10 Combining with Equation 9 this yields φ0 − φ1 = k B T log 7 u01 k10 u10 k01 (10) Entropy 2016, xx, 1–x 3. Given a distribution p = ( p0 , p1 ) on the states, we can define the following thermodynamic quantities: • Expected internal energy E( p) = p0 E0 + p1 E1 . • Entropy S( p) = − p0 log p0 − p1 log p1 . • Nonequilibrium free energy F ( p) = E( p) − k B TS( p). 4. Given a transition from state i to state j in the presence of the control field, we can define the following thermodynamic quantities: • Heat dissipated Qij (t) = Ei + φi (t) − Ej − φj (t). • Work done by the control Wij (t) = φi (t) − φj (t). This expression for work can be traced back to Sekimoto [31], and is commonly employed in the field of Stochastic Thermodynamics to describe the work done by switching on a control field [32]. p (t) • Entropy increase of the system Sij (t) = log pi (t) . j The first law of thermodynamics manifests as Wij = Qij + Ei − Ej . 5. Suppose the system is described at time t by a distribution p(t) = ( p0 (t), p1 (t)). Define the Current Jij (t) = pi (t)uij (t) − p j (t)u ji (t) so that ṗ0 (t) = − J01 (t). 6. We can further compute dE dt dW dt dQ dt dS dt dF dt = J01 (t)( E1 (t) − E0 (t)) = k B T J01 (t) log k10 k01 = J01 (t)W01 (t) = J01 (t)(φ0 (t) − φ1 (t)) = k B T J01 (t) log u01 (t)k10 u10 (t)k01 = J01 (t) Q01 (t) = J01 (t)( E0 + φ0 (t) − E1 − φ1 (t)) = k B T J01 (t) log = J01 (t)S01 (t) = J01 (t) log = k B T J01 (t) log u01 (t) u10 (t) p0 ( t ) p1 ( t ) k10 p1 (t) k01 p0 (t) 7. Define Total Entropy Production Stot (t) to be the total entropy produced from time 0 to time t. In other words, Stot (0) = 0 and 1 dQ dS dStot (t) = + . dt k B T dt dt After simplification, dStot (t) p (t)u01 (t) = ( p0 (t)u01 (t) − p1 (t)u10 (t)) log 0 ≥0 dt p1 (t)u10 (t) (11) which is a statement of the second law of thermodynamics. 8. The following identity is immediate dW dF dStot = + dt dt dt and is another form of the first law. 4.2.2. Thermodynamic cost for rapid erasing of a reliable bit How much does it cost for rapid erasing of a reliable bit, with the cost function equal to ∆W? We claim that it costs k B log 2. In particular, neither the reliability timescale τr nor the erasing timescale τe appear in this answer. 8 Entropy 2016, xx, 1–x Suppose we can erase a (τr , τe ) bit for work W. First note that dW dt is a function of k 01 /k 10 , u01 (t)/u10 (t) and J01 (t) as in (6). In particular, simultaneously sending the rates k01 and k10 as low as possible while keeping their ratio the same has no effect on the work. So if we can erase a (τr , τe ) bit for work W, then we can erase a ( Aτr , τe ) bit for work W, for an arbitrarily large constant A. In particular it is enough for us to demonstrate a protocol when τr = 1. Now note that dW dt depends only on the ratio u01 ( t ) /u10 ( t ) and not on the actual values of the rates. We can also erase a (τr , τe /2) bit for work W by taking the (τr , τe )-protocol (uij (t)) and defining new rates vij (t) = 2uij (2t). Since v01 (t)/v10 (t) = u01 (2t)/u10 (2t), it follows from a simple calculation that the work required does not change. By taking a limit of this time scaling argument, we only need to erase a (1, +∞) bit. Here the infinite-time isothermal protocol, which proceeds by raising the ‘1’ well infinitesimally, waiting for the system to equilibrate, and repeating, erases for a total work of k B T log 2 since that is the free energy difference between the initial and final state, and there is no extra dissipation. This establishes our claim. A more detailed version of this calculation can be found in [33]. This work assumes that there is a maximum energy limit Emax to which a state can be raised, so that there will be some small error to erasing. It also makes another assumption about thermalization timescale which translates in our setting to assuming that there is a maximum value to the rates u01 (t) and u10 (t). With these assumptions, they show that the cost of rapid erasing is slightly more than k B log 2 and goes to k B T log 2 very quickly as the timescale of thermal relaxation becomes smaller and Emax goes to infinity. 4.2.3. Link between KL-cost and thermodynamic work We will now characterize entropy production in terms of time reversal. This will allow us to make a link between KL-cost and the thermodynamic work W. We first recall the notion of time reversal of a Markov chain. Usually time-reversal is defined for time-homogeneous Markov chains. However, for the purposes of characterizing entropy production in terms of time reversal, we will work with a definition that applies to time-inhomogeneous Markov chains also. Instead of giving this definition in full generality, we work with a Markov chain with a finite state space. This is sufficient for our purposes, and allows us to avoid dealing with certain technical issues. Note that given a matrix U with positive non-diagonal entries and U · 1 = 0, there is a nonnegative vector v such that v · U = 0. This can be shown by applying the Perron-Frobenius theorem to the exponential matrix eU . Definition 1 (Time-reversal). Consider a continuous-time time-inhomogeneous Markov chain with state space [n] = {1, 2, . . . , n} described by a time-dependent transition matrix U (t) = (uij (t))i,j∈[n] (so that at time t, uij (t) denotes the rate of jumping to state j given that the system is in state i). Let π (t) be a sequence of stationary probability distributions on [n], i.e., π (t)U (t) = 0 and πi ≥ 0 for all i ∈ [n] and ∑i πi = 1. Then the time-reversal Markov chain is described by the time-dependent transition matrix Û (t) = (ûij (t))i,j∈[n] where ûij (t) = πi (t)uij (t) πi ( t ) A Markov chain is reversible iff Û = U. The justification for considering time-reversal comes from Bayes’ rule. Reversible Markov chains are well-known to be characterized by the conditions of existence of a detailed balanced equilibrium, as well as by the Kolmogorov chain conditions. In particular, two-state Markov chains are always reversible. 9 Entropy 2016, xx, 1–x For the special case of Equation 3 in particular, given a distribution q at time τe , the time reversal Markov chain evolves in time according to the ODE: q̇0 (t) = −u01 (t)q0 (t) + u10 (t)(1 − q0 (t)), (12) q(τe ) = q. We see that the difference is that in Equation 3, the boundary condition was specified at time 0, whereas here the boundary condition is specified at time τe . We define the time-reversed measure µrev u,q as the measure on path space corresponding to the process described by Equation 12. Strictly speaking, we should write µrev u,q,τe to denote the time at which the boundary condition is provided to the differential equation, but we will avoid this by using the convention that we’re always going to set the boundary condition at time τe when considering the time-reversal. The following result is key to our comparison. Theorem 2. Run the control dynamics Equation 3 forward from initial condition p(0) upto time τe to obtain the distribution p(τe ). Consider the measure µrev . Then the total entropy production Stot (τe ) from time 0 u,p(τe ) to time τe equals Stot (τe ) = D (µu,p(0) kµrev u,p(τe ) ). Proof. We will show that the time derivative of the RHS equals the rate of entropy production. This will prove the theorem. Fix a time t ∈ [0, τe ]. Let the probability distribution at time t be represented by p(t) = ( p0 (t), p1 (t)). Let f ij := pi (t)uij (t) denote the flow rate from state i to state j 6= i at time t. Then pi (t + h) = pi (t) + h( f ji − f ij ) + o (h) where i 6= j and o (h) denotes terms g(h) such that limh→0 g(h)/h → 0. We will consider the probabilities of the four Markov chain transitions 0 → 0, 0 → 1, 1 → 0 and 1 → 1 in the interval (t, t + h) in the limit h → 0 according to µu,p(0) and according to µrev . Up to u,p(τ ) e terms of size o (h2 ), we have for i 6= j: µu,p(0) (i → j) = hpi (t)uij (t) = h f ij µrev u,p(τe ) (i → j ) = hp j ( t + h ) u ji ( t ) = h ( f ji + h ( f ij − f ji )) The increment in the relative entropy in the time interval (t, t + h) equals, upto o (h2 ) terms: h f 01 1 − h f 01 + h f 01 log 1 − h f 10 − h2 ( f 01 − f 10 ) h f 10 + h2 ( f 01 − f 10 ) h f 10 1 − h f 10 + h f 10 log + (1 − h f 10 ) log h f 01 + h2 ( f 10 − f 01 ) 1 − h f 01 − h2 ( f 10 − f 01 ) (1 − h f 01 ) log The off-diagonal terms contribute: (1 − h f 01 ) log 1 − h f 01 1 − h f 10 + (1 − h f 10 ) log 1 − h f 10 − h2 ( f 01 − f 10 ) 1 − h f 01 − h2 ( f 10 − f 01 ) ≈ (1 + o (h))(h f 10 − h f 01 + o (h2 )) + (1 + o (h))(h f 01 − h f 10 + o (h2 )) ≈ o ( h2 ) 10 Entropy 2016, xx, 1–x Divide by h, and take the limit h → 0. We can ignore the off-diagonal terms. The diagonal terms sum to the rate of entropy production dSdttot as in Equation 11, and we are done. By the First Law of Thermodynamics and Theorem 2, ∆W = ∆F + k B TD (µu,p kµrev u,p(τe ) ) (13) where the increase in free energy of the system ∆F = k B T ( D ( p(τe )kπ ) − D ( p(0)kπ )) by Equation 8. Now to compare our cost function with ∆W. Theorem 3. The KL-cost equals change in free energy by k B T plus a path-space relative entropy term that resembles entropy production: k B TD (µu,p k µk,p ) = ∆F + k B TD (µu,p kµrev k,p(τe ) ) (14) where p(τe ) is — as in Equation 13 — the solution to the control dynamics Equation 3 at time τe . Proof. Using Equation 8, we can rewrite the claim as D (µu,p k µk,p ) + D ( p(0)kπ ) = D (µu,p kµrev k,p(τe ) ) + D ( p ( τe )k π ) Both LHS and RHS equal D (µu,p k µk,π ). The assertion for the LHS is straightforward. The assertion for the RHS is true because time-reversal dynamics was defined to keep the stationary distribution π remain stationary under time reversal. Comparing 13 and 14, a KL control treatment replaces the total entropy production D (µu,p kµrev ) in 13 by the new term D (µu,p kµrev ) which compares the control dynamics with the u,p(τe ) k,p(τe ) time reversal of the passive dynamics. This suggests an interpretation as follows. If we applied the control during some time interval [0, τe ], and remembered what control we applied, then the entropy production is correctly given by D (µu,p kµrev ). However, the information that a control was applied u,p(τe ) also needs to be stored somewhere. If we forget that a control was applied, and if application of the control is very rare, then our default model for the dynamics should be much closer to the passive dynamics. In this case, entropy production may be closer to the value D (µu,p kµrev ). k,p(τ ) e 4.3. Large deviations interpretation Our cost function D (µkν) also admits a large deviation interpretation which was, remarkably, already noted by Schrödinger in 1931 [34–37]. Motivated by quantum mechanics, Schrödinger asked: conditioned on a more or less astonishing observation of a system at two extremes of a time interval, what is the least astonishing way in which the dynamics in the interval could have proceeded? Specializing to our problem of erasing, suppose an ensemble of two-state Markov chain with passive dynamics given by Equation 1 was observed at time 0 and at time τe . Suppose the empirical state distribution over the ensemble was found to be the equilibrium distribution π at time 0, and (1, 0) at time τe respectively. This would be astonishing because no control has been applied, yet the ensemble has arrived at a state of higher free energy. Conditioned on this rare event having taken place, what is the least unlikely measure µ∗ on path space via which the process took place? By a statistical treatment of multiple single particle trajectories, Schrödinger found that the likelihood of an empirical measure µ on path space falls exponentially fast with the relative entropy 11 Entropy 2016, xx, 1–x D (µkν) where ν is the measure induced by the passive dynamics. In particular, the least unlikely measure µ∗ is that measure which — among all µ whose marginals at time 0 and time τe respect the observations — minimizes D (µkν). So for the problem of erasing where k01 = k10 , the measure µ varies over all measures that have marginal (1/2, 1/2) at time 0 and marginal (1, 0) at time τe , and µ∗ is that measure among all such µ that minimizes D (µkµk,(1/2,1/2) ). Thus our optimal control produces in expectation the least surprising trajectory among all controls that perform rapid erasing. 4.4. Gibbs measure Equation 6 is not accidental for this example, but is in fact a general feature when the cost function is relative entropy [28]. More abstractly, the Radon-Nikodym derivative (i.e., “probability d µ∗ density”) d ν of the measure µ∗ induced on path space by the optimal control u∗ with respect to the measure ν induced by the passive dynamics is a Gibbs measure, with the cost-to-go function v(t) playing the role of an energy function. In other words, mathematically our problem is precisely the free energy minimization problem so familiar from statistical mechanics. There is also a possible physical interpretation: we are choosing paths in P as microstates, instead of points in phase space. The idea of paths as microstates has occurred before [38]. 5. Concluding remarks Since charging a battery can also be thought of as erasing a bit [4], our result may also hold insights into the limits of efficiencies of rapidly charging batteries that must simultaneously hold their energy for a long time. So long as the noise is Markovian, we conjecture that the KL cost for erasing the two-state Markov chain is a lower bound for more general cases – for example for bits with Langevin dynamics [39], which is a stochastic differential equation expressing Newton’s laws of motion with Brownian noise perturbations. Acknowledgments: I thank Sanjoy Mitter, Vivek Borkar, Nick S. Jones, Mukul Agarwal, and Krishnamurthy Dvijotham for helpful discussions. I thank Abhishek Behera for drawing Figure 1. References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Leo Szilard. On the reduction of entropy in a thermodynamic system by the interference of intelligent beings. Z Phys, 53:840–856, 1929. Rolf Landauer. Irreversibility and heat generation in the computing process. IBM Journal of Research and Development, 5:183–191, 1961. Massimiliano Esposito and Christian Van den Broeck. Second law and Landauer principle far from equilibrium. EPL (Europhysics Letters), 95(4):40004, 2011. Manoj Gopalkrishnan. The Hot Bit I: the Szilard-Landauer correspondence. CoRR, abs/1311.3533, 2013. David Reeb and Michael M Wolf. An improved Landauer principle with finite-size corrections. New Journal of Physics, 16(10):103011, 2014. Simon B Laughlin, Rob R de Ruyter van Steveninck, and John C Anderson. The metabolic cost of neural information. Nature neuroscience, 1(1):36–41, 1998. Trevor Mudge. Power: A first-class architectural design constraint. Computer, 34(4):52–58, 2001. John von Neumann. Theory of self-reproducing automata, page 66. University of Illinois Press, Urbana, 1966. lecture delivered at University of Illinois in December, 1949. Charles H. Bennett. The thermodynamics of computation – a review. Int. J. Theo. Phys., 21(12):905–940, 1982. Erik Aurell, Krzysztof Gawȩdzki, Carlos Mejía-Monasterio, Roya Mohayaee, and Paolo Muratore-Ginanneschi. Refined second law of thermodynamics for fast random processes. Journal of statistical physics, 147(3):487–505, 2012. Giovanni Diana, G Baris Bagci, and Massimiliano Esposito. Finite-time erasing of information stored in fermionic bits. Physical Review E, 87(1):012111, 2013. 12 Entropy 2016, xx, 1–x 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. Patrick R Zulkowski and Michael R DeWeese. Optimal finite-time erasure of a classical bit. Physical Review E, 89(5):052140, 2014. Peter Salamon and Abrahan Nitzan. Finite time optimizations of a Newton’s law Carnot cycle. The Journal of Chemical Physics, 74:3546, 1981. JA Swanson. Physical versus logical coupling in memory systems. IBM Journal of Research and Development, 4(3):305–310, 1960. Robert Alicki. Information is not physical. arXiv preprint arXiv:1402.2414, 2014. Emanuel Todorov. Efficient computation of optimal actions. Proceedings of the national academy of sciences, 106(28):11478–11483, 2009. Wendell H Fleming and Sanjoy K Mitter. Optimal control and nonlinear filtering for nondegenerate diffusion processes. Stochastics: An International Journal of Probability and Stochastic Processes, 8(1):63–77, 1982. Hilbert J Kappen. Path integrals and symmetry breaking for optimal control theory. Journal of statistical mechanics: theory and experiment, 2005(11):P11011, 2005. Hilbert J Kappen. Linear theory for control of nonlinear stochastic systems. Physical review letters, 95(20):200201, 2005. Evangelos A Theodorou. Iterative path integral stochastic optimal control: Theory and applications to motor control. PhD thesis, University of Southern California, 2011. Evangelos Theodorou and Emanuel Todorov. Relative entropy and free energy dualities: Connections to path integral and KL control. In CDC, pages 1466–1473, 2012. Freek Stulp, Evangelos A Theodorou, and Stefan Schaal. Reinforcement learning with sequences of motion primitives for robust manipulation. Robotics, IEEE Transactions on, 28(6):1360–1370, 2012. Krishnamurthy Dvijotham and Emanuel Todorov. A unified theory of linearly solvable optimal control. Artificial Intelligence (UAI), page 1, 2011. Hilbert J Kappen, Vicenç Gómez, and Manfred Opper. Optimal control as a graphical model inference problem. Machine learning, 87(2):159–182, 2012. Bart van den Broek, Wim Wiegerinck, and Bert Kappen. Graphical model inference in optimal control of stochastic multi-agent systems. J. Artif. Intell. Res.(JAIR), 32:95–122, 2008. Wim Wiegerinck, Bart van den Broek, and Hilbert Kappen. Stochastic optimal control in continuous space-time multi-agent systems. arXiv preprint arXiv:1206.6866, 2012. Matanya Benasher Horowitz. Efficient methods for stochastic optimal control. PhD thesis, California Institute of Technology, 2014. Paul Dupuis and Richard S Ellis. A weak convergence approach to the theory of large deviations, volume 902. John Wiley & Sons, 2011. Edwin T Jaynes. Information theory and statistical mechanics. Physical review, 106(4):620, 1957. Michael Benjamin Propp. The thermodynamic properties of Markov processes. PhD thesis, Massachusetts Institute of Technology, 1985. Ken Sekimoto. Kinetic characterization of heat bath and the energetics of thermal ratchet models. Journal of the physical society of Japan, 66(5):1234–1237, 1997. Udo Seifert. Stochastic thermodynamics, fluctuation theorems and molecular machines. Rep. Prog. Phys., 75(12):126001, 2012. Browne, Cormac, Andrew JP Garner, Oscar CO Dahlsten, and Vlatko Vedral. Guaranteed energy-efficient bit reset in finite time. Physical review letters, 113(10):100603, 2014. E Schrödinger. Uber die umkehrung der naturgesetze, sitzung ber preuss. Akad. Wissen., Berlin Phys. Math, 144, 1931. Arne Beurling. An automorphism of product measures. Annals of Mathematics, pages 189–200, 1960. Hans Föllmer. Random fields and diffusion processes. In École d’Été de Probabilités de Saint-Flour XV–XVII, 1985–87, pages 101–203. Springer, 1988. Robert Aebi. Schrödinger diffusion processes. Springer, 1996. AD Wissner-Gross and CE Freer. Causal entropic forces. Physical review letters, 110(16):168702, 2013. R. Zwanzig. Nonequilibrium Statistical Mechanics. Oxford University Press, USA, 2001. 13 Entropy 2016, xx, 1–x c 2016 by the author; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons by Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/). 14
3cs.SY
COARSENINGS, INJECTIVES AND HOM FUNCTORS arXiv:1210.5325v1 [math.AC] 19 Oct 2012 FRED ROHRER Abstract. It is characterized when coarsening functors between categories of graded modules preserve injectivity of objects, and when they commute with graded covariant Hom functors. Introduction Throughout, groups and rings are understood to be commutative. By Ab, Ann and Mod(R) for a ring R we denote the categories of groups, rings, and R-modules, respectively. If G is a group, then by a G-graded ring we mean a pair (R, (Rg )g∈G ) consisting of a ring R and a family (Rg )g∈G of subgroups of the additive group of R whose direct sum equals the additive group of R such that for g, h ∈ G it holds Rg Rh ⊆ Rg+h . If (R, (Rg )g∈G ) is a G-graded ring, then by a G-graded R-module we mean a pair (M, (Mg )g∈G ) consisting of an R-module M and a family (Mg )g∈G of subgroups of the additive group of M whose direct sum equals the additive group of M such that for g, h ∈ G it holds Rg Mh ⊆ Mg+h . If no confusion can arise then we denote a G-graded ring (R, (Rg )g∈G ) just by R, and a G-graded R-module (M, (Mg )g∈G ) just by M . Accordingly, for a G-graded ring R, a G-graded R-module M and g ∈ G we denote by Mg the component of degree g of M . Given G-graded rings R and S, by a morphism of G-graded rings from R to S we mean a morphism of rings u : R → S such that u(Rg ) ⊆ Sg for g ∈ G, and given a G-graded ring R and G-graded R-modules M and N , by a morphism of G-graded R-modules from M to N we mean a morphism of R-modules u : M → N such that u(Mg ) ⊆ Ng for g ∈ G. We denote by GrAnnG and GrModG (R) for a G-graded ring R the categories of G-graded rings and G-graded R-modules, respectively, with the above notions of morphisms. In case G = 0 we canonically identify GrAnnG with Ann and GrModG (R) with Mod(R) for a ring R. Let ψ : G ։ H be an epimorphism in Ab and let R be a G-graded ring. We consider the ψ-coarsening R[ψ] of R, i.e., the H-graded ring whose underlying ring is the ring underlying R and whose component of degree h ∈ H is L g∈ψ−1 (h) Rg . An analogous construction for graded modules yields the ψcoarsening functor •[ψ] : GrModG (R) → GrModH (R[ψ] ), coinciding for H = 0 2010 Mathematics Subject Classification. Primary 13A02; Secondary 13C11. Key words and phrases. Graded ring, graded module, coarsening, refinement, injective module, small module, steady ring, graded Hom functor. The author was supported by the Swiss National Science Foundation. 1 2 FRED ROHRER with the functor that forgets the graduation. The aim of this note is to study functors of this type. Let M be a G-graded R-module. Some properties of M behave well under coarsening functors – e.g., M is projective (in GrModG (R)) if and only if M[ψ] is projective (in GrModH (R[ψ] )) –, but others do not. An example is injectivity. For H = 0 it is well known that if M[ψ] is injective then so is M , but that the converse does not necessarily hold. However, the converse does hold if G is finite, as shown by Nǎstǎsescu, Raianu and Van Oystaeyen ([9]). We generalize this to arbitrary H by showing that the converse holds if Ker(ψ) is finite, and we moreover show that this is the best possible without imposing further conditions on R or M (Theorem 2.4). One should note that finiteness of Ker(ψ) is fulfilled if G is of finite type and ψ is the canonical projection onto G modulo its torsion subgroup. Such coarsenings can be used to reduce the study of graduations by groups of finite type to that of (often easier) graduations by free groups of finite rank. A further interesting question is whether coarsening functors commute with graded Hom functors. The G-graded covariant Hom functor G HomR (M, •) of M maps a G-graded R-module N onto the G-graded R-module M G HomR (M, N ) = HomGrModG (R) (M, N (g)) g∈G (where •(g) denotes shifting by g). There is a canonical monomorphism of G H Hom functors hM R[ψ] (M[ψ] , •[ψ] ). For H = 0 this is ψ : HomR (M, •)[ψ] ֌ an isomorphism if and only if G is finite or M is small, as shown by Gómez Pardo, Militaru and Nǎstǎsescu ([5]). We generalize this to arbitrary H by showing that hM ψ is an isomorphism if and only if Ker(ψ) is finite or M is small (Theorem 3.7). A surprising consequence is that if hM ψ is an isomorphism for M some epimorphism ψ with infinite kernel then hϕ is an isomorphism for every epimorphism ϕ (Corollary 3.8). The proofs of the aforementioned results are similar to and inspired by those in [9] and [5]. In particular, they partially rely on the existence of adjoint functors of coarsening functors, treated in the first section. 1. Coarsening functors and their adjoints Let ψ : G ։ H be an epimorphism in Ab. We first recall the definition of coarsening and refinement functors for rings and modules, and the construction of some canonical morphisms of functors. (1.1) A) For a G-graded ring R there is an H-graded ring R[ψ] with underlyL ing ring the ring underlying R and with H-graduation ( g∈ψ−1 (h) Rg )h∈H . For u : R → S in GrAnnG there is a u[ψ] : R[ψ] → S[ψ] in GrAnnH with underlying map the map underlying u. This defines a functor •[ψ] : GrAnnG → GrAnnH , called ψ-coarsening. COARSENINGS, INJECTIVES AND HOM FUNCTORS 3 B) For an H-graded ring S there is a G-graded ring S [ψ] with G-graduation L (Sψ(g) )g∈G , so that its underlying additive group is g∈G Sψ(g) , and with multiplication given by the maps Sψ(g) × Sψ(h) → Sψ(g)+ψ(h) for g, h ∈ G induced by the multiplication of S. For v : S → T in GrAnnH there is a [ψ] v [ψ] : S [ψ] → T [ψ] in GrAnnG with vg = vψ(g) for g ∈ G. This defines a functor •[ψ] : GrAnnH → GrAnnG , called ψ-refinement. (1.2) A) For a G-graded ring R, the coproduct in Ab of the canonical inL [ψ] jections Rg ֌ for g ∈ G is a monomorphism f ∈ψ−1 (ψ(g)) Rf = (R[ψ] )g G [ψ] αψ (R) : R ֌ (R[ψ] ) in GrAnn , and the coproduct in Ab of the restrictions M Rf ։ Rg (R[ψ] )[ψ] g = f ∈ψ−1 (ψ(g)) Q of the canonical projections f ∈ψ−1 (ψ(g)) Rf ։ Rg for g ∈ G is an epimorphism δψ (R) : (R[ψ] )[ψ] ։ R in GrAnnG . Varying R we get a monomorphism αψ : IdGrAnnG ֌ (•[ψ] )[ψ] and an epimorphism δψ : (•[ψ] )[ψ] ։ IdGrAnnG . B) For an H-graded ring S, the coproduct in Ab of the codiagonals M ((S [ψ] )[ψ] )h = Sh ։ Sh g∈ψ−1 (h) for h ∈ H is an epimorphism βψ (S) : (S [ψ] )[ψ] ։ S in GrAnnH . If Ker(ψ) is finite, so that ψ −1 (h) is finite for h ∈ H, then the coproduct in Ab of the L Q [ψ] diagonals Sh ֌ g∈ψ−1 (h) Sh = g∈ψ−1 (h) Sg = ((S [ψ] )[ψ] )h for h ∈ H is a monomorphism γψ (S) : S ֌ (S [ψ] )[ψ] in GrAnnH . Varying S we get an epimorphism βψ : (•[ψ] )[ψ] ։ IdGrAnnH and — if Ker(ψ) is finite — a monomorphism γψ : IdGrAnnH ֌ (•[ψ] )[ψ] . (1.3) A) Let R be a G-graded ring. For a G-graded R-module M there is an H-graded R[ψ] -module M[ψ] with underlying R[0] -module the R[0] -module L underlying M and with H-graduation ( g∈ψ−1 (h) Mg )h∈H . For u : M → N in GrModG (R) there is a u[ψ] : M[ψ] → N[ψ] in GrModH (R[ψ] ) with underlying map the map underlying u. This defines an exact functor •[ψ] : GrModG (R) → GrModH (R[ψ] ), called ψ-coarsening. B) Let S be an H-graded ring. For an H-graded S-module M there is a Ggraded S [ψ] -module M [ψ] with G-graduation (Mψ(g) )g∈G , so that its underlying L additive group is g∈G Mψ(g) , and with S [ψ] -action given by the maps Sψ(g) × Mψ(h) → Mψ(g)+ψ(h) for g, h ∈ G induced by the S-action of M . For u : M → N in GrModH (S) [ψ] there is a u[ψ] : M [ψ] → N [ψ] in GrModG (S [ψ] ) with ug = uψ(g) for g ∈ G. This defines an exact functor •[ψ] : GrModH (S) → GrModG (S [ψ] ), called ψrefinement. 4 FRED ROHRER C) For a G-graded ring R, composing •[ψ] : GrModH (R[ψ] ) → GrModG ((R[ψ] )[ψ] ) with scalar restriction GrModG ((R[ψ] )[ψ] ) → GrModG (R) by means of αψ (R) (1.2 A)) yields an exact functor GrModH (R[ψ] ) → GrModG (R), by abuse of language again denoted by •[ψ] and called ψ-refinement. (1.4) A) Let R be a G-graded ring. For a G-graded R-module M , the coL [ψ] product in Ab of the canonical injections Mg ֌ f ∈ψ−1 (ψ(g)) Mf = (M[ψ] )g for g ∈ G is a monomorphism α′ψ (M ) : M ֌ (M[ψ] )[ψ] in GrModG (R), and L [ψ] the coproduct in Ab of the restrictions (M[ψ] )g = f ∈ψ−1 (ψ(g)) Mf ։ Mg of Q the canonical projections f ∈ψ−1 (ψ(g)) Mf ։ Mg for g ∈ G is an epimorphism δψ′ (M ) : (M[ψ] )[ψ] ։ M in GrModG (R). Varying M we get a monomorphism α′ψ : IdGrModG (R) ֌ (•[ψ] )[ψ] and an epimorphism δψ′ : (•[ψ] )[ψ] ։ IdGrModG (R) . B) For an H-graded R[ψ] -module M , the coproduct in Ab of the codiagonals L ((M [ψ] )[ψ] )h = g∈ψ−1 (h) Mh ։ Mh for h ∈ H is an epimorphism βψ′ (M ) : (M [ψ] )[ψ] ։ M in GrModH (R[ψ] ). If Ker(ψ) is finite, so that ψ −1 (h) is finite for h ∈ H, then the coproduct in Ab of the diagonals Y M Mh ֌ Mh = Mg[ψ] = ((M [ψ] )[ψ] )h g∈ψ−1 (h) g∈ψ−1 (h) for h ∈ H is a monomorphism γψ′ (M ) : M ֌ (M [ψ] )[ψ] in GrModG (R). Varying M we get an epimorphism βψ′ : (•[ψ] )[ψ] ։ IdGrModH (R[ψ] ) and — if Ker(ψ) is finite — a monomorphism γψ′ : IdGrModH (R[ψ] ) ֌ (•[ψ] )[ψ] . (1.5) Examples A) If H = 0 then •[ψ] coincides with the forgetful functor GrAnnG → Ann (for rings) or GrModG (R) → Mod(R[0] ) (for modules) that forgets the graduation. Z Z B) Let ψ : /2 → 0 and let S be a ring. The underlying additive group of is the group S ⊕ S, its components of degree 0 and 1 are S × 0 and 0 × S, respectively, and its multiplication is given by (a, b)(c, d) = (ac + bd, ad + cb) for a, b, c, d ∈ S. S [ψ] C) Let A be a ring and let R be the G-graded ring with R0 = A and Rg = 0 for g ∈ G\0. Then, R[ψ] is the H-graded ring with (R[ψ] )0 = A and (R[ψ] )h = 0 for h ∈ H \ 0, and GrModG (R) and GrModH (R[ψ] ) are canonically isomorphic to the product categories Mod(A)G and Mod(A)H , respectively. Under these isomorphisms, •[ψ] and •[ψ] correspond to functors Mod(A)G → Mod(A)H with L (Mg )g∈G 7→ ( g∈ψ−1 (h) Mg )h∈H and Mod(A)H → Mod(A)G with (Mh )h∈H 7→ (Mψ(g) )g∈G , respectively. Using this it is readily checked that for an H-graded R[ψ] -module M it holds (M [ψ] )[ψ] = M ⊕ Ker(ψ) . COARSENINGS, INJECTIVES AND HOM FUNCTORS 5 For modules, ψ-coarsening is left adjoint to ψ-refinement ([9, 3.1]), and for H = 0 the same holds for rings ([11, 1.2.2]). We recall now the result for modules and generalize the one for rings to arbitrary H. (1.6) Proposition a) For a G-graded ring R there is an adjunction  •[ψ] •[ψ] GrModG (R) −−→ GrModH (R[ψ] ), GrModH (R[ψ] ) −−→ GrModG (R) with unit α′ψ and counit βψ′ . b) There is an adjunction •[ψ] •[ψ] GrAnnG −−→ GrAnnH , GrAnnH −−→ GrAnnG  with unit αψ and counit βψ . Proof. Straightforward.  In [9, 3.1] it was shown that if Ker(ψ) is finite then ψ-refinement for modules is left adjoint to ψ-coarsening. For H = 0 this was sharpened by the result that ψ-coarsening has a left adjoint if and only if G is finite ([3, 2.5]). We now generalize this to arbitrary H and prove moreover the corresponding statement for rings. We will need the following remark on products of graded rings and modules. (1.7) A) The category GrAnnG has products, but •[ψ] does not necessarily Q commute with them. The product R = i∈I R(i) of a family (R(i) )i∈I of Ggraded rings in GrAnnG is a G-graded ring as follows. Its components are Q L Q (i) (i) i∈I Rg for g ∈ G, so that its underlying additive group is g∈G i∈I Rg . (i) (i) (i) For i ∈ I, the multiplication of R(i) is given by maps Rg × Rh → Rg+h for Q Q Q (i) (i) (i) g, h ∈ G, and their products i∈I Rg × i∈I Rh → i∈I Rg+h for g, h ∈ G define the multiplication of R. B) Let R be a G-graded ring. The category GrModG (R) has products, but Q •[ψ] does not necessarily commute with them. The product M = i∈I M (i) of a family (M (i) )i∈I of G-graded R-modules in GrModG (R) is a G-graded Q (i) R-module as follows. Its components are i∈I Mg for g ∈ G, so that its L Q (i) underlying additive group is g∈G i∈I Mg . For i ∈ I, the R-action of (i) (i) M (i) is given by maps Rg × Mh → Mg+h for g, h ∈ G, and their products Q Q (i) (i) Rg × i∈I Mh → i∈I Mg+h for g, h ∈ G define the R-action of M . (1.8) Theorem a) If R is a G-graded ring, then •[ψ] : GrModG (R) → GrModH (R[ψ] ) has a left adjoint if and only if Ker(ψ) is finite, and then  •[ψ] •[ψ] GrModH (R[ψ] ) −−→ GrModG (R), GrModG (R) −−→ GrModH (R[ψ] ) is an adjunction with unit γψ′ and counit δψ′ . 6 FRED ROHRER b) •[ψ] : GrAnnG → GrAnnH has a left adjoint if and only if Ker(ψ) is finite, and then  •[ψ] •[ψ] GrAnnH −−→ GrAnnG , GrAnnG −−→ GrAnnH is an adjunction with unit γψ and counit δψ . Proof. If Ker(ψ) is finite then γψ′ (for modules) and γψ (for rings) are defined (1.4 B), 1.2 B)). In both cases it is straightforward to check that •[ψ] is left adjoint to •[ψ] . We prove now the converse statement for modules, analogously to [11, 2.5.3]. Suppose •[ψ] has a left adjoint and thus commutes with products ([7, 2.1.10]). We consider the family of G-graded R-modules (M (g) )g∈Ker(ψ) with M (g) = (g) R(−g) for g ∈ G, so that eg = 1R ∈ Mg \ 0 for g ∈ G. For h ∈ Ker(ψ) we Q Q (h) (g) denote by π (h) : g∈Ker(ψ) M (g) → M (h) and ρ(h) : g∈Ker(ψ) M[ψ] → M[ψ] the canonical projections. There is a unique morphism ξ in GrModH (R[ψ] ) such that for h ∈ Ker(ψ) the diagram Q ( g∈Ker(ψ) M (g) )[ψ] ❘❘❘ ❘❘❘ ❘❘❘ ❘) (π (h) )[ψ] ξ / (h) M[ψ] Q (g) g∈Ker(ψ) M[ψ] ♠♠ ♠♠♠ v♠♠♠ ρ(h) in GrModH (R[ψ] ) commutes. This ξ is an isomorphism since •[ψ] commutes with products. Taking components of degree 0 we get a commutative diagram L Q ξh ∼ = (g) f ∈Ker(ψ) g∈Ker(ψ) Mf / Q L g∈Ker(ψ) f ∈Ker(ψ) ❚❚❚❚ ❚❚❚❚ * (g) Mf ❥❥❥❥ t ❥❥❥ ❥ Q (g) Q f ∈Ker(ψ) g∈Ker(ψ) Mf in Ab, where the unmarked morphisms are the canonical injections (1.7 B)). (g) (g) For g ∈ Ker(ψ) we set xgg = eg ∈ Mg \ 0 and xgf = 0 ∈ Mf for f ∈ g Ker(ψ) \ {g}. If g ∈ Ker(ψ) then {f ∈ Ker(ψ) | xf 6= 0} has a single element, Q L (g) so that ((xgf )f ∈Ker(ψ) )g∈Ker(ψ) ∈ g∈Ker(ψ) f ∈Ker(ψ) Mf . If f ∈ Ker(ψ) then xff = ef 6= 0, hence (xgf )g∈Ker(ψ) 6= 0, implying {f ∈ Ker(ψ) | (xgf )g∈Ker(ψ) 6= 0} = Ker(ψ). As ξh is an isomorphism it follows ((xgf )g∈Ker(ψ) )f ∈Ker(ψ) ∈ M Y (g) Mf . f ∈Ker(ψ) g∈Ker(ψ) (xgf )g∈Ker(ψ) Thus, Ker(ψ) = {f ∈ Ker(ψ) | 6= 0} is finite. Finally, the converse statement for rings is obtained analogously by considering the algebra K[G] of G over a field K, furnished with its canonical Ggraduation, and the family (R(g) )g∈Ker(ψ) of G-graded rings with R(g) = K[G] COARSENINGS, INJECTIVES AND HOM FUNCTORS 7 for g ∈ G. Denoting by {eg | g ∈ G} the canonical basis of K[G] and consid(g) ering the elements eg ∈ Rg \ 0 for g ∈ G we can proceed as above.  2. Application to injective modules We keep the hypothesis of Section 1. The symbols •[ψ] and •[ψ] refer always to coarsening functors for graded modules over appropriate graded rings. In this section we apply the foregoing generalities to the question on how injective graded modules behave under coarsening functors. A lot of work on this question, but mainly in case H = 0, was done by Nǎstǎsescu et al. (e.g. [3], [8], [9]). (2.1) Proposition Let R be a G-graded ring and let M be a G-graded Rmodule. If M[ψ] is injective then so is M . Proof. Analogously to [10, A.I.2.1].  The converse of 2.1 does not necessarily hold; see [10, A.I.2.6.1] for a counand H = 0. But in [9, 3.3] it was shown that the terexample with G = converse does hold if G is finite and H = 0. We generalize this to the case of arbitrary G and H such that Ker(ψ) is finite, and we moreover show that this is the best we can get without imposing conditions on R and M . Our proof is inspired by [3, 3.14]. We first need some remarks on injectives and cogenerators, and a (probably folklore) variant of the graded Bass-Papp Theorem; we include a proof for lack of reference. Z (2.2) A) A functor between abelian categories that has an exact left adjoint preserves injective objects ([12, 3.2.7]). B) In an abelian category C, a monomorphism with injective source is a section, and a section with injective target has an injective source ([7, 8.4.4– 5]). If C fulfils AB4∗ then an object A is an injective cogenerator if and only if every object is the source of a morphism with target AL for some set L ([7, 5.2.4]). This implies ([12, 3.2.6]) that if A is an injective cogenerator and L is a nonempty set then AL is an injective cogenerator. C) If R is a G-graded ring then GrModG (R) is abelian, fulfils AB5, and has a generator. Hence, it has an injective cogenerator ([7, 9.6.3]). D) Let R be a G-graded ring and let M be a G-graded R-module. Analogously to [1, X.1.8 Proposition 12] one sees that M is a cogenerator if and only if every simple G-graded R-module is the source of a nonzero morphism with target M . As M is simple if M[ψ] is so, it follows that if M is a cogenerator then so is M[ψ] . (2.3) Proposition A G-graded ring R is noetherian1 if and only if E ⊕N is injective for every injective cogenerator E in GrModG (R). 1as a G-graded ring, i.e., ascending sequences of graded ideals are stationary 8 FRED ROHRER Proof. Analogously to [2, 4.1] one shows that R is noetherian if and only if countable sums of injective G-graded R-modules are injective. Thus, if R is noetherian then E ⊕N is injective for every injective cogenerator E. Conversely, suppose this condition to hold, let (Mi )i∈N be a countable family of injective G-graded R-modules, and let E be an injective cogenerator in GrModG (R) (2.2 C)). For i ∈ there exist a nonempty set Li and a section Mi ֌ E Li Q the canonical projection L ։ Li (2.2 B)). Let L = i∈N Li . For i ∈ induces a monomorphism E Li ֌ E L . Composition yields a section Mi ֌ E L L we get a section j : (2.2 B)). Taking the direct sum over i ∈ i∈N Mi ֌ (E L )⊕N . Now, E L is an injective cogenerator (2.2 B)), so (E L )⊕N is injective L by hypothesis, and as j is a section thus so is i∈N Mi (2.2 B)). By the first sentence of the proof this yields the claim.  N N N (2.4) Theorem Ker(ψ) is finite if and only if •[ψ] : GrModG (R) → GrModH (R[ψ] ) preserves injectivity for every G-graded ring R. Proof. Finiteness of Ker(ψ) implies that •[ψ] preserves injectivity by 1.3 C), 1.8 a) and 2.2 A). For the converse we suppose that •[ψ] preserves injectivity for every G-graded ring and assume that Ker(ψ) is infinite. Let A be a nonnoetherian ring and let R be the G-graded ring with R0 = A and Rg = 0 for g ∈ G \ 0. Then, R[ψ] is the H-graded ring with (R[ψ] )0 = A and (R[ψ] )h ) = 0 for h ∈ H \ 0, and in particular non-noetherian. Let E be a injective cogenerator in GrModH (R[ψ] ) (2.2 C)). It holds (E [ψ] )[ψ] = E ⊕ Ker(ψ) (1.5 C)), and this H-graded R[ψ] -module is injective by 2.2 A), 1.6 a), 1.3 A) and the hypothesis. Now, infinity of Ker(ψ), 2.2 B) and 2.3 yield the contradiction that R[ψ] is noetherian.  (2.5) If Ker(ψ) is infinite and torsionfree we can construct more interesting examples of G-graded rings R such that •[ψ] does not preserve injectivity than in the proof of 2.4. Indeed, let A be the algebra of Ker(ψ) over a field, furnished with its canonical Ker(ψ)-graduation. Let R be the G-graded ring with Rg = Ag for g ∈ Ker(ψ) and Rg = 0 for g ∈ G \ Ker(ψ), so that R[ψ] is the H-graded ring with (R[ψ] )0 = A[0] and (R[ψ] )h = 0 for h ∈ H \ 0. The invertible elements of R are precisely its homogeneous elements different from 0 ([4, 11.1]), so that the G-graded R-module R is injective. If g ∈ Ker(ψ) \ 0 then x = 1 + eg ∈ A (where eg denotes the canonical basis element of A corresponding to g) is a nonhomogeneous non-zerodivisor of A[0] ([4, 8.1]), hence free and not invertible. So, there is a morphism of A[0] -modules hxiA[0] → A[0] with x 7→ 1 that cannot be extended to A[0] , and thus the H-graded R[ψ] -module R[ψ] is not injective. The above result can be used to show that graded versions of covariant right derived cohomological functors commute with coarsenings with finite kernel (cf. [14]). COARSENINGS, INJECTIVES AND HOM FUNCTORS 9 3. Application to Hom functors We keep the hypotheses of Section 2. Let R be a G-graded ring and let M be a G-graded R-module. If no confusion can arise we write Hom(•, ) instead of HomGrModG (R) (•, ) for the Hom bifunctor with values in Ab. As a second application of the generalities in Section 1 we investigate when coarsening functors commute with covariant graded Hom functors. For H = 0 a complete answer was given by Gómez Pardo, Militaru and Nǎstǎsescu ([5], see also [6]). We generalize their result to arbitrary H, leading to the astonishing observation that if a covariant graded Hom functor commutes with some coarsening functor with infinite kernel then it commutes with every coarsening functor. As in [5], the notion of a small module turns out to be important. We start by recalling it and then prove a generalization of [5, 3.1] on coarsening of small modules and of steady rings. (3.1) Let I be a set, let N = (Ni )i∈I be a family of G-graded R-modules L and let ιj : Nj ֌ i∈I Ni denote the canonical injection for j ∈ I. The monomorphisms Hom(M, ιj ) in Ab for j ∈ I induce a morphism λM I (N) in Ab such that the diagram Q L  / Hom(M, Hom(M, i∈I Ni )  i∈I Ni ) Hom(M,ι❤ j )❤❤❤4 O ❤❤ ❤ λM ❤ ❤ I (N) ❤ 4❤ L  / / Hom(M, Nj ) i∈I Hom(M, Ni ) ∼ = / Q i∈I O Hom(M, Ni ), where the unmarked monomorphisms are the canonical injections and the unmarked isomorphism is the canonical one, commutes for j ∈ I. It follows that λM I (N) is a monomorphism. If N is constant with value N then we write M λI (N ) instead of λM I (N). Varying N we get a monomorphism M M λM Hom(M, •i ) ֌ Hom(M, •i ) I : i∈I i∈I of covariant functors from GrModG (R)I to Ab. If I is finite then λM I is an isomorphism. (3.2) A) If N is a G-graded R-module then M is called N -small if λM I (N ) is an isomorphism for every set I. Furthermore, M is called small if λM I is an isomorphism for every set I, and this holds if and only if M is N -small for every G-graded R-module N ([5, 1.1 i)]). B) If M is of finite type then it is small. The G-graded ring R is called steady if every small G-graded R-module is of finite type. Noetherian G-graded rings are steady, but the converse does not necessarily hold ([5, 3.5], [13, 7◦ ; 10◦ ]). Furthermore, for every group G there exists a G-graded ring that is not steady ([5, p. 3178]). (3.3) Proposition a) M is small if and only if M[ψ] is small. 10 FRED ROHRER b) If N is a G-graded R-module, then M is M[ψ] is N[ψ] -small. L g∈G N (g)-small if and only if Proof. Immediately from 1.6 a), [5, 1.3 i)–ii)], and the facts that •[ψ] and •[ψ] L commute with direct sums and that g∈G N (g) = (N[ψ] )[ψ] .  (3.4) Proposition If R[ψ] is steady then so is R; the converse holds if Ker(ψ) is finite. Proof. If R[ψ] is steady and N is a small G-graded R-module then N[ψ] is small (3.3 a)), hence of finite type, and thus N is of finite type, too. Conversely, suppose Ker(ψ) is finite and R is steady, and let N be a small H-graded R[ψ] module. Since •[ψ] commutes with direct sums it follows that N [ψ] is small (1.8 a), [5, 1.3 ii)]), hence of finite type, and thus (N [ψ] )[ψ] is of finite type, too. The canonical epimorphism βψ′ (N ) : (N [ψ] )[ψ] ։ N (1.4 B)) shows now that N is of finite type.  Next, we look at graded covariant Hom functors and characterize when they commute with coarsening functors, thus generalizing [5, 3.4]. (3.5) The G-graded covariant Hom functor G HomR (M, •) maps a G-graded R-module N onto the G-graded R-module M G HomR (M, N ) = HomGrModG (R) (M, N (g)). g∈G For a G-graded R-module N and g ∈ G we have a monomorphism HomGrModG (R) (M, N (g)) ֌ HomGrModH (R[ψ] ) (M[ψ] , N[ψ] (ψ(g))), u 7→ u[ψ] in Ab, inducing a monomorphism hψ (M, N ) : G HomR (M, N )[ψ] ֌ H HomR[ψ] (M[ψ] , N[ψ] ) in GrModH (R[ψ]). Varying N we get a monomorphism G H hM ψ : HomR (M, •)[ψ] ֌ HomR[ψ] (M[ψ] , •[ψ] ). (3.6) Lemma If N is a G-graded R-module such that hM ψ (N ) is an isomorM phism then λKer(ψ) ((N (g))g∈Ker(ψ) ) is an isomorphism. Proof. Let u : M → L in GrModG (R). As M N (g))[ψ] = N[ψ] g∈G N (g) ( M g∈Ker(ψ) g∈Ker(ψ) H we can consider the codiagonal g∈Ker(ψ) N[ψ] → N[ψ] in GrMod (R[ψ] ) as L a morphism ∇ : ( g∈Ker(ψ) N (g))[ψ] → N[ψ] . Composition with u[ψ] yields ∇ ◦ u[ψ] ∈ H HomR[ψ] (M[ψ] , N[ψ] )0 . By our hypothesis there exist a finite subset L COARSENINGS, INJECTIVES AND HOM FUNCTORS 11 E ⊆ Ker(ψ) and for e ∈ E a ve : M → N (e) in GrModG (R) such that for x ∈ M P it holds ∇(u(x)) = re∈E ve (x). For g ∈ G this implies X X ∇(u(Mg )) ⊆ Ng+e = N (e)g . e∈E e∈E Let x = (xg )g∈G ∈ M with xg ∈ Mg for g ∈ G. For g ∈ G there exL L (g) ists (nh )h∈Ker(ψ) ∈ ( h∈Ker(ψ) N (h))g = h∈Ker(ψ) N (h)g with u(xg ) = P (g) (g) (nh )h∈Ker(ψ) , but it holds ∇(u(xg )) ∈ e∈E N (e)g and therefore nh = 0 for L L h ∈ Ker(ψ)\E. This implies ∇(u(x)) ∈ e∈E N (e), thus u(M ) ⊆ e∈E N (e), and hence the claim.  (3.7) Theorem hM ψ is an isomorphism if and only if M is small or Ker(ψ) is finite. Proof. If Ker(ψ) is finite then this is readily seen to hold. We suppose Ker(ψ) M is infinite. If M is small then hM 0 is an isomorphism ([5, 3.4]), thus h[ψ] is an isomorphism, too. Conversely, we suppose hM [ψ] is an isomorphism and prove that M is small. Let (Li )i∈N be a family of G-graded R-modules, let L L = i∈N Li , let li : Li ֌ L denote the canonical injection for i ∈ , and let L f : M → L in GrModG (R). Let N = g∈Ker(ψ) L(g), and let ng : L(g) ֌ N denote the canonical injection for g ∈ Ker(ψ). It is readily checked that N (g) ∼ = N for g ∈ Ker(ψ). As Ker(ψ) is infinite we can without loss of ⊆ Ker(ψ). Choosing for g ∈ an isomorphism N → generally suppose L N (g) we get a monomorphism v : N ⊕N ֌ g∈Ker(ψ) N (g). Furthermore, we L L ⊕N , hence a morphism get a monomorphism u = i∈N n0 ◦ li : i∈N Li ֌ N L v ◦ u ◦ f : M → g∈Ker(ψ) N (g). By 3.6 there exists a finite subset E ⊆ Ker(ψ) L L with v(u(f (M ))) ⊆ g∈E N (g) ⊆ g∈Ker(ψ) N (g). By construction of v there ′ with u(f (M )) ⊆ N ⊕E ⊆ N ⊕N . Thus, by exists a finite subset E ′ ⊆ L L construction of u, we have f (M ) ⊆ i∈E ′ Li ⊆ i∈N Li = L. Therefore, M is small.  N N N N At the end we get the surprising corollary mentioned before. (3.8) Corollary If there exists an infinite subgroup F ⊆ G such that, denotM ing by π : G ։ G/F the canonical projection, hM π is an isomorphism, then hψ is an isomorphism for every epimorphism ψ : G ։ H in Ab, and in particular hM 0 is an isomorphism Proof. Immediately from 3.7.  References [1] N. Bourbaki, Éléments de mathématique. Algèbre. Chapitre 10. Masson, Paris, 1980. [2] S. U. Chase, Direct products of modules. Trans. Amer. Math. Soc. 97 (1960), 457–473. [3] S. Dǎscǎlescu, C. Nǎstǎsescu, A. Del Rio, F. Van Oystaeyen, Gradings of finite support. Application to injective objects. J. Pure Appl. Algebra 107 (1996), 193–206. [4] R. Gilmer, Commutative semigroup rings. Chicago Lectures Math., Univ. Chicago Press, Chicago, 1984. 12 FRED ROHRER [5] J. L. Gómez Pardo, G. Militaru, C. Nǎstǎsescu, When is HOMR (M, −) equal to HomR (M, −) in the category R-gr? Comm. Algebra 22 (1994), 3171–3181. [6] J. L. Gómez Pardo, C. Nǎstǎsescu, Topological aspects of graded rings. Comm. Algebra 21 (1993), 4481–4493. [7] M. Kashiwara, P. Schapira, Categories and sheaves. Grundlehren Math. Wiss. 332, Springer, Berlin, 2006. [8] C. Nǎstǎsescu, Some constructions over graded rings: applications. J. Algebra 120 (1989), 119–138. [9] C. Nǎstǎsescu, S. Raianu, F. Van Oystaeyen, Modules graded by G-sets. Math. Z. 203 (1990), 605–627. [10] C. Nǎstǎsescu, F. Van Oystaeyen, Graded ring theory. North-Holland Math. Library 28, North-Holland, Amsterdam, 1982. [11] C. Nǎstǎsescu, F. Van Oystaeyen, Methods of graded rings. Lecture Notes in Math. 1836, Springer, Berlin, 2004. [12] N. Popescu, Abelian categories with applications to rings and modules. London Math. Soc. Monogr. Ser. 3, Academic Press, London, 1973. [13] R. Rentschler, Sur les modules M tels que Hom(M, −) commute avec les sommes directes. C. R. Acad. Sci. Paris Sér. A-B 268 (1969), 930–933. [14] F. Rohrer, Coarsening of graded local cohomology. To appear in Comm. Algebra. Universität Tübingen, Fachbereich Mathematik, Auf der Morgenstelle 10, 72076 Tübingen, Germany E-mail address: [email protected]
0math.AC